amazonka-gamelift-1.5.0: Amazon GameLift SDK.

Copyright(c) 2013-2017 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 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, you must specify the following: (1) fleet name, (2) build ID of an uploaded game build, (3) an EC2 instance type, and (4) a run-time configuration that describes which server processes to run on each instance in the fleet. (Although the run-time configuration is not a required parameter, the fleet cannot be successfully activated without it.)

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

  • Fleet description
  • Access permissions for inbound traffic
  • Fleet-wide game session protection
  • Resource creation limit

If you use Amazon CloudWatch for metrics, you can add the new fleet to a metric group. This allows you to view aggregated metrics for a set of fleets. Once you specify a metric group, the new fleet's metrics are included in the metric group's data.

You have the option of creating a VPC peering connection with the new fleet. For more information, see VPC Peering with Amazon GameLift Fleets .

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 target capacity to 1 (desired instances), which causes Amazon 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, Amazon GameLift staggers each launch by a few seconds.
  • Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console.
  • Sets the fleet's status to ACTIVE as soon as one server process in the fleet is ready to host a game session.

Fleet-related operations include:

  • CreateFleet
  • ListFleets
  • Describe fleets:
  • DescribeFleetAttributes
  • DescribeFleetPortSettings
  • DescribeFleetUtilization
  • DescribeRuntimeConfiguration
  • DescribeFleetEvents
  • Update fleets:
  • UpdateFleetAttributes
  • UpdateFleetCapacity
  • UpdateFleetPortSettings
  • UpdateRuntimeConfiguration
  • Manage fleet capacity:
  • DescribeFleetCapacity
  • UpdateFleetCapacity
  • PutScalingPolicy (automatic scaling)
  • DescribeScalingPolicies (automatic scaling)
  • DeleteScalingPolicy (automatic scaling)
  • DescribeEC2InstanceLimits
  • DeleteFleet

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.
  • 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 - Names of metric groups to add this fleet to. 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 # 
ToQuery CreateFleet Source # 
ToPath CreateFleet Source # 
ToHeaders CreateFleet Source # 

Methods

toHeaders :: CreateFleet -> [Header] #

type Rep CreateFleet Source # 
type Rep CreateFleet = D1 (MetaData "CreateFleet" "Network.AWS.GameLift.CreateFleet" "amazonka-gamelift-1.5.0-LWFsf2alHztGD91U7ab8u0" 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 "_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.

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 #

Names of metric groups to add this fleet to. 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.5.0-LWFsf2alHztGD91U7ab8u0" 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.