Menu
Amazon GameLift Service
API Reference (API Version 2015-10-01)

DescribeFleetEvents

Retrieves entries from the specified fleet's event log. You can specify a time range to limit the result set. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a collection of event log entries matching the request are returned.

Fleet-related operations include:

Request Syntax

Copy
{ "EndTime": number, "FleetId": "string", "Limit": number, "NextToken": "string", "StartTime": number }

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.

FleetId

Unique identifier for a fleet to get event logs for.

Type: String

Pattern: ^fleet-\S+

Required: Yes

EndTime

Most recent date to retrieve event logs for. If no end time is specified, this call returns entries from the specified start time up to the present. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").

Type: Timestamp

Required: No

Limit

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

Type: Integer

Valid Range: Minimum value of 1.

Required: No

NextToken

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

Type: String

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

Required: No

StartTime

Earliest date to retrieve event logs for. If no start time is specified, this call returns entries starting from when the fleet was created to the specified end time. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").

Type: Timestamp

Required: No

Response Syntax

Copy
{ "Events": [ { "EventCode": "string", "EventId": "string", "EventTime": number, "Message": "string", "PreSignedLogUrl": "string", "ResourceId": "string" } ], "NextToken": "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.

Events

Collection of objects containing event log entries for the specified fleet.

Type: Array of Event objects

NextToken

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

Type: String

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

Errors

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

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

NotFoundException

A service resource associated with the request could not be found. Clients should not retry such requests.

HTTP Status Code: 400

UnauthorizedException

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

HTTP Status Code: 400

Example

Request events for a limited time span

This example returns all events that occurred for the fleet during the specified time span. In this example, the time span is on June 21, 2017, from 15:45:00 to 16:15:00 (local time).

Sample Request

Copy
JSON syntax: {"FleetId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d", "StartTime": 1498085100, "EndTime": 1498086900}

Sample Response

Copy
{"Events": [ {"EventCode": "FLEET_SCALING_EVENT", "EventId": "494e4384-49a3-4185-8cd0-1b78417af576", "EventTime": 1498086288.747, "Message": "Fleet fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d capacity settings have been changed: Desired size = 1, Max size = 1, Min size = 1", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_STATE_ACTIVE", "EventId": "38b74c7f-8675-4491-84ad-6be6554a3b1b", "EventTime": 1498086210.461, "Message": "Fleet fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d changed state to ACTIVE", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_STATE_ACTIVATING", "EventId": "94b66df4-e54a-4a57-9c0d-24fc40d66ad5", "EventTime": 1498085757.955, "Message": "Fleet fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d changed state to ACTIVATING", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_STATE_BUILDING", "EventId": "6b085682-3d3d-4e5b-bbf7-3c152bb21270", "EventTime": 1498085757.653, "Message": "Fleet fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d changed state to BUILDING", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_STATE_VALIDATING", "EventId": "9cfb253a-bee8-415a-bee0-d656b779e139", "EventTime": 1498085690.528, "Message": "Fleet fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d changed state to VALIDATING", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_CREATION_VALIDATING_RUNTIME_CONFIG", "EventId": "b18b74f8-b0e8-45df-a075-f4e3a2d1248c", "EventTime": 1498085654.327, "Message": "Searching for runtime path.", "PreSignedLogUrl": "https://gamelift-event-logs-beta-us-west-2.s3-us-west-2.amazonaws.com/logs/fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d/events/b18b74f8-b0e8-45df-a075-f4e3a2d1248c/FLEET_CREATION_VALIDATING_RUNTIME_CONFIG.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20170621T231808Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=AKIAIOXJWXYRWXMJYQSQ%2F20170621%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_CREATION_RUNNING_INSTALLER", "EventId": "11f4a5df-358c-4af7-b739-be4e886db75c", "EventTime": 1498085646.432, "Message": "Running installer at C:\\Game\\install.bat", "PreSignedLogUrl": "https://gamelift-event-logs-beta-us-west-2.s3-us-west-2.amazonaws.com/logs/fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d/events/11f4a5df-358c-4af7-b739-be4e886db75c/FLEET_CREATION_RUNNING_INSTALLER.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20170621T231808Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=AKIAIOXJWXYRWXMJYQSQ%2F20170621%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_CREATION_EXTRACTING_BUILD", "EventId": "ae5a99c5-f84b-47bd-b855-fb83f03a3bde", "EventTime": 1498085645.302, "Message": "Extracting Build.", "PreSignedLogUrl": "https://gamelift-event-logs-us-west-2.s3-us-west-2.amazonaws.com/logs/fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d/events/ae5a99c5-f84b-47bd-b855-fb83f03a3bde/FLEET_CREATION_EXTRACTING_BUILD.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20170621T231808Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=AKIAIOXJWXYRWXMJYQSQ%2F20170621%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_STATE_DOWNLOADING", "EventId": "99104b66-5562-4da9-b123-2b5b82147f33", "EventTime": 1498085485.954, "Message": "Fleet fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d changed state to DOWNLOADING", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"}, {"EventCode": "FLEET_CREATED", "EventId": "548931b2-cc28-473d-a24c-f78489701928", "EventTime": 1498085475.491, "Message": "Fleet fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d has been created with state NEW.", "ResourceId": "fleet-abcd678e-fab9-0c1d-2345-e6f789abc01d"} ] }

See Also

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