amazonka-gamelift-1.6.0: Amazon GameLift SDK.

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

Network.AWS.GameLift.CreateFleet

Contents

Description

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 set up a fleet to use instances with certain hardware specifications (see Amazon EC2 Instance Types for more information), and deploy your game build to run on each instance.

To create a new fleet, you must specify the following: (1) a fleet name, (2) the build ID of a successfully uploaded game build, (3) an EC2 instance type, and (4) a run-time configuration, which describes the server processes to run on each instance in the fleet. If you don't specify a fleet type (on-demand or spot), the new fleet uses on-demand instances by default.

You can also configure the new fleet with the following settings:

If you use Amazon CloudWatch for metrics, you can add the new fleet to a metric group. By adding multiple fleets to a metric group, you can view aggregated metrics for all the fleets in the group.

If the CreateFleet call is successful, Amazon GameLift performs the following tasks. You can track the process of a fleet by checking the fleet status or by monitoring fleet creation events:

  • Creates a fleet record. Status: NEW .
  • Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console.

Sets the fleet's target capacity to 1 (desired instances), which triggers Amazon GameLift to start one new EC2 instance.

  • Downloads the game build to the new instance and installs it. Statuses: DOWNLOADING , VALIDATING , BUILDING .
  • Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, Amazon GameLift staggers each launch by a few seconds. Status: ACTIVATING .
  • Sets the fleet's status to ACTIVE as soon as one server process is ready to host a game session.

Fleet-related operations include:

  • CreateFleet
  • ListFleets
  • DeleteFleet
  • Describe fleets:
  • DescribeFleetAttributes
  • DescribeFleetCapacity
  • DescribeFleetPortSettings
  • DescribeFleetUtilization
  • DescribeRuntimeConfiguration
  • DescribeEC2InstanceLimits
  • DescribeFleetEvents
  • Update fleets:
  • UpdateFleetAttributes
  • UpdateFleetCapacity
  • UpdateFleetPortSettings
  • UpdateRuntimeConfiguration
  • Manage fleet actions:
  • StartFleetActions
  • StopFleetActions

Synopsis

Creating a Request

createFleet Source #

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:

  • cfServerLaunchParameters - This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)
  • cfLogPaths - This parameter is no longer used. Instead, to specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API ProcessReady() and specify one or more directory paths in logParameters . See more information in the Server API Reference .
  • cfPeerVPCId - Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.
  • cfFleetType - Indicates whether to use on-demand instances or spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations, based on the instance type selected for this fleet. You can acquire on-demand instances at any time for a fixed price and keep them as long as you need them. Spot instances have lower prices, but spot pricing is variable, and while in use they can be interrupted (with a two-minute notification). Learn more about Amazon GameLift spot instances with at Choose Computing Resources .
  • cfPeerVPCAWSAccountId - Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.
  • cfEC2InboundPermissions - 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 - Instructions for launching server processes on each instance in the fleet. The run-time 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 run-time configuration with at least one server process configuration; otherwise the request fails with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters ; requests that contain values for these parameters instead of a run-time configuration will continue to work.)
  • cfNewGameSessionProtectionPolicy - 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 - This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)
  • cfMetricGroups - Name of a metric group to add this fleet to. A metric group tracks metrics across all fleets in the group. Use an existing metric group name to add this fleet to the group, or use a new name to create a new metric group. A fleet can only be included in one metric group at a time.
  • cfDescription - Human-readable description of a fleet.
  • cfResourceCreationLimitPolicy - Policy that limits the number of game sessions an individual player can create over a span of time for this fleet.
  • cfName - Descriptive label that is associated with a fleet. Fleet names do not need to be unique.
  • cfBuildId - Unique identifier for a build to be deployed on the new fleet. The build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.
  • cfEC2InstanceType - Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

data CreateFleet Source #

Represents the input for a request action.

See: createFleet smart constructor.

Instances

Eq CreateFleet Source # 
Data CreateFleet Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateFleet -> c CreateFleet #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateFleet #

toConstr :: CreateFleet -> Constr #

dataTypeOf :: CreateFleet -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateFleet) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateFleet) #

gmapT :: (forall b. Data b => b -> b) -> CreateFleet -> CreateFleet #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleet -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleet -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateFleet -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateFleet -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateFleet -> m CreateFleet #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleet -> m CreateFleet #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleet -> m CreateFleet #

Read CreateFleet Source # 
Show CreateFleet Source # 
Generic CreateFleet Source # 

Associated Types

type Rep CreateFleet :: * -> * #

Hashable CreateFleet Source # 
ToJSON CreateFleet Source # 
NFData CreateFleet Source # 

Methods

rnf :: CreateFleet -> () #

AWSRequest CreateFleet Source # 
ToHeaders CreateFleet Source # 

Methods

toHeaders :: CreateFleet -> [Header] #

ToPath CreateFleet Source # 
ToQuery CreateFleet Source # 
type Rep CreateFleet Source # 
type Rep CreateFleet = D1 * (MetaData "CreateFleet" "Network.AWS.GameLift.CreateFleet" "amazonka-gamelift-1.6.0-DeAosbEJJf8D8cv8ebS5Uv" False) (C1 * (MetaCons "CreateFleet'" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cfServerLaunchParameters") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfLogPaths") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [Text]))) (S1 * (MetaSel (Just Symbol "_cfPeerVPCId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cfFleetType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe FleetType))) (S1 * (MetaSel (Just Symbol "_cfPeerVPCAWSAccountId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfEC2InboundPermissions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [IPPermission]))) (S1 * (MetaSel (Just Symbol "_cfRuntimeConfiguration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe RuntimeConfiguration)))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cfNewGameSessionProtectionPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe ProtectionPolicy))) (S1 * (MetaSel (Just Symbol "_cfServerLaunchPath") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfMetricGroups") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [Text]))) (S1 * (MetaSel (Just Symbol "_cfDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cfResourceCreationLimitPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe ResourceCreationLimitPolicy))) (S1 * (MetaSel (Just Symbol "_cfName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfBuildId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cfEC2InstanceType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * EC2InstanceType)))))))
type Rs CreateFleet Source # 

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 run-time configuration will continue to work.)

cfLogPaths :: Lens' CreateFleet [Text] Source #

This parameter is no longer used. Instead, to specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API ProcessReady() and specify one or more directory paths in logParameters . See more information in the Server API Reference .

cfPeerVPCId :: Lens' CreateFleet (Maybe Text) Source #

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.

cfFleetType :: Lens' CreateFleet (Maybe FleetType) Source #

Indicates whether to use on-demand instances or spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations, based on the instance type selected for this fleet. You can acquire on-demand instances at any time for a fixed price and keep them as long as you need them. Spot instances have lower prices, but spot pricing is variable, and while in use they can be interrupted (with a two-minute notification). Learn more about Amazon GameLift spot instances with at Choose Computing Resources .

cfPeerVPCAWSAccountId :: Lens' CreateFleet (Maybe Text) Source #

Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.

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 run-time 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 run-time configuration with at least one server process configuration; otherwise the request fails with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters ; requests that contain values for these parameters instead of a run-time 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 run-time configuration will continue to work.)

cfMetricGroups :: Lens' CreateFleet [Text] Source #

Name of a metric group to add this fleet to. A metric group tracks metrics across all fleets in the group. Use an existing metric group name to add this fleet to the group, or use a new name to create a new metric group. A fleet can only be included in one metric group at a time.

cfDescription :: Lens' CreateFleet (Maybe Text) Source #

Human-readable description of a fleet.

cfResourceCreationLimitPolicy :: Lens' CreateFleet (Maybe ResourceCreationLimitPolicy) Source #

Policy that limits the number of game sessions an individual player can create over a span of time for this fleet.

cfName :: Lens' CreateFleet Text Source #

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

cfBuildId :: Lens' CreateFleet Text Source #

Unique identifier for a build to be deployed on the new fleet. The build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.

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. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

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:

data CreateFleetResponse Source #

Represents the returned data in response to a request action.

See: createFleetResponse smart constructor.

Instances

Eq CreateFleetResponse Source # 
Data CreateFleetResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateFleetResponse -> c CreateFleetResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateFleetResponse #

toConstr :: CreateFleetResponse -> Constr #

dataTypeOf :: CreateFleetResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateFleetResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateFleetResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateFleetResponse -> CreateFleetResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleetResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleetResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateFleetResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateFleetResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateFleetResponse -> m CreateFleetResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleetResponse -> m CreateFleetResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleetResponse -> m CreateFleetResponse #

Read CreateFleetResponse Source # 
Show CreateFleetResponse Source # 
Generic CreateFleetResponse Source # 
NFData CreateFleetResponse Source # 

Methods

rnf :: CreateFleetResponse -> () #

type Rep CreateFleetResponse Source # 
type Rep CreateFleetResponse = D1 * (MetaData "CreateFleetResponse" "Network.AWS.GameLift.CreateFleet" "amazonka-gamelift-1.6.0-DeAosbEJJf8D8cv8ebS5Uv" False) (C1 * (MetaCons "CreateFleetResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfrsFleetAttributes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe FleetAttributes))) (S1 * (MetaSel (Just Symbol "_cfrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

cfrsFleetAttributes :: Lens' CreateFleetResponse (Maybe FleetAttributes) Source #

Properties for the newly created fleet.

cfrsResponseStatus :: Lens' CreateFleetResponse Int Source #

  • - | The response status code.