Class EcrImageCode.Builder

java.lang.Object
software.amazon.awscdk.services.lambda.EcrImageCode.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<EcrImageCode>
Enclosing class:
EcrImageCode

@Stability(Stable) public static final class EcrImageCode.Builder extends Object implements software.amazon.jsii.Builder<EcrImageCode>
A fluent builder for EcrImageCode.
  • Method Details

    • create

      @Stability(Stable) public static EcrImageCode.Builder create(IRepository repository)
      Parameters:
      repository - This parameter is required.
      Returns:
      a new instance of EcrImageCode.Builder.
    • cmd

      @Stability(Stable) public EcrImageCode.Builder cmd(List<String> cmd)
      Specify or override the CMD on the specified Docker image or Dockerfile.

      This needs to be in the 'exec form', viz., [ 'executable', 'param1', 'param2' ].

      Default: - use the CMD specified in the docker image or Dockerfile.

      Parameters:
      cmd - Specify or override the CMD on the specified Docker image or Dockerfile. This parameter is required.
      Returns:
      this
      See Also:
    • entrypoint

      @Stability(Stable) public EcrImageCode.Builder entrypoint(List<String> entrypoint)
      Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.

      An ENTRYPOINT allows you to configure a container that will run as an executable. This needs to be in the 'exec form', viz., [ 'executable', 'param1', 'param2' ].

      Default: - use the ENTRYPOINT in the docker image or Dockerfile.

      Parameters:
      entrypoint - Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile. This parameter is required.
      Returns:
      this
      See Also:
    • tag

      @Stability(Deprecated) @Deprecated public EcrImageCode.Builder tag(String tag)
      Deprecated.
      use tagOrDigest
      (deprecated) The image tag to use when pulling the image from ECR.

      Default: 'latest'

      Parameters:
      tag - The image tag to use when pulling the image from ECR. This parameter is required.
      Returns:
      this
    • tagOrDigest

      @Stability(Stable) public EcrImageCode.Builder tagOrDigest(String tagOrDigest)
      The image tag or digest to use when pulling the image from ECR (digests must start with sha256:).

      Default: 'latest'

      Parameters:
      tagOrDigest - The image tag or digest to use when pulling the image from ECR (digests must start with sha256:). This parameter is required.
      Returns:
      this
    • workingDirectory

      @Stability(Stable) public EcrImageCode.Builder workingDirectory(String workingDirectory)
      Specify or override the WORKDIR on the specified Docker image or Dockerfile.

      A WORKDIR allows you to configure the working directory the container will use.

      Default: - use the WORKDIR in the docker image or Dockerfile.

      Parameters:
      workingDirectory - Specify or override the WORKDIR on the specified Docker image or Dockerfile. This parameter is required.
      Returns:
      this
      See Also:
    • build

      @Stability(Stable) public EcrImageCode build()
      Specified by:
      build in interface software.amazon.jsii.Builder<EcrImageCode>
      Returns:
      a newly built instance of EcrImageCode.