Struct aws_sdk_gamelift::types::ContainerDefinition
source · #[non_exhaustive]pub struct ContainerDefinition {Show 13 fields
pub container_name: Option<String>,
pub image_uri: Option<String>,
pub resolved_image_digest: Option<String>,
pub memory_limits: Option<ContainerMemoryLimits>,
pub port_configuration: Option<ContainerPortConfiguration>,
pub cpu: Option<i32>,
pub health_check: Option<ContainerHealthCheck>,
pub command: Option<Vec<String>>,
pub essential: Option<bool>,
pub entry_point: Option<Vec<String>>,
pub working_directory: Option<String>,
pub environment: Option<Vec<ContainerEnvironment>>,
pub depends_on: Option<Vec<ContainerDependency>>,
}
Expand description
This data type is used with the Amazon GameLift containers feature, which is currently in public preview.
Describes a container in a container fleet, the resources available to the container, and the commands that are run when the container starts. Container properties can't be updated. To change a property, create a new container group definition. See also ContainerDefinitionInput
.
Part of: ContainerGroupDefinition
Returned by: DescribeContainerGroupDefinition
, ListContainerGroupDefinitions
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.container_name: Option<String>
The container definition identifier. Container names are unique within a container group definition.
image_uri: Option<String>
The URI to the image that $short; copied and deployed to a container fleet. For a more specific identifier, see ResolvedImageDigest
.
resolved_image_digest: Option<String>
A unique and immutable identifier for the container image that is deployed to a container fleet. The digest is a SHA 256 hash of the container image manifest.
memory_limits: Option<ContainerMemoryLimits>
The amount of memory that Amazon GameLift makes available to the container. If memory limits aren't set for an individual container, the container shares the container group's total memory allocation.
Related data type: ContainerGroupDefinition$TotalMemoryLimit
port_configuration: Option<ContainerPortConfiguration>
Defines the ports that are available to assign to processes in the container. For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's ConnectionPortRange
.
cpu: Option<i32>
The number of CPU units that are reserved for the container. Note: 1 vCPU unit equals 1024 CPU units. If no resources are reserved, the container shares the total CPU limit for the container group.
Related data type: ContainerGroupDefinition$TotalCpuLimit
health_check: Option<ContainerHealthCheck>
A configuration for a non-terminal health check. A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn't use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.
command: Option<Vec<String>>
A command that's passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.
essential: Option<bool>
Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.
entry_point: Option<Vec<String>>
The entry point that's passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.
working_directory: Option<String>
The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API Reference.
environment: Option<Vec<ContainerEnvironment>>
A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.
depends_on: Option<Vec<ContainerDependency>>
Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.
Implementations§
source§impl ContainerDefinition
impl ContainerDefinition
sourcepub fn container_name(&self) -> Option<&str>
pub fn container_name(&self) -> Option<&str>
The container definition identifier. Container names are unique within a container group definition.
sourcepub fn image_uri(&self) -> Option<&str>
pub fn image_uri(&self) -> Option<&str>
The URI to the image that $short; copied and deployed to a container fleet. For a more specific identifier, see ResolvedImageDigest
.
sourcepub fn resolved_image_digest(&self) -> Option<&str>
pub fn resolved_image_digest(&self) -> Option<&str>
A unique and immutable identifier for the container image that is deployed to a container fleet. The digest is a SHA 256 hash of the container image manifest.
sourcepub fn memory_limits(&self) -> Option<&ContainerMemoryLimits>
pub fn memory_limits(&self) -> Option<&ContainerMemoryLimits>
The amount of memory that Amazon GameLift makes available to the container. If memory limits aren't set for an individual container, the container shares the container group's total memory allocation.
Related data type: ContainerGroupDefinition$TotalMemoryLimit
sourcepub fn port_configuration(&self) -> Option<&ContainerPortConfiguration>
pub fn port_configuration(&self) -> Option<&ContainerPortConfiguration>
Defines the ports that are available to assign to processes in the container. For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's ConnectionPortRange
.
sourcepub fn cpu(&self) -> Option<i32>
pub fn cpu(&self) -> Option<i32>
The number of CPU units that are reserved for the container. Note: 1 vCPU unit equals 1024 CPU units. If no resources are reserved, the container shares the total CPU limit for the container group.
Related data type: ContainerGroupDefinition$TotalCpuLimit
sourcepub fn health_check(&self) -> Option<&ContainerHealthCheck>
pub fn health_check(&self) -> Option<&ContainerHealthCheck>
A configuration for a non-terminal health check. A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn't use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.
sourcepub fn command(&self) -> &[String]
pub fn command(&self) -> &[String]
A command that's passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .command.is_none()
.
sourcepub fn essential(&self) -> Option<bool>
pub fn essential(&self) -> Option<bool>
Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.
sourcepub fn entry_point(&self) -> &[String]
pub fn entry_point(&self) -> &[String]
The entry point that's passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .entry_point.is_none()
.
sourcepub fn working_directory(&self) -> Option<&str>
pub fn working_directory(&self) -> Option<&str>
The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API Reference.
sourcepub fn environment(&self) -> &[ContainerEnvironment]
pub fn environment(&self) -> &[ContainerEnvironment]
A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .environment.is_none()
.
sourcepub fn depends_on(&self) -> &[ContainerDependency]
pub fn depends_on(&self) -> &[ContainerDependency]
Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .depends_on.is_none()
.
source§impl ContainerDefinition
impl ContainerDefinition
sourcepub fn builder() -> ContainerDefinitionBuilder
pub fn builder() -> ContainerDefinitionBuilder
Creates a new builder-style object to manufacture ContainerDefinition
.
Trait Implementations§
source§impl Clone for ContainerDefinition
impl Clone for ContainerDefinition
source§fn clone(&self) -> ContainerDefinition
fn clone(&self) -> ContainerDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ContainerDefinition
impl Debug for ContainerDefinition
source§impl PartialEq for ContainerDefinition
impl PartialEq for ContainerDefinition
source§fn eq(&self, other: &ContainerDefinition) -> bool
fn eq(&self, other: &ContainerDefinition) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ContainerDefinition
Auto Trait Implementations§
impl Freeze for ContainerDefinition
impl RefUnwindSafe for ContainerDefinition
impl Send for ContainerDefinition
impl Sync for ContainerDefinition
impl Unpin for ContainerDefinition
impl UnwindSafe for ContainerDefinition
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more