Class AssetImage
An image that will be built from a local directory with a Dockerfile.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class AssetImage : ContainerImage
Syntax (vb)
Public Class AssetImage
Inherits ContainerImage
Remarks
ExampleMetadata: nofixture infused
Examples
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.ECS.Patterns;
using Amazon.CDK.CXAPI;
using Path;
var app = new App();
var stack = new Stack(app, "aws-ecs-patterns-queue");
stack.Node.SetContext(ECS_REMOVE_DEFAULT_DESIRED_COUNT, true);
var vpc = new Vpc(stack, "VPC", new VpcProps {
MaxAzs = 2
});
new QueueProcessingFargateService(stack, "QueueProcessingService", new QueueProcessingFargateServiceProps {
Vpc = vpc,
MemoryLimitMiB = 512,
Image = new AssetImage(Join(__dirname, "..", "sqs-reader"))
});
Synopsis
Constructors
AssetImage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
AssetImage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
AssetImage(String, IAssetImageProps) | Constructs a new instance of the AssetImage class. |
Methods
Bind(Construct, ContainerDefinition) | Called when the image is used by a ContainerDefinition. |
Constructors
AssetImage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected AssetImage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
AssetImage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected AssetImage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
AssetImage(String, IAssetImageProps)
Constructs a new instance of the AssetImage class.
public AssetImage(string directory, IAssetImageProps props = null)
Parameters
- directory System.String
The directory containing the Dockerfile.
- props IAssetImageProps
The directory containing the Dockerfile.
Methods
Bind(Construct, ContainerDefinition)
Called when the image is used by a ContainerDefinition.
public override IContainerImageConfig Bind(Construct scope, ContainerDefinition containerDefinition)
Parameters
- scope Construct
- containerDefinition ContainerDefinition
Returns