java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.ApiSchema
software.amazon.awscdk.services.bedrockagentcore.S3ApiSchema
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.503Z") @Stability(Stable) public class S3ApiSchema extends ApiSchema
Class to define an API Schema from an S3 object.

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 // Create an API key credential provider in Token Vault
 ApiKeyCredentialProvider apiKeyProvider = ApiKeyCredentialProvider.Builder.create(this, "MyApiKeyProvider")
         .apiKeyCredentialProviderName("my-apikey")
         .build();
 IBucket bucket = Bucket.fromBucketName(this, "ExistingBucket", "my-schema-bucket");
 S3ApiSchema s3mySchema = ApiSchema.fromS3File(bucket, "schemas/myschema.yaml");
 // Add an OpenAPI target using the L2 construct directly
 GatewayTarget target = gateway.addOpenApiTarget("MyTarget", AddOpenApiTargetOptions.builder()
         .gatewayTargetName("my-api-target")
         .description("Target for external API integration")
         .apiSchema(s3mySchema)
         .credentialProviderConfigurations(List.of(GatewayCredentialProvider.fromApiKeyIdentity(apiKeyProvider, FromApiKeyIdentityOptions.builder()
                 .credentialLocation(ApiKeyCredentialLocation.header(ApiKeyAdditionalConfiguration.builder()
                         .credentialParameterName("X-API-Key")
                         .build()))
                 .build())))
         .build());
 // This makes sure your s3 bucket is available before target
 target.node.addDependency(bucket);
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for S3ApiSchema.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
     
    S3ApiSchema(Location location, String bucketOwnerAccountId)
     
    protected
    S3ApiSchema(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    S3ApiSchema(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bind(software.constructs.Construct scope)
    Bind the schema to a construct.
    The account ID of the S3 bucket owner for cross-account access.
    void
    Grant permissions to the role.

    Methods inherited from class software.amazon.awscdk.services.bedrockagentcore.ApiSchema

    fromInline, fromLocalAsset, fromS3File, fromS3File, getInlineSchema, getS3File

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • S3ApiSchema

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

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

      @Stability(Stable) public S3ApiSchema(@NotNull Location location, @Nullable String bucketOwnerAccountId)
      Parameters:
      location - This parameter is required.
      bucketOwnerAccountId - The account ID of the S3 bucket owner for cross-account access.
    • S3ApiSchema

      @Stability(Stable) public S3ApiSchema(@NotNull Location location)
      Parameters:
      location - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) public void bind(@NotNull software.constructs.Construct scope)
      Bind the schema to a construct.

      Specified by:
      bind in class ApiSchema
      Parameters:
      scope - This parameter is required.
    • grantPermissionsToRole

      @Stability(Stable) public void grantPermissionsToRole(@NotNull IRole role)
      Grant permissions to the role.

      Specified by:
      grantPermissionsToRole in class ApiSchema
      Parameters:
      role - This parameter is required.
    • getBucketOwnerAccountId

      @Stability(Stable) @Nullable public String getBucketOwnerAccountId()
      The account ID of the S3 bucket owner for cross-account access.
      Overrides:
      getBucketOwnerAccountId in class ApiSchema