Amazon GameLift

2019/04/25 - Amazon GameLift - 5 new 5 updated api methods

Changes  This release introduces the new Realtime Servers feature, giving game developers a lightweight yet flexible solution that eliminates the need to build a fully custom game server. The AWS SDK updates provide support for scripts, which are used to configure and customize Realtime Servers.

CreateScript (new) Link ¶

Creates a new script record for your Realtime Servers script. Realtime scripts are JavaScript that provide configuration settings and optional custom game logic for your game. The script is deployed when you create a Realtime Servers fleet to host your game sessions. Script logic is executed during an active game session.

To create a new script record, specify a script name and provide the script file(s). The script files and all dependencies must be zipped into a single file. You can pull the zip file from either of these locations:

  • A locally available directory. Use the ZipFile parameter for this option.

  • An Amazon Simple Storage Service (Amazon S3) bucket under your AWS account. Use the StorageLocation parameter for this option. You'll need to have an Identity Access Management (IAM) role that allows the Amazon GameLift service to access your S3 bucket.

If the call is successful, a new script record is created with a unique script ID. If the script file is provided as a local file, the file is uploaded to an Amazon GameLift-owned S3 bucket and the script record's storage location reflects this location. If the script file is provided as an S3 bucket, Amazon GameLift accesses the file at this storage location as needed for deployment.

Learn more

Amazon GameLift Realtime Servers

Set Up a Role for Amazon GameLift Access

Related operations

  • CreateScript

  • ListScripts

  • DescribeScript

  • UpdateScript

  • DeleteScript

See also: AWS API Documentation

Request Syntax

client.create_script(
    Name='string',
    Version='string',
    StorageLocation={
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string',
        'ObjectVersion': 'string'
    },
    ZipFile=b'bytes'
)
type Name

string

param Name

Descriptive label that is associated with a script. Script names do not need to be unique. You can use UpdateScript 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 UpdateScript to change this value later.

type StorageLocation

dict

param StorageLocation

Location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the ObjectVersion parameter to specify an earlier version.

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

bytes

param ZipFile

Data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.

When using the AWS CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example: --zip-file fileb://myRealtimeScript.zip .

rtype

dict

returns

Response Syntax

{
    'Script': {
        'ScriptId': 'string',
        'Name': 'string',
        'Version': 'string',
        'SizeOnDisk': 123,
        'CreationTime': datetime(2015, 1, 1),
        'StorageLocation': {
            'Bucket': 'string',
            'Key': 'string',
            'RoleArn': 'string',
            'ObjectVersion': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Script (dict) --

      The newly created script record with a unique script ID. The new script's storage location reflects an Amazon S3 location: (1) If the script was uploaded from an S3 bucket under your account, the storage location reflects the information that was provided in the CreateScript request; (2) If the script file was uploaded from a local zip file, the storage location reflects an S3 location controls by the Amazon GameLift service.

      • ScriptId (string) --

        Unique identifier for a Realtime script

      • Name (string) --

        Descriptive label that is associated with a script. Script names do not need to be unique.

      • Version (string) --

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

      • SizeOnDisk (integer) --

        File size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at "0".

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

      • StorageLocation (dict) --

        Location in Amazon Simple Storage Service (Amazon S3) where build or script files are stored for access by Amazon GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript requests.

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

DeleteScript (new) Link ¶

Deletes a Realtime script. This action permanently deletes the script record. If script files were uploaded, they are also deleted (files stored in an S3 bucket are not deleted).

To delete a script, specify the script ID. Before deleting a script, be sure to terminate all fleets that are deployed with the script being deleted. Fleet instances periodically check for script updates, and if the script record no longer exists, the instance will go into an error state and be unable to host game sessions.

Learn more

Amazon GameLift Realtime Servers

Related operations

  • CreateScript

  • ListScripts

  • DescribeScript

  • UpdateScript

  • DeleteScript

See also: AWS API Documentation

Request Syntax

client.delete_script(
    ScriptId='string'
)
type ScriptId

string

param ScriptId

[REQUIRED]

Unique identifier for a Realtime script to delete.

returns

None

DescribeScript (new) Link ¶

Retrieves properties for a Realtime script.

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

Learn more

Amazon GameLift Realtime Servers

Related operations

  • CreateScript

  • ListScripts

  • DescribeScript

  • UpdateScript

  • DeleteScript

See also: AWS API Documentation

Request Syntax

client.describe_script(
    ScriptId='string'
)
type ScriptId

string

param ScriptId

[REQUIRED]

Unique identifier for a Realtime script to retrieve properties for.

rtype

dict

returns

Response Syntax

{
    'Script': {
        'ScriptId': 'string',
        'Name': 'string',
        'Version': 'string',
        'SizeOnDisk': 123,
        'CreationTime': datetime(2015, 1, 1),
        'StorageLocation': {
            'Bucket': 'string',
            'Key': 'string',
            'RoleArn': 'string',
            'ObjectVersion': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Script (dict) --

      Set of properties describing the requested script.

      • ScriptId (string) --

        Unique identifier for a Realtime script

      • Name (string) --

        Descriptive label that is associated with a script. Script names do not need to be unique.

      • Version (string) --

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

      • SizeOnDisk (integer) --

        File size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at "0".

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

      • StorageLocation (dict) --

        Location in Amazon Simple Storage Service (Amazon S3) where build or script files are stored for access by Amazon GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript requests.

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

ListScripts (new) Link ¶

Retrieves script records for all Realtime scripts that are associated with the AWS account in use.

Learn more

Amazon GameLift Realtime Servers

Related operations

  • CreateScript

  • ListScripts

  • DescribeScript

  • UpdateScript

  • DeleteScript

See also: AWS API Documentation

Request Syntax

client.list_scripts(
    Limit=123,
    NextToken='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.

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

{
    'Scripts': [
        {
            'ScriptId': 'string',
            'Name': 'string',
            'Version': 'string',
            'SizeOnDisk': 123,
            'CreationTime': datetime(2015, 1, 1),
            'StorageLocation': {
                'Bucket': 'string',
                'Key': 'string',
                'RoleArn': 'string',
                'ObjectVersion': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Scripts (list) --

      Set of properties describing the requested script.

      • (dict) --

        Properties describing a Realtime script.

        Related operations

        • CreateScript

        • ListScripts

        • DescribeScript

        • UpdateScript

        • DeleteScript

        • ScriptId (string) --

          Unique identifier for a Realtime script

        • Name (string) --

          Descriptive label that is associated with a script. Script names do not need to be unique.

        • Version (string) --

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

        • SizeOnDisk (integer) --

          File size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at "0".

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

        • StorageLocation (dict) --

          Location in Amazon Simple Storage Service (Amazon S3) where build or script files are stored for access by Amazon GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript requests.

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

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

UpdateScript (new) Link ¶

Updates Realtime script metadata and content.

To update script metadata, specify the script ID and provide updated name and/or version values.

To update script content, provide an updated zip file by pointing to either a local file or an Amazon S3 bucket location. You can use either method regardless of how the original script was uploaded. Use the Version parameter to track updates to the script.

If the call is successful, the updated metadata is stored in the script record and a revised script is uploaded to the Amazon GameLift service. Once the script is updated and acquired by a fleet instance, the new version is used for all new game sessions.

Learn more

Amazon GameLift Realtime Servers

Related operations

  • CreateScript

  • ListScripts

  • DescribeScript

  • UpdateScript

  • DeleteScript

See also: AWS API Documentation

Request Syntax

client.update_script(
    ScriptId='string',
    Name='string',
    Version='string',
    StorageLocation={
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string',
        'ObjectVersion': 'string'
    },
    ZipFile=b'bytes'
)
type ScriptId

string

param ScriptId

[REQUIRED]

Unique identifier for a Realtime script to update.

type Name

string

param Name

Descriptive label that is associated with a script. Script 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.

type StorageLocation

dict

param StorageLocation

Location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the ObjectVersion parameter to specify an earlier version.

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

bytes

param ZipFile

Data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.

When using the AWS CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example: --zip-file fileb://myRealtimeScript.zip .

rtype

dict

returns

Response Syntax

{
    'Script': {
        'ScriptId': 'string',
        'Name': 'string',
        'Version': 'string',
        'SizeOnDisk': 123,
        'CreationTime': datetime(2015, 1, 1),
        'StorageLocation': {
            'Bucket': 'string',
            'Key': 'string',
            'RoleArn': 'string',
            'ObjectVersion': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Script (dict) --

      The newly created script record with a unique script ID. The new script's storage location reflects an Amazon S3 location: (1) If the script was uploaded from an S3 bucket under your account, the storage location reflects the information that was provided in the CreateScript request; (2) If the script file was uploaded from a local zip file, the storage location reflects an S3 location controls by the Amazon GameLift service.

      • ScriptId (string) --

        Unique identifier for a Realtime script

      • Name (string) --

        Descriptive label that is associated with a script. Script names do not need to be unique.

      • Version (string) --

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

      • SizeOnDisk (integer) --

        File size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at "0".

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

      • StorageLocation (dict) --

        Location in Amazon Simple Storage Service (Amazon S3) where build or script files are stored for access by Amazon GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript requests.

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

CreateBuild (updated) Link ¶
Changes (both)
{'StorageLocation': {'ObjectVersion': 'string'}}

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'
)
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',
        '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
{'ScriptId': 'string'}
Response
{'FleetAttributes': {'ScriptId': 'string'}}

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'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
    EC2InboundPermissions=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ],
    NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
    RuntimeConfiguration={
        'ServerProcesses': [
            {
                'LaunchPath': 'string',
                'Parameters': 'string',
                'ConcurrentExecutions': 123
            },
        ],
        'MaxConcurrentGameSessionActivations': 123,
        'GameSessionActivationTimeoutSeconds': 123
    },
    ResourceCreationLimitPolicy={
        'NewGameSessionsPerCreator': 123,
        'PolicyPeriodInMinutes': 123
    },
    MetricGroups=[
        'string',
    ],
    PeerVpcAwsAccountId='string',
    PeerVpcId='string',
    FleetType='ON_DEMAND'|'SPOT',
    InstanceRoleArn='string'
)
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.

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'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
        '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',
        'ResourceCreationLimitPolicy': {
            'NewGameSessionsPerCreator': 123,
            'PolicyPeriodInMinutes': 123
        },
        'MetricGroups': [
            'string',
        ],
        'StoppedActions': [
            'AUTO_SCALING',
        ],
        'InstanceRoleArn': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetAttributes (dict) --

      Properties for the newly created fleet.

      • FleetId (string) --

        Unique identifier for a fleet.

      • FleetArn (string) --

        Identifier for a fleet that is unique across all regions.

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

DescribeFleetAttributes (updated) Link ¶
Changes (response)
{'FleetAttributes': {'ScriptId': 'string'}}

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'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
            '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',
            'ResourceCreationLimitPolicy': {
                'NewGameSessionsPerCreator': 123,
                'PolicyPeriodInMinutes': 123
            },
            'MetricGroups': [
                'string',
            ],
            'StoppedActions': [
                'AUTO_SCALING',
            ],
            'InstanceRoleArn': 'string'
        },
    ],
    '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.

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

ListFleets (updated) Link ¶
Changes (request)
{'ScriptId': 'string'}

Retrieves a collection of fleet records for this AWS account. You can filter the result set to find only those fleets that are deployed with a specific build or script. Use the pagination parameters to retrieve results in sequential pages.

Note

Fleet records are not listed in a particular order.

Learn more

Set Up 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.list_fleets(
    BuildId='string',
    ScriptId='string',
    Limit=123,
    NextToken='string'
)
type BuildId

string

param BuildId

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.

type ScriptId

string

param ScriptId

Unique identifier for a Realtime script to return fleets for. Use this parameter to return only fleets using the specified script. To retrieve all fleets, leave this parameter empty.

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

{
    '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.

RequestUploadCredentials (updated) Link ¶
Changes (response)
{'StorageLocation': {'ObjectVersion': 'string'}}

Retrieves a fresh set of credentials for use when uploading a new set of game build files to Amazon GameLift's Amazon S3. This is done as part of the build creation process; see CreateBuild.

To request new credentials, specify the build ID as returned with an initial CreateBuild request. If successful, a new set of credentials are returned, along with the S3 storage location associated with the build ID.

Learn more

Uploading Your Game

Related operations

  • CreateBuild

  • ListBuilds

  • DescribeBuild

  • UpdateBuild

  • DeleteBuild

See also: AWS API Documentation

Request Syntax

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

string

param BuildId

[REQUIRED]

Unique identifier for a build to get credentials for.

rtype

dict

returns

Response Syntax

{
    '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.

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

        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 path and key, identifying where the game build files are stored.

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