enum CustomClaimOperator
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.CustomClaimOperator |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#CustomClaimOperator |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.CustomClaimOperator |
Python | aws_cdk.aws_bedrock_agentcore_alpha.CustomClaimOperator |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป CustomClaimOperator |
Custom claim match operator.
Shared by Runtime and Gateway custom claim implementations.
Example
declare const userPool: cognito.UserPool;
declare const userPoolClient: cognito.UserPoolClient;
// Optional: Create custom claims (CustomClaimOperator and GatewayCustomClaim from agentcore)
const customClaims = [
agentcore.GatewayCustomClaim.withStringValue('department', 'engineering'),
agentcore.GatewayCustomClaim.withStringArrayValue('roles', ['admin'], agentcore.CustomClaimOperator.CONTAINS),
agentcore.GatewayCustomClaim.withStringArrayValue('permissions', ['read', 'write'], agentcore.CustomClaimOperator.CONTAINS_ANY),
];
const gateway = new agentcore.Gateway(this, "MyGateway", {
gatewayName: "my-gateway",
authorizerConfiguration: agentcore.GatewayAuthorizer.usingCognito({
userPool: userPool,
allowedClients: [userPoolClient],
allowedAudiences: ["audience1"],
allowedScopes: ["read", "write"],
customClaims: customClaims, // Optional custom claims
}),
});
Members
| Name | Description |
|---|---|
| EQUALS | Equals operator - used for STRING type claims. |
| CONTAINS | Contains operator - used for STRING_ARRAY type claims. |
| CONTAINS_ANY | ContainsAny operator - used for STRING_ARRAY type claims. |
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.

.NET
Go
Java
Python
TypeScript (