Class ApiGatewayTargetConfiguration
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.McpTargetConfiguration
software.amazon.awscdk.services.bedrockagentcore.ApiGatewayTargetConfiguration
- All Implemented Interfaces:
ITargetConfiguration,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.129.0 (build eaca441)",
date="2026-05-19T08:18:44.214Z")
@Stability(Stable)
public class ApiGatewayTargetConfiguration
extends McpTargetConfiguration
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 software.amazon.awscdk.services.apigateway.*;
import software.amazon.awscdk.services.bedrockagentcore.*;
ApiGatewayHttpMethod apiGatewayHttpMethod;
RestApi restApi;
ApiGatewayTargetConfiguration apiGatewayTargetConfiguration = ApiGatewayTargetConfiguration.Builder.create()
.apiGatewayToolConfiguration(ApiGatewayToolConfiguration.builder()
.toolFilters(List.of(ApiGatewayToolFilter.builder()
.filterPath("filterPath")
.methods(List.of(apiGatewayHttpMethod))
.build()))
// the properties below are optional
.toolOverrides(List.of(ApiGatewayToolOverride.builder()
.method(apiGatewayHttpMethod)
.name("name")
.path("path")
// the properties below are optional
.description("description")
.build()))
.build())
.restApi(restApi)
// the properties below are optional
.metadataConfiguration(MetadataConfiguration.builder()
.allowedQueryParameters(List.of("allowedQueryParameters"))
.allowedRequestHeaders(List.of("allowedRequestHeaders"))
.allowedResponseHeaders(List.of("allowedResponseHeaders"))
.build())
.stage("stage")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forApiGatewayTargetConfiguration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrockagentcore.ITargetConfiguration
ITargetConfiguration.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApiGatewayTargetConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedApiGatewayTargetConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionBinds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway.Create an API Gateway target configuration.Tool configuration for the API Gateway target.Metadata configuration for the API Gateway target.The ID of the REST API.getStage()The stage name of the REST API.The target type.protected ObjectRenders the MCP-specific configuration.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ApiGatewayTargetConfiguration
protected ApiGatewayTargetConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
ApiGatewayTargetConfiguration
protected ApiGatewayTargetConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ApiGatewayTargetConfiguration
@Stability(Stable) public ApiGatewayTargetConfiguration(@NotNull ApiGatewayTargetConfigurationProps props) - Parameters:
props- This parameter is required.
-
-
Method Details
-
create
@Stability(Stable) @NotNull public static ApiGatewayTargetConfiguration create(@NotNull ApiGatewayTargetConfigurationProps props) Create an API Gateway target configuration.- Parameters:
props- The configuration properties. This parameter is required.- Returns:
- A new ApiGatewayTargetConfiguration instance
-
bind
@Stability(Stable) @NotNull public TargetConfigurationConfig bind(@NotNull software.constructs.Construct _scope, @NotNull IGateway gateway) Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway.- Specified by:
bindin interfaceITargetConfiguration- Specified by:
bindin classMcpTargetConfiguration- Parameters:
_scope- The construct scope. This parameter is required.gateway- The gateway that will use this target. This parameter is required.
-
renderMcpConfiguration
Renders the MCP-specific configuration.- Specified by:
renderMcpConfigurationin classMcpTargetConfiguration
-
getApiGatewayToolConfiguration
Tool configuration for the API Gateway target. -
getRestApiId
The ID of the REST API. -
getStage
The stage name of the REST API. -
getTargetType
The target type.- Specified by:
getTargetTypein interfaceITargetConfiguration- Specified by:
getTargetTypein classMcpTargetConfiguration
-
getMetadataConfiguration
Metadata configuration for the API Gateway target.
-