Class AssetCode

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appsync.Code
software.amazon.awscdk.services.appsync.AssetCode
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2025-01-07T10:36:02.203Z") @Stability(Stable) public class AssetCode extends Code
Represents a local file with source code used for an AppSync Function or Resolver.

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.appsync.*;
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.kms.*;
 DockerImage dockerImage;
 IGrantable grantable;
 Key key;
 ILocalBundling localBundling;
 AssetCode assetCode = AssetCode.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))
         .sourceKMSKey(key)
         .build();
 
  • Nested Class Summary

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

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

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

    Constructors
    Modifier
    Constructor
    Description
     
     
     
    AssetCode(String path, AssetOptions options)
     
    protected
    AssetCode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    AssetCode(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(software.constructs.Construct scope)
    Bind source code to an AppSync Function or resolver.
    The path to the asset file.

    Methods inherited from class software.amazon.awscdk.services.appsync.Code

    fromAsset, fromAsset, 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

    • AssetCode

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

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

      @Stability(Stable) public AssetCode(@NotNull String path, @Nullable AssetOptions options)
      Parameters:
      path - The path to the asset file. This parameter is required.
      options -
    • AssetCode

      @Stability(Stable) public AssetCode(@NotNull String path)
      Parameters:
      path - The path to the asset file. This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public CodeConfig bind(@NotNull software.constructs.Construct scope)
      Bind source code to an AppSync Function or resolver.

      Specified by:
      bind in class Code
      Parameters:
      scope - This parameter is required.
    • getPath

      @Stability(Stable) @NotNull public String getPath()
      The path to the asset file.