GameLift

Table of Contents

Client

class GameLift.Client

A low-level client representing Amazon GameLift:

import boto3

client = boto3.client('gamelift')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_alias(**kwargs)

Creates an alias and sets a target fleet. A fleet alias can be used in place of a fleet ID, such as when calling CreateGameSession from a game client or game service or adding destinations to a game session queue. By changing an alias's target fleet, you can switch your players to the new fleet without changing any other component. In production, this feature is particularly useful to redirect your player base seamlessly to the latest game server update.

Amazon GameLift supports two types of routing strategies for aliases: simple and terminal. Use a simple alias to point to an active fleet. Use a terminal alias to display a message to incoming traffic instead of routing players to an active fleet. This option is useful when a game server is no longer supported but you want to provide better messaging than a standard 404 error.

To create a fleet alias, specify an alias name, routing strategy, and optional description. If successful, a new alias record is returned, including an alias ID, which you can reference when creating a game session. To reassign the alias to another fleet ID, call UpdateAlias .

See also: AWS API Documentation

Request Syntax

response = client.create_alias(
    Name='string',
    Description='string',
    RoutingStrategy={
        'Type': 'SIMPLE'|'TERMINAL',
        'FleetId': 'string',
        'Message': 'string'
    }
)
Parameters
  • Name (string) --

    [REQUIRED]

    Descriptive label that is associated with an alias. Alias names do not need to be unique.

  • Description (string) -- Human-readable description of an alias.
  • RoutingStrategy (dict) --

    [REQUIRED]

    Object that specifies the fleet and routing type to use for the alias.

    • Type (string) --

      Type of routing strategy.

      Possible routing types include the following:

      • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.
      • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
    • FleetId (string) --

      Unique identifier for a fleet that the alias points to.

    • Message (string) --

      Message text to be used with a terminal routing strategy.

Return type

dict

Returns

Response Syntax

{
    'Alias': {
        'AliasId': 'string',
        'Name': 'string',
        'AliasArn': 'string',
        'Description': 'string',
        'RoutingStrategy': {
            'Type': 'SIMPLE'|'TERMINAL',
            'FleetId': 'string',
            'Message': 'string'
        },
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Alias (dict) --

      Object that describes the newly created alias record.

      • AliasId (string) --

        Unique identifier for an alias; alias IDs are unique within a region.

      • Name (string) --

        Descriptive label that is associated with an alias. Alias names do not need to be unique.

      • AliasArn (string) --

        Unique identifier for an alias; alias ARNs are unique across all regions.

      • Description (string) --

        Human-readable description of an alias.

      • RoutingStrategy (dict) --

        Alias configuration for the alias, including routing type and settings.

        • Type (string) --

          Type of routing strategy.

          Possible routing types include the following:

          • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.
          • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
        • FleetId (string) --

          Unique identifier for a fleet that the alias points to.

        • Message (string) --

          Message text to be used with a terminal routing strategy.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        Time stamp indicating when this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

create_build(**kwargs)

Creates a new Amazon GameLift build from a set of game server binary files stored in an Amazon Simple Storage Service (Amazon S3) location. When using this API call, you must create a .zip file containing all of the build files and store it in an Amazon S3 bucket under your AWS account. For help on packaging your build files and creating a build, see Uploading Your Game to Amazon GameLift .

Warning

Use this API action ONLY if you are storing your game build files in an Amazon S3 bucket in your AWS account. To create a build using files stored in a directory, use the CLI command ` upload-build http://docs.aws.amazon.com/cli/latest/reference/gamelift/upload-build.html`_ , which uploads the build files from a file location you specify and creates a build.

To create a new build using CreateBuild , identify the storage location and operating system of your game build. You also have the option of specifying a build name and version. If successful, this action creates a new build record with an unique build ID and in INITIALIZED status. Use the API call DescribeBuild to check the status of your build. A build must be in READY status before it can be used to create fleets to host your game.

See also: AWS API Documentation

Request Syntax

response = client.create_build(
    Name='string',
    Version='string',
    StorageLocation={
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string'
    },
    OperatingSystem='WINDOWS_2012'|'AMAZON_LINUX'
)
Parameters
  • Name (string) -- Descriptive label that is associated with a build. Build names do not need to be unique. You can use UpdateBuild to change this value later.
  • Version (string) -- Version that is associated with this build. Version strings do not need to be unique. You can use UpdateBuild to change this value later.
  • StorageLocation (dict) --

    Amazon S3 location of the game build files to be uploaded. The S3 bucket must be owned by the same AWS account that you're using to manage Amazon GameLift. It also must in the same region that you want to create a new build in. Before calling CreateBuild with this location, you must allow Amazon GameLift to access your Amazon S3 bucket (see Create a Build with Files in Amazon S3 ).

    • Bucket (string) --

      Amazon S3 bucket identifier. This is the name of your S3 bucket.

    • Key (string) --

      Name of the zip file containing your build files.

    • RoleArn (string) --

      Amazon Resource Name (ARN ) for the access role that allows Amazon GameLift to access your S3 bucket.

  • OperatingSystem (string) -- Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build. If your game build contains multiple executables, they all must run on the same operating system.
Return type

dict

Returns

Response Syntax

{
    'Build': {
        'BuildId': 'string',
        'Name': 'string',
        'Version': 'string',
        'Status': 'INITIALIZED'|'READY'|'FAILED',
        'SizeOnDisk': 123,
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
        'CreationTime': datetime(2015, 1, 1)
    },
    'UploadCredentials': {
        'AccessKeyId': 'string',
        'SecretAccessKey': 'string',
        'SessionToken': 'string'
    },
    'StorageLocation': {
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Build (dict) --

      The newly created build record, including a unique build ID and status.

      • BuildId (string) --

        Unique identifier for a build.

      • Name (string) --

        Descriptive label that is associated with a build. Build names do not need to be unique. It can be set using CreateBuild or UpdateBuild .

      • Version (string) --

        Version that is associated with this build. Version strings do not need to be unique. This value can be set using CreateBuild or UpdateBuild .

      • Status (string) --

        Current status of the build.

        Possible build statuses include the following:

        • INITIALIZED – A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value.
        • READY – The game build has been successfully uploaded. You can now create new fleets for this build.
        • FAILED – The game build upload failed. You cannot create new fleets for this build.
      • SizeOnDisk (integer) --

        File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED , this value is 0.

      • OperatingSystem (string) --

        Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

    • UploadCredentials (dict) --

      This element is not currently in use.

      • AccessKeyId (string) --

        Access key for an AWS account.

      • SecretAccessKey (string) --

        Secret key for an AWS account.

      • SessionToken (string) --

        Token specific to a build ID.

    • StorageLocation (dict) --

      Amazon S3 location specified in the request.

      • Bucket (string) --

        Amazon S3 bucket identifier. This is the name of your S3 bucket.

      • Key (string) --

        Name of the zip file containing your build files.

      • RoleArn (string) --

        Amazon Resource Name (ARN ) for the access role that allows Amazon GameLift to access your S3 bucket.

create_fleet(**kwargs)

Creates a new fleet to run your game servers. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple server processes to host game sessions. You configure a fleet to create instances with certain hardware specifications (see Amazon EC2 Instance Types for more information), and deploy a specified game build to each instance. A newly created fleet passes through several statuses; once it reaches the ACTIVE status, it can begin hosting game sessions.

To create a new fleet, provide a fleet name, an EC2 instance type, and a build ID of the game build to deploy. You can also configure the new fleet with the following settings: (1) a runtime configuration describing what server processes to run on each instance in the fleet (required to create fleet), (2) access permissions for inbound traffic, (3) fleet-wide game session protection, and (4) the location of default log files for Amazon GameLift to upload and store.

If the CreateFleet call is successful, Amazon GameLift performs the following tasks:

  • Creates a fleet record and sets the status to NEW (followed by other statuses as the fleet is activated).
  • Sets the fleet's capacity to 1 "desired", which causes Amazon GameLift to start one new EC2 instance.
  • Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, Amazon GameLift staggers each launch by a few seconds.
  • Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console.
  • Sets the fleet's status to ACTIVE once one server process in the fleet is ready to host a game session.

After a fleet is created, use the following actions to change fleet properties and configuration:

  • UpdateFleetAttributes -- Update fleet metadata, including name and description.
  • UpdateFleetCapacity -- Increase or decrease the number of instances you want the fleet to maintain.
  • UpdateFleetPortSettings -- Change the IP address and port ranges that allow access to incoming traffic.
  • UpdateRuntimeConfiguration -- Change how server processes are launched in the fleet, including launch path, launch parameters, and the number of concurrent processes.
  • PutScalingPolicy -- Create or update rules that are used to set the fleet's capacity (autoscaling).

See also: AWS API Documentation

Request Syntax

response = client.create_fleet(
    Name='string',
    Description='string',
    BuildId='string',
    ServerLaunchPath='string',
    ServerLaunchParameters='string',
    LogPaths=[
        'string',
    ],
    EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
    EC2InboundPermissions=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ],
    NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
    RuntimeConfiguration={
        'ServerProcesses': [
            {
                'LaunchPath': 'string',
                'Parameters': 'string',
                'ConcurrentExecutions': 123
            },
        ]
    },
    ResourceCreationLimitPolicy={
        'NewGameSessionsPerCreator': 123,
        'PolicyPeriodInMinutes': 123
    }
)
Parameters
  • Name (string) --

    [REQUIRED]

    Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

  • Description (string) -- Human-readable description of a fleet.
  • BuildId (string) --

    [REQUIRED]

    Unique identifier for a build to be deployed on the new fleet. The build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.

  • ServerLaunchPath (string) -- This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.)
  • ServerLaunchParameters (string) -- This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.)
  • LogPaths (list) --

    This parameter is no longer used. Instead, to specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API ProcessReady() and specify one or more directory paths in logParameters . See more information in the Server API Reference .

    • (string) --
  • EC2InstanceType (string) --

    [REQUIRED]

    Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

  • EC2InboundPermissions (list) --

    Range of IP addresses and port settings that permit inbound traffic to access server processes running on the fleet. If no inbound permissions are set, including both IP address range and port range, the server processes in the fleet cannot accept connections. You can specify one or more sets of permissions for a fleet.

    • (dict) --

      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on Amazon GameLift. Each game session hosted on a fleet is assigned a unique combination of IP address and port number, which must fall into the fleet's allowed ranges. This combination is included in the GameSession object.

      • FromPort (integer) -- [REQUIRED]

        Starting value for a range of allowed port numbers.

      • ToPort (integer) -- [REQUIRED]

        Ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort .

      • IpRange (string) -- [REQUIRED]

        Range of allowed IP addresses. This value must be expressed in CIDR notation. Example: "000.000.000.000/[subnet mask] " or optionally the shortened version "0.0.0.0/[subnet mask] ".

      • Protocol (string) -- [REQUIRED]

        Network communication protocol used by the fleet.

  • NewGameSessionProtectionPolicy (string) --

    Game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using UpdateFleetAttributes, but this change will only affect sessions created after the policy change. You can also set protection for individual instances using UpdateGameSession .

    • NoProtection – The game session can be terminated during a scale-down event.
    • FullProtection – If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.
  • RuntimeConfiguration (dict) --

    Instructions for launching server processes on each instance in the fleet. The runtime configuration for a fleet has a collection of server process configurations, one for each type of server process to run on an instance. A server process configuration specifies the location of the server executable, launch parameters, and the number of concurrent processes with that configuration to maintain on each instance. A CreateFleet request must include a runtime configuration with at least one server process configuration; otherwise the request will fail with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters ; requests that contain values for these parameters instead of a runtime configuration will continue to work.)

    • ServerProcesses (list) --

      Collection of server process configurations describing what server processes to run on each instance in a fleet

      • (dict) --

        A set of instructions for launching server processes on each instance in a fleet. Each instruction set identifies the location of the server executable, optional launch parameters, and the number of server processes with this configuration to maintain concurrently on the instance. Server process configurations make up a fleet's `` RuntimeConfiguration `` .

        • LaunchPath (string) -- [REQUIRED]

          Location of the server executable in a game build. All game builds are installed on instances at the root : for Windows instances C:\game , and for Linux instances /local/game . A Windows game build with an executable file located at MyGame\latest\server.exe must have a launch path of "C:\game\MyGame\latest\server.exe ". A Linux game build with an executable file located at MyGame/latest/server.exe must have a launch path of "/local/game/MyGame/latest/server.exe ".

        • Parameters (string) --

          Optional list of parameters to pass to the server executable on launch.

        • ConcurrentExecutions (integer) -- [REQUIRED]

          Number of server processes using this configuration to run concurrently on an instance.

  • ResourceCreationLimitPolicy (dict) --

    Policy that limits the number of game sessions an individual player can create over a span of time for this fleet.

    • NewGameSessionsPerCreator (integer) --

      Maximum number of game sessions that an individual can create during the policy period.

    • PolicyPeriodInMinutes (integer) --

      Time span used in evaluating the resource creation limit policy.

Return type

dict

Returns

Response Syntax

{
    'FleetAttributes': {
        'FleetId': 'string',
        'FleetArn': 'string',
        'Description': 'string',
        'Name': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'TerminationTime': datetime(2015, 1, 1),
        'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED',
        'BuildId': 'string',
        'ServerLaunchPath': 'string',
        'ServerLaunchParameters': 'string',
        'LogPaths': [
            'string',
        ],
        'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
        'ResourceCreationLimitPolicy': {
            'NewGameSessionsPerCreator': 123,
            'PolicyPeriodInMinutes': 123
        }
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetAttributes (dict) --

      Properties for the newly created fleet.

      • FleetId (string) --

        Unique identifier for a fleet.

      • FleetArn (string) --

        Identifier for a fleet that is unique across all regions.

      • Description (string) --

        Human-readable description of the fleet.

      • Name (string) --

        Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • TerminationTime (datetime) --

        Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • Status (string) --

        Current status of the fleet.

        Possible fleet statuses include the following:

        • NEW – A new fleet has been defined and desired instances is set to 1.
        • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING – Amazon GameLift is setting up the new fleet, creating new instances with the game build and starting server processes.
        • ACTIVE – Hosts can now accept game sessions.
        • ERROR – An error occurred when downloading, validating, building, or activating the fleet.
        • DELETING – Hosts are responding to a delete fleet request.
        • TERMINATED – The fleet no longer exists.
      • BuildId (string) --

        Unique identifier for a build.

      • ServerLaunchPath (string) --

        Path to a game server executable in the fleet's build, specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for fleets created after this date are specified in the fleet's RuntimeConfiguration .

      • ServerLaunchParameters (string) --

        Game server launch parameters specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after this date are specified in the fleet's RuntimeConfiguration .

      • LogPaths (list) --

        Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide . If no default log path for a fleet is specified, Amazon GameLift will automatically upload logs that are stored on each instance at C:\game\logs (for Windows) or /local/game/logs (for Linux). Use the Amazon GameLift console to access stored logs.

        • (string) --
      • NewGameSessionProtectionPolicy (string) --

        Type of game session protection to set for all new instances started in the fleet.

        • NoProtection – The game session can be terminated during a scale-down event.
        • FullProtection – If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.
      • OperatingSystem (string) --

        Operating system of the fleet's computing resources. A fleet's operating system depends on the OS specified for the build that is deployed on this fleet.

      • ResourceCreationLimitPolicy (dict) --

        Fleet policy to limit the number of game sessions an individual player can create over a span of time.

        • NewGameSessionsPerCreator (integer) --

          Maximum number of game sessions that an individual can create during the policy period.

        • PolicyPeriodInMinutes (integer) --

          Time span used in evaluating the resource creation limit policy.

create_game_session(**kwargs)

Creates a multiplayer game session for players. This action creates a game session record and assigns an available server process in the specified fleet to host the game session. A fleet must have an ACTIVE status before a game session can be created in it.

To create a game session, specify either fleet ID or alias ID and indicate a maximum number of players to allow in the game session. You can also provide a name and game-specific properties for this game session. If successful, a GameSession object is returned containing game session properties, including a game session ID with the custom string you provided.

Idempotency tokens. You can add a token that uniquely identifies game session requests. This is useful for ensuring that game session requests are idempotent. Multiple requests with the same idempotency token are processed only once; subsequent requests return the original result. All response values are the same with the exception of game session status, which may change.

Resource creation limits. If you are creating a game session on a fleet with a resource creation limit policy in force, then you must specify a creator ID. Without this ID, Amazon GameLift has no way to evaluate the policy for this new game session request.

By default, newly created game sessions allow new players to join. Use UpdateGameSession to change the game session's player session creation policy.

Available in Amazon GameLift Local.

See also: AWS API Documentation

Request Syntax

response = client.create_game_session(
    FleetId='string',
    AliasId='string',
    MaximumPlayerSessionCount=123,
    Name='string',
    GameProperties=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    CreatorId='string',
    GameSessionId='string',
    IdempotencyToken='string'
)
Parameters
  • FleetId (string) -- Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.
  • AliasId (string) -- Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.
  • MaximumPlayerSessionCount (integer) --

    [REQUIRED]

    Maximum number of players that can be connected simultaneously to the game session.

  • Name (string) -- Descriptive label that is associated with a game session. Session names do not need to be unique.
  • GameProperties (list) --

    Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

    • (dict) --

      Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

      • Key (string) -- [REQUIRED]

        TBD

      • Value (string) -- [REQUIRED]

        TBD

  • CreatorId (string) -- Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions one player can have.
  • GameSessionId (string) -- This parameter is no longer preferred. Please 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. (A game session ID has the following format: arn:aws:gamelift:region::gamesession/fleet ID/custom ID string or idempotency token .)
  • IdempotencyToken (string) -- 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. (A game session ID has the following format: arn:aws:gamelift:region::gamesession/fleet ID/custom ID string or idempotency token .)
Return type

dict

Returns

Response Syntax

{
    'GameSession': {
        'GameSessionId': 'string',
        'Name': 'string',
        'FleetId': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'TerminationTime': datetime(2015, 1, 1),
        'CurrentPlayerSessionCount': 123,
        'MaximumPlayerSessionCount': 123,
        'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
        'GameProperties': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'IpAddress': 'string',
        'Port': 123,
        'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
        'CreatorId': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSession (dict) --

      Object that describes the newly created game session record.

      • GameSessionId (string) --

        Unique identifier for the game session. A game session ID has the following format: arn:aws:gamelift:region::gamesession/fleet ID/custom ID string or idempotency token .

      • Name (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • FleetId (string) --

        Unique identifier for a fleet the game session is running on.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • TerminationTime (datetime) --

        Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • CurrentPlayerSessionCount (integer) --

        Number of players currently in the game session.

      • MaximumPlayerSessionCount (integer) --

        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.

      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • IpAddress (string) --

        IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

      • Port (integer) --

        Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

      • PlayerSessionCreationPolicy (string) --

        Indicates whether or not the game session is accepting new players.

      • CreatorId (string) --

        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.

create_game_session_queue(**kwargs)

Establishes a new queue for processing requests to place new game sessions. A queue identifies where new game sessions can be hosted -- by specifying a list of destinations (fleets or aliases) -- and how long requests can wait in the queue before timing out. You can set up a queue to try to place game sessions on fleets in multiple regions. To add placement requests to a queue, call StartGameSessionPlacement and reference the queue name.

Destination order. When processing a request for a game session, Amazon GameLift tries each destination in order until it finds one with available resources to host the new game session. A queue's default order is determined by how destinations are listed. The default order is overridden when a game session placement request provides player latency information. Player latency information enables Amazon GameLift to prioritize destinations where players report the lowest average latency, as a result placing the new game session where the majority of players will have the best possible gameplay experience.

Player latency policies. For placement requests containing player latency information, use player latency policies to protect individual players from very high latencies. With a latency cap, even when a destination can deliver a low latency for most players, the game is not placed where any individual player is reporting latency higher than a policy's maximum. A queue can have multiple latency policies, which are enforced consecutively starting with the policy with the lowest latency cap. Use multiple policies to gradually relax latency controls; for example, you might set a policy with a low latency cap for the first 60 seconds, a second policy with a higher cap for the next 60 seconds, etc.

To create a new queue, provide a name, timeout value, a list of destinations and, if desired, a set of latency policies. If successful, a new queue object is returned.

See also: AWS API Documentation

Request Syntax

response = client.create_game_session_queue(
    Name='string',
    TimeoutInSeconds=123,
    PlayerLatencyPolicies=[
        {
            'MaximumIndividualPlayerLatencyMilliseconds': 123,
            'PolicyDurationSeconds': 123
        },
    ],
    Destinations=[
        {
            'DestinationArn': 'string'
        },
    ]
)
Parameters
  • Name (string) --

    [REQUIRED]

    Descriptive label that is associated with queue. Queue names must be unique within each region.

  • TimeoutInSeconds (integer) -- Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.
  • PlayerLatencyPolicies (list) --

    Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. A player latency policy must set a value for MaximumIndividualPlayerLatencyMilliseconds; if none is set, this API requests will fail.

    • (dict) --

      Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.

      Latency policy-related operations include:

      • CreateGameSessionQueue
      • UpdateGameSessionQueue
      • StartGameSessionPlacement
      • MaximumIndividualPlayerLatencyMilliseconds (integer) --

        The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.

      • PolicyDurationSeconds (integer) --

        The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.

  • Destinations (list) --

    List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

    • (dict) --

      Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination configured for a queue.

      • DestinationArn (string) --

        Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

Return type

dict

Returns

Response Syntax

{
    'GameSessionQueue': {
        'Name': 'string',
        'GameSessionQueueArn': 'string',
        'TimeoutInSeconds': 123,
        'PlayerLatencyPolicies': [
            {
                'MaximumIndividualPlayerLatencyMilliseconds': 123,
                'PolicyDurationSeconds': 123
            },
        ],
        'Destinations': [
            {
                'DestinationArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessionQueue (dict) --

      Object that describes the newly created game session queue.

      • Name (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • GameSessionQueueArn (string) --

        Amazon Resource Name (ARN ) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:region::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

      • TimeoutInSeconds (integer) --

        Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

      • PlayerLatencyPolicies (list) --

        Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement.

        • (dict) --

          Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.

          Latency policy-related operations include:

          • CreateGameSessionQueue
          • UpdateGameSessionQueue
          • StartGameSessionPlacement
          • MaximumIndividualPlayerLatencyMilliseconds (integer) --

            The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.

          • PolicyDurationSeconds (integer) --

            The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.

      • Destinations (list) --

        List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

        • (dict) --

          Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination configured for a queue.

          • DestinationArn (string) --

            Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

create_player_session(**kwargs)

Adds a player to a game session and creates a player session record. Before a player can be added, a game session must have an ACTIVE status, have a creation policy of ALLOW_ALL , and have an open player slot. To add a group of players to a game session, use CreatePlayerSessions .

To create a player session, specify a game session ID, player ID, and optionally a string of player data. If successful, the player is added to the game session and a new PlayerSession object is returned. Player sessions cannot be updated.

Available in Amazon GameLift Local.

See also: AWS API Documentation

Request Syntax

response = client.create_player_session(
    GameSessionId='string',
    PlayerId='string',
    PlayerData='string'
)
Parameters
  • GameSessionId (string) --

    [REQUIRED]

    Unique identifier for the game session to add a player to.

  • PlayerId (string) --

    [REQUIRED]

    Unique identifier for a player. Player IDs are developer-defined.

  • PlayerData (string) -- Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.
Return type

dict

Returns

Response Syntax

{
    'PlayerSession': {
        'PlayerSessionId': 'string',
        'PlayerId': 'string',
        'GameSessionId': 'string',
        'FleetId': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'TerminationTime': datetime(2015, 1, 1),
        'Status': 'RESERVED'|'ACTIVE'|'COMPLETED'|'TIMEDOUT',
        'IpAddress': 'string',
        'Port': 123,
        'PlayerData': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • PlayerSession (dict) --

      Object that describes the newly created player session record.

      • PlayerSessionId (string) --

        Unique identifier for a player session.

      • PlayerId (string) --

        Unique identifier for a player that is associated with this player session.

      • GameSessionId (string) --

        Unique identifier for the game session that the player session is connected to.

      • FleetId (string) --

        Unique identifier for a fleet that the player's game session is running on.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • TerminationTime (datetime) --

        Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • Status (string) --

        Current status of the player session.

        Possible player session statuses include the following:

        • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.
        • ACTIVE – The player has been validated by the server process and is currently connected.
        • COMPLETED – The player connection has been dropped.
        • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
      • IpAddress (string) --

        IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

      • Port (integer) --

        Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.

      • PlayerData (string) --

        Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

create_player_sessions(**kwargs)

Adds a group of players to a game session. This action is useful with a team matching feature. Before players can be added, a game session must have an ACTIVE status, have a creation policy of ALLOW_ALL , and have an open player slot. To add a single player to a game session, use CreatePlayerSession .

To create player sessions, specify a game session ID, a list of player IDs, and optionally a set of player data strings. If successful, the players are added to the game session and a set of new PlayerSession objects is returned. Player sessions cannot be updated.

Available in Amazon GameLift Local.

See also: AWS API Documentation

Request Syntax

response = client.create_player_sessions(
    GameSessionId='string',
    PlayerIds=[
        'string',
    ],
    PlayerDataMap={
        'string': 'string'
    }
)
Parameters
  • GameSessionId (string) --

    [REQUIRED]

    Unique identifier for the game session to add players to.

  • PlayerIds (list) --

    [REQUIRED]

    List of unique identifiers for the players to be added.

    • (string) --
  • PlayerDataMap (dict) --

    Map of string pairs, each specifying a player ID and a set of developer-defined information related to the player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Player data strings for player IDs not included in the PlayerIds parameter are ignored.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{
    'PlayerSessions': [
        {
            'PlayerSessionId': 'string',
            'PlayerId': 'string',
            'GameSessionId': 'string',
            'FleetId': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'Status': 'RESERVED'|'ACTIVE'|'COMPLETED'|'TIMEDOUT',
            'IpAddress': 'string',
            'Port': 123,
            'PlayerData': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • PlayerSessions (list) --

      Collection of player session objects created for the added players.

      • (dict) --

        Properties describing a player session. A player session represents either a player reservation for a game session or actual player activity in a game session. A player session object (including player data) is automatically passed to a game session when the player connects to the game session and is validated.

        Player session-related operations include:

        • CreatePlayerSession
        • CreatePlayerSessions
        • DescribePlayerSessions
        • PlayerSessionId (string) --

          Unique identifier for a player session.

        • PlayerId (string) --

          Unique identifier for a player that is associated with this player session.

        • GameSessionId (string) --

          Unique identifier for the game session that the player session is connected to.

        • FleetId (string) --

          Unique identifier for a fleet that the player's game session is running on.

        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • TerminationTime (datetime) --

          Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • Status (string) --

          Current status of the player session.

          Possible player session statuses include the following:

          • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.
          • ACTIVE – The player has been validated by the server process and is currently connected.
          • COMPLETED – The player connection has been dropped.
          • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
        • IpAddress (string) --

          IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        • Port (integer) --

          Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.

        • PlayerData (string) --

          Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

delete_alias(**kwargs)

Deletes a fleet alias. This action removes all record of the alias. Game clients attempting to access a server process using the deleted alias receive an error. To delete an alias, specify the alias ID to be deleted.

See also: AWS API Documentation

Request Syntax

response = client.delete_alias(
    AliasId='string'
)
Parameters
AliasId (string) --

[REQUIRED]

Unique identifier for a fleet alias. Specify the alias you want to delete.

Returns
None
delete_build(**kwargs)

Deletes a build. This action permanently deletes the build record and any uploaded build files.

To delete a build, specify its ID. Deleting a build does not affect the status of any active fleets using the build, but you can no longer create new fleets with the deleted build.

See also: AWS API Documentation

Request Syntax

response = client.delete_build(
    BuildId='string'
)
Parameters
BuildId (string) --

[REQUIRED]

Unique identifier for a build to delete.

Returns
None
delete_fleet(**kwargs)

Deletes everything related to a fleet. Before deleting a fleet, you must set the fleet's desired capacity to zero. See UpdateFleetCapacity .

This action removes the fleet's resources and the fleet record. Once a fleet is deleted, you can no longer use that fleet.

See also: AWS API Documentation

Request Syntax

response = client.delete_fleet(
    FleetId='string'
)
Parameters
FleetId (string) --

[REQUIRED]

Unique identifier for a fleet to be deleted.

Returns
None
delete_game_session_queue(**kwargs)

Deletes a game session queue. This action means that any StartGameSessionPlacement requests that reference this queue will fail. To delete a queue, specify the queue name.

See also: AWS API Documentation

Request Syntax

response = client.delete_game_session_queue(
    Name='string'
)
Parameters
Name (string) --

[REQUIRED]

Descriptive label that is associated with queue. Queue names must be unique within each region.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --
delete_scaling_policy(**kwargs)

Deletes a fleet scaling policy. This action means that the policy is no longer in force and removes all record of it. To delete a scaling policy, specify both the scaling policy name and the fleet ID it is associated with.

See also: AWS API Documentation

Request Syntax

response = client.delete_scaling_policy(
    Name='string',
    FleetId='string'
)
Parameters
  • Name (string) --

    [REQUIRED]

    Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to be deleted.

Returns

None

describe_alias(**kwargs)

Retrieves properties for a fleet alias. This operation returns all alias metadata and settings. To get just the fleet ID an alias is currently pointing to, use ResolveAlias .

To get alias properties, specify the alias ID. If successful, an Alias object is returned.

See also: AWS API Documentation

Request Syntax

response = client.describe_alias(
    AliasId='string'
)
Parameters
AliasId (string) --

[REQUIRED]

Unique identifier for a fleet alias. Specify the alias you want to retrieve.

Return type
dict
Returns
Response Syntax
{
    'Alias': {
        'AliasId': 'string',
        'Name': 'string',
        'AliasArn': 'string',
        'Description': 'string',
        'RoutingStrategy': {
            'Type': 'SIMPLE'|'TERMINAL',
            'FleetId': 'string',
            'Message': 'string'
        },
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Alias (dict) --

      Object that contains the requested alias.

      • AliasId (string) --

        Unique identifier for an alias; alias IDs are unique within a region.

      • Name (string) --

        Descriptive label that is associated with an alias. Alias names do not need to be unique.

      • AliasArn (string) --

        Unique identifier for an alias; alias ARNs are unique across all regions.

      • Description (string) --

        Human-readable description of an alias.

      • RoutingStrategy (dict) --

        Alias configuration for the alias, including routing type and settings.

        • Type (string) --

          Type of routing strategy.

          Possible routing types include the following:

          • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.
          • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
        • FleetId (string) --

          Unique identifier for a fleet that the alias points to.

        • Message (string) --

          Message text to be used with a terminal routing strategy.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        Time stamp indicating when this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

describe_build(**kwargs)

Retrieves properties for a build. To get a build record, specify a build ID. If successful, an object containing the build properties is returned.

See also: AWS API Documentation

Request Syntax

response = client.describe_build(
    BuildId='string'
)
Parameters
BuildId (string) --

[REQUIRED]

Unique identifier for a build to retrieve properties for.

Return type
dict
Returns
Response Syntax
{
    'Build': {
        'BuildId': 'string',
        'Name': 'string',
        'Version': 'string',
        'Status': 'INITIALIZED'|'READY'|'FAILED',
        'SizeOnDisk': 123,
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
        'CreationTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Build (dict) --

      Set of properties describing the requested build.

      • BuildId (string) --

        Unique identifier for a build.

      • Name (string) --

        Descriptive label that is associated with a build. Build names do not need to be unique. It can be set using CreateBuild or UpdateBuild .

      • Version (string) --

        Version that is associated with this build. Version strings do not need to be unique. This value can be set using CreateBuild or UpdateBuild .

      • Status (string) --

        Current status of the build.

        Possible build statuses include the following:

        • INITIALIZED – A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value.
        • READY – The game build has been successfully uploaded. You can now create new fleets for this build.
        • FAILED – The game build upload failed. You cannot create new fleets for this build.
      • SizeOnDisk (integer) --

        File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED , this value is 0.

      • OperatingSystem (string) --

        Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

describe_ec2_instance_limits(**kwargs)

Retrieves the following information for the specified EC2 instance type:

  • maximum number of instances allowed per AWS account (service limit)
  • current usage level for the AWS account

Service limits vary depending on region. Available regions for Amazon GameLift can be found in the AWS Management Console for Amazon GameLift (see the drop-down list in the upper right corner).

See also: AWS API Documentation

Request Syntax

response = client.describe_ec2_instance_limits(
    EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'
)
Parameters
EC2InstanceType (string) -- Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions. Leave this parameter blank to retrieve limits for all types.
Return type
dict
Returns
Response Syntax
{
    'EC2InstanceLimits': [
        {
            'EC2InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
            'CurrentInstances': 123,
            'InstanceLimit': 123
        },
    ]
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • EC2InstanceLimits (list) --

      Object that contains the maximum number of instances for the specified instance type.

      • (dict) --

        Maximum number of instances allowed based on the Amazon Elastic Compute Cloud (Amazon EC2) instance type. Instance limits can be retrieved by calling DescribeEC2InstanceLimits .

        • EC2InstanceType (string) --

          Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

        • CurrentInstances (integer) --

          Number of instances of the specified type that are currently in use by this AWS account.

        • InstanceLimit (integer) --

          Number of instances allowed.

describe_fleet_attributes(**kwargs)

Retrieves fleet properties, including metadata, status, and configuration, for one or more fleets. You can request attributes for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetAttributes object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.

Note

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_attributes(
    FleetIds=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetIds (list) --

    Unique identifier for a fleet(s) to retrieve attributes for. To request attributes for all fleets, leave this parameter empty.

    • (string) --
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.
Return type

dict

Returns

Response Syntax

{
    'FleetAttributes': [
        {
            'FleetId': 'string',
            'FleetArn': 'string',
            'Description': 'string',
            'Name': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED',
            'BuildId': 'string',
            'ServerLaunchPath': 'string',
            'ServerLaunchParameters': 'string',
            'LogPaths': [
                'string',
            ],
            'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
            'ResourceCreationLimitPolicy': {
                'NewGameSessionsPerCreator': 123,
                'PolicyPeriodInMinutes': 123
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetAttributes (list) --

      Collection of objects containing attribute metadata for each requested fleet ID.

      • (dict) --

        General properties describing a fleet.

        • FleetId (string) --

          Unique identifier for a fleet.

        • FleetArn (string) --

          Identifier for a fleet that is unique across all regions.

        • Description (string) --

          Human-readable description of the fleet.

        • Name (string) --

          Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • TerminationTime (datetime) --

          Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • Status (string) --

          Current status of the fleet.

          Possible fleet statuses include the following:

          • NEW – A new fleet has been defined and desired instances is set to 1.
          • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING – Amazon GameLift is setting up the new fleet, creating new instances with the game build and starting server processes.
          • ACTIVE – Hosts can now accept game sessions.
          • ERROR – An error occurred when downloading, validating, building, or activating the fleet.
          • DELETING – Hosts are responding to a delete fleet request.
          • TERMINATED – The fleet no longer exists.
        • BuildId (string) --

          Unique identifier for a build.

        • ServerLaunchPath (string) --

          Path to a game server executable in the fleet's build, specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for fleets created after this date are specified in the fleet's RuntimeConfiguration .

        • ServerLaunchParameters (string) --

          Game server launch parameters specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after this date are specified in the fleet's RuntimeConfiguration .

        • LogPaths (list) --

          Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide . If no default log path for a fleet is specified, Amazon GameLift will automatically upload logs that are stored on each instance at C:\game\logs (for Windows) or /local/game/logs (for Linux). Use the Amazon GameLift console to access stored logs.

          • (string) --
        • NewGameSessionProtectionPolicy (string) --

          Type of game session protection to set for all new instances started in the fleet.

          • NoProtection – The game session can be terminated during a scale-down event.
          • FullProtection – If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.
        • OperatingSystem (string) --

          Operating system of the fleet's computing resources. A fleet's operating system depends on the OS specified for the build that is deployed on this fleet.

        • ResourceCreationLimitPolicy (dict) --

          Fleet policy to limit the number of game sessions an individual player can create over a span of time.

          • NewGameSessionsPerCreator (integer) --

            Maximum number of game sessions that an individual can create during the policy period.

          • PolicyPeriodInMinutes (integer) --

            Time span used in evaluating the resource creation limit policy.

    • NextToken (string) --

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

describe_fleet_capacity(**kwargs)

Retrieves the current status of fleet capacity for one or more fleets. This information includes the number of instances that have been requested for the fleet and the number currently active. You can request capacity for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetCapacity object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.

Note

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_capacity(
    FleetIds=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetIds (list) --

    Unique identifier for a fleet(s) to retrieve capacity information for. To request capacity information for all fleets, leave this parameter empty.

    • (string) --
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.
Return type

dict

Returns

Response Syntax

{
    'FleetCapacity': [
        {
            'FleetId': 'string',
            'InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
            'InstanceCounts': {
                'DESIRED': 123,
                'MINIMUM': 123,
                'MAXIMUM': 123,
                'PENDING': 123,
                'ACTIVE': 123,
                'IDLE': 123,
                'TERMINATING': 123
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetCapacity (list) --

      Collection of objects containing capacity information for each requested fleet ID. Leave this parameter empty to retrieve capacity information for all fleets.

      • (dict) --

        Information about the fleet's capacity. Fleet capacity is measured in EC2 instances. By default, new fleets have a capacity of one instance, but can be updated as needed. The maximum number of instances for a fleet is determined by the fleet's instance type.

        • FleetId (string) --

          Unique identifier for a fleet.

        • InstanceType (string) --

          Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

        • InstanceCounts (dict) --

          Current status of fleet capacity.

          • DESIRED (integer) --

            Ideal number of active instances in the fleet.

          • MINIMUM (integer) --

            Minimum value allowed for the fleet's instance count.

          • MAXIMUM (integer) --

            Maximum value allowed for the fleet's instance count.

          • PENDING (integer) --

            Number of instances in the fleet that are starting but not yet active.

          • ACTIVE (integer) --

            Actual number of active instances in the fleet.

          • IDLE (integer) --

            Number of active instances in the fleet that are not currently hosting a game session.

          • TERMINATING (integer) --

            Number of instances in the fleet that are no longer active but haven't yet been terminated.

    • NextToken (string) --

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

describe_fleet_events(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_events(
    FleetId='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to get event logs for.

  • StartTime (datetime) -- Earliest date to retrieve event logs for. If no start time is specified, this call returns entries starting from when the fleet was created to the specified end time. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
  • EndTime (datetime) -- Most recent date to retrieve event logs for. If no end time is specified, this call returns entries from the specified start time up to the present. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Events (list) --

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

      • (dict) --

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

        • EventId (string) --

          Unique identifier for a fleet event.

        • ResourceId (string) --

          Unique identifier for an event resource, such as a fleet ID.

        • EventCode (string) --

          Type of event being logged.

        • Message (string) --

          Additional information related to the event.

        • EventTime (datetime) --

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

    • NextToken (string) --

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

describe_fleet_port_settings(**kwargs)

Retrieves the inbound connection permissions for a fleet. Connection permissions include a range of IP addresses and port settings that incoming traffic can use to access server processes in the fleet. To get a fleet's inbound connection permissions, specify a fleet ID. If successful, a collection of IpPermission objects is returned for the requested fleet ID. If the requested fleet has been deleted, the result set is empty.

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_port_settings(
    FleetId='string'
)
Parameters
FleetId (string) --

[REQUIRED]

Unique identifier for a fleet to retrieve port settings for.

Return type
dict
Returns
Response Syntax
{
    'InboundPermissions': [
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • InboundPermissions (list) --

      Object that contains port settings for the requested fleet ID.

      • (dict) --

        A range of IP addresses and port settings that allow inbound traffic to connect to server processes on Amazon GameLift. Each game session hosted on a fleet is assigned a unique combination of IP address and port number, which must fall into the fleet's allowed ranges. This combination is included in the GameSession object.

        • FromPort (integer) --

          Starting value for a range of allowed port numbers.

        • ToPort (integer) --

          Ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort .

        • IpRange (string) --

          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) --

          Network communication protocol used by the fleet.

describe_fleet_utilization(**kwargs)

Retrieves utilization statistics for one or more fleets. You can request utilization data for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetUtilization object is returned for each requested fleet ID. When specifying a list of fleet IDs, utilization objects are returned only for fleets that currently exist.

Note

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_utilization(
    FleetIds=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetIds (list) --

    Unique identifier for a fleet(s) to retrieve utilization data for. To request utilization data for all fleets, leave this parameter empty.

    • (string) --
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.
Return type

dict

Returns

Response Syntax

{
    'FleetUtilization': [
        {
            'FleetId': 'string',
            'ActiveServerProcessCount': 123,
            'ActiveGameSessionCount': 123,
            'CurrentPlayerSessionCount': 123,
            'MaximumPlayerSessionCount': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetUtilization (list) --

      Collection of objects containing utilization information for each requested fleet ID.

      • (dict) --

        Current status of fleet utilization, including the number of game and player sessions being hosted.

        • FleetId (string) --

          Unique identifier for a fleet.

        • ActiveServerProcessCount (integer) --

          Number of server processes in an ACTIVE status currently running across all instances in the fleet

        • ActiveGameSessionCount (integer) --

          Number of active game sessions currently being hosted on all instances in the fleet.

        • CurrentPlayerSessionCount (integer) --

          Number of active player sessions currently being hosted on all instances in the fleet.

        • MaximumPlayerSessionCount (integer) --

          Maximum players allowed across all game sessions currently being hosted on all instances in the fleet.

    • NextToken (string) --

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

describe_game_session_details(**kwargs)

Retrieves properties, including the protection policy in force, for one or more game sessions. This action can be used in several ways: (1) provide a GameSessionId or GameSessionArn to request details for a specific game session; (2) provide either a FleetId or an AliasId to request properties for all game sessions running on a fleet.

To get game session record(s), specify just one of the following: game session ID, fleet ID, or alias ID. You can filter this request by game session status. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSessionDetail object is returned for each session matching the request.

See also: AWS API Documentation

Request Syntax

response = client.describe_game_session_details(
    FleetId='string',
    GameSessionId='string',
    AliasId='string',
    StatusFilter='string',
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetId (string) -- Unique identifier for a fleet to retrieve all game sessions active on the fleet.
  • GameSessionId (string) -- Unique identifier for the game session to retrieve.
  • AliasId (string) -- Unique identifier for an alias associated with the fleet to retrieve all game sessions for.
  • StatusFilter (string) -- Game session status to filter results on. Possible game session statuses include ACTIVE, TERMINATED , ACTIVATING and TERMINATING (the last two are transitory).
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'GameSessionDetails': [
        {
            'GameSession': {
                'GameSessionId': 'string',
                'Name': 'string',
                'FleetId': 'string',
                'CreationTime': datetime(2015, 1, 1),
                'TerminationTime': datetime(2015, 1, 1),
                'CurrentPlayerSessionCount': 123,
                'MaximumPlayerSessionCount': 123,
                'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
                'GameProperties': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'IpAddress': 'string',
                'Port': 123,
                'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
                'CreatorId': 'string'
            },
            'ProtectionPolicy': 'NoProtection'|'FullProtection'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessionDetails (list) --

      Collection of objects containing game session properties and the protection policy currently in force for each session matching 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) --

            Unique identifier for the game session. A game session ID has the following format: arn:aws:gamelift:region::gamesession/fleet ID/custom ID string or idempotency token .

          • Name (string) --

            Descriptive label that is associated with a game session. Session names do not need to be unique.

          • FleetId (string) --

            Unique identifier for a fleet the game session is running on.

          • CreationTime (datetime) --

            Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

          • TerminationTime (datetime) --

            Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

          • CurrentPlayerSessionCount (integer) --

            Number of players currently in the game session.

          • MaximumPlayerSessionCount (integer) --

            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.

          • GameProperties (list) --

            Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

            • (dict) --

              Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

              • Key (string) --

                TBD

              • Value (string) --

                TBD

          • IpAddress (string) --

            IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

          • Port (integer) --

            Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

          • PlayerSessionCreationPolicy (string) --

            Indicates whether or not the game session is accepting new players.

          • CreatorId (string) --

            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.

        • 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) --

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

describe_game_session_placement(**kwargs)

Retrieves properties and current status of a game session placement request. To get game session placement details, specify the placement ID. If successful, a GameSessionPlacement object is returned.

See also: AWS API Documentation

Request Syntax

response = client.describe_game_session_placement(
    PlacementId='string'
)
Parameters
PlacementId (string) --

[REQUIRED]

Unique identifier for a game session placement to retrieve.

Return type
dict
Returns
Response Syntax
{
    'GameSessionPlacement': {
        'PlacementId': 'string',
        'GameSessionQueueName': 'string',
        'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT',
        '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',
        'Port': 123,
        'PlacedPlayerSessions': [
            {
                'PlayerId': 'string',
                'PlayerSessionId': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessionPlacement (dict) --

      Object that describes the requested game session placement.

      • PlacementId (string) --

        Unique identifier for a game session placement.

      • GameSessionQueueName (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • Status (string) --

        Current status of the game session placement request.

        • PENDING – The placement request is currently in the queue waiting to be processed.
        • FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.
        • CANCELLED – The placement request was canceled with a call to StopGameSessionPlacement .
        • TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • MaximumPlayerSessionCount (integer) --

        Maximum number of players that can be connected simultaneously to the game session.

      • GameSessionName (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • GameSessionId (string) --

        Unique identifier for the game session. This value is set once the new game session is placed (placement status is Fulfilled).

      • GameSessionArn (string) --

        Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is Fulfilled). This identifier is unique across all regions. You can use this value as a GameSessionId value as needed.

      • GameSessionRegion (string) --

        Name of the region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is Fulfilled).

      • PlayerLatencies (list) --

        Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS regions.

        • (dict) --

          Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement . 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) --

            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) --

        IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).

      • Port (integer) --

        Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).

      • PlacedPlayerSessions (list) --

        Collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is Fulfilled). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.

        • (dict) --

          Information about a player session that was created as part of a StartGameSessionPlacement request. 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) --

            Unique identifier for a player that is associated with this player session.

          • PlayerSessionId (string) --

            Unique identifier for a player session.

describe_game_session_queues(**kwargs)

Retrieves the properties for one or more game session queues. When requesting multiple queues, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSessionQueue object is returned for each requested queue. When specifying a list of queues, objects are returned only for queues that currently exist in the region.

See also: AWS API Documentation

Request Syntax

response = client.describe_game_session_queues(
    Names=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
Parameters
  • Names (list) --

    List of queue names to retrieve information for. To request settings for all queues, leave this parameter empty.

    • (string) --
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'GameSessionQueues': [
        {
            'Name': 'string',
            'GameSessionQueueArn': 'string',
            'TimeoutInSeconds': 123,
            'PlayerLatencyPolicies': [
                {
                    'MaximumIndividualPlayerLatencyMilliseconds': 123,
                    'PolicyDurationSeconds': 123
                },
            ],
            'Destinations': [
                {
                    'DestinationArn': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessionQueues (list) --

      Collection of objects that describes the requested game session queues.

      • (dict) --

        Configuration of a queue that is used to process game session placement requests. The queue configuration identifies several game features:

        • The destinations where a new game session can potentially be hosted. Amazon GameLift tries these destinations in an order based on either the queue's default order or player latency information, if provided in a placement request. With latency information, Amazon GameLift can place game sessions where the majority of players are reporting the lowest possible latency.
        • The length of time that placement requests can wait in the queue before timing out.
        • A set of optional latency policies that protect individual players from high latencies, preventing game sessions from being placed where any individual player is reporting latency higher than a policy's maximum.

        Queue-related operations include the following:

        • CreateGameSessionQueue
        • DescribeGameSessionQueues
        • UpdateGameSessionQueue
        • DeleteGameSessionQueue
        • Name (string) --

          Descriptive label that is associated with queue. Queue names must be unique within each region.

        • GameSessionQueueArn (string) --

          Amazon Resource Name (ARN ) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:region::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

        • TimeoutInSeconds (integer) --

          Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

        • PlayerLatencyPolicies (list) --

          Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement.

          • (dict) --

            Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.

            Latency policy-related operations include:

            • CreateGameSessionQueue
            • UpdateGameSessionQueue
            • StartGameSessionPlacement
            • MaximumIndividualPlayerLatencyMilliseconds (integer) --

              The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.

            • PolicyDurationSeconds (integer) --

              The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.

        • Destinations (list) --

          List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

          • (dict) --

            Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination configured for a queue.

            • DestinationArn (string) --

              Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

    • NextToken (string) --

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

describe_game_sessions(**kwargs)

Retrieves a set of one or more game sessions. Request a specific game session or request all game sessions on a fleet. Alternatively, use SearchGameSessions to request a set of active game sessions that are filtered by certain criteria. To retrieve protection policy settings for game sessions, use DescribeGameSessionDetails .

To get game sessions, specify one of the following: game session ID, fleet ID, or alias ID. You can filter this request by game session status. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSession object is returned for each game session matching the request.

Available in Amazon GameLift Local.

See also: AWS API Documentation

Request Syntax

response = client.describe_game_sessions(
    FleetId='string',
    GameSessionId='string',
    AliasId='string',
    StatusFilter='string',
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetId (string) -- Unique identifier for a fleet to retrieve all game sessions for.
  • GameSessionId (string) -- Unique identifier for the game session to retrieve. You can use either a GameSessionId or GameSessionArn value.
  • AliasId (string) -- Unique identifier for an alias associated with the fleet to retrieve all game sessions for.
  • StatusFilter (string) -- Game session status to filter results on. Possible game session statuses include ACTIVE , TERMINATED , ACTIVATING , and TERMINATING (the last two are transitory).
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'GameSessions': [
        {
            'GameSessionId': 'string',
            'Name': 'string',
            'FleetId': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'CurrentPlayerSessionCount': 123,
            'MaximumPlayerSessionCount': 123,
            'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
            'GameProperties': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'IpAddress': 'string',
            'Port': 123,
            'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
            'CreatorId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessions (list) --

      Collection of objects containing game session properties for each session matching the request.

      • (dict) --

        Properties describing a game session.

        • GameSessionId (string) --

          Unique identifier for the game session. A game session ID has the following format: arn:aws:gamelift:region::gamesession/fleet ID/custom ID string or idempotency token .

        • Name (string) --

          Descriptive label that is associated with a game session. Session names do not need to be unique.

        • FleetId (string) --

          Unique identifier for a fleet the game session is running on.

        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • TerminationTime (datetime) --

          Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • CurrentPlayerSessionCount (integer) --

          Number of players currently in the game session.

        • MaximumPlayerSessionCount (integer) --

          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.

        • GameProperties (list) --

          Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

          • (dict) --

            Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

            • Key (string) --

              TBD

            • Value (string) --

              TBD

        • IpAddress (string) --

          IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        • Port (integer) --

          Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        • PlayerSessionCreationPolicy (string) --

          Indicates whether or not the game session is accepting new players.

        • CreatorId (string) --

          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.

    • NextToken (string) --

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

describe_instances(**kwargs)

Retrieves information about a fleet's instances, including instance IDs. Use this action to get details on all instances in the fleet or get details on one specific instance.

To get a specific instance, specify fleet ID and instance ID. To get all instances in a fleet, specify a fleet ID only. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, an Instance object is returned for each result.

See also: AWS API Documentation

Request Syntax

response = client.describe_instances(
    FleetId='string',
    InstanceId='string',
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to retrieve instance information for.

  • InstanceId (string) -- Unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'Instances': [
        {
            'FleetId': 'string',
            'InstanceId': 'string',
            'IpAddress': 'string',
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
            'Type': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
            'Status': 'PENDING'|'ACTIVE'|'TERMINATING',
            'CreationTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Instances (list) --

      Collection of objects containing properties for each instance returned.

      • (dict) --

        Properties that describe an instance of a virtual computing resource that hosts one or more game servers. A fleet contains zero or more instances.

        • FleetId (string) --

          Unique identifier for a fleet that the instance is in.

        • InstanceId (string) --

          Unique identifier for an instance.

        • IpAddress (string) --

          IP address assigned to the instance.

        • OperatingSystem (string) --

          Operating system that is running on this instance.

        • Type (string) --

          EC2 instance type that defines the computing resources of this instance.

        • Status (string) --

          Current status of the instance. Possible statuses include the following:

          • PENDING – The instance is in the process of being created and launching server processes as defined in the fleet's runtime configuration.
          • ACTIVE – The instance has been successfully created and at least one server process has successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions.
          • TERMINATING – The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.
        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

    • NextToken (string) --

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

describe_player_sessions(**kwargs)

Retrieves properties for one or more player sessions. This action can be used in several ways: (1) provide a PlayerSessionId to request properties for a specific player session; (2) provide a GameSessionId to request properties for all player sessions in the specified game session; (3) provide a PlayerId to request properties for all player sessions of a specified player.

To get game session record(s), specify only one of the following: a player session ID, a game session ID, or a player ID. You can filter this request by player session status. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a PlayerSession object is returned for each session matching the request.

Available in Amazon GameLift Local.

See also: AWS API Documentation

Request Syntax

response = client.describe_player_sessions(
    GameSessionId='string',
    PlayerId='string',
    PlayerSessionId='string',
    PlayerSessionStatusFilter='string',
    Limit=123,
    NextToken='string'
)
Parameters
  • GameSessionId (string) -- Unique identifier for the game session to retrieve player sessions for.
  • PlayerId (string) -- Unique identifier for a player to retrieve player sessions for.
  • PlayerSessionId (string) -- Unique identifier for a player session to retrieve.
  • PlayerSessionStatusFilter (string) --

    Player session status to filter results on.

    Possible player session statuses include the following:

    • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.
    • ACTIVE – The player has been validated by the server process and is currently connected.
    • COMPLETED – The player connection has been dropped.
    • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. If a player session ID is specified, this parameter is ignored.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value. If a player session ID is specified, this parameter is ignored.
Return type

dict

Returns

Response Syntax

{
    'PlayerSessions': [
        {
            'PlayerSessionId': 'string',
            'PlayerId': 'string',
            'GameSessionId': 'string',
            'FleetId': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'Status': 'RESERVED'|'ACTIVE'|'COMPLETED'|'TIMEDOUT',
            'IpAddress': 'string',
            'Port': 123,
            'PlayerData': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • PlayerSessions (list) --

      Collection of objects containing properties for each player session that matches the request.

      • (dict) --

        Properties describing a player session. A player session represents either a player reservation for a game session or actual player activity in a game session. A player session object (including player data) is automatically passed to a game session when the player connects to the game session and is validated.

        Player session-related operations include:

        • CreatePlayerSession
        • CreatePlayerSessions
        • DescribePlayerSessions
        • PlayerSessionId (string) --

          Unique identifier for a player session.

        • PlayerId (string) --

          Unique identifier for a player that is associated with this player session.

        • GameSessionId (string) --

          Unique identifier for the game session that the player session is connected to.

        • FleetId (string) --

          Unique identifier for a fleet that the player's game session is running on.

        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • TerminationTime (datetime) --

          Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • Status (string) --

          Current status of the player session.

          Possible player session statuses include the following:

          • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.
          • ACTIVE – The player has been validated by the server process and is currently connected.
          • COMPLETED – The player connection has been dropped.
          • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
        • IpAddress (string) --

          IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        • Port (integer) --

          Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.

        • PlayerData (string) --

          Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

    • NextToken (string) --

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

describe_runtime_configuration(**kwargs)

Retrieves the current runtime configuration for the specified fleet. The runtime configuration tells Amazon GameLift how to launch server processes on instances in the fleet.

See also: AWS API Documentation

Request Syntax

response = client.describe_runtime_configuration(
    FleetId='string'
)
Parameters
FleetId (string) --

[REQUIRED]

Unique identifier for a fleet to get the runtime configuration for.

Return type
dict
Returns
Response Syntax
{
    'RuntimeConfiguration': {
        'ServerProcesses': [
            {
                'LaunchPath': 'string',
                'Parameters': 'string',
                'ConcurrentExecutions': 123
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • RuntimeConfiguration (dict) --

      Instructions describing how server processes should be launched and maintained on each instance in the fleet.

      • ServerProcesses (list) --

        Collection of server process configurations describing what server processes to run on each instance in a fleet

        • (dict) --

          A set of instructions for launching server processes on each instance in a fleet. Each instruction set identifies the location of the server executable, optional launch parameters, and the number of server processes with this configuration to maintain concurrently on the instance. Server process configurations make up a fleet's `` RuntimeConfiguration `` .

          • LaunchPath (string) --

            Location of the server executable in a game build. All game builds are installed on instances at the root : for Windows instances C:\game , and for Linux instances /local/game . A Windows game build with an executable file located at MyGame\latest\server.exe must have a launch path of "C:\game\MyGame\latest\server.exe ". A Linux game build with an executable file located at MyGame/latest/server.exe must have a launch path of "/local/game/MyGame/latest/server.exe ".

          • Parameters (string) --

            Optional list of parameters to pass to the server executable on launch.

          • ConcurrentExecutions (integer) --

            Number of server processes using this configuration to run concurrently on an instance.

describe_scaling_policies(**kwargs)

Retrieves all scaling policies applied to a fleet.

To get a fleet's scaling policies, specify the fleet ID. You can filter this request by policy status, such as to retrieve only active scaling policies. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, set of ScalingPolicy objects is returned for the fleet.

See also: AWS API Documentation

Request Syntax

response = client.describe_scaling_policies(
    FleetId='string',
    StatusFilter='ACTIVE'|'UPDATE_REQUESTED'|'UPDATING'|'DELETE_REQUESTED'|'DELETING'|'DELETED'|'ERROR',
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to retrieve scaling policies for.

  • StatusFilter (string) --

    Scaling policy status to filter results on. A scaling policy is only in force when in an ACTIVE status.

    • ACTIVE – The scaling policy is currently in force.
    • UPDATEREQUESTED – A request to update the scaling policy has been received.
    • UPDATING – A change is being made to the scaling policy.
    • DELETEREQUESTED – A request to delete the scaling policy has been received.
    • DELETING – The scaling policy is being deleted.
    • DELETED – The scaling policy has been deleted.
    • ERROR – An error occurred in creating the policy. It should be removed and recreated.
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'ScalingPolicies': [
        {
            'FleetId': 'string',
            'Name': 'string',
            'Status': 'ACTIVE'|'UPDATE_REQUESTED'|'UPDATING'|'DELETE_REQUESTED'|'DELETING'|'DELETED'|'ERROR',
            'ScalingAdjustment': 123,
            'ScalingAdjustmentType': 'ChangeInCapacity'|'ExactCapacity'|'PercentChangeInCapacity',
            'ComparisonOperator': 'GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
            'Threshold': 123.0,
            'EvaluationPeriods': 123,
            'MetricName': 'ActivatingGameSessions'|'ActiveGameSessions'|'ActiveInstances'|'AvailablePlayerSessions'|'CurrentPlayerSessions'|'IdleInstances'|'QueueDepth'|'WaitTime'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • ScalingPolicies (list) --

      Collection of objects containing the scaling policies matching the request.

      • (dict) --

        Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.

        • FleetId (string) --

          Unique identifier for a fleet that is associated with this scaling policy.

        • Name (string) --

          Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

        • Status (string) --

          Current status of the scaling policy. The scaling policy is only in force when in an ACTIVE status.

          • ACTIVE – The scaling policy is currently in force.
          • UPDATE_REQUESTED – A request to update the scaling policy has been received.
          • UPDATING – A change is being made to the scaling policy.
          • DELETE_REQUESTED – A request to delete the scaling policy has been received.
          • DELETING – The scaling policy is being deleted.
          • DELETED – The scaling policy has been deleted.
          • ERROR – An error occurred in creating the policy. It should be removed and recreated.
        • ScalingAdjustment (integer) --

          Amount of adjustment to make, based on the scaling adjustment type.

        • ScalingAdjustmentType (string) --

          Type of adjustment to make to a fleet's instance count (see FleetCapacity ):

          • ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.
          • ExactCapacity – set the instance count to the scaling adjustment value.
          • PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.
        • ComparisonOperator (string) --

          Comparison operator to use when measuring a metric against the threshold value.

        • Threshold (float) --

          Metric value used to trigger a scaling event.

        • EvaluationPeriods (integer) --

          Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

        • MetricName (string) --

          Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.

          • ActivatingGameSessions – number of game sessions in the process of being created (game session status = ACTIVATING ).
          • ActiveGameSessions – number of game sessions currently running (game session status = ACTIVE ).
          • CurrentPlayerSessions – number of active or reserved player sessions (player session status = ACTIVE or RESERVED ).
          • AvailablePlayerSessions – number of player session slots currently available in active game sessions across the fleet, calculated by subtracting a game session's current player session count from its maximum player session count. This number does include game sessions that are not currently accepting players (game session PlayerSessionCreationPolicy = DENY_ALL ).
          • ActiveInstances – number of instances currently running a game session.
          • IdleInstances – number of instances not currently running a game session.
    • NextToken (string) --

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

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_game_session_log_url(**kwargs)

Retrieves the location of stored game session logs for a specified game session. When a game session is terminated, Amazon GameLift automatically stores the logs in Amazon S3. Use this URL to download the logs.

Note

See the AWS Service Limits page for maximum log file sizes. Log files that exceed this limit are not saved.

See also: AWS API Documentation

Request Syntax

response = client.get_game_session_log_url(
    GameSessionId='string'
)
Parameters
GameSessionId (string) --

[REQUIRED]

Unique identifier for the game session to get logs for.

Return type
dict
Returns
Response Syntax
{
    'PreSignedUrl': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • PreSignedUrl (string) --

      Location of the requested game session logs, available for download.

get_instance_access(**kwargs)

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

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

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

See also: AWS API Documentation

Request Syntax

response = client.get_instance_access(
    FleetId='string',
    InstanceId='string'
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet that contains the instance you want access to. The fleet can be in any of the following statuses: ACTIVATING , ACTIVE , or ERROR . Fleets with an ERROR status may be accessible for a short time before they are deleted.

  • InstanceId (string) --

    [REQUIRED]

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

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • InstanceAccess (dict) --

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

      • FleetId (string) --

        Unique identifier for a fleet containing the instance being accessed.

      • InstanceId (string) --

        Unique identifier for an instance being accessed.

      • IpAddress (string) --

        IP address assigned to the instance.

      • OperatingSystem (string) --

        Operating system that is running on the instance.

      • Credentials (dict) --

        Credentials required to access the instance.

        • UserName (string) --

          User login string.

        • Secret (string) --

          Secret string. For Windows instances, the secret is a password for use with Windows Remote Desktop. For Linux instances, it is a private key (which must be saved as a .pem file) for use with SSH.

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)
list_aliases(**kwargs)

Retrieves a collection of alias records for this AWS account. You can filter the result set by alias name and/or routing strategy type. Use the pagination parameters to retrieve results in sequential pages.

Note

Aliases are not listed in any particular order.

See also: AWS API Documentation

Request Syntax

response = client.list_aliases(
    RoutingStrategyType='SIMPLE'|'TERMINAL',
    Name='string',
    Limit=123,
    NextToken='string'
)
Parameters
  • RoutingStrategyType (string) --

    Type of routing to filter results on. Use this parameter to retrieve only aliases of a certain type. To retrieve all aliases, leave this parameter empty.

    Possible routing types include the following:

    • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.
    • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
  • Name (string) -- Descriptive label that is associated with an alias. Alias names do not need to be unique.
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'Aliases': [
        {
            'AliasId': 'string',
            'Name': 'string',
            'AliasArn': 'string',
            'Description': 'string',
            'RoutingStrategy': {
                'Type': 'SIMPLE'|'TERMINAL',
                'FleetId': 'string',
                'Message': 'string'
            },
            'CreationTime': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Aliases (list) --

      Collection of alias records that match the list request.

      • (dict) --

        Properties describing a fleet alias.

        Alias-related operations include:

        • CreateAlias
        • ListAliases
        • DescribeAlias
        • UpdateAlias
        • DeleteAlias
        • AliasId (string) --

          Unique identifier for an alias; alias IDs are unique within a region.

        • Name (string) --

          Descriptive label that is associated with an alias. Alias names do not need to be unique.

        • AliasArn (string) --

          Unique identifier for an alias; alias ARNs are unique across all regions.

        • Description (string) --

          Human-readable description of an alias.

        • RoutingStrategy (dict) --

          Alias configuration for the alias, including routing type and settings.

          • Type (string) --

            Type of routing strategy.

            Possible routing types include the following:

            • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.
            • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
          • FleetId (string) --

            Unique identifier for a fleet that the alias points to.

          • Message (string) --

            Message text to be used with a terminal routing strategy.

        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • LastUpdatedTime (datetime) --

          Time stamp indicating when this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

    • NextToken (string) --

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

list_builds(**kwargs)

Retrieves build records for all builds associated with the AWS account in use. You can limit results to builds that are in a specific status by using the Status parameter. Use the pagination parameters to retrieve results in a set of sequential pages.

Note

Build records are not listed in any particular order.

See also: AWS API Documentation

Request Syntax

response = client.list_builds(
    Status='INITIALIZED'|'READY'|'FAILED',
    Limit=123,
    NextToken='string'
)
Parameters
  • Status (string) --

    Build status to filter results by. To retrieve all builds, leave this parameter empty.

    Possible build statuses include the following:

    • INITIALIZED – A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value.
    • READY – The game build has been successfully uploaded. You can now create new fleets for this build.
    • FAILED – The game build upload failed. You cannot create new fleets for this build.
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'Builds': [
        {
            'BuildId': 'string',
            'Name': 'string',
            'Version': 'string',
            'Status': 'INITIALIZED'|'READY'|'FAILED',
            'SizeOnDisk': 123,
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
            'CreationTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Builds (list) --

      Collection of build records that match the request.

      • (dict) --

        Properties describing a game build.

        Build-related operations include:

        • CreateBuild
        • ListBuilds
        • DescribeBuild
        • UpdateBuild
        • DeleteBuild
        • BuildId (string) --

          Unique identifier for a build.

        • Name (string) --

          Descriptive label that is associated with a build. Build names do not need to be unique. It can be set using CreateBuild or UpdateBuild .

        • Version (string) --

          Version that is associated with this build. Version strings do not need to be unique. This value can be set using CreateBuild or UpdateBuild .

        • Status (string) --

          Current status of the build.

          Possible build statuses include the following:

          • INITIALIZED – A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value.
          • READY – The game build has been successfully uploaded. You can now create new fleets for this build.
          • FAILED – The game build upload failed. You cannot create new fleets for this build.
        • SizeOnDisk (integer) --

          File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED , this value is 0.

        • OperatingSystem (string) --

          Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.

        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

    • NextToken (string) --

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

list_fleets(**kwargs)

Retrieves a collection of fleet records for this AWS account. You can filter the result set by build ID. Use the pagination parameters to retrieve results in sequential pages.

Note

Fleet records are not listed in any particular order.

See also: AWS API Documentation

Request Syntax

response = client.list_fleets(
    BuildId='string',
    Limit=123,
    NextToken='string'
)
Parameters
  • BuildId (string) -- Unique identifier for a build to return fleets for. Use this parameter to return only fleets using the specified build. To retrieve all fleets, leave this parameter empty.
  • Limit (integer) -- Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'FleetIds': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetIds (list) --

      Set of fleet IDs matching the list request. You can retrieve additional information about all returned fleets by passing this result set to a call to DescribeFleetAttributes , DescribeFleetCapacity , or DescribeFleetUtilization .

      • (string) --
    • NextToken (string) --

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

put_scaling_policy(**kwargs)

Creates or updates a scaling policy for a fleet. An active scaling policy prompts Amazon GameLift to track a certain metric for a fleet and automatically change the fleet's capacity in specific circumstances. Each scaling policy contains one rule statement. Fleets can have multiple scaling policies in force simultaneously.

A scaling policy rule statement has the following structure:

If [MetricName] is [ComparisonOperator] [Threshold] for [EvaluationPeriods] minutes, then [ScalingAdjustmentType] to/by [ScalingAdjustment] .

For example, this policy: "If the number of idle instances exceeds 20 for more than 15 minutes, then reduce the fleet capacity by 10 instances" could be implemented as the following rule statement:

If [IdleInstances] is [GreaterThanOrEqualToThreshold] [20] for [15] minutes, then [ChangeInCapacity] by [-10].

To create or update a scaling policy, specify a unique combination of name and fleet ID, and set the rule values. All parameters for this action are required. If successful, the policy name is returned. Scaling policies cannot be suspended or made inactive. To stop enforcing a scaling policy, call DeleteScalingPolicy .

See also: AWS API Documentation

Request Syntax

response = client.put_scaling_policy(
    Name='string',
    FleetId='string',
    ScalingAdjustment=123,
    ScalingAdjustmentType='ChangeInCapacity'|'ExactCapacity'|'PercentChangeInCapacity',
    Threshold=123.0,
    ComparisonOperator='GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
    EvaluationPeriods=123,
    MetricName='ActivatingGameSessions'|'ActiveGameSessions'|'ActiveInstances'|'AvailablePlayerSessions'|'CurrentPlayerSessions'|'IdleInstances'|'QueueDepth'|'WaitTime'
)
Parameters
  • Name (string) --

    [REQUIRED]

    Descriptive label that is associated with a scaling policy. Policy names do not need to be unique. A fleet can have only one scaling policy with the same name.

  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to apply this policy to.

  • ScalingAdjustment (integer) --

    [REQUIRED]

    Amount of adjustment to make, based on the scaling adjustment type.

  • ScalingAdjustmentType (string) --

    [REQUIRED]

    Type of adjustment to make to a fleet's instance count (see FleetCapacity ):

    • ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.
    • ExactCapacity – set the instance count to the scaling adjustment value.
    • PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down; for example, a value of "-10" scales the fleet down by 10%.
  • Threshold (float) --

    [REQUIRED]

    Metric value used to trigger a scaling event.

  • ComparisonOperator (string) --

    [REQUIRED]

    Comparison operator to use when measuring the metric against the threshold value.

  • EvaluationPeriods (integer) --

    [REQUIRED]

    Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

  • MetricName (string) --

    [REQUIRED]

    Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.

    • ActivatingGameSessions – number of game sessions in the process of being created (game session status = ACTIVATING ).
    • ActiveGameSessions – number of game sessions currently running (game session status = ACTIVE ).
    • CurrentPlayerSessions – number of active or reserved player sessions (player session status = ACTIVE or RESERVED ).
    • AvailablePlayerSessions – number of player session slots currently available in active game sessions across the fleet, calculated by subtracting a game session's current player session count from its maximum player session count. This number includes game sessions that are not currently accepting players (game session PlayerSessionCreationPolicy = DENY_ALL ).
    • ActiveInstances – number of instances currently running a game session.
    • IdleInstances – number of instances not currently running a game session.
Return type

dict

Returns

Response Syntax

{
    'Name': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Name (string) --

      Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

request_upload_credentials(**kwargs)
This API call is not currently in use. Retrieves a fresh set of upload credentials and the assigned Amazon S3 storage location for a specific build. Valid credentials are required to upload your game build files to Amazon S3.

See also: AWS API Documentation

Request Syntax

response = client.request_upload_credentials(
    BuildId='string'
)
Parameters
BuildId (string) --

[REQUIRED]

Unique identifier for a build to get credentials for.

Return type
dict
Returns
Response Syntax
{
    'UploadCredentials': {
        'AccessKeyId': 'string',
        'SecretAccessKey': 'string',
        'SessionToken': 'string'
    },
    'StorageLocation': {
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • UploadCredentials (dict) --

      AWS credentials required when uploading a game build to the storage location. These credentials have a limited lifespan and are valid only for the build they were issued for.

      • AccessKeyId (string) --

        Access key for an AWS account.

      • SecretAccessKey (string) --

        Secret key for an AWS account.

      • SessionToken (string) --

        Token specific to a build ID.

    • StorageLocation (dict) --

      Amazon S3 path and key, identifying where the game build files are stored.

      • Bucket (string) --

        Amazon S3 bucket identifier. This is the name of your S3 bucket.

      • Key (string) --

        Name of the zip file containing your build files.

      • RoleArn (string) --

        Amazon Resource Name (ARN ) for the access role that allows Amazon GameLift to access your S3 bucket.

resolve_alias(**kwargs)

Retrieves the fleet ID that a specified alias is currently pointing to.

See also: AWS API Documentation

Request Syntax

response = client.resolve_alias(
    AliasId='string'
)
Parameters
AliasId (string) --

[REQUIRED]

Unique identifier for the alias you want to resolve.

Return type
dict
Returns
Response Syntax
{
    'FleetId': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetId (string) --

      Fleet identifier that is associated with the requested alias.

search_game_sessions(**kwargs)

Retrieves a set of game sessions that match a set of search criteria and sorts them in a specified order. Currently a game session search is limited to a single fleet. Search results include only game sessions that are in ACTIVE status. If you need to retrieve game sessions with a status other than active, use DescribeGameSessions . If you need to retrieve the protection policy for each game session, use DescribeGameSessionDetails .

You can search or sort by the following game session attributes:

  • gameSessionId -- Unique identifier for the game session. You can use either a GameSessionId or GameSessionArn value.
  • gameSessionName -- Name assigned to a game session. This value is set when requesting a new game session with CreateGameSession or updating with UpdateGameSession . Game session names do not need to be unique to 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.
  • maximumSessions -- Maximum number of player sessions allowed for a game session. This value is set when requesting a new game session with CreateGameSession or updating with UpdateGameSession .
  • hasAvailablePlayerSessions -- Boolean value indicating whether or not a game session has reached its maximum number of players. When searching with this attribute, the search value must be true or false . It is highly recommended that all search requests include this filter attribute to optimize search performance and return only sessions that players can join.

To search or sort, specify either a fleet ID or an alias ID, and provide a search filter expression, a sort expression, or both. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a collection of GameSession objects matching the request is returned.

Note

Returned values for playerSessionCount and hasAvailablePlayerSessions change quickly as players join sessions and others drop out. Results should be considered a snapshot in time. Be sure to refresh search results often, and handle sessions that fill up before a player can join.

Available in Amazon GameLift Local.

See also: AWS API Documentation

Request Syntax

response = client.search_game_sessions(
    FleetId='string',
    AliasId='string',
    FilterExpression='string',
    SortExpression='string',
    Limit=123,
    NextToken='string'
)
Parameters
  • FleetId (string) -- Unique identifier for a fleet to search for active game sessions. Each request must reference either a fleet ID or alias ID, but not both.
  • AliasId (string) -- Unique identifier for an alias associated with the fleet to search for active game sessions. Each request must reference either a fleet ID or alias ID, but not both.
  • FilterExpression (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 , creationTimeMillis , playerSessionCount , maximumSessions , hasAvailablePlayerSessions .
    • Comparator -- Valid comparators are: = , ```` , ```` , ```` , = , = .
    • Value -- Value to be searched for. Values can be numbers, boolean values (true/false) or strings. String values are case sensitive, 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" .

  • SortExpression (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 , creationTimeMillis , playerSessionCount , maximumSessions , 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.

  • Limit (integer) -- 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.
  • NextToken (string) -- Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
Return type

dict

Returns

Response Syntax

{
    'GameSessions': [
        {
            'GameSessionId': 'string',
            'Name': 'string',
            'FleetId': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'CurrentPlayerSessionCount': 123,
            'MaximumPlayerSessionCount': 123,
            'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
            'GameProperties': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'IpAddress': 'string',
            'Port': 123,
            'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
            'CreatorId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessions (list) --

      Collection of objects containing game session properties for each session matching the request.

      • (dict) --

        Properties describing a game session.

        • GameSessionId (string) --

          Unique identifier for the game session. A game session ID has the following format: arn:aws:gamelift:region::gamesession/fleet ID/custom ID string or idempotency token .

        • Name (string) --

          Descriptive label that is associated with a game session. Session names do not need to be unique.

        • FleetId (string) --

          Unique identifier for a fleet the game session is running on.

        • CreationTime (datetime) --

          Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • TerminationTime (datetime) --

          Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • CurrentPlayerSessionCount (integer) --

          Number of players currently in the game session.

        • MaximumPlayerSessionCount (integer) --

          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.

        • GameProperties (list) --

          Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

          • (dict) --

            Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

            • Key (string) --

              TBD

            • Value (string) --

              TBD

        • IpAddress (string) --

          IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        • Port (integer) --

          Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        • PlayerSessionCreationPolicy (string) --

          Indicates whether or not the game session is accepting new players.

        • CreatorId (string) --

          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.

    • NextToken (string) --

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

start_game_session_placement(**kwargs)

Places a request for a new game session in a queue (see CreateGameSessionQueue ). When processing a placement request, Amazon GameLift searches for available resources on the queue's destinations, scanning each until it finds resources or the placement request times out. A game session placement request can also request player sessions. When a new game session is successfully created, Amazon GameLift creates a player session for each player included in the request.

When placing a game session, by default Amazon GameLift tries each fleet in the order they are listed in the queue configuration. Ideally, a queue's destinations are listed in preference order. Alternatively, when requesting a game session with players, you can also provide latency data for each player in relevant regions. Latency data indicates the performance lag a player experiences when connected to a fleet in the region. Amazon GameLift uses latency data to reorder the list of destinations to place the game session in a region with minimal lag. If latency data is provided for multiple players, Amazon GameLift calculates each region's average lag for all players and reorders to get the best game play across all players.

To place a new game session request, specify the queue name and a set of game session properties and settings. Also provide a unique ID (such as a UUID) for the placement. You'll use this ID to track the status of the placement request. Optionally, provide a set of IDs and player data for each player you want to join to the new game session. To optimize game play for the players, also provide latency data for all players. If successful, a new game session placement is created. To track the status of a placement request, call DescribeGameSessionPlacement and check the request's status. If the status is Fulfilled, a new game session has been created and a game session ARN and region are referenced. If the placement request times out, you have the option of resubmitting the request or retrying it with a different queue.

See also: AWS API Documentation

Request Syntax

response = 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'
        },
    ]
)
Parameters
  • PlacementId (string) --

    [REQUIRED]

    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 unless you are resubmitting a canceled or timed-out placement request.

  • GameSessionQueueName (string) --

    [REQUIRED]

    Name of the queue to use to place the new game session.

  • GameProperties (list) --

    Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

    • (dict) --

      Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

      • Key (string) -- [REQUIRED]

        TBD

      • Value (string) -- [REQUIRED]

        TBD

  • MaximumPlayerSessionCount (integer) --

    [REQUIRED]

    Maximum number of players that can be connected simultaneously to the game session.

  • GameSessionName (string) -- Descriptive label that is associated with a game session. Session names do not need to be unique.
  • PlayerLatencies (list) --

    Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS 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 with StartGameSessionPlacement . 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) --

        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.

  • DesiredPlayerSessions (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 with StartGameSessionPlacement .

      • PlayerId (string) --

        Unique identifier for a player to associate with the player session.

      • PlayerData (string) --

        Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

Return type

dict

Returns

Response Syntax

{
    'GameSessionPlacement': {
        'PlacementId': 'string',
        'GameSessionQueueName': 'string',
        'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT',
        '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',
        'Port': 123,
        'PlacedPlayerSessions': [
            {
                'PlayerId': 'string',
                'PlayerSessionId': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • 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) --

        Unique identifier for a game session placement.

      • GameSessionQueueName (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • Status (string) --

        Current status of the game session placement request.

        • PENDING – The placement request is currently in the queue waiting to be processed.
        • FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.
        • CANCELLED – The placement request was canceled with a call to StopGameSessionPlacement .
        • TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • MaximumPlayerSessionCount (integer) --

        Maximum number of players that can be connected simultaneously to the game session.

      • GameSessionName (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • GameSessionId (string) --

        Unique identifier for the game session. This value is set once the new game session is placed (placement status is Fulfilled).

      • GameSessionArn (string) --

        Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is Fulfilled). This identifier is unique across all regions. You can use this value as a GameSessionId value as needed.

      • GameSessionRegion (string) --

        Name of the region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is Fulfilled).

      • PlayerLatencies (list) --

        Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS regions.

        • (dict) --

          Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement . 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) --

            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) --

        IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).

      • Port (integer) --

        Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).

      • PlacedPlayerSessions (list) --

        Collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is Fulfilled). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.

        • (dict) --

          Information about a player session that was created as part of a StartGameSessionPlacement request. 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) --

            Unique identifier for a player that is associated with this player session.

          • PlayerSessionId (string) --

            Unique identifier for a player session.

stop_game_session_placement(**kwargs)

Cancels a game session placement that is in Pending status. To stop a placement, provide the placement ID values. If successful, the placement is moved to Cancelled status.

See also: AWS API Documentation

Request Syntax

response = client.stop_game_session_placement(
    PlacementId='string'
)
Parameters
PlacementId (string) --

[REQUIRED]

Unique identifier for a game session placement to cancel.

Return type
dict
Returns
Response Syntax
{
    'GameSessionPlacement': {
        'PlacementId': 'string',
        'GameSessionQueueName': 'string',
        'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT',
        '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',
        'Port': 123,
        'PlacedPlayerSessions': [
            {
                'PlayerId': 'string',
                'PlayerSessionId': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessionPlacement (dict) --

      Object that describes the canceled game session placement, with Cancelled status and an end time stamp.

      • PlacementId (string) --

        Unique identifier for a game session placement.

      • GameSessionQueueName (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • Status (string) --

        Current status of the game session placement request.

        • PENDING – The placement request is currently in the queue waiting to be processed.
        • FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.
        • CANCELLED – The placement request was canceled with a call to StopGameSessionPlacement .
        • TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • MaximumPlayerSessionCount (integer) --

        Maximum number of players that can be connected simultaneously to the game session.

      • GameSessionName (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • GameSessionId (string) --

        Unique identifier for the game session. This value is set once the new game session is placed (placement status is Fulfilled).

      • GameSessionArn (string) --

        Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is Fulfilled). This identifier is unique across all regions. You can use this value as a GameSessionId value as needed.

      • GameSessionRegion (string) --

        Name of the region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is Fulfilled).

      • PlayerLatencies (list) --

        Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS regions.

        • (dict) --

          Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement . 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) --

            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) --

        IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).

      • Port (integer) --

        Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).

      • PlacedPlayerSessions (list) --

        Collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is Fulfilled). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.

        • (dict) --

          Information about a player session that was created as part of a StartGameSessionPlacement request. 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) --

            Unique identifier for a player that is associated with this player session.

          • PlayerSessionId (string) --

            Unique identifier for a player session.

update_alias(**kwargs)

Updates properties for a fleet alias. To update properties, specify the alias ID to be updated and provide the information to be changed. To reassign an alias to another fleet, provide an updated routing strategy. If successful, the updated alias record is returned.

See also: AWS API Documentation

Request Syntax

response = client.update_alias(
    AliasId='string',
    Name='string',
    Description='string',
    RoutingStrategy={
        'Type': 'SIMPLE'|'TERMINAL',
        'FleetId': 'string',
        'Message': 'string'
    }
)
Parameters
  • AliasId (string) --

    [REQUIRED]

    Unique identifier for a fleet alias. Specify the alias you want to update.

  • Name (string) -- Descriptive label that is associated with an alias. Alias names do not need to be unique.
  • Description (string) -- Human-readable description of an alias.
  • RoutingStrategy (dict) --

    Object that specifies the fleet and routing type to use for the alias.

    • Type (string) --

      Type of routing strategy.

      Possible routing types include the following:

      • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.
      • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
    • FleetId (string) --

      Unique identifier for a fleet that the alias points to.

    • Message (string) --

      Message text to be used with a terminal routing strategy.

Return type

dict

Returns

Response Syntax

{
    'Alias': {
        'AliasId': 'string',
        'Name': 'string',
        'AliasArn': 'string',
        'Description': 'string',
        'RoutingStrategy': {
            'Type': 'SIMPLE'|'TERMINAL',
            'FleetId': 'string',
            'Message': 'string'
        },
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Alias (dict) --

      Object that contains the updated alias configuration.

      • AliasId (string) --

        Unique identifier for an alias; alias IDs are unique within a region.

      • Name (string) --

        Descriptive label that is associated with an alias. Alias names do not need to be unique.

      • AliasArn (string) --

        Unique identifier for an alias; alias ARNs are unique across all regions.

      • Description (string) --

        Human-readable description of an alias.

      • RoutingStrategy (dict) --

        Alias configuration for the alias, including routing type and settings.

        • Type (string) --

          Type of routing strategy.

          Possible routing types include the following:

          • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.
          • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
        • FleetId (string) --

          Unique identifier for a fleet that the alias points to.

        • Message (string) --

          Message text to be used with a terminal routing strategy.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        Time stamp indicating when this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

update_build(**kwargs)

Updates metadata in a build record, including the build name and version. To update the metadata, specify the build ID to update and provide the new values. If successful, a build object containing the updated metadata is returned.

See also: AWS API Documentation

Request Syntax

response = client.update_build(
    BuildId='string',
    Name='string',
    Version='string'
)
Parameters
  • BuildId (string) --

    [REQUIRED]

    Unique identifier for a build to update.

  • Name (string) -- Descriptive label that is associated with a build. Build names do not need to be unique.
  • Version (string) -- Version that is associated with this build. Version strings do not need to be unique.
Return type

dict

Returns

Response Syntax

{
    'Build': {
        'BuildId': 'string',
        'Name': 'string',
        'Version': 'string',
        'Status': 'INITIALIZED'|'READY'|'FAILED',
        'SizeOnDisk': 123,
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
        'CreationTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Build (dict) --

      Object that contains the updated build record.

      • BuildId (string) --

        Unique identifier for a build.

      • Name (string) --

        Descriptive label that is associated with a build. Build names do not need to be unique. It can be set using CreateBuild or UpdateBuild .

      • Version (string) --

        Version that is associated with this build. Version strings do not need to be unique. This value can be set using CreateBuild or UpdateBuild .

      • Status (string) --

        Current status of the build.

        Possible build statuses include the following:

        • INITIALIZED – A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value.
        • READY – The game build has been successfully uploaded. You can now create new fleets for this build.
        • FAILED – The game build upload failed. You cannot create new fleets for this build.
      • SizeOnDisk (integer) --

        File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED , this value is 0.

      • OperatingSystem (string) --

        Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

update_fleet_attributes(**kwargs)

Updates fleet properties, including name and description, for a fleet. To update metadata, specify the fleet ID and the property values you want to change. If successful, the fleet ID for the updated fleet is returned.

See also: AWS API Documentation

Request Syntax

response = client.update_fleet_attributes(
    FleetId='string',
    Name='string',
    Description='string',
    NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
    ResourceCreationLimitPolicy={
        'NewGameSessionsPerCreator': 123,
        'PolicyPeriodInMinutes': 123
    }
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to update attribute metadata for.

  • Name (string) -- Descriptive label that is associated with a fleet. Fleet names do not need to be unique.
  • Description (string) -- Human-readable description of a fleet.
  • NewGameSessionProtectionPolicy (string) --

    Game session protection policy to apply to all new instances created in this fleet. Instances that already exist are not affected. You can set protection for individual instances using UpdateGameSession .

    • NoProtection – The game session can be terminated during a scale-down event.
    • FullProtection – If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.
  • ResourceCreationLimitPolicy (dict) --

    Policy that limits the number of game sessions an individual player can create over a span of time.

    • NewGameSessionsPerCreator (integer) --

      Maximum number of game sessions that an individual can create during the policy period.

    • PolicyPeriodInMinutes (integer) --

      Time span used in evaluating the resource creation limit policy.

Return type

dict

Returns

Response Syntax

{
    'FleetId': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetId (string) --

      Unique identifier for a fleet that was updated.

update_fleet_capacity(**kwargs)

Updates capacity settings for a fleet. Use this action to specify the number of EC2 instances (hosts) that you want this fleet to contain. Before calling this action, you may want to call DescribeEC2InstanceLimits to get the maximum capacity based on the fleet's EC2 instance type.

If you're using autoscaling (see PutScalingPolicy ), you may want to specify a minimum and/or maximum capacity. If you don't provide these, autoscaling can set capacity anywhere between zero and the service limits .

To update fleet capacity, specify the fleet ID and the number of instances you want the fleet to host. If successful, Amazon GameLift starts or terminates instances so that the fleet's active instance count matches the desired instance count. You can view a fleet's current capacity information by calling DescribeFleetCapacity . If the desired instance count is higher than the instance type's limit, the "Limit Exceeded" exception occurs.

See also: AWS API Documentation

Request Syntax

response = client.update_fleet_capacity(
    FleetId='string',
    DesiredInstances=123,
    MinSize=123,
    MaxSize=123
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to update capacity for.

  • DesiredInstances (integer) -- Number of EC2 instances you want this fleet to host.
  • MinSize (integer) -- Minimum value allowed for the fleet's instance count. Default if not set is 0.
  • MaxSize (integer) -- Maximum value allowed for the fleet's instance count. Default if not set is 1.
Return type

dict

Returns

Response Syntax

{
    'FleetId': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetId (string) --

      Unique identifier for a fleet that was updated.

update_fleet_port_settings(**kwargs)

Updates port settings for a fleet. To update settings, specify the fleet ID to be updated and list the permissions you want to update. List the permissions you want to add in InboundPermissionAuthorizations , and permissions you want to remove in InboundPermissionRevocations . Permissions to be removed must match existing fleet permissions. If successful, the fleet ID for the updated fleet is returned.

See also: AWS API Documentation

Request Syntax

response = client.update_fleet_port_settings(
    FleetId='string',
    InboundPermissionAuthorizations=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ],
    InboundPermissionRevocations=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ]
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to update port settings for.

  • InboundPermissionAuthorizations (list) --

    Collection of port settings to be added to the fleet record.

    • (dict) --

      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on Amazon GameLift. Each game session hosted on a fleet is assigned a unique combination of IP address and port number, which must fall into the fleet's allowed ranges. This combination is included in the GameSession object.

      • FromPort (integer) -- [REQUIRED]

        Starting value for a range of allowed port numbers.

      • ToPort (integer) -- [REQUIRED]

        Ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort .

      • IpRange (string) -- [REQUIRED]

        Range of allowed IP addresses. This value must be expressed in CIDR notation. Example: "000.000.000.000/[subnet mask] " or optionally the shortened version "0.0.0.0/[subnet mask] ".

      • Protocol (string) -- [REQUIRED]

        Network communication protocol used by the fleet.

  • InboundPermissionRevocations (list) --

    Collection of port settings to be removed from the fleet record.

    • (dict) --

      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on Amazon GameLift. Each game session hosted on a fleet is assigned a unique combination of IP address and port number, which must fall into the fleet's allowed ranges. This combination is included in the GameSession object.

      • FromPort (integer) -- [REQUIRED]

        Starting value for a range of allowed port numbers.

      • ToPort (integer) -- [REQUIRED]

        Ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort .

      • IpRange (string) -- [REQUIRED]

        Range of allowed IP addresses. This value must be expressed in CIDR notation. Example: "000.000.000.000/[subnet mask] " or optionally the shortened version "0.0.0.0/[subnet mask] ".

      • Protocol (string) -- [REQUIRED]

        Network communication protocol used by the fleet.

Return type

dict

Returns

Response Syntax

{
    'FleetId': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetId (string) --

      Unique identifier for a fleet that was updated.

update_game_session(**kwargs)

Updates game session properties. This includes the session name, maximum player count, protection policy, which controls whether or not an active game session can be terminated during a scale-down event, and the player session creation policy, which controls whether or not new players can join the session. To update a game session, specify the game session ID and the values you want to change. If successful, an updated GameSession object is returned.

See also: AWS API Documentation

Request Syntax

response = client.update_game_session(
    GameSessionId='string',
    MaximumPlayerSessionCount=123,
    Name='string',
    PlayerSessionCreationPolicy='ACCEPT_ALL'|'DENY_ALL',
    ProtectionPolicy='NoProtection'|'FullProtection'
)
Parameters
  • GameSessionId (string) --

    [REQUIRED]

    Unique identifier for the game session to update.

  • MaximumPlayerSessionCount (integer) -- Maximum number of players that can be connected simultaneously to the game session.
  • Name (string) -- Descriptive label that is associated with a game session. Session names do not need to be unique.
  • PlayerSessionCreationPolicy (string) -- Policy determining whether or not the game session accepts new players.
  • ProtectionPolicy (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.
Return type

dict

Returns

Response Syntax

{
    'GameSession': {
        'GameSessionId': 'string',
        'Name': 'string',
        'FleetId': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'TerminationTime': datetime(2015, 1, 1),
        'CurrentPlayerSessionCount': 123,
        'MaximumPlayerSessionCount': 123,
        'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR',
        'GameProperties': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'IpAddress': 'string',
        'Port': 123,
        'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL',
        'CreatorId': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSession (dict) --

      Object that contains the updated game session metadata.

      • GameSessionId (string) --

        Unique identifier for the game session. A game session ID has the following format: arn:aws:gamelift:region::gamesession/fleet ID/custom ID string or idempotency token .

      • Name (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • FleetId (string) --

        Unique identifier for a fleet the game session is running on.

      • CreationTime (datetime) --

        Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • TerminationTime (datetime) --

        Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • CurrentPlayerSessionCount (integer) --

        Number of players currently in the game session.

      • MaximumPlayerSessionCount (integer) --

        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.

      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide .

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • IpAddress (string) --

        IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

      • Port (integer) --

        Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

      • PlayerSessionCreationPolicy (string) --

        Indicates whether or not the game session is accepting new players.

      • CreatorId (string) --

        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.

update_game_session_queue(**kwargs)

Updates settings for a game session queue, which determines how new game session requests in the queue are processed. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations.

See also: AWS API Documentation

Request Syntax

response = client.update_game_session_queue(
    Name='string',
    TimeoutInSeconds=123,
    PlayerLatencyPolicies=[
        {
            'MaximumIndividualPlayerLatencyMilliseconds': 123,
            'PolicyDurationSeconds': 123
        },
    ],
    Destinations=[
        {
            'DestinationArn': 'string'
        },
    ]
)
Parameters
  • Name (string) --

    [REQUIRED]

    Descriptive label that is associated with queue. Queue names must be unique within each region.

  • TimeoutInSeconds (integer) -- Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.
  • PlayerLatencyPolicies (list) --

    Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. When updating policies, provide a complete collection of policies.

    • (dict) --

      Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.

      Latency policy-related operations include:

      • CreateGameSessionQueue
      • UpdateGameSessionQueue
      • StartGameSessionPlacement
      • MaximumIndividualPlayerLatencyMilliseconds (integer) --

        The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.

      • PolicyDurationSeconds (integer) --

        The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.

  • Destinations (list) --

    List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order. When updating this list, provide a complete list of destinations.

    • (dict) --

      Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination configured for a queue.

      • DestinationArn (string) --

        Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

Return type

dict

Returns

Response Syntax

{
    'GameSessionQueue': {
        'Name': 'string',
        'GameSessionQueueArn': 'string',
        'TimeoutInSeconds': 123,
        'PlayerLatencyPolicies': [
            {
                'MaximumIndividualPlayerLatencyMilliseconds': 123,
                'PolicyDurationSeconds': 123
            },
        ],
        'Destinations': [
            {
                'DestinationArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • GameSessionQueue (dict) --

      Object that describes the newly updated game session queue.

      • Name (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • GameSessionQueueArn (string) --

        Amazon Resource Name (ARN ) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:region::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

      • TimeoutInSeconds (integer) --

        Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

      • PlayerLatencyPolicies (list) --

        Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement.

        • (dict) --

          Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.

          Latency policy-related operations include:

          • CreateGameSessionQueue
          • UpdateGameSessionQueue
          • StartGameSessionPlacement
          • MaximumIndividualPlayerLatencyMilliseconds (integer) --

            The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.

          • PolicyDurationSeconds (integer) --

            The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.

      • Destinations (list) --

        List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

        • (dict) --

          Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination configured for a queue.

          • DestinationArn (string) --

            Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

update_runtime_configuration(**kwargs)

Updates the current runtime configuration for the specified fleet, which tells Amazon GameLift how to launch server processes on instances in the fleet. You can update a fleet's runtime configuration at any time after the fleet is created; it does not need to be in an ACTIVE status.

To update runtime configuration, specify the fleet ID and provide a RuntimeConfiguration object with the updated collection of server process configurations.

Each instance in a Amazon GameLift fleet checks regularly for an updated runtime configuration and changes how it launches server processes to comply with the latest version. Existing server processes are not affected by the update; they continue to run until they end, while Amazon GameLift simply adds new server processes to fit the current runtime configuration. As a result, the runtime configuration changes are applied gradually as existing processes shut down and new processes are launched in Amazon GameLift's normal process recycling activity.

See also: AWS API Documentation

Request Syntax

response = client.update_runtime_configuration(
    FleetId='string',
    RuntimeConfiguration={
        'ServerProcesses': [
            {
                'LaunchPath': 'string',
                'Parameters': 'string',
                'ConcurrentExecutions': 123
            },
        ]
    }
)
Parameters
  • FleetId (string) --

    [REQUIRED]

    Unique identifier for a fleet to update runtime configuration for.

  • RuntimeConfiguration (dict) --

    [REQUIRED]

    Instructions for launching server processes on each instance in the fleet. The runtime configuration for a fleet has a collection of server process configurations, one for each type of server process to run on an instance. A server process configuration specifies the location of the server executable, launch parameters, and the number of concurrent processes with that configuration to maintain on each instance.

    • ServerProcesses (list) --

      Collection of server process configurations describing what server processes to run on each instance in a fleet

      • (dict) --

        A set of instructions for launching server processes on each instance in a fleet. Each instruction set identifies the location of the server executable, optional launch parameters, and the number of server processes with this configuration to maintain concurrently on the instance. Server process configurations make up a fleet's `` RuntimeConfiguration `` .

        • LaunchPath (string) -- [REQUIRED]

          Location of the server executable in a game build. All game builds are installed on instances at the root : for Windows instances C:\game , and for Linux instances /local/game . A Windows game build with an executable file located at MyGame\latest\server.exe must have a launch path of "C:\game\MyGame\latest\server.exe ". A Linux game build with an executable file located at MyGame/latest/server.exe must have a launch path of "/local/game/MyGame/latest/server.exe ".

        • Parameters (string) --

          Optional list of parameters to pass to the server executable on launch.

        • ConcurrentExecutions (integer) -- [REQUIRED]

          Number of server processes using this configuration to run concurrently on an instance.

Return type

dict

Returns

Response Syntax

{
    'RuntimeConfiguration': {
        'ServerProcesses': [
            {
                'LaunchPath': 'string',
                'Parameters': 'string',
                'ConcurrentExecutions': 123
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • RuntimeConfiguration (dict) --

      The runtime configuration currently in force. If the update was successful, this object matches the one in the request.

      • ServerProcesses (list) --

        Collection of server process configurations describing what server processes to run on each instance in a fleet

        • (dict) --

          A set of instructions for launching server processes on each instance in a fleet. Each instruction set identifies the location of the server executable, optional launch parameters, and the number of server processes with this configuration to maintain concurrently on the instance. Server process configurations make up a fleet's `` RuntimeConfiguration `` .

          • LaunchPath (string) --

            Location of the server executable in a game build. All game builds are installed on instances at the root : for Windows instances C:\game , and for Linux instances /local/game . A Windows game build with an executable file located at MyGame\latest\server.exe must have a launch path of "C:\game\MyGame\latest\server.exe ". A Linux game build with an executable file located at MyGame/latest/server.exe must have a launch path of "/local/game/MyGame/latest/server.exe ".

          • Parameters (string) --

            Optional list of parameters to pass to the server executable on launch.

          • ConcurrentExecutions (integer) --

            Number of server processes using this configuration to run concurrently on an instance.

Paginators

The available paginators are: