Skip to content
v2.278.0

RulesConfigurationTypeProperty Struct ​

RulesConfigurationType is a subproperty of the RoleMapping property that defines the rules to be used for mapping users to roles.

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 rulesConfigurationTypeProperty: cognito.CfnIdentityPoolRoleAttachment.RulesConfigurationTypeProperty = {
  rules: [{
    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

rules_configuration_type_property = cognito.CfnIdentityPoolRoleAttachment.RulesConfigurationTypeProperty(
    rules=[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.*;

RulesConfigurationTypeProperty rulesConfigurationTypeProperty = RulesConfigurationTypeProperty.builder()
        .rules(List.of(MappingRuleProperty.builder()
                .claim("claim")
                .matchType("matchType")
                .roleArn("roleArn")
                .value("value")
                .build()))
        .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 rulesConfigurationTypeProperty = new RulesConfigurationTypeProperty {
    Rules = new [] { 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"

rulesConfigurationTypeProperty := &RulesConfigurationTypeProperty{
	Rules: []interface{}{
		&MappingRuleProperty{
			Claim: jsii.String("claim"),
			MatchType: jsii.String("matchType"),
			RoleArn: jsii.String("roleArn"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

rulesIResolvable | IResolvable | CfnIdentityPoolRoleAttachment.MappingRuleProperty[]rulestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MappingRuleProperty]]]rulesIResolvableRulesIResolvableRulesinterface{} required #
The rules.

You can specify up to 25 rules per identity provider.