Interface IEcsJobDefinitionProps
Props for EcsJobDefinition.
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IEcsJobDefinitionProps : IJobDefinitionProps
Syntax (vb)
Public Interface IEcsJobDefinitionProps Inherits IJobDefinitionProps
Remarks
ExampleMetadata: infused
Examples
IFileSystem myFileSystem;
Role myJobRole;
myFileSystem.GrantRead(myJobRole);
var jobDefn = new EcsJobDefinition(this, "JobDefn", new EcsJobDefinitionProps {
Container = new EcsEc2ContainerDefinition(this, "containerDefn", new EcsEc2ContainerDefinitionProps {
Image = ContainerImage.FromRegistry("public.ecr.aws/amazonlinux/amazonlinux:latest"),
Memory = Size.Mebibytes(2048),
Cpu = 256,
Volumes = new [] { EcsVolume.Efs(new EfsVolumeOptions {
Name = "myVolume",
FileSystem = myFileSystem,
ContainerPath = "/Volumes/myVolume",
UseJobRole = true
}) },
JobRole = myJobRole
})
});
Synopsis
Properties
| Container | The container that this job will run. |
| PropagateTags | Whether to propagate tags from the JobDefinition to the ECS task that Batch spawns. |
Properties
Container
The container that this job will run.
IEcsContainerDefinition Container { get; }
Property Value
Remarks
ExampleMetadata: infused
PropagateTags
Whether to propagate tags from the JobDefinition to the ECS task that Batch spawns.
bool? PropagateTags { get; }
Property Value
bool?
Remarks
Default: false