Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a new fleet to run your game servers. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple server processes to host game sessions. You configure a fleet to create instances with certain hardware specifications (see Amazon EC2 Instance Types for more information), and deploy a specified game build to each instance. A newly created fleet passes through several statuses; once it reaches the ACTIVE
status, it can begin hosting game sessions.
To create a new fleet, provide a fleet name, an EC2 instance type, and a build ID of the game build to deploy. You can also configure the new fleet with the following settings: (1) a runtime configuration describing what server processes to run on each instance in the fleet (required to create fleet), (2) access permissions for inbound traffic, (3) fleet-wide game session protection, and (4) the location of default log files for GameLift to upload and store.
If the CreateFleet
call is successful, Amazon GameLift performs the following tasks:
- Creates a fleet record and sets the status to
NEW
(followed by other statuses as the fleet is activated). - Sets the fleet's capacity to 1 "desired", which causes GameLift to start one new EC2 instance.
- Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, GameLift staggers each launch by a few seconds.
- Begins writing events to the fleet event log, which can be accessed in the GameLift console.
- Sets the fleet's status to
ACTIVE
once one server process in the fleet is ready to host a game session.
After a fleet is created, use the following actions to change fleet properties and configuration:
- UpdateFleetAttributes -- Update fleet metadata, including name and description.
- UpdateFleetCapacity -- Increase or decrease the number of instances you want the fleet to maintain.
- UpdateFleetPortSettings -- Change the IP address and port ranges that allow access to incoming traffic.
- UpdateRuntimeConfiguration -- Change how server processes are launched in the fleet, including launch path, launch parameters, and the number of concurrent processes.
- createFleet :: Text -> Text -> EC2InstanceType -> CreateFleet
- data CreateFleet
- cfServerLaunchParameters :: Lens' CreateFleet (Maybe Text)
- cfLogPaths :: Lens' CreateFleet [Text]
- cfEC2InboundPermissions :: Lens' CreateFleet [IPPermission]
- cfRuntimeConfiguration :: Lens' CreateFleet (Maybe RuntimeConfiguration)
- cfNewGameSessionProtectionPolicy :: Lens' CreateFleet (Maybe ProtectionPolicy)
- cfServerLaunchPath :: Lens' CreateFleet (Maybe Text)
- cfDescription :: Lens' CreateFleet (Maybe Text)
- cfName :: Lens' CreateFleet Text
- cfBuildId :: Lens' CreateFleet Text
- cfEC2InstanceType :: Lens' CreateFleet EC2InstanceType
- createFleetResponse :: Int -> CreateFleetResponse
- data CreateFleetResponse
- cfrsFleetAttributes :: Lens' CreateFleetResponse (Maybe FleetAttributes)
- cfrsResponseStatus :: Lens' CreateFleetResponse Int
Creating a Request
Creates a value of CreateFleet
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreateFleet Source #
Represents the input for a request action.
See: createFleet
smart constructor.
Request Lenses
cfServerLaunchParameters :: Lens' CreateFleet (Maybe Text) Source #
This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration
parameter. (Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.)
cfLogPaths :: Lens' CreateFleet [Text] Source #
Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide. If no default log path for a fleet is specified, GameLift will automatically upload logs stored on each instance at 'C:\\game\\logs'. Use the GameLift console to access stored logs.
cfEC2InboundPermissions :: Lens' CreateFleet [IPPermission] Source #
Range of IP addresses and port settings that permit inbound traffic to access server processes running on the fleet. If no inbound permissions are set, including both IP address range and port range, the server processes in the fleet cannot accept connections. You can specify one or more sets of permissions for a fleet.
cfRuntimeConfiguration :: Lens' CreateFleet (Maybe RuntimeConfiguration) Source #
Instructions for launching server processes on each instance in the fleet. The runtime configuration for a fleet has a collection of server process configurations, one for each type of server process to run on an instance. A server process configuration specifies the location of the server executable, launch parameters, and the number of concurrent processes with that configuration to maintain on each instance. A CreateFleet
request must include a runtime configuration with at least one server process configuration; otherwise the request will fail with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath
and ServerLaunchParameters
; requests that contain values for these parameters instead of a runtime configuration will continue to work.)
cfNewGameSessionProtectionPolicy :: Lens' CreateFleet (Maybe ProtectionPolicy) Source #
Game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using UpdateFleetAttributes, but this change will only affect sessions created after the policy change. You can also set protection for individual instances using UpdateGameSession.
- NoProtection – The game session can be terminated during a scale-down event.
- FullProtection – If the game session is in an
ACTIVE
status, it cannot be terminated during a scale-down event.
cfServerLaunchPath :: Lens' CreateFleet (Maybe Text) Source #
This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration
parameter. (Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.)
cfDescription :: Lens' CreateFleet (Maybe Text) Source #
Human-readable description of a fleet.
cfName :: Lens' CreateFleet Text Source #
Descriptive label associated with a fleet. Fleet names do not need to be unique.
cfBuildId :: Lens' CreateFleet Text Source #
Unique identifier of the build to be deployed on the new fleet. The build must have been successfully uploaded to GameLift and be in a READY
status. This fleet setting cannot be changed once the fleet is created.
cfEC2InstanceType :: Lens' CreateFleet EC2InstanceType Source #
Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.
Destructuring the Response
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:
data CreateFleetResponse Source #
Represents the returned data in response to a request action.
See: createFleetResponse
smart constructor.
Response Lenses
cfrsFleetAttributes :: Lens' CreateFleetResponse (Maybe FleetAttributes) Source #
Properties for the newly created fleet.
cfrsResponseStatus :: Lens' CreateFleetResponse Int Source #
The response status code.