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

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

Represents a virtual computing instance that runs game server processes and hosts game sessions. In Amazon GameLift, one or more instances make up a managed EC2 fleet.

See Also:
  • Method Details

    • fleetId

      public final String fleetId()

      A unique identifier for the fleet that the instance belongs to.

      Returns:
      A unique identifier for the fleet that the instance belongs to.
    • fleetArn

      public final String fleetArn()

      The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

      Returns:
      The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.
    • instanceId

      public final String instanceId()

      A unique identifier for the instance.

      Returns:
      A unique identifier for the instance.
    • ipAddress

      public final String ipAddress()

      IP address that is assigned to the instance.

      Returns:
      IP address that is assigned to the instance.
    • dnsName

      public final String dnsName()

      The DNS identifier assigned to the instance that is running the game session. Values have the following format:

      When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

      Returns:
      The DNS identifier assigned to the instance that is running the game session. Values have the following format:

      When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

    • operatingSystem

      public final OperatingSystem operatingSystem()

      Operating system that is running on this EC2 instance.

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

      Returns:
      Operating system that is running on this EC2 instance.
      See Also:
    • operatingSystemAsString

      public final String operatingSystemAsString()

      Operating system that is running on this EC2 instance.

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

      Returns:
      Operating system that is running on this EC2 instance.
      See Also:
    • type

      public final EC2InstanceType type()

      EC2 instance type that defines the computing resources of this instance.

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

      Returns:
      EC2 instance type that defines the computing resources of this instance.
      See Also:
    • typeAsString

      public final String typeAsString()

      EC2 instance type that defines the computing resources of this instance.

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

      Returns:
      EC2 instance type that defines the computing resources of this instance.
      See Also:
    • status

      public final InstanceStatus status()

      Current status of the instance. Possible statuses include the following:

      • PENDING -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration.

      • ACTIVE -- The instance has been successfully created and at least one server process has successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions.

      • TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.

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

      Returns:
      Current status of the instance. Possible statuses include the following:

      • PENDING -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration.

      • ACTIVE -- The instance has been successfully created and at least one server process has successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions.

      • TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.

      See Also:
    • statusAsString

      public final String statusAsString()

      Current status of the instance. Possible statuses include the following:

      • PENDING -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration.

      • ACTIVE -- The instance has been successfully created and at least one server process has successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions.

      • TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.

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

      Returns:
      Current status of the instance. Possible statuses include the following:

      • PENDING -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration.

      • ACTIVE -- The instance has been successfully created and at least one server process has successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions.

      • TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.

      See Also:
    • 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").
    • location

      public final String location()

      The fleet location of the instance, expressed as an Amazon Web Services Region code, such as us-west-2.

      Returns:
      The fleet location of the instance, expressed as an Amazon Web Services Region code, such as us-west-2.
    • toBuilder

      public Instance.Builder 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<Instance.Builder,Instance>
      Returns:
      a builder for type T
    • builder

      public static Instance.Builder builder()
    • serializableBuilderClass

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