Class ContainerGroupDefinition
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<ContainerGroupDefinition.Builder,
ContainerGroupDefinition>
This data type is used with the Amazon GameLift containers feature, which is currently in public preview.
The properties that describe a container group resource. Container group definition properties can't be updated. To change a property, create a new container group definition.
Used with: CreateContainerGroupDefinition
Returned by: DescribeContainerGroupDefinition, ListContainerGroupDefinitions
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
final List
<ContainerDefinition> The set of container definitions that are included in the container group.final String
The Amazon Resource Name (ARN) that is assigned to an Amazon GameLiftContainerGroupDefinition
resource.final Instant
A time stamp indicating when this data object was created.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the ContainerDefinitions property.final int
hashCode()
final String
name()
A descriptive identifier for the container group definition.final ContainerOperatingSystem
The platform required for all containers in the container group definition.final String
The platform required for all containers in the container group definition.The method for deploying the container group across fleet instances.final String
The method for deploying the container group across fleet instances.static Class
<? extends ContainerGroupDefinition.Builder> status()
Current status of the container group definition resource.final String
Current status of the container group definition resource.final String
Additional information about a container group definition that's inFAILED
status.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final Integer
The amount of CPU units on a fleet instance to allocate for the container group.final Integer
The amount of memory (in MiB) on a fleet instance to allocate for the container group.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
containerGroupDefinitionArn
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 isarn:aws:gamelift:<region>::containergroupdefinition/[container group definition name]
.- Returns:
- 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 isarn:aws:gamelift:<region>::containergroupdefinition/[container group definition name]
.
-
creationTime
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).- Returns:
- A time stamp indicating when this data object was created. Format is a number expressed in Unix time as
milliseconds (for example
"1469498468.057"
).
-
operatingSystem
The platform required for all containers in the container group definition.
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.
If the service returns an enum value that is not available in the current SDK version,
operatingSystem
will returnContainerOperatingSystem.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromoperatingSystemAsString()
.- Returns:
- The platform required for all containers in the container group definition.
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.
- See Also:
-
operatingSystemAsString
The platform required for all containers in the container group definition.
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.
If the service returns an enum value that is not available in the current SDK version,
operatingSystem
will returnContainerOperatingSystem.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromoperatingSystemAsString()
.- Returns:
- The platform required for all containers in the container group definition.
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.
- See Also:
-
name
A descriptive identifier for the container group definition. The name value is unique in an Amazon Web Services Region.
- Returns:
- A descriptive identifier for the container group definition. The name value is unique in an Amazon Web Services Region.
-
schedulingStrategy
The method for deploying the container group across fleet instances. A replica container group might have multiple copies on each fleet instance. A daemon container group maintains only one copy per fleet instance.
If the service returns an enum value that is not available in the current SDK version,
schedulingStrategy
will returnContainerSchedulingStrategy.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromschedulingStrategyAsString()
.- Returns:
- The method for deploying the container group across fleet instances. A replica container group might have multiple copies on each fleet instance. A daemon container group maintains only one copy per fleet instance.
- See Also:
-
schedulingStrategyAsString
The method for deploying the container group across fleet instances. A replica container group might have multiple copies on each fleet instance. A daemon container group maintains only one copy per fleet instance.
If the service returns an enum value that is not available in the current SDK version,
schedulingStrategy
will returnContainerSchedulingStrategy.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromschedulingStrategyAsString()
.- Returns:
- The method for deploying the container group across fleet instances. A replica container group might have multiple copies on each fleet instance. A daemon container group maintains only one copy per fleet instance.
- See Also:
-
totalMemoryLimit
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 additional limits for each ContainerDefinition in the group. If individual containers have limits, this value must meet the following requirements:
-
Equal to or greater than the sum of all container-specific soft memory limits in the group.
-
Equal to or greater than any container-specific hard limits in the group.
For more details on memory allocation, see the Container fleet design guide.
- Returns:
- 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 additional limits for each ContainerDefinition in the group. If individual containers have limits, this value must meet the following requirements:
-
Equal to or greater than the sum of all container-specific soft memory limits in the group.
-
Equal to or greater than any container-specific hard limits in the group.
For more details on memory allocation, see the Container fleet design guide.
-
-
-
totalCpuLimit
The amount of CPU units on a fleet instance to allocate for the container group. All containers in the group share these resources. This property is an integer value in CPU units (1 vCPU is equal to 1024 CPU units).
You can set additional limits for each ContainerDefinition in the group. If individual containers have limits, this value must be equal to or greater than the sum of all container-specific CPU limits in the group.
For more details on memory allocation, see the Container fleet design guide.
- Returns:
- The amount of CPU units on a fleet instance to allocate for the container group. All containers in the
group share these resources. This property is an integer value in CPU units (1 vCPU is equal to 1024 CPU
units).
You can set additional limits for each ContainerDefinition in the group. If individual containers have limits, this value must be equal to or greater than the sum of all container-specific CPU limits in the group.
For more details on memory allocation, see the Container fleet design guide.
-
hasContainerDefinitions
public final boolean hasContainerDefinitions()For responses, this returns true if the service returned a value for the ContainerDefinitions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
containerDefinitions
The set of container definitions that are included in the container group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasContainerDefinitions()
method.- Returns:
- The set of container definitions that are included in the container group.
-
status
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, seeStatusReason
. A container group definition resource in failed status will be deleted within a few minutes.
If the service returns an enum value that is not available in the current SDK version,
status
will returnContainerGroupDefinitionStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- 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, seeStatusReason
. A container group definition resource in failed status will be deleted within a few minutes.
-
- See Also:
-
-
statusAsString
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, seeStatusReason
. A container group definition resource in failed status will be deleted within a few minutes.
If the service returns an enum value that is not available in the current SDK version,
status
will returnContainerGroupDefinitionStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- 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, seeStatusReason
. A container group definition resource in failed status will be deleted within a few minutes.
-
- See Also:
-
-
statusReason
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.
- Returns:
- 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.
-
-
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<ContainerGroupDefinition.Builder,
ContainerGroupDefinition> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-