Class: AWSCDK::BedrockAgentCore::APIGatewayToolFilter

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

Overview

Configuration for filtering API Gateway tools.

Tool filters allow you to select REST API operations using path and method combinations. Each filter supports two path matching strategies:

  • Explicit paths: Matches a single specific path, such as /pets/{petId}
  • Wildcard paths: Matches all paths starting with the specified prefix, such as /pets/*

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filter_path:, methods:) ⇒ APIGatewayToolFilter

Returns a new instance of APIGatewayToolFilter.

Parameters:

  • filter_path (String)

    The resource path to filter Can be an explicit path (e.g., /pets/{petId}) or a wildcard path (e.g., /pets/*) Must start with a forward slash.

  • methods (Array<AWSCDK::BedrockAgentCore::APIGatewayHttpMethod>)

    List of HTTP methods to include for this path Each filter specifies both a path and a list of HTTP methods Multiple filters can overlap and duplicates are automatically de-duplicated.



15
16
17
18
19
20
# File 'bedrock_agent_core/api_gateway_tool_filter.rb', line 15

def initialize(filter_path:, methods:)
  @filter_path = filter_path
  Jsii::Type.check_type(@filter_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "filterPath")
  @methods = methods
  Jsii::Type.check_type(@methods, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkFwaUdhdGV3YXlIdHRwTWV0aG9kIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "methods")
end

Instance Attribute Details

#filter_pathString (readonly)

The resource path to filter Can be an explicit path (e.g., /pets/{petId}) or a wildcard path (e.g., /pets/*) Must start with a forward slash.

Returns:

  • (String)


25
26
27
# File 'bedrock_agent_core/api_gateway_tool_filter.rb', line 25

def filter_path
  @filter_path
end

#methodsArray<AWSCDK::BedrockAgentCore::APIGatewayHttpMethod> (readonly)

List of HTTP methods to include for this path Each filter specifies both a path and a list of HTTP methods Multiple filters can overlap and duplicates are automatically de-duplicated.



29
30
31
# File 'bedrock_agent_core/api_gateway_tool_filter.rb', line 29

def methods
  @methods
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'bedrock_agent_core/api_gateway_tool_filter.rb', line 31

def self.jsii_properties
  {
    :filter_path => "filterPath",
    :methods => "methods",
  }
end

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'bedrock_agent_core/api_gateway_tool_filter.rb', line 38

def to_jsii
  result = {}
  result.merge!({
    "filterPath" => @filter_path,
    "methods" => @methods,
  })
  result.compact
end