Class CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cognito.CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnIdentityPoolRoleAttachment.RoleMappingProperty>
- Enclosing interface:
- CfnIdentityPoolRoleAttachment.RoleMappingProperty
@Stability(Stable)
public static final class CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnIdentityPoolRoleAttachment.RoleMappingProperty>
A builder for
CfnIdentityPoolRoleAttachment.RoleMappingProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionambiguousRoleResolution(String ambiguousRoleResolution) build()Builds the configured instance.identityProvider(String identityProvider) Sets the value ofCfnIdentityPoolRoleAttachment.RoleMappingProperty.getIdentityProvider()rulesConfiguration(IResolvable rulesConfiguration) rulesConfiguration(CfnIdentityPoolRoleAttachment.RulesConfigurationTypeProperty rulesConfiguration) Sets the value ofCfnIdentityPoolRoleAttachment.RoleMappingProperty.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
@Stability(Stable) public CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder type(String type) Sets the value ofCfnIdentityPoolRoleAttachment.RoleMappingProperty.getType()- Parameters:
type- The role-mapping type. This parameter is required.Tokenusescognito:rolesandcognito:preferred_roleclaims from the Amazon Cognito identity provider token to map groups to roles.Rulesattempts to match claims from the token to map to a role.Valid values are
TokenorRules.- Returns:
this
-
ambiguousRoleResolution
@Stability(Stable) public CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder ambiguousRoleResolution(String ambiguousRoleResolution) - Parameters:
ambiguousRoleResolution- Specifies the action to be taken if either no rules match the claim value for the Rules type, or there is nocognito:preferred_roleclaim and there are multiplecognito:rolesmatches for the Token type. If you specify Token or Rules as the Type, AmbiguousRoleResolution is required.Valid values are
AuthenticatedRoleorDeny.- Returns:
this
-
identityProvider
@Stability(Stable) public CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder identityProvider(String identityProvider) Sets the value ofCfnIdentityPoolRoleAttachment.RoleMappingProperty.getIdentityProvider()- Parameters:
identityProvider- Identifier for the identity provider for which the role is mapped. For example:graph.facebook.comorcognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id (http://cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id). This is the identity provider that is used by the user for authentication.If the identity provider property isn't provided, the key of the entry in the
RoleMappingsmap is used as the identity provider.- Returns:
this
-
rulesConfiguration
@Stability(Stable) public CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder rulesConfiguration(IResolvable rulesConfiguration) - Parameters:
rulesConfiguration- The rules to be used for mapping users to roles. If you specify "Rules" as the role-mapping type, RulesConfiguration is required.- Returns:
this
-
rulesConfiguration
@Stability(Stable) public CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder rulesConfiguration(CfnIdentityPoolRoleAttachment.RulesConfigurationTypeProperty rulesConfiguration) - Parameters:
rulesConfiguration- The rules to be used for mapping users to roles. If you specify "Rules" as the role-mapping type, RulesConfiguration is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnIdentityPoolRoleAttachment.RoleMappingProperty>- Returns:
- a new instance of
CfnIdentityPoolRoleAttachment.RoleMappingProperty - Throws:
NullPointerException- if any required attribute was not provided
-