Interface CfnIdentityPoolRoleAttachment.RoleMappingProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnIdentityPoolRoleAttachment.RoleMappingProperty.Jsii$Proxy
- Enclosing class:
CfnIdentityPoolRoleAttachment
RoleMappings , a property of the AWS::Cognito::IdentityPoolRoleAttachment resource that defines the role-mapping attributes of an Amazon Cognito identity pool.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cognito.*;
RoleMappingProperty roleMappingProperty = RoleMappingProperty.builder()
.type("type")
// the properties below are optional
.ambiguousRoleResolution("ambiguousRoleResolution")
.identityProvider("identityProvider")
.rulesConfiguration(RulesConfigurationTypeProperty.builder()
.rules(List.of(MappingRuleProperty.builder()
.claim("claim")
.matchType("matchType")
.roleArn("roleArn")
.value("value")
.build()))
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnIdentityPoolRoleAttachment.RoleMappingPropertystatic final classAn implementation forCfnIdentityPoolRoleAttachment.RoleMappingProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringIf you specify Token or Rules as theType,AmbiguousRoleResolutionis required.default StringIdentifier for the identity provider for which the role is mapped.default ObjectThe rules to be used for mapping users to roles.getType()The role mapping type.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getType
The role mapping type.Token will use
cognito:rolesandcognito:preferred_roleclaims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.- See Also:
-
getAmbiguousRoleResolution
If you specify Token or Rules as theType,AmbiguousRoleResolutionis required.Specifies the action to be taken if either no rules match the claim value for the
Rulestype, or there is nocognito:preferred_roleclaim and there are multiplecognito:rolesmatches for theTokentype.- See Also:
-
getIdentityProvider
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.- See Also:
-
getRulesConfiguration
The rules to be used for mapping users to roles.If you specify "Rules" as the role-mapping type, RulesConfiguration is required.
Returns union: either
IResolvableorCfnIdentityPoolRoleAttachment.RulesConfigurationTypeProperty- See Also:
-
builder
-