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.
Namespace: Amazon.ECS.Model
Assembly: AWSSDK.dll
Version: (assembly version)
public class ContainerDefinition : Object
The ContainerDefinition type exposes the following members
Name | Description | |
---|---|---|
ContainerDefinition() |
Name | Type | Description | |
---|---|---|---|
Command | System.Collections.Generic.List<System.String> |
Gets and sets the property Command.
The command that is passed to the container. This parameter maps to |
|
Cpu | System.Int32 |
Gets and sets the property Cpu.
The number of You can determine the number of CPU units that are available per EC2 instance type by multiplying the vCPUs listed for that instance type on the Amazon EC2 Instances detail page by 1,024. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units. The Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker documentation. The minimum valid CPU share value that the Linux kernel allows is 2; however, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
|
|
DisableNetworking | System.Boolean |
Gets and sets the property DisableNetworking.
When this parameter is true, networking is disabled within the container. This parameter
maps to |
|
DnsSearchDomains | System.Collections.Generic.List<System.String> |
Gets and sets the property DnsSearchDomains.
A list of DNS search domains that are presented to the container. This parameter maps
to |
|
DnsServers | System.Collections.Generic.List<System.String> |
Gets and sets the property DnsServers.
A list of DNS servers that are presented to the container. This parameter maps to
|
|
DockerLabels | System.Collections.Generic.Dictionary<System.String, System.String> |
Gets and sets the property DockerLabels.
A key/value map of labels to add to the container. This parameter maps to sudo docker version | grep "Server API version" |
|
DockerSecurityOptions | System.Collections.Generic.List<System.String> |
Gets and sets the property DockerSecurityOptions.
A list of strings to provide custom labels for SELinux and AppArmor multi-level security
systems. This parameter maps to
The Amazon ECS container agent running on a container instance must register with
the |
|
EntryPoint | System.Collections.Generic.List<System.String> |
Gets and sets the property EntryPoint.
Early versions of the Amazon ECS container agent do not properly handle
The entry point that is passed to the container. This parameter maps to |
|
Environment | System.Collections.Generic.List<Amazon.ECS.Model.KeyValuePair> |
Gets and sets the property Environment.
The environment variables to pass to a container. This parameter maps to We do not recommend using plain text environment variables for sensitive information, such as credential data. |
|
Essential | System.Boolean |
Gets and sets the property Essential.
If the All tasks must have at least one essential container. |
|
ExtraHosts | System.Collections.Generic.List<Amazon.ECS.Model.HostEntry> |
Gets and sets the property ExtraHosts.
A list of hostnames and IP address mappings to append to the |
|
Hostname | System.String |
Gets and sets the property Hostname.
The hostname to use for your container. This parameter maps to |
|
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. Images in the Docker Hub registry are available by default. Other repositories
are specified with
|
|
Links | System.Collections.Generic.List<System.String> |
Gets and sets the property Links.
The Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings. |
|
LogConfiguration | Amazon.ECS.Model.LogConfiguration |
Gets and sets the property LogConfiguration.
The log configuration specification for the container. This parameter maps to sudo docker version | grep "Server API version"
The Amazon ECS container agent running on a container instance must register the logging
drivers available on that instance with the |
|
Memory | System.Int32 |
Gets and sets the property Memory.
The number of MiB of memory to reserve for the container. You must specify a non-zero
integer for this parameter; the Docker daemon reserves a minimum of 4 MiB of memory
for a container, so you should not specify fewer than 4 MiB of memory for your containers.
If your container attempts to exceed the memory allocated here, the container is killed.
This parameter maps to |
|
MountPoints | System.Collections.Generic.List<Amazon.ECS.Model.MountPoint> |
Gets and sets the property MountPoints.
The mount points for data volumes in your container. This parameter maps to |
|
Name | System.String |
Gets and sets the property Name.
The name of a container. If you are linking multiple containers together in a task
definition, the |
|
PortMappings | System.Collections.Generic.List<Amazon.ECS.Model.PortMapping> |
Gets and sets the property PortMappings.
The list of port mappings for the container. Port mappings allow containers to access
ports on the host container instance to send or receive traffic. This parameter maps
to
After a task reaches the |
|
Privileged | System.Boolean |
Gets and sets the property Privileged.
When this parameter is true, the container is given elevated privileges on the host
container instance (similar to the |
|
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 |
|
Ulimits | System.Collections.Generic.List<Amazon.ECS.Model.Ulimit> |
Gets and sets the property Ulimits.
A list of sudo docker version | grep "Server API version" |
|
User | System.String |
Gets and sets the property User.
The user name to use inside the container. This parameter maps to |
|
VolumesFrom | System.Collections.Generic.List<Amazon.ECS.Model.VolumeFrom> |
Gets and sets the property VolumesFrom.
Data volumes to mount from another container. This parameter maps to |
|
WorkingDirectory | System.String |
Gets and sets the property WorkingDirectory.
The working directory in which to run commands inside the container. This parameter
maps to |
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8