Skip to content
v2.274.0

Experimental

@aws-cdk/aws-bedrock-agentcore-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

GatewayCustomClaim Class ​

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.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
const gatewayCustomClaim = bedrock_agentcore_alpha.GatewayCustomClaim.withStringArrayValue('name', ['values'], /* all optional props */ bedrock_agentcore_alpha.CustomClaimOperator.EQUALS);

Methods ​

withStringArrayValue(name: string, values: string[], operator?: CustomClaimOperator): GatewayCustomClaim // chainable@staticmethod def with_string_array_value(name: str, values: typing.List[str], operator: typing.Optional[CustomClaimOperator] = None) -> GatewayCustomClaimpublic static GatewayCustomClaim withStringArrayValue(String name, List<String> values, CustomClaimOperator operator)public static GatewayCustomClaim WithStringArrayValue(string name, string[] values, CustomClaimOperator? operator = null)func WithStringArrayValue(Name *string, Values *[]*string, Operator CustomClaimOperator) GatewayCustomClaimstatic#
Create a custom claim with a string array value.

String array claims can use CONTAINS (default) or CONTAINS_ANY operator.

3 parameters · returns

Parameters

  • namenamenamenameName — The name of the claim in the JWT token.
  • valuesvaluesvaluesvaluesValues — The array of string values to match.
  • operatoroperatoroperatoroperatorOperator — The match operator (defaults to CONTAINS).

Returns: A GatewayCustomClaim configured for string array validation

withStringValue(name: string, value: string): GatewayCustomClaim // chainable@staticmethod def with_string_value(name: str, value: str) -> GatewayCustomClaimpublic static GatewayCustomClaim withStringValue(String name, String value)public static GatewayCustomClaim WithStringValue(string name, string value)func WithStringValue(Name *string, Value *string) GatewayCustomClaimstatic#
Create a custom claim with a string value.

String claims must use the EQUALS operator.

2 parameters · returns

Parameters

  • namenamenamenameName — The name of the claim in the JWT token.
  • valuevaluevaluevalueValue — The string value to match (must exactly equal).

Returns: A GatewayCustomClaim configured for string validation