Skip to content
v2.273.0

MappingRuleProperty Struct ​

Defines how to map a claim to a role ARN.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const mappingRuleProperty: cognito.CfnIdentityPoolRoleAttachment.MappingRuleProperty = {
  claim: 'claim',
  matchType: 'matchType',
  roleArn: 'roleArn',
  value: 'value',
};

Properties ​

claimstringclaimstrclaimStringClaimstringClaim*stringrequired#
The claim name that must be present in the token.

For example: "isAdmin" or "paid".

matchTypestringmatch_typestrmatchTypeStringMatchTypestringMatchType*stringrequired#
The match condition that specifies how closely the claim value in the IdP token must match `Value` .

Valid values are: Equals , Contains , StartsWith , and NotEqual .

roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*stringrequired#
The Amazon Resource Name (ARN) of the role.
valuestringvaluestrvalueStringValuestringValue*stringrequired#
A brief string that the claim must match.

For example, "paid" or "yes".