Class Compute

    • Method Detail

      • fleetId

        public final String fleetId()

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

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

        public final String fleetArn()

        The Amazon Resource Name (ARN) of the fleet that the compute belongs to.

        Returns:
        The Amazon Resource Name (ARN) of the fleet that the compute belongs to.
      • computeName

        public final String computeName()

        A descriptive label for the compute resource. For instances in a managed EC2 fleet, the compute name is the same value as the InstanceId ID.

        Returns:
        A descriptive label for the compute resource. For instances in a managed EC2 fleet, the compute name is the same value as the InstanceId ID.
      • computeArn

        public final String computeArn()

        The ARN that is assigned to a compute resource and uniquely identifies it. ARNs are unique across locations. Instances in managed EC2 fleets are not assigned a Compute ARN.

        Returns:
        The ARN that is assigned to a compute resource and uniquely identifies it. ARNs are unique across locations. Instances in managed EC2 fleets are not assigned a Compute ARN.
      • ipAddress

        public final String ipAddress()

        The IP address of a compute resource. Amazon GameLift requires a DNS name or IP address for a compute.

        Returns:
        The IP address of a compute resource. Amazon GameLift requires a DNS name or IP address for a compute.
      • dnsName

        public final String dnsName()

        The DNS name of a compute resource. Amazon GameLift requires a DNS name or IP address for a compute.

        Returns:
        The DNS name of a compute resource. Amazon GameLift requires a DNS name or IP address for a compute.
      • computeStatus

        public final ComputeStatus computeStatus()

        Current status of the compute. A compute must have an ACTIVE status to host game sessions.

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

        Returns:
        Current status of the compute. A compute must have an ACTIVE status to host game sessions.
        See Also:
        ComputeStatus
      • computeStatusAsString

        public final String computeStatusAsString()

        Current status of the compute. A compute must have an ACTIVE status to host game sessions.

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

        Returns:
        Current status of the compute. A compute must have an ACTIVE status to host game sessions.
        See Also:
        ComputeStatus
      • location

        public final String location()

        The name of the custom location you added to the fleet that this compute resource resides in.

        Returns:
        The name of the custom location you added to the fleet that this compute resource resides in.
      • 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").
      • operatingSystemAsString

        public final String operatingSystemAsString()

        The type of operating system on the compute resource.

        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 return OperatingSystem.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from operatingSystemAsString().

        Returns:
        The type of operating system on the compute resource.

        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:
        OperatingSystem
      • type

        public final EC2InstanceType type()

        The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Anywhere fleet, this property is empty.

        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:
        The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Anywhere fleet, this property is empty.
        See Also:
        EC2InstanceType
      • typeAsString

        public final String typeAsString()

        The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Anywhere fleet, this property is empty.

        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:
        The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Anywhere fleet, this property is empty.
        See Also:
        EC2InstanceType
      • gameLiftServiceSdkEndpoint

        public final String gameLiftServiceSdkEndpoint()

        The Amazon GameLift SDK endpoint connection for a registered compute resource in an Anywhere fleet. The game servers on the compute use this endpoint to connect to the Amazon GameLift service.

        Returns:
        The Amazon GameLift SDK endpoint connection for a registered compute resource in an Anywhere fleet. The game servers on the compute use this endpoint to connect to the Amazon GameLift service.
      • gameLiftAgentEndpoint

        public final String gameLiftAgentEndpoint()

        The endpoint of the Amazon GameLift Agent.

        Returns:
        The endpoint of the Amazon GameLift Agent.
      • instanceId

        public final String instanceId()

        The InstanceID of the EC2 instance that is hosting the compute.

        Returns:
        The InstanceID of the EC2 instance that is hosting the compute.
      • hasContainerAttributes

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

        public final List<ContainerAttribute> containerAttributes()

        A set of attributes for each container in the compute.

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

        Returns:
        A set of attributes for each container in the compute.
      • gameServerContainerGroupDefinitionArn

        public final String gameServerContainerGroupDefinitionArn()

        The game server container group definition for the compute.

        Returns:
        The game server container group definition for the compute.
      • serializableBuilderClass

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

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

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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)