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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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

source

pub fn container_name(&self) -> Option<&str>

The container definition identifier. Container names are unique within a container group definition.

source

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.

source

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.

source

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

source

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.

source

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

source

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.

source

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().

source

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.

source

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().

source

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.

source

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().

source

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

source

pub fn builder() -> ContainerDefinitionBuilder

Creates a new builder-style object to manufacture ContainerDefinition.

Trait Implementations§

source§

impl Clone for ContainerDefinition

source§

fn clone(&self) -> ContainerDefinition

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ContainerDefinition

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for ContainerDefinition

source§

fn eq(&self, other: &ContainerDefinition) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for ContainerDefinition

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more