2017/09/01 - Amazon GameLift - 6 new 7 updated api methods
Changes GameLift VPC resources can be peered with any other AWS VPC. R4 memory-optimized instances now available to deploy.
Retrieves valid VPC peering authorizations that are pending for the AWS account. This operation returns all VPC peering authorizations and requests for peering. This includes those initiated and received by this account.
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
See also: AWS API Documentation
Request Syntax
client.describe_vpc_peering_authorizations()
dict
Response Syntax
{ 'VpcPeeringAuthorizations': [ { 'GameLiftAwsAccountId': 'string', 'PeerVpcAwsAccountId': 'string', 'PeerVpcId': 'string', 'CreationTime': datetime(2015, 1, 1), 'ExpirationTime': datetime(2015, 1, 1) }, ] }
Response Structure
(dict) --
VpcPeeringAuthorizations (list) --
Collection of objects that describe all valid VPC peering operations for the current AWS account.
(dict) --
Represents an authorization for a VPC peering connection between the VPC for an Amazon GameLift fleet and another VPC on an account you have access to. This authorization must exist and be valid for the peering connection to be established. Authorizations are valid for 24 hours after they are issued.
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
GameLiftAwsAccountId (string) --
Unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.
PeerVpcAwsAccountId (string) --
PeerVpcId (string) --
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
CreationTime (datetime) --
Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
ExpirationTime (datetime) --
Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
Requests authorization to create or delete a peer connection between the VPC for your Amazon GameLift fleet and a virtual private cloud (VPC) in your AWS account. VPC peering enables the game servers on your fleet to communicate directly with other AWS resources. Once you've received authorization, call CreateVpcPeeringConnection to establish the peering connection. For more information, see VPC Peering with Amazon GameLift Fleets .
You can peer with VPCs that are owned by any AWS account you have access to, including the account that you use to manage your Amazon GameLift fleets. You cannot peer with VPCs that are in different regions.
To request authorization to create a connection, call this operation from the AWS account with the VPC that you want to peer to your Amazon GameLift fleet. For example, to enable your game servers to retrieve data from a DynamoDB table, use the account that manages that DynamoDB resource. Identify the following values: (1) The ID of the VPC that you want to peer with, and (2) the ID of the AWS account that you use to manage Amazon GameLift. If successful, VPC peering is authorized for the specified VPC.
To request authorization to delete a connection, call this operation from the AWS account with the VPC that is peered with your Amazon GameLift fleet. Identify the following values: (1) VPC ID that you want to delete the peering connection for, and (2) ID of the AWS account that you use to manage Amazon GameLift.
The authorization remains valid for 24 hours unless it is canceled by a call to DeleteVpcPeeringAuthorization . You must create or delete the peering connection while the authorization is valid.
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
See also: AWS API Documentation
Request Syntax
client.create_vpc_peering_authorization( GameLiftAwsAccountId='string', PeerVpcId='string' )
string
[REQUIRED]
Unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.
string
[REQUIRED]
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
dict
Response Syntax
{ 'VpcPeeringAuthorization': { 'GameLiftAwsAccountId': 'string', 'PeerVpcAwsAccountId': 'string', 'PeerVpcId': 'string', 'CreationTime': datetime(2015, 1, 1), 'ExpirationTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
VpcPeeringAuthorization (dict) --
Details on the requested VPC peering authorization, including expiration.
GameLiftAwsAccountId (string) --
Unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.
PeerVpcAwsAccountId (string) --
PeerVpcId (string) --
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
CreationTime (datetime) --
Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
ExpirationTime (datetime) --
Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
Cancels a pending VPC peering authorization for the specified VPC. If the authorization has already been used to create a peering connection, call DeleteVpcPeeringConnection to remove the connection.
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
See also: AWS API Documentation
Request Syntax
client.delete_vpc_peering_authorization( GameLiftAwsAccountId='string', PeerVpcId='string' )
string
[REQUIRED]
Unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.
string
[REQUIRED]
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
dict
Response Syntax
{}
Response Structure
(dict) --
Removes a VPC peering connection. To delete the connection, you must have a valid authorization for the VPC peering connection that you want to delete. You can check for an authorization by calling DescribeVpcPeeringAuthorizations or request a new one using CreateVpcPeeringAuthorization .
Once a valid authorization exists, call this operation from the AWS account that is used to manage the Amazon GameLift fleets. Identify the connection to delete by the connection ID and fleet ID. If successful, the connection is removed.
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
See also: AWS API Documentation
Request Syntax
client.delete_vpc_peering_connection( FleetId='string', VpcPeeringConnectionId='string' )
string
[REQUIRED]
Unique identifier for a fleet. This value must match the fleet ID referenced in the VPC peering connection record.
string
[REQUIRED]
Unique identifier for a VPC peering connection. This value is included in the VpcPeeringConnection object, which can be retrieved by calling DescribeVpcPeeringConnections .
dict
Response Syntax
{}
Response Structure
(dict) --
Establishes a VPC peering connection between a virtual private cloud (VPC) in an AWS account with the VPC for your Amazon GameLift fleet. VPC peering enables the game servers on your fleet to communicate directly with other AWS resources. You can peer with VPCs in any AWS account that you have access to, including the account that you use to manage your Amazon GameLift fleets. You cannot peer with VPCs that are in different regions. For more information, see VPC Peering with Amazon GameLift Fleets .
Before calling this operation to establish the peering connection, you first need to call CreateVpcPeeringAuthorization and identify the VPC you want to peer with. Once the authorization for the specified VPC is issued, you have 24 hours to establish the connection. These two operations handle all tasks necessary to peer the two VPCs, including acceptance, updating routing tables, etc.
To establish the connection, call this operation from the AWS account that is used to manage the Amazon GameLift fleets. Identify the following values: (1) The ID of the fleet you want to be enable a VPC peering connection for; (2) The AWS account with the VPC that you want to peer with; and (3) The ID of the VPC you want to peer with. This operation is asynchronous. If successful, a VpcPeeringConnection request is created. You can use continuous polling to track the request's status using DescribeVpcPeeringConnections , or by monitoring fleet events for success or failure using DescribeFleetEvents .
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
See also: AWS API Documentation
Request Syntax
client.create_vpc_peering_connection( FleetId='string', PeerVpcAwsAccountId='string', PeerVpcId='string' )
string
[REQUIRED]
Unique identifier for a fleet. This tells Amazon GameLift which GameLift VPC to peer with.
string
[REQUIRED]
Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.
string
[REQUIRED]
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
dict
Response Syntax
{}
Response Structure
(dict) --
Retrieves information on VPC peering connections. Use this operation to get peering information for all fleets or for one specific fleet ID.
To retrieve connection information, call this operation from the AWS account that is used to manage the Amazon GameLift fleets. Specify a fleet ID or leave the parameter empty to retrieve all connection records. If successful, the retrieved information includes both active and pending connections. Active connections identify the IpV4 CIDR block that the VPC uses to connect.
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
See also: AWS API Documentation
Request Syntax
client.describe_vpc_peering_connections( FleetId='string' )
string
Unique identifier for a fleet.
dict
Response Syntax
{ 'VpcPeeringConnections': [ { 'FleetId': 'string', 'IpV4CidrBlock': 'string', 'VpcPeeringConnectionId': 'string', 'Status': { 'Code': 'string', 'Message': 'string' }, 'PeerVpcId': 'string', 'GameLiftVpcId': 'string' }, ] }
Response Structure
(dict) --
Represents the returned data in response to a request action.
VpcPeeringConnections (list) --
Collection of VPC peering connection records that match the request.
(dict) --
Represents a peering connection between a VPC on one of your AWS accounts and the VPC for your Amazon GameLift fleets. This record may be for an active peering connection or a pending connection that has not yet been established.
VPC peering connection operations include:
CreateVpcPeeringAuthorization
DescribeVpcPeeringAuthorizations
DeleteVpcPeeringAuthorization
CreateVpcPeeringConnection
DescribeVpcPeeringConnections
DeleteVpcPeeringConnection
FleetId (string) --
Unique identifier for a fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
IpV4CidrBlock (string) --
CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC also has an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection cannot be created.
VpcPeeringConnectionId (string) --
Unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC peering connection events, and is used when deleting a connection with DeleteVpcPeeringConnection .
Status (dict) --
Object that contains status information about the connection. Status indicates if a connection is pending, successful, or failed.
Code (string) --
Code indicating the status of a VPC peering connection.
Message (string) --
Additional messaging associated with the connection status.
PeerVpcId (string) --
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
GameLiftVpcId (string) --
Unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is managed by Amazon GameLift and does not appear in your AWS account.
{'EC2InstanceType': ['r4.large', 'r4.xlarge', 'r4.16xlarge', 'r4.2xlarge', 'r4.4xlarge', 'r4.8xlarge'], 'PeerVpcAwsAccountId': 'string', 'PeerVpcId': 'string'}
Creates a new fleet to run your game servers. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple server processes to host game sessions. You configure a fleet to create instances with certain hardware specifications (see Amazon EC2 Instance Types for more information), and deploy a specified game build to each instance. A newly created fleet passes through several statuses; once it reaches the ACTIVE status, it can begin hosting game sessions.
To create a new fleet, you must specify the following: (1) fleet name, (2) build ID of an uploaded game build, (3) an EC2 instance type, and (4) a run-time configuration that describes which server processes to run on each instance in the fleet. (Although the run-time configuration is not a required parameter, the fleet cannot be successfully activated without it.)
You can also configure the new fleet with the following settings:
Fleet description
Access permissions for inbound traffic
Fleet-wide game session protection
Resource creation limit
If you use Amazon CloudWatch for metrics, you can add the new fleet to a metric group. This allows you to view aggregated metrics for a set of fleets. Once you specify a metric group, the new fleet's metrics are included in the metric group's data.
You have the option of creating a VPC peering connection with the new fleet. For more information, see VPC Peering with Amazon GameLift Fleets .
If the CreateFleet call is successful, Amazon GameLift performs the following tasks:
Creates a fleet record and sets the status to NEW (followed by other statuses as the fleet is activated).
Sets the fleet's target capacity to 1 (desired instances), which causes Amazon GameLift to start one new EC2 instance.
Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, Amazon GameLift staggers each launch by a few seconds.
Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console.
Sets the fleet's status to ACTIVE as soon as one server process in the fleet is ready to host a game session.
Fleet-related operations include:
CreateFleet
ListFleets
Describe fleets:
DescribeFleetAttributes
DescribeFleetPortSettings
DescribeFleetUtilization
DescribeRuntimeConfiguration
DescribeFleetEvents
Update fleets:
UpdateFleetAttributes
UpdateFleetCapacity
UpdateFleetPortSettings
UpdateRuntimeConfiguration
Manage fleet capacity:
DescribeFleetCapacity
UpdateFleetCapacity
PutScalingPolicy (automatic scaling)
DescribeScalingPolicies (automatic scaling)
DeleteScalingPolicy (automatic scaling)
DescribeEC2InstanceLimits
DeleteFleet
See also: AWS API Documentation
Request Syntax
client.create_fleet( Name='string', Description='string', BuildId='string', ServerLaunchPath='string', ServerLaunchParameters='string', LogPaths=[ 'string', ], EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge', EC2InboundPermissions=[ { 'FromPort': 123, 'ToPort': 123, 'IpRange': 'string', 'Protocol': 'TCP'|'UDP' }, ], NewGameSessionProtectionPolicy='NoProtection'|'FullProtection', RuntimeConfiguration={ 'ServerProcesses': [ { 'LaunchPath': 'string', 'Parameters': 'string', 'ConcurrentExecutions': 123 }, ], 'MaxConcurrentGameSessionActivations': 123, 'GameSessionActivationTimeoutSeconds': 123 }, ResourceCreationLimitPolicy={ 'NewGameSessionsPerCreator': 123, 'PolicyPeriodInMinutes': 123 }, MetricGroups=[ 'string', ], PeerVpcAwsAccountId='string', PeerVpcId='string' )
string
[REQUIRED]
Descriptive label that is associated with a fleet. Fleet names do not need to be unique.
string
Human-readable description of a fleet.
string
[REQUIRED]
Unique identifier for a build to be deployed on the new fleet. The build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.
string
This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)
string
This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)
list
This parameter is no longer used. Instead, to specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API ProcessReady() and specify one or more directory paths in logParameters . See more information in the Server API Reference .
(string) --
string
[REQUIRED]
Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.
list
Range of IP addresses and port settings that permit inbound traffic to access server processes running on the fleet. If no inbound permissions are set, including both IP address range and port range, the server processes in the fleet cannot accept connections. You can specify one or more sets of permissions for a fleet.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to server processes on Amazon GameLift. Each game session hosted on a fleet is assigned a unique combination of IP address and port number, which must fall into the fleet's allowed ranges. This combination is included in the GameSession object.
FromPort (integer) -- [REQUIRED]
Starting value for a range of allowed port numbers.
ToPort (integer) -- [REQUIRED]
Ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort .
IpRange (string) -- [REQUIRED]
Range of allowed IP addresses. This value must be expressed in CIDR notation. Example: "000.000.000.000/[subnet mask] " or optionally the shortened version "0.0.0.0/[subnet mask] ".
Protocol (string) -- [REQUIRED]
Network communication protocol used by the fleet.
string
Game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using UpdateFleetAttributes, but this change will only affect sessions created after the policy change. You can also set protection for individual instances using UpdateGameSession .
NoProtection -- The game session can be terminated during a scale-down event.
FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.
dict
Instructions for launching server processes on each instance in the fleet. The run-time configuration for a fleet has a collection of server process configurations, one for each type of server process to run on an instance. A server process configuration specifies the location of the server executable, launch parameters, and the number of concurrent processes with that configuration to maintain on each instance. A CreateFleet request must include a run-time configuration with at least one server process configuration; otherwise the request fails with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters ; requests that contain values for these parameters instead of a run-time configuration will continue to work.)
ServerProcesses (list) --
Collection of server process configurations that describe which server processes to run on each instance in a fleet.
(dict) --
A set of instructions for launching server processes on each instance in a fleet. Each instruction set identifies the location of the server executable, optional launch parameters, and the number of server processes with this configuration to maintain concurrently on the instance. Server process configurations make up a fleet's `` RuntimeConfiguration `` .
LaunchPath (string) -- [REQUIRED]
Location of the server executable in a game build. All game builds are installed on instances at the root : for Windows instances C:\game , and for Linux instances /local/game . A Windows game build with an executable file located at MyGame\latest\server.exe must have a launch path of "C:\game\MyGame\latest\server.exe ". A Linux game build with an executable file located at MyGame/latest/server.exe must have a launch path of "/local/game/MyGame/latest/server.exe ".
Parameters (string) --
Optional list of parameters to pass to the server executable on launch.
ConcurrentExecutions (integer) -- [REQUIRED]
Number of server processes using this configuration to run concurrently on an instance.
MaxConcurrentGameSessionActivations (integer) --
Maximum number of game sessions with status ACTIVATING to allow on an instance simultaneously. This setting limits the amount of instance resources that can be used for new game activations at any one time.
GameSessionActivationTimeoutSeconds (integer) --
Maximum amount of time (in seconds) that a game session can remain in status ACTIVATING . If the game session is not active before the timeout, activation is terminated and the game session status is changed to TERMINATED .
dict
Policy that limits the number of game sessions an individual player can create over a span of time for this fleet.
NewGameSessionsPerCreator (integer) --
Maximum number of game sessions that an individual can create during the policy period.
PolicyPeriodInMinutes (integer) --
Time span used in evaluating the resource creation limit policy.
list
Names of metric groups to add this fleet to. Use an existing metric group name to add this fleet to the group. Or use a new name to create a new metric group. A fleet can only be included in one metric group at a time.
(string) --
string
Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.
string
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
dict
Response Syntax
{ 'FleetAttributes': { 'FleetId': 'string', 'FleetArn': 'string', 'Description': 'string', 'Name': 'string', 'CreationTime': datetime(2015, 1, 1), 'TerminationTime': datetime(2015, 1, 1), 'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED', 'BuildId': 'string', 'ServerLaunchPath': 'string', 'ServerLaunchParameters': 'string', 'LogPaths': [ 'string', ], 'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection', 'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX', 'ResourceCreationLimitPolicy': { 'NewGameSessionsPerCreator': 123, 'PolicyPeriodInMinutes': 123 }, 'MetricGroups': [ 'string', ] } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
FleetAttributes (dict) --
Properties for the newly created fleet.
FleetId (string) --
Unique identifier for a fleet.
FleetArn (string) --
Identifier for a fleet that is unique across all regions.
Description (string) --
Human-readable description of the fleet.
Name (string) --
Descriptive label that is associated with a fleet. Fleet names do not need to be unique.
CreationTime (datetime) --
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
TerminationTime (datetime) --
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
Status (string) --
Current status of the fleet.
Possible fleet statuses include the following:
NEW -- A new fleet has been defined and desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- Amazon GameLift is setting up the new fleet, creating new instances with the game build and starting server processes.
ACTIVE -- Hosts can now accept game sessions.
ERROR -- An error occurred when downloading, validating, building, or activating the fleet.
DELETING -- Hosts are responding to a delete fleet request.
TERMINATED -- The fleet no longer exists.
BuildId (string) --
Unique identifier for a build.
ServerLaunchPath (string) --
Path to a game server executable in the fleet's build, specified for fleets created before 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for fleets created after this date are specified in the fleet's RuntimeConfiguration .
ServerLaunchParameters (string) --
Game server launch parameters specified for fleets created before 2016-08-04 (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after this date are specified in the fleet's RuntimeConfiguration .
LogPaths (list) --
Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide . If no default log path for a fleet is specified, Amazon GameLift automatically uploads logs that are stored on each instance at C:\game\logs (for Windows) or /local/game/logs (for Linux). Use the Amazon GameLift console to access stored logs.
(string) --
NewGameSessionProtectionPolicy (string) --
Type of game session protection to set for all new instances started in the fleet.
NoProtection -- The game session can be terminated during a scale-down event.
FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.
OperatingSystem (string) --
Operating system of the fleet's computing resources. A fleet's operating system depends on the OS specified for the build that is deployed on this fleet.
ResourceCreationLimitPolicy (dict) --
Fleet policy to limit the number of game sessions an individual player can create over a span of time.
NewGameSessionsPerCreator (integer) --
Maximum number of game sessions that an individual can create during the policy period.
PolicyPeriodInMinutes (integer) --
Time span used in evaluating the resource creation limit policy.
MetricGroups (list) --
Names of metric groups that this fleet is included in. In Amazon CloudWatch, you can view metrics for an individual fleet or aggregated metrics for fleets that are in a fleet metric group. A fleet can be included in only one metric group at a time.
(string) --
{'EC2InstanceType': ['r4.large', 'r4.xlarge', 'r4.16xlarge', 'r4.2xlarge', 'r4.4xlarge', 'r4.8xlarge']}Response
{'EC2InstanceLimits': {'EC2InstanceType': ['r4.large', 'r4.xlarge', 'r4.16xlarge', 'r4.2xlarge', 'r4.4xlarge', 'r4.8xlarge']}}
Retrieves the following information for the specified EC2 instance type:
maximum number of instances allowed per AWS account (service limit)
current usage level for the AWS account
Service limits vary depending on region. Available regions for Amazon GameLift can be found in the AWS Management Console for Amazon GameLift (see the drop-down list in the upper right corner).
Fleet-related operations include:
CreateFleet
ListFleets
Describe fleets:
DescribeFleetAttributes
DescribeFleetPortSettings
DescribeFleetUtilization
DescribeRuntimeConfiguration
DescribeFleetEvents
Update fleets:
UpdateFleetAttributes
UpdateFleetCapacity
UpdateFleetPortSettings
UpdateRuntimeConfiguration
Manage fleet capacity:
DescribeFleetCapacity
UpdateFleetCapacity
PutScalingPolicy (automatic scaling)
DescribeScalingPolicies (automatic scaling)
DeleteScalingPolicy (automatic scaling)
DescribeEC2InstanceLimits
DeleteFleet
See also: AWS API Documentation
Request Syntax
client.describe_ec2_instance_limits( EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge' )
string
Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions. Leave this parameter blank to retrieve limits for all types.
dict
Response Syntax
{ 'EC2InstanceLimits': [ { 'EC2InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge', 'CurrentInstances': 123, 'InstanceLimit': 123 }, ] }
Response Structure
(dict) --
Represents the returned data in response to a request action.
EC2InstanceLimits (list) --
Object that contains the maximum number of instances for the specified instance type.
(dict) --
Maximum number of instances allowed based on the Amazon Elastic Compute Cloud (Amazon EC2) instance type. Instance limits can be retrieved by calling DescribeEC2InstanceLimits .
EC2InstanceType (string) --
Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.
CurrentInstances (integer) --
Number of instances of the specified type that are currently in use by this AWS account.
InstanceLimit (integer) --
Number of instances allowed.
{'FleetCapacity': {'InstanceType': ['r4.large', 'r4.xlarge', 'r4.16xlarge', 'r4.2xlarge', 'r4.4xlarge', 'r4.8xlarge']}}
Retrieves the current status of fleet capacity for one or more fleets. This information includes the number of instances that have been requested for the fleet and the number currently active. You can request capacity for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetCapacity object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.
Note
Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.
Fleet-related operations include:
CreateFleet
ListFleets
Describe fleets:
DescribeFleetAttributes
DescribeFleetPortSettings
DescribeFleetUtilization
DescribeRuntimeConfiguration
DescribeFleetEvents
Update fleets:
UpdateFleetAttributes
UpdateFleetCapacity
UpdateFleetPortSettings
UpdateRuntimeConfiguration
Manage fleet capacity:
DescribeFleetCapacity
UpdateFleetCapacity
PutScalingPolicy (automatic scaling)
DescribeScalingPolicies (automatic scaling)
DeleteScalingPolicy (automatic scaling)
DescribeEC2InstanceLimits
DeleteFleet
See also: AWS API Documentation
Request Syntax
client.describe_fleet_capacity( FleetIds=[ 'string', ], Limit=123, NextToken='string' )
list
Unique identifier for a fleet(s) to retrieve capacity information for. To request capacity information for all fleets, leave this parameter empty.
(string) --
integer
Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.
string
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. This parameter is ignored when the request specifies one or a list of fleet IDs.
dict
Response Syntax
{ 'FleetCapacity': [ { 'FleetId': 'string', 'InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge', 'InstanceCounts': { 'DESIRED': 123, 'MINIMUM': 123, 'MAXIMUM': 123, 'PENDING': 123, 'ACTIVE': 123, 'IDLE': 123, 'TERMINATING': 123 } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Represents the returned data in response to a request action.
FleetCapacity (list) --
Collection of objects containing capacity information for each requested fleet ID. Leave this parameter empty to retrieve capacity information for all fleets.
(dict) --
Information about the fleet's capacity. Fleet capacity is measured in EC2 instances. By default, new fleets have a capacity of one instance, but can be updated as needed. The maximum number of instances for a fleet is determined by the fleet's instance type.
Fleet-related operations include:
CreateFleet
ListFleets
Describe fleets:
DescribeFleetAttributes
DescribeFleetPortSettings
DescribeFleetUtilization
DescribeRuntimeConfiguration
DescribeFleetEvents
Update fleets:
UpdateFleetAttributes
UpdateFleetCapacity
UpdateFleetPortSettings
UpdateRuntimeConfiguration
Manage fleet capacity:
DescribeFleetCapacity
UpdateFleetCapacity
PutScalingPolicy (automatic scaling)
DescribeScalingPolicies (automatic scaling)
DeleteScalingPolicy (automatic scaling)
DescribeEC2InstanceLimits
DeleteFleet
FleetId (string) --
Unique identifier for a fleet.
InstanceType (string) --
Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.
InstanceCounts (dict) --
Current status of fleet capacity.
DESIRED (integer) --
Ideal number of active instances in the fleet.
MINIMUM (integer) --
Minimum value allowed for the fleet's instance count.
MAXIMUM (integer) --
Maximum value allowed for the fleet's instance count.
PENDING (integer) --
Number of instances in the fleet that are starting but not yet active.
ACTIVE (integer) --
Actual number of active instances in the fleet.
IDLE (integer) --
Number of active instances in the fleet that are not currently hosting a game session.
TERMINATING (integer) --
Number of instances in the fleet that are no longer active but haven't yet been terminated.
NextToken (string) --
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.
{'Events': {'EventCode': ['FLEET_VPC_PEERING_FAILED', 'FLEET_VPC_PEERING_DELETED', 'FLEET_VPC_PEERING_SUCCEEDED']}}
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:
CreateFleet
ListFleets
Describe fleets:
DescribeFleetAttributes
DescribeFleetPortSettings
DescribeFleetUtilization
DescribeRuntimeConfiguration
DescribeFleetEvents
Update fleets:
UpdateFleetAttributes
UpdateFleetCapacity
UpdateFleetPortSettings
UpdateRuntimeConfiguration
Manage fleet capacity:
DescribeFleetCapacity
UpdateFleetCapacity
PutScalingPolicy (automatic scaling)
DescribeScalingPolicies (automatic scaling)
DeleteScalingPolicy (automatic scaling)
DescribeEC2InstanceLimits
DeleteFleet
See also: AWS API Documentation
Request Syntax
client.describe_fleet_events( FleetId='string', StartTime=datetime(2015, 1, 1), EndTime=datetime(2015, 1, 1), Limit=123, NextToken='string' )
string
[REQUIRED]
Unique identifier for a fleet to get event logs for.
datetime
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").
datetime
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").
integer
Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
string
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.
dict
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'|'GAME_SESSION_ACTIVATION_TIMEOUT'|'FLEET_CREATION_EXTRACTING_BUILD'|'FLEET_CREATION_RUNNING_INSTALLER'|'FLEET_CREATION_VALIDATING_RUNTIME_CONFIG'|'FLEET_VPC_PEERING_SUCCEEDED'|'FLEET_VPC_PEERING_FAILED'|'FLEET_VPC_PEERING_DELETED', 'Message': 'string', 'EventTime': datetime(2015, 1, 1), 'PreSignedLogUrl': 'string' }, ], '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 that involves 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 an event resource, such as a fleet ID.
EventCode (string) --
Type of event being logged. The following events are currently in use:
General events:
GENERIC_EVENT -- An unspecified event has occurred.
Fleet creation events:
FLEET_CREATED -- A fleet record was successfully created with a status of NEW . Event messaging includes the fleet ID.
FLEET_STATE_DOWNLOADING -- Fleet status changed from NEW to DOWNLOADING . The compressed build has started downloading to a fleet instance for installation.
FLEET_BINARY_DOWNLOAD_FAILED -- The build failed to download to the fleet instance.
FLEET_CREATION_EXTRACTING_BUILD – The game server build was successfully downloaded to an instance, and the build files are now being extracted from the uploaded build and saved to an instance. Failure at this stage prevents a fleet from moving to ACTIVE status. Logs for this stage display a list of the files that are extracted and saved on the instance. Access the logs by using the URL in PreSignedLogUrl .
FLEET_CREATION_RUNNING_INSTALLER – The game server build files were successfully extracted, and the Amazon GameLift is now running the build's install script (if one is included). Failure in this stage prevents a fleet from moving to ACTIVE status. Logs for this stage list the installation steps and whether or not the install completed successfully. Access the logs by using the URL in PreSignedLogUrl .
FLEET_CREATION_VALIDATING_RUNTIME_CONFIG -- The build process was successful, and the Amazon GameLift is now verifying that the game server launch paths, which are specified in the fleet's run-time configuration, exist. If any listed launch path exists, Amazon GameLift tries to launch a game server process and waits for the process to report ready. Failures in this stage prevent a fleet from moving to ACTIVE status. Logs for this stage list the launch paths in the run-time configuration and indicate whether each is found. Access the logs by using the URL in PreSignedLogUrl .
FLEET_STATE_VALIDATING -- Fleet status changed from DOWNLOADING to VALIDATING .
FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND -- Validation of the run-time configuration failed because the executable specified in a launch path does not exist on the instance.
FLEET_STATE_BUILDING -- Fleet status changed from VALIDATING to BUILDING .
FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE -- Validation of the run-time configuration failed because the executable specified in a launch path failed to run on the fleet instance.
FLEET_STATE_ACTIVATING -- Fleet status changed from BUILDING to ACTIVATING .
FLEET_ACTIVATION_FAILED - The fleet failed to successfully complete one of the steps in the fleet activation process. This event code indicates that the game build was successfully downloaded to a fleet instance, built, and validated, but was not able to start a server process. A possible reason for failure is that the game server is not reporting "process ready" to the Amazon GameLift service.
FLEET_STATE_ACTIVE -- The fleet's status changed from ACTIVATING to ACTIVE . The fleet is now ready to host game sessions.
VPC peering events:
FLEET_VPC_PEERING_SUCCEEDED -- A VPC peering connection has been established between the VPC for an Amazon GameLift fleet and a VPC in your AWS account.
FLEET_VPC_PEERING_FAILED -- A requested VPC peering connection has failed. Event details and status information (see DescribeVpcPeeringConnections ) provide additional detail. A common reason for peering failure is that the two VPCs have overlapping CIDR blocks of IPv4 addresses. To resolve this, change the CIDR block for the VPC in your AWS account. For more information on VPC peering failures, see http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/invalid-peering-configurations.html
FLEET_VPC_PEERING_DELETED -- A VPC peering connection has been successfully deleted.
Other fleet events:
FLEET_SCALING_EVENT -- A change was made to the fleet's capacity settings (desired instances, minimum/maximum scaling limits). Event messaging includes the new capacity settings.
FLEET_NEW_GAME_SESSION_PROTECTION_POLICY_UPDATED -- A change was made to the fleet's game session protection policy setting. Event messaging includes both the old and new policy setting.
FLEET_DELETED -- A request to delete a fleet was initiated.
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 (for example "1469498468.057").
PreSignedLogUrl (string) --
Location of stored logs with additional detail that is related to the event. This is useful for debugging issues. The URL is valid for 15 minutes. You can also access fleet creation logs through the Amazon GameLift console.
NextToken (string) --
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.
{'Instances': {'Type': ['r4.large', 'r4.xlarge', 'r4.16xlarge', 'r4.2xlarge', 'r4.4xlarge', 'r4.8xlarge']}}
Retrieves information about a fleet's instances, including instance IDs. Use this action to get details on all instances in the fleet or get details on one specific instance.
To get a specific instance, specify fleet ID and instance ID. To get all instances in a fleet, specify a fleet ID only. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, an Instance object is returned for each result.
See also: AWS API Documentation
Request Syntax
client.describe_instances( FleetId='string', InstanceId='string', Limit=123, NextToken='string' )
string
[REQUIRED]
Unique identifier for a fleet to retrieve instance information for.
string
Unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.
integer
Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
string
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.
dict
Response Syntax
{ 'Instances': [ { 'FleetId': 'string', 'InstanceId': 'string', 'IpAddress': 'string', 'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX', 'Type': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge', 'Status': 'PENDING'|'ACTIVE'|'TERMINATING', 'CreationTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Represents the returned data in response to a request action.
Instances (list) --
Collection of objects containing properties for each instance returned.
(dict) --
Properties that describe an instance of a virtual computing resource that hosts one or more game servers. A fleet may contain zero or more instances.
FleetId (string) --
Unique identifier for a fleet that the instance is in.
InstanceId (string) --
Unique identifier for an instance.
IpAddress (string) --
IP address assigned to the instance.
OperatingSystem (string) --
Operating system that is running on this instance.
Type (string) --
EC2 instance type that defines the computing resources of this instance.
Status (string) --
Current status of the instance. Possible statuses include the following:
PENDING -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration.
ACTIVE -- The instance has been successfully created and at least one server process has successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions.
TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.
CreationTime (datetime) --
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
NextToken (string) --
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.
{'TicketList': {'EndTime': 'timestamp', 'EstimatedWaitTime': 'integer'}}
Retrieves a set of one or more matchmaking tickets. Use this operation to retrieve ticket information, including status and--once a successful match is made--acquire connection information for the resulting new game session.
You can use this operation to track the progress of matchmaking requests (through polling) as an alternative to using event notifications. See more details on tracking matchmaking requests through polling or notifications in StartMatchmaking .
You can request data for a one or a list of ticket IDs. If the request is successful, a ticket object is returned for each requested ID. When specifying a list of ticket IDs, objects are returned only for tickets that currently exist.
Matchmaking-related operations include:
StartMatchmaking
DescribeMatchmaking
StopMatchmaking
AcceptMatch
See also: AWS API Documentation
Request Syntax
client.describe_matchmaking( TicketIds=[ 'string', ] )
list
[REQUIRED]
Unique identifier for a matchmaking ticket. To request all existing tickets, leave this parameter empty.
(string) --
dict
Response Syntax
{ 'TicketList': [ { 'TicketId': 'string', 'ConfigurationName': 'string', 'Status': 'CANCELLED'|'COMPLETED'|'FAILED'|'PLACING'|'QUEUED'|'REQUIRES_ACCEPTANCE'|'SEARCHING'|'TIMED_OUT', 'StatusReason': 'string', 'StatusMessage': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Players': [ { 'PlayerId': 'string', 'PlayerAttributes': { 'string': { 'S': 'string', 'N': 123.0, 'SL': [ 'string', ], 'SDM': { 'string': 123.0 } } }, 'Team': 'string', 'LatencyInMs': { 'string': 123 } }, ], 'GameSessionConnectionInfo': { 'GameSessionArn': 'string', 'IpAddress': 'string', 'Port': 123, 'MatchedPlayerSessions': [ { 'PlayerId': 'string', 'PlayerSessionId': 'string' }, ] }, 'EstimatedWaitTime': 123 }, ] }
Response Structure
(dict) --
Represents the returned data in response to a request action.
TicketList (list) --
Collection of existing matchmaking ticket objects matching the request.
(dict) --
Ticket generated to track the progress of a matchmaking request. Each ticket is uniquely identified by a ticket ID, supplied by the requester, when creating a matchmaking request with StartMatchmaking . Tickets can be retrieved by calling DescribeMatchmaking with the ticket ID.
TicketId (string) --
Unique identifier for a matchmaking ticket.
ConfigurationName (string) --
Name of the MatchmakingConfiguration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.
Status (string) --
Current status of the matchmaking request.
QUEUED -- The matchmaking request has been received and is currently waiting to be processed.
SEARCHING -- The matchmaking request is currently being processed.
REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match (see AcceptMatch ). This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.
PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.
COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.
FAILED -- The matchmaking request was not completed. Tickets with players who fail to accept a proposed match are placed in FAILED status; new matchmaking requests can be submitted for these players.
CANCELLED -- The matchmaking request was canceled with a call to StopMatchmaking .
TIMED_OUT -- The matchmaking request was not completed within the duration specified in the matchmaking configuration. Matchmaking requests that time out can be resubmitted.
StatusReason (string) --
Code to explain the current status. For example, a status reason may indicate when a ticket has returned to SEARCHING status after a proposed match fails to receive player acceptances.
StatusMessage (string) --
Additional information about the current status.
StartTime (datetime) --
Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
Players (list) --
A set of Player objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in status COMPLETED , the Player objects include the team the players were assigned to in the resulting match.
(dict) --
Represents a player in matchmaking. When starting a matchmaking request, a player has a player ID, attributes, and may have latency data. Team information is added after a match has been successfully completed.
PlayerId (string) --
Unique identifier for a player
PlayerAttributes (dict) --
Collection of name:value pairs containing player information for use in matchmaking. Player attribute names need to match playerAttributes names in the rule set being used. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}} .
(string) --
(dict) --
Values for use in Player attribute type:value pairs. This object lets you specify an attribute value using any of the valid data types: string, number, string array or data map. Each AttributeValue object can use only one of the available properties.
S (string) --
For single string values. Maximum string length is 100 characters.
N (float) --
For number values, expressed as double.
SL (list) --
For a list of up to 10 strings. Maximum length for each string is 100 characters. Duplicate values are not recognized; all occurrences of the repeated value after the first of a repeated value are ignored.
(string) --
SDM (dict) --
For a map of up to 10 type:value pairs. Maximum length for each string value is 100 characters.
(string) --
(float) --
Team (string) --
Name of the team that the player is assigned to in a match. Team names are defined in a matchmaking rule set.
LatencyInMs (dict) --
Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS regions. If this property is present, FlexMatch considers placing the match only in regions for which latency is reported.
If a matchmaker has a rule that evaluates player latency, players must report latency in order to be matched. If no latency is reported in this scenario, FlexMatch assumes that no regions are available to the player and the ticket is not matchable.
(string) --
(integer) --
GameSessionConnectionInfo (dict) --
Identifier and connection information of the game session created for the match. This information is added to the ticket only after the matchmaking request has been successfully completed.
GameSessionArn (string) --
Amazon Resource Name (ARN ) that is assigned to a game session and uniquely identifies it.
IpAddress (string) --
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
Port (integer) --
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
MatchedPlayerSessions (list) --
Collection of player session IDs, one for each player ID that was included in the original matchmaking request.
(dict) --
Represents a new player session that is created as a result of a successful FlexMatch match. A successful match automatically creates new player sessions for every player ID in the original matchmaking request.
When players connect to the match's game session, they must include both player ID and player session ID in order to claim their assigned player slot.
PlayerId (string) --
Unique identifier for a player
PlayerSessionId (string) --
Unique identifier for a player session
EstimatedWaitTime (integer) --
Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.
{'MatchmakingTicket': {'EndTime': 'timestamp', 'EstimatedWaitTime': 'integer'}}
Uses FlexMatch to create a game match for a group of players based on custom matchmaking rules, and starts a new game for the matched players. Each matchmaking request specifies the type of match to build (team configuration, rules for an acceptable match, etc.). The request also specifies the players to find a match for and where to host the new game session for optimal performance. A matchmaking request might start with a single player or a group of players who want to play together. FlexMatch finds additional players as needed to fill the match. Match type, rules, and the queue used to place a new game session are defined in a MatchmakingConfiguration . For complete information on setting up and using FlexMatch, see the topic Adding FlexMatch to Your Game .
To start matchmaking, provide a unique ticket ID, specify a matchmaking configuration, and include the players to be matched. You must also include a set of player attributes relevant for the matchmaking configuration. If successful, a matchmaking ticket is returned with status set to QUEUED . Track the status of the ticket to respond as needed and acquire game session connection information for successfully completed matches.
Tracking ticket status -- A couple of options are available for tracking the status of matchmaking requests:
Polling -- Call DescribeMatchmaking . This operation returns the full ticket object, including current status and (for completed tickets) game session connection info. We recommend polling no more than once every 10 seconds.
Notifications -- Get event notifications for changes in ticket status using Amazon Simple Notification Service (SNS). Notifications are easy to set up (see CreateMatchmakingConfiguration ) and typically deliver match status changes faster and more efficiently than polling. We recommend that you use polling to back up to notifications (since delivery is not guaranteed) and call DescribeMatchmaking only when notifications are not received within 30 seconds.
Processing a matchmaking request -- FlexMatch handles a matchmaking request as follows:
Your client code submits a StartMatchmaking request for one or more players and tracks the status of the request ticket.
FlexMatch uses this ticket and others in process to build an acceptable match. When a potential match is identified, all tickets in the proposed match are advanced to the next status.
If the match requires player acceptance (set in the matchmaking configuration), the tickets move into status REQUIRES_ACCEPTANCE . This status triggers your client code to solicit acceptance from all players in every ticket involved in the match, and then call AcceptMatch for each player. If any player rejects or fails to accept the match before a specified timeout, the proposed match is dropped (see AcceptMatch for more details).
Once a match is proposed and accepted, the matchmaking tickets move into status PLACING . FlexMatch locates resources for a new game session using the game session queue (set in the matchmaking configuration) and creates the game session based on the match data.
When the match is successfully placed, the matchmaking tickets move into COMPLETED status. Connection information (including game session endpoint and player session) is added to the matchmaking tickets. Matched players can use the connection information to join the game.
Matchmaking-related operations include:
StartMatchmaking
DescribeMatchmaking
StopMatchmaking
AcceptMatch
See also: AWS API Documentation
Request Syntax
client.start_matchmaking( TicketId='string', ConfigurationName='string', Players=[ { 'PlayerId': 'string', 'PlayerAttributes': { 'string': { 'S': 'string', 'N': 123.0, 'SL': [ 'string', ], 'SDM': { 'string': 123.0 } } }, 'Team': 'string', 'LatencyInMs': { 'string': 123 } }, ] )
string
Unique identifier for a matchmaking ticket. Use this identifier to track the matchmaking ticket status and retrieve match results.
string
[REQUIRED]
Name of the matchmaking configuration to use for this request. Matchmaking configurations must exist in the same region as this request.
list
[REQUIRED]
Information on each player to be matched. This information must include a player ID, and may contain player attributes and latency data to be used in the matchmaking process. After a successful match, Player objects contain the name of the team the player is assigned to.
(dict) --
Represents a player in matchmaking. When starting a matchmaking request, a player has a player ID, attributes, and may have latency data. Team information is added after a match has been successfully completed.
PlayerId (string) --
Unique identifier for a player
PlayerAttributes (dict) --
Collection of name:value pairs containing player information for use in matchmaking. Player attribute names need to match playerAttributes names in the rule set being used. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}} .
(string) --
(dict) --
Values for use in Player attribute type:value pairs. This object lets you specify an attribute value using any of the valid data types: string, number, string array or data map. Each AttributeValue object can use only one of the available properties.
S (string) --
For single string values. Maximum string length is 100 characters.
N (float) --
For number values, expressed as double.
SL (list) --
For a list of up to 10 strings. Maximum length for each string is 100 characters. Duplicate values are not recognized; all occurrences of the repeated value after the first of a repeated value are ignored.
(string) --
SDM (dict) --
For a map of up to 10 type:value pairs. Maximum length for each string value is 100 characters.
(string) --
(float) --
Team (string) --
Name of the team that the player is assigned to in a match. Team names are defined in a matchmaking rule set.
LatencyInMs (dict) --
Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS regions. If this property is present, FlexMatch considers placing the match only in regions for which latency is reported.
If a matchmaker has a rule that evaluates player latency, players must report latency in order to be matched. If no latency is reported in this scenario, FlexMatch assumes that no regions are available to the player and the ticket is not matchable.
(string) --
(integer) --
dict
Response Syntax
{ 'MatchmakingTicket': { 'TicketId': 'string', 'ConfigurationName': 'string', 'Status': 'CANCELLED'|'COMPLETED'|'FAILED'|'PLACING'|'QUEUED'|'REQUIRES_ACCEPTANCE'|'SEARCHING'|'TIMED_OUT', 'StatusReason': 'string', 'StatusMessage': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Players': [ { 'PlayerId': 'string', 'PlayerAttributes': { 'string': { 'S': 'string', 'N': 123.0, 'SL': [ 'string', ], 'SDM': { 'string': 123.0 } } }, 'Team': 'string', 'LatencyInMs': { 'string': 123 } }, ], 'GameSessionConnectionInfo': { 'GameSessionArn': 'string', 'IpAddress': 'string', 'Port': 123, 'MatchedPlayerSessions': [ { 'PlayerId': 'string', 'PlayerSessionId': 'string' }, ] }, 'EstimatedWaitTime': 123 } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
MatchmakingTicket (dict) --
Ticket representing the matchmaking request. This object include the information included in the request, ticket status, and match results as generated during the matchmaking process.
TicketId (string) --
Unique identifier for a matchmaking ticket.
ConfigurationName (string) --
Name of the MatchmakingConfiguration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.
Status (string) --
Current status of the matchmaking request.
QUEUED -- The matchmaking request has been received and is currently waiting to be processed.
SEARCHING -- The matchmaking request is currently being processed.
REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match (see AcceptMatch ). This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.
PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.
COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.
FAILED -- The matchmaking request was not completed. Tickets with players who fail to accept a proposed match are placed in FAILED status; new matchmaking requests can be submitted for these players.
CANCELLED -- The matchmaking request was canceled with a call to StopMatchmaking .
TIMED_OUT -- The matchmaking request was not completed within the duration specified in the matchmaking configuration. Matchmaking requests that time out can be resubmitted.
StatusReason (string) --
Code to explain the current status. For example, a status reason may indicate when a ticket has returned to SEARCHING status after a proposed match fails to receive player acceptances.
StatusMessage (string) --
Additional information about the current status.
StartTime (datetime) --
Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
Players (list) --
A set of Player objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in status COMPLETED , the Player objects include the team the players were assigned to in the resulting match.
(dict) --
Represents a player in matchmaking. When starting a matchmaking request, a player has a player ID, attributes, and may have latency data. Team information is added after a match has been successfully completed.
PlayerId (string) --
Unique identifier for a player
PlayerAttributes (dict) --
Collection of name:value pairs containing player information for use in matchmaking. Player attribute names need to match playerAttributes names in the rule set being used. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}} .
(string) --
(dict) --
Values for use in Player attribute type:value pairs. This object lets you specify an attribute value using any of the valid data types: string, number, string array or data map. Each AttributeValue object can use only one of the available properties.
S (string) --
For single string values. Maximum string length is 100 characters.
N (float) --
For number values, expressed as double.
SL (list) --
For a list of up to 10 strings. Maximum length for each string is 100 characters. Duplicate values are not recognized; all occurrences of the repeated value after the first of a repeated value are ignored.
(string) --
SDM (dict) --
For a map of up to 10 type:value pairs. Maximum length for each string value is 100 characters.
(string) --
(float) --
Team (string) --
Name of the team that the player is assigned to in a match. Team names are defined in a matchmaking rule set.
LatencyInMs (dict) --
Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS regions. If this property is present, FlexMatch considers placing the match only in regions for which latency is reported.
If a matchmaker has a rule that evaluates player latency, players must report latency in order to be matched. If no latency is reported in this scenario, FlexMatch assumes that no regions are available to the player and the ticket is not matchable.
(string) --
(integer) --
GameSessionConnectionInfo (dict) --
Identifier and connection information of the game session created for the match. This information is added to the ticket only after the matchmaking request has been successfully completed.
GameSessionArn (string) --
Amazon Resource Name (ARN ) that is assigned to a game session and uniquely identifies it.
IpAddress (string) --
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
Port (integer) --
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
MatchedPlayerSessions (list) --
Collection of player session IDs, one for each player ID that was included in the original matchmaking request.
(dict) --
Represents a new player session that is created as a result of a successful FlexMatch match. A successful match automatically creates new player sessions for every player ID in the original matchmaking request.
When players connect to the match's game session, they must include both player ID and player session ID in order to claim their assigned player slot.
PlayerId (string) --
Unique identifier for a player
PlayerSessionId (string) --
Unique identifier for a player session
EstimatedWaitTime (integer) --
Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.