Amazon GameLift

2022/12/01 - Amazon GameLift - 9 new 14 updated api methods

Changes  GameLift introduces a new feature, GameLift Anywhere. GameLift Anywhere allows you to integrate your own compute resources with GameLift. You can also use GameLift Anywhere to iteratively test your game servers without uploading the build to GameLift for every iteration.

DescribeCompute (new) Link ¶

Retrieves properties for a compute resource. To request a compute resource specify the fleet ID and compute name. If successful, GameLift returns an object containing the build properties.

See also: AWS API Documentation

Request Syntax

client.describe_compute(
    FleetId='string',
    ComputeName='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet the compute is registered to.

type ComputeName

string

param ComputeName

[REQUIRED]

A descriptive label that is associated with the compute resource registered to your fleet.

rtype

dict

returns

Response Syntax

{
    'Compute': {
        'FleetId': 'string',
        'FleetArn': 'string',
        'ComputeName': 'string',
        'ComputeArn': 'string',
        'IpAddress': 'string',
        'DnsName': 'string',
        'ComputeStatus': 'PENDING'|'ACTIVE'|'TERMINATING',
        'Location': 'string',
        'CreationTime': datetime(2015, 1, 1),
        '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'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge',
        'GameLiftServiceSdkEndpoint': 'string'
    }
}

Response Structure

  • (dict) --

    • Compute (dict) --

      The details of the compute resource you registered to the specified fleet.

      • FleetId (string) --

        A unique identifier for the fleet that the compute is registered to.

      • FleetArn (string) --

        The Amazon Resource Name (ARN) of the fleet that the compute is registered to.

      • ComputeName (string) --

        A descriptive label that is associated with the compute resource registered to your fleet.

      • ComputeArn (string) --

        The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.

      • IpAddress (string) --

        The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

      • DnsName (string) --

        The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

      • ComputeStatus (string) --

        Current status of the compute. A compute must have an ACTIVE status to host game sessions.

      • Location (string) --

        The name of the custom location you added to the fleet that this compute resource resides in.

      • CreationTime (datetime) --

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

      • OperatingSystem (string) --

        The type of operating system on your compute resource.

      • Type (string) --

        Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.

      • GameLiftServiceSdkEndpoint (string) --

        The endpoint connection details of the GameLift SDK endpoint that your game server connects to.

RegisterCompute (new) Link ¶

Registers your compute resources in a fleet you previously created. After you register a compute to your fleet, you can monitor and manage your compute using GameLift. The operation returns the compute resource containing SDK endpoint you can use to connect your game server to GameLift.

Learn more

See also: AWS API Documentation

Request Syntax

client.register_compute(
    FleetId='string',
    ComputeName='string',
    CertificatePath='string',
    DnsName='string',
    IpAddress='string',
    Location='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.

type ComputeName

string

param ComputeName

[REQUIRED]

A descriptive label that is associated with the compute resource registered to your fleet.

type CertificatePath

string

param CertificatePath

The path to the TLS certificate on your compute resource. The path and certificate are not validated by GameLift.

type DnsName

string

param DnsName

The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

type IpAddress

string

param IpAddress

The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

type Location

string

param Location

The name of the custom location you added to the fleet you are registering this compute resource to.

rtype

dict

returns

Response Syntax

{
    'Compute': {
        'FleetId': 'string',
        'FleetArn': 'string',
        'ComputeName': 'string',
        'ComputeArn': 'string',
        'IpAddress': 'string',
        'DnsName': 'string',
        'ComputeStatus': 'PENDING'|'ACTIVE'|'TERMINATING',
        'Location': 'string',
        'CreationTime': datetime(2015, 1, 1),
        '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'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge',
        'GameLiftServiceSdkEndpoint': 'string'
    }
}

Response Structure

  • (dict) --

    • Compute (dict) --

      The details of the compute resource you registered to the specified fleet.

      • FleetId (string) --

        A unique identifier for the fleet that the compute is registered to.

      • FleetArn (string) --

        The Amazon Resource Name (ARN) of the fleet that the compute is registered to.

      • ComputeName (string) --

        A descriptive label that is associated with the compute resource registered to your fleet.

      • ComputeArn (string) --

        The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.

      • IpAddress (string) --

        The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

      • DnsName (string) --

        The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

      • ComputeStatus (string) --

        Current status of the compute. A compute must have an ACTIVE status to host game sessions.

      • Location (string) --

        The name of the custom location you added to the fleet that this compute resource resides in.

      • CreationTime (datetime) --

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

      • OperatingSystem (string) --

        The type of operating system on your compute resource.

      • Type (string) --

        Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.

      • GameLiftServiceSdkEndpoint (string) --

        The endpoint connection details of the GameLift SDK endpoint that your game server connects to.

CreateLocation (new) Link ¶

Creates a custom location for use in an Anywhere fleet.

See also: AWS API Documentation

Request Syntax

client.create_location(
    LocationName='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type LocationName

string

param LocationName

[REQUIRED]

A descriptive name for the custom location.

type Tags

list

param Tags

A list of labels to assign to the new matchmaking configuration resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Rareference .

  • (dict) --

    A label that can be assigned to a GameLift resource.

    Learn more

    Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

    Amazon Web Services Tagging Strategies

    Related actions

    All APIs by task

    • Key (string) -- [REQUIRED]

      The key for a developer-defined key:value pair for tagging an Amazon Web Services resource.

    • Value (string) -- [REQUIRED]

      The value for a developer-defined key:value pair for tagging an Amazon Web Services resource.

rtype

dict

returns

Response Syntax

{
    'Location': {
        'LocationName': 'string',
        'LocationArn': 'string'
    }
}

Response Structure

  • (dict) --

    • Location (dict) --

      The details of the custom location you created.

      • LocationName (string) --

        The location's name.

      • LocationArn (string) --

        The Amazon Resource Name (ARN ) that is assigned to a GameLift location resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::location/location-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

GetComputeAccess (new) Link ¶

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

To remotely access an instance, you need credentials that match the operating system of the instance. For a Windows instance, GameLift returns a user name and password as strings for use with a Windows Remote Desktop client. For a Linux instance, 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 CLI, saving the secret can be handled as part of the GetInstanceAccess request, as shown in one of the examples for this operation.

To request access to a specific instance, specify the IDs of both the instance and the fleet it belongs to.

Learn more

Remotely Access Fleet Instances

Debug Fleet Issues

See also: AWS API Documentation

Request Syntax

client.get_compute_access(
    FleetId='string',
    ComputeName='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet that the compute resource is registered to.

type ComputeName

string

param ComputeName

[REQUIRED]

The name of the compute resource you are requesting credentials for.

rtype

dict

returns

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string',
    'ComputeName': 'string',
    'ComputeArn': 'string',
    'Credentials': {
        'AccessKeyId': 'string',
        'SecretAccessKey': 'string',
        'SessionToken': 'string'
    }
}

Response Structure

  • (dict) --

    • FleetId (string) --

      The fleet ID of compute resource.

    • FleetArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

    • ComputeName (string) --

      The name of the compute resource you requested credentials for.

    • ComputeArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift compute resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::compute/compute-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

    • Credentials (dict) --

      The access credentials for the compute resource.

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

GetComputeAuthToken (new) Link ¶

Requests an authorization token from GameLift. The authorization token is used by your game server to authenticate with GameLift. Each authentication token has an expiration token. To continue using the compute resource to host your game server, regularly retrieve a new authorization token.

See also: AWS API Documentation

Request Syntax

client.get_compute_auth_token(
    FleetId='string',
    ComputeName='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet that the compute is registered to.

type ComputeName

string

param ComputeName

[REQUIRED]

The name of the compute resource you are requesting the authorization token for.

rtype

dict

returns

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string',
    'ComputeName': 'string',
    'ComputeArn': 'string',
    'AuthToken': 'string',
    'ExpirationTimestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • FleetId (string) --

      A unique identifier for the fleet that the compute is registered to.

    • FleetArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

    • ComputeName (string) --

      The name of the compute resource you are requesting the authorization token for.

    • ComputeArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift compute resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::compute/compute-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912

    • AuthToken (string) --

      The authorization token that your game server uses to authenticate with GameLift.

    • ExpirationTimestamp (datetime) --

      The amount of time until the authorization token is no longer valid. To continue using the compute resource for game server hosting, renew the authorization token by using this operation again.

ListLocations (new) Link ¶

Lists all custom and Amazon Web Services locations.

See also: AWS API Documentation

Request Syntax

client.list_locations(
    Filters=[
        'AWS'|'CUSTOM',
    ],
    Limit=123,
    NextToken='string'
)
type Filters

list

param Filters

Filters the list for AWS or CUSTOM locations.

  • (string) --

type Limit

integer

param Limit

The 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

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

rtype

dict

returns

Response Syntax

{
    'Locations': [
        {
            'LocationName': 'string',
            'LocationArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Locations (list) --

      A collection of locations.

      • (dict) --

        Properties of a location

        • LocationName (string) --

          The location's name.

        • LocationArn (string) --

          The Amazon Resource Name (ARN ) that is assigned to a GameLift location resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::location/location-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

    • NextToken (string) --

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

ListCompute (new) Link ¶

Retrieves all compute resources registered to a fleet in your Amazon Web Services account. You can filter the result set by location.

See also: AWS API Documentation

Request Syntax

client.list_compute(
    FleetId='string',
    Location='string',
    Limit=123,
    NextToken='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet the compute resources are registered to.

type Location

string

param Location

The name of the custom location that the compute resources are assigned to.

type Limit

integer

param Limit

The 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

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

rtype

dict

returns

Response Syntax

{
    'ComputeList': [
        {
            'FleetId': 'string',
            'FleetArn': 'string',
            'ComputeName': 'string',
            'ComputeArn': 'string',
            'IpAddress': 'string',
            'DnsName': 'string',
            'ComputeStatus': 'PENDING'|'ACTIVE'|'TERMINATING',
            'Location': 'string',
            'CreationTime': datetime(2015, 1, 1),
            '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'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge',
            'GameLiftServiceSdkEndpoint': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ComputeList (list) --

      A list of compute resources registered to the fleet you specified.

      • (dict) --

        Resources used to host your game servers. A compute resource can be managed GameLift Amazon EC2 instances or your own resources.

        • FleetId (string) --

          A unique identifier for the fleet that the compute is registered to.

        • FleetArn (string) --

          The Amazon Resource Name (ARN) of the fleet that the compute is registered to.

        • ComputeName (string) --

          A descriptive label that is associated with the compute resource registered to your fleet.

        • ComputeArn (string) --

          The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.

        • IpAddress (string) --

          The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

        • DnsName (string) --

          The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.

        • ComputeStatus (string) --

          Current status of the compute. A compute must have an ACTIVE status to host game sessions.

        • Location (string) --

          The name of the custom location you added to the fleet that this compute resource resides in.

        • CreationTime (datetime) --

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

        • OperatingSystem (string) --

          The type of operating system on your compute resource.

        • Type (string) --

          Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.

        • GameLiftServiceSdkEndpoint (string) --

          The endpoint connection details of the GameLift SDK endpoint that your game server connects to.

    • NextToken (string) --

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

DeleteLocation (new) Link ¶

Deletes a custom location.

Before deleting a custom location, review any fleets currently using the custom location and deregister the location if it is in use. For more information see, DeregisterCompute .

See also: AWS API Documentation

Request Syntax

client.delete_location(
    LocationName='string'
)
type LocationName

string

param LocationName

[REQUIRED]

The location name of the custom location to be deleted.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeregisterCompute (new) Link ¶

Removes a compute resource from the specified fleet. Deregister your compute resources before you delete the compute.

See also: AWS API Documentation

Request Syntax

client.deregister_compute(
    FleetId='string',
    ComputeName='string'
)
type FleetId

string

param FleetId

[REQUIRED]

>A unique identifier for the fleet the compute resource is registered to.

type ComputeName

string

param ComputeName

[REQUIRED]

The name of the compute resource you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateBuild (updated) Link ¶
Changes (request, response)
Request
{'ServerSdkVersion': 'string'}
Response
{'Build': {'ServerSdkVersion': 'string'}}

Creates a new Amazon GameLift build resource for your game server binary files. Combine game server binaries into a zip file for use with Amazon GameLift.

Warning

When setting up a new game build for GameLift, we recommend using the CLI command ** upload-build ** . This helper command combines two tasks: (1) it uploads your build files from a file directory to a GameLift Amazon S3 location, and (2) it creates a new build resource.

You can use the operation in the following scenarios:

  • To create a new game build with build files that are in an Amazon S3 location under an Amazon Web Services account that you control. To use this option, you give Amazon GameLift access to the Amazon S3 bucket. With permissions in place, specify a build name, operating system, and the Amazon S3 storage location of your game build.

  • To directly upload your build files to a GameLift Amazon S3 location. To use this option, specify a build name and operating system. This operation creates a new build resource and also returns an Amazon S3 location with temporary access credentials. Use the credentials to manually upload your build files to the specified Amazon S3 location. For more information, see Uploading Objects in the Amazon S3 Developer Guide . After you upload build files to the GameLift Amazon S3 location, you can't update them.

If successful, this operation creates a new build resource with a unique build ID and places it in INITIALIZED status. A build must be in READY status before you can create fleets with it.

Learn more

Uploading Your Game

Create a Build with Files in Amazon S3

All APIs by task

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',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ServerSdkVersion='string'
)
type Name

string

param Name

A descriptive label associated with a build. Build names do not need to be unique. You can change this value later.

type Version

string

param Version

Version information associated with a build or script. Version strings do not need to be unique. You can 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. The location must also specify a role ARN that you set up to allow Amazon GameLift to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.

If a StorageLocation is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift will report a SizeOnDisk of 0.

  • Bucket (string) --

    An Amazon S3 bucket identifier. Thename of the S3 bucket.

    Note

    GameLift doesn't support uploading from Amazon S3 buckets with names that contain a dot (.).

  • Key (string) --

    The name of the zip file that contains the build files or script files.

  • RoleArn (string) --

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

  • ObjectVersion (string) --

    The 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

The operating system that you built the game server binaries 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, GameLift uses the default value (WINDOWS_2012). This value cannot be changed later.

type Tags

list

param Tags

A list of labels to assign to the new build resource. Tags are developer defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference . Once the resource is created, you can use TagResource , UntagResource , and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.

  • (dict) --

    A label that can be assigned to a GameLift resource.

    Learn more

    Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

    Amazon Web Services Tagging Strategies

    Related actions

    All APIs by task

    • Key (string) -- [REQUIRED]

      The key for a developer-defined key:value pair for tagging an Amazon Web Services resource.

    • Value (string) -- [REQUIRED]

      The value for a developer-defined key:value pair for tagging an Amazon Web Services resource.

type ServerSdkVersion

string

param ServerSdkVersion

A server SDK version you used when integrating your game server build with GameLift. For more information see Integrate games with custom game servers .

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • Build (dict) --

      The newly created build resource, including a unique build IDs and status.

      • BuildId (string) --

        A unique identifier for the build.

      • BuildArn (string) --

        The Amazon Resource Name (ARN ) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift build ARN, the resource ID matches the BuildId value.

      • Name (string) --

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

      • Version (string) --

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

      • 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 or when using a custom Amazon S3 storage location, 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) --

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

      • ServerSdkVersion (string) --

        The GameLift Server SDK version used to develop your game server.

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

        An Amazon S3 bucket identifier. Thename of the S3 bucket.

        Note

        GameLift doesn't support uploading from Amazon S3 buckets with names that contain a dot (.).

      • Key (string) --

        The name of the zip file that contains the build files or script files.

      • RoleArn (string) --

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

      • ObjectVersion (string) --

        The 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
{'AnywhereConfiguration': {'Cost': 'string'}, 'ComputeType': 'EC2 | ANYWHERE'}
Response
{'FleetAttributes': {'AnywhereConfiguration': {'Cost': 'string'},
                     'ComputeType': 'EC2 | ANYWHERE',
                     'Status': {'NOT_FOUND'}},
 'LocationStates': {'Status': {'NOT_FOUND'}}}

Creates a fleet of Amazon Elastic Compute Cloud (Amazon Elastic Compute Cloud) instances to host your custom game server or Realtime Servers. Use this operation to configure the computing resources for your fleet and provide instructions for running game servers on each instance.

Most GameLift fleets can deploy instances to multiple locations, including the home Region (where the fleet is created) and an optional set of remote locations. Fleets that are created in the following Amazon Web Services Regions support multiple locations: us-east-1 (N. Virginia), us-west-2 (Oregon), eu-central-1 (Frankfurt), eu-west-1 (Ireland), ap-southeast-2 (Sydney), ap-northeast-1 (Tokyo), and ap-northeast-2 (Seoul). Fleets that are created in other GameLift Regions can deploy instances in the fleet's home Region only. All fleet instances use the same configuration regardless of location; however, you can adjust capacity settings and turn auto-scaling on/off for each location.

To create a fleet, choose the hardware for your instances, specify a game server build or Realtime script to deploy, and provide a runtime configuration to direct GameLift how to start and run game servers on each instance in the fleet. Set permissions for inbound traffic to your game servers, and enable optional features as needed. When creating a multi-location fleet, provide a list of additional remote locations.

If you need to debug your fleet, fetch logs, view performance metrics or other actions on the fleet, create the development fleet with port 22/3389 open. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished.

If successful, this operation creates a new Fleet resource and places it in NEW status, which prompts GameLift to initiate the fleet creation workflow .

Learn more

Setting up fleets

Debug fleet creation issues

Multi-location fleets

See also: AWS API Documentation

Request Syntax

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

string

param Name

[REQUIRED]

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

type Description

string

param Description

A description for the fleet.

type BuildId

string

param BuildId

The unique identifier for a custom game server build to be deployed on fleet instances. You can use either the build ID or ARN. The build must be uploaded to GameLift and in READY status. This fleet property cannot be changed later.

type ScriptId

string

param ScriptId

The unique identifier for a Realtime configuration script to be deployed on fleet instances. You can use either the script ID or ARN. Scripts must be uploaded to GameLift prior to creating the fleet. This fleet property cannot be changed later.

type ServerLaunchPath

string

param ServerLaunchPath

This parameter is no longer used. Specify a server launch path using the RuntimeConfiguration parameter. Requests that use this parameter instead continue to be valid.

type ServerLaunchParameters

string

param ServerLaunchParameters

This parameter is no longer used. Specify server launch parameters using the RuntimeConfiguration parameter. Requests that use this parameter instead continue to be valid.

type LogPaths

list

param LogPaths

This parameter is no longer used. To specify where GameLift should store log files once a server process shuts down, use the GameLift server API ProcessReady() and specify one or more directory paths in logParameters . For more information, see Initialize the server process in the GameLift Developer Guide .

  • (string) --

type EC2InstanceType

string

param EC2InstanceType

The GameLift-supported Amazon EC2 instance type to use for all fleet instances. Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions of Amazon EC2 instance types.

type EC2InboundPermissions

list

param EC2InboundPermissions

The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. If the fleet is hosting a custom game build, this property must be set before players can connect to game sessions. For Realtime Servers fleets, GameLift automatically sets TCP and UDP ranges.

  • (dict) --

    A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet. New game sessions are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.

    • FromPort (integer) -- [REQUIRED]

      A starting value for a range of allowed port numbers.

      For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

    • ToPort (integer) -- [REQUIRED]

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

      For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

    • IpRange (string) -- [REQUIRED]

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

    • Protocol (string) -- [REQUIRED]

      The network communication protocol used by the fleet.

type NewGameSessionProtectionPolicy

string

param NewGameSessionProtectionPolicy

The status of termination protection for active game sessions on the fleet. By default, this property is set to NoProtection . You can also set game session protection for an individual game session by calling UpdateGameSession .

  • NoProtection - Game sessions can be terminated during active gameplay as a result of a scale-down event.

  • FullProtection - Game sessions in ACTIVE status cannot be terminated during a scale-down event.

type RuntimeConfiguration

dict

param RuntimeConfiguration

Instructions for how to launch and maintain server processes on instances in the fleet. The runtime configuration defines one or more server process configurations, each identifying a build executable or Realtime script file and the number of processes of that type to run concurrently.

Note

The RuntimeConfiguration parameter is required unless the fleet is being configured using the older parameters ServerLaunchPath and ServerLaunchParameters , which are still supported for backward compatibility.

  • ServerProcesses (list) --

    A collection of server process configurations that identify what server processes to run on each instance in a fleet.

    • (dict) --

      A set of instructions for launching server processes on each instance in a fleet. Server processes run either an executable in a custom game build or a Realtime Servers script. Server process configurations are part of a fleet's runtime configuration.

      • LaunchPath (string) -- [REQUIRED]

        The location of a game build executable or the Realtime script file that contains the Init() function. Game builds and Realtime scripts are installed on instances at the root:

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

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

      • Parameters (string) --

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

      • ConcurrentExecutions (integer) -- [REQUIRED]

        The number of server processes using this configuration that run concurrently on each instance.

  • MaxConcurrentGameSessionActivations (integer) --

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

  • GameSessionActivationTimeoutSeconds (integer) --

    The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host players. During this time, the game session is in status ACTIVATING . If the game session does not become active before the timeout, it is ended and the game session status is changed to TERMINATED .

type ResourceCreationLimitPolicy

dict

param ResourceCreationLimitPolicy

A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.

  • NewGameSessionsPerCreator (integer) --

    A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.

    The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

  • PolicyPeriodInMinutes (integer) --

    The time span used in evaluating the resource creation limit policy.

type MetricGroups

list

param MetricGroups

The name of an Amazon Web Services CloudWatch metric group to add this fleet to. A metric group is used to aggregate the metrics for multiple fleets. You can specify an existing metric group name or set a new name to create a new metric group. A fleet can be included in only one metric group at a time.

  • (string) --

type PeerVpcAwsAccountId

string

param PeerVpcAwsAccountId

Used when peering your GameLift fleet with a VPC, the unique identifier for the Amazon Web Services account that owns the VPC. You can find your account ID in the Amazon Web Services Management Console under account settings.

type PeerVpcId

string

param PeerVpcId

A unique identifier for a VPC with resources to be accessed by your GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with GameLift Fleets .

type FleetType

string

param FleetType

Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to ON_DEMAND . Learn more about when to use On-Demand versus Spot Instances . This property cannot be changed after the fleet is created.

type InstanceRoleArn

string

param InstanceRoleArn

A unique identifier for an IAM role that manages access to your Amazon Web Services services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN by using the IAM dashboard in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server . This property cannot be changed after the fleet is created.

type CertificateConfiguration

dict

param CertificateConfiguration

Prompts GameLift to generate a TLS/SSL certificate for the fleet. GameLift uses the certificates to encrypt traffic between game clients and the game servers running on GameLift. By default, the CertificateConfiguration is DISABLED . You can't change this property after you create the fleet.

Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition.

Note

ACM isn't available in all Amazon Web Services regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see Supported Regions in the Certificate Manager User Guide .

  • CertificateType (string) -- [REQUIRED]

    Indicates whether a TLS/SSL certificate is generated for a fleet.

    Valid values include:

    • GENERATED - Generate a TLS/SSL certificate for this fleet.

    • DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.

type Locations

list

param Locations

A set of remote locations to deploy additional instances to and manage as part of the fleet. This parameter can only be used when creating fleets in Amazon Web Services Regions that support multiple locations. You can add any GameLift-supported Amazon Web Services Region as a remote location, in the form of an Amazon Web Services Region code such as us-west-2 . To create a fleet with instances in the home Region only, omit this parameter.

  • (dict) --

    A remote location where a multi-location fleet can deploy EC2 instances for game hosting.

    • Location (string) -- [REQUIRED]

      An Amazon Web Services Region code, such as us-west-2 .

type Tags

list

param Tags

A list of labels to assign to the new fleet resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference .

  • (dict) --

    A label that can be assigned to a GameLift resource.

    Learn more

    Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

    Amazon Web Services Tagging Strategies

    Related actions

    All APIs by task

    • Key (string) -- [REQUIRED]

      The key for a developer-defined key:value pair for tagging an Amazon Web Services resource.

    • Value (string) -- [REQUIRED]

      The value for a developer-defined key:value pair for tagging an Amazon Web Services resource.

type ComputeType

string

param ComputeType

The type of compute resource used to host your game servers. You can use your own compute resources with GameLift Anywhere or use Amazon EC2 instances with managed GameLift.

type AnywhereConfiguration

dict

param AnywhereConfiguration

GameLift Anywhere configuration options.

  • Cost (string) -- [REQUIRED]

    The cost to run your fleet per hour. GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues .

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'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge',
        'Description': 'string',
        'Name': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'TerminationTime': datetime(2015, 1, 1),
        'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
        'BuildId': 'string',
        'BuildArn': 'string',
        'ScriptId': 'string',
        'ScriptArn': 'string',
        'ServerLaunchPath': 'string',
        'ServerLaunchParameters': 'string',
        'LogPaths': [
            'string',
        ],
        'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
        'ResourceCreationLimitPolicy': {
            'NewGameSessionsPerCreator': 123,
            'PolicyPeriodInMinutes': 123
        },
        'MetricGroups': [
            'string',
        ],
        'StoppedActions': [
            'AUTO_SCALING',
        ],
        'InstanceRoleArn': 'string',
        'CertificateConfiguration': {
            'CertificateType': 'DISABLED'|'GENERATED'
        },
        'ComputeType': 'EC2'|'ANYWHERE',
        'AnywhereConfiguration': {
            'Cost': 'string'
        }
    },
    'LocationStates': [
        {
            'Location': 'string',
            'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND'
        },
    ]
}

Response Structure

  • (dict) --

    • FleetAttributes (dict) --

      The properties for the new fleet, including the current status. All fleets are placed in NEW status on creation.

      • FleetId (string) --

        A unique identifier for the fleet.

      • FleetArn (string) --

        The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift fleet ARN, the resource ID matches the FleetId value.

      • FleetType (string) --

        Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to ON_DEMAND . Learn more about when to use On-Demand versus Spot Instances . This property cannot be changed after the fleet is created.

      • InstanceType (string) --

        The Amazon EC2 instance type that determines the computing resources of each instance in the fleet. Instance type defines the CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions.

      • Description (string) --

        A human-readable description of the fleet.

      • Name (string) --

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

      • CreationTime (datetime) --

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

      • TerminationTime (datetime) --

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

      • Status (string) --

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

        • NEW -- A new fleet has been defined and desired instances is set to 1.

        • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- 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) --

        A unique identifier for the build resource that is deployed on instances in this fleet.

      • BuildArn (string) --

        The Amazon Resource Name (ARN ) associated with the GameLift build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the BuildId value.

      • ScriptId (string) --

        A unique identifier for the Realtime script resource that is deployed on instances in this fleet.

      • ScriptArn (string) --

        The Amazon Resource Name (ARN ) associated with the GameLift script resource that is deployed on instances in this fleet. In a GameLift script ARN, the resource ID matches the ScriptId value.

      • ServerLaunchPath (string) --

        This parameter is no longer used. Server launch paths are now defined using the fleet's RuntimeConfiguration . Requests that use this parameter instead continue to be valid.

      • ServerLaunchParameters (string) --

        This parameter is no longer used. Server launch parameters are now defined using the fleet's runtime configuration . Requests that use this parameter instead continue to be valid.

      • LogPaths (list) --

        This parameter is no longer used. Game session log paths are now defined using the GameLift server API ProcessReady() logParameters . See more information in the Server API Reference .

        • (string) --

      • NewGameSessionProtectionPolicy (string) --

        The type of game session protection to set on all new instances that are started in the fleet.

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

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

      • OperatingSystem (string) --

        The operating system of the fleet's computing resources. A fleet's operating system is determined by the OS of the build or script that is deployed on this fleet.

      • ResourceCreationLimitPolicy (dict) --

        A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.

        The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

        • NewGameSessionsPerCreator (integer) --

          A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.

          The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

        • PolicyPeriodInMinutes (integer) --

          The time span used in evaluating the resource creation limit policy.

      • MetricGroups (list) --

        Name of a metric group that metrics for this fleet are added to. In Amazon CloudWatch, you can view aggregated metrics for fleets that are in a metric group. A fleet can be included in only one metric group at a time.

        • (string) --

      • StoppedActions (list) --

        A list of fleet activity that has been suspended using StopFleetActions . This includes fleet auto-scaling.

        • (string) --

      • InstanceRoleArn (string) --

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

      • CertificateConfiguration (dict) --

        Determines whether a TLS/SSL certificate is generated for a fleet. This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate. The certificate can be retrieved by calling the GameLift Server SDK operation GetInstanceCertificate .

        • CertificateType (string) --

          Indicates whether a TLS/SSL certificate is generated for a fleet.

          Valid values include:

          • GENERATED - Generate a TLS/SSL certificate for this fleet.

          • DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.

      • ComputeType (string) --

        The type of compute resource used to host your game servers. You can use your own compute resources with GameLift Anywhere or use Amazon EC2 instances with managed GameLift.

      • AnywhereConfiguration (dict) --

        GameLift Anywhere configuration options for your Anywhere fleets.

        • Cost (string) --

          The cost to run your fleet per hour. GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues .

    • LocationStates (list) --

      The fleet's locations and life-cycle status of each location. For new fleets, the status of all locations is set to NEW . During fleet creation, GameLift updates each location status as instances are deployed there and prepared for game hosting. This list includes an entry for the fleet's home Region. For fleets with no remote locations, only one entry, representing the home Region, is returned.

      • (dict) --

        A fleet location and its life-cycle state. A location state object might be used to describe a fleet's remote location or home Region. Life-cycle state tracks the progress of launching the first instance in a new location and preparing it for game hosting, and then removing all instances and deleting the location from the fleet.

        • NEW -- A new fleet location has been defined and desired instances is set to 1.

        • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- GameLift is setting up the new fleet location, creating new instances with the game build or Realtime script and starting server processes.

        • ACTIVE -- Hosts can now accept game sessions.

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

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

        • TERMINATED -- The fleet location no longer exists.

        • NOT_FOUND -- The fleet location was not found. This could be because the custom location was removed or not created.

        • Location (string) --

          The fleet location, expressed as an Amazon Web Services Region code such as us-west-2 .

        • Status (string) --

          The life-cycle status of a fleet location.

CreateFleetLocations (updated) Link ¶
Changes (response)
{'LocationStates': {'Status': {'NOT_FOUND'}}}

Adds remote locations to a fleet and begins populating the new locations with EC2 instances. The new instances conform to the fleet's instance type, auto-scaling, and other configuration settings.

Note

This operation cannot be used with fleets that don't support remote locations. Fleets can have multiple locations only if they reside in Amazon Web Services Regions that support this feature and were created after the feature was released in March 2021.

To add fleet locations, specify the fleet to be updated and provide a list of one or more locations.

If successful, this operation returns the list of added locations with their status set to NEW . GameLift initiates the process of starting an instance in each added location. You can track the status of each new location by monitoring location creation events using DescribeFleetEvents .

Learn more

Setting up fleets

Multi-location fleets

See also: AWS API Documentation

Request Syntax

client.create_fleet_locations(
    FleetId='string',
    Locations=[
        {
            'Location': 'string'
        },
    ]
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to add locations to. You can use either the fleet ID or ARN value.

type Locations

list

param Locations

[REQUIRED]

A list of locations to deploy additional instances to and manage as part of the fleet. You can add any GameLift-supported Amazon Web Services Region as a remote location, in the form of an Amazon Web Services Region code such as us-west-2 .

  • (dict) --

    A remote location where a multi-location fleet can deploy EC2 instances for game hosting.

    • Location (string) -- [REQUIRED]

      An Amazon Web Services Region code, such as us-west-2 .

rtype

dict

returns

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string',
    'LocationStates': [
        {
            'Location': 'string',
            'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND'
        },
    ]
}

Response Structure

  • (dict) --

    • FleetId (string) --

      A unique identifier for the fleet that was updated with new locations.

    • FleetArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

    • LocationStates (list) --

      The remote locations that are being added to the fleet, and the life-cycle status of each location. For new locations, the status is set to NEW . During location creation, GameLift updates each location's status as instances are deployed there and prepared for game hosting. This list does not include the fleet home Region or any remote locations that were already added to the fleet.

      • (dict) --

        A fleet location and its life-cycle state. A location state object might be used to describe a fleet's remote location or home Region. Life-cycle state tracks the progress of launching the first instance in a new location and preparing it for game hosting, and then removing all instances and deleting the location from the fleet.

        • NEW -- A new fleet location has been defined and desired instances is set to 1.

        • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- GameLift is setting up the new fleet location, creating new instances with the game build or Realtime script and starting server processes.

        • ACTIVE -- Hosts can now accept game sessions.

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

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

        • TERMINATED -- The fleet location no longer exists.

        • NOT_FOUND -- The fleet location was not found. This could be because the custom location was removed or not created.

        • Location (string) --

          The fleet location, expressed as an Amazon Web Services Region code such as us-west-2 .

        • Status (string) --

          The life-cycle status of a fleet location.

DeleteFleetLocations (updated) Link ¶
Changes (response)
{'LocationStates': {'Status': {'NOT_FOUND'}}}

Removes locations from a multi-location fleet. When deleting a location, all game server process and all instances that are still active in the location are shut down.

To delete fleet locations, identify the fleet ID and provide a list of the locations to be deleted.

If successful, GameLift sets the location status to DELETING , and begins to shut down existing server processes and terminate instances in each location being deleted. When completed, the location status changes to TERMINATED .

Learn more

Setting up GameLift fleets

See also: AWS API Documentation

Request Syntax

client.delete_fleet_locations(
    FleetId='string',
    Locations=[
        'string',
    ]
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to delete locations for. You can use either the fleet ID or ARN value.

type Locations

list

param Locations

[REQUIRED]

The list of fleet locations to delete. Specify locations in the form of an Amazon Web Services Region code, such as us-west-2 .

  • (string) --

rtype

dict

returns

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string',
    'LocationStates': [
        {
            'Location': 'string',
            'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND'
        },
    ]
}

Response Structure

  • (dict) --

    • FleetId (string) --

      A unique identifier for the fleet that location attributes are being deleted for.

    • FleetArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

    • LocationStates (list) --

      The remote locations that are being deleted, with each location status set to DELETING .

      • (dict) --

        A fleet location and its life-cycle state. A location state object might be used to describe a fleet's remote location or home Region. Life-cycle state tracks the progress of launching the first instance in a new location and preparing it for game hosting, and then removing all instances and deleting the location from the fleet.

        • NEW -- A new fleet location has been defined and desired instances is set to 1.

        • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- GameLift is setting up the new fleet location, creating new instances with the game build or Realtime script and starting server processes.

        • ACTIVE -- Hosts can now accept game sessions.

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

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

        • TERMINATED -- The fleet location no longer exists.

        • NOT_FOUND -- The fleet location was not found. This could be because the custom location was removed or not created.

        • Location (string) --

          The fleet location, expressed as an Amazon Web Services Region code such as us-west-2 .

        • Status (string) --

          The life-cycle status of a fleet location.

DescribeBuild (updated) Link ¶
Changes (response)
{'Build': {'ServerSdkVersion': 'string'}}

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

Learn more

Upload a Custom Server Build

All APIs by task

See also: AWS API Documentation

Request Syntax

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

string

param BuildId

[REQUIRED]

A unique identifier for the build to retrieve properties for. You can use either the build ID or ARN value.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • Build (dict) --

      Set of properties describing the requested build.

      • BuildId (string) --

        A unique identifier for the build.

      • BuildArn (string) --

        The Amazon Resource Name (ARN ) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift build ARN, the resource ID matches the BuildId value.

      • Name (string) --

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

      • Version (string) --

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

      • 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 or when using a custom Amazon S3 storage location, 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) --

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

      • ServerSdkVersion (string) --

        The GameLift Server SDK version used to develop your game server.

DescribeFleetAttributes (updated) Link ¶
Changes (response)
{'FleetAttributes': {'AnywhereConfiguration': {'Cost': 'string'},
                     'ComputeType': 'EC2 | ANYWHERE',
                     'Status': {'NOT_FOUND'}}}

Retrieves core fleet-wide properties, including the computing hardware and deployment configuration for all instances in the fleet.

This operation can be used in the following ways:

  • To get attributes for one or more specific fleets, provide a list of fleet IDs or fleet ARNs.

  • To get attributes for all fleets, do not provide a fleet identifier.

When requesting attributes for multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages.

If successful, a FleetAttributes object is returned for each fleet requested, unless the fleet identifier is not found.

Note

Some API operations limit the number of fleet IDs that allowed in one request. If a request exceeds this limit, the request fails and the error message contains the maximum allowed number.

Learn more

Setting up GameLift fleets

See also: AWS API Documentation

Request Syntax

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

list

param FleetIds

A list of unique fleet identifiers to retrieve attributes for. You can use either the fleet ID or ARN value. To retrieve attributes for all current fleets, do not include this parameter.

  • (string) --

type Limit

integer

param Limit

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

type NextToken

string

param NextToken

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

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'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge',
            'Description': 'string',
            'Name': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND',
            'BuildId': 'string',
            'BuildArn': 'string',
            'ScriptId': 'string',
            'ScriptArn': 'string',
            'ServerLaunchPath': 'string',
            'ServerLaunchParameters': 'string',
            'LogPaths': [
                'string',
            ],
            'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2',
            'ResourceCreationLimitPolicy': {
                'NewGameSessionsPerCreator': 123,
                'PolicyPeriodInMinutes': 123
            },
            'MetricGroups': [
                'string',
            ],
            'StoppedActions': [
                'AUTO_SCALING',
            ],
            'InstanceRoleArn': 'string',
            'CertificateConfiguration': {
                'CertificateType': 'DISABLED'|'GENERATED'
            },
            'ComputeType': 'EC2'|'ANYWHERE',
            'AnywhereConfiguration': {
                'Cost': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FleetAttributes (list) --

      A collection of objects containing attribute metadata for each requested fleet ID. Attribute objects are returned only for fleets that currently exist.

      • (dict) --

        Describes a GameLift fleet of game hosting resources.

        Related actions

        • FleetId (string) --

          A unique identifier for the fleet.

        • FleetArn (string) --

          The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift fleet ARN, the resource ID matches the FleetId value.

        • FleetType (string) --

          Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to ON_DEMAND . Learn more about when to use On-Demand versus Spot Instances . This property cannot be changed after the fleet is created.

        • InstanceType (string) --

          The Amazon EC2 instance type that determines the computing resources of each instance in the fleet. Instance type defines the CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions.

        • Description (string) --

          A human-readable description of the fleet.

        • Name (string) --

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

        • CreationTime (datetime) --

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

        • TerminationTime (datetime) --

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

        • Status (string) --

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

          • NEW -- A new fleet has been defined and desired instances is set to 1.

          • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- 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) --

          A unique identifier for the build resource that is deployed on instances in this fleet.

        • BuildArn (string) --

          The Amazon Resource Name (ARN ) associated with the GameLift build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the BuildId value.

        • ScriptId (string) --

          A unique identifier for the Realtime script resource that is deployed on instances in this fleet.

        • ScriptArn (string) --

          The Amazon Resource Name (ARN ) associated with the GameLift script resource that is deployed on instances in this fleet. In a GameLift script ARN, the resource ID matches the ScriptId value.

        • ServerLaunchPath (string) --

          This parameter is no longer used. Server launch paths are now defined using the fleet's RuntimeConfiguration . Requests that use this parameter instead continue to be valid.

        • ServerLaunchParameters (string) --

          This parameter is no longer used. Server launch parameters are now defined using the fleet's runtime configuration . Requests that use this parameter instead continue to be valid.

        • LogPaths (list) --

          This parameter is no longer used. Game session log paths are now defined using the GameLift server API ProcessReady() logParameters . See more information in the Server API Reference .

          • (string) --

        • NewGameSessionProtectionPolicy (string) --

          The type of game session protection to set on all new instances that are started in the fleet.

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

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

        • OperatingSystem (string) --

          The operating system of the fleet's computing resources. A fleet's operating system is determined by the OS of the build or script that is deployed on this fleet.

        • ResourceCreationLimitPolicy (dict) --

          A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.

          The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

          • NewGameSessionsPerCreator (integer) --

            A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.

            The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

          • PolicyPeriodInMinutes (integer) --

            The time span used in evaluating the resource creation limit policy.

        • MetricGroups (list) --

          Name of a metric group that metrics for this fleet are added to. In Amazon CloudWatch, you can view aggregated metrics for fleets that are in a metric group. A fleet can be included in only one metric group at a time.

          • (string) --

        • StoppedActions (list) --

          A list of fleet activity that has been suspended using StopFleetActions . This includes fleet auto-scaling.

          • (string) --

        • InstanceRoleArn (string) --

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

        • CertificateConfiguration (dict) --

          Determines whether a TLS/SSL certificate is generated for a fleet. This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate. The certificate can be retrieved by calling the GameLift Server SDK operation GetInstanceCertificate .

          • CertificateType (string) --

            Indicates whether a TLS/SSL certificate is generated for a fleet.

            Valid values include:

            • GENERATED - Generate a TLS/SSL certificate for this fleet.

            • DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.

        • ComputeType (string) --

          The type of compute resource used to host your game servers. You can use your own compute resources with GameLift Anywhere or use Amazon EC2 instances with managed GameLift.

        • AnywhereConfiguration (dict) --

          GameLift Anywhere configuration options for your Anywhere fleets.

          • Cost (string) --

            The cost to run your fleet per hour. GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues .

    • NextToken (string) --

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

DescribeFleetEvents (updated) Link ¶
Changes (response)
{'Events': {'EventCode': {'INSTANCE_RECYCLED'}}}

Retrieves entries from a fleet's event log. Fleet events are initiated by changes in status, such as during fleet creation and termination, changes in capacity, etc. If a fleet has multiple locations, events are also initiated by changes to status and capacity in remote locations.

You can specify a time range to limit the result set. Use the pagination parameters to retrieve results as a set of sequential pages.

If successful, a collection of event log entries matching the request are returned.

Learn more

Setting up GameLift fleets

See also: AWS API Documentation

Request Syntax

client.describe_fleet_events(
    FleetId='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    Limit=123,
    NextToken='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to get event logs for. You can use either the fleet ID or ARN value.

type StartTime

datetime

param StartTime

The earliest date to retrieve event logs for. If no start time is specified, this call returns entries starting from when the fleet was created to the specified end time. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").

type EndTime

datetime

param EndTime

The most recent date to retrieve event logs for. If no end time is specified, this call returns entries from the specified start time up to the present. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").

type Limit

integer

param Limit

The 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

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

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • Events (list) --

      A collection of objects containing event log entries for the specified fleet.

      • (dict) --

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

        • EventId (string) --

          A unique identifier for a fleet event.

        • ResourceId (string) --

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

        • EventCode (string) --

          The type of event being logged.

          Fleet state transition events:

          • FLEET_CREATED -- A fleet resource was successfully created with a status of NEW . Event messaging includes the fleet ID.

          • FLEET_STATE_DOWNLOADING -- Fleet status changed from NEW to DOWNLOADING . The compressed build has started downloading to a fleet instance for installation.

          • FLEET_STATE_VALIDATING -- Fleet status changed from DOWNLOADING to VALIDATING . GameLift has successfully downloaded the build and is now validating the build files.

          • FLEET_STATE_BUILDING -- Fleet status changed from VALIDATING to BUILDING . GameLift has successfully verified the build files and is now running the installation scripts.

          • FLEET_STATE_ACTIVATING -- Fleet status changed from BUILDING to ACTIVATING . GameLift is trying to launch an instance and test the connectivity between the build and the GameLift Service via the Server SDK.

          • FLEET_STATE_ACTIVE -- The fleet's status changed from ACTIVATING to ACTIVE . The fleet is now ready to host game sessions.

          • FLEET_STATE_ERROR -- The Fleet's status changed to ERROR . Describe the fleet event message for more details.

          Fleet creation events (ordered by fleet creation activity):

          • FLEET_BINARY_DOWNLOAD_FAILED -- The build failed to download to the fleet instance.

          • FLEET_CREATION_EXTRACTING_BUILD -- The game server build was successfully downloaded to an instance, and the build files are now being extracted from the uploaded build and saved to an instance. Failure at this stage prevents a fleet from moving to ACTIVE status. Logs for this stage display a list of the files that are extracted and saved on the instance. Access the logs by using the URL in PreSignedLogUrl .

          • FLEET_CREATION_RUNNING_INSTALLER -- The game server build files were successfully extracted, and the GameLift is now running the build's install script (if one is included). Failure in this stage prevents a fleet from moving to ACTIVE status. Logs for this stage list the installation steps and whether or not the install completed successfully. Access the logs by using the URL in PreSignedLogUrl .

          • FLEET_CREATION_VALIDATING_RUNTIME_CONFIG -- The build process was successful, and the GameLift is now verifying that the game server launch paths, which are specified in the fleet's runtime configuration, exist. If any listed launch path exists, GameLift tries to launch a game server process and waits for the process to report ready. Failures in this stage prevent a fleet from moving to ACTIVE status. Logs for this stage list the launch paths in the runtime configuration and indicate whether each is found. Access the logs by using the URL in PreSignedLogUrl .

          • FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND -- Validation of the runtime configuration failed because the executable specified in a launch path does not exist on the instance.

          • FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE -- Validation of the runtime configuration failed because the executable specified in a launch path failed to run on the fleet instance.

          • FLEET_VALIDATION_TIMED_OUT -- Validation of the fleet at the end of creation timed out. Try fleet creation again.

          • FLEET_ACTIVATION_FAILED -- The fleet failed to successfully complete one of the steps in the fleet activation process. This event code indicates that the game build was successfully downloaded to a fleet instance, built, and validated, but was not able to start a server process. For more information, see Debug Fleet Creation Issues .

          • FLEET_ACTIVATION_FAILED_NO_INSTANCES -- Fleet creation was not able to obtain any instances based on the input fleet attributes. Try again at a different time or choose a different combination of fleet attributes such as fleet type, instance type, etc.

          • FLEET_INITIALIZATION_FAILED -- A generic exception occurred during fleet creation. Describe the fleet event message for more details.

          VPC peering events:

          • FLEET_VPC_PEERING_SUCCEEDED -- A VPC peering connection has been established between the VPC for an GameLift fleet and a VPC in your Amazon Web Services account.

          • FLEET_VPC_PEERING_FAILED -- A requested VPC peering connection has failed. Event details and status information provide additional detail. A common reason for peering failure is that the two VPCs have overlapping CIDR blocks of IPv4 addresses. To resolve this, change the CIDR block for the VPC in your Amazon Web Services account. For more information on VPC peering failures, see https://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/invalid-peering-configurations.html

          • FLEET_VPC_PEERING_DELETED -- A VPC peering connection has been successfully deleted.

          Spot instance events:

          • INSTANCE_INTERRUPTED -- A spot instance was interrupted by EC2 with a two-minute notification.

          Server process events:

          • SERVER_PROCESS_INVALID_PATH -- The game server executable or script could not be found based on the Fleet runtime configuration. Check that the launch path is correct based on the operating system of the Fleet.

          • SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT -- The server process did not call InitSDK() within the time expected. Check your game session log to see why InitSDK() was not called in time.

          • SERVER_PROCESS_PROCESS_READY_TIMEOUT -- The server process did not call ProcessReady() within the time expected after calling InitSDK(). Check your game session log to see why ProcessReady() was not called in time.

          • SERVER_PROCESS_CRASHED -- The server process exited without calling ProcessEnding(). Check your game session log to see why ProcessEnding() was not called.

          • SERVER_PROCESS_TERMINATED_UNHEALTHY -- The server process did not report a valid health check for too long and was therefore terminated by GameLift. Check your game session log to see if the thread became stuck processing a synchronous task for too long.

          • SERVER_PROCESS_FORCE_TERMINATED -- The server process did not exit cleanly after OnProcessTerminate() was sent within the time expected. Check your game session log to see why termination took longer than expected.

          • SERVER_PROCESS_PROCESS_EXIT_TIMEOUT -- The server process did not exit cleanly within the time expected after calling ProcessEnding(). Check your game session log to see why termination took longer than expected.

          Game session events:

          • GAME_SESSION_ACTIVATION_TIMEOUT -- GameSession failed to activate within the expected time. Check your game session log to see why ActivateGameSession() took longer to complete than expected.

          Other fleet events:

          • FLEET_SCALING_EVENT -- A change was made to the fleet's capacity settings (desired instances, minimum/maximum scaling limits). Event messaging includes the new capacity settings.

          • FLEET_NEW_GAME_SESSION_PROTECTION_POLICY_UPDATED -- A change was made to the fleet's game session protection policy setting. Event messaging includes both the old and new policy setting.

          • FLEET_DELETED -- A request to delete a fleet was initiated.

          • GENERIC_EVENT -- An unspecified event has occurred.

        • Message (string) --

          Additional information related to the event.

        • EventTime (datetime) --

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

        • PreSignedLogUrl (string) --

          Location of stored logs with additional detail that is related to the event. This is useful for debugging issues. The URL is valid for 15 minutes. You can also access fleet creation logs through the GameLift console.

    • NextToken (string) --

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

DescribeFleetLocationAttributes (updated) Link ¶
Changes (response)
{'LocationAttributes': {'LocationState': {'Status': {'NOT_FOUND'}}}}

Retrieves information on a fleet's remote locations, including life-cycle status and any suspended fleet activity.

This operation can be used in the following ways:

  • To get data for specific locations, provide a fleet identifier and a list of locations. Location data is returned in the order that it is requested.

  • To get data for all locations, provide a fleet identifier only. Location data is returned in no particular order.

When requesting attributes for multiple locations, use the pagination parameters to retrieve results as a set of sequential pages.

If successful, a LocationAttributes object is returned for each requested location. If the fleet does not have a requested location, no information is returned. This operation does not return the home Region. To get information on a fleet's home Region, call DescribeFleetAttributes .

Learn more

Setting up GameLift fleets

See also: AWS API Documentation

Request Syntax

client.describe_fleet_location_attributes(
    FleetId='string',
    Locations=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to retrieve remote locations for. You can use either the fleet ID or ARN value.

type Locations

list

param Locations

A list of fleet locations to retrieve information for. Specify locations in the form of an Amazon Web Services Region code, such as us-west-2 .

  • (string) --

type Limit

integer

param Limit

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This limit is not currently enforced.

type NextToken

string

param NextToken

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

rtype

dict

returns

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string',
    'LocationAttributes': [
        {
            'LocationState': {
                'Location': 'string',
                'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND'
            },
            'StoppedActions': [
                'AUTO_SCALING',
            ],
            'UpdateStatus': 'PENDING_UPDATE'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FleetId (string) --

      A unique identifier for the fleet that location attributes were requested for.

    • FleetArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

    • LocationAttributes (list) --

      Location-specific information on the requested fleet's remote locations.

      • (dict) --

        Details about a location in a multi-location fleet.

        • LocationState (dict) --

          A fleet location and its current life-cycle state.

          • Location (string) --

            The fleet location, expressed as an Amazon Web Services Region code such as us-west-2 .

          • Status (string) --

            The life-cycle status of a fleet location.

        • StoppedActions (list) --

          A list of fleet actions that have been suspended in the fleet location.

          • (string) --

        • UpdateStatus (string) --

          The status of fleet activity updates to the location. The status PENDING_UPDATE indicates that StopFleetActions or StartFleetActions has been requested but the update has not yet been completed for the location.

    • NextToken (string) --

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

DescribeScalingPolicies (updated) Link ¶
Changes (response)
{'ScalingPolicies': {'MetricName': {'ConcurrentActivatableGameSessions'}}}

Retrieves all scaling policies applied to a fleet.

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

A fleet may have all of its scaling policies suspended. This operation does not affect the status of the scaling policies, which remains ACTIVE.

See also: AWS API Documentation

Request Syntax

client.describe_scaling_policies(
    FleetId='string',
    StatusFilter='ACTIVE'|'UPDATE_REQUESTED'|'UPDATING'|'DELETE_REQUESTED'|'DELETING'|'DELETED'|'ERROR',
    Limit=123,
    NextToken='string',
    Location='string'
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet for which to retrieve scaling policies. You can use either the fleet ID or ARN value.

type StatusFilter

string

param StatusFilter

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

  • ACTIVE -- The scaling policy is currently in force.

  • UPDATEREQUESTED -- A request to update the scaling policy has been received.

  • UPDATING -- A change is being made to the scaling policy.

  • DELETEREQUESTED -- A request to delete the scaling policy has been received.

  • DELETING -- The scaling policy is being deleted.

  • DELETED -- The scaling policy has been deleted.

  • ERROR -- An error occurred in creating the policy. It should be removed and recreated.

type Limit

integer

param Limit

The 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

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

type Location

string

param Location

The fleet location. If you don't specify this value, the response contains the scaling policies of every location in the fleet.

rtype

dict

returns

Response Syntax

{
    'ScalingPolicies': [
        {
            'FleetId': 'string',
            'FleetArn': 'string',
            'Name': 'string',
            'Status': 'ACTIVE'|'UPDATE_REQUESTED'|'UPDATING'|'DELETE_REQUESTED'|'DELETING'|'DELETED'|'ERROR',
            'ScalingAdjustment': 123,
            'ScalingAdjustmentType': 'ChangeInCapacity'|'ExactCapacity'|'PercentChangeInCapacity',
            'ComparisonOperator': 'GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
            'Threshold': 123.0,
            'EvaluationPeriods': 123,
            'MetricName': 'ActivatingGameSessions'|'ActiveGameSessions'|'ActiveInstances'|'AvailableGameSessions'|'AvailablePlayerSessions'|'CurrentPlayerSessions'|'IdleInstances'|'PercentAvailableGameSessions'|'PercentIdleInstances'|'QueueDepth'|'WaitTime'|'ConcurrentActivatableGameSessions',
            'PolicyType': 'RuleBased'|'TargetBased',
            'TargetConfiguration': {
                'TargetValue': 123.0
            },
            'UpdateStatus': 'PENDING_UPDATE',
            'Location': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ScalingPolicies (list) --

      A collection of objects containing the scaling policies matching the request.

      • (dict) --

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

        • FleetId (string) --

          A unique identifier for the fleet that is associated with this scaling policy.

        • FleetArn (string) --

          The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

        • Name (string) --

          A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique.

        • Status (string) --

          Current status of the scaling policy. The scaling policy can be in force only when in an ACTIVE status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change.

          • ACTIVE -- The scaling policy can be used for auto-scaling a fleet.

          • UPDATE_REQUESTED -- A request to update the scaling policy has been received.

          • UPDATING -- A change is being made to the scaling policy.

          • DELETE_REQUESTED -- A request to delete the scaling policy has been received.

          • DELETING -- The scaling policy is being deleted.

          • DELETED -- The scaling policy has been deleted.

          • ERROR -- An error occurred in creating the policy. It should be removed and recreated.

        • ScalingAdjustment (integer) --

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

        • ScalingAdjustmentType (string) --

          The type of adjustment to make to a fleet's instance count.

          • ChangeInCapacity -- add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.

          • ExactCapacity -- set the instance count to the scaling adjustment value.

          • PercentChangeInCapacity -- increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.

        • ComparisonOperator (string) --

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

        • Threshold (float) --

          Metric value used to trigger a scaling event.

        • EvaluationPeriods (integer) --

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

        • MetricName (string) --

          Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift with Amazon CloudWatch .

          • ActivatingGameSessions -- Game sessions in the process of being created.

          • ActiveGameSessions -- Game sessions that are currently running.

          • ActiveInstances -- Fleet instances that are currently running at least one game session.

          • AvailableGameSessions -- Additional game sessions that fleet could host simultaneously, given current capacity.

          • AvailablePlayerSessions -- Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included.

          • CurrentPlayerSessions -- Player slots in active game sessions that are being used by a player or are reserved for a player.

          • IdleInstances -- Active instances that are currently hosting zero game sessions.

          • PercentAvailableGameSessions -- Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy.

          • PercentIdleInstances -- Percentage of the total number of active instances that are hosting zero game sessions.

          • QueueDepth -- Pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

          • WaitTime -- Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

        • PolicyType (string) --

          The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration . For a rule-based policy set the following parameters: MetricName , ComparisonOperator , Threshold , EvaluationPeriods , ScalingAdjustmentType , and ScalingAdjustment .

        • TargetConfiguration (dict) --

          An object that contains settings for a target-based scaling policy.

          • TargetValue (float) --

            Desired value to use with a target-based scaling policy. The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet's buffer (the percent of capacity that should be idle and ready for new game sessions).

        • UpdateStatus (string) --

          The current status of the fleet's scaling policies in a requested fleet location. The status PENDING_UPDATE indicates that an update was requested for the fleet but has not yet been completed for the location.

        • Location (string) --

          The fleet location.

    • NextToken (string) --

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

ListBuilds (updated) Link ¶
Changes (response)
{'Builds': {'ServerSdkVersion': 'string'}}

Retrieves build resources for all builds associated with the Amazon Web Services 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 resources are not listed in any particular order.

Learn more

Upload a Custom Server Build

All APIs by task

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

The 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

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

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • Builds (list) --

      A collection of build resources that match the request.

      • (dict) --

        Properties describing a custom game build.

        All APIs by task

        • BuildId (string) --

          A unique identifier for the build.

        • BuildArn (string) --

          The Amazon Resource Name (ARN ) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift build ARN, the resource ID matches the BuildId value.

        • Name (string) --

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

        • Version (string) --

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

        • 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 or when using a custom Amazon S3 storage location, 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) --

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

        • ServerSdkVersion (string) --

          The GameLift Server SDK version used to develop your game server.

    • NextToken (string) --

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

PutScalingPolicy (updated) Link ¶
Changes (request)
{'MetricName': {'ConcurrentActivatableGameSessions'}}

Creates or updates a scaling policy for a fleet. Scaling policies are used to automatically scale a fleet's hosting capacity to meet player demand. An active scaling policy instructs Amazon GameLift to track a fleet metric and automatically change the fleet's capacity when a certain threshold is reached. There are two types of scaling policies: target-based and rule-based. Use a target-based policy to quickly and efficiently manage fleet scaling; this option is the most commonly used. Use rule-based policies when you need to exert fine-grained control over auto-scaling.

Fleets can have multiple scaling policies of each type in force at the same time; you can have one target-based policy, one or multiple rule-based scaling policies, or both. We recommend caution, however, because multiple auto-scaling policies can have unintended consequences.

Learn more about how to work with auto-scaling in Set Up Fleet Automatic Scaling .

Target-based policy

A target-based policy tracks a single metric: PercentAvailableGameSessions. This metric tells us how much of a fleet's hosting capacity is ready to host game sessions but is not currently in use. This is the fleet's buffer; it measures the additional player demand that the fleet could handle at current capacity. With a target-based policy, you set your ideal buffer size and leave it to Amazon GameLift to take whatever action is needed to maintain that target.

For example, you might choose to maintain a 10% buffer for a fleet that has the capacity to host 100 simultaneous game sessions. This policy tells Amazon GameLift to take action whenever the fleet's available capacity falls below or rises above 10 game sessions. Amazon GameLift will start new instances or stop unused instances in order to return to the 10% buffer.

To create or update a target-based policy, specify a fleet ID and name, and set the policy type to "TargetBased". Specify the metric to track (PercentAvailableGameSessions) and reference a TargetConfiguration object with your desired buffer value. Exclude all other parameters. On a successful request, the policy name is returned. The scaling policy is automatically in force as soon as it's successfully created. If the fleet's auto-scaling actions are temporarily suspended, the new policy will be in force once the fleet actions are restarted.

Rule-based policy

A rule-based policy tracks specified fleet metric, sets a threshold value, and specifies the type of action to initiate when triggered. With a rule-based policy, you can select from several available fleet metrics. Each policy specifies whether to scale up or scale down (and by how much), so you need one policy for each type of action.

For example, a policy may make the following statement: "If the percentage of idle instances is greater than 20% for more than 15 minutes, then reduce the fleet capacity by 10%."

A policy's rule statement has the following structure:

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

To implement the example, the rule statement would look like this:

If [PercentIdleInstances] is [GreaterThanThreshold] [20] for [15] minutes, then [PercentChangeInCapacity] to/by [10] .

To create or update a scaling policy, specify a unique combination of name and fleet ID, and set the policy type to "RuleBased". Specify the parameter values for a policy rule statement. On a successful request, the policy name is returned. Scaling policies are automatically in force as soon as they're successfully created. If the fleet's auto-scaling actions are temporarily suspended, the new policy will be in force once the fleet actions are restarted.

See also: AWS API Documentation

Request Syntax

client.put_scaling_policy(
    Name='string',
    FleetId='string',
    ScalingAdjustment=123,
    ScalingAdjustmentType='ChangeInCapacity'|'ExactCapacity'|'PercentChangeInCapacity',
    Threshold=123.0,
    ComparisonOperator='GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
    EvaluationPeriods=123,
    MetricName='ActivatingGameSessions'|'ActiveGameSessions'|'ActiveInstances'|'AvailableGameSessions'|'AvailablePlayerSessions'|'CurrentPlayerSessions'|'IdleInstances'|'PercentAvailableGameSessions'|'PercentIdleInstances'|'QueueDepth'|'WaitTime'|'ConcurrentActivatableGameSessions',
    PolicyType='RuleBased'|'TargetBased',
    TargetConfiguration={
        'TargetValue': 123.0
    }
)
type Name

string

param Name

[REQUIRED]

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

type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to apply this policy to. You can use either the fleet ID or ARN value. The fleet cannot be in any of the following statuses: ERROR or DELETING.

type ScalingAdjustment

integer

param ScalingAdjustment

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

type ScalingAdjustmentType

string

param ScalingAdjustmentType

The type of adjustment to make to a fleet's instance count:

  • ChangeInCapacity -- add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.

  • ExactCapacity -- set the instance count to the scaling adjustment value.

  • PercentChangeInCapacity -- increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down; for example, a value of "-10" scales the fleet down by 10%.

type Threshold

float

param Threshold

Metric value used to trigger a scaling event.

type ComparisonOperator

string

param ComparisonOperator

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

type EvaluationPeriods

integer

param EvaluationPeriods

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

type MetricName

string

param MetricName

[REQUIRED]

Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift with Amazon CloudWatch .

  • ActivatingGameSessions -- Game sessions in the process of being created.

  • ActiveGameSessions -- Game sessions that are currently running.

  • ActiveInstances -- Fleet instances that are currently running at least one game session.

  • AvailableGameSessions -- Additional game sessions that fleet could host simultaneously, given current capacity.

  • AvailablePlayerSessions -- Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included.

  • CurrentPlayerSessions -- Player slots in active game sessions that are being used by a player or are reserved for a player.

  • IdleInstances -- Active instances that are currently hosting zero game sessions.

  • PercentAvailableGameSessions -- Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy.

  • PercentIdleInstances -- Percentage of the total number of active instances that are hosting zero game sessions.

  • QueueDepth -- Pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

  • WaitTime -- Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

type PolicyType

string

param PolicyType

The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration . For a rule-based policy set the following parameters: MetricName , ComparisonOperator , Threshold , EvaluationPeriods , ScalingAdjustmentType , and ScalingAdjustment .

type TargetConfiguration

dict

param TargetConfiguration

An object that contains settings for a target-based scaling policy.

  • TargetValue (float) -- [REQUIRED]

    Desired value to use with a target-based scaling policy. The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet's buffer (the percent of capacity that should be idle and ready for new game sessions).

rtype

dict

returns

Response Syntax

{
    'Name': 'string'
}

Response Structure

  • (dict) --

    • Name (string) --

      A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique.

UpdateBuild (updated) Link ¶
Changes (response)
{'Build': {'ServerSdkVersion': 'string'}}

Updates metadata in a build resource, 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

Upload a Custom Server Build

All APIs by task

See also: AWS API Documentation

Request Syntax

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

string

param BuildId

[REQUIRED]

A unique identifier for the build to update. You can use either the build ID or ARN value.

type Name

string

param Name

A descriptive label associated with a build. Build names do not need to be unique.

type Version

string

param Version

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

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • Build (dict) --

      The updated build resource.

      • BuildId (string) --

        A unique identifier for the build.

      • BuildArn (string) --

        The Amazon Resource Name (ARN ) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift build ARN, the resource ID matches the BuildId value.

      • Name (string) --

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

      • Version (string) --

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

      • 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 or when using a custom Amazon S3 storage location, 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) --

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

      • ServerSdkVersion (string) --

        The GameLift Server SDK version used to develop your game server.

UpdateFleetAttributes (updated) Link ¶
Changes (request, response)
Request
{'AnywhereConfiguration': {'Cost': 'string'}}
Response
{'FleetArn': 'string'}

Updates a fleet's mutable attributes, including game session protection and resource creation limits.

To update fleet attributes, specify the fleet ID and the property values that you want to change.

If successful, an updated FleetAttributes object is returned.

Learn more

Setting up GameLift fleets

See also: AWS API Documentation

Request Syntax

client.update_fleet_attributes(
    FleetId='string',
    Name='string',
    Description='string',
    NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
    ResourceCreationLimitPolicy={
        'NewGameSessionsPerCreator': 123,
        'PolicyPeriodInMinutes': 123
    },
    MetricGroups=[
        'string',
    ],
    AnywhereConfiguration={
        'Cost': 'string'
    }
)
type FleetId

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.

type Name

string

param Name

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

type Description

string

param Description

A human-readable description of a fleet.

type NewGameSessionProtectionPolicy

string

param NewGameSessionProtectionPolicy

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

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

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

type ResourceCreationLimitPolicy

dict

param ResourceCreationLimitPolicy

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

  • NewGameSessionsPerCreator (integer) --

    A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.

    The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

  • PolicyPeriodInMinutes (integer) --

    The time span used in evaluating the resource creation limit policy.

type MetricGroups

list

param MetricGroups

The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.

  • (string) --

type AnywhereConfiguration

dict

param AnywhereConfiguration

GameLift Anywhere configuration options.

  • Cost (string) -- [REQUIRED]

    The cost to run your fleet per hour. GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues .

rtype

dict

returns

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string'
}

Response Structure

  • (dict) --

    • FleetId (string) --

      A unique identifier for the fleet that was updated.

    • FleetArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .

UpdateFleetPortSettings (updated) Link ¶
Changes (response)
{'FleetArn': 'string'}

Updates permissions that allow inbound traffic to connect to game sessions that are being hosted on instances in the fleet.

To update settings, specify the fleet ID to be updated and specify the changes to be made. List the permissions you want to add in InboundPermissionAuthorizations , and permissions you want to remove in InboundPermissionRevocations . Permissions to be removed must match existing fleet permissions.

If successful, the fleet ID for the updated fleet is returned. For fleets with remote locations, port setting updates can take time to propagate across all locations. You can check the status of updates in each location by calling DescribeFleetPortSettings with a location name.

Learn more

Setting up GameLift fleets

See also: AWS API Documentation

Request Syntax

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

string

param FleetId

[REQUIRED]

A unique identifier for the fleet to update port settings for. You can use either the fleet ID or ARN value.

type InboundPermissionAuthorizations

list

param InboundPermissionAuthorizations

A collection of port settings to be added to the fleet resource.

  • (dict) --

    A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet. New game sessions are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.

    • FromPort (integer) -- [REQUIRED]

      A starting value for a range of allowed port numbers.

      For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

    • ToPort (integer) -- [REQUIRED]

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

      For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

    • IpRange (string) -- [REQUIRED]

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

    • Protocol (string) -- [REQUIRED]

      The network communication protocol used by the fleet.

type InboundPermissionRevocations

list

param InboundPermissionRevocations

A collection of port settings to be removed from the fleet resource.

  • (dict) --

    A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet. New game sessions are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.

    • FromPort (integer) -- [REQUIRED]

      A starting value for a range of allowed port numbers.

      For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

    • ToPort (integer) -- [REQUIRED]

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

      For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

    • IpRange (string) -- [REQUIRED]

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

    • Protocol (string) -- [REQUIRED]

      The network communication protocol used by the fleet.

rtype

dict

returns

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string'
}

Response Structure

  • (dict) --

    • FleetId (string) --

      A unique identifier for the fleet that was updated.

    • FleetArn (string) --

      The Amazon Resource Name (ARN ) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 .