amazonka-gamelift-1.4.0: Amazon GameLift SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.GameLift.CreateFleet

Contents

Description

Creates a new fleet to host game servers. A fleet consists of a set of Amazon Elastic Compute Cloud (Amazon EC2) instances of a certain type, which defines the CPU, memory, storage, and networking capacity of each host in the fleet. See Amazon EC2 Instance Types for more information. Each instance in the fleet hosts a game server created from the specified game build. Once a fleet is in an ACTIVE state, it can begin hosting game sessions.

To create a new fleet, provide a name and the EC2 instance type for the new fleet, and specify the build and server launch path. Builds must be in a READY state before they can be used to build fleets. When configuring the new fleet, you can optionally (1) provide a set of launch parameters to be passed to a game server when activated; (2) limit incoming traffic to a specified range of IP addresses and port numbers; (3) set game session protection for all instances in the fleet, and (4) configure Amazon GameLift to store game session logs by specifying the path to the logs stored in your game server files. If the call is successful, Amazon GameLift performs the following tasks:

  • Creates a fleet record and sets the state to NEW.
  • Sets the fleet's capacity to 1 "desired" and 1 "active" EC2 instance count.
  • Creates an EC2 instance and begins the process of initializing the fleet and activating a game server on the instance.
  • Begins writing events to the fleet event log, which can be accessed in the GameLift console.

Once a fleet is created, use the following actions to change certain fleet properties (server launch parameters and log paths cannot be changed):

Synopsis

Creating a Request

Request Lenses

cfServerLaunchParameters :: Lens' CreateFleet (Maybe Text) Source

Parameters required to launch your game server. These parameters should be expressed as a string of command-line parameters. Example: "+sv_port 33435 +start_lobby".

cfLogPaths :: Lens' CreateFleet [Text] Source

Path to game-session log files generated by your game server. Once a game session has been terminated, Amazon GameLift captures and stores the logs on Amazon S3. Use the GameLift console to access the stored logs.

cfEC2InboundPermissions :: Lens' CreateFleet [IPPermission] Source

Access limits for incoming traffic. Setting these values limits game server access to incoming traffic using specified IP ranges and port numbers. Some ports in a range may be restricted. You can provide one or more sets of permissions for the fleet.

cfNewGameSessionProtectionPolicy :: Lens' CreateFleet (Maybe ProtectionPolicy) Source

Game session protection policy to apply to all instances created in this fleet. If this parameter is not set, new instances in this fleet will default to no protection. Protection can be set for individual instances using UpdateGameSession.

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

cfDescription :: Lens' CreateFleet (Maybe Text) Source

Human-readable description of the fleet.

cfName :: Lens' CreateFleet Text Source

Descriptive label associated with this fleet. Fleet names do not need to be unique.

cfBuildId :: Lens' CreateFleet Text Source

Unique identifier for the build you want the new fleet to use.

cfServerLaunchPath :: Lens' CreateFleet Text Source

Path to the launch executable for the game server. A game server is built into a 'C:\\game' drive. This value must be expressed as 'C:\game\[launchpath]'. Example: If, when built, your game server files are in a folder called "MyGame", your log path should be 'C:\\game\\MyGame\\server.exe'.

cfEC2InstanceType :: Lens' CreateFleet EC2InstanceType Source

Type of EC2 instances used in the fleet. EC2 instance types define the CPU, memory, storage, and networking capacity of the fleetaposs hosts. Amazon GameLift supports the EC2 instance types listed below. See Amazon EC2 Instance Types for detailed descriptions of each.

Destructuring the Response

createFleetResponse Source

Creates a value of CreateFleetResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

cfrsFleetAttributes :: Lens' CreateFleetResponse (Maybe FleetAttributes) Source

Properties for the newly created fleet.