Class Compute
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Compute.Builder,
Compute>
An Amazon GameLift Servers compute resource for hosting your game servers. Computes in an Amazon GameLift Servers fleet differs depending on the fleet's compute type property as follows:
-
For managed EC2 fleets, a compute is an EC2 instance.
-
For Anywhere fleets, a compute is a computing resource that you provide and is registered to the fleet.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Compute.Builder
builder()
final String
The ARN that is assigned to a compute resource and uniquely identifies it.final String
A descriptive label for the compute resource.final ComputeStatus
Current status of the compute.final String
Current status of the compute.final List
<ContainerAttribute> A set of attributes for each container in the compute.final Instant
A time stamp indicating when this data object was created.final String
dnsName()
The DNS name of a compute resource.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final String
fleetArn()
The Amazon Resource Name (ARN) of the fleet that the compute belongs to.final String
fleetId()
A unique identifier for the fleet that the compute belongs to.final String
The endpoint of the Amazon GameLift Servers Agent.final String
The Amazon GameLift Servers SDK endpoint connection for a registered compute resource in an Anywhere fleet.final String
The game server container group definition for the compute.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 ContainerAttributes property.final int
hashCode()
final String
TheInstanceID
of the EC2 instance that is hosting the compute.final String
The IP address of a compute resource.final String
location()
The name of the custom location you added to the fleet that this compute resource resides in.final OperatingSystem
The type of operating system on the compute resource.final String
The type of operating system on the compute resource.static Class
<? extends Compute.Builder> 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 EC2InstanceType
type()
The Amazon EC2 instance type that the fleet uses.final String
The Amazon EC2 instance type that the fleet uses.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
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
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
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
The IP address of a compute resource. Amazon GameLift Servers requires a DNS name or IP address for a compute.
- Returns:
- The IP address of a compute resource. Amazon GameLift Servers requires a DNS name or IP address for a compute.
-
dnsName
The DNS name of a compute resource. Amazon GameLift Servers requires a DNS name or IP address for a compute.
- Returns:
- The DNS name of a compute resource. Amazon GameLift Servers requires a DNS name or IP address for a compute.
-
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 returnComputeStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromcomputeStatusAsString()
.- Returns:
- Current status of the compute. A compute must have an
ACTIVE
status to host game sessions. - See Also:
-
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 returnComputeStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromcomputeStatusAsString()
.- Returns:
- Current status of the compute. A compute must have an
ACTIVE
status to host game sessions. - See Also:
-
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
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 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 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 returnOperatingSystem.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromoperatingSystemAsString()
.- 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 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
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 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 returnOperatingSystem.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromoperatingSystemAsString()
.- 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 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:
-
type
The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Servers Anywhere fleet, this property is empty.
If the service returns an enum value that is not available in the current SDK version,
type
will returnEC2InstanceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Servers Anywhere fleet, this property is empty.
- See Also:
-
typeAsString
The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Servers Anywhere fleet, this property is empty.
If the service returns an enum value that is not available in the current SDK version,
type
will returnEC2InstanceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- The Amazon EC2 instance type that the fleet uses. For registered computes in an Amazon GameLift Servers Anywhere fleet, this property is empty.
- See Also:
-
gameLiftServiceSdkEndpoint
The Amazon GameLift Servers 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 Servers service.
- Returns:
- The Amazon GameLift Servers 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 Servers service.
-
gameLiftAgentEndpoint
The endpoint of the Amazon GameLift Servers Agent.
- Returns:
- The endpoint of the Amazon GameLift Servers Agent.
-
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 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. -
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
The game server container group definition for the compute.
- Returns:
- The game server container group definition for the compute.
-
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<Compute.Builder,
Compute> - 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
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-