Class: AWSCDK::BedrockAgentCore::APIGatewayToolOverride

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

Overview

Configuration for overriding API Gateway tool metadata.

Tool overrides allow you to customize the tool name or description for specific operations after filtering. Each override must specify an explicit path and a single HTTP method. The override must match an operation that exists in your API and must correspond to one of the operations resolved by your filters.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method:, name:, path:, description: nil) ⇒ APIGatewayToolOverride

Returns a new instance of APIGatewayToolOverride.

Parameters:

  • method (AWSCDK::BedrockAgentCore::APIGatewayHttpMethod)

    The HTTP method for this override Must be a single method (no wildcards).

  • name (String)

    The custom tool name If not provided, the operationId from the OpenAPI definition will be used.

  • path (String)

    The explicit resource path (no wildcards) Must match an operation that exists in your API.

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

    Optional custom description for the tool.



16
17
18
19
20
21
22
23
24
25
# File 'bedrock_agent_core/api_gateway_tool_override.rb', line 16

def initialize(method:, name:, path:, description: nil)
  @method = method
  Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BcGlHYXRld2F5SHR0cE1ldGhvZCJ9")), "method")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

Note:

Default: - No custom description

Optional custom description for the tool.

Returns:

  • (String, nil)


43
44
45
# File 'bedrock_agent_core/api_gateway_tool_override.rb', line 43

def description
  @description
end

#methodAWSCDK::BedrockAgentCore::APIGatewayHttpMethod (readonly)

The HTTP method for this override Must be a single method (no wildcards).



30
31
32
# File 'bedrock_agent_core/api_gateway_tool_override.rb', line 30

def method
  @method
end

#nameString (readonly)

The custom tool name If not provided, the operationId from the OpenAPI definition will be used.

Returns:

  • (String)


34
35
36
# File 'bedrock_agent_core/api_gateway_tool_override.rb', line 34

def name
  @name
end

#pathString (readonly)

The explicit resource path (no wildcards) Must match an operation that exists in your API.

Returns:

  • (String)


38
39
40
# File 'bedrock_agent_core/api_gateway_tool_override.rb', line 38

def path
  @path
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
51
52
# File 'bedrock_agent_core/api_gateway_tool_override.rb', line 45

def self.jsii_properties
  {
    :method => "method",
    :name => "name",
    :path => "path",
    :description => "description",
  }
end

Instance Method Details

#to_jsiiObject



54
55
56
57
58
59
60
61
62
63
# File 'bedrock_agent_core/api_gateway_tool_override.rb', line 54

def to_jsii
  result = {}
  result.merge!({
    "method" => @method,
    "name" => @name,
    "path" => @path,
    "description" => @description,
  })
  result.compact
end