interface RoleMappingRule
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.IdentityPool.RoleMappingRule |
Java | software.amazon.awscdk.services.cognito.identitypool.RoleMappingRule |
Python | aws_cdk.aws_cognito_identitypool.RoleMappingRule |
TypeScript (source) | @aws-cdk/aws-cognito-identitypool » RoleMappingRule |
Represents an Identity Pool Role Attachment Role Mapping Rule.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cognito_identitypool from '@aws-cdk/aws-cognito-identitypool';
import * as iam from '@aws-cdk/aws-iam';
declare const role: iam.Role;
const roleMappingRule: cognito_identitypool.RoleMappingRule = {
claim: 'claim',
claimValue: 'claimValue',
mappedRole: role,
// the properties below are optional
matchType: cognito_identitypool.RoleMappingMatchType.EQUALS,
};
Properties
Name | Type | Description |
---|---|---|
claim | string | The key sent in the token by the federated identity provider. |
claim | string | The value of the claim that must be matched. |
mapped | IRole | The Role to be assumed when Claim Value is matched. |
match | Role | How to match with the Claim value. |
claim
Type:
string
The key sent in the token by the federated identity provider.
claimValue
Type:
string
The value of the claim that must be matched.
mappedRole
Type:
IRole
The Role to be assumed when Claim Value is matched.
matchType?
Type:
Role
(optional, default: RoleMappingMatchType.EQUALS)
How to match with the Claim value.