Class OpenApiTargetConfiguration

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.McpTargetConfiguration
software.amazon.awscdk.services.bedrockagentcore.OpenApiTargetConfiguration
All Implemented Interfaces:
ITargetConfiguration, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)", date="2026-05-19T19:44:37.187Z") @Stability(Stable) public class OpenApiTargetConfiguration extends 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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.bedrockagentcore.*;
 ApiSchema apiSchema;
 OpenApiTargetConfiguration openApiTargetConfiguration = new OpenApiTargetConfiguration(apiSchema, false);
 
  • Constructor Details

    • OpenApiTargetConfiguration

      protected OpenApiTargetConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
    • OpenApiTargetConfiguration

      protected OpenApiTargetConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • OpenApiTargetConfiguration

      @Stability(Stable) public OpenApiTargetConfiguration(@NotNull ApiSchema apiSchema, @Nullable Boolean validateSchema)
      Parameters:
      apiSchema - This parameter is required.
      validateSchema -
    • OpenApiTargetConfiguration

      @Stability(Stable) public OpenApiTargetConfiguration(@NotNull ApiSchema apiSchema)
      Parameters:
      apiSchema - This parameter is required.
  • Method Details

    • create

      @Stability(Stable) @NotNull public static OpenApiTargetConfiguration create(@NotNull ApiSchema apiSchema, @Nullable Boolean validateSchema)
      Create an OpenAPI target configuration.

      Parameters:
      apiSchema - The OpenAPI schema. This parameter is required.
      validateSchema - Whether to validate the OpenAPI schema (only applies to inline schemas).
      Returns:
      A new OpenApiTargetConfiguration instance
    • create

      @Stability(Stable) @NotNull public static OpenApiTargetConfiguration create(@NotNull ApiSchema apiSchema)
      Create an OpenAPI target configuration.

      Parameters:
      apiSchema - The OpenAPI schema. This parameter is required.
      Returns:
      A new OpenApiTargetConfiguration instance
    • bind

      @Stability(Stable) @NotNull public TargetConfigurationConfig bind(@NotNull software.constructs.Construct scope, @NotNull IGateway gateway)
      Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API schema.

      Specified by:
      bind in interface ITargetConfiguration
      Specified by:
      bind in class McpTargetConfiguration
      Parameters:
      scope - The construct scope. This parameter is required.
      gateway - The gateway that will use this target. This parameter is required.
    • renderMcpConfiguration

      @Stability(Stable) @NotNull protected Object renderMcpConfiguration()
      Renders the MCP-specific configuration.
      Specified by:
      renderMcpConfiguration in class McpTargetConfiguration
    • getApiSchema

      @Stability(Stable) @NotNull public ApiSchema getApiSchema()
      The OpenAPI schema that defines the API.
    • getTargetType

      @Stability(Stable) @NotNull public McpTargetType getTargetType()
      The target type.
      Specified by:
      getTargetType in interface ITargetConfiguration
      Specified by:
      getTargetType in class McpTargetConfiguration