ContainerProperties class

Container properties are used in job definitions to describe the container that's launched as part of a job.

Constructors

ContainerProperties({List<String>? command, List<KeyValuePair>? environment, String? executionRoleArn, FargatePlatformConfiguration? fargatePlatformConfiguration, String? image, String? instanceType, String? jobRoleArn, LinuxParameters? linuxParameters, LogConfiguration? logConfiguration, int? memory, List<MountPoint>? mountPoints, NetworkConfiguration? networkConfiguration, bool? privileged, bool? readonlyRootFilesystem, List<ResourceRequirement>? resourceRequirements, List<Secret>? secrets, List<Ulimit>? ulimits, String? user, int? vcpus, List<Volume>? volumes})
ContainerProperties.fromJson(Map<String, dynamic> json)
factory

Properties

command List<String>?
The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd.
final
environment List<KeyValuePair>?
The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run.
final
executionRoleArn String?
The Amazon Resource Name (ARN) of the execution role that AWS Batch can assume. Jobs running on Fargate resources must provide an execution role. For more information, see AWS Batch execution IAM role in the AWS Batch User Guide.
final
fargatePlatformConfiguration FargatePlatformConfiguration?
The platform configuration for jobs running on Fargate resources. Jobs running on EC2 resources must not specify this parameter.
final
hashCode int
The hash code for this object.
no setterinherited
image String?
The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with repository-url/image:tag . Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of docker run.
final
instanceType String?
The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the same instance type.
final
jobRoleArn String?
The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide.
final
linuxParameters LinuxParameters?
Linux-specific modifications that are applied to the container, such as details for device mappings.
final
logConfiguration LogConfiguration?
The log configuration specification for the container.
final
memory int?
This parameter is deprecated and not supported for jobs run on Fargate resources, use ResourceRequirement. For jobs run on EC2 resources can specify the memory requirement using the ResourceRequirement structure. The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. This parameter maps to Memory in the Create a container section of the Docker Remote API and the --memory option to docker run. You must specify at least 4 MiB of memory for a job. This is required but can be specified in several places; it must be specified for each node at least once.
final
mountPoints List<MountPoint>?
The mount points for data volumes in your container. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run.
final
networkConfiguration NetworkConfiguration?
The network configuration for jobs running on Fargate resources. Jobs running on EC2 resources must not specify this parameter.
final
privileged bool?
When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the Docker Remote API and the --privileged option to docker run. The default value is false.
final
readonlyRootFilesystem bool?
When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run.
final
resourceRequirements List<ResourceRequirement>?
The type and amount of resources to assign to a container. The supported resources include GPU, MEMORY, and VCPU.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secrets List<Secret>?
The secrets for the container. For more information, see Specifying sensitive data in the AWS Batch User Guide.
final
ulimits List<Ulimit>?
A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run.
final
user String?
The user name to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run.
final
vcpus int?
This parameter is deprecated and not supported for jobs run on Fargate resources, see resourceRequirement. The number of vCPUs reserved for the container. Jobs running on EC2 resources can specify the vCPU requirement for the job using resourceRequirements but the vCPU requirements can't be specified both here and in the resourceRequirement structure. This parameter maps to CpuShares in the Create a container section of the Docker Remote API and the --cpu-shares option to docker run. Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required but can be specified in several places. It must be specified for each node at least once.
final
volumes List<Volume>?
A list of data volumes used in a job.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited