Class DockerImageCode

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.DockerImageCode
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:04.018Z") @Stability(Stable) public abstract class DockerImageCode extends software.amazon.jsii.JsiiObject
Code property for the DockerImageFunction construct.

Example:

 DockerImageFunction.Builder.create(this, "AssetFunction")
         .code(DockerImageCode.fromImageAsset(join(__dirname, "docker-handler")))
         .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
    protected
     
    protected
    DockerImageCode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    DockerImageCode(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromEcr(IRepository repository)
    Use an existing ECR image as the Lambda code.
    Use an existing ECR image as the Lambda code.
    Create an ECR image from the specified asset and bind it as the Lambda code.
    Create an ECR image from the specified asset and bind it as the Lambda code.

    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

    • DockerImageCode

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

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

      @Stability(Stable) protected DockerImageCode()
  • Method Details

    • fromEcr

      @Stability(Stable) @NotNull public static DockerImageCode fromEcr(@NotNull IRepository repository, @Nullable EcrImageCodeProps props)
      Use an existing ECR image as the Lambda code.

      Parameters:
      repository - the ECR repository that the image is in. This parameter is required.
      props - properties to further configure the selected image.
    • fromEcr

      @Stability(Stable) @NotNull public static DockerImageCode fromEcr(@NotNull IRepository repository)
      Use an existing ECR image as the Lambda code.

      Parameters:
      repository - the ECR repository that the image is in. This parameter is required.
    • fromImageAsset

      @Stability(Stable) @NotNull public static DockerImageCode fromImageAsset(@NotNull String directory, @Nullable AssetImageCodeProps props)
      Create an ECR image from the specified asset and bind it as the Lambda code.

      Parameters:
      directory - the directory from which the asset must be created. This parameter is required.
      props - properties to further configure the selected image.
    • fromImageAsset

      @Stability(Stable) @NotNull public static DockerImageCode fromImageAsset(@NotNull String directory)
      Create an ECR image from the specified asset and bind it as the Lambda code.

      Parameters:
      directory - the directory from which the asset must be created. This parameter is required.