2026/03/04 - Amazon GameLift - 1 new 21 updated api methods
Changes Amazon GameLift Servers now offers DDoS protection for Linux-based EC2 and Container Fleets on SDKv5. The player gateway proxy relay network provides traffic validation, per-player rate limiting, and game server IP address obfuscation all with negligible added latency and no additional cost.
This API works with the following fleet types: EC2 (server SDK 5.x or later), Container
Retrieves connection details for game clients to connect to game sessions.
Player gateway benefits: DDoS protection with negligible impact to latency.
To enable player gateway on your fleet, set PlayerGatewayMode to ENABLED or REQUIRED when calling CreateFleet or CreateContainerFleet.
How to use: After creating a game session and adding players, call this operation with the game session ID and player IDs. When player gateway is enabled, the response includes connection endpoints and player gateway tokens that your game clients can use to connect to the game session through player gateway. To learn more about player gateway integration, see DDoS protection with Amazon GameLift Servers player gateway.
When player gateway is disabled or in locations where player gateway is not supported, this operation returns game server connection information without player gateway tokens, so that your game clients directly connect to the game server endpoint.
See also: AWS API Documentation
Request Syntax
client.get_player_connection_details(
GameSessionId='string',
PlayerIds=[
'string',
]
)
string
[REQUIRED]
A unique identifier for the game session for which to retrieve player connection details.
list
[REQUIRED]
List of unique identifiers for players. Connection details are returned for each player in this list.
(string) --
dict
Response Syntax
{
'GameSessionId': 'string',
'PlayerConnectionDetails': [
{
'PlayerId': 'string',
'Endpoints': [
{
'IpAddress': 'string',
'Port': 123
},
],
'PlayerGatewayToken': 'string',
'Expiration': datetime(2015, 1, 1)
},
]
}
Response Structure
(dict) --
GameSessionId (string) --
A unique identifier for the game session for which the player connection details were retrieved.
PlayerConnectionDetails (list) --
A collection of player connection detail objects, one for each requested player.
(dict) --
Connection information for a game client to connect to a game session. This object contains the IP address(es), port(s), and authentication details your game client needs to establish a connection.
With player gateway enabled: Contains relay endpoints and a player gateway token. Your game client must prepend player gateway token to each payload for validation and connection through relay endpoints.
With player gateway disabled: Contains game server endpoint. Player gateway token and expiration fields are empty.
PlayerId (string) --
A unique identifier for a player associated with this connection.
Endpoints (list) --
List of connection endpoints for the game client. Your game client uses these IP address(es) and port(s) to connect to the game session.
When player gateway is enabled, these are relay endpoints with benefits such as DDoS protection. When disabled, this is the game server endpoint.
(dict) --
Network address(es) and port(s) for connecting to a game session.
IpAddress (string) --
IP address for connecting to the game session. When player gateway is enabled, this is a player gateway IP address. When player gateway is disabled, this is the game server IP address.
Port (integer) --
Port number for connecting to the game session. When player gateway is enabled, this is a player gateway port. When player gateway is disabled, this is the game server port.
PlayerGatewayToken (string) --
Access token that your game client must prepend to all traffic sent through player gateway. Player gateway verifies identity and authorizes connection based on this token.
This value is empty when player gateway is disabled.
Expiration (datetime) --
When player gateway is enabled, this is the timestamp indicating when player gateway token expires. Your game backend should call GetPlayerConnectionDetails to retrieve fresh connection information for your game clients before this time. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
This value is empty when player gateway is disabled.
{'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'}
Response {'ContainerFleet': {'LocationAttributes': {'PlayerGatewayStatus': 'DISABLED | '
'ENABLED'},
'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'}}
This API works with the following fleet types: Container
Creates a managed fleet of Amazon Elastic Compute Cloud (Amazon EC2) instances to host your containerized game servers. Use this operation to define how to deploy a container architecture onto each fleet instance and configure fleet settings. You can create a container fleet in any Amazon Web Services Regions that Amazon GameLift Servers supports for multi-location fleets. A container fleet can be deployed to a single location or multiple locations. Container fleets are deployed with Amazon Linux 2023 as the instance operating system.
Define the fleet's container architecture using container group definitions. Each fleet can have one of the following container group types:
The game server container group runs your game server build and dependent software. Amazon GameLift Servers deploys one or more replicas of this container group to each fleet instance. The number of replicas depends on the computing capabilities of the fleet instance in use.
An optional per-instance container group might be used to run other software that only needs to run once per instance, such as background services, logging, or test processes. One per-instance container group is deployed to each fleet instance.
Each container group can include the definition for one or more containers. A container definition specifies a container image that is stored in an Amazon Elastic Container Registry (Amazon ECR) public or private repository.
Request options
Use this operation to make the following types of requests. Most fleet settings have default values, so you can create a working fleet with a minimal configuration and default values, which you can customize later.
Create a fleet with no container groups. You can configure a container fleet and then add container group definitions later. In this scenario, no fleet instances are deployed, and the fleet can't host game sessions until you add a game server container group definition. Provide the following required parameter values:
FleetRoleArn
Create a fleet with a game server container group. Provide the following required parameter values:
FleetRoleArn
GameServerContainerGroupDefinitionName
Create a fleet with a game server container group and a per-instance container group. Provide the following required parameter values:
FleetRoleArn
GameServerContainerGroupDefinitionName
PerInstanceContainerGroupDefinitionName
Results
If successful, this operation creates a new container fleet resource, places it in PENDING status, and initiates the fleet creation workflow. For fleets with container groups, this workflow starts a fleet deployment and transitions the status to ACTIVE. Fleets without a container group are placed in CREATED status.
You can update most of the properties of a fleet, including container group definitions, and deploy the update across all fleet instances. Use UpdateContainerFleet to deploy a new game server version update across the container fleet.
See also: AWS API Documentation
Request Syntax
client.create_container_fleet(
FleetRoleArn='string',
Description='string',
GameServerContainerGroupDefinitionName='string',
PerInstanceContainerGroupDefinitionName='string',
InstanceConnectionPortRange={
'FromPort': 123,
'ToPort': 123
},
InstanceInboundPermissions=[
{
'FromPort': 123,
'ToPort': 123,
'IpRange': 'string',
'Protocol': 'TCP'|'UDP'
},
],
GameServerContainerGroupsPerInstance=123,
InstanceType='string',
BillingType='ON_DEMAND'|'SPOT',
Locations=[
{
'Location': 'string'
},
],
MetricGroups=[
'string',
],
NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
GameSessionCreationLimitPolicy={
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
LogConfiguration={
'LogDestination': 'NONE'|'CLOUDWATCH'|'S3',
'S3BucketName': 'string',
'LogGroupArn': 'string'
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
PlayerGatewayMode='DISABLED'|'ENABLED'|'REQUIRED'
)
string
[REQUIRED]
The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. Use an IAM service role with the GameLiftContainerFleetPolicy managed policy attached. For more information, see Set up an IAM service role. You can't change this fleet property after the fleet is created.
IAM role ARN values use the following pattern: arn:aws:iam::[Amazon Web Services account]:role/[role name].
string
A meaningful description of the container fleet.
string
A container group definition resource that describes how to deploy containers with your game server build and support software onto each fleet instance. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.
Create a container group definition by calling CreateContainerGroupDefinition. This operation creates a ContainerGroupDefinition resource.
string
The name of a container group definition resource that describes a set of axillary software. A fleet instance has one process for executables in this container group. A per-instance container group is optional. You can update the fleet to add or remove a per-instance container group at any time. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.
Create a container group definition by calling https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html. This operation creates a https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html resource.
dict
The set of port numbers to open on each fleet instance. A fleet's connection ports map to container ports that are configured in the fleet's container group definitions.
By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:
Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: 4192 + [# of game server container groups per fleet instance] * [# of container ports in the game server container group definition] + [# of container ports in the game server container group definition]
You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's inbound permissions port range.
FromPort (integer) -- [REQUIRED]
Starting value for the port range.
ToPort (integer) -- [REQUIRED]
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
list
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. As a best practice, when remotely accessing a fleet instance, we recommend opening ports only when you need them and closing them when you're finished.
By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:
Protocol: UDP
Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: 4192 + [# of game server container groups per fleet instance] * [# of container ports in the game server container group definition] + [# of container ports in the game server container group definition]
You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's connection port range.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) -- [REQUIRED]
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) -- [REQUIRED]
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) -- [REQUIRED]
A 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]
The network communication protocol used by the fleet.
integer
The number of times to replicate the game server container group on each fleet instance.
By default, Amazon GameLift Servers calculates the maximum number of game server container groups that can fit on each instance. This calculation is based on the CPU and memory resources of the fleet's instance type). To use the calculated maximum, don't set this parameter. If you set this number manually, Amazon GameLift Servers uses your value as long as it's less than the calculated maximum.
string
The Amazon EC2 instance type to use for all instances in the fleet. For multi-location fleets, the instance type must be available in the home region and all remote locations. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity.
By default, Amazon GameLift Servers selects an instance type that fits the needs of your container groups and is available in all selected fleet locations. You can also choose to manually set this parameter. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions of Amazon EC2 instance types.
You can't update this fleet property later.
string
Indicates whether to use On-Demand or Spot instances for this fleet. Learn more about when to use On-Demand versus Spot Instances. This fleet property can't be changed after the fleet is created.
By default, this property is set to ON_DEMAND.
You can't update this fleet property later.
list
A set of locations to deploy container fleet instances to. You can add any Amazon Web Services Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more Amazon Web Services Region codes, such as us-west-2, or Local Zone names. Also include the fleet's home Region, which is the Amazon Web Services Region where the fleet is created. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.
(dict) --
A remote location where a multi-location fleet can deploy game servers for game hosting.
Location (string) -- [REQUIRED]
An Amazon Web Services Region code, such as us-west-2. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.
list
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. You can use a metric group to aggregate metrics for multiple fleets. You can specify an existing metric group name or use a new name to create a new metric group. Each fleet can have only one metric group, but you can change this value at any time.
(string) --
string
Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using UpdateGameSession.
NoProtection -- Game sessions can be shut down during active gameplay.
FullProtection -- Game sessions in ACTIVE status can't be shut down.
By default, this property is set to NoProtection.
dict
A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
dict
A method for collecting container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs. You can select from the following methods:
CLOUDWATCH -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define.
NONE -- Don't collect container logs.
By default, this property is set to CLOUDWATCH.
Amazon GameLift Servers requires permissions to send logs other Amazon Web Services services in your account. These permissions are included in the IAM fleet role for this container fleet (see FleetRoleArn).
LogDestination (string) --
The type of log collection to use for a fleet.
CLOUDWATCH -- (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define. This bucket must reside in the fleet's home Amazon Web Services Region.
NONE -- Don't collect container logs.
S3BucketName (string) --
If log destination is S3, logs are sent to the specified Amazon S3 bucket name.
LogGroupArn (string) --
If log destination is CLOUDWATCH, logs are sent to the specified log group in Amazon CloudWatch.
list
A list of labels to assign to the new fleet resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.
(dict) --
A label that you can assign to a Amazon GameLift Servers resource.
Learn more
Tagging Amazon Web Services Resources in the Amazon Web Services General Reference
Amazon Web Services Tagging Strategies
Related actions
Key (string) -- [REQUIRED]
The key for a developer-defined key value pair for tagging an Amazon Web Services resource.
Value (string) -- [REQUIRED]
The value for a developer-defined key value pair for tagging an Amazon Web Services resource.
string
Configures player gateway for your fleet. Player gateway provides benefits such as DDoS protection by rate limiting and validating traffic before it reaches game servers, hiding game server IP addresses from players, and providing updated endpoints when relay endpoints become unhealthy.
How it works: When enabled, game clients connect to relay endpoints instead of to your game servers. Player gateway validates player gateway tokens and routes traffic to the appropriate game server. Your game backend calls GetPlayerConnectionDetails to retrieve relay endpoints and player gateway tokens for your game clients. To learn more about this topic, see DDoS protection with Amazon GameLift Servers player gateway.
Possible values include:
DISABLED (default) -- Game clients connect to the game server endpoint. Use this when you do not intend to integrate your game with player gateway.
ENABLED -- Player gateway is available in fleet locations where it is supported. Your game backend can call GetPlayerConnectionDetails to obtain a player gateway token and endpoints for game clients.
REQUIRED -- Player gateway is available in fleet locations where it is supported, and the fleet can only use locations that support this feature. Attempting to add a remote location to your fleet which does not support player gateway will result in an InvalidRequestException.
dict
Response Syntax
{
'ContainerFleet': {
'FleetId': 'string',
'FleetArn': 'string',
'FleetRoleArn': 'string',
'GameServerContainerGroupDefinitionName': 'string',
'GameServerContainerGroupDefinitionArn': 'string',
'PerInstanceContainerGroupDefinitionName': 'string',
'PerInstanceContainerGroupDefinitionArn': 'string',
'InstanceConnectionPortRange': {
'FromPort': 123,
'ToPort': 123
},
'InstanceInboundPermissions': [
{
'FromPort': 123,
'ToPort': 123,
'IpRange': 'string',
'Protocol': 'TCP'|'UDP'
},
],
'GameServerContainerGroupsPerInstance': 123,
'MaximumGameServerContainerGroupsPerInstance': 123,
'InstanceType': 'string',
'BillingType': 'ON_DEMAND'|'SPOT',
'Description': 'string',
'CreationTime': datetime(2015, 1, 1),
'MetricGroups': [
'string',
],
'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
'GameSessionCreationLimitPolicy': {
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'DeploymentDetails': {
'LatestDeploymentId': 'string'
},
'LogConfiguration': {
'LogDestination': 'NONE'|'CLOUDWATCH'|'S3',
'S3BucketName': 'string',
'LogGroupArn': 'string'
},
'LocationAttributes': [
{
'Location': 'string',
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
],
'PlayerGatewayMode': 'DISABLED'|'ENABLED'|'REQUIRED'
}
}
Response Structure
(dict) --
ContainerFleet (dict) --
The properties for the new container fleet, including current status. All fleets are initially placed in PENDING status.
FleetId (string) --
A unique identifier for the container fleet to retrieve.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift fleet ARN, the resource ID matches the FleetId value.
FleetRoleArn (string) --
The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. See Set up an IAM service role. This fleet property can't be changed.
GameServerContainerGroupDefinitionName (string) --
The name of the fleet's game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.
GameServerContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's game server container group. The ARN value also identifies the specific container group definition version in use.
PerInstanceContainerGroupDefinitionName (string) --
The name of the fleet's per-instance container group definition.
PerInstanceContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's per-instance container group. The ARN value also identifies the specific container group definition version in use.
InstanceConnectionPortRange (dict) --
The set of port numbers to open on each instance in a container fleet. Connection ports are used by inbound traffic to connect with processes that are running in containers on the fleet.
FromPort (integer) --
Starting value for the port range.
ToPort (integer) --
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
InstanceInboundPermissions (list) --
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) --
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) --
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) --
A 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) --
The network communication protocol used by the fleet.
GameServerContainerGroupsPerInstance (integer) --
The number of times to replicate the game server container group on each fleet instance.
MaximumGameServerContainerGroupsPerInstance (integer) --
The calculated maximum number of game server container group that can be deployed on each fleet instance. The calculation depends on the resource needs of the container group and the CPU and memory resources of the fleet's instance type.
InstanceType (string) --
The Amazon EC2 instance type to use for all instances in the fleet. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity. You can't update this fleet property.
BillingType (string) --
Indicates whether the fleet uses On-Demand or Spot instances for this fleet. Learn more about when to use On-Demand versus Spot Instances. You can't update this fleet property.
By default, this property is set to ON_DEMAND.
Description (string) --
A meaningful description of the container fleet.
CreationTime (datetime) --
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
MetricGroups (list) --
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. Metric groups aggregate metrics for multiple fleets.
(string) --
NewGameSessionProtectionPolicy (string) --
Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using UpdateGameSession.
NoProtection -- Game sessions can be shut down during active gameplay.
FullProtection -- Game sessions in ACTIVE status can't be shut down.
GameSessionCreationLimitPolicy (dict) --
A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
Status (string) --
The current status of the container fleet.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
DeploymentDetails (dict) --
Information about the most recent deployment for the container fleet.
LatestDeploymentId (string) --
A unique identifier for a fleet deployment.
LogConfiguration (dict) --
The method that is used to collect container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs.
CLOUDWATCH -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define.
NONE -- Don't collect container logs.
LogDestination (string) --
The type of log collection to use for a fleet.
CLOUDWATCH -- (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define. This bucket must reside in the fleet's home Amazon Web Services Region.
NONE -- Don't collect container logs.
S3BucketName (string) --
If log destination is S3, logs are sent to the specified Amazon S3 bucket name.
LogGroupArn (string) --
If log destination is CLOUDWATCH, logs are sent to the specified log group in Amazon CloudWatch.
LocationAttributes (list) --
Information about the container fleet's remote locations where fleet instances are deployed.
(dict) --
Details about a location in a multi-location container fleet.
Location (string) --
A location identifier.
Status (string) --
The status of fleet activity in the location.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this container fleet. Note, even if a container fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this container fleet location.
DISABLED -- Player gateway is not available for this container fleet location.
PlayerGatewayMode (string) --
Indicates whether player gateway is enabled for this container fleet. Player gateway provides benefits such as DDoS protection with negligible impact to latency.
If ENABLED or REQUIRED, game clients can use player gateway to connect with the game server. If DISABLED, game clients cannot use player gateway. Instead, they have to directly connect to the game server.
{'PlayerGatewayConfiguration': {'GameServerIpProtocolSupported': 'IPv4 | '
'DUAL_STACK'},
'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'}
Response {'FleetAttributes': {'PlayerGatewayConfiguration': {'GameServerIpProtocolSupported': 'IPv4 '
'| '
'DUAL_STACK'},
'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'},
'LocationStates': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Creates a fleet of compute resources to host your game servers. Use this operation to set up a fleet for the following compute types:
Managed EC2 fleet
An EC2 fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances. Your game server build is deployed to each fleet instance. Amazon GameLift Servers manages the fleet's instances and controls the lifecycle of game server processes, which host game sessions for players. EC2 fleets can have instances in multiple locations. Each instance in the fleet is designated a Compute.
To create an EC2 fleet, provide these required parameters:
Either BuildId or ScriptId
ComputeType set to EC2 (the default value)
EC2InboundPermissions
EC2InstanceType
FleetType
Name
RuntimeConfiguration with at least one ServerProcesses configuration
If successful, this operation creates a new fleet resource and places it in NEW status while Amazon GameLift Servers initiates the fleet creation workflow. To debug your fleet, fetch logs, view performance metrics or other actions on the fleet, create a development fleet with port 22/3389 open. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished.
When the fleet status is ACTIVE, you can adjust capacity settings and turn autoscaling on/off for each location.
Anywhere fleet
An Anywhere fleet represents compute resources that are not owned or managed by Amazon GameLift Servers. You might create an Anywhere fleet with your local machine for testing, or use one to host game servers with on-premises hardware or other game hosting solutions.
To create an Anywhere fleet, provide these required parameters:
ComputeType set to ANYWHERE
Locations specifying a custom location
Name
If successful, this operation creates a new fleet resource and places it in ACTIVE status. You can register computes with a fleet in ACTIVE status.
Learn more
See also: AWS API Documentation
Request Syntax
client.create_fleet(
Name='string',
Description='string',
BuildId='string',
ScriptId='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'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'r7g.medium'|'r7g.large'|'r7g.xlarge'|'r7g.2xlarge'|'r7g.4xlarge'|'r7g.8xlarge'|'r7g.12xlarge'|'r7g.16xlarge'|'m7g.medium'|'m7g.large'|'m7g.xlarge'|'m7g.2xlarge'|'m7g.4xlarge'|'m7g.8xlarge'|'m7g.12xlarge'|'m7g.16xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6in.large'|'c6in.xlarge'|'c6in.2xlarge'|'c6in.4xlarge'|'c6in.8xlarge'|'c6in.12xlarge'|'c6in.16xlarge'|'c7a.medium'|'c7a.large'|'c7a.xlarge'|'c7a.2xlarge'|'c7a.4xlarge'|'c7a.8xlarge'|'c7a.12xlarge'|'c7a.16xlarge'|'c7gd.medium'|'c7gd.large'|'c7gd.xlarge'|'c7gd.2xlarge'|'c7gd.4xlarge'|'c7gd.8xlarge'|'c7gd.12xlarge'|'c7gd.16xlarge'|'c7gn.medium'|'c7gn.large'|'c7gn.xlarge'|'c7gn.2xlarge'|'c7gn.4xlarge'|'c7gn.8xlarge'|'c7gn.12xlarge'|'c7gn.16xlarge'|'c7i.large'|'c7i.xlarge'|'c7i.2xlarge'|'c7i.4xlarge'|'c7i.8xlarge'|'c7i.12xlarge'|'c7i.16xlarge'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m7a.medium'|'m7a.large'|'m7a.xlarge'|'m7a.2xlarge'|'m7a.4xlarge'|'m7a.8xlarge'|'m7a.12xlarge'|'m7a.16xlarge'|'m7gd.medium'|'m7gd.large'|'m7gd.xlarge'|'m7gd.2xlarge'|'m7gd.4xlarge'|'m7gd.8xlarge'|'m7gd.12xlarge'|'m7gd.16xlarge'|'m7i.large'|'m7i.xlarge'|'m7i.2xlarge'|'m7i.4xlarge'|'m7i.8xlarge'|'m7i.12xlarge'|'m7i.16xlarge'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r7a.medium'|'r7a.large'|'r7a.xlarge'|'r7a.2xlarge'|'r7a.4xlarge'|'r7a.8xlarge'|'r7a.12xlarge'|'r7a.16xlarge'|'r7gd.medium'|'r7gd.large'|'r7gd.xlarge'|'r7gd.2xlarge'|'r7gd.4xlarge'|'r7gd.8xlarge'|'r7gd.12xlarge'|'r7gd.16xlarge'|'r7i.large'|'r7i.xlarge'|'r7i.2xlarge'|'r7i.4xlarge'|'r7i.8xlarge'|'r7i.12xlarge'|'r7i.16xlarge'|'r7i.24xlarge'|'r7i.48xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'c6id.large'|'c6id.xlarge'|'c6id.2xlarge'|'c6id.4xlarge'|'c6id.8xlarge'|'c6id.12xlarge'|'c6id.16xlarge'|'c6id.24xlarge'|'c6id.32xlarge'|'c8g.medium'|'c8g.large'|'c8g.xlarge'|'c8g.2xlarge'|'c8g.4xlarge'|'c8g.8xlarge'|'c8g.12xlarge'|'c8g.16xlarge'|'c8g.24xlarge'|'c8g.48xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m6id.large'|'m6id.xlarge'|'m6id.2xlarge'|'m6id.4xlarge'|'m6id.8xlarge'|'m6id.12xlarge'|'m6id.16xlarge'|'m6id.24xlarge'|'m6id.32xlarge'|'m6idn.large'|'m6idn.xlarge'|'m6idn.2xlarge'|'m6idn.4xlarge'|'m6idn.8xlarge'|'m6idn.12xlarge'|'m6idn.16xlarge'|'m6idn.24xlarge'|'m6idn.32xlarge'|'m6in.large'|'m6in.xlarge'|'m6in.2xlarge'|'m6in.4xlarge'|'m6in.8xlarge'|'m6in.12xlarge'|'m6in.16xlarge'|'m6in.24xlarge'|'m6in.32xlarge'|'m8g.medium'|'m8g.large'|'m8g.xlarge'|'m8g.2xlarge'|'m8g.4xlarge'|'m8g.8xlarge'|'m8g.12xlarge'|'m8g.16xlarge'|'m8g.24xlarge'|'m8g.48xlarge'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r6a.large'|'r6a.xlarge'|'r6a.2xlarge'|'r6a.4xlarge'|'r6a.8xlarge'|'r6a.12xlarge'|'r6a.16xlarge'|'r6a.24xlarge'|'r6a.32xlarge'|'r6a.48xlarge'|'r6id.large'|'r6id.xlarge'|'r6id.2xlarge'|'r6id.4xlarge'|'r6id.8xlarge'|'r6id.12xlarge'|'r6id.16xlarge'|'r6id.24xlarge'|'r6id.32xlarge'|'r6idn.large'|'r6idn.xlarge'|'r6idn.2xlarge'|'r6idn.4xlarge'|'r6idn.8xlarge'|'r6idn.12xlarge'|'r6idn.16xlarge'|'r6idn.24xlarge'|'r6idn.32xlarge'|'r6in.large'|'r6in.xlarge'|'r6in.2xlarge'|'r6in.4xlarge'|'r6in.8xlarge'|'r6in.12xlarge'|'r6in.16xlarge'|'r6in.24xlarge'|'r6in.32xlarge'|'r8g.medium'|'r8g.large'|'r8g.xlarge'|'r8g.2xlarge'|'r8g.4xlarge'|'r8g.8xlarge'|'r8g.12xlarge'|'r8g.16xlarge'|'r8g.24xlarge'|'r8g.48xlarge'|'m4.16xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6i.32xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'c6in.24xlarge'|'c6in.32xlarge'|'c7a.24xlarge'|'c7a.32xlarge'|'c7a.48xlarge'|'c7i.24xlarge'|'c7i.48xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m7a.24xlarge'|'m7a.32xlarge'|'m7a.48xlarge'|'m7i.24xlarge'|'m7i.48xlarge'|'r7a.24xlarge'|'r7a.32xlarge'|'r7a.48xlarge',
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',
FleetType='ON_DEMAND'|'SPOT',
InstanceRoleArn='string',
CertificateConfiguration={
'CertificateType': 'DISABLED'|'GENERATED'
},
Locations=[
{
'Location': 'string'
},
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ComputeType='EC2'|'ANYWHERE',
AnywhereConfiguration={
'Cost': 'string'
},
InstanceRoleCredentialsProvider='SHARED_CREDENTIAL_FILE',
PlayerGatewayMode='DISABLED'|'ENABLED'|'REQUIRED',
PlayerGatewayConfiguration={
'GameServerIpProtocolSupported': 'IPv4'|'DUAL_STACK'
}
)
string
[REQUIRED]
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
string
A description for the fleet.
string
The unique identifier for a custom game server build to be deployed to a fleet with compute type EC2. You can use either the build ID or ARN. The build must be uploaded to Amazon GameLift Servers and in READY status. This fleet property can't be changed after the fleet is created.
string
The unique identifier for a Realtime configuration script to be deployed to a fleet with compute type EC2. You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift Servers prior to creating the fleet. This fleet property can't be changed after the fleet is created.
string
This parameter is no longer used. Specify a server launch path using the RuntimeConfiguration parameter. Requests that use this parameter instead continue to be valid.
string
This parameter is no longer used. Specify server launch parameters using the RuntimeConfiguration parameter. Requests that use this parameter instead continue to be valid.
list
This parameter is no longer used. To specify where Amazon GameLift Servers should store log files once a server process shuts down, use the Amazon GameLift Servers server API ProcessReady() and specify one or more directory paths in logParameters. For more information, see Initialize the server process in the Amazon GameLift Servers Developer Guide.
(string) --
string
The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 fleets. Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions of Amazon EC2 instance types.
list
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. Set this parameter for managed EC2 fleets. You can leave this parameter empty when creating the fleet, but you must call https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings to set it before players can connect to game sessions. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished. For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically sets TCP and UDP ranges.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) -- [REQUIRED]
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) -- [REQUIRED]
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) -- [REQUIRED]
A 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]
The network communication protocol used by the fleet.
string
The status of termination protection for active game sessions on the fleet. By default, this property is set to NoProtection. You can also set game session protection for an individual game session by calling UpdateGameSession.
NoProtection - Game sessions can be terminated during active gameplay as a result of a scale-down event.
FullProtection - Game sessions in ACTIVE status cannot be terminated during a scale-down event.
dict
Instructions for how to launch and run server processes on the fleet. Set runtime configuration for managed EC2 fleets. For an Anywhere fleets, set this parameter only if the fleet is running the Amazon GameLift Servers Agent. The runtime configuration defines one or more server process configurations. Each server process identifies a game executable or Realtime script file and the number of processes to run concurrently.
ServerProcesses (list) --
A collection of server process configurations that identify what server processes to run on fleet computes.
(dict) --
A set of instructions for launching server processes on fleet computes. Server processes run either an executable in a custom game build or a Amazon GameLift Servers Realtime script. Server process configurations are part of a fleet's runtime configuration.
LaunchPath (string) -- [REQUIRED]
The location of a game build executable or Realtime script. Game builds and Realtime scripts are installed on instances at the root:
Windows (custom game builds only): C:\game. Example: " C:\game\MyGame\server.exe"
Linux: /local/game. Examples: " /local/game/MyGame/server.exe" or " /local/game/MyRealtimeScript.js"
Parameters (string) --
An optional list of parameters to pass to the server executable or Realtime script on launch.
ConcurrentExecutions (integer) -- [REQUIRED]
The number of server processes using this configuration that run concurrently on each instance or compute.
MaxConcurrentGameSessionActivations (integer) --
The number of game sessions in status ACTIVATING to allow on an instance or compute. This setting limits the instance resources that can be used for new game activations at any one time.
GameSessionActivationTimeoutSeconds (integer) --
The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host players. During this time, the game session is in status ACTIVATING. If the game session does not become active before the timeout, it is ended and the game session status is changed to TERMINATED.
dict
A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
list
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. A metric group is used to aggregate the metrics for multiple fleets. You can specify an existing metric group name or set a new name to create a new metric group. A fleet can be included in only one metric group at a time.
(string) --
string
Used when peering your Amazon GameLift Servers fleet with a VPC, the unique identifier for the Amazon Web Services account that owns the VPC. You can find your account ID in the Amazon Web Services Management Console under account settings.
string
A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Servers Fleets.
string
Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to ON_DEMAND. Learn more about when to use On-Demand versus Spot Instances. This fleet property can't be changed after the fleet is created.
string
A unique identifier for an IAM role that manages access to your Amazon Web Services services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN by using the IAM dashboard in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server. This fleet property can't be changed after the fleet is created.
dict
Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. Amazon GameLift Servers uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift Servers. By default, the CertificateConfiguration is DISABLED. You can't change this property after you create the fleet.
Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition.
CertificateType (string) -- [REQUIRED]
Indicates whether a TLS/SSL certificate is generated for a fleet.
Valid values include:
GENERATED - Generate a TLS/SSL certificate for this fleet.
DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.
list
A set of remote locations to deploy additional instances to and manage as a multi-location fleet. Use this parameter when creating a fleet in Amazon Web Services Regions that support multiple locations. You can add any Amazon Web Services Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more Amazon Web Services Region codes, such as us-west-2, or Local Zone names. When using this parameter, Amazon GameLift Servers requires you to include your home location in the request. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.
(dict) --
A remote location where a multi-location fleet can deploy game servers for game hosting.
Location (string) -- [REQUIRED]
An Amazon Web Services Region code, such as us-west-2. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.
list
A list of labels to assign to the new fleet resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.
(dict) --
A label that you can assign to a Amazon GameLift Servers resource.
Learn more
Tagging Amazon Web Services Resources in the Amazon Web Services General Reference
Amazon Web Services Tagging Strategies
Related actions
Key (string) -- [REQUIRED]
The key for a developer-defined key value pair for tagging an Amazon Web Services resource.
Value (string) -- [REQUIRED]
The value for a developer-defined key value pair for tagging an Amazon Web Services resource.
string
The type of compute resource used to host your game servers.
EC2 – The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting.
ANYWHERE – Game servers and supporting software are deployed to compute resources that you provide and manage. With this compute type, you can also set the AnywhereConfiguration parameter.
dict
Amazon GameLift Servers Anywhere configuration options.
Cost (string) -- [REQUIRED]
The cost to run your fleet per hour. Amazon GameLift Servers uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Servers Developer Guide.
string
Prompts Amazon GameLift Servers to generate a shared credentials file for the IAM role that's defined in InstanceRoleArn. The shared credentials file is stored on each fleet instance and refreshed as needed. Use shared credentials for applications that are deployed along with the game server executable, if the game server is integrated with server SDK version 5.x. For more information about using shared credentials, see Communicate with other Amazon Web Services resources from your fleets.
string
Configures player gateway for your fleet. Player gateway provides benefits such as DDoS protection by rate limiting and validating traffic before it reaches game servers, hiding game server IP addresses from players, and providing updated endpoints when relay endpoints become unhealthy. Note, player gateway is only available for fleets using server SDK 5.x or later game server builds.
How it works: When enabled, game clients connect to relay endpoints instead of to your game servers. Player gateway validates player gateway tokens and routes traffic to the appropriate game server. Your game backend calls GetPlayerConnectionDetails to retrieve relay endpoints and player gateway tokens for your game clients. To learn more about this topic, see DDoS protection with Amazon GameLift Servers player gateway.
Possible values include:
DISABLED (default) -- Game clients connect to the game server endpoint. Use this when you do not intend to integrate your game with player gateway.
ENABLED -- Player gateway is available in fleet locations where it is supported. Your game backend can call GetPlayerConnectionDetails to obtain a player gateway token and endpoints for game clients.
REQUIRED -- Player gateway is available in fleet locations where it is supported, and the fleet can only use locations that support this feature. Attempting to add a remote location to your fleet which does not support player gateway will result in an InvalidRequestException.
dict
Configuration settings for player gateway. Use this to specify advanced options for how player gateway handles connections.
GameServerIpProtocolSupported (string) --
The IP protocol that your game servers support for player connections through player gateway. If the value is set to IPv4, GameLift will install and execute a lightweight IP translation software on fleet instances to receive and transform incoming IPv6 traffic to IPv4. If the value is set to DUAL_STACK, the lightweight IP translation software will not be installed on fleet instances. DUAL_STACK provides slightly better performance than IPv4.
dict
Response Syntax
{
'FleetAttributes': {
'FleetId': 'string',
'FleetArn': 'string',
'FleetType': 'ON_DEMAND'|'SPOT',
'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'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'r7g.medium'|'r7g.large'|'r7g.xlarge'|'r7g.2xlarge'|'r7g.4xlarge'|'r7g.8xlarge'|'r7g.12xlarge'|'r7g.16xlarge'|'m7g.medium'|'m7g.large'|'m7g.xlarge'|'m7g.2xlarge'|'m7g.4xlarge'|'m7g.8xlarge'|'m7g.12xlarge'|'m7g.16xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6in.large'|'c6in.xlarge'|'c6in.2xlarge'|'c6in.4xlarge'|'c6in.8xlarge'|'c6in.12xlarge'|'c6in.16xlarge'|'c7a.medium'|'c7a.large'|'c7a.xlarge'|'c7a.2xlarge'|'c7a.4xlarge'|'c7a.8xlarge'|'c7a.12xlarge'|'c7a.16xlarge'|'c7gd.medium'|'c7gd.large'|'c7gd.xlarge'|'c7gd.2xlarge'|'c7gd.4xlarge'|'c7gd.8xlarge'|'c7gd.12xlarge'|'c7gd.16xlarge'|'c7gn.medium'|'c7gn.large'|'c7gn.xlarge'|'c7gn.2xlarge'|'c7gn.4xlarge'|'c7gn.8xlarge'|'c7gn.12xlarge'|'c7gn.16xlarge'|'c7i.large'|'c7i.xlarge'|'c7i.2xlarge'|'c7i.4xlarge'|'c7i.8xlarge'|'c7i.12xlarge'|'c7i.16xlarge'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m7a.medium'|'m7a.large'|'m7a.xlarge'|'m7a.2xlarge'|'m7a.4xlarge'|'m7a.8xlarge'|'m7a.12xlarge'|'m7a.16xlarge'|'m7gd.medium'|'m7gd.large'|'m7gd.xlarge'|'m7gd.2xlarge'|'m7gd.4xlarge'|'m7gd.8xlarge'|'m7gd.12xlarge'|'m7gd.16xlarge'|'m7i.large'|'m7i.xlarge'|'m7i.2xlarge'|'m7i.4xlarge'|'m7i.8xlarge'|'m7i.12xlarge'|'m7i.16xlarge'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r7a.medium'|'r7a.large'|'r7a.xlarge'|'r7a.2xlarge'|'r7a.4xlarge'|'r7a.8xlarge'|'r7a.12xlarge'|'r7a.16xlarge'|'r7gd.medium'|'r7gd.large'|'r7gd.xlarge'|'r7gd.2xlarge'|'r7gd.4xlarge'|'r7gd.8xlarge'|'r7gd.12xlarge'|'r7gd.16xlarge'|'r7i.large'|'r7i.xlarge'|'r7i.2xlarge'|'r7i.4xlarge'|'r7i.8xlarge'|'r7i.12xlarge'|'r7i.16xlarge'|'r7i.24xlarge'|'r7i.48xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'c6id.large'|'c6id.xlarge'|'c6id.2xlarge'|'c6id.4xlarge'|'c6id.8xlarge'|'c6id.12xlarge'|'c6id.16xlarge'|'c6id.24xlarge'|'c6id.32xlarge'|'c8g.medium'|'c8g.large'|'c8g.xlarge'|'c8g.2xlarge'|'c8g.4xlarge'|'c8g.8xlarge'|'c8g.12xlarge'|'c8g.16xlarge'|'c8g.24xlarge'|'c8g.48xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m6id.large'|'m6id.xlarge'|'m6id.2xlarge'|'m6id.4xlarge'|'m6id.8xlarge'|'m6id.12xlarge'|'m6id.16xlarge'|'m6id.24xlarge'|'m6id.32xlarge'|'m6idn.large'|'m6idn.xlarge'|'m6idn.2xlarge'|'m6idn.4xlarge'|'m6idn.8xlarge'|'m6idn.12xlarge'|'m6idn.16xlarge'|'m6idn.24xlarge'|'m6idn.32xlarge'|'m6in.large'|'m6in.xlarge'|'m6in.2xlarge'|'m6in.4xlarge'|'m6in.8xlarge'|'m6in.12xlarge'|'m6in.16xlarge'|'m6in.24xlarge'|'m6in.32xlarge'|'m8g.medium'|'m8g.large'|'m8g.xlarge'|'m8g.2xlarge'|'m8g.4xlarge'|'m8g.8xlarge'|'m8g.12xlarge'|'m8g.16xlarge'|'m8g.24xlarge'|'m8g.48xlarge'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r6a.large'|'r6a.xlarge'|'r6a.2xlarge'|'r6a.4xlarge'|'r6a.8xlarge'|'r6a.12xlarge'|'r6a.16xlarge'|'r6a.24xlarge'|'r6a.32xlarge'|'r6a.48xlarge'|'r6id.large'|'r6id.xlarge'|'r6id.2xlarge'|'r6id.4xlarge'|'r6id.8xlarge'|'r6id.12xlarge'|'r6id.16xlarge'|'r6id.24xlarge'|'r6id.32xlarge'|'r6idn.large'|'r6idn.xlarge'|'r6idn.2xlarge'|'r6idn.4xlarge'|'r6idn.8xlarge'|'r6idn.12xlarge'|'r6idn.16xlarge'|'r6idn.24xlarge'|'r6idn.32xlarge'|'r6in.large'|'r6in.xlarge'|'r6in.2xlarge'|'r6in.4xlarge'|'r6in.8xlarge'|'r6in.12xlarge'|'r6in.16xlarge'|'r6in.24xlarge'|'r6in.32xlarge'|'r8g.medium'|'r8g.large'|'r8g.xlarge'|'r8g.2xlarge'|'r8g.4xlarge'|'r8g.8xlarge'|'r8g.12xlarge'|'r8g.16xlarge'|'r8g.24xlarge'|'r8g.48xlarge'|'m4.16xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6i.32xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'c6in.24xlarge'|'c6in.32xlarge'|'c7a.24xlarge'|'c7a.32xlarge'|'c7a.48xlarge'|'c7i.24xlarge'|'c7i.48xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m7a.24xlarge'|'m7a.32xlarge'|'m7a.48xlarge'|'m7i.24xlarge'|'m7i.48xlarge'|'r7a.24xlarge'|'r7a.32xlarge'|'r7a.48xlarge',
'Description': 'string',
'Name': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
'BuildId': 'string',
'BuildArn': 'string',
'ScriptId': 'string',
'ScriptArn': 'string',
'ServerLaunchPath': 'string',
'ServerLaunchParameters': 'string',
'LogPaths': [
'string',
],
'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'WINDOWS_2016'|'AMAZON_LINUX_2023'|'WINDOWS_2022',
'ResourceCreationLimitPolicy': {
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
'MetricGroups': [
'string',
],
'StoppedActions': [
'AUTO_SCALING',
],
'InstanceRoleArn': 'string',
'CertificateConfiguration': {
'CertificateType': 'DISABLED'|'GENERATED'
},
'ComputeType': 'EC2'|'ANYWHERE',
'AnywhereConfiguration': {
'Cost': 'string'
},
'InstanceRoleCredentialsProvider': 'SHARED_CREDENTIAL_FILE',
'PlayerGatewayMode': 'DISABLED'|'ENABLED'|'REQUIRED',
'PlayerGatewayConfiguration': {
'GameServerIpProtocolSupported': 'IPv4'|'DUAL_STACK'
}
},
'LocationStates': [
{
'Location': 'string',
'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
]
}
Response Structure
(dict) --
FleetAttributes (dict) --
The properties for the new fleet, including the current status. All fleets are placed in NEW status on creation.
FleetId (string) --
A unique identifier for the fleet.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift fleet ARN, the resource ID matches the FleetId value.
FleetType (string) --
Indicates whether the fleet uses On-Demand or Spot instances. For more information, see On-Demand versus Spot Instances. This fleet property can't be changed after the fleet is created.
InstanceType (string) --
The Amazon EC2 instance type that the fleet uses. Instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions. This attribute is used with fleets where ComputeType is EC2.
Description (string) --
A human-readable description of the fleet.
Name (string) --
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
CreationTime (datetime) --
A 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) --
A 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 resource has been defined and Amazon GameLift Servers has started creating the fleet. Desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING -- Amazon GameLift Servers is download the game server build, running install scripts, and then validating the build files. When complete, Amazon GameLift Servers launches a fleet instance.
ACTIVATING -- Amazon GameLift Servers is launching a game server process and testing its connectivity with the Amazon GameLift Servers service.
ACTIVE -- The fleet is now ready to host 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) --
A unique identifier for the build resource that is deployed on instances in this fleet. This attribute is used with fleets where ComputeType is "EC2".
BuildArn (string) --
The Amazon Resource Name ( ARN) associated with the Amazon GameLift Servers build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the BuildId value. This attribute is used with fleets where ComputeType is "EC2".
ScriptId (string) --
A unique identifier for the Realtime script resource that is deployed on instances in this fleet. This attribute is used with fleets where ComputeType is "EC2".
ScriptArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift script resource that is deployed on instances in this fleet. In a GameLift script ARN, the resource ID matches the ScriptId value.
ServerLaunchPath (string) --
This parameter is no longer used. Server launch paths are now defined using the fleet's RuntimeConfiguration. Requests that use this parameter continue to be valid.
ServerLaunchParameters (string) --
This parameter is no longer used. Server launch parameters are now defined using the fleet's runtime configuration. Requests that use this parameter continue to be valid.
LogPaths (list) --
This parameter is no longer used. Game session log paths are now defined using the Amazon GameLift Servers server API ProcessReady() logParameters. See more information in the Server API Reference.
(string) --
NewGameSessionProtectionPolicy (string) --
The type of game session protection to set on all new instances that are started in the fleet. This attribute is used with fleets where ComputeType is EC2.
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) --
The operating system of the fleet's computing resources. A fleet's operating system is determined by the OS of the build or script that is deployed on this fleet. This attribute is used with fleets where ComputeType is EC2.
ResourceCreationLimitPolicy (dict) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
MetricGroups (list) --
Name of a metric group that metrics for this fleet are added to. In Amazon CloudWatch, you can view aggregated metrics for fleets that are in a metric group. A fleet can be included in only one metric group at a time. This attribute is used with fleets where ComputeType is EC2.
(string) --
StoppedActions (list) --
A list of fleet activity that has been suspended using StopFleetActions. This includes fleet auto-scaling. This attribute is used with fleets where ComputeType is EC2.
(string) --
InstanceRoleArn (string) --
A unique identifier for an IAM role that manages access to your Amazon Web Services services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN by using the IAM dashboard in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server. This attribute is used with fleets where ComputeType is EC2.
CertificateConfiguration (dict) --
Determines whether a TLS/SSL certificate is generated for a fleet. This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate.
CertificateType (string) --
Indicates whether a TLS/SSL certificate is generated for a fleet.
Valid values include:
GENERATED - Generate a TLS/SSL certificate for this fleet.
DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.
ComputeType (string) --
The type of compute resource used to host your game servers. You can use your own compute resources with Amazon GameLift Servers Anywhere or use Amazon EC2 instances with managed Amazon GameLift Servers.
AnywhereConfiguration (dict) --
A set of attributes that are specific to an Anywhere fleet.
Cost (string) --
The cost to run your fleet per hour. Amazon GameLift Servers uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Servers Developer Guide.
InstanceRoleCredentialsProvider (string) --
Indicates that fleet instances maintain a shared credentials file for the IAM role defined in InstanceRoleArn. Shared credentials allow applications that are deployed with the game server executable to communicate with other Amazon Web Services resources. This property is used only when the game server is integrated with the server SDK version 5.x. For more information about using shared credentials, see Communicate with other Amazon Web Services resources from your fleets. This attribute is used with fleets where ComputeType is EC2.
PlayerGatewayMode (string) --
Indicates whether player gateway is enabled for this fleet. Player gateway provides benefits such as DDoS protection with negligible impact to latency.
If ENABLED or REQUIRED, game clients can use player gateway to connect with the game server. If DISABLED, game clients cannot use player gateway. Instead, they have to directly connect to the game server.
PlayerGatewayConfiguration (dict) --
Configuration settings for player gateway on this fleet.
GameServerIpProtocolSupported (string) --
The IP protocol that your game servers support for player connections through player gateway. If the value is set to IPv4, GameLift will install and execute a lightweight IP translation software on fleet instances to receive and transform incoming IPv6 traffic to IPv4. If the value is set to DUAL_STACK, the lightweight IP translation software will not be installed on fleet instances. DUAL_STACK provides slightly better performance than IPv4.
LocationStates (list) --
The fleet's locations and life-cycle status of each location. For new fleets, the status of all locations is set to NEW. During fleet creation, Amazon GameLift Servers updates each location status as instances are deployed there and prepared for game hosting. This list includes an entry for the fleet's home Region. For fleets with no remote locations, only one entry, representing the home Region, is returned.
(dict) --
A fleet location and its life-cycle state. A location state object might be used to describe a fleet's remote location or home Region. Life-cycle state tracks the progress of launching the first instance in a new location and preparing it for game hosting, and then removing all instances and deleting the location from the fleet.
NEW -- A new fleet location has been defined and desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- Amazon GameLift Servers is setting up the new fleet location, creating new instances with the game build or Realtime script and starting server processes.
ACTIVE -- Hosts can now accept game sessions.
ERROR -- An error occurred when downloading, validating, building, or activating the fleet location.
DELETING -- Hosts are responding to a delete fleet location request.
TERMINATED -- The fleet location no longer exists.
NOT_FOUND -- The fleet location was not found. This could be because the custom location was removed or not created.
Location (string) --
The fleet location, expressed as an Amazon Web Services Region code such as us-west-2.
Status (string) --
The life-cycle status of a fleet location.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this fleet. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this fleet location.
DISABLED -- Player gateway is not available for this fleet location.
{'LocationStates': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Container
Adds remote locations to an EC2 and begins populating the new locations with instances. The new instances conform to the fleet's instance type, auto-scaling, and other configuration settings.
To add fleet locations, specify the fleet to be updated and provide a list of one or more locations.
If successful, this operation returns the list of added locations with their status set to NEW. Amazon GameLift Servers initiates the process of starting an instance in each added location. You can track the status of each new location by monitoring location creation events using DescribeFleetEvents.
Learn more
Amazon GameLift Servers service locations for managed hosting.
See also: AWS API Documentation
Request Syntax
client.create_fleet_locations(
FleetId='string',
Locations=[
{
'Location': 'string'
},
]
)
string
[REQUIRED]
A unique identifier for the fleet to add locations to. You can use either the fleet ID or ARN value.
list
[REQUIRED]
A list of locations to deploy additional instances to and manage as part of the fleet. You can add any Amazon GameLift Servers-supported Amazon Web Services Region as a remote location, in the form of an Amazon Web Services Region code such as us-west-2.
(dict) --
A remote location where a multi-location fleet can deploy game servers for game hosting.
Location (string) -- [REQUIRED]
An Amazon Web Services Region code, such as us-west-2. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.
dict
Response Syntax
{
'FleetId': 'string',
'FleetArn': 'string',
'LocationStates': [
{
'Location': 'string',
'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
]
}
Response Structure
(dict) --
FleetId (string) --
A unique identifier for the fleet that was updated with new locations.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.
LocationStates (list) --
The remote locations that are being added to the fleet, and the life-cycle status of each location. For new locations, the status is set to NEW. During location creation, Amazon GameLift Servers updates each location's status as instances are deployed there and prepared for game hosting. This list does not include the fleet home Region or any remote locations that were already added to the fleet.
(dict) --
A fleet location and its life-cycle state. A location state object might be used to describe a fleet's remote location or home Region. Life-cycle state tracks the progress of launching the first instance in a new location and preparing it for game hosting, and then removing all instances and deleting the location from the fleet.
NEW -- A new fleet location has been defined and desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- Amazon GameLift Servers is setting up the new fleet location, creating new instances with the game build or Realtime script and starting server processes.
ACTIVE -- Hosts can now accept game sessions.
ERROR -- An error occurred when downloading, validating, building, or activating the fleet location.
DELETING -- Hosts are responding to a delete fleet location request.
TERMINATED -- The fleet location no longer exists.
NOT_FOUND -- The fleet location was not found. This could be because the custom location was removed or not created.
Location (string) --
The fleet location, expressed as an Amazon Web Services Region code such as us-west-2.
Status (string) --
The life-cycle status of a fleet location.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this fleet. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this fleet location.
DISABLED -- Player gateway is not available for this fleet location.
{'GameSession': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Creates a multiplayer game session for players in a specific fleet location. This operation prompts an available server process to start a game session and retrieves connection information for the new game session. As an alternative, consider using the Amazon GameLift Servers game session placement feature with StartGameSessionPlacement, which uses the FleetIQ algorithm and queues to optimize the placement process.
When creating a game session, you specify exactly where you want to place it and provide a set of game session configuration settings. The target fleet must be in ACTIVE status.
You can use this operation in the following ways:
To create a game session on an instance in a fleet's home Region, provide a fleet or alias ID along with your game session configuration.
To create a game session on an instance in a fleet's remote location, provide a fleet or alias ID and a location name, along with your game session configuration.
To create a game session on an instance in an Anywhere fleet, specify the fleet's custom location.
If successful, Amazon GameLift Servers initiates a workflow to start a new game session and returns a GameSession object containing the game session configuration and status. When the game session status is ACTIVE, it is updated with connection information and you can create player sessions for the game session. By default, newly created game sessions are open to new players. You can restrict new player access by using UpdateGameSession to change the game session's player session creation policy.
Amazon GameLift Servers retains logs for active for 14 days. To access the logs, call GetGameSessionLogUrl to download the log files.
Available in Amazon GameLift Servers Local.
Learn more
See also: AWS API Documentation
Request Syntax
client.create_game_session(
FleetId='string',
AliasId='string',
MaximumPlayerSessionCount=123,
Name='string',
GameProperties=[
{
'Key': 'string',
'Value': 'string'
},
],
CreatorId='string',
GameSessionId='string',
IdempotencyToken='string',
GameSessionData='string',
Location='string'
)
string
A unique identifier for the fleet to create a game session in. You can use either the fleet ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.
string
A unique identifier for the alias associated with the fleet to create a game session in. You can use either the alias ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.
integer
[REQUIRED]
The maximum number of players that can be connected simultaneously to the game session.
string
A descriptive label that is associated with a game session. Session names do not need to be unique.
list
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}. For an example, see Create a game session with custom properties.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) -- [REQUIRED]
The game property identifier.
Value (string) -- [REQUIRED]
The game property value.
string
A unique identifier for a player or entity creating the game session.
If you add a resource creation limit policy to a fleet, the CreateGameSession operation requires a CreatorId. Amazon GameLift Servers limits the number of game session creation requests with the same CreatorId in a specified time period.
If you your fleet doesn't have a resource creation limit policy and you provide a CreatorId in your CreateGameSession requests, Amazon GameLift Servers limits requests to one request per CreatorId per second.
To not limit CreateGameSession requests with the same CreatorId, don't provide a CreatorId in your CreateGameSession request.
string
This parameter is deprecated. Use IdempotencyToken instead.
Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID.
string
Custom string that uniquely identifies the new game session request. This is useful for ensuring that game session requests with the same idempotency token are processed only once. Subsequent requests with the same string return the original GameSession object, with an updated status. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>. Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained for this time period and then deleted.
string
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
string
A fleet's remote location to place the new game session in. If this parameter is not set, the new game session is placed in the fleet's home Region. Specify a remote location with an Amazon Web Services Region code such as us-west-2. When using an Anywhere fleet, this parameter is required and must be set to the Anywhere fleet's custom location.
dict
Response Syntax
{
'GameSession': {
'GameSessionId': 'string',
'Name': 'string',
'FleetId': 'string',
'FleetArn': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'CurrentPlayerSessionCount': 123,
'MaximumPlayerSessionCount': 123,
'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
'StatusReason': 'INTERRUPTED'|'TRIGGERED_ON_PROCESS_TERMINATE'|'FORCE_TERMINATED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
'CreatorId': 'string',
'GameSessionData': 'string',
'MatchmakerData': 'string',
'Location': 'string',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
}
}
Response Structure
(dict) --
GameSession (dict) --
Object that describes the newly created game session record.
GameSessionId (string) --
A unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
Name (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
FleetId (string) --
A unique identifier for the fleet that the game session is running on.
FleetArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift fleet that this game session is running on.
CreationTime (datetime) --
A 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) --
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
CurrentPlayerSessionCount (integer) --
Number of players currently in the game session.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
Status (string) --
Current status of the game session. A game session must have an ACTIVE status to have player sessions.
StatusReason (string) --
Provides additional information about game session status.
INTERRUPTED -- The game session was hosted on an EC2 Spot instance that was reclaimed, causing the active game session to be stopped.
TRIGGERED_ON_PROCESS_TERMINATE – The game session was stopped by calling TerminateGameSession with the termination mode TRIGGER_ON_PROCESS_TERMINATE.
FORCE_TERMINATED – The game session was stopped by calling TerminateGameSession with the termination mode FORCE_TERMINATE.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
PlayerSessionCreationPolicy (string) --
Indicates whether the game session is accepting new players.
CreatorId (string) --
A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill).
Location (string) --
The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such as us-west-2.
PlayerGatewayStatus (string) --
Indicates whether player gateway is available for use for this game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for routing player connections for this game session.
DISABLED -- Player gateway is not available for this game session.
{'LocationStates': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Container
Removes locations from a multi-location fleet. When deleting a location, all game server process and all instances that are still active in the location are shut down.
To delete fleet locations, identify the fleet ID and provide a list of the locations to be deleted.
If successful, GameLift sets the location status to DELETING, and begins to shut down existing server processes and terminate instances in each location being deleted. When completed, the location status changes to TERMINATED.
Learn more
See also: AWS API Documentation
Request Syntax
client.delete_fleet_locations(
FleetId='string',
Locations=[
'string',
]
)
string
[REQUIRED]
A unique identifier for the fleet to delete locations for. You can use either the fleet ID or ARN value.
list
[REQUIRED]
The list of fleet locations to delete. Specify locations in the form of an Amazon Web Services Region code, such as us-west-2.
(string) --
dict
Response Syntax
{
'FleetId': 'string',
'FleetArn': 'string',
'LocationStates': [
{
'Location': 'string',
'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
]
}
Response Structure
(dict) --
FleetId (string) --
A unique identifier for the fleet that location attributes are being deleted for.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.
LocationStates (list) --
The remote locations that are being deleted, with each location status set to DELETING.
(dict) --
A fleet location and its life-cycle state. A location state object might be used to describe a fleet's remote location or home Region. Life-cycle state tracks the progress of launching the first instance in a new location and preparing it for game hosting, and then removing all instances and deleting the location from the fleet.
NEW -- A new fleet location has been defined and desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- Amazon GameLift Servers is setting up the new fleet location, creating new instances with the game build or Realtime script and starting server processes.
ACTIVE -- Hosts can now accept game sessions.
ERROR -- An error occurred when downloading, validating, building, or activating the fleet location.
DELETING -- Hosts are responding to a delete fleet location request.
TERMINATED -- The fleet location no longer exists.
NOT_FOUND -- The fleet location was not found. This could be because the custom location was removed or not created.
Location (string) --
The fleet location, expressed as an Amazon Web Services Region code such as us-west-2.
Status (string) --
The life-cycle status of a fleet location.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this fleet. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this fleet location.
DISABLED -- Player gateway is not available for this fleet location.
{'ContainerFleet': {'LocationAttributes': {'PlayerGatewayStatus': 'DISABLED | '
'ENABLED'},
'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'}}
This API works with the following fleet types: Container
Retrieves the properties for a container fleet. When requesting attributes for multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages.
Request options
Get container fleet properties for a single fleet. Provide either the fleet ID or ARN value.
Results
If successful, a ContainerFleet object is returned. This object includes the fleet properties, including information about the most recent deployment.
See also: AWS API Documentation
Request Syntax
client.describe_container_fleet(
FleetId='string'
)
string
[REQUIRED]
A unique identifier for the container fleet to retrieve. You can use either the fleet ID or ARN value.
dict
Response Syntax
{
'ContainerFleet': {
'FleetId': 'string',
'FleetArn': 'string',
'FleetRoleArn': 'string',
'GameServerContainerGroupDefinitionName': 'string',
'GameServerContainerGroupDefinitionArn': 'string',
'PerInstanceContainerGroupDefinitionName': 'string',
'PerInstanceContainerGroupDefinitionArn': 'string',
'InstanceConnectionPortRange': {
'FromPort': 123,
'ToPort': 123
},
'InstanceInboundPermissions': [
{
'FromPort': 123,
'ToPort': 123,
'IpRange': 'string',
'Protocol': 'TCP'|'UDP'
},
],
'GameServerContainerGroupsPerInstance': 123,
'MaximumGameServerContainerGroupsPerInstance': 123,
'InstanceType': 'string',
'BillingType': 'ON_DEMAND'|'SPOT',
'Description': 'string',
'CreationTime': datetime(2015, 1, 1),
'MetricGroups': [
'string',
],
'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
'GameSessionCreationLimitPolicy': {
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'DeploymentDetails': {
'LatestDeploymentId': 'string'
},
'LogConfiguration': {
'LogDestination': 'NONE'|'CLOUDWATCH'|'S3',
'S3BucketName': 'string',
'LogGroupArn': 'string'
},
'LocationAttributes': [
{
'Location': 'string',
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
],
'PlayerGatewayMode': 'DISABLED'|'ENABLED'|'REQUIRED'
}
}
Response Structure
(dict) --
ContainerFleet (dict) --
The properties for the requested container fleet, including current status.
FleetId (string) --
A unique identifier for the container fleet to retrieve.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift fleet ARN, the resource ID matches the FleetId value.
FleetRoleArn (string) --
The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. See Set up an IAM service role. This fleet property can't be changed.
GameServerContainerGroupDefinitionName (string) --
The name of the fleet's game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.
GameServerContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's game server container group. The ARN value also identifies the specific container group definition version in use.
PerInstanceContainerGroupDefinitionName (string) --
The name of the fleet's per-instance container group definition.
PerInstanceContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's per-instance container group. The ARN value also identifies the specific container group definition version in use.
InstanceConnectionPortRange (dict) --
The set of port numbers to open on each instance in a container fleet. Connection ports are used by inbound traffic to connect with processes that are running in containers on the fleet.
FromPort (integer) --
Starting value for the port range.
ToPort (integer) --
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
InstanceInboundPermissions (list) --
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) --
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) --
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) --
A 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) --
The network communication protocol used by the fleet.
GameServerContainerGroupsPerInstance (integer) --
The number of times to replicate the game server container group on each fleet instance.
MaximumGameServerContainerGroupsPerInstance (integer) --
The calculated maximum number of game server container group that can be deployed on each fleet instance. The calculation depends on the resource needs of the container group and the CPU and memory resources of the fleet's instance type.
InstanceType (string) --
The Amazon EC2 instance type to use for all instances in the fleet. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity. You can't update this fleet property.
BillingType (string) --
Indicates whether the fleet uses On-Demand or Spot instances for this fleet. Learn more about when to use On-Demand versus Spot Instances. You can't update this fleet property.
By default, this property is set to ON_DEMAND.
Description (string) --
A meaningful description of the container fleet.
CreationTime (datetime) --
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
MetricGroups (list) --
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. Metric groups aggregate metrics for multiple fleets.
(string) --
NewGameSessionProtectionPolicy (string) --
Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using UpdateGameSession.
NoProtection -- Game sessions can be shut down during active gameplay.
FullProtection -- Game sessions in ACTIVE status can't be shut down.
GameSessionCreationLimitPolicy (dict) --
A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
Status (string) --
The current status of the container fleet.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
DeploymentDetails (dict) --
Information about the most recent deployment for the container fleet.
LatestDeploymentId (string) --
A unique identifier for a fleet deployment.
LogConfiguration (dict) --
The method that is used to collect container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs.
CLOUDWATCH -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define.
NONE -- Don't collect container logs.
LogDestination (string) --
The type of log collection to use for a fleet.
CLOUDWATCH -- (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define. This bucket must reside in the fleet's home Amazon Web Services Region.
NONE -- Don't collect container logs.
S3BucketName (string) --
If log destination is S3, logs are sent to the specified Amazon S3 bucket name.
LogGroupArn (string) --
If log destination is CLOUDWATCH, logs are sent to the specified log group in Amazon CloudWatch.
LocationAttributes (list) --
Information about the container fleet's remote locations where fleet instances are deployed.
(dict) --
Details about a location in a multi-location container fleet.
Location (string) --
A location identifier.
Status (string) --
The status of fleet activity in the location.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this container fleet. Note, even if a container fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this container fleet location.
DISABLED -- Player gateway is not available for this container fleet location.
PlayerGatewayMode (string) --
Indicates whether player gateway is enabled for this container fleet. Player gateway provides benefits such as DDoS protection with negligible impact to latency.
If ENABLED or REQUIRED, game clients can use player gateway to connect with the game server. If DISABLED, game clients cannot use player gateway. Instead, they have to directly connect to the game server.
{'FleetAttributes': {'PlayerGatewayConfiguration': {'GameServerIpProtocolSupported': 'IPv4 '
'| '
'DUAL_STACK'},
'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'}}
This API works with the following fleet types: EC2, Anywhere
Retrieves core fleet-wide properties for fleets in an Amazon Web Services Region. Properties include the computing hardware and deployment configuration for instances in the fleet.
You can use this operation in the following ways:
To get attributes for specific fleets, provide a list of fleet IDs or fleet ARNs.
To get attributes for all fleets, do not provide a fleet identifier.
When requesting attributes for multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a FleetAttributes object is returned for each fleet requested, unless the fleet identifier is not found.
Learn more
See also: AWS API Documentation
Request Syntax
client.describe_fleet_attributes(
FleetIds=[
'string',
],
Limit=123,
NextToken='string'
)
list
A list of unique fleet identifiers to retrieve attributes for. You can use either the fleet ID or ARN value. To retrieve attributes for all current fleets, do not include this parameter.
(string) --
integer
The 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
A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. 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
{
'FleetAttributes': [
{
'FleetId': 'string',
'FleetArn': 'string',
'FleetType': 'ON_DEMAND'|'SPOT',
'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'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'r7g.medium'|'r7g.large'|'r7g.xlarge'|'r7g.2xlarge'|'r7g.4xlarge'|'r7g.8xlarge'|'r7g.12xlarge'|'r7g.16xlarge'|'m7g.medium'|'m7g.large'|'m7g.xlarge'|'m7g.2xlarge'|'m7g.4xlarge'|'m7g.8xlarge'|'m7g.12xlarge'|'m7g.16xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6in.large'|'c6in.xlarge'|'c6in.2xlarge'|'c6in.4xlarge'|'c6in.8xlarge'|'c6in.12xlarge'|'c6in.16xlarge'|'c7a.medium'|'c7a.large'|'c7a.xlarge'|'c7a.2xlarge'|'c7a.4xlarge'|'c7a.8xlarge'|'c7a.12xlarge'|'c7a.16xlarge'|'c7gd.medium'|'c7gd.large'|'c7gd.xlarge'|'c7gd.2xlarge'|'c7gd.4xlarge'|'c7gd.8xlarge'|'c7gd.12xlarge'|'c7gd.16xlarge'|'c7gn.medium'|'c7gn.large'|'c7gn.xlarge'|'c7gn.2xlarge'|'c7gn.4xlarge'|'c7gn.8xlarge'|'c7gn.12xlarge'|'c7gn.16xlarge'|'c7i.large'|'c7i.xlarge'|'c7i.2xlarge'|'c7i.4xlarge'|'c7i.8xlarge'|'c7i.12xlarge'|'c7i.16xlarge'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m7a.medium'|'m7a.large'|'m7a.xlarge'|'m7a.2xlarge'|'m7a.4xlarge'|'m7a.8xlarge'|'m7a.12xlarge'|'m7a.16xlarge'|'m7gd.medium'|'m7gd.large'|'m7gd.xlarge'|'m7gd.2xlarge'|'m7gd.4xlarge'|'m7gd.8xlarge'|'m7gd.12xlarge'|'m7gd.16xlarge'|'m7i.large'|'m7i.xlarge'|'m7i.2xlarge'|'m7i.4xlarge'|'m7i.8xlarge'|'m7i.12xlarge'|'m7i.16xlarge'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r7a.medium'|'r7a.large'|'r7a.xlarge'|'r7a.2xlarge'|'r7a.4xlarge'|'r7a.8xlarge'|'r7a.12xlarge'|'r7a.16xlarge'|'r7gd.medium'|'r7gd.large'|'r7gd.xlarge'|'r7gd.2xlarge'|'r7gd.4xlarge'|'r7gd.8xlarge'|'r7gd.12xlarge'|'r7gd.16xlarge'|'r7i.large'|'r7i.xlarge'|'r7i.2xlarge'|'r7i.4xlarge'|'r7i.8xlarge'|'r7i.12xlarge'|'r7i.16xlarge'|'r7i.24xlarge'|'r7i.48xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'c6id.large'|'c6id.xlarge'|'c6id.2xlarge'|'c6id.4xlarge'|'c6id.8xlarge'|'c6id.12xlarge'|'c6id.16xlarge'|'c6id.24xlarge'|'c6id.32xlarge'|'c8g.medium'|'c8g.large'|'c8g.xlarge'|'c8g.2xlarge'|'c8g.4xlarge'|'c8g.8xlarge'|'c8g.12xlarge'|'c8g.16xlarge'|'c8g.24xlarge'|'c8g.48xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m6id.large'|'m6id.xlarge'|'m6id.2xlarge'|'m6id.4xlarge'|'m6id.8xlarge'|'m6id.12xlarge'|'m6id.16xlarge'|'m6id.24xlarge'|'m6id.32xlarge'|'m6idn.large'|'m6idn.xlarge'|'m6idn.2xlarge'|'m6idn.4xlarge'|'m6idn.8xlarge'|'m6idn.12xlarge'|'m6idn.16xlarge'|'m6idn.24xlarge'|'m6idn.32xlarge'|'m6in.large'|'m6in.xlarge'|'m6in.2xlarge'|'m6in.4xlarge'|'m6in.8xlarge'|'m6in.12xlarge'|'m6in.16xlarge'|'m6in.24xlarge'|'m6in.32xlarge'|'m8g.medium'|'m8g.large'|'m8g.xlarge'|'m8g.2xlarge'|'m8g.4xlarge'|'m8g.8xlarge'|'m8g.12xlarge'|'m8g.16xlarge'|'m8g.24xlarge'|'m8g.48xlarge'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r6a.large'|'r6a.xlarge'|'r6a.2xlarge'|'r6a.4xlarge'|'r6a.8xlarge'|'r6a.12xlarge'|'r6a.16xlarge'|'r6a.24xlarge'|'r6a.32xlarge'|'r6a.48xlarge'|'r6id.large'|'r6id.xlarge'|'r6id.2xlarge'|'r6id.4xlarge'|'r6id.8xlarge'|'r6id.12xlarge'|'r6id.16xlarge'|'r6id.24xlarge'|'r6id.32xlarge'|'r6idn.large'|'r6idn.xlarge'|'r6idn.2xlarge'|'r6idn.4xlarge'|'r6idn.8xlarge'|'r6idn.12xlarge'|'r6idn.16xlarge'|'r6idn.24xlarge'|'r6idn.32xlarge'|'r6in.large'|'r6in.xlarge'|'r6in.2xlarge'|'r6in.4xlarge'|'r6in.8xlarge'|'r6in.12xlarge'|'r6in.16xlarge'|'r6in.24xlarge'|'r6in.32xlarge'|'r8g.medium'|'r8g.large'|'r8g.xlarge'|'r8g.2xlarge'|'r8g.4xlarge'|'r8g.8xlarge'|'r8g.12xlarge'|'r8g.16xlarge'|'r8g.24xlarge'|'r8g.48xlarge'|'m4.16xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6i.32xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'c6in.24xlarge'|'c6in.32xlarge'|'c7a.24xlarge'|'c7a.32xlarge'|'c7a.48xlarge'|'c7i.24xlarge'|'c7i.48xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m7a.24xlarge'|'m7a.32xlarge'|'m7a.48xlarge'|'m7i.24xlarge'|'m7i.48xlarge'|'r7a.24xlarge'|'r7a.32xlarge'|'r7a.48xlarge',
'Description': 'string',
'Name': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
'BuildId': 'string',
'BuildArn': 'string',
'ScriptId': 'string',
'ScriptArn': 'string',
'ServerLaunchPath': 'string',
'ServerLaunchParameters': 'string',
'LogPaths': [
'string',
],
'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'WINDOWS_2016'|'AMAZON_LINUX_2023'|'WINDOWS_2022',
'ResourceCreationLimitPolicy': {
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
'MetricGroups': [
'string',
],
'StoppedActions': [
'AUTO_SCALING',
],
'InstanceRoleArn': 'string',
'CertificateConfiguration': {
'CertificateType': 'DISABLED'|'GENERATED'
},
'ComputeType': 'EC2'|'ANYWHERE',
'AnywhereConfiguration': {
'Cost': 'string'
},
'InstanceRoleCredentialsProvider': 'SHARED_CREDENTIAL_FILE',
'PlayerGatewayMode': 'DISABLED'|'ENABLED'|'REQUIRED',
'PlayerGatewayConfiguration': {
'GameServerIpProtocolSupported': 'IPv4'|'DUAL_STACK'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
FleetAttributes (list) --
A collection of objects containing attribute metadata for each requested fleet ID. Attribute objects are returned only for fleets that currently exist.
(dict) --
Describes an Amazon GameLift Servers fleet of game hosting resources. Attributes differ based on the fleet's compute type, as follows:
EC2 fleet attributes identify a Build resource (for fleets with customer game server builds) or a Script resource (for Amazon GameLift Servers Realtime fleets).
Amazon GameLift Servers Anywhere fleets have an abbreviated set of attributes, because most fleet configurations are set directly on the fleet's computes. Attributes include fleet identifiers and descriptive properties, creation/termination time, and fleet status.
Returned by: https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetAttributes
FleetId (string) --
A unique identifier for the fleet.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift fleet ARN, the resource ID matches the FleetId value.
FleetType (string) --
Indicates whether the fleet uses On-Demand or Spot instances. For more information, see On-Demand versus Spot Instances. This fleet property can't be changed after the fleet is created.
InstanceType (string) --
The Amazon EC2 instance type that the fleet uses. Instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions. This attribute is used with fleets where ComputeType is EC2.
Description (string) --
A human-readable description of the fleet.
Name (string) --
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
CreationTime (datetime) --
A 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) --
A 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 resource has been defined and Amazon GameLift Servers has started creating the fleet. Desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING -- Amazon GameLift Servers is download the game server build, running install scripts, and then validating the build files. When complete, Amazon GameLift Servers launches a fleet instance.
ACTIVATING -- Amazon GameLift Servers is launching a game server process and testing its connectivity with the Amazon GameLift Servers service.
ACTIVE -- The fleet is now ready to host 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) --
A unique identifier for the build resource that is deployed on instances in this fleet. This attribute is used with fleets where ComputeType is "EC2".
BuildArn (string) --
The Amazon Resource Name ( ARN) associated with the Amazon GameLift Servers build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the BuildId value. This attribute is used with fleets where ComputeType is "EC2".
ScriptId (string) --
A unique identifier for the Realtime script resource that is deployed on instances in this fleet. This attribute is used with fleets where ComputeType is "EC2".
ScriptArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift script resource that is deployed on instances in this fleet. In a GameLift script ARN, the resource ID matches the ScriptId value.
ServerLaunchPath (string) --
This parameter is no longer used. Server launch paths are now defined using the fleet's RuntimeConfiguration. Requests that use this parameter continue to be valid.
ServerLaunchParameters (string) --
This parameter is no longer used. Server launch parameters are now defined using the fleet's runtime configuration. Requests that use this parameter continue to be valid.
LogPaths (list) --
This parameter is no longer used. Game session log paths are now defined using the Amazon GameLift Servers server API ProcessReady() logParameters. See more information in the Server API Reference.
(string) --
NewGameSessionProtectionPolicy (string) --
The type of game session protection to set on all new instances that are started in the fleet. This attribute is used with fleets where ComputeType is EC2.
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) --
The operating system of the fleet's computing resources. A fleet's operating system is determined by the OS of the build or script that is deployed on this fleet. This attribute is used with fleets where ComputeType is EC2.
ResourceCreationLimitPolicy (dict) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
MetricGroups (list) --
Name of a metric group that metrics for this fleet are added to. In Amazon CloudWatch, you can view aggregated metrics for fleets that are in a metric group. A fleet can be included in only one metric group at a time. This attribute is used with fleets where ComputeType is EC2.
(string) --
StoppedActions (list) --
A list of fleet activity that has been suspended using StopFleetActions. This includes fleet auto-scaling. This attribute is used with fleets where ComputeType is EC2.
(string) --
InstanceRoleArn (string) --
A unique identifier for an IAM role that manages access to your Amazon Web Services services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN by using the IAM dashboard in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server. This attribute is used with fleets where ComputeType is EC2.
CertificateConfiguration (dict) --
Determines whether a TLS/SSL certificate is generated for a fleet. This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate.
CertificateType (string) --
Indicates whether a TLS/SSL certificate is generated for a fleet.
Valid values include:
GENERATED - Generate a TLS/SSL certificate for this fleet.
DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.
ComputeType (string) --
The type of compute resource used to host your game servers. You can use your own compute resources with Amazon GameLift Servers Anywhere or use Amazon EC2 instances with managed Amazon GameLift Servers.
AnywhereConfiguration (dict) --
A set of attributes that are specific to an Anywhere fleet.
Cost (string) --
The cost to run your fleet per hour. Amazon GameLift Servers uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Servers Developer Guide.
InstanceRoleCredentialsProvider (string) --
Indicates that fleet instances maintain a shared credentials file for the IAM role defined in InstanceRoleArn. Shared credentials allow applications that are deployed with the game server executable to communicate with other Amazon Web Services resources. This property is used only when the game server is integrated with the server SDK version 5.x. For more information about using shared credentials, see Communicate with other Amazon Web Services resources from your fleets. This attribute is used with fleets where ComputeType is EC2.
PlayerGatewayMode (string) --
Indicates whether player gateway is enabled for this fleet. Player gateway provides benefits such as DDoS protection with negligible impact to latency.
If ENABLED or REQUIRED, game clients can use player gateway to connect with the game server. If DISABLED, game clients cannot use player gateway. Instead, they have to directly connect to the game server.
PlayerGatewayConfiguration (dict) --
Configuration settings for player gateway on this fleet.
GameServerIpProtocolSupported (string) --
The IP protocol that your game servers support for player connections through player gateway. If the value is set to IPv4, GameLift will install and execute a lightweight IP translation software on fleet instances to receive and transform incoming IPv6 traffic to IPv4. If the value is set to DUAL_STACK, the lightweight IP translation software will not be installed on fleet instances. DUAL_STACK provides slightly better performance than IPv4.
NextToken (string) --
A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.
{'LocationAttributes': {'LocationState': {'PlayerGatewayStatus': 'DISABLED | '
'ENABLED'}}}
This API works with the following fleet types: EC2, Container
Retrieves information on a fleet's remote locations, including life-cycle status and any suspended fleet activity.
This operation can be used in the following ways:
To get data for specific locations, provide a fleet identifier and a list of locations. Location data is returned in the order that it is requested.
To get data for all locations, provide a fleet identifier only. Location data is returned in no particular order.
When requesting attributes for multiple locations, use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a LocationAttributes object is returned for each requested location. If the fleet does not have a requested location, no information is returned. This operation does not return the home Region. To get information on a fleet's home Region, call DescribeFleetAttributes.
Learn more
Setting up Amazon GameLift Servers fleets
Amazon GameLift Servers service locations for managed hosting
See also: AWS API Documentation
Request Syntax
client.describe_fleet_location_attributes(
FleetId='string',
Locations=[
'string',
],
Limit=123,
NextToken='string'
)
string
[REQUIRED]
A unique identifier for the fleet to retrieve remote locations for. You can use either the fleet ID or ARN value.
list
A list of fleet locations to retrieve information for. Specify locations in the form of an Amazon Web Services Region code, such as us-west-2.
(string) --
integer
The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This limit is not currently enforced.
string
A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.
dict
Response Syntax
{
'FleetId': 'string',
'FleetArn': 'string',
'LocationAttributes': [
{
'LocationState': {
'Location': 'string',
'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
'StoppedActions': [
'AUTO_SCALING',
],
'UpdateStatus': 'PENDING_UPDATE'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
FleetId (string) --
A unique identifier for the fleet that location attributes were requested for.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.
LocationAttributes (list) --
Location-specific information on the requested fleet's remote locations.
(dict) --
Details about a location in a multi-location fleet.
LocationState (dict) --
A fleet location and its current life-cycle state.
Location (string) --
The fleet location, expressed as an Amazon Web Services Region code such as us-west-2.
Status (string) --
The life-cycle status of a fleet location.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this fleet. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this fleet location.
DISABLED -- Player gateway is not available for this fleet location.
StoppedActions (list) --
A list of fleet actions that have been suspended in the fleet location.
(string) --
UpdateStatus (string) --
The status of fleet activity updates to the location. The status PENDING_UPDATE indicates that StopFleetActions or StartFleetActions has been requested but the update has not yet been completed for the location.
NextToken (string) --
A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.
{'GameSessionDetails': {'GameSession': {'PlayerGatewayStatus': 'DISABLED | '
'ENABLED'}}}
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves additional game session properties, including the game session protection policy in force, a set of one or more game sessions in a specific fleet location. You can optionally filter the results by current game session status.
This operation can be used in the following ways:
To retrieve details for all game sessions that are currently running on all locations in a fleet, provide a fleet or alias ID, with an optional status filter. This approach returns details from the fleet's home Region and all remote locations.
To retrieve details for all game sessions that are currently running on a specific fleet location, provide a fleet or alias ID and a location name, with optional status filter. The location can be the fleet's home Region or any remote location.
To retrieve details for a specific game session, provide the game session ID. This approach looks for the game session ID in all fleets that reside in the Amazon Web Services Region defined in the request.
Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a GameSessionDetail object is returned for each game session that matches the request.
Learn more
See also: AWS API Documentation
Request Syntax
client.describe_game_session_details(
FleetId='string',
GameSessionId='string',
AliasId='string',
Location='string',
StatusFilter='string',
Limit=123,
NextToken='string'
)
string
A unique identifier for the fleet to retrieve all game sessions active on the fleet. You can use either the fleet ID or ARN value.
string
A unique identifier for the game session to retrieve.
string
A unique identifier for the alias associated with the fleet to retrieve all game sessions for. You can use either the alias ID or ARN value.
string
A fleet location to get game session details for. You can specify a fleet's home Region or a remote location. Use the Amazon Web Services Region code format, such as us-west-2.
string
Game session status to filter results on. Possible game session statuses include ACTIVE, TERMINATED, ACTIVATING and TERMINATING (the last two are transitory).
integer
The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
string
A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.
dict
Response Syntax
{
'GameSessionDetails': [
{
'GameSession': {
'GameSessionId': 'string',
'Name': 'string',
'FleetId': 'string',
'FleetArn': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'CurrentPlayerSessionCount': 123,
'MaximumPlayerSessionCount': 123,
'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
'StatusReason': 'INTERRUPTED'|'TRIGGERED_ON_PROCESS_TERMINATE'|'FORCE_TERMINATED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
'CreatorId': 'string',
'GameSessionData': 'string',
'MatchmakerData': 'string',
'Location': 'string',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
'ProtectionPolicy': 'NoProtection'|'FullProtection'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
GameSessionDetails (list) --
A collection of properties for each game session that matches the request.
(dict) --
A game session's properties plus the protection policy currently in force.
GameSession (dict) --
Object that describes a game session.
GameSessionId (string) --
A unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
Name (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
FleetId (string) --
A unique identifier for the fleet that the game session is running on.
FleetArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift fleet that this game session is running on.
CreationTime (datetime) --
A 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) --
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
CurrentPlayerSessionCount (integer) --
Number of players currently in the game session.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
Status (string) --
Current status of the game session. A game session must have an ACTIVE status to have player sessions.
StatusReason (string) --
Provides additional information about game session status.
INTERRUPTED -- The game session was hosted on an EC2 Spot instance that was reclaimed, causing the active game session to be stopped.
TRIGGERED_ON_PROCESS_TERMINATE – The game session was stopped by calling TerminateGameSession with the termination mode TRIGGER_ON_PROCESS_TERMINATE.
FORCE_TERMINATED – The game session was stopped by calling TerminateGameSession with the termination mode FORCE_TERMINATE.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
PlayerSessionCreationPolicy (string) --
Indicates whether the game session is accepting new players.
CreatorId (string) --
A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill).
Location (string) --
The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such as us-west-2.
PlayerGatewayStatus (string) --
Indicates whether player gateway is available for use for this game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for routing player connections for this game session.
DISABLED -- Player gateway is not available for this game session.
ProtectionPolicy (string) --
Current status of protection for the game session.
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.
NextToken (string) --
A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.
{'GameSessionPlacement': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves information, including current status, about a game session placement request.
To get game session placement details, specify the placement ID.
This operation is not designed to be continually called to track game session status. This practice can cause you to exceed your API limit, which results in errors. Instead, you must configure an Amazon Simple Notification Service (SNS) topic to receive notifications from FlexMatch or queues. Continuously polling with DescribeGameSessionPlacement should only be used for games in development with low game session usage. For a reference implementation of event-based game session placement tracking, see Event-based game session placement guidance in the Amazon GameLift Toolkit.
See also: AWS API Documentation
Request Syntax
client.describe_game_session_placement(
PlacementId='string'
)
string
[REQUIRED]
A unique identifier for a game session placement to retrieve.
dict
Response Syntax
{
'GameSessionPlacement': {
'PlacementId': 'string',
'GameSessionQueueName': 'string',
'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT'|'FAILED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'MaximumPlayerSessionCount': 123,
'GameSessionName': 'string',
'GameSessionId': 'string',
'GameSessionArn': 'string',
'GameSessionRegion': 'string',
'PlayerLatencies': [
{
'PlayerId': 'string',
'RegionIdentifier': 'string',
'LatencyInMilliseconds': ...
},
],
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlacedPlayerSessions': [
{
'PlayerId': 'string',
'PlayerSessionId': 'string'
},
],
'GameSessionData': 'string',
'MatchmakerData': 'string',
'PriorityConfigurationOverride': {
'PlacementFallbackStrategy': 'DEFAULT_AFTER_SINGLE_PASS'|'NONE',
'LocationOrder': [
'string',
]
},
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
}
}
Response Structure
(dict) --
GameSessionPlacement (dict) --
Object that describes the requested game session placement.
PlacementId (string) --
A unique identifier for a game session placement.
GameSessionQueueName (string) --
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
Status (string) --
Current status of the game session placement request.
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
CANCELLED -- The placement request was canceled.
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
FAILED -- Amazon GameLift Servers is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
GameSessionName (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
GameSessionId (string) --
A unique identifier for the game session. This value isn't final until placement status is FULFILLED.
GameSessionArn (string) --
Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is FULFILLED.
GameSessionRegion (string) --
Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is FULFILLED.
PlayerLatencies (list) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.
(dict) --
Regional latency information for a player, used when requesting a new game session. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified Region. The relative difference between a player's latency values for multiple Regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
A unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the Region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified Region.
StartTime (datetime) --
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when this request was completed, canceled, or timed out.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.
PlacedPlayerSessions (list) --
A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is FULFILLED). This information includes the player ID, provided in the placement request, and a corresponding player session ID.
(dict) --
Information about a player session. This object contains only the player ID and player session ID. To retrieve full details on a player session, call DescribePlayerSessions with the player session ID.
PlayerId (string) --
A unique identifier for a player that is associated with this player session.
PlayerSessionId (string) --
A unique identifier for a player session.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.
PriorityConfigurationOverride (dict) --
An alternative priority list of locations that's included with a game session placement request. When provided, the list overrides a queue's location order list for this game session placement request only. The list might include Amazon Web Services Regions, local zones, and custom locations (for Anywhere fleets). The fallback strategy tells Amazon GameLift Servers what action to take (if any) in the event that it failed to place a new game session.
PlacementFallbackStrategy (string) --
Instructions for how to proceed if placement fails in every location on the priority override list. Valid strategies include:
DEFAULT_AFTER_SINGLE_PASS -- After attempting to place a new game session in every location on the priority override list, try to place a game session in queue's other locations. This is the default behavior.
NONE -- Limit placements to locations on the priority override list only.
LocationOrder (list) --
A prioritized list of hosting locations. The list can include Amazon Web Services Regions (such as us-west-2), local zones, and custom locations (for Anywhere fleets). Each location must be listed only once. For details, see Amazon GameLift Servers service locations.
(string) --
PlayerGatewayStatus (string) --
The current status of player gateway for the game session placement. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this game session placement.
DISABLED -- Player gateway is not available for this game session placement.
{'GameSessions': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves a set of one or more game sessions in a specific fleet location. You can optionally filter the results by current game session status.
This operation can be used in the following ways:
To retrieve all game sessions that are currently running on all locations in a fleet, provide a fleet or alias ID, with an optional status filter. This approach returns all game sessions in the fleet's home Region and all remote locations.
To retrieve all game sessions that are currently running on a specific fleet location, provide a fleet or alias ID and a location name, with optional status filter. The location can be the fleet's home Region or any remote location.
To retrieve a specific game session, provide the game session ID. This approach looks for the game session ID in all fleets that reside in the Amazon Web Services Region defined in the request.
Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a GameSession object is returned for each game session that matches the request.
This operation is not designed to be continually called to track game session status. This practice can cause you to exceed your API limit, which results in errors. Instead, you must configure an Amazon Simple Notification Service (SNS) topic to receive notifications from FlexMatch or queues. Continuously polling with DescribeGameSessions should only be used for games in development with low game session usage.
Available in Amazon GameLift Servers Local.
Learn more
See also: AWS API Documentation
Request Syntax
client.describe_game_sessions(
FleetId='string',
GameSessionId='string',
AliasId='string',
Location='string',
StatusFilter='string',
Limit=123,
NextToken='string'
)
string
A unique identifier for the fleet to retrieve game sessions for. You can use either the fleet ID or ARN value.
string
A unique identifier for the game session to retrieve.
string
A unique identifier for the alias associated with the fleet to retrieve game sessions for. You can use either the alias ID or ARN value.
string
A fleet location to get game sessions for. You can specify a fleet's home Region or a remote location. Use the Amazon Web Services Region code format, such as us-west-2.
string
Game session status to filter results on. You can filter on the following states: ACTIVE, TERMINATED, ACTIVATING, and TERMINATING. The last two are transitory and used for only very brief periods of time.
integer
The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
string
A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.
dict
Response Syntax
{
'GameSessions': [
{
'GameSessionId': 'string',
'Name': 'string',
'FleetId': 'string',
'FleetArn': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'CurrentPlayerSessionCount': 123,
'MaximumPlayerSessionCount': 123,
'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
'StatusReason': 'INTERRUPTED'|'TRIGGERED_ON_PROCESS_TERMINATE'|'FORCE_TERMINATED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
'CreatorId': 'string',
'GameSessionData': 'string',
'MatchmakerData': 'string',
'Location': 'string',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
GameSessions (list) --
A collection of properties for each game session that matches the request.
(dict) --
Properties describing a game session.
A game session in ACTIVE status can host players. When a game session ends, its status is set to TERMINATED.
Amazon GameLift Servers retains a game session resource for 30 days after the game session ends. You can reuse idempotency token values after this time. Game session logs are retained for 14 days.
GameSessionId (string) --
A unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
Name (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
FleetId (string) --
A unique identifier for the fleet that the game session is running on.
FleetArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift fleet that this game session is running on.
CreationTime (datetime) --
A 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) --
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
CurrentPlayerSessionCount (integer) --
Number of players currently in the game session.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
Status (string) --
Current status of the game session. A game session must have an ACTIVE status to have player sessions.
StatusReason (string) --
Provides additional information about game session status.
INTERRUPTED -- The game session was hosted on an EC2 Spot instance that was reclaimed, causing the active game session to be stopped.
TRIGGERED_ON_PROCESS_TERMINATE – The game session was stopped by calling TerminateGameSession with the termination mode TRIGGER_ON_PROCESS_TERMINATE.
FORCE_TERMINATED – The game session was stopped by calling TerminateGameSession with the termination mode FORCE_TERMINATE.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
PlayerSessionCreationPolicy (string) --
Indicates whether the game session is accepting new players.
CreatorId (string) --
A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill).
Location (string) --
The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such as us-west-2.
PlayerGatewayStatus (string) --
Indicates whether player gateway is available for use for this game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for routing player connections for this game session.
DISABLED -- Player gateway is not available for this game session.
NextToken (string) --
A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.
{'TicketList': {'GameSessionConnectionInfo': {'PlayerGatewayStatus': 'DISABLED '
'| '
'ENABLED'}}}
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves one or more matchmaking tickets. Use this operation to retrieve ticket information, including--after a successful match is made--connection information for the resulting new game session.
To request matchmaking tickets, provide a list of up to 10 ticket IDs. If the request is successful, a ticket object is returned for each requested ID that currently exists.
This operation is not designed to be continually called to track matchmaking ticket status. This practice can cause you to exceed your API limit, which results in errors. Instead, as a best practice, set up an Amazon Simple Notification Service to receive notifications, and provide the topic ARN in the matchmaking configuration.
Learn more
See also: AWS API Documentation
Request Syntax
client.describe_matchmaking(
TicketIds=[
'string',
]
)
list
[REQUIRED]
A unique identifier for a matchmaking ticket. You can include up to 10 ID values.
(string) --
dict
Response Syntax
{
'TicketList': [
{
'TicketId': 'string',
'ConfigurationName': 'string',
'ConfigurationArn': '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',
'DnsName': 'string',
'Port': 123,
'MatchedPlayerSessions': [
{
'PlayerId': 'string',
'PlayerSessionId': 'string'
},
],
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
'EstimatedWaitTime': 123
},
]
}
Response Structure
(dict) --
TicketList (list) --
A 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.
TicketId (string) --
A unique identifier for a matchmaking ticket.
ConfigurationName (string) --
Name of the matchmaking configuration 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.
ConfigurationArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
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. 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.
CANCELLED -- The matchmaking request was canceled. This may be the result of a StopMatchmaking operation or a proposed match that one or more players failed to accept.
TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.
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) --
A unique identifier for a player
PlayerAttributes (dict) --
A collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}}.
You can provide up to 10 PlayerAttributes.
(string) --
(dict) --
Values for use in player attribute key-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 100 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 data 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) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services 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) --
Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .
GameSessionArn (string) --
A unique identifier for the game session. Use the game session ID.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
MatchedPlayerSessions (list) --
A 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) --
A unique identifier for a player
PlayerSessionId (string) --
A unique identifier for a player session
PlayerGatewayStatus (string) --
The current status of player gateway for the game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see supported locations.
Possible values include:
ENABLED -- Player gateway is available for this game session.
DISABLED -- Player gateway is not available for this game 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.
{'ContainerFleets': {'LocationAttributes': {'PlayerGatewayStatus': 'DISABLED | '
'ENABLED'},
'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'}}
This API works with the following fleet types: Container
Retrieves a collection of container fleet resources in an Amazon Web Services Region. For fleets that have multiple locations, this operation retrieves fleets based on their home Region only.
Request options
Get a list of all fleets. Call this operation without specifying a container group definition.
Get a list of fleets filtered by container group definition. Provide the container group definition name or ARN value.
To get a list of all Amazon GameLift Servers Realtime fleets with a specific configuration script, provide the script ID.
Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, this operation returns a collection of container fleets that match the request parameters. A NextToken value is also returned if there are more result pages to retrieve.
See also: AWS API Documentation
Request Syntax
client.list_container_fleets(
ContainerGroupDefinitionName='string',
Limit=123,
NextToken='string'
)
string
The container group definition to filter the list on. Use this parameter to retrieve only those fleets that use the specified container group definition. You can specify the container group definition's name to get fleets with the latest versions. Alternatively, provide an ARN value to get fleets with a specific version number.
integer
The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
string
A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.
dict
Response Syntax
{
'ContainerFleets': [
{
'FleetId': 'string',
'FleetArn': 'string',
'FleetRoleArn': 'string',
'GameServerContainerGroupDefinitionName': 'string',
'GameServerContainerGroupDefinitionArn': 'string',
'PerInstanceContainerGroupDefinitionName': 'string',
'PerInstanceContainerGroupDefinitionArn': 'string',
'InstanceConnectionPortRange': {
'FromPort': 123,
'ToPort': 123
},
'InstanceInboundPermissions': [
{
'FromPort': 123,
'ToPort': 123,
'IpRange': 'string',
'Protocol': 'TCP'|'UDP'
},
],
'GameServerContainerGroupsPerInstance': 123,
'MaximumGameServerContainerGroupsPerInstance': 123,
'InstanceType': 'string',
'BillingType': 'ON_DEMAND'|'SPOT',
'Description': 'string',
'CreationTime': datetime(2015, 1, 1),
'MetricGroups': [
'string',
],
'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
'GameSessionCreationLimitPolicy': {
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'DeploymentDetails': {
'LatestDeploymentId': 'string'
},
'LogConfiguration': {
'LogDestination': 'NONE'|'CLOUDWATCH'|'S3',
'S3BucketName': 'string',
'LogGroupArn': 'string'
},
'LocationAttributes': [
{
'Location': 'string',
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
],
'PlayerGatewayMode': 'DISABLED'|'ENABLED'|'REQUIRED'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ContainerFleets (list) --
A collection of container fleet objects for all fleets that match the request criteria.
(dict) --
Describes an Amazon GameLift Servers managed container fleet.
FleetId (string) --
A unique identifier for the container fleet to retrieve.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift fleet ARN, the resource ID matches the FleetId value.
FleetRoleArn (string) --
The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. See Set up an IAM service role. This fleet property can't be changed.
GameServerContainerGroupDefinitionName (string) --
The name of the fleet's game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.
GameServerContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's game server container group. The ARN value also identifies the specific container group definition version in use.
PerInstanceContainerGroupDefinitionName (string) --
The name of the fleet's per-instance container group definition.
PerInstanceContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's per-instance container group. The ARN value also identifies the specific container group definition version in use.
InstanceConnectionPortRange (dict) --
The set of port numbers to open on each instance in a container fleet. Connection ports are used by inbound traffic to connect with processes that are running in containers on the fleet.
FromPort (integer) --
Starting value for the port range.
ToPort (integer) --
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
InstanceInboundPermissions (list) --
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) --
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) --
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) --
A 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) --
The network communication protocol used by the fleet.
GameServerContainerGroupsPerInstance (integer) --
The number of times to replicate the game server container group on each fleet instance.
MaximumGameServerContainerGroupsPerInstance (integer) --
The calculated maximum number of game server container group that can be deployed on each fleet instance. The calculation depends on the resource needs of the container group and the CPU and memory resources of the fleet's instance type.
InstanceType (string) --
The Amazon EC2 instance type to use for all instances in the fleet. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity. You can't update this fleet property.
BillingType (string) --
Indicates whether the fleet uses On-Demand or Spot instances for this fleet. Learn more about when to use On-Demand versus Spot Instances. You can't update this fleet property.
By default, this property is set to ON_DEMAND.
Description (string) --
A meaningful description of the container fleet.
CreationTime (datetime) --
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
MetricGroups (list) --
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. Metric groups aggregate metrics for multiple fleets.
(string) --
NewGameSessionProtectionPolicy (string) --
Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using UpdateGameSession.
NoProtection -- Game sessions can be shut down during active gameplay.
FullProtection -- Game sessions in ACTIVE status can't be shut down.
GameSessionCreationLimitPolicy (dict) --
A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
Status (string) --
The current status of the container fleet.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
DeploymentDetails (dict) --
Information about the most recent deployment for the container fleet.
LatestDeploymentId (string) --
A unique identifier for a fleet deployment.
LogConfiguration (dict) --
The method that is used to collect container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs.
CLOUDWATCH -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define.
NONE -- Don't collect container logs.
LogDestination (string) --
The type of log collection to use for a fleet.
CLOUDWATCH -- (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define. This bucket must reside in the fleet's home Amazon Web Services Region.
NONE -- Don't collect container logs.
S3BucketName (string) --
If log destination is S3, logs are sent to the specified Amazon S3 bucket name.
LogGroupArn (string) --
If log destination is CLOUDWATCH, logs are sent to the specified log group in Amazon CloudWatch.
LocationAttributes (list) --
Information about the container fleet's remote locations where fleet instances are deployed.
(dict) --
Details about a location in a multi-location container fleet.
Location (string) --
A location identifier.
Status (string) --
The status of fleet activity in the location.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this container fleet. Note, even if a container fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this container fleet location.
DISABLED -- Player gateway is not available for this container fleet location.
PlayerGatewayMode (string) --
Indicates whether player gateway is enabled for this container fleet. Player gateway provides benefits such as DDoS protection with negligible impact to latency.
If ENABLED or REQUIRED, game clients can use player gateway to connect with the game server. If DISABLED, game clients cannot use player gateway. Instead, they have to directly connect to the game server.
NextToken (string) --
A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.
{'GameSessions': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves all active game sessions that match a set of search criteria and sorts them into a specified order.
This operation is not designed to continually track game session status because that practice can cause you to exceed your API limit and generate errors. Instead, configure an Amazon Simple Notification Service (Amazon SNS) topic to receive notifications from a matchmaker or a game session placement queue.
When searching for game sessions, you specify exactly where you want to search and provide a search filter expression, a sort expression, or both. A search request can search only one fleet, but it can search all of a fleet's locations.
This operation can be used in the following ways:
To search all game sessions that are currently running on all locations in a fleet, provide a fleet or alias ID. This approach returns game sessions in the fleet's home Region and all remote locations that fit the search criteria.
To search all game sessions that are currently running on a specific fleet location, provide a fleet or alias ID and a location name. For location, you can specify a fleet's home Region or any remote location.
Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a GameSession object is returned for each game session that matches the request. Search finds game sessions that are in ACTIVE status only. To retrieve information on game sessions in other statuses, use DescribeGameSessions.
To set search and sort criteria, create a filter expression using the following game session attributes. For game session search examples, see the Examples section of this topic.
gameSessionId -- A unique identifier for the game session. You can use either a GameSessionId or GameSessionArn value.
gameSessionName -- Name assigned to a game session. Game session names do not need to be unique to a game session.
gameSessionProperties -- A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}. The filter expression must specify the https://docs.aws.amazon.com/gamelift/latest/apireference/API_GameProperty -- a Key and a string Value to search for the game sessions. For example, to search for the above key-value pair, specify the following search filter: gameSessionProperties.difficulty = "novice". All game property values are searched as strings. For examples of searching game sessions, see the ones below, and also see Search game sessions by game property.
maximumSessions -- Maximum number of player sessions allowed for a game session.
creationTimeMillis -- Value indicating when a game session was created. It is expressed in Unix time as milliseconds.
playerSessionCount -- Number of players currently connected to a game session. This value changes rapidly as players join the session or drop out.
hasAvailablePlayerSessions -- Boolean value indicating whether a game session has reached its maximum number of players. It is highly recommended that all search requests include this filter attribute to optimize search performance and return only sessions that players can join.
See also: AWS API Documentation
Request Syntax
client.search_game_sessions(
FleetId='string',
AliasId='string',
Location='string',
FilterExpression='string',
SortExpression='string',
Limit=123,
NextToken='string'
)
string
A unique identifier for the fleet to search for active game sessions. You can use either the fleet ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.
string
A unique identifier for the alias associated with the fleet to search for active game sessions. You can use either the alias ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.
string
A fleet location to search for game sessions. You can specify a fleet's home Region or a remote location. Use the Amazon Web Services Region code format, such as us-west-2.
string
String containing the search criteria for the session search. If no filter expression is included, the request returns results for all game sessions in the fleet that are in ACTIVE status.
A filter expression can contain one or multiple conditions. Each condition consists of the following:
Operand -- Name of a game session attribute. Valid values are gameSessionName, gameSessionId, gameSessionProperties, maximumSessions, creationTimeMillis, playerSessionCount, hasAvailablePlayerSessions.
Comparator -- Valid comparators are: =, <>, <, >, <=, >=.
Value -- Value to be searched for. Values may be numbers, boolean values (true/false) or strings depending on the operand. String values are case sensitive and must be enclosed in single quotes. Special characters must be escaped. Boolean and string values can only be used with the comparators = and <>. For example, the following filter expression searches on gameSessionName: " FilterExpression": "gameSessionName = 'Matt\\'s Awesome Game 1'".
To chain multiple conditions in a single expression, use the logical keywords AND, OR, and NOT and parentheses as needed. For example: x AND y AND NOT z, NOT (x OR y).
Session search evaluates conditions from left to right using the following precedence rules:
=, <>, <, >, <=, >=
Parentheses
NOT
AND
OR
For example, this filter expression retrieves game sessions hosting at least ten players that have an open player slot: "maximumSessions>=10 AND hasAvailablePlayerSessions=true".
string
Instructions on how to sort the search results. If no sort expression is included, the request returns results in random order. A sort expression consists of the following elements:
Operand -- Name of a game session attribute. Valid values are gameSessionName, gameSessionId, gameSessionProperties, maximumSessions, creationTimeMillis, playerSessionCount, hasAvailablePlayerSessions.
Order -- Valid sort orders are ASC (ascending) and DESC (descending).
For example, this sort expression returns the oldest active sessions first: "SortExpression": "creationTimeMillis ASC". Results with a null value for the sort operand are returned at the end of the list.
integer
The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. The maximum number of results returned is 20, even if this value is not set or is set higher than 20.
string
A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.
dict
Response Syntax
{
'GameSessions': [
{
'GameSessionId': 'string',
'Name': 'string',
'FleetId': 'string',
'FleetArn': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'CurrentPlayerSessionCount': 123,
'MaximumPlayerSessionCount': 123,
'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
'StatusReason': 'INTERRUPTED'|'TRIGGERED_ON_PROCESS_TERMINATE'|'FORCE_TERMINATED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
'CreatorId': 'string',
'GameSessionData': 'string',
'MatchmakerData': 'string',
'Location': 'string',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
GameSessions (list) --
A collection of objects containing game session properties for each session that matches the request.
(dict) --
Properties describing a game session.
A game session in ACTIVE status can host players. When a game session ends, its status is set to TERMINATED.
Amazon GameLift Servers retains a game session resource for 30 days after the game session ends. You can reuse idempotency token values after this time. Game session logs are retained for 14 days.
GameSessionId (string) --
A unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
Name (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
FleetId (string) --
A unique identifier for the fleet that the game session is running on.
FleetArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift fleet that this game session is running on.
CreationTime (datetime) --
A 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) --
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
CurrentPlayerSessionCount (integer) --
Number of players currently in the game session.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
Status (string) --
Current status of the game session. A game session must have an ACTIVE status to have player sessions.
StatusReason (string) --
Provides additional information about game session status.
INTERRUPTED -- The game session was hosted on an EC2 Spot instance that was reclaimed, causing the active game session to be stopped.
TRIGGERED_ON_PROCESS_TERMINATE – The game session was stopped by calling TerminateGameSession with the termination mode TRIGGER_ON_PROCESS_TERMINATE.
FORCE_TERMINATED – The game session was stopped by calling TerminateGameSession with the termination mode FORCE_TERMINATE.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
PlayerSessionCreationPolicy (string) --
Indicates whether the game session is accepting new players.
CreatorId (string) --
A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill).
Location (string) --
The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such as us-west-2.
PlayerGatewayStatus (string) --
Indicates whether player gateway is available for use for this game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for routing player connections for this game session.
DISABLED -- Player gateway is not available for this game session.
NextToken (string) --
A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.
{'GameSessionPlacement': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Makes a request to start a new game session using a game session queue. When processing a placement request, Amazon GameLift Servers looks for the best possible available resource to host the game session, based on how the queue is configured to prioritize factors such as resource cost, latency, and location. After selecting an available resource, Amazon GameLift Servers prompts the resource to start a game session. A placement request can include a list of players to create a set of player sessions. The request can also include information to pass to the new game session, such as to specify a game map or other options.
Request options
Use this operation to make the following types of requests.
Request a placement using the queue's default prioritization process (see the default prioritization described in PriorityConfiguration). Include these required parameters:
GameSessionQueueName
MaximumPlayerSessionCount
PlacementID
Request a placement and prioritize based on latency. Include these parameters:
Required parameters GameSessionQueueName, MaximumPlayerSessionCount, PlacementID.
PlayerLatencies. Include a set of latency values for destinations in the queue. When a request includes latency data, Amazon GameLift Servers automatically reorder the queue's locations priority list based on lowest available latency values. If a request includes latency data for multiple players, Amazon GameLift Servers calculates each location's average latency for all players and reorders to find the lowest latency across all players.
Don't include PriorityConfigurationOverride.
Prioritize based on a custom list of locations. If you're using a queue that's configured to prioritize location first (see PriorityConfiguration for game session queues), you can optionally use the PriorityConfigurationOverride parameter to substitute a different location priority list for this placement request. Amazon GameLift Servers searches each location on the priority override list to find an available hosting resource for the new game session. Specify a fallback strategy to use in the event that Amazon GameLift Servers fails to place the game session in any of the locations on the override list.
Request a placement and prioritized based on a custom list of locations.
You can request new player sessions for a group of players. Include the DesiredPlayerSessions parameter and include at minimum a unique player ID for each. You can also include player-specific data to pass to the new game session.
Result
If successful, this operation generates a new game session placement request and adds it to the game session queue for processing. You can track the status of individual placement requests by calling DescribeGameSessionPlacement or by monitoring queue notifications. When the request status is FULFILLED, a new game session has started and the placement request is updated with connection information for the game session (IP address and port). If the request included player session data, Amazon GameLift Servers creates a player session for each player ID in the request.
The request results in a InvalidRequestException in the following situations:
If the request includes both PlayerLatencies and PriorityConfigurationOverride parameters.
If the request includes the PriorityConfigurationOverride parameter and specifies a queue that doesn't prioritize locations.
Amazon GameLift Servers continues to retry each placement request until it reaches the queue's timeout setting. If a request times out, you can resubmit the request to the same queue or try a different queue.
See also: AWS API Documentation
Request Syntax
client.start_game_session_placement(
PlacementId='string',
GameSessionQueueName='string',
GameProperties=[
{
'Key': 'string',
'Value': 'string'
},
],
MaximumPlayerSessionCount=123,
GameSessionName='string',
PlayerLatencies=[
{
'PlayerId': 'string',
'RegionIdentifier': 'string',
'LatencyInMilliseconds': ...
},
],
DesiredPlayerSessions=[
{
'PlayerId': 'string',
'PlayerData': 'string'
},
],
GameSessionData='string',
PriorityConfigurationOverride={
'PlacementFallbackStrategy': 'DEFAULT_AFTER_SINGLE_PASS'|'NONE',
'LocationOrder': [
'string',
]
}
)
string
[REQUIRED]
A unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all Regions and cannot be reused.
string
[REQUIRED]
Name of the queue to use to place the new game session. You can use either the queue name or ARN value.
list
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) -- [REQUIRED]
The game property identifier.
Value (string) -- [REQUIRED]
The game property value.
integer
[REQUIRED]
The maximum number of players that can be connected simultaneously to the game session.
string
A descriptive label that is associated with a game session. Session names do not need to be unique.
list
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions. This information is used to try to place the new game session where it can offer the best possible gameplay experience for the players.
(dict) --
Regional latency information for a player, used when requesting a new game session. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified Region. The relative difference between a player's latency values for multiple Regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
A unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the Region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified Region.
list
Set of information on each player to create a player session for.
(dict) --
Player information for use when creating player sessions using a game session placement request.
PlayerId (string) --
A unique identifier for a player to associate with the player session.
PlayerData (string) --
Developer-defined information related to a player. Amazon GameLift Servers does not use this data, so it can be formatted as needed for use in the game.
string
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
dict
A prioritized list of locations to use for the game session placement and instructions on how to use it. This list overrides a queue's prioritized location list for this game session placement request only. You can include Amazon Web Services Regions, local zones, and custom locations (for Anywhere fleets). You can choose to limit placements to locations on the override list only, or you can prioritize locations on the override list first and then fall back to the queue's other locations if needed. Choose a fallback strategy to use in the event that Amazon GameLift Servers fails to place a game session in any of the locations on the priority override list.
PlacementFallbackStrategy (string) --
Instructions for how to proceed if placement fails in every location on the priority override list. Valid strategies include:
DEFAULT_AFTER_SINGLE_PASS -- After attempting to place a new game session in every location on the priority override list, try to place a game session in queue's other locations. This is the default behavior.
NONE -- Limit placements to locations on the priority override list only.
LocationOrder (list) -- [REQUIRED]
A prioritized list of hosting locations. The list can include Amazon Web Services Regions (such as us-west-2), local zones, and custom locations (for Anywhere fleets). Each location must be listed only once. For details, see Amazon GameLift Servers service locations.
(string) --
dict
Response Syntax
{
'GameSessionPlacement': {
'PlacementId': 'string',
'GameSessionQueueName': 'string',
'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT'|'FAILED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'MaximumPlayerSessionCount': 123,
'GameSessionName': 'string',
'GameSessionId': 'string',
'GameSessionArn': 'string',
'GameSessionRegion': 'string',
'PlayerLatencies': [
{
'PlayerId': 'string',
'RegionIdentifier': 'string',
'LatencyInMilliseconds': ...
},
],
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlacedPlayerSessions': [
{
'PlayerId': 'string',
'PlayerSessionId': 'string'
},
],
'GameSessionData': 'string',
'MatchmakerData': 'string',
'PriorityConfigurationOverride': {
'PlacementFallbackStrategy': 'DEFAULT_AFTER_SINGLE_PASS'|'NONE',
'LocationOrder': [
'string',
]
},
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
}
}
Response Structure
(dict) --
GameSessionPlacement (dict) --
Object that describes the newly created game session placement. This object includes all the information provided in the request, as well as start/end time stamps and placement status.
PlacementId (string) --
A unique identifier for a game session placement.
GameSessionQueueName (string) --
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
Status (string) --
Current status of the game session placement request.
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
CANCELLED -- The placement request was canceled.
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
FAILED -- Amazon GameLift Servers is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
GameSessionName (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
GameSessionId (string) --
A unique identifier for the game session. This value isn't final until placement status is FULFILLED.
GameSessionArn (string) --
Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is FULFILLED.
GameSessionRegion (string) --
Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is FULFILLED.
PlayerLatencies (list) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.
(dict) --
Regional latency information for a player, used when requesting a new game session. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified Region. The relative difference between a player's latency values for multiple Regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
A unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the Region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified Region.
StartTime (datetime) --
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when this request was completed, canceled, or timed out.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.
PlacedPlayerSessions (list) --
A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is FULFILLED). This information includes the player ID, provided in the placement request, and a corresponding player session ID.
(dict) --
Information about a player session. This object contains only the player ID and player session ID. To retrieve full details on a player session, call DescribePlayerSessions with the player session ID.
PlayerId (string) --
A unique identifier for a player that is associated with this player session.
PlayerSessionId (string) --
A unique identifier for a player session.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.
PriorityConfigurationOverride (dict) --
An alternative priority list of locations that's included with a game session placement request. When provided, the list overrides a queue's location order list for this game session placement request only. The list might include Amazon Web Services Regions, local zones, and custom locations (for Anywhere fleets). The fallback strategy tells Amazon GameLift Servers what action to take (if any) in the event that it failed to place a new game session.
PlacementFallbackStrategy (string) --
Instructions for how to proceed if placement fails in every location on the priority override list. Valid strategies include:
DEFAULT_AFTER_SINGLE_PASS -- After attempting to place a new game session in every location on the priority override list, try to place a game session in queue's other locations. This is the default behavior.
NONE -- Limit placements to locations on the priority override list only.
LocationOrder (list) --
A prioritized list of hosting locations. The list can include Amazon Web Services Regions (such as us-west-2), local zones, and custom locations (for Anywhere fleets). Each location must be listed only once. For details, see Amazon GameLift Servers service locations.
(string) --
PlayerGatewayStatus (string) --
The current status of player gateway for the game session placement. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this game session placement.
DISABLED -- Player gateway is not available for this game session placement.
{'MatchmakingTicket': {'GameSessionConnectionInfo': {'PlayerGatewayStatus': 'DISABLED '
'| '
'ENABLED'}}}
This API works with the following fleet types: EC2, Anywhere, Container
Finds new players to fill open slots in currently running game sessions. The backfill match process is essentially identical to the process of forming new matches. Backfill requests use the same matchmaker that was used to make the original match, and they provide matchmaking data for all players currently in the game session. FlexMatch uses this information to select new players so that backfilled match continues to meet the original match requirements.
When using FlexMatch with Amazon GameLift Servers managed hosting, you can request a backfill match from a client service by calling this operation with a GameSessions ID. You also have the option of making backfill requests directly from your game server. In response to a request, FlexMatch creates player sessions for the new players, updates the GameSession resource, and sends updated matchmaking data to the game server. You can request a backfill match at any point after a game session is started. Each game session can have only one active backfill request at a time; a subsequent request automatically replaces the earlier request.
When using FlexMatch as a standalone component, request a backfill match by calling this operation without a game session identifier. As with newly formed matches, matchmaking results are returned in a matchmaking event so that your game can update the game session that is being backfilled.
To request a backfill match, specify a unique ticket ID, the original matchmaking configuration, and matchmaking data for all current players in the game session being backfilled. Optionally, specify the GameSession ARN. If successful, a match backfill ticket is created and returned with status set to QUEUED. Track the status of backfill tickets using the same method for tracking tickets for new matches.
Only game sessions created by FlexMatch are supported for match backfill.
Learn more
Backfill existing games with FlexMatch
Matchmaking events (reference)
See also: AWS API Documentation
Request Syntax
client.start_match_backfill(
TicketId='string',
ConfigurationName='string',
GameSessionArn='string',
Players=[
{
'PlayerId': 'string',
'PlayerAttributes': {
'string': {
'S': 'string',
'N': 123.0,
'SL': [
'string',
],
'SDM': {
'string': 123.0
}
}
},
'Team': 'string',
'LatencyInMs': {
'string': 123
}
},
]
)
string
A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift Servers will generate one in the form of a UUID. Use this identifier to track the match backfill ticket status and retrieve match results.
string
[REQUIRED]
Name of the matchmaker to use for this request. You can use either the configuration name or ARN value. The ARN of the matchmaker that was used with the original game session is listed in the GameSession object, MatchmakerData property.
string
A unique identifier for the game session. Use the game session ID. When using FlexMatch as a standalone matchmaking solution, this parameter is not needed.
list
[REQUIRED]
Match information on all players that are currently assigned to the game session. This information is used by the matchmaker to find new players and add them to the existing game.
You can include up to 199 Players in a StartMatchBackfill request.
PlayerID, PlayerAttributes, Team -- This information is maintained in the GameSession object, MatchmakerData property, for all players who are currently assigned to the game session. The matchmaker data is in JSON syntax, formatted as a string. For more details, see Match Data. The backfill request must specify the team membership for every player. Do not specify team if you are not using backfill.
LatencyInMs -- If the matchmaker uses player latency, include a latency value, in milliseconds, for the Region that the game session is currently in. Do not include latency values for any other Region.
(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) --
A unique identifier for a player
PlayerAttributes (dict) --
A collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}}.
You can provide up to 10 PlayerAttributes.
(string) --
(dict) --
Values for use in player attribute key-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 100 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 data 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) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services 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',
'ConfigurationArn': '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',
'DnsName': 'string',
'Port': 123,
'MatchedPlayerSessions': [
{
'PlayerId': 'string',
'PlayerSessionId': 'string'
},
],
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
'EstimatedWaitTime': 123
}
}
Response Structure
(dict) --
MatchmakingTicket (dict) --
Ticket representing the backfill matchmaking request. This object includes the information in the request, ticket status, and match results as generated during the matchmaking process.
TicketId (string) --
A unique identifier for a matchmaking ticket.
ConfigurationName (string) --
Name of the matchmaking configuration 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.
ConfigurationArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
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. 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.
CANCELLED -- The matchmaking request was canceled. This may be the result of a StopMatchmaking operation or a proposed match that one or more players failed to accept.
TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.
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) --
A unique identifier for a player
PlayerAttributes (dict) --
A collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}}.
You can provide up to 10 PlayerAttributes.
(string) --
(dict) --
Values for use in player attribute key-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 100 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 data 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) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services 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) --
Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .
GameSessionArn (string) --
A unique identifier for the game session. Use the game session ID.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
MatchedPlayerSessions (list) --
A 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) --
A unique identifier for a player
PlayerSessionId (string) --
A unique identifier for a player session
PlayerGatewayStatus (string) --
The current status of player gateway for the game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see supported locations.
Possible values include:
ENABLED -- Player gateway is available for this game session.
DISABLED -- Player gateway is not available for this game 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': {'GameSessionConnectionInfo': {'PlayerGatewayStatus': 'DISABLED '
'| '
'ENABLED'}}}
This API works with the following fleet types: EC2, Anywhere, Container
Uses FlexMatch to create a game match for a group of players based on custom matchmaking rules. With games that use Amazon GameLift Servers managed hosting, this operation also triggers Amazon GameLift Servers to find hosting resources and start a new game session for the new match. Each matchmaking request includes information on one or more players and specifies the FlexMatch matchmaker to use. When a request is for multiple players, FlexMatch attempts to build a match that includes all players in the request, placing them in the same team and finding additional players as needed to fill the match.
To start matchmaking, provide a unique ticket ID, specify a matchmaking configuration, and include the players to be matched. You must also include any player attributes that are required by the matchmaking configuration's rule set. If successful, a matchmaking ticket is returned with status set to QUEUED.
Track matchmaking events to respond as needed and acquire game session connection information for successfully completed matches. Ticket status updates are tracked using event notification through Amazon Simple Notification Service, which is defined in the matchmaking configuration.
Learn more
Add FlexMatch to a game client
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
A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift Servers will generate one in the form of a UUID. 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. You can use either the configuration name or ARN value.
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.
You can include up to 10 Players in a StartMatchmaking request.
(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) --
A unique identifier for a player
PlayerAttributes (dict) --
A collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}}.
You can provide up to 10 PlayerAttributes.
(string) --
(dict) --
Values for use in player attribute key-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 100 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 data 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) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services 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',
'ConfigurationArn': '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',
'DnsName': 'string',
'Port': 123,
'MatchedPlayerSessions': [
{
'PlayerId': 'string',
'PlayerSessionId': 'string'
},
],
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
'EstimatedWaitTime': 123
}
}
Response Structure
(dict) --
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) --
A unique identifier for a matchmaking ticket.
ConfigurationName (string) --
Name of the matchmaking configuration 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.
ConfigurationArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
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. 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.
CANCELLED -- The matchmaking request was canceled. This may be the result of a StopMatchmaking operation or a proposed match that one or more players failed to accept.
TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.
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) --
A unique identifier for a player
PlayerAttributes (dict) --
A collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}}.
You can provide up to 10 PlayerAttributes.
(string) --
(dict) --
Values for use in player attribute key-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 100 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 data 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) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services 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) --
Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .
GameSessionArn (string) --
A unique identifier for the game session. Use the game session ID.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
MatchedPlayerSessions (list) --
A 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) --
A unique identifier for a player
PlayerSessionId (string) --
A unique identifier for a player session
PlayerGatewayStatus (string) --
The current status of player gateway for the game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see supported locations.
Possible values include:
ENABLED -- Player gateway is available for this game session.
DISABLED -- Player gateway is not available for this game 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.
{'GameSessionPlacement': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Cancels a game session placement that's in PENDING status. To stop a placement, provide the placement ID value.
Results
If successful, this operation removes the placement request from the queue and moves the GameSessionPlacement to CANCELLED status.
This operation results in an InvalidRequestExecption (400) error if a game session has already been created for this placement. You can clean up an unneeded game session by calling TerminateGameSession.
See also: AWS API Documentation
Request Syntax
client.stop_game_session_placement(
PlacementId='string'
)
string
[REQUIRED]
A unique identifier for a game session placement to stop.
dict
Response Syntax
{
'GameSessionPlacement': {
'PlacementId': 'string',
'GameSessionQueueName': 'string',
'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT'|'FAILED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'MaximumPlayerSessionCount': 123,
'GameSessionName': 'string',
'GameSessionId': 'string',
'GameSessionArn': 'string',
'GameSessionRegion': 'string',
'PlayerLatencies': [
{
'PlayerId': 'string',
'RegionIdentifier': 'string',
'LatencyInMilliseconds': ...
},
],
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlacedPlayerSessions': [
{
'PlayerId': 'string',
'PlayerSessionId': 'string'
},
],
'GameSessionData': 'string',
'MatchmakerData': 'string',
'PriorityConfigurationOverride': {
'PlacementFallbackStrategy': 'DEFAULT_AFTER_SINGLE_PASS'|'NONE',
'LocationOrder': [
'string',
]
},
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
}
}
Response Structure
(dict) --
GameSessionPlacement (dict) --
Object that describes the canceled game session placement, with CANCELLED status and an end time stamp.
PlacementId (string) --
A unique identifier for a game session placement.
GameSessionQueueName (string) --
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
Status (string) --
Current status of the game session placement request.
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
CANCELLED -- The placement request was canceled.
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
FAILED -- Amazon GameLift Servers is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
GameSessionName (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
GameSessionId (string) --
A unique identifier for the game session. This value isn't final until placement status is FULFILLED.
GameSessionArn (string) --
Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is FULFILLED.
GameSessionRegion (string) --
Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is FULFILLED.
PlayerLatencies (list) --
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.
(dict) --
Regional latency information for a player, used when requesting a new game session. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified Region. The relative difference between a player's latency values for multiple Regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
A unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the Region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified Region.
StartTime (datetime) --
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when this request was completed, canceled, or timed out.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.
PlacedPlayerSessions (list) --
A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is FULFILLED). This information includes the player ID, provided in the placement request, and a corresponding player session ID.
(dict) --
Information about a player session. This object contains only the player ID and player session ID. To retrieve full details on a player session, call DescribePlayerSessions with the player session ID.
PlayerId (string) --
A unique identifier for a player that is associated with this player session.
PlayerSessionId (string) --
A unique identifier for a player session.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.
PriorityConfigurationOverride (dict) --
An alternative priority list of locations that's included with a game session placement request. When provided, the list overrides a queue's location order list for this game session placement request only. The list might include Amazon Web Services Regions, local zones, and custom locations (for Anywhere fleets). The fallback strategy tells Amazon GameLift Servers what action to take (if any) in the event that it failed to place a new game session.
PlacementFallbackStrategy (string) --
Instructions for how to proceed if placement fails in every location on the priority override list. Valid strategies include:
DEFAULT_AFTER_SINGLE_PASS -- After attempting to place a new game session in every location on the priority override list, try to place a game session in queue's other locations. This is the default behavior.
NONE -- Limit placements to locations on the priority override list only.
LocationOrder (list) --
A prioritized list of hosting locations. The list can include Amazon Web Services Regions (such as us-west-2), local zones, and custom locations (for Anywhere fleets). Each location must be listed only once. For details, see Amazon GameLift Servers service locations.
(string) --
PlayerGatewayStatus (string) --
The current status of player gateway for the game session placement. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this game session placement.
DISABLED -- Player gateway is not available for this game session placement.
{'GameSession': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Ends a game session that's currently in progress. Use this action to terminate any game session that isn't in ERROR status. Terminating a game session is the most efficient way to free up a server process when it's hosting a game session that's in a bad state or not ending properly. You can use this action to terminate a game session that's being hosted on any type of Amazon GameLift Servers fleet compute, including computes for managed EC2, managed container, and Anywhere fleets. The game server must be integrated with Amazon GameLift Servers server SDK 5.x or greater.
Request options
Request termination for a single game session. Provide the game session ID and the termination mode. There are two potential methods for terminating a game session:
Initiate a graceful termination using the normal game session shutdown sequence. With this mode, the Amazon GameLift Servers service prompts the server process that's hosting the game session by calling the server SDK callback method OnProcessTerminate(). The callback implementation is part of the custom game server code. It might involve a variety of actions to gracefully end a game session, such as notifying players, before stopping the server process.
Force an immediate game session termination. With this mode, the Amazon GameLift Servers service takes action to stop the server process, which ends the game session without the normal game session shutdown sequence.
Results
If successful, game session termination is initiated. During this activity, the game session status is changed to TERMINATING. When completed, the server process that was hosting the game session has been stopped and replaced with a new server process that's ready to host a new game session. The old game session's status is changed to TERMINATED with a status reason that indicates the termination method used.
Learn more
Amazon GameLift Servers server SDK 5 reference guide for OnProcessTerminate() ( C++) ( C#) ( Unreal) ( Go)
See also: AWS API Documentation
Request Syntax
client.terminate_game_session(
GameSessionId='string',
TerminationMode='TRIGGER_ON_PROCESS_TERMINATE'|'FORCE_TERMINATE'
)
string
[REQUIRED]
A unique identifier for the game session to be terminated. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
string
[REQUIRED]
The method to use to terminate the game session. Available methods include:
TRIGGER_ON_PROCESS_TERMINATE – Prompts the Amazon GameLift Servers service to send an OnProcessTerminate() callback to the server process and initiate the normal game session shutdown sequence. The OnProcessTerminate method, which is implemented in the game server code, must include a call to the server SDK action ProcessEnding(), which is how the server process signals to Amazon GameLift Servers that a game session is ending. If the server process doesn't call ProcessEnding(), the game session termination won't conclude successfully.
FORCE_TERMINATE – Prompts the Amazon GameLift Servers service to stop the server process immediately. Amazon GameLift Servers takes action (depending on the type of fleet) to shut down the server process without the normal game session shutdown sequence.
dict
Response Syntax
{
'GameSession': {
'GameSessionId': 'string',
'Name': 'string',
'FleetId': 'string',
'FleetArn': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'CurrentPlayerSessionCount': 123,
'MaximumPlayerSessionCount': 123,
'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
'StatusReason': 'INTERRUPTED'|'TRIGGERED_ON_PROCESS_TERMINATE'|'FORCE_TERMINATED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
'CreatorId': 'string',
'GameSessionData': 'string',
'MatchmakerData': 'string',
'Location': 'string',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
}
}
Response Structure
(dict) --
GameSession (dict) --
Properties describing a game session.
A game session in ACTIVE status can host players. When a game session ends, its status is set to TERMINATED.
Amazon GameLift Servers retains a game session resource for 30 days after the game session ends. You can reuse idempotency token values after this time. Game session logs are retained for 14 days.
GameSessionId (string) --
A unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
Name (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
FleetId (string) --
A unique identifier for the fleet that the game session is running on.
FleetArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift fleet that this game session is running on.
CreationTime (datetime) --
A 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) --
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
CurrentPlayerSessionCount (integer) --
Number of players currently in the game session.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
Status (string) --
Current status of the game session. A game session must have an ACTIVE status to have player sessions.
StatusReason (string) --
Provides additional information about game session status.
INTERRUPTED -- The game session was hosted on an EC2 Spot instance that was reclaimed, causing the active game session to be stopped.
TRIGGERED_ON_PROCESS_TERMINATE – The game session was stopped by calling TerminateGameSession with the termination mode TRIGGER_ON_PROCESS_TERMINATE.
FORCE_TERMINATED – The game session was stopped by calling TerminateGameSession with the termination mode FORCE_TERMINATE.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
PlayerSessionCreationPolicy (string) --
Indicates whether the game session is accepting new players.
CreatorId (string) --
A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill).
Location (string) --
The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such as us-west-2.
PlayerGatewayStatus (string) --
Indicates whether player gateway is available for use for this game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for routing player connections for this game session.
DISABLED -- Player gateway is not available for this game session.
{'ContainerFleet': {'LocationAttributes': {'PlayerGatewayStatus': 'DISABLED | '
'ENABLED'},
'PlayerGatewayMode': 'DISABLED | ENABLED | REQUIRED'}}
This API works with the following fleet types: Container
Updates the properties of a managed container fleet. Depending on the properties being updated, this operation might initiate a fleet deployment. You can track deployments for a fleet using https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetDeployment.html.
Request options
As with CreateContainerFleet, many fleet properties use common defaults or are calculated based on the fleet's container group definitions.
Update fleet properties that result in a fleet deployment. Include only those properties that you want to change. Specify deployment configuration settings.
Update fleet properties that don't result in a fleet deployment. Include only those properties that you want to change.
Changes to the following properties initiate a fleet deployment:
GameServerContainerGroupDefinition
PerInstanceContainerGroupDefinition
GameServerContainerGroupsPerInstance
InstanceInboundPermissions
InstanceConnectionPortRange
LogConfiguration
Results
If successful, this operation updates the container fleet resource, and might initiate a new deployment of fleet resources using the deployment configuration provided. A deployment replaces existing fleet instances with new instances that are deployed with the updated fleet properties. The fleet is placed in UPDATING status until the deployment is complete, then return to ACTIVE.
You can have only one update deployment active at a time for a fleet. If a second update request initiates a deployment while another deployment is in progress, the first deployment is cancelled.
See also: AWS API Documentation
Request Syntax
client.update_container_fleet(
FleetId='string',
GameServerContainerGroupDefinitionName='string',
PerInstanceContainerGroupDefinitionName='string',
GameServerContainerGroupsPerInstance=123,
InstanceConnectionPortRange={
'FromPort': 123,
'ToPort': 123
},
InstanceInboundPermissionAuthorizations=[
{
'FromPort': 123,
'ToPort': 123,
'IpRange': 'string',
'Protocol': 'TCP'|'UDP'
},
],
InstanceInboundPermissionRevocations=[
{
'FromPort': 123,
'ToPort': 123,
'IpRange': 'string',
'Protocol': 'TCP'|'UDP'
},
],
DeploymentConfiguration={
'ProtectionStrategy': 'WITH_PROTECTION'|'IGNORE_PROTECTION',
'MinimumHealthyPercentage': 123,
'ImpairmentStrategy': 'MAINTAIN'|'ROLLBACK'
},
Description='string',
MetricGroups=[
'string',
],
NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
GameSessionCreationLimitPolicy={
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
LogConfiguration={
'LogDestination': 'NONE'|'CLOUDWATCH'|'S3',
'S3BucketName': 'string',
'LogGroupArn': 'string'
},
RemoveAttributes=[
'PER_INSTANCE_CONTAINER_GROUP_DEFINITION',
]
)
string
[REQUIRED]
A unique identifier for the container fleet to update. You can use either the fleet ID or ARN value.
string
The name or ARN value of a new game server container group definition to deploy on the fleet. If you're updating the fleet to a specific version of a container group definition, use the ARN value and include the version number. If you're updating the fleet to the latest version of a container group definition, you can use the name value. You can't remove a fleet's game server container group definition, you can only update or replace it with another definition.
Update a container group definition by calling UpdateContainerGroupDefinition. This operation creates a ContainerGroupDefinition resource with an incremented version.
string
The name or ARN value of a new per-instance container group definition to deploy on the fleet. If you're updating the fleet to a specific version of a container group definition, use the ARN value and include the version number. If you're updating the fleet to the latest version of a container group definition, you can use the name value.
Update a container group definition by calling UpdateContainerGroupDefinition. This operation creates a ContainerGroupDefinition resource with an incremented version.
To remove a fleet's per-instance container group definition, leave this parameter empty and use the parameter RemoveAttributes.
integer
The number of times to replicate the game server container group on each fleet instance. By default, Amazon GameLift Servers calculates the maximum number of game server container groups that can fit on each instance. You can remove this property value to use the calculated value, or set it manually. If you set this number manually, Amazon GameLift Servers uses your value as long as it's less than the calculated maximum.
dict
A revised set of port numbers to open on each fleet instance. By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. If you previously set this parameter manually, you can't reset this to use the calculated settings.
FromPort (integer) -- [REQUIRED]
Starting value for the port range.
ToPort (integer) -- [REQUIRED]
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
list
A set of ports to add to the container fleet's inbound permissions.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) -- [REQUIRED]
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) -- [REQUIRED]
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) -- [REQUIRED]
A 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]
The network communication protocol used by the fleet.
list
A set of ports to remove from the container fleet's inbound permissions.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) -- [REQUIRED]
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) -- [REQUIRED]
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) -- [REQUIRED]
A 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]
The network communication protocol used by the fleet.
dict
Instructions for how to deploy updates to a container fleet, if the fleet update initiates a deployment. The deployment configuration lets you determine how to replace fleet instances and what actions to take if the deployment fails.
ProtectionStrategy (string) --
Determines how fleet deployment activity affects active game sessions on the fleet. With protection, a deployment honors game session protection, and delays actions that would interrupt a protected active game session until the game session ends. Without protection, deployment activity can shut down all running tasks, including active game sessions, regardless of game session protection.
MinimumHealthyPercentage (integer) --
Sets a minimum level of healthy tasks to maintain during deployment activity.
ImpairmentStrategy (string) --
Determines what actions to take if a deployment fails. If the fleet is multi-location, this strategy applies across all fleet locations. With a rollback strategy, updated fleet instances are rolled back to the last successful deployment. Alternatively, you can maintain a few impaired containers for the purpose of debugging, while all other tasks return to the last successful deployment.
string
A meaningful description of the container fleet.
list
The name of an Amazon Web Services CloudWatch metric group to add this fleet to.
(string) --
string
The game session protection policy to apply to all new game sessions that are started in this fleet. Game sessions that already exist are not affected.
dict
A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
dict
The method for collecting container logs for the fleet.
LogDestination (string) --
The type of log collection to use for a fleet.
CLOUDWATCH -- (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define. This bucket must reside in the fleet's home Amazon Web Services Region.
NONE -- Don't collect container logs.
S3BucketName (string) --
If log destination is S3, logs are sent to the specified Amazon S3 bucket name.
LogGroupArn (string) --
If log destination is CLOUDWATCH, logs are sent to the specified log group in Amazon CloudWatch.
list
If set, this update removes a fleet's per-instance container group definition. You can't remove a fleet's game server container group definition.
(string) --
dict
Response Syntax
{
'ContainerFleet': {
'FleetId': 'string',
'FleetArn': 'string',
'FleetRoleArn': 'string',
'GameServerContainerGroupDefinitionName': 'string',
'GameServerContainerGroupDefinitionArn': 'string',
'PerInstanceContainerGroupDefinitionName': 'string',
'PerInstanceContainerGroupDefinitionArn': 'string',
'InstanceConnectionPortRange': {
'FromPort': 123,
'ToPort': 123
},
'InstanceInboundPermissions': [
{
'FromPort': 123,
'ToPort': 123,
'IpRange': 'string',
'Protocol': 'TCP'|'UDP'
},
],
'GameServerContainerGroupsPerInstance': 123,
'MaximumGameServerContainerGroupsPerInstance': 123,
'InstanceType': 'string',
'BillingType': 'ON_DEMAND'|'SPOT',
'Description': 'string',
'CreationTime': datetime(2015, 1, 1),
'MetricGroups': [
'string',
],
'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
'GameSessionCreationLimitPolicy': {
'NewGameSessionsPerCreator': 123,
'PolicyPeriodInMinutes': 123
},
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'DeploymentDetails': {
'LatestDeploymentId': 'string'
},
'LogConfiguration': {
'LogDestination': 'NONE'|'CLOUDWATCH'|'S3',
'S3BucketName': 'string',
'LogGroupArn': 'string'
},
'LocationAttributes': [
{
'Location': 'string',
'Status': 'PENDING'|'CREATING'|'CREATED'|'ACTIVATING'|'ACTIVE'|'UPDATING'|'DELETING',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
},
],
'PlayerGatewayMode': 'DISABLED'|'ENABLED'|'REQUIRED'
}
}
Response Structure
(dict) --
ContainerFleet (dict) --
A collection of container fleet objects for all fleets that match the request criteria.
FleetId (string) --
A unique identifier for the container fleet to retrieve.
FleetArn (string) --
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift fleet ARN, the resource ID matches the FleetId value.
FleetRoleArn (string) --
The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. See Set up an IAM service role. This fleet property can't be changed.
GameServerContainerGroupDefinitionName (string) --
The name of the fleet's game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.
GameServerContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's game server container group. The ARN value also identifies the specific container group definition version in use.
PerInstanceContainerGroupDefinitionName (string) --
The name of the fleet's per-instance container group definition.
PerInstanceContainerGroupDefinitionArn (string) --
The Amazon Resource Name ( ARN) that is assigned to the fleet's per-instance container group. The ARN value also identifies the specific container group definition version in use.
InstanceConnectionPortRange (dict) --
The set of port numbers to open on each instance in a container fleet. Connection ports are used by inbound traffic to connect with processes that are running in containers on the fleet.
FromPort (integer) --
Starting value for the port range.
ToPort (integer) --
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
InstanceInboundPermissions (list) --
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
(dict) --
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) --
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
ToPort (integer) --
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.
For fleets using Linux builds, only ports 22 and 1026-60000 are valid.
For fleets using Windows builds, only ports 1026-60000 are valid.
IpRange (string) --
A 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) --
The network communication protocol used by the fleet.
GameServerContainerGroupsPerInstance (integer) --
The number of times to replicate the game server container group on each fleet instance.
MaximumGameServerContainerGroupsPerInstance (integer) --
The calculated maximum number of game server container group that can be deployed on each fleet instance. The calculation depends on the resource needs of the container group and the CPU and memory resources of the fleet's instance type.
InstanceType (string) --
The Amazon EC2 instance type to use for all instances in the fleet. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity. You can't update this fleet property.
BillingType (string) --
Indicates whether the fleet uses On-Demand or Spot instances for this fleet. Learn more about when to use On-Demand versus Spot Instances. You can't update this fleet property.
By default, this property is set to ON_DEMAND.
Description (string) --
A meaningful description of the container fleet.
CreationTime (datetime) --
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
MetricGroups (list) --
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. Metric groups aggregate metrics for multiple fleets.
(string) --
NewGameSessionProtectionPolicy (string) --
Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using UpdateGameSession.
NoProtection -- Game sessions can be shut down during active gameplay.
FullProtection -- Game sessions in ACTIVE status can't be shut down.
GameSessionCreationLimitPolicy (dict) --
A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.
NewGameSessionsPerCreator (integer) --
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.
The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId) has created fewer than game session limit in the specified time period.
PolicyPeriodInMinutes (integer) --
The time span used in evaluating the resource creation limit policy.
Status (string) --
The current status of the container fleet.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
DeploymentDetails (dict) --
Information about the most recent deployment for the container fleet.
LatestDeploymentId (string) --
A unique identifier for a fleet deployment.
LogConfiguration (dict) --
The method that is used to collect container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs.
CLOUDWATCH -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define.
NONE -- Don't collect container logs.
LogDestination (string) --
The type of log collection to use for a fleet.
CLOUDWATCH -- (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.
S3 -- Store logs in an Amazon S3 bucket that you define. This bucket must reside in the fleet's home Amazon Web Services Region.
NONE -- Don't collect container logs.
S3BucketName (string) --
If log destination is S3, logs are sent to the specified Amazon S3 bucket name.
LogGroupArn (string) --
If log destination is CLOUDWATCH, logs are sent to the specified log group in Amazon CloudWatch.
LocationAttributes (list) --
Information about the container fleet's remote locations where fleet instances are deployed.
(dict) --
Details about a location in a multi-location container fleet.
Location (string) --
A location identifier.
Status (string) --
The status of fleet activity in the location.
PENDING -- A new container fleet has been requested.
CREATING -- A new container fleet resource is being created.
CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
ACTIVATING -- New container fleet instances are being deployed.
ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
PlayerGatewayStatus (string) --
The current status of player gateway in this location for this container fleet. Note, even if a container fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for this container fleet location.
DISABLED -- Player gateway is not available for this container fleet location.
PlayerGatewayMode (string) --
Indicates whether player gateway is enabled for this container fleet. Player gateway provides benefits such as DDoS protection with negligible impact to latency.
If ENABLED or REQUIRED, game clients can use player gateway to connect with the game server. If DISABLED, game clients cannot use player gateway. Instead, they have to directly connect to the game server.
{'GameSession': {'PlayerGatewayStatus': 'DISABLED | ENABLED'}}
This API works with the following fleet types: EC2, Anywhere, Container
Updates the mutable properties of a game session.
To update a game session, specify the game session ID and the values you want to change.
If successful, the updated GameSession object is returned.
See also: AWS API Documentation
Request Syntax
client.update_game_session(
GameSessionId='string',
MaximumPlayerSessionCount=123,
Name='string',
PlayerSessionCreationPolicy='ACCEPT_ALL'|'DENY_ALL',
ProtectionPolicy='NoProtection'|'FullProtection',
GameProperties=[
{
'Key': 'string',
'Value': 'string'
},
]
)
string
[REQUIRED]
A unique identifier for the game session to update.
integer
The maximum number of players that can be connected simultaneously to the game session.
string
A descriptive label that is associated with a game session. Session names do not need to be unique.
string
A policy that determines whether the game session is accepting new players.
string
Game session protection policy to apply to this game session only.
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.
list
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game properties in an active game session. This action adds new properties and modifies existing properties. There is no way to delete properties. For an example, see Update the value of a game property.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) -- [REQUIRED]
The game property identifier.
Value (string) -- [REQUIRED]
The game property value.
dict
Response Syntax
{
'GameSession': {
'GameSessionId': 'string',
'Name': 'string',
'FleetId': 'string',
'FleetArn': 'string',
'CreationTime': datetime(2015, 1, 1),
'TerminationTime': datetime(2015, 1, 1),
'CurrentPlayerSessionCount': 123,
'MaximumPlayerSessionCount': 123,
'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
'StatusReason': 'INTERRUPTED'|'TRIGGERED_ON_PROCESS_TERMINATE'|'FORCE_TERMINATED',
'GameProperties': [
{
'Key': 'string',
'Value': 'string'
},
],
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
'CreatorId': 'string',
'GameSessionData': 'string',
'MatchmakerData': 'string',
'Location': 'string',
'PlayerGatewayStatus': 'DISABLED'|'ENABLED'
}
}
Response Structure
(dict) --
GameSession (dict) --
The updated game session properties.
GameSessionId (string) --
A unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<location>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
Name (string) --
A descriptive label that is associated with a game session. Session names do not need to be unique.
FleetId (string) --
A unique identifier for the fleet that the game session is running on.
FleetArn (string) --
The Amazon Resource Name ( ARN) associated with the GameLift fleet that this game session is running on.
CreationTime (datetime) --
A 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) --
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
CurrentPlayerSessionCount (integer) --
Number of players currently in the game session.
MaximumPlayerSessionCount (integer) --
The maximum number of players that can be connected simultaneously to the game session.
Status (string) --
Current status of the game session. A game session must have an ACTIVE status to have player sessions.
StatusReason (string) --
Provides additional information about game session status.
INTERRUPTED -- The game session was hosted on an EC2 Spot instance that was reclaimed, causing the active game session to be stopped.
TRIGGERED_ON_PROCESS_TERMINATE – The game session was stopped by calling TerminateGameSession with the termination mode TRIGGER_ON_PROCESS_TERMINATE.
FORCE_TERMINATED – The game session was stopped by calling TerminateGameSession with the termination mode FORCE_TERMINATE.
GameProperties (list) --
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
(dict) --
This key-value pair can store custom data about a game session. For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"}.
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties.
Key (string) --
The game property identifier.
Value (string) --
The game property value.
IpAddress (string) --
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
DnsName (string) --
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.
Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Port (integer) --
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number.
PlayerSessionCreationPolicy (string) --
Indicates whether the game session is accepting new players.
CreatorId (string) --
A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
GameSessionData (string) --
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
MatchmakerData (string) --
Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill).
Location (string) --
The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such as us-west-2.
PlayerGatewayStatus (string) --
Indicates whether player gateway is available for use for this game session. Note, even if a fleet has PlayerGatewayMode configured as ENABLED, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see Amazon GameLift Servers service locations.
Possible values include:
ENABLED -- Player gateway is available for routing player connections for this game session.
DISABLED -- Player gateway is not available for this game session.