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();
 
  • Enum Constant Details

    • EQUALS

      @Stability(Stable) public static final CustomClaimOperator EQUALS
      Equals operator - used for STRING type claims.
    • CONTAINS

      @Stability(Stable) public static final CustomClaimOperator CONTAINS
      Contains operator - used for STRING_ARRAY type claims.

      Checks if the claim array contains a specific string value.

    • CONTAINS_ANY

      @Stability(Stable) public static final CustomClaimOperator 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

      public static CustomClaimOperator[] 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

      public static CustomClaimOperator valueOf(String name)
      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 name
      NullPointerException - if the argument is null