Class DockerImageCode
Code property for the DockerImageFunction construct.
Inheritance
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class DockerImageCode : DeputyBase
Syntax (vb)
Public MustInherit Class DockerImageCode
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
new DockerImageFunction(this, "AssetFunction", new DockerImageFunctionProps {
Code = DockerImageCode.FromImageAsset(Join(__dirname, "docker-handler"))
});
Synopsis
Constructors
DockerImageCode() | |
DockerImageCode(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DockerImageCode(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
FromEcr(IRepository, IEcrImageCodeProps) | Use an existing ECR image as the Lambda code. |
FromImageAsset(String, IAssetImageCodeProps) | Create an ECR image from the specified asset and bind it as the Lambda code. |
Constructors
DockerImageCode()
protected DockerImageCode()
DockerImageCode(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DockerImageCode(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DockerImageCode(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DockerImageCode(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
FromEcr(IRepository, IEcrImageCodeProps)
Use an existing ECR image as the Lambda code.
public static DockerImageCode FromEcr(IRepository repository, IEcrImageCodeProps props = null)
Parameters
- repository IRepository
the ECR repository that the image is in.
- props IEcrImageCodeProps
properties to further configure the selected image.
Returns
FromImageAsset(String, IAssetImageCodeProps)
Create an ECR image from the specified asset and bind it as the Lambda code.
public static DockerImageCode FromImageAsset(string directory, IAssetImageCodeProps props = null)
Parameters
- directory System.String
the directory from which the asset must be created.
- props IAssetImageCodeProps
properties to further configure the selected image.
Returns