# MappingRuleProperty

Defines how to map a claim to a role ARN.

- 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 mappingRuleProperty: cognito.CfnIdentityPoolRoleAttachment.MappingRuleProperty = {
  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

mapping_rule_property = 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.*;

MappingRuleProperty mappingRuleProperty = MappingRuleProperty.builder()
        .claim("claim")
        .matchType("matchType")
        .roleArn("roleArn")
        .value("value")
        .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 mappingRuleProperty = 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"

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

## Properties

- `claim`: string (required) — The claim name that must be present in the token.

  For example: "isAdmin" or "paid".

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

- `roleArn`: string (required) — The Amazon Resource Name (ARN) of the role.

- `value`: string (required) — A brief string that the claim must match.

  For example, "paid" or "yes".
