Amazon GameLift

2016/11/18 - Amazon GameLift - 1 new 1 updated api methods

Changes  Provide the ability to remote access into GameLift managed servers.

GetInstanceAccess (new) Link ¶

Requests remote access to a fleet instance. Remote access is useful for debugging, gathering benchmarking data, or watching activity in real time.

Access requires credentials that match the operating system of the instance. For a Windows instance, GameLift returns a username and password as strings for use with a Windows Remote Desktop client. For a Linux instance, GameLift returns a username and RSA private key, also as strings, for use with an SSH client. The private key must be saved in the proper format to a .pem file before using. If you're making this request using the AWS CLI, saving the secret can be handled as part of the GetInstanceAccess request (see the example later in this topic). For more information on remote access, see Remotely Accessing an Instance.

To request access to a specific instance, specify the IDs of the instance and the fleet it belongs to. If successful, an InstanceAccess object is returned containing the instance's IP address and a set of credentials.

Request Syntax

client.get_instance_access(
    FleetId='string',
    InstanceId='string'
)
type FleetId

string

param FleetId

[REQUIRED]

Unique identifier for a fleet. Specify the fleet that contain the instance you want access to. The fleet can be in any of the following statuses: ACTIVATING, ACTIVE, or ERROR. Fleets with an ERROR status can be accessed for a few hours before being deleted.

type InstanceId

string

param InstanceId

[REQUIRED]

Unique identifier for an instance. Specify the instance you want to get access to. You can access an instance in any status.

rtype

dict

returns

Response Syntax

{
    'InstanceAccess': {
        'FleetId': 'string',
        'InstanceId': 'string',
        'IpAddress': 'string',
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
        'Credentials': {
            'UserName': 'string',
            'Secret': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • InstanceAccess (dict) --

      Object containing connection information for a fleet instance, including IP address and access credentials.

      • FleetId (string) --

        Unique identifier for the fleet containing the instance being accessed.

      • InstanceId (string) --

        Unique identifier for the instance being accessed.

      • IpAddress (string) --

        IP address assigned to the instance.

      • OperatingSystem (string) --

        Operating system that is running on the instance.

      • Credentials (dict) --

        Credentials required to access the instance.

        • UserName (string) --

          User login string.

        • Secret (string) --

          Secret string. For Windows instances, the secret is a password. For Linux instances, it is a private key.

DescribeFleetEvents (updated) Link ¶
Changes (response)
{'Events': {'EventCode': {'SERVER_PROCESS_CRASHED',
                          'SERVER_PROCESS_FORCE_TERMINATED',
                          'SERVER_PROCESS_INVALID_PATH',
                          'SERVER_PROCESS_PROCESS_EXIT_TIMEOUT',
                          'SERVER_PROCESS_PROCESS_READY_TIMEOUT',
                          'SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT',
                          'SERVER_PROCESS_TERMINATED_UNHEALTHY'}}}

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.

Request Syntax

client.describe_fleet_events(
    FleetId='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    Limit=123,
    NextToken='string'
)
type FleetId

string

param FleetId

[REQUIRED]

Unique identifier for the fleet to get event logs for.

type StartTime

datetime

param 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 EndTime

datetime

param 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 Limit

integer

param Limit

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

type NextToken

string

param NextToken

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

rtype

dict

returns

Response Syntax

{
    'Events': [
        {
            'EventId': 'string',
            'ResourceId': 'string',
            'EventCode': 'GENERIC_EVENT'|'FLEET_CREATED'|'FLEET_DELETED'|'FLEET_SCALING_EVENT'|'FLEET_STATE_DOWNLOADING'|'FLEET_STATE_VALIDATING'|'FLEET_STATE_BUILDING'|'FLEET_STATE_ACTIVATING'|'FLEET_STATE_ACTIVE'|'FLEET_STATE_ERROR'|'FLEET_INITIALIZATION_FAILED'|'FLEET_BINARY_DOWNLOAD_FAILED'|'FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND'|'FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE'|'FLEET_VALIDATION_TIMED_OUT'|'FLEET_ACTIVATION_FAILED'|'FLEET_ACTIVATION_FAILED_NO_INSTANCES'|'FLEET_NEW_GAME_SESSION_PROTECTION_POLICY_UPDATED'|'SERVER_PROCESS_INVALID_PATH'|'SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT'|'SERVER_PROCESS_PROCESS_READY_TIMEOUT'|'SERVER_PROCESS_CRASHED'|'SERVER_PROCESS_TERMINATED_UNHEALTHY'|'SERVER_PROCESS_FORCE_TERMINATED'|'SERVER_PROCESS_PROCESS_EXIT_TIMEOUT',
            'Message': 'string',
            'EventTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Events (list) --

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

      • (dict) --

        Log entry describing an event involving Amazon GameLift resources (such as a fleet). In addition to tracking activity, event codes and messages can provide additional information for troubleshooting and debugging problems.

        • EventId (string) --

          Unique identifier for a fleet event.

        • ResourceId (string) --

          Unique identifier for the resource, such as a fleet ID.

        • EventCode (string) --

          Type of event being logged.

        • Message (string) --

          Additional information related to the event.

        • EventTime (datetime) --

          Time stamp indicating when this event occurred. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").

    • NextToken (string) --

      Token indicating 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.