GatewayCustomClaim
- class aws_cdk.aws_bedrock_agentcore_alpha.GatewayCustomClaim(*args: Any, **kwargs)
Bases:
object(experimental) Represents a custom claim validation configuration for Gateway JWT authorizers.
Custom claims allow you to validate additional fields in JWT tokens beyond the standard audience, client, and scope validations.
- Stability:
experimental
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha gateway_custom_claim = bedrock_agentcore_alpha.GatewayCustomClaim.with_string_array_value("name", ["values"], bedrock_agentcore_alpha.CustomClaimOperator.EQUALS)
Static Methods
- classmethod with_string_array_value(name, values, operator=None)
(experimental) Create a custom claim with a string array value.
String array claims can use CONTAINS (default) or CONTAINS_ANY operator.
- Parameters:
name (
str) – The name of the claim in the JWT token.values (
Sequence[str]) – The array of string values to match. For CONTAINS operator, must contain exactly one value.operator (
Optional[CustomClaimOperator]) – The match operator (defaults to CONTAINS).
- Return type:
- Returns:
A GatewayCustomClaim configured for string array validation
- Stability:
experimental
- classmethod with_string_value(name, value)
(experimental) Create a custom claim with a string value.
String claims must use the EQUALS operator.
- Parameters:
name (
str) – The name of the claim in the JWT token.value (
str) – The string value to match (must exactly equal).
- Return type:
- Returns:
A GatewayCustomClaim configured for string validation
- Stability:
experimental