Struct aws_sdk_ecs::model::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
sourceimpl 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.
sourceimpl ContainerOverride
impl ContainerOverride
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ContainerOverride
Trait Implementations
sourceimpl Clone for ContainerOverride
impl Clone for ContainerOverride
sourcefn clone(&self) -> ContainerOverride
fn clone(&self) -> ContainerOverride
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ContainerOverride
impl Debug for ContainerOverride
sourceimpl PartialEq<ContainerOverride> for ContainerOverride
impl PartialEq<ContainerOverride> for ContainerOverride
sourcefn eq(&self, other: &ContainerOverride) -> bool
fn eq(&self, other: &ContainerOverride) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ContainerOverride) -> bool
fn ne(&self, other: &ContainerOverride) -> bool
This method tests for !=
.
impl StructuralPartialEq for ContainerOverride
Auto Trait Implementations
impl RefUnwindSafe for ContainerOverride
impl Send for ContainerOverride
impl Sync for ContainerOverride
impl Unpin for ContainerOverride
impl UnwindSafe for ContainerOverride
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more