AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container properties are used for Amazon ECS-based job definitions. These properties to describe the container that's launched as part of a job.
Namespace: Amazon.Batch.Model
Assembly: AWSSDK.Batch.dll
Version: 3.x.y.z
public class TaskContainerProperties
The TaskContainerProperties type exposes the following members
Name | Description | |
---|---|---|
TaskContainerProperties() |
Name | Type | Description | |
---|---|---|---|
Command | System.Collections.Generic.List<System.String> |
Gets and sets the property Command.
The command that's passed to the container. This parameter maps to |
|
DependsOn | System.Collections.Generic.List<Amazon.Batch.Model.TaskContainerDependency> |
Gets and sets the property DependsOn. A list of containers that this container depends on. |
|
Environment | System.Collections.Generic.List<Amazon.Batch.Model.KeyValuePair> |
Gets and sets the property Environment.
The environment variables to pass to a container. This parameter maps to Env inthe
Create a container
section of the Docker Remote API
and the We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables cannot start with |
|
Essential | System.Boolean |
Gets and sets the property Essential.
If the essential parameter of a container is marked as All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide. |
|
Image | System.String |
Gets and sets the property Image.
The image used to start a container. This string is passed directly to the Docker
daemon. By default, images in the Docker Hub registry are available. Other repositories
are specified with either |
|
LinuxParameters | Amazon.Batch.Model.LinuxParameters |
Gets and sets the property LinuxParameters. Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities. |
|
LogConfiguration | Amazon.Batch.Model.LogConfiguration |
Gets and sets the property LogConfiguration. The log configuration specification for the container.
This parameter maps to By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker
daemon (shown in the
This parameter requires version 1.18 of the Docker Remote API or greater on your container
instance. To check the Docker Remote API version on your container instance, log in
to your container instance and run the following command: sudo docker version
The Amazon ECS container agent running on a container instance must register the logging
drivers available on that instance with the |
|
MountPoints | System.Collections.Generic.List<Amazon.Batch.Model.MountPoint> |
Gets and sets the property MountPoints. The mount points for data volumes in your container.
This parameter maps to
Windows containers can mount whole directories on the same drive as |
|
Name | System.String |
Gets and sets the property Name.
The name of a container. The name can be used as a unique identifier to target your
|
|
Privileged | System.Boolean |
Gets and sets the property Privileged.
When this parameter is This parameter is not supported for Windows containers or tasks run on Fargate. |
|
ReadonlyRootFilesystem | System.Boolean |
Gets and sets the property ReadonlyRootFilesystem.
When this parameter is true, the container is given read-only access to its root file
system. This parameter maps to This parameter is not supported for Windows containers. |
|
RepositoryCredentials | Amazon.Batch.Model.RepositoryCredentials |
Gets and sets the property RepositoryCredentials. The private repository authentication credentials to use. |
|
ResourceRequirements | System.Collections.Generic.List<Amazon.Batch.Model.ResourceRequirement> |
Gets and sets the property ResourceRequirements. The type and amount of a resource to assign to a container. The only supported resource is a GPU. |
|
Secrets | System.Collections.Generic.List<Amazon.Batch.Model.Secret> |
Gets and sets the property Secrets. The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. |
|
Ulimits | System.Collections.Generic.List<Amazon.Batch.Model.Ulimit> |
Gets and sets the property Ulimits.
A list of
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the
operating system with the exception of the nofile resource limit parameter which Fargate
overrides. The
This parameter requires version 1.18 of the Docker Remote API or greater on your container
instance. To check the Docker Remote API version on your container instance, log in
to your container instance and run the following command: sudo docker version This parameter is not supported for Windows containers. |
|
User | System.String |
Gets and sets the property User. The user 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.
When running tasks using the
You can specify the
This parameter is not supported for Windows containers. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5