Amazon GameLift

2019/10/24 - Amazon GameLift - 10 updated api methods

Changes  Amazon GameLift offers expanded hardware options for game hosting: Custom game builds can use the Amazon Linux 2 operating system, and fleets for both custom builds and Realtime servers can now use C5, M5, and R5 instance types.

CreateBuild (updated) Link ¶
Changes (request, response)
Request
{'OperatingSystem': ['AMAZON_LINUX_2']}
Response
{'Build': {'OperatingSystem': ['AMAZON_LINUX_2']}}

Creates a new Amazon GameLift build record for your game server binary files and points to the location of your game server build files in an Amazon Simple Storage Service (Amazon S3) location.

Game server binaries must be combined into a .zip file for use with Amazon GameLift.

Warning

To create new builds quickly and easily, use the AWS CLI command ** upload-build ** . This helper command uploads your build and creates a new build record in one step, and automatically handles the necessary permissions.

The CreateBuild operation should be used only when you need to manually upload your build files, as in the following scenarios:

  • Store a build file in an Amazon S3 bucket under your own AWS account. To use this option, you must first give Amazon GameLift access to that Amazon S3 bucket. To create a new build record using files in your Amazon S3 bucket, call CreateBuild and specify a build name, operating system, and the storage location of your game build.

  • Upload a build file directly to Amazon GameLift's Amazon S3 account. To use this option, you first call CreateBuild with a build name and operating system. This action creates a new build record and returns an Amazon S3 storage location (bucket and key only) and temporary access credentials. Use the credentials to manually upload your build file to the storage location (see the Amazon S3 topic Uploading Objects ). You can upload files to a location only once.

If successful, this operation creates a new build record with a unique build ID and places it in INITIALIZED status. You can use DescribeBuild to check the status of your build. A build must be in READY status before it can be used to create fleets.

Learn more

Uploading Your Game

Create a Build with Files in Amazon S3

Related operations

  • CreateBuild

  • ListBuilds

  • DescribeBuild

  • UpdateBuild

  • DeleteBuild

See also: AWS API Documentation

Request Syntax

client.create_build(
    Name='string',
    Version='string',
    StorageLocation={
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string',
        'ObjectVersion': 'string'
    },
    OperatingSystem='WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2'
)
type Name

string

param Name

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.

type Version

string

param Version

Version that is associated with a build or script. Version strings do not need to be unique. You can use UpdateBuild to change this value later.

type StorageLocation

dict

param StorageLocation

Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key, as well as a the ARN for a role that you set up to allow Amazon GameLift to access your Amazon S3 bucket. The S3 bucket must be in the same region that you want to create a new build in.

  • Bucket (string) --

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

  • Key (string) --

    Name of the zip file containing the build files or script files.

  • RoleArn (string) --

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

  • ObjectVersion (string) --

    Version of the file, if object versioning is turned on for the bucket. Amazon GameLift uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file; if not set, the latest version of the file is retrieved.

type OperatingSystem

string

param OperatingSystem

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. If an operating system is not specified when creating a build, Amazon GameLift uses the default value (WINDOWS_2012). This value cannot be changed later.

rtype

dict

returns

Response Syntax

{
    'Build': {
        'BuildId': 'string',
        'Name': 'string',
        'Version': 'string',
        'Status': 'INITIALIZED'|'READY'|'FAILED',
        'SizeOnDisk': 123,
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
        'CreationTime': datetime(2015, 1, 1)
    },
    'UploadCredentials': {
        'AccessKeyId': 'string',
        'SecretAccessKey': 'string',
        'SessionToken': 'string'
    },
    'StorageLocation': {
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string',
        'ObjectVersion': '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 a build or script. 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 returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have a limited life span. To refresh these credentials, call RequestUploadCredentials .

      • AccessKeyId (string) --

        Temporary key allowing access to the Amazon GameLift S3 account.

      • SecretAccessKey (string) --

        Temporary secret key allowing access to the Amazon GameLift S3 account.

      • SessionToken (string) --

        Token used to associate a specific build ID with the files uploaded using these credentials.

    • StorageLocation (dict) --

      Amazon S3 location for your game build file, including bucket name and key.

      • Bucket (string) --

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

      • Key (string) --

        Name of the zip file containing the build files or script files.

      • RoleArn (string) --

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

      • ObjectVersion (string) --

        Version of the file, if object versioning is turned on for the bucket. Amazon GameLift uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file; if not set, the latest version of the file is retrieved.

CreateFleet (updated) Link ¶
Changes (request, response)
Request
{'EC2InstanceType': ['m5.12xlarge',
                     'm5.large',
                     'r5.xlarge',
                     'c5.24xlarge',
                     'r5.12xlarge',
                     'c5.12xlarge',
                     'm5.xlarge',
                     'r5.large',
                     'm5.24xlarge',
                     'c5.18xlarge',
                     'c5.large',
                     'c5.xlarge',
                     'r5.16xlarge',
                     'r5.24xlarge',
                     'm5.8xlarge',
                     'm5.2xlarge',
                     'm5.4xlarge',
                     'm5.16xlarge',
                     'r5.8xlarge',
                     'c5.2xlarge',
                     'c5.9xlarge',
                     'r5.2xlarge',
                     'r5.4xlarge',
                     'c5.4xlarge']}
Response
{'FleetAttributes': {'InstanceType': ['m5.12xlarge',
                                      'm5.large',
                                      'r5.xlarge',
                                      'c5.24xlarge',
                                      'r5.12xlarge',
                                      'c5.12xlarge',
                                      'm5.xlarge',
                                      'r5.large',
                                      'm5.24xlarge',
                                      'c5.18xlarge',
                                      'c5.large',
                                      'c5.xlarge',
                                      'r5.16xlarge',
                                      'r5.24xlarge',
                                      'm5.8xlarge',
                                      'm5.2xlarge',
                                      'm5.4xlarge',
                                      'm5.16xlarge',
                                      'r5.8xlarge',
                                      'c5.2xlarge',
                                      'c5.9xlarge',
                                      'r5.2xlarge',
                                      'r5.4xlarge',
                                      'c5.4xlarge'],
                     'OperatingSystem': ['AMAZON_LINUX_2']}}

Creates a new fleet to run your game servers. whether they are custom game builds or Realtime Servers with game-specific script. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can host multiple game sessions. When creating a fleet, you choose the hardware specifications, set some configuration options, and specify the game server to deploy on the new fleet.

To create a new fleet, you must provide the following: (1) a fleet name, (2) an EC2 instance type and fleet type (spot or on-demand), (3) the build ID for your game build or script ID if using Realtime Servers, and (4) a run-time configuration, which determines how game servers will run on each instance in the fleet.

Note

When creating a Realtime Servers fleet, we recommend using a minimal version of the Realtime script (see this working code example ). This will make it much easier to troubleshoot any fleet creation issues. Once the fleet is active, you can update your Realtime script as needed.

If the CreateFleet call is successful, Amazon GameLift performs the following tasks. You can track the process of a fleet by checking the fleet status or by monitoring fleet creation events:

  • Creates a fleet record. Status: NEW .

  • Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console. Sets the fleet's target capacity to 1 (desired instances), which triggers Amazon GameLift to start one new EC2 instance.

  • Downloads the game build or Realtime script to the new instance and installs it. Statuses: DOWNLOADING , VALIDATING , BUILDING .

  • 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. Status: ACTIVATING .

  • Sets the fleet's status to ACTIVE as soon as one server process is ready to host a game session.

Learn more

Working with Fleets

Debug Fleet Creation Issues

Related operations

  • CreateFleet

  • ListFleets

  • DeleteFleet

  • Describe fleets:

    • DescribeFleetAttributes

    • DescribeFleetCapacity

    • DescribeFleetPortSettings

    • DescribeFleetUtilization

    • DescribeRuntimeConfiguration

    • DescribeEC2InstanceLimits

    • DescribeFleetEvents

  • Update fleets:

    • UpdateFleetAttributes

    • UpdateFleetCapacity

    • UpdateFleetPortSettings

    • UpdateRuntimeConfiguration

  • Manage fleet actions:

    • StartFleetActions

    • StopFleetActions

See also: AWS API Documentation

Request Syntax

client.create_fleet(
    Name='string',
    Description='string',
    BuildId='string',
    ScriptId='string',
    ServerLaunchPath='string',
    ServerLaunchParameters='string',
    LogPaths=[
        'string',
    ],
    EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
    EC2InboundPermissions=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ],
    NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
    RuntimeConfiguration={
        'ServerProcesses': [
            {
                'LaunchPath': 'string',
                'Parameters': 'string',
                'ConcurrentExecutions': 123
            },
        ],
        'MaxConcurrentGameSessionActivations': 123,
        'GameSessionActivationTimeoutSeconds': 123
    },
    ResourceCreationLimitPolicy={
        'NewGameSessionsPerCreator': 123,
        'PolicyPeriodInMinutes': 123
    },
    MetricGroups=[
        'string',
    ],
    PeerVpcAwsAccountId='string',
    PeerVpcId='string',
    FleetType='ON_DEMAND'|'SPOT',
    InstanceRoleArn='string',
    CertificateConfiguration={
        'CertificateType': 'DISABLED'|'GENERATED'
    }
)
type Name

string

param Name

[REQUIRED]

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

type Description

string

param Description

Human-readable description of a fleet.

type BuildId

string

param BuildId

Unique identifier for a build to be deployed on the new fleet. The custom game server 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.

type ScriptId

string

param ScriptId

Unique identifier for a Realtime script to be deployed on the new fleet. The Realtime script must have been successfully uploaded to Amazon GameLift. This fleet setting cannot be changed once the fleet is created.

type ServerLaunchPath

string

param ServerLaunchPath

This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)

type ServerLaunchParameters

string

param ServerLaunchParameters

This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)

type LogPaths

list

param LogPaths

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

type EC2InstanceType

string

param EC2InstanceType

[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.

type EC2InboundPermissions

list

param EC2InboundPermissions

Range of IP addresses and port settings that permit inbound traffic to access game sessions that running on the fleet. For fleets using a custom game build, this parameter is required before game sessions running on the fleet can accept connections. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges for use by the Realtime servers. You can specify multiple permission settings or add more by updating the fleet.

  • (dict) --

    A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift. New game sessions that are started on the fleet are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. For fleets created with a custom game server, the ranges reflect the server's game session assignments. For Realtime Servers fleets, Amazon GameLift automatically opens two port ranges, one for TCP messaging and one for UDP for use by the Realtime servers.

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

type NewGameSessionProtectionPolicy

string

param NewGameSessionProtectionPolicy

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.

type RuntimeConfiguration

dict

param RuntimeConfiguration

Instructions for launching server processes on each instance in the fleet. Server processes run either a custom game build executable or a Realtime Servers script. The run-time configuration lists the types of server processes to run on an instance and includes the following configuration settings: the server executable or launch script file, launch parameters, and the number of processes to run concurrently on each instance. A CreateFleet request must include a run-time configuration with at least one server process configuration.

  • ServerProcesses (list) --

    Collection of server process configurations that describe which server processes to run on each instance in a fleet.

    • (dict) --

      A set of instructions for launching server processes on each instance in a fleet. Server processes run either a custom game build executable or a Realtime Servers script. Each instruction set identifies the location of the custom game build executable or Realtime launch script, 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 custom game build or the name of the Realtime script file that contains the Init() function. Game builds and Realtime scripts are installed on instances at the root:

        • Windows (for custom game builds only): C:\game . Example: "C:\game\MyGame\server.exe "

        • Linux: /local/game . Examples: "/local/game/MyGame/server.exe " or "/local/game/MyRealtimeScript.js "

      • Parameters (string) --

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

      • ConcurrentExecutions (integer) -- [REQUIRED]

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

  • MaxConcurrentGameSessionActivations (integer) --

    Maximum number of game sessions with status ACTIVATING to allow on an instance simultaneously. This setting limits the amount of instance resources that can be used for new game activations at any one time.

  • GameSessionActivationTimeoutSeconds (integer) --

    Maximum amount of time (in seconds) that a game session can remain in status ACTIVATING . If the game session is not active before the timeout, activation is terminated and the game session status is changed to TERMINATED .

type ResourceCreationLimitPolicy

dict

param ResourceCreationLimitPolicy

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.

type MetricGroups

list

param MetricGroups

Name of an Amazon CloudWatch metric group to add this fleet to. A metric group aggregates the metrics for all fleets in the group. Specify an existing metric group name, or provide a new name to create a new metric group. A fleet can only be included in one metric group at a time.

  • (string) --

type PeerVpcAwsAccountId

string

param PeerVpcAwsAccountId

Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.

type PeerVpcId

string

param PeerVpcId

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets .

type FleetType

string

param FleetType

Indicates whether to use on-demand instances or spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations based on the instance type selected for this fleet. Learn more about On-Demand versus Spot Instances .

type InstanceRoleArn

string

param InstanceRoleArn

Unique identifier for an AWS IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, daemons (background processes). Create a role or look up a role's ARN using the IAM dashboard in the AWS Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server .

type CertificateConfiguration

dict

param CertificateConfiguration
  • CertificateType (string) -- [REQUIRED]

rtype

dict

returns

Response Syntax

{
    'FleetAttributes': {
        'FleetId': 'string',
        'FleetArn': 'string',
        'FleetType': 'ON_DEMAND'|'SPOT',
        'InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
        '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',
        'ScriptId': 'string',
        'ServerLaunchPath': 'string',
        'ServerLaunchParameters': 'string',
        'LogPaths': [
            'string',
        ],
        'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
        'ResourceCreationLimitPolicy': {
            'NewGameSessionsPerCreator': 123,
            'PolicyPeriodInMinutes': 123
        },
        'MetricGroups': [
            'string',
        ],
        'StoppedActions': [
            'AUTO_SCALING',
        ],
        'InstanceRoleArn': 'string',
        'CertificateConfiguration': {
            'CertificateType': 'DISABLED'|'GENERATED'
        }
    }
}

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.

      • FleetType (string) --

        Indicates whether the fleet uses on-demand or spot instances. A spot instance in use may be interrupted with a two-minute notification.

      • InstanceType (string) --

        EC2 instance type indicating the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon EC2 Instance Types for detailed descriptions.

      • 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 or Realtime script and starting server processes.

        • ACTIVE -- Hosts can now accept game sessions.

        • ERROR -- An error occurred when downloading, validating, building, or activating the fleet.

        • DELETING -- Hosts are responding to a delete fleet request.

        • TERMINATED -- The fleet no longer exists.

      • BuildId (string) --

        Unique identifier for a build.

      • ScriptId (string) --

        Unique identifier for a Realtime script.

      • ServerLaunchPath (string) --

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

      • ServerLaunchParameters (string) --

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

      • LogPaths (list) --

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

        • (string) --

      • NewGameSessionProtectionPolicy (string) --

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

        • NoProtection -- The game session can be terminated during a scale-down event.

        • FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.

      • OperatingSystem (string) --

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

      • ResourceCreationLimitPolicy (dict) --

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

        • NewGameSessionsPerCreator (integer) --

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

        • PolicyPeriodInMinutes (integer) --

          Time span used in evaluating the resource creation limit policy.

      • MetricGroups (list) --

        Names of metric groups that this fleet is included in. In Amazon CloudWatch, you can view metrics for an individual fleet or aggregated metrics for fleets that are in a fleet metric group. A fleet can be included in only one metric group at a time.

        • (string) --

      • StoppedActions (list) --

        List of fleet actions that have been suspended using StopFleetActions . This includes auto-scaling.

        • (string) --

      • InstanceRoleArn (string) --

        Unique identifier for an AWS IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, daemons (background processes). Create a role or look up a role's ARN using the IAM dashboard in the AWS Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server .

      • CertificateConfiguration (dict) --

        • CertificateType (string) --

DescribeBuild (updated) Link ¶
Changes (response)
{'Build': {'OperatingSystem': ['AMAZON_LINUX_2']}}

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

Learn more

Working with Builds

Related operations

  • CreateBuild

  • ListBuilds

  • DescribeBuild

  • UpdateBuild

  • DeleteBuild

See also: AWS API Documentation

Request Syntax

client.describe_build(
    BuildId='string'
)
type BuildId

string

param BuildId

[REQUIRED]

Unique identifier for a build to retrieve properties for.

rtype

dict

returns

Response Syntax

{
    'Build': {
        'BuildId': 'string',
        'Name': 'string',
        'Version': 'string',
        'Status': 'INITIALIZED'|'READY'|'FAILED',
        'SizeOnDisk': 123,
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
        '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 a build or script. 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").

DescribeEC2InstanceLimits (updated) Link ¶
Changes (request, response)
Request
{'EC2InstanceType': ['m5.12xlarge',
                     'm5.large',
                     'r5.xlarge',
                     'c5.24xlarge',
                     'r5.12xlarge',
                     'c5.12xlarge',
                     'm5.xlarge',
                     'r5.large',
                     'm5.24xlarge',
                     'c5.18xlarge',
                     'c5.large',
                     'c5.xlarge',
                     'r5.16xlarge',
                     'r5.24xlarge',
                     'm5.8xlarge',
                     'm5.2xlarge',
                     'm5.4xlarge',
                     'm5.16xlarge',
                     'r5.8xlarge',
                     'c5.2xlarge',
                     'c5.9xlarge',
                     'r5.2xlarge',
                     'r5.4xlarge',
                     'c5.4xlarge']}
Response
{'EC2InstanceLimits': {'EC2InstanceType': ['m5.12xlarge',
                                           'm5.large',
                                           'r5.xlarge',
                                           'c5.24xlarge',
                                           'r5.12xlarge',
                                           'c5.12xlarge',
                                           'm5.xlarge',
                                           'r5.large',
                                           'm5.24xlarge',
                                           'c5.18xlarge',
                                           'c5.large',
                                           'c5.xlarge',
                                           'r5.16xlarge',
                                           'r5.24xlarge',
                                           'm5.8xlarge',
                                           'm5.2xlarge',
                                           'm5.4xlarge',
                                           'm5.16xlarge',
                                           'r5.8xlarge',
                                           'c5.2xlarge',
                                           'c5.9xlarge',
                                           'r5.2xlarge',
                                           'r5.4xlarge',
                                           'c5.4xlarge']}}

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

Learn more

Working with Fleets .

Related operations

  • CreateFleet

  • ListFleets

  • DeleteFleet

  • Describe fleets:

    • DescribeFleetAttributes

    • DescribeFleetCapacity

    • DescribeFleetPortSettings

    • DescribeFleetUtilization

    • DescribeRuntimeConfiguration

    • DescribeEC2InstanceLimits

    • DescribeFleetEvents

  • Update fleets:

    • UpdateFleetAttributes

    • UpdateFleetCapacity

    • UpdateFleetPortSettings

    • UpdateRuntimeConfiguration

  • Manage fleet actions:

    • StartFleetActions

    • StopFleetActions

See also: AWS API Documentation

Request Syntax

client.describe_ec2_instance_limits(
    EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'
)
type EC2InstanceType

string

param EC2InstanceType

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.

rtype

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'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
            '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.

DescribeFleetAttributes (updated) Link ¶
Changes (response)
{'FleetAttributes': {'InstanceType': ['m5.12xlarge',
                                      'm5.large',
                                      'r5.xlarge',
                                      'c5.24xlarge',
                                      'r5.12xlarge',
                                      'c5.12xlarge',
                                      'm5.xlarge',
                                      'r5.large',
                                      'm5.24xlarge',
                                      'c5.18xlarge',
                                      'c5.large',
                                      'c5.xlarge',
                                      'r5.16xlarge',
                                      'r5.24xlarge',
                                      'm5.8xlarge',
                                      'm5.2xlarge',
                                      'm5.4xlarge',
                                      'm5.16xlarge',
                                      'r5.8xlarge',
                                      'c5.2xlarge',
                                      'c5.9xlarge',
                                      'r5.2xlarge',
                                      'r5.4xlarge',
                                      'c5.4xlarge'],
                     'OperatingSystem': ['AMAZON_LINUX_2']}}

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.

Learn more

Working with Fleets .

Related operations

  • CreateFleet

  • ListFleets

  • DeleteFleet

  • Describe fleets:

    • DescribeFleetAttributes

    • DescribeFleetCapacity

    • DescribeFleetPortSettings

    • DescribeFleetUtilization

    • DescribeRuntimeConfiguration

    • DescribeEC2InstanceLimits

    • DescribeFleetEvents

  • Update fleets:

    • UpdateFleetAttributes

    • UpdateFleetCapacity

    • UpdateFleetPortSettings

    • UpdateRuntimeConfiguration

  • Manage fleet actions:

    • StartFleetActions

    • StopFleetActions

See also: AWS API Documentation

Request Syntax

client.describe_fleet_attributes(
    FleetIds=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
type FleetIds

list

param FleetIds

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

  • (string) --

type Limit

integer

param Limit

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

type NextToken

string

param NextToken

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.

rtype

dict

returns

Response Syntax

{
    'FleetAttributes': [
        {
            'FleetId': 'string',
            'FleetArn': 'string',
            'FleetType': 'ON_DEMAND'|'SPOT',
            'InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
            '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',
            'ScriptId': 'string',
            'ServerLaunchPath': 'string',
            'ServerLaunchParameters': 'string',
            'LogPaths': [
                'string',
            ],
            'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
            'ResourceCreationLimitPolicy': {
                'NewGameSessionsPerCreator': 123,
                'PolicyPeriodInMinutes': 123
            },
            'MetricGroups': [
                'string',
            ],
            'StoppedActions': [
                'AUTO_SCALING',
            ],
            'InstanceRoleArn': 'string',
            'CertificateConfiguration': {
                'CertificateType': 'DISABLED'|'GENERATED'
            }
        },
    ],
    '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.

        • CreateFleet

        • ListFleets

        • DeleteFleet

        • Describe fleets:

          • DescribeFleetAttributes

          • DescribeFleetCapacity

          • DescribeFleetPortSettings

          • DescribeFleetUtilization

          • DescribeRuntimeConfiguration

          • DescribeEC2InstanceLimits

          • DescribeFleetEvents

        • Update fleets:

          • UpdateFleetAttributes

          • UpdateFleetCapacity

          • UpdateFleetPortSettings

          • UpdateRuntimeConfiguration

        • Manage fleet actions:

          • StartFleetActions

          • StopFleetActions

        • FleetId (string) --

          Unique identifier for a fleet.

        • FleetArn (string) --

          Identifier for a fleet that is unique across all regions.

        • FleetType (string) --

          Indicates whether the fleet uses on-demand or spot instances. A spot instance in use may be interrupted with a two-minute notification.

        • InstanceType (string) --

          EC2 instance type indicating the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon EC2 Instance Types for detailed descriptions.

        • 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 or Realtime script and starting server processes.

          • ACTIVE -- Hosts can now accept game sessions.

          • ERROR -- An error occurred when downloading, validating, building, or activating the fleet.

          • DELETING -- Hosts are responding to a delete fleet request.

          • TERMINATED -- The fleet no longer exists.

        • BuildId (string) --

          Unique identifier for a build.

        • ScriptId (string) --

          Unique identifier for a Realtime script.

        • ServerLaunchPath (string) --

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

        • ServerLaunchParameters (string) --

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

        • LogPaths (list) --

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

          • (string) --

        • NewGameSessionProtectionPolicy (string) --

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

          • NoProtection -- The game session can be terminated during a scale-down event.

          • FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.

        • OperatingSystem (string) --

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

        • ResourceCreationLimitPolicy (dict) --

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

          • NewGameSessionsPerCreator (integer) --

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

          • PolicyPeriodInMinutes (integer) --

            Time span used in evaluating the resource creation limit policy.

        • MetricGroups (list) --

          Names of metric groups that this fleet is included in. In Amazon CloudWatch, you can view metrics for an individual fleet or aggregated metrics for fleets that are in a fleet metric group. A fleet can be included in only one metric group at a time.

          • (string) --

        • StoppedActions (list) --

          List of fleet actions that have been suspended using StopFleetActions . This includes auto-scaling.

          • (string) --

        • InstanceRoleArn (string) --

          Unique identifier for an AWS IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, daemons (background processes). Create a role or look up a role's ARN using the IAM dashboard in the AWS Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server .

        • CertificateConfiguration (dict) --

          • CertificateType (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.

DescribeFleetCapacity (updated) Link ¶
Changes (response)
{'FleetCapacity': {'InstanceType': ['m5.12xlarge',
                                    'm5.large',
                                    'r5.xlarge',
                                    'c5.24xlarge',
                                    'r5.12xlarge',
                                    'c5.12xlarge',
                                    'm5.xlarge',
                                    'r5.large',
                                    'm5.24xlarge',
                                    'c5.18xlarge',
                                    'c5.large',
                                    'c5.xlarge',
                                    'r5.16xlarge',
                                    'r5.24xlarge',
                                    'm5.8xlarge',
                                    'm5.2xlarge',
                                    'm5.4xlarge',
                                    'm5.16xlarge',
                                    'r5.8xlarge',
                                    'c5.2xlarge',
                                    'c5.9xlarge',
                                    'r5.2xlarge',
                                    'r5.4xlarge',
                                    'c5.4xlarge']}}

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.

Learn more

Working with Fleets .

Related operations

  • CreateFleet

  • ListFleets

  • DeleteFleet

  • Describe fleets:

    • DescribeFleetAttributes

    • DescribeFleetCapacity

    • DescribeFleetPortSettings

    • DescribeFleetUtilization

    • DescribeRuntimeConfiguration

    • DescribeEC2InstanceLimits

    • DescribeFleetEvents

  • Update fleets:

    • UpdateFleetAttributes

    • UpdateFleetCapacity

    • UpdateFleetPortSettings

    • UpdateRuntimeConfiguration

  • Manage fleet actions:

    • StartFleetActions

    • StopFleetActions

See also: AWS API Documentation

Request Syntax

client.describe_fleet_capacity(
    FleetIds=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
type FleetIds

list

param FleetIds

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

  • (string) --

type Limit

integer

param Limit

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

type NextToken

string

param NextToken

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.

rtype

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'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
            '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.

        • CreateFleet

        • ListFleets

        • DeleteFleet

        • Describe fleets:

          • DescribeFleetAttributes

          • DescribeFleetCapacity

          • DescribeFleetPortSettings

          • DescribeFleetUtilization

          • DescribeRuntimeConfiguration

          • DescribeEC2InstanceLimits

          • DescribeFleetEvents

        • Update fleets:

          • UpdateFleetAttributes

          • UpdateFleetCapacity

          • UpdateFleetPortSettings

          • UpdateRuntimeConfiguration

        • Manage fleet actions:

          • StartFleetActions

          • StopFleetActions

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

DescribeInstances (updated) Link ¶
Changes (response)
{'Instances': {'OperatingSystem': ['AMAZON_LINUX_2'],
               'Type': ['m5.12xlarge',
                        'm5.large',
                        'r5.xlarge',
                        'c5.24xlarge',
                        'r5.12xlarge',
                        'c5.12xlarge',
                        'm5.xlarge',
                        'r5.large',
                        'm5.24xlarge',
                        'c5.18xlarge',
                        'c5.large',
                        'c5.xlarge',
                        'r5.16xlarge',
                        'r5.24xlarge',
                        'm5.8xlarge',
                        'm5.2xlarge',
                        'm5.4xlarge',
                        'm5.16xlarge',
                        'r5.8xlarge',
                        'c5.2xlarge',
                        'c5.9xlarge',
                        'r5.2xlarge',
                        'r5.4xlarge',
                        'c5.4xlarge']}}

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

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

See also: AWS API Documentation

Request Syntax

client.describe_instances(
    FleetId='string',
    InstanceId='string',
    Limit=123,
    NextToken='string'
)
type FleetId

string

param FleetId

[REQUIRED]

Unique identifier for a fleet to retrieve instance information for.

type InstanceId

string

param InstanceId

Unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.

type Limit

integer

param Limit

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

type NextToken

string

param NextToken

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

rtype

dict

returns

Response Syntax

{
    'Instances': [
        {
            'FleetId': 'string',
            'InstanceId': 'string',
            'IpAddress': 'string',
            'DnsName': 'string',
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
            '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'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
            'Status': 'PENDING'|'ACTIVE'|'TERMINATING',
            'CreationTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Instances (list) --

      Collection of objects containing properties for each instance returned.

      • (dict) --

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

        • FleetId (string) --

          Unique identifier for a fleet that the instance is in.

        • InstanceId (string) --

          Unique identifier for an instance.

        • IpAddress (string) --

          IP address assigned to the instance.

        • DnsName (string) --

        • OperatingSystem (string) --

          Operating system that is running on this instance.

        • Type (string) --

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

        • Status (string) --

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

          • PENDING -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration.

          • ACTIVE -- The instance has been successfully created and at least one server process has successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions.

          • TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.

        • CreationTime (datetime) --

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

    • NextToken (string) --

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

GetInstanceAccess (updated) Link ¶
Changes (response)
{'InstanceAccess': {'OperatingSystem': ['AMAZON_LINUX_2']}}

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 both the instance and the fleet it belongs to. You can retrieve a fleet's instance IDs by calling DescribeInstances . 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

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

string

param FleetId

[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.

type InstanceId

string

param InstanceId

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'InstanceAccess': {
        'FleetId': 'string',
        'InstanceId': 'string',
        'IpAddress': 'string',
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
        '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.

ListBuilds (updated) Link ¶
Changes (response)
{'Builds': {'OperatingSystem': ['AMAZON_LINUX_2']}}

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.

Learn more

Working with Builds

Related operations

  • CreateBuild

  • ListBuilds

  • DescribeBuild

  • UpdateBuild

  • DeleteBuild

See also: AWS API Documentation

Request Syntax

client.list_builds(
    Status='INITIALIZED'|'READY'|'FAILED',
    Limit=123,
    NextToken='string'
)
type Status

string

param Status

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.

type Limit

integer

param Limit

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

type NextToken

string

param NextToken

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

rtype

dict

returns

Response Syntax

{
    'Builds': [
        {
            'BuildId': 'string',
            'Name': 'string',
            'Version': 'string',
            'Status': 'INITIALIZED'|'READY'|'FAILED',
            'SizeOnDisk': 123,
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
            '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 custom game build.

        Related operations

        • 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 a build or script. 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.

UpdateBuild (updated) Link ¶
Changes (response)
{'Build': {'OperatingSystem': ['AMAZON_LINUX_2']}}

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.

Learn more

Working with Builds

Related operations

  • CreateBuild

  • ListBuilds

  • DescribeBuild

  • UpdateBuild

  • DeleteBuild

See also: AWS API Documentation

Request Syntax

client.update_build(
    BuildId='string',
    Name='string',
    Version='string'
)
type BuildId

string

param BuildId

[REQUIRED]

Unique identifier for a build to update.

type Name

string

param Name

Descriptive label that is associated with a build. Build names do not need to be unique.

type Version

string

param Version

Version that is associated with a build or script. Version strings do not need to be unique.

rtype

dict

returns

Response Syntax

{
    'Build': {
        'BuildId': 'string',
        'Name': 'string',
        'Version': 'string',
        'Status': 'INITIALIZED'|'READY'|'FAILED',
        'SizeOnDisk': 123,
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
        '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 a build or script. 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").