OpenApiTargetConfiguration

class aws_cdk.aws_bedrock_agentcore_alpha.OpenApiTargetConfiguration(api_schema, validate_schema=None)

Bases: McpTargetConfiguration

(experimental) 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.

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha

# api_schema: bedrock_agentcore_alpha.ApiSchema

open_api_target_configuration = bedrock_agentcore_alpha.OpenApiTargetConfiguration(api_schema, False)
Parameters:
  • api_schema (ApiSchema)

  • validate_schema (Optional[bool])

Stability:

experimental

Methods

bind(scope, gateway)

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

Parameters:
  • scope (Construct) – The construct scope.

  • gateway (IGateway) – The gateway that will use this target.

Stability:

experimental

Return type:

TargetConfigurationConfig

Attributes

api_schema

(experimental) The OpenAPI schema that defines the API.

Stability:

experimental

target_type

(experimental) The target type.

Stability:

experimental

Static Methods

classmethod create(api_schema, validate_schema=None)

(experimental) Create an OpenAPI target configuration.

Parameters:
  • api_schema (ApiSchema) – The OpenAPI schema.

  • validate_schema (Optional[bool]) – Whether to validate the OpenAPI schema (only applies to inline schemas).

Return type:

OpenApiTargetConfiguration

Returns:

A new OpenApiTargetConfiguration instance

Stability:

experimental