class ApiGatewayTargetConfiguration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.ApiGatewayTargetConfiguration |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#ApiGatewayTargetConfiguration |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.ApiGatewayTargetConfiguration |
Python | aws_cdk.aws_bedrock_agentcore_alpha.ApiGatewayTargetConfiguration |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป ApiGatewayTargetConfiguration |
Implements
ITarget
Extends
Mcp
Configuration for API Gateway-based MCP targets.
This configuration connects your gateway to an Amazon API Gateway REST API stage. The gateway translates incoming MCP requests into HTTP requests to your REST API and handles response formatting.
Key considerations:
- API must be in the same account and region as the gateway
- Only REST APIs are supported (no HTTP or WebSocket APIs)
- API must use a public endpoint type
- Methods with both AWS_IAM authorization and API key requirements are not supported
- Proxy resources (e.g.,
/pets/{proxy+}) are not supported
Example
// 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';
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
declare const restApi: apigateway.RestApi;
const apiGatewayTargetConfiguration = new bedrock_agentcore_alpha.ApiGatewayTargetConfiguration({
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',
}],
},
restApi: restApi,
// the properties below are optional
metadataConfiguration: {
allowedQueryParameters: ['allowedQueryParameters'],
allowedRequestHeaders: ['allowedRequestHeaders'],
allowedResponseHeaders: ['allowedResponseHeaders'],
},
stage: 'stage',
});
Initializer
new ApiGatewayTargetConfiguration(props: ApiGatewayTargetConfigurationProps)
Parameters
Properties
| Name | Type | Description |
|---|---|---|
| api | Api | Tool configuration for the API Gateway target. |
| rest | string | The ID of the REST API. |
| stage | string | The stage name of the REST API. |
| target | Mcp | The target type. |
| metadata | Metadata | Metadata configuration for the API Gateway target. |
apiGatewayToolConfiguration
Type:
Api
Tool configuration for the API Gateway target.
restApiId
Type:
string
The ID of the REST API.
stage
Type:
string
The stage name of the REST API.
targetType
Type:
Mcp
The target type.
metadataConfiguration?
Type:
Metadata
(optional)
Metadata configuration for the API Gateway target.
Methods
| Name | Description |
|---|---|
| bind(_scope, gateway) | Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway. |
| protected render | Renders the MCP-specific configuration. |
| static create(props) | Create an API Gateway target configuration. |
bind(_scope, gateway)
public bind(_scope: Construct, gateway: IGateway): TargetConfigurationConfig
Parameters
- _scope
Constructโ The construct scope. - gateway
IGatewayโ The gateway that will use this target.
Returns
Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway.
protected renderMcpConfiguration()
protected renderMcpConfiguration(): any
Returns
any
Renders the MCP-specific configuration.
static create(props)
public static create(props: ApiGatewayTargetConfigurationProps): ApiGatewayTargetConfiguration
Parameters
- props
Apiโ The configuration properties.Gateway Target Configuration Props
Returns
Create an API Gateway target configuration.

.NET
Go
Java
Python
TypeScript (