Struct aws_sdk_ecs::types::ContainerOverride
source · #[non_exhaustive]pub struct ContainerOverride {
pub name: Option<String>,
pub command: Option<Vec<String>>,
pub environment: Option<Vec<KeyValuePair>>,
pub environment_files: Option<Vec<EnvironmentFile>>,
pub cpu: Option<i32>,
pub memory: Option<i32>,
pub memory_reservation: Option<i32>,
pub resource_requirements: Option<Vec<ResourceRequirement>>,
}
Expand description
The overrides that are sent to a container. An empty container override can be passed in. An example of an empty container override is {"containerOverrides": [ ] }
. If a non-empty container override is specified, the name
parameter must be included.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: Option<String>
The name of the container that receives the override. This parameter is required if any override is specified.
command: Option<Vec<String>>
The command to send to the container that overrides the default command from the Docker image or the task definition. You must also specify a container name.
environment: Option<Vec<KeyValuePair>>
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. You must also specify a container name.
environment_files: Option<Vec<EnvironmentFile>>
A list of files containing the environment variables to pass to a container, instead of the value from the container definition.
cpu: Option<i32>
The number of cpu
units reserved for the container, instead of the default value from the task definition. You must also specify a container name.
memory: Option<i32>
The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed. You must also specify a container name.
memory_reservation: Option<i32>
The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition. You must also specify a container name.
resource_requirements: Option<Vec<ResourceRequirement>>
The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU.
Implementations§
source§impl ContainerOverride
impl ContainerOverride
sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
The name of the container that receives the override. This parameter is required if any override is specified.
sourcepub fn command(&self) -> Option<&[String]>
pub fn command(&self) -> Option<&[String]>
The command to send to the container that overrides the default command from the Docker image or the task definition. You must also specify a container name.
sourcepub fn environment(&self) -> Option<&[KeyValuePair]>
pub fn environment(&self) -> Option<&[KeyValuePair]>
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. You must also specify a container name.
sourcepub fn environment_files(&self) -> Option<&[EnvironmentFile]>
pub fn environment_files(&self) -> Option<&[EnvironmentFile]>
A list of files containing the environment variables to pass to a container, instead of the value from the container definition.
sourcepub fn cpu(&self) -> Option<i32>
pub fn cpu(&self) -> Option<i32>
The number of cpu
units reserved for the container, instead of the default value from the task definition. You must also specify a container name.
sourcepub fn memory(&self) -> Option<i32>
pub fn memory(&self) -> Option<i32>
The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed. You must also specify a container name.
sourcepub fn memory_reservation(&self) -> Option<i32>
pub fn memory_reservation(&self) -> Option<i32>
The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition. You must also specify a container name.
sourcepub fn resource_requirements(&self) -> Option<&[ResourceRequirement]>
pub fn resource_requirements(&self) -> Option<&[ResourceRequirement]>
The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU.
source§impl ContainerOverride
impl ContainerOverride
sourcepub fn builder() -> ContainerOverrideBuilder
pub fn builder() -> ContainerOverrideBuilder
Creates a new builder-style object to manufacture ContainerOverride
.
Trait Implementations§
source§impl Clone for ContainerOverride
impl Clone for ContainerOverride
source§fn clone(&self) -> ContainerOverride
fn clone(&self) -> ContainerOverride
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ContainerOverride
impl Debug for ContainerOverride
source§impl PartialEq<ContainerOverride> for ContainerOverride
impl PartialEq<ContainerOverride> for ContainerOverride
source§fn eq(&self, other: &ContainerOverride) -> bool
fn eq(&self, other: &ContainerOverride) -> bool
self
and other
values to be equal, and is used
by ==
.