Skip to content
v2.278.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',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cognito as cognito

mapping_rule_property = cognito.CfnIdentityPoolRoleAttachment.MappingRuleProperty(
    claim="claim",
    match_type="matchType",
    role_arn="roleArn",
    value="value"
)
java
// 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.*;

MappingRuleProperty mappingRuleProperty = MappingRuleProperty.builder()
        .claim("claim")
        .matchType("matchType")
        .roleArn("roleArn")
        .value("value")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Cognito;

var mappingRuleProperty = new MappingRuleProperty {
    Claim = "claim",
    MatchType = "matchType",
    RoleArn = "roleArn",
    Value = "value"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

mappingRuleProperty := &MappingRuleProperty{
	Claim: jsii.String("claim"),
	MatchType: jsii.String("matchType"),
	RoleArn: jsii.String("roleArn"),
	Value: jsii.String("value"),
}

Properties ​

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

For example: "isAdmin" or "paid".

matchTypestringmatch_typestrmatchTypeStringMatchTypestringMatchType*string required #
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*string required #
The Amazon Resource Name (ARN) of the role.
valuestringvaluestrvalueStringValuestringValue*string required #
A brief string that the claim must match.

For example, "paid" or "yes".