Class RoleMappingMatchType
(experimental) Types of matches allowed for Role Mapping.
Inheritance
Namespace: Amazon.CDK.AWS.Cognito.IdentityPool
Assembly: Amazon.CDK.AWS.Cognito.IdentityPool.dll
Syntax (csharp)
public sealed class RoleMappingMatchType : Enum
Syntax (vb)
Public NotInheritable Class RoleMappingMatchType
Inherits
Enum
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Cognito.IdentityPool;
Role adminRole;
Role nonAdminRole;
new IdentityPool(this, "myidentitypool", new IdentityPoolProps {
IdentityPoolName = "myidentitypool",
// Assign specific roles to users based on whether or not the custom admin claim is passed from the identity provider
RoleMappings = new [] { new IdentityPoolRoleMapping {
ProviderUrl = IdentityPoolProviderUrl.AMAZON,
Rules = new [] { new RoleMappingRule {
Claim = "custom:admin",
ClaimValue = "admin",
MappedRole = adminRole
}, new RoleMappingRule {
Claim = "custom:admin",
ClaimValue = "admin",
MatchType = RoleMappingMatchType.NOTEQUAL,
MappedRole = nonAdminRole
} }
} }
});
Synopsis
Fields
CONTAINS | (experimental) The Claim from the token must contain the given value in order for a match. |
EQUALS | (experimental) The Claim from the token must equal the given value in order for a match. |
NOTEQUAL | (experimental) The Claim from the token must not equal the given value in order for a match. |
STARTS_WITH | (experimental) The Claim from the token must start with the given value in order for a match. |
value__ |
Fields
CONTAINS
(experimental) The Claim from the token must contain the given value in order for a match.
public const RoleMappingMatchType CONTAINS
Field Value
Type | Description |
---|---|
RoleMappingMatchType |
Remarks
Stability: Experimental
EQUALS
(experimental) The Claim from the token must equal the given value in order for a match.
public const RoleMappingMatchType EQUALS
Field Value
Type | Description |
---|---|
RoleMappingMatchType |
Remarks
Stability: Experimental
NOTEQUAL
(experimental) The Claim from the token must not equal the given value in order for a match.
public const RoleMappingMatchType NOTEQUAL
Field Value
Type | Description |
---|---|
RoleMappingMatchType |
Remarks
Stability: Experimental
STARTS_WITH
(experimental) The Claim from the token must start with the given value in order for a match.
public const RoleMappingMatchType STARTS_WITH
Field Value
Type | Description |
---|---|
RoleMappingMatchType |
Remarks
Stability: Experimental
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |