class OpenApiTargetConfiguration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.BedrockAgentCore.OpenApiTargetConfiguration |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrockagentcore#OpenApiTargetConfiguration |
Java | software.amazon.awscdk.services.bedrockagentcore.OpenApiTargetConfiguration |
Python | aws_cdk.aws_bedrockagentcore.OpenApiTargetConfiguration |
TypeScript (source) | aws-cdk-lib » aws_bedrockagentcore » 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 { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
declare const apiSchema: bedrockagentcore.ApiSchema;
const openApiTargetConfiguration = new bedrockagentcore.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
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 (