ApiGatewayToolConfiguration

class aws_cdk.aws_bedrockagentcore.ApiGatewayToolConfiguration(*, tool_filters, tool_overrides=None)

Bases: object

Configuration for API Gateway tools.

The API Gateway tool configuration defines which operations from your REST API are exposed as tools. It requires a list of tool filters to select operations to expose, and optionally accepts tool overrides to customize tool metadata.

Parameters:
  • tool_filters (Sequence[Union[ApiGatewayToolFilter, Dict[str, Any]]]) – List of tool filters to select operations At least one filter is required.

  • tool_overrides (Optional[Sequence[Union[ApiGatewayToolOverride, Dict[str, Any]]]]) – Optional list of tool overrides to customize tool metadata Each override must correspond to an operation selected by the filters. Default: - No tool overrides

ExampleMetadata:

fixture=default infused

Example:

gateway = agentcore.Gateway(self, "MyGateway",
    gateway_name="my-gateway"
)

api = apigateway.RestApi(self, "MyApi",
    rest_api_name="my-api"
)

# Uses IAM authorization for outbound auth by default
api_gateway_target = gateway.add_api_gateway_target("MyApiGatewayTarget",
    rest_api=api,
    api_gateway_tool_configuration=agentcore.ApiGatewayToolConfiguration(
        tool_filters=[agentcore.ApiGatewayToolFilter(
            filter_path="/pets/*",
            methods=[agentcore.ApiGatewayHttpMethod.GET]
        )
        ]
    )
)

Attributes

tool_filters

List of tool filters to select operations At least one filter is required.

tool_overrides

Optional list of tool overrides to customize tool metadata Each override must correspond to an operation selected by the filters.

Default:
  • No tool overrides