Class ContainerGroupDefinition

java.lang.Object
software.amazon.awssdk.services.gamelift.model.ContainerGroupDefinition
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ContainerGroupDefinition.Builder,ContainerGroupDefinition>

@Generated("software.amazon.awssdk:codegen") public final class ContainerGroupDefinition extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ContainerGroupDefinition.Builder,ContainerGroupDefinition>

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:
  • Method Details

    • containerGroupDefinitionArn

      public final String containerGroupDefinitionArn()

      The Amazon Resource Name (ARN) that is assigned to an Amazon GameLift Servers 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].

      Returns:
      The Amazon Resource Name (ARN) that is assigned to an Amazon GameLift Servers 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] .
    • creationTime

      public final Instant 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

      public final ContainerOperatingSystem operatingSystem()

      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 server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.

      If the service returns an enum value that is not available in the current SDK version, operatingSystem will return ContainerOperatingSystem.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from operatingSystemAsString().

      Returns:
      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 server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.

      See Also:
    • operatingSystemAsString

      public final String operatingSystemAsString()

      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 server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.

      If the service returns an enum value that is not available in the current SDK version, operatingSystem will return ContainerOperatingSystem.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from operatingSystemAsString().

      Returns:
      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 server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.

      See Also:
    • name

      public final String 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.
    • containerGroupType

      public final ContainerGroupType containerGroupType()

      The type of container group. Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.

      If the service returns an enum value that is not available in the current SDK version, containerGroupType will return ContainerGroupType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from containerGroupTypeAsString().

      Returns:
      The type of container group. Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.
      See Also:
    • containerGroupTypeAsString

      public final String containerGroupTypeAsString()

      The type of container group. Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.

      If the service returns an enum value that is not available in the current SDK version, containerGroupType will return ContainerGroupType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from containerGroupTypeAsString().

      Returns:
      The type of container group. Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.
      See Also:
    • totalMemoryLimitMebibytes

      public final Integer totalMemoryLimitMebibytes()

      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.

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

    • totalVcpuLimit

      public final Double totalVcpuLimit()

      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.

      Returns:
      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.
    • gameServerContainerDefinition

      public final GameServerContainerDefinition gameServerContainerDefinition()

      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.

      Returns:
      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.
    • hasSupportContainerDefinitions

      public final boolean hasSupportContainerDefinitions()
      For responses, this returns true if the service returned a value for the SupportContainerDefinitions property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() 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.
    • supportContainerDefinitions

      public final List<SupportContainerDefinition> supportContainerDefinitions()

      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.

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

      Returns:
      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.
    • versionNumber

      public final Integer versionNumber()

      Indicates 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.

      Returns:
      Indicates 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.
    • versionDescription

      public final String versionDescription()

      An optional description that was provided for a container group definition update. Each version can have a unique description.

      Returns:
      An optional description that was provided for a container group definition update. Each version can have a unique description.
    • status

      public final ContainerGroupDefinitionStatus status()

      Current status of the container group definition resource. Values include:

      • COPYING -- Amazon GameLift Servers 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 Servers 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 Servers 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.

      If the service returns an enum value that is not available in the current SDK version, status will return ContainerGroupDefinitionStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      Current status of the container group definition resource. Values include:

      • COPYING -- Amazon GameLift Servers 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 Servers 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 Servers 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.

      See Also:
    • statusAsString

      public final String statusAsString()

      Current status of the container group definition resource. Values include:

      • COPYING -- Amazon GameLift Servers 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 Servers 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 Servers 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.

      If the service returns an enum value that is not available in the current SDK version, status will return ContainerGroupDefinitionStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      Current status of the container group definition resource. Values include:

      • COPYING -- Amazon GameLift Servers 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 Servers 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 Servers 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.

      See Also:
    • statusReason

      public final String statusReason()

      Additional information about a container group definition that's in FAILED status. Possible reasons include:

      • An internal issue prevented Amazon GameLift Servers 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 Servers.

      • 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 Servers 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 Servers 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 Servers.

      • 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 Servers 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 interface ToCopyableBuilder<ContainerGroupDefinition.Builder,ContainerGroupDefinition>
      Returns:
      a builder for type T
    • builder

      public static ContainerGroupDefinition.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ContainerGroupDefinition.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      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 an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.