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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forGatewayTargetOpenApiPropsstatic final classAn implementation forGatewayTargetOpenApiProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()The OpenAPI schema defining the API.default List<ICredentialProviderConfig> Credential providers for authentication OpenAPI targets support API key and OAuth authentication (not IAM).The gateway this target belongs to.default BooleanWhether to validate the OpenAPI schema (only applies to inline schemas) Note: Validation is only performed for inline schemas during CDK synthesis.Methods inherited from interface software.amazon.awscdk.services.bedrockagentcore.GatewayTargetCommonProps
getDescription, getGatewayTargetNameMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getApiSchema
The OpenAPI schema defining the API. -
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
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
- Returns:
- a
GatewayTargetOpenApiProps.BuilderofGatewayTargetOpenApiProps
-