Class AssetApiDefinition

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.ApiDefinition
software.amazon.awscdk.services.apigateway.AssetApiDefinition
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.95.0 (build f1ff514)", date="2024-03-26T18:09:18.754Z") @Stability(Stable) public class AssetApiDefinition extends ApiDefinition
OpenAPI specification from a local file.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.apigateway.*;
 import software.amazon.awscdk.services.iam.*;
 DockerImage dockerImage;
 IGrantable grantable;
 ILocalBundling localBundling;
 AssetApiDefinition assetApiDefinition = AssetApiDefinition.Builder.create("path")
         .assetHash("assetHash")
         .assetHashType(AssetHashType.SOURCE)
         .bundling(BundlingOptions.builder()
                 .image(dockerImage)
                 // the properties below are optional
                 .bundlingFileAccess(BundlingFileAccess.VOLUME_COPY)
                 .command(List.of("command"))
                 .entrypoint(List.of("entrypoint"))
                 .environment(Map.of(
                         "environmentKey", "environment"))
                 .local(localBundling)
                 .network("network")
                 .outputType(BundlingOutput.ARCHIVED)
                 .platform("platform")
                 .securityOpt("securityOpt")
                 .user("user")
                 .volumes(List.of(DockerVolume.builder()
                         .containerPath("containerPath")
                         .hostPath("hostPath")
                         // the properties below are optional
                         .consistency(DockerVolumeConsistency.CONSISTENT)
                         .build()))
                 .volumesFrom(List.of("volumesFrom"))
                 .workingDirectory("workingDirectory")
                 .build())
         .deployTime(false)
         .exclude(List.of("exclude"))
         .followSymlinks(SymlinkFollowMode.NEVER)
         .ignoreMode(IgnoreMode.GLOB)
         .readers(List.of(grantable))
         .build();
 
  • Nested Class Summary

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

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

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

    Constructors
    Modifier
    Constructor
    Description
     
     
     
     
    protected
    AssetApiDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    AssetApiDefinition(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(software.constructs.Construct scope)
    Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
    void
    bindAfterCreate(software.constructs.Construct scope, IRestApi restApi)
    Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.

    Methods inherited from class software.amazon.awscdk.services.apigateway.ApiDefinition

    fromAsset, fromAsset, fromBucket, fromBucket, fromInline

    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

    • AssetApiDefinition

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

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

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

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

    • bind

      @Stability(Stable) @NotNull public ApiDefinitionConfig bind(@NotNull software.constructs.Construct scope)
      Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.

      Specified by:
      bind in class ApiDefinition
      Parameters:
      scope - This parameter is required.
    • bindAfterCreate

      @Stability(Stable) public void bindAfterCreate(@NotNull software.constructs.Construct scope, @NotNull IRestApi restApi)
      Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.

      Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.

      Overrides:
      bindAfterCreate in class ApiDefinition
      Parameters:
      scope - This parameter is required.
      restApi - This parameter is required.