/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include The properties that describe a container group resource. You can update all
* properties of a container group definition properties. Updates to a container
* group definition are saved as new versions. Used with:
* CreateContainerGroupDefinition Returned by:
* DescribeContainerGroupDefinition, ListContainerGroupDefinitions,
* UpdateContainerGroupDefinition See Also:
AWS
* API Reference
The Amazon Resource Name (ARN)
* that is assigned to an Amazon GameLift ContainerGroupDefinition
* resource. It uniquely identifies the resource across all Amazon Web Services
* Regions. Format is
* arn:aws:gamelift:[region]::containergroupdefinition/[container group
* definition name]:[version].
A time stamp indicating when this data object was created. Format is a number
* expressed in Unix time as milliseconds (for example
* "1469498468.057").
The platform that all containers in the container group definition run * on.
Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. * See more details in the Amazon Linux 2 FAQs. For * game servers that are hosted on AL2 and use Amazon GameLift server SDK 4.x, * first update the game server build to server SDK 5.x, and then deploy to AL2023 * instances. See * Migrate to Amazon GameLift server SDK version 5.
*/ inline const ContainerOperatingSystem& GetOperatingSystem() const{ return m_operatingSystem; } inline bool OperatingSystemHasBeenSet() const { return m_operatingSystemHasBeenSet; } inline void SetOperatingSystem(const ContainerOperatingSystem& value) { m_operatingSystemHasBeenSet = true; m_operatingSystem = value; } inline void SetOperatingSystem(ContainerOperatingSystem&& value) { m_operatingSystemHasBeenSet = true; m_operatingSystem = std::move(value); } inline ContainerGroupDefinition& WithOperatingSystem(const ContainerOperatingSystem& value) { SetOperatingSystem(value); return *this;} inline ContainerGroupDefinition& WithOperatingSystem(ContainerOperatingSystem&& value) { SetOperatingSystem(std::move(value)); return *this;} ///@} ///@{ /** *A descriptive identifier for the container group definition. The name value * is unique in an Amazon Web Services Region.
*/ inline const Aws::String& GetName() const{ return m_name; } inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } inline ContainerGroupDefinition& WithName(const Aws::String& value) { SetName(value); return *this;} inline ContainerGroupDefinition& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} inline ContainerGroupDefinition& WithName(const char* value) { SetName(value); return *this;} ///@} ///@{ /** *The type of container group. Container group type determines how Amazon * GameLift deploys the container group on each fleet instance.
*/ inline const ContainerGroupType& GetContainerGroupType() const{ return m_containerGroupType; } inline bool ContainerGroupTypeHasBeenSet() const { return m_containerGroupTypeHasBeenSet; } inline void SetContainerGroupType(const ContainerGroupType& value) { m_containerGroupTypeHasBeenSet = true; m_containerGroupType = value; } inline void SetContainerGroupType(ContainerGroupType&& value) { m_containerGroupTypeHasBeenSet = true; m_containerGroupType = std::move(value); } inline ContainerGroupDefinition& WithContainerGroupType(const ContainerGroupType& value) { SetContainerGroupType(value); return *this;} inline ContainerGroupDefinition& WithContainerGroupType(ContainerGroupType&& value) { SetContainerGroupType(std::move(value)); return *this;} ///@} ///@{ /** *The amount of memory (in MiB) on a fleet instance to allocate for the * container group. All containers in the group share these resources.
You * can set a limit for each container definition in the group. If individual * containers have limits, this total value must be greater than any individual * container's memory limit.
*/ inline int GetTotalMemoryLimitMebibytes() const{ return m_totalMemoryLimitMebibytes; } inline bool TotalMemoryLimitMebibytesHasBeenSet() const { return m_totalMemoryLimitMebibytesHasBeenSet; } inline void SetTotalMemoryLimitMebibytes(int value) { m_totalMemoryLimitMebibytesHasBeenSet = true; m_totalMemoryLimitMebibytes = value; } inline ContainerGroupDefinition& WithTotalMemoryLimitMebibytes(int value) { SetTotalMemoryLimitMebibytes(value); return *this;} ///@} ///@{ /** *The amount of vCPU units on a fleet instance to allocate for the container * group (1 vCPU is equal to 1024 CPU units). All containers in the group share * these resources. You can set a limit for each container definition in the group. * If individual containers have limits, this total value must be equal to or * greater than the sum of the limits for each container in the group.
*/ inline double GetTotalVcpuLimit() const{ return m_totalVcpuLimit; } inline bool TotalVcpuLimitHasBeenSet() const { return m_totalVcpuLimitHasBeenSet; } inline void SetTotalVcpuLimit(double value) { m_totalVcpuLimitHasBeenSet = true; m_totalVcpuLimit = value; } inline ContainerGroupDefinition& WithTotalVcpuLimit(double value) { SetTotalVcpuLimit(value); return *this;} ///@} ///@{ /** *The definition for the game server container in this group. This property is
* used only when the container group type is GAME_SERVER. This
* container definition specifies a container image with the game server build.
*
The set of definitions for support containers in this group. A container * group definition might have zero support container definitions. Support * container can be used in any type of container group.
*/ inline const Aws::VectorIndicates the version of a particular container group definition. This number * is incremented automatically when you update a container group definition. You * can view, update, or delete individual versions or the entire container group * definition.
*/ inline int GetVersionNumber() const{ return m_versionNumber; } inline bool VersionNumberHasBeenSet() const { return m_versionNumberHasBeenSet; } inline void SetVersionNumber(int value) { m_versionNumberHasBeenSet = true; m_versionNumber = value; } inline ContainerGroupDefinition& WithVersionNumber(int value) { SetVersionNumber(value); return *this;} ///@} ///@{ /** *An optional description that was provided for a container group definition * update. Each version can have a unique description.
*/ inline const Aws::String& GetVersionDescription() const{ return m_versionDescription; } inline bool VersionDescriptionHasBeenSet() const { return m_versionDescriptionHasBeenSet; } inline void SetVersionDescription(const Aws::String& value) { m_versionDescriptionHasBeenSet = true; m_versionDescription = value; } inline void SetVersionDescription(Aws::String&& value) { m_versionDescriptionHasBeenSet = true; m_versionDescription = std::move(value); } inline void SetVersionDescription(const char* value) { m_versionDescriptionHasBeenSet = true; m_versionDescription.assign(value); } inline ContainerGroupDefinition& WithVersionDescription(const Aws::String& value) { SetVersionDescription(value); return *this;} inline ContainerGroupDefinition& WithVersionDescription(Aws::String&& value) { SetVersionDescription(std::move(value)); return *this;} inline ContainerGroupDefinition& WithVersionDescription(const char* value) { SetVersionDescription(value); return *this;} ///@} ///@{ /** *Current status of the container group definition resource. Values * include:
COPYING -- Amazon GameLift is in the
* process of making copies of all container images that are defined in the group.
* While in this state, the resource can't be used to create a container fleet.
READY -- Amazon GameLift has copied the registry
* images for all containers that are defined in the group. You can use a container
* group definition in this status to create a container fleet.
* FAILED -- Amazon GameLift failed to create a valid container group
* definition resource. For more details on the cause of the failure, see
* StatusReason. A container group definition resource in failed
* status will be deleted within a few minutes.
Additional information about a container group definition that's in
* FAILED status. Possible reasons include:
An * internal issue prevented Amazon GameLift from creating the container group * definition resource. Delete the failed resource and call * CreateContainerGroupDefinitionagain.
An access-denied * message means that you don't have permissions to access the container image on * ECR. See * IAM permission examples for help setting up required IAM permissions for * Amazon GameLift.
The ImageUri value for at least
* one of the containers in the container group definition was invalid or not found
* in the current Amazon Web Services account.
At least one of * the container images referenced in the container group definition exceeds the * allowed size. For size limits, see Amazon * GameLift endpoints and quotas.
At least one of the * container images referenced in the container group definition uses a different * operating system than the one defined for the container group.