# OpenApiTargetConfiguration

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.

Extends: McpTargetConfiguration › OpenApiTargetConfiguration
Implements: ITargetConfiguration

- Source: [`aws-bedrockagentcore/lib/gateway/targets/target-configuration.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/gateway/targets/target-configuration.ts#L170)
- Type last changed: v2.255.0 · 19 May 2026

## Example

```ts
// 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

```ts
new OpenApiTargetConfiguration(apiSchema: ApiSchema, validateSchema?: boolean)
```

## Properties

- `apiSchema`: [ApiSchema](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiSchema.html) (required) — The OpenAPI schema that defines the API.

- `targetType`: [McpTargetType](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.McpTargetType.html) (required) — The target type.

## Methods

- `bind(scope: Construct, gateway: IGateway): TargetConfigurationConfig` — Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API schema.

  **Parameters**

  - `scope` — The construct scope.
  - `gateway` — The gateway that will use this target.

- `create(apiSchema: ApiSchema, validateSchema?: boolean): OpenApiTargetConfiguration // chainable` (static) — Create an OpenAPI target configuration.

  **Parameters**

  - `apiSchema` — The OpenAPI schema.
  - `validateSchema` — Whether to validate the OpenAPI schema (only applies to inline schemas).

  **Returns:** A new OpenApiTargetConfiguration instance
