Skip to content
v2.277.0

Experimental

@aws-cdk/aws-bedrock-agentcore-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ApiGatewayToolConfiguration Struct ​

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.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
const apiGatewayToolConfiguration: bedrock_agentcore_alpha.ApiGatewayToolConfiguration = {
  toolFilters: [{
    filterPath: 'filterPath',
    methods: [bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET],
  }],

  // the properties below are optional
  toolOverrides: [{
    method: bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET,
    name: 'name',
    path: 'path',

    // the properties below are optional
    description: 'description',
  }],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha

api_gateway_tool_configuration = bedrock_agentcore_alpha.ApiGatewayToolConfiguration(
    tool_filters=[bedrock_agentcore_alpha.ApiGatewayToolFilter(
        filter_path="filterPath",
        methods=[bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET]
    )],

    # the properties below are optional
    tool_overrides=[bedrock_agentcore_alpha.ApiGatewayToolOverride(
        method=bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET,
        name="name",
        path="path",

        # the properties below are optional
        description="description"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;

ApiGatewayToolConfiguration apiGatewayToolConfiguration = ApiGatewayToolConfiguration.builder()
        .toolFilters(List.of(ApiGatewayToolFilter.builder()
                .filterPath("filterPath")
                .methods(List.of(ApiGatewayHttpMethod.GET))
                .build()))

        // the properties below are optional
        .toolOverrides(List.of(ApiGatewayToolOverride.builder()
                .method(ApiGatewayHttpMethod.GET)
                .name("name")
                .path("path")

                // the properties below are optional
                .description("description")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;

var apiGatewayToolConfiguration = new ApiGatewayToolConfiguration {
    ToolFilters = new [] { new ApiGatewayToolFilter {
        FilterPath = "filterPath",
        Methods = new [] { ApiGatewayHttpMethod.GET }
    } },

    // the properties below are optional
    ToolOverrides = new [] { new ApiGatewayToolOverride {
        Method = ApiGatewayHttpMethod.GET,
        Name = "name",
        Path = "path",

        // the properties below are optional
        Description = "description"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"

apiGatewayToolConfiguration := &ApiGatewayToolConfiguration{
	ToolFilters: []ApiGatewayToolFilter{
		&ApiGatewayToolFilter{
			FilterPath: jsii.String("filterPath"),
			Methods: []ApiGatewayHttpMethod{
				bedrock_agentcore_alpha.ApiGatewayHttpMethod_GET,
			},
		},
	},

	// the properties below are optional
	ToolOverrides: []ApiGatewayToolOverride{
		&ApiGatewayToolOverride{
			Method: bedrock_agentcore_alpha.ApiGatewayHttpMethod_GET,
			Name: jsii.String("name"),
			Path: jsii.String("path"),

			// the properties below are optional
			Description: jsii.String("description"),
		},
	},
}

Properties ​

toolFiltersApiGatewayToolFilter[]tool_filterstyping.List[ApiGatewayToolFilter]toolFiltersList<ApiGatewayToolFilter>ToolFiltersApiGatewayToolFilter[]ToolFilters*[]ApiGatewayToolFilterrequired#
List of tool filters to select operations At least one filter is required.
toolOverridesoptionalApiGatewayToolOverride[]tool_overridesoptionaltyping.List[ApiGatewayToolOverride]toolOverridesoptionalList<ApiGatewayToolOverride>ToolOverridesoptionalApiGatewayToolOverride[]ToolOverridesoptional*[]ApiGatewayToolOverride#
Optional list of tool overrides to customize tool metadata Each override must correspond to an operation selected by the filters.

Default: No tool overrides