OpenApiTargetConfiguration

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

Bases: McpTargetConfiguration

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.

ExampleMetadata:

fixture=_generated

Example:

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

# api_schema: bedrockagentcore.ApiSchema

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

  • validate_schema (Optional[bool])

Methods

bind(scope, gateway)

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.

Return type:

TargetConfigurationConfig

Attributes

api_schema

The OpenAPI schema that defines the API.

target_type

The target type.

Static Methods

classmethod create(api_schema, validate_schema=None)

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