Interface IJobDefinitionContainer
(experimental) Properties of a job definition container.
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.AWS.Batch.dll
Syntax (csharp)
public interface IJobDefinitionContainer
Syntax (vb)
Public Interface IJobDefinitionContainer
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.SSM;
new JobDefinition(this, "job-def", new JobDefinitionProps {
Container = new JobDefinitionContainer {
Image = EcrImage.FromRegistry("docker/whalesay"),
LogConfiguration = new LogConfiguration {
LogDriver = LogDriver.AWSLOGS,
Options = new Dictionary<string, string> { { "awslogs-region", "us-east-1" } },
SecretOptions = new [] { ExposedSecret.FromParametersStore("xyz", StringParameter.FromStringParameterName(this, "parameter", "xyz")) }
}
}
});
Synopsis
Properties
AssignPublicIp | (experimental) Whether or not to assign a public IP to the job. |
Command | (experimental) The command that is passed to the container. |
Environment | (experimental) The environment variables to pass to the container. |
ExecutionRole | (experimental) The IAM role that AWS Batch can assume. |
GpuCount | (experimental) The number of physical GPUs to reserve for the container. |
Image | (experimental) The image used to start a container. |
InstanceType | (experimental) The instance type to use for a multi-node parallel job. |
JobRole | (experimental) The IAM role that the container can assume for AWS permissions. |
LinuxParams | (experimental) Linux-specific modifications that are applied to the container, such as details for device mappings. |
LogConfiguration | (experimental) The log configuration specification for the container. |
MemoryLimitMiB | (experimental) The hard limit (in MiB) of memory to present to the container. |
MountPoints | (experimental) The mount points for data volumes in your container. |
PlatformVersion | (experimental) Fargate platform version. |
Privileged | (experimental) When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). |
ReadOnly | (experimental) When this parameter is true, the container is given read-only access to its root file system. |
Ulimits | (experimental) A list of ulimits to set in the container. |
User | (experimental) The user name to use inside the container. |
Vcpus | (experimental) The number of vCPUs reserved for the container. |
Volumes | (experimental) A list of data volumes used in a job. |
Properties
AssignPublicIp
(experimental) Whether or not to assign a public IP to the job.
virtual Nullable<bool> AssignPublicIp { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
Stability: Experimental
Command
(experimental) The command that is passed to the container.
virtual string[] Command { get; }
Property Value
System.String[]
Remarks
If you provide a shell command as a single string, you have to quote command-line arguments.
Default: - CMD value built into container image.
Stability: Experimental
Environment
(experimental) The environment variables to pass to the container.
virtual IDictionary<string, string> Environment { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: none
Stability: Experimental
ExecutionRole
(experimental) The IAM role that AWS Batch can assume.
virtual IRole ExecutionRole { get; }
Property Value
Remarks
Required when using Fargate.
Default: - None
Stability: Experimental
GpuCount
(experimental) The number of physical GPUs to reserve for the container.
virtual Nullable<double> GpuCount { get; }
Property Value
System.Nullable<System.Double>
Remarks
The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.
Default: - No GPU reservation.
Stability: Experimental
Image
(experimental) The image used to start a container.
ContainerImage Image { get; }
Property Value
Remarks
Stability: Experimental
InstanceType
(experimental) The instance type to use for a multi-node parallel job.
virtual InstanceType InstanceType { get; }
Property Value
Remarks
Currently all node groups in a multi-node parallel job must use the same instance type. This parameter is not valid for single-node container jobs.
Default: - None
Stability: Experimental
JobRole
(experimental) The IAM role that the container can assume for AWS permissions.
virtual IRole JobRole { get; }
Property Value
Remarks
Default: - An IAM role will created.
Stability: Experimental
LinuxParams
(experimental) Linux-specific modifications that are applied to the container, such as details for device mappings.
virtual LinuxParameters LinuxParams { get; }
Property Value
Remarks
For now, only the devices
property is supported.
Default: - None will be used.
Stability: Experimental
LogConfiguration
(experimental) The log configuration specification for the container.
virtual ILogConfiguration LogConfiguration { get; }
Property Value
Remarks
Default: - containers use the same logging driver that the Docker daemon uses
Stability: Experimental
MemoryLimitMiB
(experimental) The hard limit (in MiB) of memory to present to the container.
virtual Nullable<double> MemoryLimitMiB { get; }
Property Value
System.Nullable<System.Double>
Remarks
If your container attempts to exceed the memory specified here, the container is killed. You must specify at least 4 MiB of memory for EC2 and 512 MiB for Fargate.
Default: - 4 for EC2, 512 for Fargate
Stability: Experimental
MountPoints
(experimental) The mount points for data volumes in your container.
virtual IMountPoint[] MountPoints { get; }
Property Value
Remarks
Default: - No mount points will be used.
Stability: Experimental
PlatformVersion
(experimental) Fargate platform version.
virtual Nullable<FargatePlatformVersion> PlatformVersion { get; }
Property Value
System.Nullable<FargatePlatformVersion>
Remarks
Default: - LATEST platform version will be used
Stability: Experimental
Privileged
(experimental) When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user).
virtual Nullable<bool> Privileged { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Stability: Experimental
ReadOnly
(experimental) When this parameter is true, the container is given read-only access to its root file system.
virtual Nullable<bool> ReadOnly { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Stability: Experimental
Ulimits
(experimental) A list of ulimits to set in the container.
virtual IUlimit[] Ulimits { get; }
Property Value
IUlimit[]
Remarks
Default: - No limits.
Stability: Experimental
User
(experimental) The user name to use inside the container.
virtual string User { get; }
Property Value
System.String
Remarks
Default: - None will be used.
Stability: Experimental
Vcpus
(experimental) The number of vCPUs reserved for the container.
virtual Nullable<double> Vcpus { get; }
Property Value
System.Nullable<System.Double>
Remarks
Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU for EC2 and 0.25 for Fargate.
Default: - 1 for EC2, 0.25 for Fargate
Stability: Experimental
Volumes
(experimental) A list of data volumes used in a job.
virtual IVolume[] Volumes { get; }
Property Value
IVolume[]
Remarks
Default: - No data volumes will be used.
Stability: Experimental