@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:33.827Z") public enum RoleMappingMatchType extends java.lang.Enum<RoleMappingMatchType>
Example:
import software.amazon.awscdk.services.cognito.identitypool.IdentityPoolProviderUrl; import software.amazon.awscdk.services.cognito.identitypool.RoleMappingMatchType; Role adminRole; Role nonAdminRole; IdentityPool.Builder.create(this, "myidentitypool") .identityPoolName("myidentitypool") // Assign specific roles to users based on whether or not the custom admin claim is passed from the identity provider .roleMappings(List.of(IdentityPoolRoleMapping.builder() .providerUrl(IdentityPoolProviderUrl.AMAZON) .rules(List.of(RoleMappingRule.builder() .claim("custom:admin") .claimValue("admin") .mappedRole(adminRole) .build(), RoleMappingRule.builder() .claim("custom:admin") .claimValue("admin") .matchType(RoleMappingMatchType.NOTEQUAL) .mappedRole(nonAdminRole) .build())) .build())) .build();
Enum Constant and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
static RoleMappingMatchType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RoleMappingMatchType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RoleMappingMatchType EQUALS
public static final RoleMappingMatchType CONTAINS
public static final RoleMappingMatchType STARTS_WITH
public static final RoleMappingMatchType NOTEQUAL
public static RoleMappingMatchType[] values()
for (RoleMappingMatchType c : RoleMappingMatchType.values()) System.out.println(c);
public static RoleMappingMatchType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null