ApiGatewayToolConfiguration

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

Bases: object

(experimental) 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]]]) – (experimental) List of tool filters to select operations At least one filter is required.

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

Stability:

experimental

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

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

Stability:

experimental

tool_overrides

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

Default:
  • No tool overrides

Stability:

experimental