Class GameServerContainerDefinition

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

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

Describes the game server container in an existing game server container group. A game server container identifies a container image with your game server build. A game server container is automatically considered essential; if an essential container fails, the entire container group restarts.

You can update a container definition and deploy the updates to an existing fleet. When creating or updating a game server container group definition, use the property https://docs.aws.amazon.com/gamelift/latest/apireference/API_GameServerContainerDefinitionInput.

Part of: ContainerGroupDefinition

Returned by: DescribeContainerGroupDefinition, ListContainerGroupDefinitions, UpdateContainerGroupDefinition

See Also:
  • Method Details

    • containerName

      public final String containerName()

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

      Returns:
      The container definition identifier. Container names are unique within a container group definition.
    • hasDependsOn

      public final boolean hasDependsOn()
      For responses, this returns true if the service returned a value for the DependsOn 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.
    • dependsOn

      public final List<ContainerDependency> dependsOn()

      Indicates that the container relies on the status of other containers in the same container group during startup and shutdown sequences. A container might have dependencies on multiple containers.

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

      Returns:
      Indicates that the container relies on the status of other containers in the same container group during startup and shutdown sequences. A container might have dependencies on multiple containers.
    • hasMountPoints

      public final boolean hasMountPoints()
      For responses, this returns true if the service returned a value for the MountPoints 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.
    • mountPoints

      public final List<ContainerMountPoint> mountPoints()

      A mount point that binds a path inside the container to a file or directory on the host system and lets it access the file or directory.

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

      Returns:
      A mount point that binds a path inside the container to a file or directory on the host system and lets it access the file or directory.
    • hasEnvironmentOverride

      public final boolean hasEnvironmentOverride()
      For responses, this returns true if the service returned a value for the EnvironmentOverride 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.
    • environmentOverride

      public final List<ContainerEnvironment> environmentOverride()

      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.

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

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

      public final String imageUri()

      The URI to the image that Amazon GameLift Servers uses when deploying this container to a container fleet. For a more specific identifier, see ResolvedImageDigest.

      Returns:
      The URI to the image that Amazon GameLift Servers uses when deploying this container to a container fleet. For a more specific identifier, see ResolvedImageDigest.
    • portConfiguration

      public final ContainerPortConfiguration portConfiguration()

      The set of ports that are available to bind 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 Servers maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's ConnectionPortRange.

      Returns:
      The set of ports that are available to bind 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 Servers maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's ConnectionPortRange.
    • resolvedImageDigest

      public final String resolvedImageDigest()

      A unique and immutable identifier for the container image. The digest is a SHA 256 hash of the container image manifest.

      Returns:
      A unique and immutable identifier for the container image. The digest is a SHA 256 hash of the container image manifest.
    • serverSdkVersion

      public final String serverSdkVersion()

      The Amazon GameLift Servers server SDK version that the game server is integrated with. Only game servers using 5.2.0 or higher are compatible with container fleets.

      Returns:
      The Amazon GameLift Servers server SDK version that the game server is integrated with. Only game servers using 5.2.0 or higher are compatible with container fleets.
    • 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<GameServerContainerDefinition.Builder,GameServerContainerDefinition>
      Returns:
      a builder for type T
    • builder

      public static GameServerContainerDefinition.Builder builder()
    • serializableBuilderClass

      public static Class<? extends GameServerContainerDefinition.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.