Show / Hide Table of Contents

Class ApiGatewayTargetConfiguration

(experimental) Configuration for API Gateway-based MCP targets.

Inheritance
object
McpTargetConfiguration
ApiGatewayTargetConfiguration
Implements
ITargetConfiguration
Namespace: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.dll
Syntax (csharp)
public class ApiGatewayTargetConfiguration : McpTargetConfiguration, ITargetConfiguration
Syntax (vb)
Public Class ApiGatewayTargetConfiguration Inherits McpTargetConfiguration Implements ITargetConfiguration
Remarks

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:

    Stability: Experimental

    ExampleMetadata: fixture=_generated

    Examples
    // 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;
                 using Amazon.CDK.AWS.APIGateway;
    
                 RestApi restApi;
    
                 var apiGatewayTargetConfiguration = new ApiGatewayTargetConfiguration(new ApiGatewayTargetConfigurationProps {
                     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"
                         } }
                     },
                     RestApi = restApi,
    
                     // the properties below are optional
                     MetadataConfiguration = new MetadataConfiguration {
                         AllowedQueryParameters = new [] { "allowedQueryParameters" },
                         AllowedRequestHeaders = new [] { "allowedRequestHeaders" },
                         AllowedResponseHeaders = new [] { "allowedResponseHeaders" }
                     },
                     Stage = "stage"
                 });

    Synopsis

    Constructors

    ApiGatewayTargetConfiguration(IApiGatewayTargetConfigurationProps)

    (experimental) Configuration for API Gateway-based MCP targets.

    Properties

    ApiGatewayToolConfiguration

    (experimental) Tool configuration for the API Gateway target.

    MetadataConfiguration

    (experimental) Metadata configuration for the API Gateway target.

    RestApiId

    (experimental) The ID of the REST API.

    Stage

    (experimental) The stage name of the REST API.

    TargetType

    (experimental) The target type.

    Methods

    Bind(Construct, IGateway)

    (experimental) Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway.

    Create(IApiGatewayTargetConfigurationProps)

    (experimental) Create an API Gateway target configuration.

    RenderMcpConfiguration()

    (experimental) Renders the MCP-specific configuration.

    Constructors

    ApiGatewayTargetConfiguration(IApiGatewayTargetConfigurationProps)

    (experimental) Configuration for API Gateway-based MCP targets.

    public ApiGatewayTargetConfiguration(IApiGatewayTargetConfigurationProps props)
    Parameters
    props IApiGatewayTargetConfigurationProps
    Remarks

    Stability: Experimental

    Properties

    ApiGatewayToolConfiguration

    (experimental) Tool configuration for the API Gateway target.

    public virtual IApiGatewayToolConfiguration ApiGatewayToolConfiguration { get; }
    Property Value

    IApiGatewayToolConfiguration

    Remarks

    Stability: Experimental

    MetadataConfiguration

    (experimental) Metadata configuration for the API Gateway target.

    public virtual IMetadataConfiguration? MetadataConfiguration { get; }
    Property Value

    IMetadataConfiguration

    Remarks

    Stability: Experimental

    RestApiId

    (experimental) The ID of the REST API.

    public virtual string RestApiId { get; }
    Property Value

    string

    Remarks

    Stability: Experimental

    Stage

    (experimental) The stage name of the REST API.

    public virtual string Stage { get; }
    Property Value

    string

    Remarks

    Stability: Experimental

    TargetType

    (experimental) The target type.

    public override McpTargetType TargetType { get; }
    Property Value

    McpTargetType

    Overrides
    McpTargetConfiguration.TargetType
    Remarks

    Stability: Experimental

    Methods

    Bind(Construct, IGateway)

    (experimental) Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway.

    public override ITargetConfigurationConfig Bind(Construct scope, IGateway gateway)
    Parameters
    scope Construct

    The construct scope.

    gateway IGateway

    The gateway that will use this target.

    Returns

    ITargetConfigurationConfig

    Overrides
    McpTargetConfiguration.Bind(Construct, IGateway)
    Remarks

    Stability: Experimental

    Create(IApiGatewayTargetConfigurationProps)

    (experimental) Create an API Gateway target configuration.

    public static ApiGatewayTargetConfiguration Create(IApiGatewayTargetConfigurationProps props)
    Parameters
    props IApiGatewayTargetConfigurationProps

    The configuration properties.

    Returns

    ApiGatewayTargetConfiguration

    A new ApiGatewayTargetConfiguration instance

    Remarks

    Stability: Experimental

    RenderMcpConfiguration()

    (experimental) Renders the MCP-specific configuration.

    protected override object RenderMcpConfiguration()
    Returns

    object

    Overrides
    McpTargetConfiguration.RenderMcpConfiguration()
    Remarks

    Stability: Experimental

    Implements

    ITargetConfiguration
    Back to top Generated by DocFX