RegisterCompute - Amazon GameLift

RegisterCompute

Registers your compute resources in a fleet you previously created. After you register a compute to your fleet, you can monitor and manage your compute using GameLift. The operation returns the compute resource containing SDK endpoint you can use to connect your game server to GameLift.

Learn more

Request Syntax

{ "CertificatePath": "string", "ComputeName": "string", "DnsName": "string", "FleetId": "string", "IpAddress": "string", "Location": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

ComputeName

A descriptive label that is associated with the compute resource registered to your fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9\-]+

Required: Yes

FleetId

A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.

Type: String

Pattern: ^fleet-\S+|^arn:.*:fleet\/fleet-\S+

Required: Yes

CertificatePath

The path to the TLS certificate on your compute resource. The path and certificate are not validated by GameLift.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

DnsName

The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[0-9a-zA-Z_\-\.]+

Required: No

IpAddress

The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[0-9A-Fa-f\:\.]+

Required: No

Location

The name of the custom location you added to the fleet you are registering this compute resource to.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9\-]+

Required: No

Response Syntax

{ "Compute": { "ComputeArn": "string", "ComputeName": "string", "ComputeStatus": "string", "CreationTime": number, "DnsName": "string", "FleetArn": "string", "FleetId": "string", "GameLiftServiceSdkEndpoint": "string", "IpAddress": "string", "Location": "string", "OperatingSystem": "string", "Type": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Compute

The details of the compute resource you registered to the specified fleet.

Type: Compute object

Errors

For information about the errors that are common to all actions, see Common Errors.

ConflictException

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

HTTP Status Code: 400

InternalServiceException

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

HTTP Status Code: 500

InvalidRequestException

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

HTTP Status Code: 400

UnauthorizedException

The client failed authentication. Clients should not retry such requests.

HTTP Status Code: 400

Examples

Register your laptop as a testing compute resource

The following example registers a development laptop, with the IP address of 10.1.2.3.4, used for iterative testing to a fleet with the fleet id fleet-1234.

Sample Request

{ "FleetId": "fleet-1234", "ComputeName": "DevLaptop", "IpAddress": "10.1.2.3" }

Sample Response

{ FleetId = fleet-1234, ComputeName = DevLaptop, Status = ACTIVE, IpAddress = 10.1.2.3, GameLiftServiceSdkEndpoint = wss://12345678.execute-api.amazonaws.com/ }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: