Enum CustomClaimOperator
java.lang.Object
java.lang.Enum<CustomClaimOperator>
software.amazon.awscdk.services.bedrockagentcore.CustomClaimOperator
- All Implemented Interfaces:
Serializable,Comparable<CustomClaimOperator>,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-19T19:44:37.068Z")
@Stability(Stable)
public enum CustomClaimOperator
extends Enum<CustomClaimOperator>
Custom claim match operator.
Shared by Runtime and Gateway custom claim implementations.
Example:
UserPool userPool;
UserPoolClient userPoolClient;
// Optional: Create custom claims (CustomClaimOperator and GatewayCustomClaim from agentcore)
GatewayCustomClaim[] customClaims = List.of(GatewayCustomClaim.withStringValue("department", "engineering"), GatewayCustomClaim.withStringArrayValue("roles", List.of("admin"), CustomClaimOperator.CONTAINS), GatewayCustomClaim.withStringArrayValue("permissions", List.of("read", "write"), CustomClaimOperator.CONTAINS_ANY));
Gateway gateway = Gateway.Builder.create(this, "MyGateway")
.gatewayName("my-gateway")
.authorizerConfiguration(GatewayAuthorizer.usingCognito(CognitoAuthorizerProps.builder()
.userPool(userPool)
.allowedClients(List.of(userPoolClient))
.allowedAudiences(List.of("audience1"))
.allowedScopes(List.of("read", "write"))
.customClaims(customClaims)
.build()))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionContains operator - used for STRING_ARRAY type claims.ContainsAny operator - used for STRING_ARRAY type claims.Equals operator - used for STRING type claims. -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomClaimOperatorReturns the enum constant of this type with the specified name.static CustomClaimOperator[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EQUALS
Equals operator - used for STRING type claims. -
CONTAINS
Contains operator - used for STRING_ARRAY type claims.Checks if the claim array contains a specific string value.
-
CONTAINS_ANY
ContainsAny operator - used for STRING_ARRAY type claims.Checks if the claim array contains any of the provided string values.
-
-
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
-