Class: AWSCDK::BedrockAgentCore::GatewayProps

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

Overview

Properties for defining a Gateway.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorizer_configuration: nil, description: nil, exception_level: nil, gateway_name: nil, interceptor_configurations: nil, kms_key: nil, protocol_configuration: nil, role: nil, tags: nil) ⇒ GatewayProps

Returns a new instance of GatewayProps.

Parameters:

  • authorizer_configuration (AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig, nil) (defaults to: nil)

    The authorizer configuration for the gateway.

  • description (String, nil) (defaults to: nil)

    Optional description for the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

  • exception_level (AWSCDK::BedrockAgentCore::GatewayExceptionLevel, nil) (defaults to: nil)

    The verbosity of exception messages Use DEBUG mode to see granular exception messages from a Gateway.

  • gateway_name (String, nil) (defaults to: nil)

    The name of the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen) The name must be unique within your account.

  • interceptor_configurations (Array<AWSCDK::BedrockAgentCore::IInterceptor>, nil) (defaults to: nil)

    Interceptor configurations for the gateway.

  • kms_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    The AWS KMS key used to encrypt data associated with the gateway.

  • protocol_configuration (AWSCDK::BedrockAgentCore::IGatewayProtocolConfig, nil) (defaults to: nil)

    The protocol configuration for the gateway.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The IAM role that provides permissions for the gateway to access AWS services.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    Tags for the gateway A list of key:value pairs of tags to apply to this Gateway resource.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'bedrock_agent_core/gateway_props.rb', line 16

def initialize(authorizer_configuration: nil, description: nil, exception_level: nil, gateway_name: nil, interceptor_configurations: nil, kms_key: nil, protocol_configuration: nil, role: nil, tags: nil)
  @authorizer_configuration = authorizer_configuration
  Jsii::Type.check_type(@authorizer_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JR2F0ZXdheUF1dGhvcml6ZXJDb25maWcifQ==")), "authorizerConfiguration") unless @authorizer_configuration.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @exception_level = exception_level
  Jsii::Type.check_type(@exception_level, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5HYXRld2F5RXhjZXB0aW9uTGV2ZWwifQ==")), "exceptionLevel") unless @exception_level.nil?
  @gateway_name = gateway_name
  Jsii::Type.check_type(@gateway_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "gatewayName") unless @gateway_name.nil?
  @interceptor_configurations = interceptor_configurations
  Jsii::Type.check_type(@interceptor_configurations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLklJbnRlcmNlcHRvciJ9LCJraW5kIjoiYXJyYXkifX0=")), "interceptorConfigurations") unless @interceptor_configurations.nil?
  @kms_key = kms_key
  Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "kmsKey") unless @kms_key.nil?
  @protocol_configuration = protocol_configuration
  Jsii::Type.check_type(@protocol_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JR2F0ZXdheVByb3RvY29sQ29uZmlnIn0=")), "protocolConfiguration") unless @protocol_configuration.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#authorizer_configurationAWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig? (readonly)

Note:

Default: - A default authorizer will be created using Cognito

The authorizer configuration for the gateway.



41
42
43
# File 'bedrock_agent_core/gateway_props.rb', line 41

def authorizer_configuration
  @authorizer_configuration
end

#descriptionString? (readonly)

Note:

Default: - No description

Optional description for the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

Returns:

  • (String, nil)


46
47
48
# File 'bedrock_agent_core/gateway_props.rb', line 46

def description
  @description
end

#exception_levelAWSCDK::BedrockAgentCore::GatewayExceptionLevel? (readonly)

Note:

Default: - Exception messages are sanitized for presentation to end users

The verbosity of exception messages Use DEBUG mode to see granular exception messages from a Gateway.



51
52
53
# File 'bedrock_agent_core/gateway_props.rb', line 51

def exception_level
  @exception_level
end

#gateway_nameString? (readonly)

Note:

Default: - auto generate

The name of the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen) The name must be unique within your account.

Returns:

  • (String, nil)


56
57
58
# File 'bedrock_agent_core/gateway_props.rb', line 56

def gateway_name
  @gateway_name
end

#interceptor_configurationsArray<AWSCDK::BedrockAgentCore::IInterceptor>? (readonly)

Note:

Default: - No interceptors

Interceptor configurations for the gateway.

Interceptors allow you to run custom code during each gateway invocation:

  • REQUEST interceptors execute before the gateway calls the target
  • RESPONSE interceptors execute after the target responds

A gateway can have at most one REQUEST interceptor and one RESPONSE interceptor.



69
70
71
# File 'bedrock_agent_core/gateway_props.rb', line 69

def interceptor_configurations
  @interceptor_configurations
end

#kms_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - No encryption

The AWS KMS key used to encrypt data associated with the gateway.

Returns:



74
75
76
# File 'bedrock_agent_core/gateway_props.rb', line 74

def kms_key
  @kms_key
end

#protocol_configurationAWSCDK::BedrockAgentCore::IGatewayProtocolConfig? (readonly)

Note:

Default: - A default protocol configuration will be created using MCP with following params supportedVersions: [MCPProtocolVersion.MCP_2025_03_26], searchType: McpGatewaySearchType.SEMANTIC, instructions: "Default gateway to connect to external MCP tools",

The protocol configuration for the gateway.



79
80
81
# File 'bedrock_agent_core/gateway_props.rb', line 79

def protocol_configuration
  @protocol_configuration
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - A new role will be created

The IAM role that provides permissions for the gateway to access AWS services.

Returns:



84
85
86
# File 'bedrock_agent_core/gateway_props.rb', line 84

def role
  @role
end

#tagsHash{String => String}? (readonly)

Note:

Default: - No tags

Tags for the gateway A list of key:value pairs of tags to apply to this Gateway resource.

Returns:

  • (Hash{String => String}, nil)


89
90
91
# File 'bedrock_agent_core/gateway_props.rb', line 89

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'bedrock_agent_core/gateway_props.rb', line 91

def self.jsii_properties
  {
    :authorizer_configuration => "authorizerConfiguration",
    :description => "description",
    :exception_level => "exceptionLevel",
    :gateway_name => "gatewayName",
    :interceptor_configurations => "interceptorConfigurations",
    :kms_key => "kmsKey",
    :protocol_configuration => "protocolConfiguration",
    :role => "role",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'bedrock_agent_core/gateway_props.rb', line 105

def to_jsii
  result = {}
  result.merge!({
    "authorizerConfiguration" => @authorizer_configuration,
    "description" => @description,
    "exceptionLevel" => @exception_level,
    "gatewayName" => @gateway_name,
    "interceptorConfigurations" => @interceptor_configurations,
    "kmsKey" => @kms_key,
    "protocolConfiguration" => @protocol_configuration,
    "role" => @role,
    "tags" => @tags,
  })
  result.compact
end