Class: AWSCDK::BedrockAgentCore::GatewayCustomClaim

Inherits:
Jsii::Object
  • Object
show all
Defined in:
bedrock_agent_core/gateway_custom_claim.rb

Overview

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.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ GatewayCustomClaim

Returns a new instance of GatewayCustomClaim.

Raises:

  • (NoMethodError)


11
12
13
# File 'bedrock_agent_core/gateway_custom_claim.rb', line 11

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_bedrockagentcore.GatewayCustomClaim does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.jsii_overridable_methodsObject



15
16
17
18
# File 'bedrock_agent_core/gateway_custom_claim.rb', line 15

def self.jsii_overridable_methods
  {
  }
end

.with_string_array_value(name, values, operator = nil) ⇒ AWSCDK::BedrockAgentCore::GatewayCustomClaim

Create a custom claim with a string array value.

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

Parameters:

  • name (String)

    The name of the claim in the JWT token.

  • values (Array<String>)

    The array of string values to match.

  • operator (AWSCDK::BedrockAgentCore::CustomClaimOperator, nil) (defaults to: nil)

    The match operator (defaults to CONTAINS).

Returns:

  • (AWSCDK::BedrockAgentCore::GatewayCustomClaim)

    A GatewayCustomClaim configured for string array validation



28
29
30
31
32
33
# File 'bedrock_agent_core/gateway_custom_claim.rb', line 28

def self.with_string_array_value(name, values, operator = nil)
  Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  Jsii::Type.check_type(values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "values")
  Jsii::Type.check_type(operator, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5DdXN0b21DbGFpbU9wZXJhdG9yIn0=")), "operator") unless operator.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.GatewayCustomClaim", "withStringArrayValue", [name, values, operator])
end

.with_string_value(name, value) ⇒ AWSCDK::BedrockAgentCore::GatewayCustomClaim

Create a custom claim with a string value.

String claims must use the EQUALS operator.

Parameters:

  • name (String)

    The name of the claim in the JWT token.

  • value (String)

    The string value to match (must exactly equal).

Returns:

  • (AWSCDK::BedrockAgentCore::GatewayCustomClaim)

    A GatewayCustomClaim configured for string validation



42
43
44
45
46
# File 'bedrock_agent_core/gateway_custom_claim.rb', line 42

def self.with_string_value(name, value)
  Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.GatewayCustomClaim", "withStringValue", [name, value])
end