EcrImageCodeProps Struct
Properties to initialize a new EcrImageCode.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const ecrImageCodeProps: lambda.EcrImageCodeProps = {
cmd: ['cmd'],
entrypoint: ['entrypoint'],
tag: 'tag',
tagOrDigest: 'tagOrDigest',
workingDirectory: 'workingDirectory',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_
ecr_image_code_props = lambda.EcrImageCodeProps(
cmd=["cmd"],
entrypoint=["entrypoint"],
tag="tag",
tag_or_digest="tagOrDigest",
working_directory="workingDirectory"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;
EcrImageCodeProps ecrImageCodeProps = EcrImageCodeProps.builder()
.cmd(List.of("cmd"))
.entrypoint(List.of("entrypoint"))
.tag("tag")
.tagOrDigest("tagOrDigest")
.workingDirectory("workingDirectory")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;
var ecrImageCodeProps = new EcrImageCodeProps {
Cmd = new [] { "cmd" },
Entrypoint = new [] { "entrypoint" },
Tag = "tag",
TagOrDigest = "tagOrDigest",
WorkingDirectory = "workingDirectory"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
ecrImageCodeProps := &EcrImageCodeProps{
Cmd: []*string{
jsii.String("cmd"),
},
Entrypoint: []*string{
jsii.String("entrypoint"),
},
Tag: jsii.String("tag"),
TagOrDigest: jsii.String("tagOrDigest"),
WorkingDirectory: jsii.String("workingDirectory"),
}
Properties
cmdoptionalstring[]cmdoptionaltyping.List[str]cmdoptionalList<String>Cmdoptionalstring[]Cmdoptional*[]*string#Specify or override the CMD on the specified Docker image or Dockerfile.
Default: use the CMD specified in the docker image or Dockerfile.
This needs to be in the 'exec form', viz., [ 'executable', 'param1', 'param2' ].
entrypointoptionalstring[]entrypointoptionaltyping.List[str]entrypointoptionalList<String>Entrypointoptionalstring[]Entrypointoptional*[]*string#Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
Default: use the ENTRYPOINT in the 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' ].
tagoptionalstringtagoptionalstrtagoptionalStringTagoptionalstringTagoptional*string= 'latest'deprecated#use `tagOrDigest`
tagOrDigestoptionalstringtag_or_digestoptionalstrtagOrDigestoptionalStringTagOrDigestoptionalstringTagOrDigestoptional*string= 'latest'#The image tag or digest to use when pulling the image from ECR (digests must start with `sha256:`).
workingDirectoryoptionalstringworking_directoryoptionalstrworkingDirectoryoptionalStringWorkingDirectoryoptionalstringWorkingDirectoryoptional*string#Specify or override the WORKDIR on the specified Docker image or Dockerfile.
Default: use the WORKDIR in the docker image or Dockerfile.
A WORKDIR allows you to configure the working directory the container will use.