Class AssetApiSchema

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

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.221Z") @Stability(Stable) public class AssetApiSchema extends ApiSchema
API Schema from a local asset.

The asset is uploaded to an S3 staging bucket, then moved to its final location by CloudFormation during deployment.

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 AssetApiSchema smithySchema = ApiSchema.fromLocalAsset(path.join(__dirname, "models", "smithy-model.json"));
 smithySchema.bind(this);
 // Create a gateway target with Smithy Model and OAuth
 GatewayTarget target = GatewayTarget.forSmithy(this, "MySmithyTarget", GatewayTargetSmithyProps.builder()
         .gatewayTargetName("my-smithy-target")
         .description("Target for Smithy model integration")
         .gateway(gateway)
         .smithyModel(smithySchema)
         .build());
 
  • Constructor Details

    • AssetApiSchema

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

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

      @Stability(Stable) public AssetApiSchema(@NotNull String path, @Nullable AssetOptions options)
      Parameters:
      path - This parameter is required.
      options -
    • AssetApiSchema

      @Stability(Stable) public AssetApiSchema(@NotNull String path)
      Parameters:
      path - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) public void bind(@NotNull software.constructs.Construct scope)
      Binds this API schema to a construct scope.

      This method initializes the S3 asset if it hasn't been initialized yet. Must be called before rendering the schema as CFN properties.

      Specified by:
      bind in class ApiSchema
      Parameters:
      scope -
      • The construct scope to bind to.
      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.