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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.426Z") @Stability(Experimental) public class AssetCode extends Code
(experimental) Canary code from an Asset.

Example:

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

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

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

    Constructors
    Modifier
    Constructor
    Description
     
    AssetCode(String assetPath)
     
     
    AssetCode(String assetPath, 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, String handler, RuntimeFamily family)
    (experimental) Called when the canary is initialized to allow this object to bind to the stack, add resources and have fun.

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

    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

    • AssetCode

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

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

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

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

    • bind

      @Stability(Experimental) @NotNull public CodeConfig bind(@NotNull software.constructs.Construct scope, @NotNull String handler, @NotNull RuntimeFamily family)
      (experimental) Called when the canary is initialized to allow this object to bind to the stack, add resources and have fun.

      Specified by:
      bind in class Code
      Parameters:
      scope - This parameter is required.
      handler - This parameter is required.
      family - This parameter is required.
      Returns:
      a bound CodeConfig.