class OpenApiTargetConfiguration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.OpenApiTargetConfiguration |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#OpenApiTargetConfiguration |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.OpenApiTargetConfiguration |
Python | aws_cdk.aws_bedrock_agentcore_alpha.OpenApiTargetConfiguration |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป OpenApiTargetConfiguration |
Implements
ITarget
Extends
Mcp
Configuration for OpenAPI-based MCP targets.
This configuration exposes an OpenAPI/REST API as MCP tools, allowing the gateway to transform API operations into tool calls.
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';
declare const apiSchema: bedrock_agentcore_alpha.ApiSchema;
const openApiTargetConfiguration = new bedrock_agentcore_alpha.OpenApiTargetConfiguration(apiSchema, /* all optional props */ false);
Initializer
new OpenApiTargetConfiguration(apiSchema: ApiSchema, validateSchema?: boolean)
Parameters
- apiSchema
ApiSchema - validateSchema
boolean
Properties
| Name | Type | Description |
|---|---|---|
| api | Api | The OpenAPI schema that defines the API. |
| target | Mcp | The target type. |
apiSchema
Type:
Api
The OpenAPI schema that defines the API.
targetType
Type:
Mcp
The target type.
Methods
| Name | Description |
|---|---|
| bind(scope, gateway) | Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API schema. |
| protected render | Renders the MCP-specific configuration. |
| static create(apiSchema, validateSchema?) | Create an OpenAPI 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 schema.
protected renderMcpConfiguration()
protected renderMcpConfiguration(): any
Returns
any
Renders the MCP-specific configuration.
static create(apiSchema, validateSchema?)
public static create(apiSchema: ApiSchema, validateSchema?: boolean): OpenApiTargetConfiguration
Parameters
- apiSchema
Apiโ The OpenAPI schema.Schema - validateSchema
booleanโ Whether to validate the OpenAPI schema (only applies to inline schemas).
Returns
Create an OpenAPI target configuration.

.NET
Go
Java
Python
TypeScript (