SDK for PHP V3

Client: Aws\GameLift\GameLiftClient
Service ID: gamelift
Version: 2015-10-01

This page describes the parameters and results for the operations of the Amazon GameLift (2015-10-01), and shows how to use the Aws\GameLift\GameLiftClient object to call the described operations. This documentation is specific to the 2015-10-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AcceptMatch ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Registers a player's acceptance or rejection of a proposed FlexMatch match.
ClaimGameServer ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Locates an available game server and temporarily reserves it to host gameplay and players.
CreateAlias ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Creates an alias for a fleet.
CreateBuild ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere Creates a new Amazon GameLift Servers build resource for your game server binary files.
CreateContainerFleet ( array $params = [] )
This API works with the following fleet types: Container Creates a managed fleet of Amazon Elastic Compute Cloud (Amazon EC2) instances to host your containerized game servers.
CreateContainerGroupDefinition ( array $params = [] )
This API works with the following fleet types: Container Creates a ContainerGroupDefinition that describes a set of containers for hosting your game server with Amazon GameLift Servers managed containers hosting.
CreateFleet ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Creates a fleet of compute resources to host your game servers.
CreateFleetLocations ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Adds remote locations to an EC2 and begins populating the new locations with instances.
CreateGameServerGroup ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Creates a Amazon GameLift Servers FleetIQ game server group for managing game hosting on a collection of Amazon Elastic Compute Cloud instances for game hosting.
CreateGameSession ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Creates a multiplayer game session for players in a specific fleet location.
CreateGameSessionQueue ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Creates a placement queue that processes requests for new game sessions.
CreateLocation ( array $params = [] )
This API works with the following fleet types: Anywhere Creates a custom location for use in an Anywhere fleet.
CreateMatchmakingConfiguration ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Defines a new matchmaking configuration for use with FlexMatch.
CreateMatchmakingRuleSet ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Creates a new rule set for FlexMatch matchmaking.
CreatePlayerSession ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Reserves an open player slot in a game session for a player.
CreatePlayerSessions ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Reserves open slots in a game session for a group of players.
CreateScript ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere Creates a new script record for your Amazon GameLift Servers Realtime script.
CreateVpcPeeringAuthorization ( array $params = [] )
This API works with the following fleet types: EC2 Requests authorization to create or delete a peer connection between the VPC for your Amazon GameLift Servers fleet and a virtual private cloud (VPC) in your Amazon Web Services account.
CreateVpcPeeringConnection ( array $params = [] )
This API works with the following fleet types: EC2 Establishes a VPC peering connection between a virtual private cloud (VPC) in an Amazon Web Services account with the VPC for your Amazon GameLift Servers fleet.
DeleteAlias ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Deletes an alias.
DeleteBuild ( array $params = [] )
This API works with the following fleet types: EC2 Deletes a build.
DeleteContainerFleet ( array $params = [] )
This API works with the following fleet types: Container Deletes all resources and information related to a container fleet and shuts down currently running fleet instances, including those in remote locations.
DeleteContainerGroupDefinition ( array $params = [] )
This API works with the following fleet types: Container Request options: Deletes a container group definition.
DeleteFleet ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere Deletes all resources and information related to a fleet and shuts down any currently running fleet instances, including those in remote locations.
DeleteFleetLocations ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Removes locations from a multi-location fleet.
DeleteGameServerGroup ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Terminates a game server group and permanently deletes the game server group record.
DeleteGameSessionQueue ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Deletes a game session queue.
DeleteLocation ( array $params = [] )
This API works with the following fleet types: Anywhere Deletes a custom location.
DeleteMatchmakingConfiguration ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Permanently removes a FlexMatch matchmaking configuration.
DeleteMatchmakingRuleSet ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Deletes an existing matchmaking rule set.
DeleteScalingPolicy ( array $params = [] )
This API works with the following fleet types: EC2, Container Deletes a fleet scaling policy.
DeleteScript ( array $params = [] )
This API works with the following fleet types: EC2 Deletes a Realtime script.
DeleteVpcPeeringAuthorization ( array $params = [] )
This API works with the following fleet types: EC2 Cancels a pending VPC peering authorization for the specified VPC.
DeleteVpcPeeringConnection ( array $params = [] )
This API works with the following fleet types: EC2 Removes a VPC peering connection.
DeregisterCompute ( array $params = [] )
This API works with the following fleet types: Anywhere Removes a compute resource from an Anywhere fleet.
DeregisterGameServer ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Removes the game server from a game server group.
DescribeAlias ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves properties for an alias.
DescribeBuild ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves properties for a custom game build.
DescribeCompute ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves properties for a specific compute resource in an Amazon GameLift Servers fleet.
DescribeContainerFleet ( array $params = [] )
This API works with the following fleet types: Container Retrieves the properties for a container fleet.
DescribeContainerGroupDefinition ( array $params = [] )
This API works with the following fleet types: Container Retrieves the properties of a container group definition, including all container definitions in the group.
DescribeContainerGroupPortMappings ( array $params = [] )
This API works with the following fleet types: Container Retrieves the port mappings for a container group running on a container fleet.
DescribeEC2InstanceLimits ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves the instance limits and current utilization for an Amazon Web Services Region or location.
DescribeFleetAttributes ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere Retrieves core fleet-wide properties for fleets in an Amazon Web Services Region.
DescribeFleetCapacity ( array $params = [] )
This API works with the following fleet types: EC2, Container Retrieves the resource capacity settings for one or more fleets.
DescribeFleetDeployment ( array $params = [] )
This API works with the following fleet types: Container Retrieves information about a managed container fleet deployment.
DescribeFleetEvents ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves entries from a fleet's event log.
DescribeFleetLocationAttributes ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves information on a fleet's remote locations, including life-cycle status and any suspended fleet activity.
DescribeFleetLocationCapacity ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves the resource capacity settings for a fleet location.
DescribeFleetLocationUtilization ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere Retrieves current usage data for a fleet location.
DescribeFleetPortSettings ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves a fleet's inbound connection permissions.
DescribeFleetUtilization ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves utilization statistics for one or more fleets.
DescribeGameServer ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Retrieves information for a registered game server.
DescribeGameServerGroup ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Retrieves information on a game server group.
DescribeGameServerInstances ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Retrieves status information about the Amazon EC2 instances associated with a Amazon GameLift Servers FleetIQ game server group.
DescribeGameSessionDetails ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves additional game session properties, including the game session protection policy in force, a set of one or more game sessions in a specific fleet location.
DescribeGameSessionPlacement ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves information, including current status, about a game session placement request.
DescribeGameSessionQueues ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves the properties for one or more game session queues.
DescribeGameSessions ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves a set of one or more game sessions in a specific fleet location.
DescribeInstances ( array $params = [] )
This API works with the following fleet types:EC2, Container Retrieves information about the EC2 instances in an Amazon GameLift Servers managed fleet, including instance ID, connection data, and status.
DescribeMatchmaking ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves one or more matchmaking tickets.
DescribeMatchmakingConfigurations ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves the details of FlexMatch matchmaking configurations.
DescribeMatchmakingRuleSets ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves the details for FlexMatch matchmaking rule sets.
DescribePlayerSessions ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves properties for one or more player sessions.
DescribeRuntimeConfiguration ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves a fleet's runtime configuration settings.
DescribeScalingPolicies ( array $params = [] )
This API works with the following fleet types: EC2, Container Retrieves all scaling policies applied to a fleet.
DescribeScript ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves properties for a Realtime script.
DescribeVpcPeeringAuthorizations ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves valid VPC peering authorizations that are pending for the Amazon Web Services account.
DescribeVpcPeeringConnections ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves information on VPC peering connections.
GetComputeAccess ( array $params = [] )
This API works with the following fleet types: EC2, Container Requests authorization to remotely connect to a hosting resource in a Amazon GameLift Servers managed fleet.
GetComputeAuthToken ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Requests an authentication token from Amazon GameLift Servers for a compute resource in an Amazon GameLift Servers fleet.
GetGameSessionLogUrl ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves the location of stored game session logs for a specified game session on Amazon GameLift Servers managed fleets.
GetInstanceAccess ( array $params = [] )
This API works with the following fleet types: EC2 Requests authorization to remotely connect to an instance in an Amazon GameLift Servers managed fleet.
GetPlayerConnectionDetails ( array $params = [] )
This API works with the following fleet types: EC2 (server SDK 5.
ListAliases ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves all aliases for this Amazon Web Services account.
ListBuilds ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves build resources for all builds associated with the Amazon Web Services account in use.
ListCompute ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves information on the compute resources in an Amazon GameLift Servers fleet.
ListContainerFleets ( array $params = [] )
This API works with the following fleet types: Container Retrieves a collection of container fleet resources in an Amazon Web Services Region.
ListContainerGroupDefinitionVersions ( array $params = [] )
This API works with the following fleet types: Container Retrieves all versions of a container group definition.
ListContainerGroupDefinitions ( array $params = [] )
This API works with the following fleet types: Container Retrieves container group definitions for the Amazon Web Services account and Amazon Web Services Region.
ListFleetDeployments ( array $params = [] )
This API works with the following fleet types: Container Retrieves a collection of container fleet deployments in an Amazon Web Services Region.
ListFleets ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves a collection of fleet resources in an Amazon Web Services Region.
ListGameServerGroups ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Lists a game server groups.
ListGameServers ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Retrieves information on all game servers that are currently active in a specified game server group.
ListLocations ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Lists all custom and Amazon Web Services locations where Amazon GameLift Servers can host game servers.
ListScripts ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves script records for all Realtime scripts that are associated with the Amazon Web Services account in use.
ListTagsForResource ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves all tags assigned to a Amazon GameLift Servers resource.
PutScalingPolicy ( array $params = [] )
This API works with the following fleet types: EC2, Container Creates or updates a scaling policy for a fleet.
RegisterCompute ( array $params = [] )
This API works with the following fleet types: Anywhere Registers a compute resource in an Amazon GameLift Servers Anywhere fleet.
RegisterGameServer ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Creates a new game server resource and notifies Amazon GameLift Servers FleetIQ that the game server is ready to host gameplay and players.
RequestUploadCredentials ( array $params = [] )
This API works with the following fleet types: EC2 Retrieves a fresh set of credentials for use when uploading a new set of game build files to Amazon GameLift Servers's Amazon S3.
ResolveAlias ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Attempts to retrieve a fleet ID that is associated with an alias.
ResumeGameServerGroup ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Reinstates activity on a game server group after it has been suspended.
SearchGameSessions ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Retrieves all active game sessions that match a set of search criteria and sorts them into a specified order.
StartFleetActions ( array $params = [] )
This API works with the following fleet types: EC2, Container Resumes certain types of activity on fleet instances that were suspended with StopFleetActions.
StartGameSessionPlacement ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Makes a request to start a new game session using a game session queue.
StartMatchBackfill ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Finds new players to fill open slots in currently running game sessions.
StartMatchmaking ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Uses FlexMatch to create a game match for a group of players based on custom matchmaking rules.
StopFleetActions ( array $params = [] )
This API works with the following fleet types: EC2, Container Suspends certain types of activity in a fleet location.
StopGameSessionPlacement ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Cancels a game session placement that's in PENDING status.
StopMatchmaking ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Cancels a matchmaking ticket or match backfill ticket that is currently being processed.
SuspendGameServerGroup ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Temporarily stops activity on a game server group without terminating instances or the game server group.
TagResource ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Assigns a tag to an Amazon GameLift Servers resource.
TerminateGameSession ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Ends a game session that's currently in progress.
UntagResource ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Removes a tag assigned to a Amazon GameLift Servers resource.
UpdateAlias ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Updates properties for an alias.
UpdateBuild ( array $params = [] )
This API works with the following fleet types: EC2 Updates metadata in a build resource, including the build name and version.
UpdateContainerFleet ( array $params = [] )
This API works with the following fleet types: Container Updates the properties of a managed container fleet.
UpdateContainerGroupDefinition ( array $params = [] )
This API works with the following fleet types: Container Updates properties in an existing container group definition.
UpdateFleetAttributes ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere Updates a fleet's mutable attributes, such as game session protection and resource creation limits.
UpdateFleetCapacity ( array $params = [] )
This API works with the following fleet types: EC2, Container Updates capacity settings for a managed EC2 fleet or managed container fleet.
UpdateFleetPortSettings ( array $params = [] )
This API works with the following fleet types: EC2 Updates permissions that allow inbound traffic to connect to game sessions in the fleet.
UpdateGameServer ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Updates information about a registered game server to help Amazon GameLift Servers FleetIQ track game server availability.
UpdateGameServerGroup ( array $params = [] )
This API works with the following fleet types: EC2 (FleetIQ) Updates Amazon GameLift Servers FleetIQ-specific properties for a game server group.
UpdateGameSession ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Updates the mutable properties of a game session.
UpdateGameSessionQueue ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Updates the configuration of a game session queue, which determines how the queue processes new game session requests.
UpdateMatchmakingConfiguration ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Updates settings for a FlexMatch matchmaking configuration.
UpdateRuntimeConfiguration ( array $params = [] )
This API works with the following fleet types: EC2 Updates the runtime configuration for the specified fleet.
UpdateScript ( array $params = [] )
This API works with the following fleet types: EC2 Updates Realtime script metadata and content.
ValidateMatchmakingRuleSet ( array $params = [] )
This API works with the following fleet types: EC2, Anywhere, Container Validates the syntax of a matchmaking rule or rule set.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

DescribeFleetAttributes
DescribeFleetCapacity
DescribeFleetEvents
DescribeFleetLocationAttributes
DescribeFleetUtilization
DescribeGameServerInstances
DescribeGameSessionDetails
DescribeGameSessionQueues
DescribeGameSessions
DescribeInstances
DescribeMatchmakingConfigurations
DescribeMatchmakingRuleSets
DescribePlayerSessions
DescribeScalingPolicies
ListAliases
ListBuilds
ListCompute
ListContainerFleets
ListContainerGroupDefinitionVersions
ListContainerGroupDefinitions
ListFleetDeployments
ListFleets
ListGameServerGroups
ListGameServers
ListLocations
ListScripts
SearchGameSessions

Operations

AcceptMatch

$result = $client->acceptMatch([/* ... */]);
$promise = $client->acceptMatchAsync([/* ... */]);

This API works with the following fleet types: EC2, Anywhere, Container

Registers a player's acceptance or rejection of a proposed FlexMatch match. A matchmaking configuration may require player acceptance; if so, then matches built with that configuration cannot be completed unless all players accept the proposed match within a specified time limit.

When FlexMatch builds a match, all the matchmaking tickets involved in the proposed match are placed into status REQUIRES_ACCEPTANCE. This is a trigger for your game to get acceptance from all players in each ticket. Calls to this action are only valid for tickets that are in this status; calls for tickets not in this status result in an error.

To register acceptance, specify the ticket ID, one or more players, and an acceptance response. When all players have accepted, Amazon GameLift Servers advances the matchmaking tickets to status PLACING, and attempts to create a new game session for the match.

If any player rejects the match, or if acceptances are not received before a specified timeout, the proposed match is dropped. Each matchmaking ticket in the failed match is handled as follows:

  • If the ticket has one or more players who rejected the match or failed to respond, the ticket status is set CANCELLED and processing is terminated.

  • If all players in the ticket accepted the match, the ticket status is returned to SEARCHING to find a new match.

Learn more

Add FlexMatch to a game client

FlexMatch events (reference)

Parameter Syntax

$result = $client->acceptMatch([
    'AcceptanceType' => 'ACCEPT|REJECT', // REQUIRED
    'PlayerIds' => ['<string>', ...], // REQUIRED
    'TicketId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AcceptanceType
Required: Yes
Type: string

Player response to the proposed match.

PlayerIds
Required: Yes
Type: Array of strings

A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.

TicketId
Required: Yes
Type: string

A unique identifier for a matchmaking ticket. The ticket must be in status REQUIRES_ACCEPTANCE; otherwise this request will fail.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidRequestException:

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

NotFoundException:

The requested resource was not found. The resource was either not created yet or deleted.

InternalServiceException:

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

UnsupportedRegionException:

The requested operation is not supported in the Region specified.

ClaimGameServer

$result = $client->claimGameServer([/* ... */]);
$promise = $client->claimGameServerAsync([/* ... */]);

This API works with the following fleet types: EC2 (FleetIQ)

Locates an available game server and temporarily reserves it to host gameplay and players. This operation is called from a game client or client service (such as a matchmaker) to request hosting resources for a new game session. In response, Amazon GameLift Servers FleetIQ locates an available game server, places it in CLAIMED status for 60 seconds, and returns connection information that players can use to connect to the game server.

To claim a game server, identify a game server group. You can also specify a game server ID, although this approach bypasses Amazon GameLift Servers FleetIQ placement optimization. Optionally, include game data to pass to the game server at the start of a game session, such as a game map or player information. Add filter options to further restrict how a game server is chosen, such as only allowing game servers on ACTIVE instances to be claimed.

When a game server is successfully claimed, connection information is returned. A claimed game server's utilization status remains AVAILABLE while the claim status is set to CLAIMED for up to 60 seconds. This time period gives the game server time to update its status to UTILIZED after players join. If the game server's status is not updated within 60 seconds, the game server reverts to unclaimed status and is available to be claimed by another request. The claim time period is a fixed value and is not configurable.

If you try to claim a specific game server, this request will fail in the following cases:

  • If the game server utilization status is UTILIZED.

  • If the game server claim status is CLAIMED.

  • If the game server is running on an instance in DRAINING status and the provided filter option does not allow placing on DRAINING instances.

Learn more

Amazon GameLift Servers FleetIQ Guide

Parameter Syntax

$result = $client->claimGameServer([
    'FilterOption' => [
        'InstanceStatuses' => ['<string>', ...],
    ],
    'GameServerData' => '<string>',
    'GameServerGroupName' => '<string>', // REQUIRED
    'GameServerId' => '<string>',
]);

Parameter Details

Members
FilterOption
Type: ClaimFilterOption structure

Object that restricts how a claimed game server is chosen.

GameServerData
Type: string

A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service when it requests information on game servers.

GameServerGroupName
Required: Yes
Type: string

A unique identifier for the game server group where the game server is running. If you are not specifying a game server to claim, this value identifies where you want Amazon GameLift Servers FleetIQ to look for an available game server to claim.

GameServerId
Type: string

A custom string that uniquely identifies the game server to claim. If this parameter is left empty, Amazon GameLift Servers FleetIQ searches for an available game server in the specified game server group.

Result Syntax

[
    'GameServer' => [
        'ClaimStatus' => 'CLAIMED',
        'ConnectionInfo' => '<string>',
        'GameServerData' => '<string>',
        'GameServerGroupArn' => '<string>',
        'GameServerGroupName' => '<string>',
        'GameServerId' => '<string>',
        'InstanceId' => '<string>',
        'LastClaimTime' => <DateTime>,
        'LastHealthCheckTime' => <DateTime>,
        'RegistrationTime' => <DateTime>,
        'UtilizationStatus' => 'AVAILABLE|UTILIZED',
    ],
]

Result Details

Members
GameServer
Type: GameServer structure

Object that describes the newly claimed game server.

Errors

InvalidRequestException:

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

NotFoundException:

The requested resource was not found. The resource was either not created yet or deleted.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

OutOfCapacityException:

The specified game server group has no available game servers to fulfill a ClaimGameServer request. Clients can retry such requests immediately or after a waiting period.

UnauthorizedException:

The client failed authentication. Clients should not retry such requests.

InternalServiceException:

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

CreateAlias

$result = $client->createAlias([/* ... */]);
$promise = $client->createAliasAsync([/* ... */]);

This API works with the following fleet types: EC2, Anywhere, Container

Creates an alias for a fleet. In most situations, you can use an alias ID in place of a fleet ID. An alias provides a level of abstraction for a fleet that is useful when redirecting player traffic from one fleet to another, such as when updating your game build.

Amazon GameLift Servers supports two types of routing strategies for aliases: simple and terminal. A simple alias points to an active fleet. A terminal alias is used to display messaging or link to a URL instead of routing players to an active fleet. For example, you might use a terminal alias when a game version is no longer supported and you want to direct players to an upgrade site.

To create a fleet alias, specify an alias name, routing strategy, and optional description. Each simple alias can point to only one fleet, but a fleet can have multiple aliases. If successful, a new alias record is returned, including an alias ID and an ARN. You can reassign an alias to another fleet by calling UpdateAlias.

Related actions

All APIs by task

Parameter Syntax

$result = $client->createAlias([
    'Description' => '<string>',
    'Name' => '<string>', // REQUIRED
    'RoutingStrategy' => [ // REQUIRED
        'FleetId' => '<string>',
        'Message' => '<string>',
        'Type' => 'SIMPLE|TERMINAL',
    ],
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
Description
Type: string

A human-readable description of the alias.

Name
Required: Yes
Type: string

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

RoutingStrategy
Required: Yes
Type: RoutingStrategy structure

The routing configuration, including routing type and fleet target, for the alias.

Tags
Type: Array of Tag structures

A list of labels to assign to the new alias 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.

Result Syntax

[
    'Alias' => [
        'AliasArn' => '<string>',
        'AliasId' => '<string>',
        'CreationTime' => <DateTime>,
        'Description' => '<string>',
        'LastUpdatedTime' => <DateTime>,
        'Name' => '<string>',
        'RoutingStrategy' => [
            'FleetId' => '<string>',
            'Message' => '<string>',
            'Type' => 'SIMPLE|TERMINAL',
        ],
    ],
]

Result Details

Members
Alias
Type: Alias structure

The newly created alias resource.

Errors

UnauthorizedException:

The client failed authentication. Clients should not retry such requests.

InvalidRequestException:

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

InternalServiceException:

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

LimitExceededException:

The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.

TaggingFailedException:

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

CreateBuild

$result = $client->createBuild([/* ... */]);
$promise = $client->createBuildAsync([/* ... */]);

This API works with the following fleet types: EC2, Anywhere

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

When setting up a new game build for Amazon GameLift Servers, 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 an Amazon GameLift Servers Amazon S3 location, and (2) it creates a new build resource.

You can use the CreateBuild operation in the following scenarios:

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

  • Upload your build files to a Amazon GameLift Servers 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 Amazon GameLift Servers 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

Parameter Syntax

$result = $client->createBuild([
    'Name' => '<string>',
    'OperatingSystem' => 'WINDOWS_2012|AMAZON_LINUX|AMAZON_LINUX_2|WINDOWS_2016|AMAZON_LINUX_2023|WINDOWS_2022',
    'ServerSdkVersion' => '<string>',
    'StorageLocation' => [
        'Bucket' => '<string>',
        'Key' => '<string>',
        'ObjectVersion' => '<string>',
        'RoleArn' => '<string>',
    ],
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'Version' => '<string>',
]);

Parameter Details

Members
Name
Type: string

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

OperatingSystem
Type: string

The operating system that your game server binaries run on. This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later.

Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the Amazon Linux 2 FAQs. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.

Windows Server 2016 will reach end of support on 1/12/2027. For game servers that are hosted on Windows Server 2016 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to Windows Server 2022 instances. See Migrate to server SDK version 5.

ServerSdkVersion
Type: string

A server SDK version you used when integrating your game server build with Amazon GameLift Servers. For more information see Integrate games with custom game servers. By default Amazon GameLift Servers sets this value to 4.0.2.

StorageLocation
Type: S3Location structure

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 Servers 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 Servers will report a SizeOnDisk of 0.

Tags
Type: Array of Tag structures

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.

Version
Type: string

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

Result Syntax

[
    'Build' => [
        'BuildArn' => '<string>',
        'BuildId' => '<string>',
        'CreationTime' => <DateTime>,
        'Name' => '<string>',
        'OperatingSystem' => 'WINDOWS_2012|AMAZON_LINUX|AMAZON_LINUX_2|WINDOWS_2016|AMAZON_LINUX_2023|WINDOWS_2022',
        'ServerSdkVersion' => '<string>',
        'SizeOnDisk' => <integer>,
        'Status' => 'INITIALIZED|READY|FAILED',
        'Version' => '<string>',
    ],
    'StorageLocation' => [
        'Bucket' => '<string>',
        'Key' => '<string>',
        'ObjectVersion' => '<string>',
        'RoleArn' => '<string>',
    ],
    'UploadCredentials' => [
        'AccessKeyId' => '<string>',
        'SecretAccessKey' => '<string>',
        'SessionToken' => '<string>',
    ],
]

Result Details

Members
Build
Type: Build structure

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

StorageLocation
Type: S3Location structure

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

UploadCredentials
Type: AwsCredentials structure

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 Servers. Credentials have a limited life span. To refresh these credentials, call RequestUploadCredentials.

Errors

UnauthorizedException:

The client failed authentication. Clients should not retry such requests.

InvalidRequestException:

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

TaggingFailedException:

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

InternalServiceException:

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

CreateContainerFleet

$result = $client->createContainerFleet([/* ... */]);
$promise = $client->createContainerFleetAsync([/* ... */]);

This API works with the following fleet types: Container

Creates a managed fleet of Amazon Elastic Compute Cloud (Amazon EC2) instances to host your containerized game servers. Use this operation to define how to deploy a container architecture onto each fleet instance and configure fleet settings. You can create a container fleet in any Amazon Web Services Regions that Amazon GameLift Servers supports for multi-location fleets. A container fleet can be deployed to a single location or multiple locations. Container fleets are deployed with Amazon Linux 2023 as the instance operating system.

Define the fleet's container architecture using container group definitions. Each fleet can have one of the following container group types:

  • The game server container group runs your game server build and dependent software. Amazon GameLift Servers deploys one or more replicas of this container group to each fleet instance. The number of replicas depends on the computing capabilities of the fleet instance in use.

  • An optional per-instance container group might be used to run other software that only needs to run once per instance, such as background services, logging, or test processes. One per-instance container group is deployed to each fleet instance.

Each container group can include the definition for one or more containers. A container definition specifies a container image that is stored in an Amazon Elastic Container Registry (Amazon ECR) public or private repository.

Request options

Use this operation to make the following types of requests. Most fleet settings have default values, so you can create a working fleet with a minimal configuration and default values, which you can customize later.

  • Create a fleet with no container groups. You can configure a container fleet and then add container group definitions later. In this scenario, no fleet instances are deployed, and the fleet can't host game sessions until you add a game server container group definition. Provide the following required parameter values:

    • FleetRoleArn

  • Create a fleet with a game server container group. Provide the following required parameter values:

    • FleetRoleArn

    • GameServerContainerGroupDefinitionName

  • Create a fleet with a game server container group and a per-instance container group. Provide the following required parameter values:

    • FleetRoleArn

    • GameServerContainerGroupDefinitionName

    • PerInstanceContainerGroupDefinitionName

Results

If successful, this operation creates a new container fleet resource, places it in PENDING status, and initiates the fleet creation workflow. For fleets with container groups, this workflow starts a fleet deployment and transitions the status to ACTIVE. Fleets without a container group are placed in CREATED status.

You can update most of the properties of a fleet, including container group definitions, and deploy the update across all fleet instances. Use UpdateContainerFleet to deploy a new game server version update across the container fleet.

A managed fleet's runtime environment depends on the Amazon Machine Image (AMI) version it uses. When a new fleet is created, Amazon GameLift Servers assigns the latest available AMI version to the fleet, and all compute instances in that fleet are deployed with that version. To update the AMI version, you must create a new fleet. As a best practice, we recommend replacing your managed fleets every 30 days to maintain a secure and up-to-date runtime environment for your hosted game servers. For guidance, see Security best practices for Amazon GameLift Servers.

Parameter Syntax

$result = $client->createContainerFleet([
    'BillingType' => 'ON_DEMAND|SPOT',
    'Description' => '<string>',
    'FleetRoleArn' => '<string>', // REQUIRED
    'GameServerContainerGroupDefinitionName' => '<string>',
    'GameServerContainerGroupsPerInstance' => <integer>,
    'GameSessionCreationLimitPolicy' => [
        'NewGameSessionsPerCreator' => <integer>,
        'PolicyPeriodInMinutes' => <integer>,
    ],
    'InstanceConnectionPortRange' => [
        'FromPort' => <integer>, // REQUIRED
        'ToPort' => <integer>, // REQUIRED
    ],
    'InstanceInboundPermissions' => [
        [
            'FromPort' => <integer>, // REQUIRED
            'IpRange' => '<string>', // REQUIRED
            'Protocol' => 'TCP|UDP', // REQUIRED
            'ToPort' => <integer>, // REQUIRED
        ],
        // ...
    ],
    'InstanceType' => '<string>',
    'Locations' => [
        [
            'Location' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'LogConfiguration' => [
        'LogDestination' => 'NONE|CLOUDWATCH|S3',
        'LogGroupArn' => '<string>',
        'S3BucketName' => '<string>',
    ],
    'MetricGroups' => ['<string>', ...],
    'NewGameSessionProtectionPolicy' => 'NoProtection|FullProtection',
    'PerInstanceContainerGroupDefinitionName' => '<string>',
    'PlayerGatewayMode' => 'DISABLED|ENABLED|REQUIRED',
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
BillingType
Type: string

Indicates whether to use On-Demand or Spot instances for this fleet. Learn more about when to use On-Demand versus Spot Instances. This fleet property can't be changed after the fleet is created.

By default, this property is set to ON_DEMAND.

You can't update this fleet property later.

Description
Type: string

A meaningful description of the container fleet.

FleetRoleArn
Required: Yes
Type: string

The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. Use an IAM service role with the GameLiftContainerFleetPolicy managed policy attached. For more information, see Set up an IAM service role. You can't change this fleet property after the fleet is created.

IAM role ARN values use the following pattern: arn:aws:iam::[Amazon Web Services account]:role/[role name].

GameServerContainerGroupDefinitionName
Type: string

A container group definition resource that describes how to deploy containers with your game server build and support software onto each fleet instance. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.

Create a container group definition by calling CreateContainerGroupDefinition. This operation creates a ContainerGroupDefinition resource.

GameServerContainerGroupsPerInstance
Type: int

The number of times to replicate the game server container group on each fleet instance.

By default, Amazon GameLift Servers calculates the maximum number of game server container groups that can fit on each instance. This calculation is based on the CPU and memory resources of the fleet's instance type). To use the calculated maximum, don't set this parameter. If you set this number manually, Amazon GameLift Servers uses your value as long as it's less than the calculated maximum.

GameSessionCreationLimitPolicy

A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.

InstanceConnectionPortRange
Type: ConnectionPortRange structure

The set of port numbers to open on each fleet instance. A fleet's connection ports map to container ports that are configured in the fleet's container group definitions.

By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:

  • Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: 4192 + [# of game server container groups per fleet instance] * [# of container ports in the game server container group definition] + [# of container ports in the per instance container group definition]

You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's inbound permissions port range.

If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.

The port range must not overlap with the Amazon GameLift Servers reserved port range 4092-4191. This range is reserved for internal Amazon GameLift Servers services.

InstanceInboundPermissions
Type: Array of IpPermission structures

The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. As a best practice, when remotely accessing a fleet instance, we recommend opening ports only when you need them and closing them when you're finished.

By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:

  • Protocol: UDP

  • Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: 4192 + [# of game server container groups per fleet instance] * [# of container ports in the game server container group definition] + [# of container ports in the per instance container group definition]

You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's connection port range.

If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.

The port range must not overlap with the Amazon GameLift Servers reserved port range 4092-4191. This range is reserved for internal Amazon GameLift Servers services.

InstanceType
Type: string

The Amazon EC2 instance type to use for all instances in the fleet. For multi-location fleets, the instance type must be available in the home region and all remote locations. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity.

By default, Amazon GameLift Servers uses the c5.large instance type. If this instance type does not have sufficient resources for your container groups, you can choose a different instance type that better fits your needs. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions of Amazon EC2 instance types.

You can't update this fleet property later.

Locations
Type: Array of LocationConfiguration structures

A set of locations to deploy container fleet instances to. You can add any Amazon Web Services Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more Amazon Web Services Region codes, such as us-west-2, or Local Zone names. Also include the fleet's home Region, which is the Amazon Web Services Region where the fleet is created. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.

LogConfiguration
Type: LogConfiguration structure

A method for collecting container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs. You can select from the following methods:

  • CLOUDWATCH -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.

  • S3 -- Store logs in an Amazon S3 bucket that you define.

  • NONE -- Don't collect container logs.

By default, this property is set to CLOUDWATCH.

Amazon GameLift Servers requires permissions to send logs other Amazon Web Services services in your account. These permissions are included in the IAM fleet role for this container fleet (see FleetRoleArn).

MetricGroups
Type: Array of strings

The name of an Amazon Web Services CloudWatch metric group to add this fleet to. You can use a metric group to aggregate metrics for multiple fleets. You can specify an existing metric group name or use a new name to create a new metric group. Each fleet can have only one metric group, but you can change this value at any time.

NewGameSessionProtectionPolicy
Type: string

Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using UpdateGameSession.

  • NoProtection -- Game sessions can be shut down during active gameplay.

  • FullProtection -- Game sessions in ACTIVE status can't be shut down.

By default, this property is set to NoProtection.

PerInstanceContainerGroupDefinitionName
Type: string

The name of a container group definition resource that describes a set of axillary software. A fleet instance has one process for executables in this container group. A per-instance container group is optional. You can update the fleet to add or remove a per-instance container group at any time. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.

Create a container group definition by calling https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html. This operation creates a https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html resource.

PlayerGatewayMode
Type: string

Configures player gateway for your fleet. Player gateway provides benefits such as DDoS protection by rate limiting and validating traffic before it reaches game servers, hiding game server IP addresses from players, and providing updated endpoints when relay endpoints become unhealthy.

How it works: When enabled, game clients connect to relay endpoints instead of to your game servers. Player gateway validates player gateway tokens and routes traffic to the appropriate game server. Your game backend calls GetPlayerConnectionDetails to retrieve relay endpoints and player gateway tokens for your game clients. To learn more about this topic, see DDoS protection with Amazon GameLift Servers player gateway.

Possible values include:

  • DISABLED (default) -- Game clients connect to the game server endpoint. Use this when you do not intend to integrate your game with player gateway.

  • ENABLED -- Player gateway is available in fleet locations where it is supported. Your game backend can call GetPlayerConnectionDetails to obtain a player gateway token and endpoints for game clients.

  • REQUIRED -- Player gateway is available in fleet locations where it is supported, and the fleet can only use locations that support this feature. Attempting to add a remote location to your fleet which does not support player gateway will result in an InvalidRequestException.

Tags
Type: Array of Tag structures

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.

Result Syntax

[
    'ContainerFleet' => [
        'BillingType' => 'ON_DEMAND|SPOT',
        'CreationTime' => <DateTime>,
        'DeploymentDetails' => [
            'LatestDeploymentId' => '<string>',
        ],
        'Description' => '<string>',
        'FleetArn' => '<string>',
        'FleetId' => '<string>',
        'FleetRoleArn' => '<string>',
        'GameServerContainerGroupDefinitionArn' => '<string>',
        'GameServerContainerGroupDefinitionName' => '<string>',
        'GameServerContainerGroupsPerInstance' => <integer>,
        'GameSessionCreationLimitPolicy' => [
            'NewGameSessionsPerCreator' => <integer>,
            'PolicyPeriodInMinutes' => <integer>,
        ],
        'InstanceConnectionPortRange' => [
            'FromPort' => <integer>,
            'ToPort' => <integer>,
        ],
        'InstanceInboundPermissions' => [
            [
                'FromPort' => <integer>,
                'IpRange' => '<string>',
                'Protocol' => 'TCP|UDP',
                'ToPort' => <integer>,
            ],
            // ...
        ],
        'InstanceType' => '<string>',
        'LocationAttributes' => [
            [
                'Location' => '<string>',
                'PlayerGatewayStatus' => 'DISABLED|ENABLED',
                'Status' => 'PENDING|CREATING|CREATED|ACTIVATING|ACTIVE|UPDATING|DELETING|EXPIRED',
            ],
            // ...
        ],
        'LogConfiguration' => [
            'LogDestination' => 'NONE|CLOUDWATCH|S3',
            'LogGroupArn' => '<string>',
            'S3BucketName' => '<string>',
        ],
        'MaximumGameServerContainerGroupsPerInstance' => <integer>,
        'MetricGroups' => ['<string>', ...],
        'NewGameSessionProtectionPolicy' => 'NoProtection|FullProtection',
        'PerInstanceContainerGroupDefinitionArn' => '<string>',
        'PerInstanceContainerGroupDefinitionName' => '<string>',
        'PlayerGatewayMode' => 'DISABLED|ENABLED|REQUIRED',
        'Status' => 'PENDING|CREATING|CREATED|ACTIVATING|ACTIVE|UPDATING|DELETING|EXPIRED',
    ],
]

Result Details

Members
ContainerFleet
Type: ContainerFleet structure

The properties for the new container fleet, including current status. All fleets are initially placed in PENDING status.

Errors

InternalServiceException:

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

LimitExceededException:

The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.

InvalidRequestException:

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

UnauthorizedException:

The client failed authentication. Clients should not retry such requests.

TaggingFailedException:

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

UnsupportedRegionException:

The requested operation is not supported in the Region specified.

CreateContainerGroupDefinition

$result = $client->createContainerGroupDefinition([/* ... */]);
$promise = $client->createContainerGroupDefinitionAsync([/* ... */]);

This API works with the following fleet types: Container

Creates a ContainerGroupDefinition that describes a set of containers for hosting your game server with Amazon GameLift Servers managed containers hosting. An Amazon GameLift Servers container group is similar to a container task or pod. Use container group definitions when you create a container fleet with CreateContainerFleet.

A container group definition determines how Amazon GameLift Servers deploys your containers to each instance in a container fleet. You can maintain multiple versions of a container group definition.

There are two types of container groups:

  • A game server container group has the containers that run your game server application and supporting software. A game server container group can have these container types:

    • Game server container. This container runs your game server. You can define one game server container in a game server container group.

    • Support container. This container runs software in parallel with your game server. You can define up to 8 support containers in a game server group.

    When building a game server container group definition, you can choose to bundle your game server executable and all dependent software into a single game server container. Alternatively, you can separate the software into one game server container and one or more support containers.

    On a container fleet instance, a game server container group can be deployed multiple times (depending on the compute resources of the instance). This means that all containers in the container group are replicated together.

  • A per-instance container group has containers for processes that aren't replicated on a container fleet instance. This might include background services, logging, test processes, or processes that need to persist independently of the game server container group. When building a per-instance container group, you can define up to 10 support containers.

This operation requires Identity and Access Management (IAM) permissions to access container images in Amazon ECR repositories. See IAM permissions for Amazon GameLift Servers for help setting the appropriate permissions.

Request options

Use this operation to make the following types of requests. You can specify values for the minimum required parameters and customize optional values later.

  • Create a game server container group definition. Provide the following required parameter values:

    • Name

    • ContainerGroupType (GAME_SERVER)

    • OperatingSystem

    • TotalMemoryLimitMebibytes

    • TotalVcpuLimit

    • At least one GameServerContainerDefinition

      • ContainerName

      • ImageUrl

      • PortConfiguration

      • ServerSdkVersion

  • Create a per-instance container group definition. Provide the following required parameter values:

    • Name

    • ContainerGroupType (PER_INSTANCE)

    • OperatingSystem

    • TotalMemoryLimitMebibytes

    • TotalVcpuLimit

    • At least one SupportContainerDefinition

      • ContainerName

      • ImageUrl

Results

If successful, this request creates a ContainerGroupDefinition resource and assigns a unique ARN value. You can update most properties of a container group definition by calling UpdateContainerGroupDefinition, and optionally save the update as a new version.

Parameter Syntax

$result = $client->createContainerGroupDefinition([
    'ContainerGroupType' => 'GAME_SERVER|PER_INSTANCE',
    'GameServerContainerDefinition' => [
        'ContainerName' => '<string>', // REQUIRED
        'DependsOn' => [
            [
                'Condition' => 'START|COMPLETE|SUCCESS|HEALTHY', // REQUIRED
                'ContainerName' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'EnvironmentOverride' => [
            [
                'Name' => '<string>', // REQUIRED
                'Value' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'ImageUri' => '<string>', // REQUIRED
        'LinuxCapabilities' => [
            'Include' => ['<string>', ...],
        ],
        'MountPoints' => [
            [
                'AccessLevel' => 'READ_ONLY|READ_AND_WRITE',
                'ContainerPath' => '<string>',
                'InstancePath' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'PortConfiguration' => [ // REQUIRED
            'ContainerPortRanges' => [ // REQUIRED
                [
                    'FromPort' => <integer>, // REQUIRED
                    'Protocol' => 'TCP|UDP', // REQUIRED
                    'ToPort' => <integer>, // REQUIRED
                ],
                // ...
            ],
        ],
        'ServerSdkVersion' => '<string>', // REQUIRED
    ],
    'Name' => '<string>', // REQUIRED
    'OperatingSystem' => 'AMAZON_LINUX_2023', // REQUIRED
    'SupportContainerDefinitions' => [
        [
            'ContainerName' => '<string>', // REQUIRED
            'DependsOn' => [
                [
                    'Condition' => 'START|COMPLETE|SUCCESS|HEALTHY', // REQUIRED
                    'ContainerName' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'EnvironmentOverride' => [
                [
                    'Name' => '<string>', // REQUIRED
                    'Value' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'Essential' => true || false,
            'HealthCheck' => [
                'Command' => ['<string>', ...], // REQUIRED
                'Interval' => <integer>,
                'Retries' => <integer>,
                'StartPeriod' => <integer>,
                'Timeout' => <integer>,
            ],
            'ImageUri' => '<string>', // REQUIRED
            'LinuxCapabilities' => [
                'Include' => ['<string>', ...],
            ],
            'MemoryHardLimitMebibytes' => <integer>,
            'MountPoints' => [
                [
                    'AccessLevel' => 'READ_ONLY|READ_AND_WRITE',
                    'ContainerPath' => '<string>',
                    'InstancePath' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'PortConfiguration' => [
                'ContainerPortRanges' => [ // REQUIRED
                    [
                        'FromPort' => <integer>, // REQUIRED
                        'Protocol' => 'TCP|UDP', // REQUIRED
                        'ToPort' => <integer>, // REQUIRED
                    ],
                    // ...
                ],
            ],
            'Vcpu' => <float>,
        ],
        // ...
    ],
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'TotalMemoryLimitMebibytes' => <integer>, // REQUIRED
    'TotalVcpuLimit' => <float>, // REQUIRED
    'VersionDescription' => '<string>',
]);

Parameter Details

Members
ContainerGroupType
Type: string

The type of container group being defined. Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.

Default value: GAME_SERVER

GameServerContainerDefinition

The definition for the game server container in this group. Define a game server container only when the container group type is GAME_SERVER. Game server containers specify a container image with your game server build. You can pass in your container definitions as a JSON file.

Name
Required: Yes
Type: string

A descriptive identifier for the container group definition. The name value must be unique in an Amazon Web Services Region.

OperatingSystem
Required: Yes
Type: string

The platform that all containers in the group use. Containers in a group must run on the same operating system.

Default value: AMAZON_LINUX_2023

Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the Amazon Linux 2 FAQs. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.

SupportContainerDefinitions
Type: Array of SupportContainerDefinitionInput structures

One or more definition for support containers in this group. You can define a support container in any type of container group. You can pass in your container definitions as a JSON file.

Tags
Type: Array of Tag structures

A list of labels to assign to the container group definition 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.

TotalMemoryLimitMebibytes
Required: Yes
Type: int

The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group share this memory. If you specify memory limits for an individual container, the total value must be greater than any individual container's memory limit.

Default value: 1024

TotalVcpuLimit
Required: Yes
Type: double

The maximum amount of vCPU units to allocate to the container group (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you specify vCPU limits for individual containers, the total value must be equal to or greater than the sum of the CPU limits for all containers in the group.

Default value: 1

VersionDescription
Type: string

A description for the initial version of this container group definition.

Result Syntax

[
    'ContainerGroupDefinition' => [
        'ContainerGroupDefinitionArn' => '<string>',
        'ContainerGroupType' => 'GAME_SERVER|PER_INSTANCE',
        'CreationTime' => <DateTime>,
        'GameServerContainerDefinition' => [
            'ContainerName' => '<string>',
            'DependsOn' => [
                [
                    'Condition' => 'START|COMPLETE|SUCCESS|HEALTHY',
                    'ContainerName' => '<string>',
                ],
                // ...
            ],
            'EnvironmentOverride' => [
                [
                    'Name' => '<string>',
                    'Value' => '<string>',
                ],
                // ...
            ],
            'ImageUri' => '<string>',
            'LinuxCapabilities' => [
                'Include' => ['<string>', ...],
            ],
            'MountPoints' => [
                [
                    'AccessLevel' => 'READ_ONLY|READ_AND_WRITE',
                    'ContainerPath' => '<string>',
                    'InstancePath' => '<string>',
                ],
                // ...
            ],
            'PortConfiguration' => [
                'ContainerPortRanges' => [
                    [
                        'FromPort' => <integer>,
                        'Protocol' => 'TCP|UDP',
                        'ToPort' => <integer>,
                    ],
                    // ...
                ],
            ],
            'ResolvedImageDigest' => '<string>',
            'ServerSdkVersion' => '<string>',
        ],
        'Name' => '<string>',
        'OperatingSystem' => 'AMAZON_LINUX_2023',
        'Status' => 'READY|COPYING|FAILED',
        'StatusReason' => '<string>',
        'SupportContainerDefinitions' => [
            [
                'ContainerName' => '<string>',
                'DependsOn' => [
                    [
                        'Condition' => 'START|COMPLETE|SUCCESS|HEALTHY',
                        'ContainerName' => '<string>',
                    ],
                    // ...
                ],
                'EnvironmentOverride' => [
                    [
                        'Name' => '<string>',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
                'Essential' => true || false,
                'HealthCheck' => [
                    'Command' => ['<string>', ...],
                    'Interval' => <integer>,
                    'Retries' => <integer>,
                    'StartPeriod' => <integer>,
                    'Timeout' => <integer>,
                ],
                'ImageUri' => '<string>',
                'LinuxCapabilities' => [
                    'Include' => ['<string>', ...],
                ],
                'MemoryHardLimitMebibytes' => <integer>,
                'MountPoints' => [
                    [
                        'AccessLevel' => 'READ_ONLY|READ_AND_WRITE',
                        'ContainerPath' => '<string>',
                        'InstancePath' => '<string>',
                    ],
                    // ...
                ],
                'PortConfiguration' => [
                    'ContainerPortRanges' => [
                        [
                            'FromPort' => <integer>,
                            'Protocol' => 'TCP|UDP',
                            'ToPort' => <integer>,
                        ],
                        // ...
                    ],
                ],
                'ResolvedImageDigest' => '<string>',
                'Vcpu' => <float>,
            ],
            // ...
        ],
        'TotalMemoryLimitMebibytes' => <integer>,
        'TotalVcpuLimit' => <float>,
        'VersionDescription' => '<string>',
        'VersionNumber' => <integer>,
    ],
]

Result Details

Members
ContainerGroupDefinition
Type: ContainerGroupDefinition structure

The properties of the new container group definition resource. You can use this resource to create a container fleet.

Errors

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

InternalServiceException:

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

InvalidRequestException:

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

LimitExceededException:

The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.

TaggingFailedException:

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

UnauthorizedException:

The client failed authentication. Clients should not retry such requests.

UnsupportedRegionException:

The requested operation is not supported in the Region specified.

CreateFleet

$result = $client->createFleet([/* ... */]);
$promise = $client->createFleetAsync([/* ... */]);

This API works with the following fleet types: EC2, Anywhere, Container

Creates a fleet of compute resources to host your game servers. Use this operation to set up a fleet for the following compute types:

Managed EC2 fleet

An EC2 fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances. Your game server build is deployed to each fleet instance. Amazon GameLift Servers manages the fleet's instances and controls the lifecycle of game server processes, which host game sessions for players. EC2 fleets can have instances in multiple locations. Each instance in the fleet is designated a Compute.

To create an EC2 fleet, provide these required parameters:

  • Either BuildId or ScriptId

  • ComputeType set to EC2 (the default value)

  • EC2InboundPermissions

  • EC2InstanceType

  • FleetType

  • Name

  • RuntimeConfiguration with at least one ServerProcesses configuration

If successful, this operation creates a new fleet resource and places it in NEW status while Amazon GameLift Servers initiates the fleet creation workflow. To debug your fleet, fetch logs, view performance metrics or other actions on the fleet, create a development fleet with port 22/3389 open. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished.

When the fleet status is ACTIVE, you can adjust capacity settings and turn autoscaling on/off for each location.

A managed fleet's runtime environment depends on the Amazon Machine Image (AMI) version it uses. When a new fleet is created, Amazon GameLift Servers assigns the latest available AMI version to the fleet, and all compute instances in that fleet are deployed with that version. To update the AMI version, you must create a new fleet. As a best practice, we recommend replacing your managed fleets every 30 days to maintain a secure and up-to-date runtime environment for your hosted game servers. For guidance, see Security best practices for Amazon GameLift Servers.

Anywhere fleet

An Anywhere fleet represents compute resources that are not owned or managed by Amazon GameLift Servers. You might create an Anywhere fleet with your local machine for testing, or use one to host game servers with on-premises hardware or other game hosting solutions.

To create an Anywhere fleet, provide these required parameters:

  • ComputeType set to ANYWHERE

  • Locations specifying a custom location

  • Name

If successful, this operation creates a new fleet resource and places it in ACTIVE status. You can register computes with a fleet in ACTIVE status.

Learn more

Setting up fleets

Debug fleet creation issues

Multi-location fleets

Parameter Syntax

$result = $client->createFleet([
    'AnywhereConfiguration' => [
        'Cost' => '<string>', // REQUIRED
    ],
    'BuildId' => '<string>',
    'CertificateConfiguration' => [
        'CertificateType' => 'DISABLED|GENERATED', // REQUIRED
    ],
    'ComputeType' => 'EC2|ANYWHERE',
    'Description' => '<string>',
    'EC2InboundPermissions' => [
        [
            'FromPort' => <integer>, // REQUIRED
            'IpRange' => '<string>', // REQUIRED
            'Protocol' => 'TCP|UDP', // REQUIRED
            'ToPort' => <integer>, // REQUIRED
        ],
        // ...
    ],
    'EC2InstanceType' => 't2.micro|t2.small|t2.medium|t2.large|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|c5.large|c5.xlarge|c5.2xlarge|c5.4xlarge|c5.9xlarge|c5.12xlarge|c5.18xlarge|c5.24xlarge|c5a.large|c5a.xlarge|c5a.2xlarge|c5a.4xlarge|c5a.8xlarge|c5a.12xlarge|c5a.16xlarge|c5a.24xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|r4.large|r4.xlarge|r4.2xlarge|r4.4xlarge|r4.8xlarge|r4.16xlarge|r5.large|r5.xlarge|r5.2xlarge|r5.4xlarge|r5.8xlarge|r5.12xlarge|r5.16xlarge|r5.24xlarge|r5a.large|r5a.xlarge|r5a.2xlarge|r5a.4xlarge|r5a.8xlarge|r5a.12xlarge|r5a.16xlarge|r5a.24xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m5.large|m5.xlarge|m5.2xlarge|m5.4xlarge|m5.8xlarge|m5.12xlarge|m5.16xlarge|m5.24xlarge|m5a.large|m5a.xlarge|m5a.2xlarge|m5a.4xlarge|m5a.8xlarge|m5a.12xlarge|m5a.16xlarge|m5a.24xlarge|c5d.large|c5d.xlarge|c5d.2xlarge|c5d.4xlarge|c5d.9xlarge|c5d.12xlarge|c5d.18xlarge|c5d.24xlarge|c6a.large|c6a.xlarge|c6a.2xlarge|c6a.4xlarge|c6a.8xlarge|c6a.12xlarge|c6a.16xlarge|c6a.24xlarge|c6i.large|c6i.xlarge|c6i.2xlarge|c6i.4xlarge|c6i.8xlarge|c6i.12xlarge|c6i.16xlarge|c6i.24xlarge|r5d.large|r5d.xlarge|r5d.2xlarge|r5d.4xlarge|r5d.8xlarge|r5d.12xlarge|r5d.16xlarge|r5d.24xlarge|m6g.medium|m6g.large|m6g.xlarge|m6g.2xlarge|m6g.4xlarge|m6g.8xlarge|m6g.12xlarge|m6g.16xlarge|c6g.medium|c6g.large|c6g.xlarge|c6g.2xlarge|c6g.4xlarge|c6g.8xlarge|c6g.12xlarge|c6g.16xlarge|r6g.medium|r6g.large|r6g.xlarge|r6g.2xlarge|r6g.4xlarge|r6g.8xlarge|r6g.12xlarge|r6g.16xlarge|c6gn.medium|c6gn.large|c6gn.xlarge|c6gn.2xlarge|c6gn.4xlarge|c6gn.8xlarge|c6gn.12xlarge|c6gn.16xlarge|c7g.medium|c7g.large|c7g.xlarge|c7g.2xlarge|c7g.4xlarge|c7g.8xlarge|c7g.12xlarge|c7g.16xlarge|r7g.medium|r7g.large|r7g.xlarge|r7g.2xlarge|r7g.4xlarge|r7g.8xlarge|r7g.12xlarge|r7g.16xlarge|m7g.medium|m7g.large|m7g.xlarge|m7g.2xlarge|m7g.4xlarge|m7g.8xlarge|m7g.12xlarge|m7g.16xlarge|g5g.xlarge|g5g.2xlarge|g5g.4xlarge|g5g.8xlarge|g5g.16xlarge|r6i.large|r6i.xlarge|r6i.2xlarge|r6i.4xlarge|r6i.8xlarge|r6i.12xlarge|r6i.16xlarge|c6gd.medium|c6gd.large|c6gd.xlarge|c6gd.2xlarge|c6gd.4xlarge|c6gd.8xlarge|c6gd.12xlarge|c6gd.16xlarge|c6in.large|c6in.xlarge|c6in.2xlarge|c6in.4xlarge|c6in.8xlarge|c6in.12xlarge|c6in.16xlarge|c7a.medium|c7a.large|c7a.xlarge|c7a.2xlarge|c7a.4xlarge|c7a.8xlarge|c7a.12xlarge|c7a.16xlarge|c7gd.medium|c7gd.large|c7gd.xlarge|c7gd.2xlarge|c7gd.4xlarge|c7gd.8xlarge|c7gd.12xlarge|c7gd.16xlarge|c7gn.medium|c7gn.large|c7gn.xlarge|c7gn.2xlarge|c7gn.4xlarge|c7gn.8xlarge|c7gn.12xlarge|c7gn.16xlarge|c7i.large|c7i.xlarge|c7i.2xlarge|c7i.4xlarge|c7i.8xlarge|c7i.12xlarge|c7i.16xlarge|m6a.large|m6a.xlarge|m6a.2xlarge|m6a.4xlarge|m6a.8xlarge|m6a.12xlarge|m6a.16xlarge|m6gd.medium|m6gd.large|m6gd.xlarge|m6gd.2xlarge|m6gd.4xlarge|m6gd.8xlarge|m6gd.12xlarge|m6gd.16xlarge|m6i.large|m6i.xlarge|m6i.2xlarge|m6i.4xlarge|m6i.8xlarge|m6i.12xlarge|m6i.16xlarge|m7a.medium|m7a.large|m7a.xlarge|m7a.2xlarge|m7a.4xlarge|m7a.8xlarge|m7a.12xlarge|m7a.16xlarge|m7gd.medium|m7gd.large|m7gd.xlarge|m7gd.2xlarge|m7gd.4xlarge|m7gd.8xlarge|m7gd.12xlarge|m7gd.16xlarge|m7i.large|m7i.xlarge|m7i.2xlarge|m7i.4xlarge|m7i.8xlarge|m7i.12xlarge|m7i.16xlarge|r6gd.medium|r6gd.large|r6gd.xlarge|r6gd.2xlarge|r6gd.4xlarge|r6gd.8xlarge|r6gd.12xlarge|r6gd.16xlarge|r7a.medium|r7a.large|r7a.xlarge|r7a.2xlarge|r7a.4xlarge|r7a.8xlarge|r7a.12xlarge|r7a.16xlarge|r7gd.medium|r7gd.large|r7gd.xlarge|r7gd.2xlarge|r7gd.4xlarge|r7gd.8xlarge|r7gd.12xlarge|r7gd.16xlarge|r7i.large|r7i.xlarge|r7i.2xlarge|r7i.4xlarge|r7i.8xlarge|r7i.12xlarge|r7i.16xlarge|r7i.24xlarge|r7i.48xlarge|c5ad.large|c5ad.xlarge|c5ad.2xlarge|c5ad.4xlarge|c5ad.8xlarge|c5ad.12xlarge|c5ad.16xlarge|c5ad.24xlarge|c5n.large|c5n.xlarge|c5n.2xlarge|c5n.4xlarge|c5n.9xlarge|c5n.18xlarge|r5ad.large|r5ad.xlarge|r5ad.2xlarge|r5ad.4xlarge|r5ad.8xlarge|r5ad.12xlarge|r5ad.16xlarge|r5ad.24xlarge|c6id.large|c6id.xlarge|c6id.2xlarge|c6id.4xlarge|c6id.8xlarge|c6id.12xlarge|c6id.16xlarge|c6id.24xlarge|c6id.32xlarge|c8g.medium|c8g.large|c8g.xlarge|c8g.2xlarge|c8g.4xlarge|c8g.8xlarge|c8g.12xlarge|c8g.16xlarge|c8g.24xlarge|c8g.48xlarge|m5ad.large|m5ad.xlarge|m5ad.2xlarge|m5ad.4xlarge|m5ad.8xlarge|m5ad.12xlarge|m5ad.16xlarge|m5ad.24xlarge|m5d.large|m5d.xlarge|m5d.2xlarge|m5d.4xlarge|m5d.8xlarge|m5d.12xlarge|m5d.16xlarge|m5d.24xlarge|m5dn.large|m5dn.xlarge|m5dn.2xlarge|m5dn.4xlarge|m5dn.8xlarge|m5dn.12xlarge|m5dn.16xlarge|m5dn.24xlarge|m5n.large|m5n.xlarge|m5n.2xlarge|m5n.4xlarge|m5n.8xlarge|m5n.12xlarge|m5n.16xlarge|m5n.24xlarge|m6id.large|m6id.xlarge|m6id.2xlarge|m6id.4xlarge|m6id.8xlarge|m6id.12xlarge|m6id.16xlarge|m6id.24xlarge|m6id.32xlarge|m6idn.large|m6idn.xlarge|m6idn.2xlarge|m6idn.4xlarge|m6idn.8xlarge|m6idn.12xlarge|m6idn.16xlarge|m6idn.24xlarge|m6idn.32xlarge|m6in.large|m6in.xlarge|m6in.2xlarge|m6in.4xlarge|m6in.8xlarge|m6in.12xlarge|m6in.16xlarge|m6in.24xlarge|m6in.32xlarge|m8g.medium|m8g.large|m8g.xlarge|m8g.2xlarge|m8g.4xlarge|m8g.8xlarge|m8g.12xlarge|m8g.16xlarge|m8g.24xlarge|m8g.48xlarge|r5dn.large|r5dn.xlarge|r5dn.2xlarge|r5dn.4xlarge|r5dn.8xlarge|r5dn.12xlarge|r5dn.16xlarge|r5dn.24xlarge|r5n.large|r5n.xlarge|r5n.2xlarge|r5n.4xlarge|r5n.8xlarge|r5n.12xlarge|r5n.16xlarge|r5n.24xlarge|r6a.large|r6a.xlarge|r6a.2xlarge|r6a.4xlarge|r6a.8xlarge|r6a.12xlarge|r6a.16xlarge|r6a.24xlarge|r6a.32xlarge|r6a.48xlarge|r6id.large|r6id.xlarge|r6id.2xlarge|r6id.4xlarge|r6id.8xlarge|r6id.12xlarge|r6id.16xlarge|r6id.24xlarge|r6id.32xlarge|r6idn.large|r6idn.xlarge|r6idn.2xlarge|r6idn.4xlarge|r6idn.8xlarge|r6idn.12xlarge|r6idn.16xlarge|r6idn.24xlarge|r6idn.32xlarge|r6in.large|r6in.xlarge|r6in.2xlarge|r6in.4xlarge|r6in.8xlarge|r6in.12xlarge|r6in.16xlarge|r6in.24xlarge|r6in.32xlarge|r8g.medium|r8g.large|r8g.xlarge|r8g.2xlarge|r8g.4xlarge|r8g.8xlarge|r8g.12xlarge|r8g.16xlarge|r8g.24xlarge|r8g.48xlarge|m4.16xlarge|c6a.32xlarge|c6a.48xlarge|c6i.32xlarge|r6i.24xlarge|r6i.32xlarge|c6in.24xlarge|c6in.32xlarge|c7a.24xlarge|c7a.32xlarge|c7a.48xlarge|c7i.24xlarge|c7i.48xlarge|m6a.24xlarge|m6a.32xlarge|m6a.48xlarge|m6i.24xlarge|m6i.32xlarge|m7a.24xlarge|m7a.32xlarge|m7a.48xlarge|m7i.24xlarge|m7i.48xlarge|r7a.24xlarge|r7a.32xlarge|r7a.48xlarge|c8a.medium|c8a.large|c8a.xlarge|c8a.2xlarge|c8i.large|c8i.xlarge|c8i.2xlarge|c9g.medium|c9g.large|c9g.xlarge|c9g.2xlarge|m8a.medium|m8a.large|m8a.xlarge|m8a.2xlarge|m8i.large|m8i.xlarge|m8i.2xlarge|m9g.large|m9g.xlarge|m9g.2xlarge',
    'FleetType' => 'ON_DEMAND|SPOT',
    'InstanceRoleArn' => '<string>',
    'InstanceRoleCredentialsProvider' => 'SHARED_CREDENTIAL_FILE',
    'Locations' => [
        [
            'Location' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'LogPaths' => ['<string>', ...],
    'MetricGroups' => ['<string>', ...],
    'Name' => '<string>', // REQUIRED
    'NewGameSessionProtectionPolicy' => 'NoProtection|FullProtection',
    'PeerVpcAwsAccountId' => '<string>',
    'PeerVpcId' => '<string>',
    'PlayerGatewayConfiguration' => [
        'GameServerIpProtocolSupported' => 'IPv4|DUAL_STACK',
    ],
    'PlayerGatewayMode' => 'DISABLED|ENABLED|REQUIRED',
    'ResourceCreationLimitPolicy' => [
        'NewGameSessionsPerCreator' => <integer>,
        'PolicyPeriodInMinutes' => <integer>,
    ],
    'RuntimeConfiguration' => [
        'GameSessionActivationTimeoutSeconds' => <integer>,
        'MaxConcurrentGameSessionActivations' => <integer>,
        'ServerProcesses' => [
            [
                'ConcurrentExecutions' => <integer>, // REQUIRED
                'LaunchPath' => '<string>', // REQUIRED
                'Parameters' => '<string>',
            ],
            // ...
        ],
    ],
    'ScriptId' => '<string>',
    'ServerLaunchParameters' => '<string>',
    'ServerLaunchPath' => '<string>',
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
AnywhereConfiguration
Type: AnywhereConfiguration structure

Amazon GameLift Servers Anywhere configuration options.

BuildId
Type: string

The unique identifier for a custom game server build to be deployed to a fleet with compute type EC2. You can use either the build ID or ARN. The build must be uploaded to Amazon GameLift Servers and in READY status. This fleet property can't be changed after the fleet is created.

CertificateConfiguration
Type: CertificateConfiguration structure

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

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

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.

ComputeType
Type: string

The type of compute resource used to host your game servers.

  • EC2 – The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting.

  • ANYWHERE – Game servers and supporting software are deployed to compute resources that you provide and manage. With this compute type, you can also set the AnywhereConfiguration parameter.

Description
Type: string

A description for the fleet.

EC2InboundPermissions
Type: Array of IpPermission structures

The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. Set this parameter for managed EC2 fleets. You can leave this parameter empty when creating the fleet, but you must call https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings to set it before players can connect to game sessions. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished. For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically sets TCP and UDP ranges.

EC2InstanceType
Type: string

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

FleetType
Type: string

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

InstanceRoleArn
Type: string

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

InstanceRoleCredentialsProvider
Type: string

Prompts Amazon GameLift Servers to generate a shared credentials file for the IAM role that's defined in InstanceRoleArn. The shared credentials file is stored on each fleet instance and refreshed as needed. Use shared credentials for applications that are deployed along with the game server executable, if the game server is integrated with server SDK version 5.x. For more information about using shared credentials, see Communicate with other Amazon Web Services resources from your fleets.

Locations
Type: Array of LocationConfiguration structures

A set of remote locations to deploy additional instances to and manage as a multi-location fleet. Use this parameter when creating a fleet in Amazon Web Services Regions that support multiple locations. You can add any Amazon Web Services Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more Amazon Web Services Region codes, such as us-west-2, or Local Zone names. When using this parameter, Amazon GameLift Servers requires you to include your home location in the request. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.

LogPaths
Type: Array of strings

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

MetricGroups
Type: Array of strings

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.

Name
Required: Yes
Type: string

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

NewGameSessionProtectionPolicy
Type: string

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

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

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

PeerVpcAwsAccountId
Type: string

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

PeerVpcId
Type: string

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

PlayerGatewayConfiguration
Type: PlayerGatewayConfiguration structure

Configuration settings for player gateway. Use this to specify advanced options for how player gateway handles connections.

PlayerGatewayMode
Type: string

Configures player gateway for your fleet. Player gateway provides benefits such as DDoS protection by rate limiting and validating traffic before it reaches game servers, hiding game server IP addresses from players, and providing updated endpoints when relay endpoints become unhealthy. Note, player gateway is only available for fleets using server SDK 5.x or later game server builds.

How it works: When enabled, game clients connect to relay endpoints instead of to your game servers. Player gateway validates player gateway tokens and routes traffic to the appropriate game server. Your game backend calls GetPlayerConnectionDetails to retrieve relay endpoints and player gateway tokens for your game clients. To learn more about this topic, see DDoS protection with Amazon GameLift Servers player gateway.

Possible values include:

  • DISABLED (default) -- Game clients connect to the game server endpoint. Use this when you do not intend to integrate your game with player gateway.

  • ENABLED -- Player gateway is available in fleet locations where it is supported. Your game backend can call GetPlayerConnectionDetails to obtain a player gateway token and endpoints for game clients.

  • REQUIRED -- Player gateway is available in fleet locations where it is supported, and the fleet can only use locations that support this feature. Attempting to add a remote location to your fleet which does not support player gateway will result in an InvalidRequestException.

ResourceCreationLimitPolicy
Type: ResourceCreationLimitPolicy structure

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.

RuntimeConfiguration
Type: RuntimeConfiguration structure

Instructions for how to launch and run server processes on the fleet. Set runtime configuration for managed EC2 fleets. For an Anywhere fleets, set this parameter only if the fleet is running the Amazon GameLift Servers Agent. The runtime configuration defines one or more server process configurations. Each server process identifies a game executable or Realtime script file and the number of processes to run concurrently.

This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters, which are still supported for backward compatibility.

ScriptId
Type: string

The unique identifier for a Realtime configuration script to be deployed to a fleet with compute type EC2. You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift Servers prior to creating the fleet. This fleet property can't be changed after the fleet is created.

ServerLaunchParameters
Type: string

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

ServerLaunchPath
Type: string

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

Tags
Type: Array of Tag structures

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.

Result Syntax

[
    'FleetAttributes' => [
        'AnywhereConfiguration' => [
            'Cost' => '<string>',
        ],
        'BuildArn' => '<string>',
        'BuildId' => '<string>',
        'CertificateConfiguration' => [
            'CertificateType' => 'DISABLED|GENERATED',
        ],
        'ComputeType' => 'EC2|ANYWHERE',
        'CreationTime' => <DateTime>,
        'Description' => '<string>',
        'FleetArn' => '<string>',
        'FleetId' => '<string>',
        'FleetType' => 'ON_DEMAND|SPOT',
        'InstanceRoleArn' => '<string>',
        'InstanceRoleCredentialsProvider' => 'SHARED_CREDENTIAL_FILE',
        'InstanceType' => 't2.micro|t2.small|t2.medium|t2.large|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|c5.large|c5.xlarge|c5.2xlarge|c5.4xlarge|c5.9xlarge|c5.12xlarge|c5.18xlarge|c5.24xlarge|c5a.large|c5a.xlarge|c5a.2xlarge|c5a.4xlarge|c5a.8xlarge|c5a.12xlarge|c5a.16xlarge|c5a.24xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|r4.large|r4.xlarge|r4.2xlarge|r4.4xlarge|r4.8xlarge|r4.16xlarge|r5.large|r5.xlarge|r5.2xlarge|r5.4xlarge|r5.8xlarge|r5.12xlarge|r5.16xlarge|r5.24xlarge|r5a.large|r5a.xlarge|r5a.2xlarge|r5a.4xlarge|r5a.8xlarge|r5a.12xlarge|r5a.16xlarge|r5a.24xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m5.large|m5.xlarge|m5.2xlarge|m5.4xlarge|m5.8xlarge|m5.12xlarge|m5.16xlarge|m5.24xlarge|m5a.large|m5a.xlarge|m5a.2xlarge|m5a.4xlarge|m5a.8xlarge|m5a.12xlarge|m5a.16xlarge|m5a.24xlarge|c5d.large|c5d.xlarge|c5d.2xlarge|c5d.4xlarge|c5d.9xlarge|c5d.12xlarge|c5d.18xlarge|c5d.24xlarge|c6a.large|c6a.xlarge|c6a.2xlarge|c6a.4xlarge|c6a.8xlarge|c6a.12xlarge|c6a.16xlarge|c6a.24xlarge|c6i.large|c6i.xlarge|c6i.2xlarge|c6i.4xlarge|c6i.8xlarge|c6i.12xlarge|c6i.16xlarge|c6i.24xlarge|r5d.large|r5d.xlarge|r5d.2xlarge|r5d.4xlarge|r5d.8xlarge|r5d.12xlarge|r5d.16xlarge|r5d.24xlarge|m6g.medium|m6g.large|m6g.xlarge|m6g.2xlarge|m6g.4xlarge|m6g.8xlarge|m6g.12xlarge|m6g.16xlarge|c6g.medium|c6g.large|c6g.xlarge|c6g.2xlarge|c6g.4xlarge|c6g.8xlarge|c6g.12xlarge|c6g.16xlarge|r6g.medium|r6g.large|r6g.xlarge|r6g.2xlarge|r6g.4xlarge|r6g.8xlarge|r6g.12xlarge|r6g.16xlarge|c6gn.medium|c6gn.large|c6gn.xlarge|c6gn.2xlarge|c6gn.4xlarge|c6gn.8xlarge|c6gn.12xlarge|c6gn.16xlarge|c7g.medium|c7g.large|c7g.xlarge|c7g.2xlarge|c7g.4xlarge|c7g.8xlarge|c7g.12xlarge|c7g.16xlarge|r7g.medium|r7g.large|r7g.xlarge|r7g.2xlarge|r7g.4xlarge|r7g.8xlarge|r7g.12xlarge|r7g.16xlarge|m7g.medium|m7g.large|m7g.xlarge|m7g.2xlarge|m7g.4xlarge|m7g.8xlarge|m7g.12xlarge|m7g.16xlarge|g5g.xlarge|g5g.2xlarge|g5g.4xlarge|g5g.8xlarge|g5g.16xlarge|r6i.large|r6i.xlarge|r6i.2xlarge|r6i.4xlarge|r6i.8xlarge|r6i.12xlarge|r6i.16xlarge|c6gd.medium|c6gd.large|c6gd.xlarge|c6gd.2xlarge|c6gd.4xlarge|c6gd.8xlarge|c6gd.12xlarge|c6gd.16xlarge|c6in.large|c6in.xlarge|c6in.2xlarge|c6in.4xlarge|c6in.8xlarge|c6in.12xlarge|c6in.16xlarge|c7a.medium|c7a.large|c7a.xlarge|c7a.2xlarge|c7a.4xlarge|c7a.8xlarge|c7a.12xlarge|c7a.16xlarge|c7gd.medium|c7gd.large|c7gd.xlarge|c7gd.2xlarge|c7gd.4xlarge|c7gd.8xlarge|c7gd.12xlarge|c7gd.16xlarge|c7gn.medium|c7gn.large|c7gn.xlarge|c7gn.2xlarge|c7gn.4xlarge|c7gn.8xlarge|c7gn.12xlarge|c7gn.16xlarge|c7i.large|c7i.xlarge|c7i.2xlarge|c7i.4xlarge|c7i.8xlarge|c7i.12xlarge|c7i.16xlarge|m6a.large|m6a.xlarge|m6a.2xlarge|m6a.4xlarge|m6a.8xlarge|m6a.12xlarge|m6a.16xlarge|m6gd.medium|m6gd.large|m6gd.xlarge|m6gd.2xlarge|m6gd.4xlarge|m6gd.8xlarge|m6gd.12xlarge|m6gd.16xlarge|m6i.large|m6i.xlarge|m6i.2xlarge|m6i.4xlarge|m6i.8xlarge|m6i.12xlarge|m6i.16xlarge|m7a.medium|m7a.large|m7a.xlarge|m7a.2xlarge|m7a.4xlarge|m7a.8xlarge|m7a.12xlarge|m7a.16xlarge|m7gd.medium|m7gd.large|m7gd.xlarge|m7gd.2xlarge|m7gd.4xlarge|m7gd.8xlarge|m7gd.12xlarge|m7gd.16xlarge|m7i.large|m7i.xlarge|m7i.2xlarge|m7i.4xlarge|m7i.8xlarge|m7i.12xlarge|m7i.16xlarge|r6gd.medium|r6gd.large|r6gd.xlarge|r6gd.2xlarge|r6gd.4xlarge|r6gd.8xlarge|r6gd.12xlarge|r6gd.16xlarge|r7a.medium|r7a.large|r7a.xlarge|r7a.2xlarge|r7a.4xlarge|r7a.8xlarge|r7a.12xlarge|r7a.16xlarge|r7gd.medium|r7gd.large|r7gd.xlarge|r7gd.2xlarge|r7gd.4xlarge|r7gd.8xlarge|r7gd.12xlarge|r7gd.16xlarge|r7i.large|r7i.xlarge|r7i.2xlarge|r7i.4xlarge|r7i.8xlarge|r7i.12xlarge|r7i.16xlarge|r7i.24xlarge|r7i.48xlarge|c5ad.large|c5ad.xlarge|c5ad.2xlarge|c5ad.4xlarge|c5ad.8xlarge|c5ad.12xlarge|c5ad.16xlarge|c5ad.24xlarge|c5n.large|c5n.xlarge|c5n.2xlarge|c5n.4xlarge|c5n.9xlarge|c5n.18xlarge|r5ad.large|r5ad.xlarge|r5ad.2xlarge|r5ad.4xlarge|r5ad.8xlarge|r5ad.12xlarge|r5ad.16xlarge|r5ad.24xlarge|c6id.large|c6id.xlarge|c6id.2xlarge|c6id.4xlarge|c6id.8xlarge|c6id.12xlarge|c6id.16xlarge|c6id.24xlarge|c6id.32xlarge|c8g.medium|c8g.large|c8g.xlarge|c8g.2xlarge|c8g.4xlarge|c8g.8xlarge|c8g.12xlarge|c8g.16xlarge|c8g.24xlarge|c8g.48xlarge|m5ad.large|m5ad.xlarge|m5ad.2xlarge|m5ad.4xlarge|m5ad.8xlarge|m5ad.12xlarge|m5ad.16xlarge|m5ad.24xlarge|m5d.large|m5d.xlarge|m5d.2xlarge|m5d.4xlarge|m5d.8xlarge|m5d.12xlarge|m5d.16xlarge|m5d.24xlarge|m5dn.large|m5dn.xlarge|m5dn.2xlarge|m5dn.4xlarge|m5dn.8xlarge|m5dn.12xlarge|m5dn.16xlarge|m5dn.24xlarge|m5n.large|m5n.xlarge|m5n.2xlarge|m5n.4xlarge|m5n.8xlarge|m5n.12xlarge|m5n.16xlarge|m5n.24xlarge|m6id.large|m6id.xlarge|m6id.2xlarge|m6id.4xlarge|m6id.8xlarge|m6id.12xlarge|m6id.16xlarge|m6id.24xlarge|m6id.32xlarge|m6idn.large|m6idn.xlarge|m6idn.2xlarge|m6idn.4xlarge|m6idn.8xlarge|m6idn.12xlarge|m6idn.16xlarge|m6idn.24xlarge|m6idn.32xlarge|m6in.large|m6in.xlarge|m6in.2xlarge|m6in.4xlarge|m6in.8xlarge|m6in.12xlarge|m6in.16xlarge|m6in.24xlarge|m6in.32xlarge|m8g.medium|m8g.large|m8g.xlarge|m8g.2xlarge|m8g.4xlarge|m8g.8xlarge|m8g.12xlarge|m8g.16xlarge|m8g.24xlarge|m8g.48xlarge|r5dn.large|r5dn.xlarge|r5dn.2xlarge|r5dn.4xlarge|r5dn.8xlarge|r5dn.12xlarge|r5dn.16xlarge|r5dn.24xlarge|r5n.large|r5n.xlarge|r5n.2xlarge|r5n.4xlarge|r5n.8xlarge|r5n.12xlarge|r5n.16xlarge|r5n.24xlarge|r6a.large|r6a.xlarge|r6a.2xlarge|r6a.4xlarge|r6a.8xlarge|r6a.12xlarge|r6a.16xlarge|r6a.24xlarge|r6a.32xlarge|r6a.48xlarge|r6id.large|r6id.xlarge|r6id.2xlarge|r6id.4xlarge|r6id.8xlarge|r6id.12xlarge|r6id.16xlarge|r6id.24xlarge|r6id.32xlarge|r6idn.large|r6idn.xlarge|r6idn.2xlarge|r6idn.4xlarge|r6idn.8xlarge|r6idn.12xlarge|r6idn.16xlarge|r6idn.24xlarge|r6idn.32xlarge|r6in.large|r6in.xlarge|r6in.2xlarge|r6in.4xlarge|r6in.8xlarge|r6in.12xlarge|r6in.16xlarge|r6in.24xlarge|r6in.32xlarge|r8g.medium|r8g.large|r8g.xlarge|r8g.2xlarge|r8g.4xlarge|r8g.8xlarge|r8g.12xlarge|r8g.16xlarge|r8g.24xlarge|r8g.48xlarge|m4.16xlarge|c6a.32xlarge|c6a.48xlarge|c6i.32xlarge|r6i.24xlarge|r6i.32xlarge|c6in.24xlarge|c6in.32xlarge|c7a.24xlarge|c7a.32xlarge|c7a.48xlarge|c7i.24xlarge|c7i.48xlarge|m6a.24xlarge|m6a.32xlarge|m6a.48xlarge|m6i.24xlarge|m6i.32xlarge|m7a.24xlarge|m7a.32xlarge|m7a.48xlarge|m7i.24xlarge|m7i.48xlarge|r7a.24xlarge|r7a.32xlarge|r7a.48xlarge|c8a.medium|c8a.large|c8a.xlarge|c8a.2xlarge|c8i.large|c8i.xlarge|c8i.2xlarge|c9g.medium|c9g.large|c9g.xlarge|c9g.2xlarge|m8a.medium|m8a.large|m8a.xlarge|m8a.2xlarge|m8i.large|m8i.xlarge|m8i.2xlarge|m9g.large|m9g.xlarge|m9g.2xlarge',
        'LogPaths' => ['<string>', ...],
        'MetricGroups' => ['<string>', ...],
        'Name' => '<string>',
        'NewGameSessionProtectionPolicy' => 'NoProtection|FullProtection',
        'OperatingSystem' => 'WINDOWS_2012|AMAZON_LINUX|AMAZON_LINUX_2|WINDOWS_2016|AMAZON_LINUX_2023|WINDOWS_2022',
        'PlayerGatewayConfiguration' => [
            'GameServerIpProtocolSupported' => 'IPv4|DUAL_STACK',
        ],
        'PlayerGatewayMode' => 'DISABLED|ENABLED|REQUIRED',
        'ResourceCreationLimitPolicy' => [
            'NewGameSessionsPerCreator' => <integer>,
            'PolicyPeriodInMinutes' => <integer>,
        ],
        'ScriptArn' => '<string>',
        'ScriptId' => '<string>',
        'ServerLaunchParameters' => '<string>',
        'ServerLaunchPath' => '<string>',
        'Status' => 'NEW|DOWNLOADING|VALIDATING|BUILDING|ACTIVATING|ACTIVE|DELETING|ERROR|TERMINATED|NOT_FOUND|EXPIRED',
        'StoppedActions' => ['<string>', ...],
        'TerminationTime' => <DateTime>,
    ],
    'LocationStates' => [
        [
            'Location' => '<string>',
            'PlayerGatewayStatus' => 'DISABLED|ENABLED',
            'Status' => 'NEW|DOWNLOADING|VALIDATING|BUILDING|ACTIVATING|ACTIVE|DELETING|ERROR|TERMINATED|NOT_FOUND|EXPIRED',
        ],
        // ...
    ],
]

Result Details

Members
FleetAttributes
Type: FleetAttributes structure

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

LocationStates
Type: Array of LocationState structures

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

Errors

InternalServiceException:

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

NotFoundException:

The requested resource was not found. The resource was either not created yet or deleted.

NotReadyException:

The operation failed because Amazon GameLift Servers has not yet finished validating this compute. We recommend attempting 8 to 10 retries over 3 to 5 minutes with exponential backoffs and jitter.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

LimitExceededException:

The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.

InvalidRequestException:

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

UnauthorizedException:

The client failed authentication. Clients should not retry such requests.

TaggingFailedException:

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

UnsupportedRegionException:

The requested operation is not supported in the Region specified.

CreateFleetLocations

$result = $client->createFleetLocations([/* ... */]);
$promise = $client->createFleetLocationsAsync([/* ... */]);

This API works with the following fleet types: EC2, Anywhere, Container

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