RoleMappingRule
- class aws_cdk.aws_cognito_identitypool_alpha.RoleMappingRule(*, claim, claim_value, mapped_role, match_type=None)
Bases:
object
(experimental) Represents an Identity Pool Role Attachment role mapping rule.
- Parameters:
claim (
str
) – (experimental) The key sent in the token by the federated Identity Provider.claim_value (
str
) – (experimental) The value of the claim that must be matched.mapped_role (
IRole
) – (experimental) The role to be assumed when the claim value is matched.match_type (
Optional
[RoleMappingMatchType
]) – (experimental) How to match with the claim value. Default: RoleMappingMatchType.EQUALS
- Stability:
experimental
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_cognito_identitypool_alpha as cognito_identitypool_alpha from aws_cdk import aws_iam as iam # role: iam.Role role_mapping_rule = cognito_identitypool_alpha.RoleMappingRule( claim="claim", claim_value="claimValue", mapped_role=role, # the properties below are optional match_type=cognito_identitypool_alpha.RoleMappingMatchType.EQUALS )
Attributes
- claim
(experimental) The key sent in the token by the federated Identity Provider.
- Stability:
experimental
- claim_value
(experimental) The value of the claim that must be matched.
- Stability:
experimental
- mapped_role
(experimental) The role to be assumed when the claim value is matched.
- Stability:
experimental
- match_type
(experimental) How to match with the claim value.
- Default:
RoleMappingMatchType.EQUALS
- Stability:
experimental