Interface GatewayTargetOpenApiProps

All Superinterfaces:
GatewayTargetCommonProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
GatewayTargetOpenApiProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.416Z") @Stability(Stable) public interface GatewayTargetOpenApiProps extends software.amazon.jsii.JsiiSerializable, GatewayTargetCommonProps
Properties for creating an OpenAPI-based Gateway Target.

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 // Outbound auth: ApiKeyCredentialProvider + bindForGatewayApiKeyTarget, or ARNs from console/API
 String apiKeyIdentityArn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/apikeycredentialprovider/my-apikey";
 String apiKeySecretArn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:my-apikey-secret-abc123";
 AssetApiSchema opneapiSchema = ApiSchema.fromLocalAsset(path.join(__dirname, "mySchema.yml"));
 opneapiSchema.bind(this);
 // Create a gateway target with OpenAPI Schema
 GatewayTarget target = GatewayTarget.forOpenApi(this, "MyTarget", GatewayTargetOpenApiProps.builder()
         .gatewayTargetName("my-api-target")
         .description("Target for external API integration")
         .gateway(gateway) // Note: you need to pass the gateway reference
         .apiSchema(opneapiSchema)
         .credentialProviderConfigurations(List.of(GatewayCredentialProvider.fromApiKeyIdentityArn(ApiKeyCredentialProviderOptions.builder()
                 .providerArn(apiKeyIdentityArn)
                 .secretArn(apiKeySecretArn)
                 .build())))
         .build());
 
  • Method Details

    • getApiSchema

      @Stability(Stable) @NotNull ApiSchema getApiSchema()
      The OpenAPI schema defining the API.
    • getGateway

      @Stability(Stable) @NotNull IGateway getGateway()
      The gateway this target belongs to.
    • getCredentialProviderConfigurations

      @Stability(Stable) @Nullable default List<ICredentialProviderConfig> getCredentialProviderConfigurations()
      Credential providers for authentication OpenAPI targets support API key and OAuth authentication (not IAM).

      Default: - If not provided, defaults to IAM role which will fail at runtime

    • getValidateOpenApiSchema

      @Stability(Stable) @Nullable default Boolean getValidateOpenApiSchema()
      Whether to validate the OpenAPI schema (only applies to inline schemas) Note: Validation is only performed for inline schemas during CDK synthesis.

      S3 and asset-based schemas cannot be validated at synthesis time.

      Default: true

    • builder

      @Stability(Stable) static GatewayTargetOpenApiProps.Builder builder()
      Returns:
      a GatewayTargetOpenApiProps.Builder of GatewayTargetOpenApiProps