# RulesConfigurationTypeProperty

`RulesConfigurationType` is a subproperty of the [RoleMapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) property that defines the rules to be used for mapping users to roles.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
    } }
};
```

Golang:

```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

- `rules`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnIdentityPoolRoleAttachment.MappingRuleProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment.MappingRuleProperty.html)[] (required) — The rules.

  You can specify up to 25 rules per identity provider.
