Enum RoleMappingMatchType
java.lang.Object
java.lang.Enum<RoleMappingMatchType>
software.amazon.awscdk.services.cognito.identitypool.alpha.RoleMappingMatchType
- All Implemented Interfaces:
Serializable
,Comparable<RoleMappingMatchType>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-09-06T01:36:37.648Z")
@Stability(Experimental)
public enum RoleMappingMatchType
extends Enum<RoleMappingMatchType>
(experimental) Types of matches allowed for Role Mapping.
Example:
import software.amazon.awscdk.services.cognito.identitypool.alpha.IdentityPoolProviderUrl; import software.amazon.awscdk.services.cognito.identitypool.alpha.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();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription(experimental) The Claim from the token must contain the given value in order for a match.(experimental) The Claim from the token must equal the given value in order for a match.(experimental) The Claim from the token must not equal the given value in order for a match.(experimental) The Claim from the token must start with the given value in order for a match. -
Method Summary
Modifier and TypeMethodDescriptionstatic RoleMappingMatchType
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.
-
Enum Constant Details
-
EQUALS
(experimental) The Claim from the token must equal the given value in order for a match. -
CONTAINS
(experimental) The Claim from the token must contain 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. -
NOTEQUAL
(experimental) The Claim from the token must not equal the given value in order for a match.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-