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

Amazonka.GameLift.UpdateFleetCapacity

Description

Updates capacity settings for a fleet. For fleets with multiple locations, use this operation to manage capacity settings in each location individually. Fleet capacity determines the number of game sessions and players that can be hosted based on the fleet configuration. Use this operation to set the following fleet capacity properties:

  • Minimum/maximum size: Set hard limits on fleet capacity. GameLift cannot set the fleet's capacity to a value outside of this range, whether the capacity is changed manually or through automatic scaling.
  • Desired capacity: Manually set the number of EC2 instances to be maintained in a fleet location. Before changing a fleet's desired capacity, you may want to call DescribeEC2InstanceLimits to get the maximum capacity of the fleet's EC2 instance type. Alternatively, consider using automatic scaling to adjust capacity based on player demand.

This operation can be used in the following ways:

  • To update capacity for a fleet's home Region, or if the fleet has no remote locations, omit the Location parameter. The fleet must be in ACTIVE status.
  • To update capacity for a fleet's remote location, include the Location parameter set to the location to be updated. The location must be in ACTIVE status.

If successful, capacity settings are updated immediately. In response a change in desired capacity, GameLift initiates steps to start new instances or terminate existing instances in the requested fleet location. This continues until the location's active instance count matches the new desired instance count. You can track a fleet's current capacity by calling DescribeFleetCapacity or DescribeFleetLocationCapacity. If the requested desired instance count is higher than the instance type's limit, the LimitExceeded exception occurs.

Learn more

Scaling fleet capacity

Related actions

CreateFleetLocations | UpdateFleetAttributes | UpdateFleetCapacity | UpdateFleetPortSettings | UpdateRuntimeConfiguration | StopFleetActions | StartFleetActions | PutScalingPolicy | DeleteFleet | DeleteFleetLocations | DeleteScalingPolicy | All APIs by task

Synopsis

Creating a Request

data UpdateFleetCapacity Source #

Represents the input for a request operation.

See: newUpdateFleetCapacity smart constructor.

Constructors

UpdateFleetCapacity' 

Fields

  • location :: Maybe Text

    The name of a remote location to update fleet capacity settings for, in the form of an AWS Region code such as us-west-2.

  • maxSize :: Maybe Natural

    The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.

  • minSize :: Maybe Natural

    The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0.

  • desiredInstances :: Maybe Natural

    The number of EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits.

  • fleetId :: Text

    A unique identifier for the fleet to update capacity settings for. You can use either the fleet ID or ARN value.

Instances

Instances details
Eq UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Read UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Show UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Generic UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Associated Types

type Rep UpdateFleetCapacity :: Type -> Type #

NFData UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Methods

rnf :: UpdateFleetCapacity -> () #

Hashable UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

ToJSON UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

AWSRequest UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Associated Types

type AWSResponse UpdateFleetCapacity #

ToHeaders UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

ToPath UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

ToQuery UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

type Rep UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

type Rep UpdateFleetCapacity = D1 ('MetaData "UpdateFleetCapacity" "Amazonka.GameLift.UpdateFleetCapacity" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "UpdateFleetCapacity'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "location") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "maxSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "minSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "desiredInstances") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "fleetId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse UpdateFleetCapacity Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

newUpdateFleetCapacity Source #

Create a value of UpdateFleetCapacity with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:location:UpdateFleetCapacity', updateFleetCapacity_location - The name of a remote location to update fleet capacity settings for, in the form of an AWS Region code such as us-west-2.

$sel:maxSize:UpdateFleetCapacity', updateFleetCapacity_maxSize - The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.

$sel:minSize:UpdateFleetCapacity', updateFleetCapacity_minSize - The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0.

$sel:desiredInstances:UpdateFleetCapacity', updateFleetCapacity_desiredInstances - The number of EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits.

$sel:fleetId:UpdateFleetCapacity', updateFleetCapacity_fleetId - A unique identifier for the fleet to update capacity settings for. You can use either the fleet ID or ARN value.

Request Lenses

updateFleetCapacity_location :: Lens' UpdateFleetCapacity (Maybe Text) Source #

The name of a remote location to update fleet capacity settings for, in the form of an AWS Region code such as us-west-2.

updateFleetCapacity_maxSize :: Lens' UpdateFleetCapacity (Maybe Natural) Source #

The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.

updateFleetCapacity_minSize :: Lens' UpdateFleetCapacity (Maybe Natural) Source #

The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0.

updateFleetCapacity_desiredInstances :: Lens' UpdateFleetCapacity (Maybe Natural) Source #

The number of EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits.

updateFleetCapacity_fleetId :: Lens' UpdateFleetCapacity Text Source #

A unique identifier for the fleet to update capacity settings for. You can use either the fleet ID or ARN value.

Destructuring the Response

data UpdateFleetCapacityResponse Source #

Represents the returned data in response to a request operation.

See: newUpdateFleetCapacityResponse smart constructor.

Constructors

UpdateFleetCapacityResponse' 

Fields

  • location :: Maybe Text

    The remote location being updated, expressed as an AWS Region code, such as us-west-2.

  • fleetArn :: Maybe Text

    The Amazon Resource Name (ARN) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

  • fleetId :: Maybe Text

    A unique identifier for the fleet that was updated.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq UpdateFleetCapacityResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Read UpdateFleetCapacityResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Show UpdateFleetCapacityResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Generic UpdateFleetCapacityResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

Associated Types

type Rep UpdateFleetCapacityResponse :: Type -> Type #

NFData UpdateFleetCapacityResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

type Rep UpdateFleetCapacityResponse Source # 
Instance details

Defined in Amazonka.GameLift.UpdateFleetCapacity

type Rep UpdateFleetCapacityResponse = D1 ('MetaData "UpdateFleetCapacityResponse" "Amazonka.GameLift.UpdateFleetCapacity" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "UpdateFleetCapacityResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "location") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "fleetArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "fleetId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newUpdateFleetCapacityResponse Source #

Create a value of UpdateFleetCapacityResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:location:UpdateFleetCapacity', updateFleetCapacityResponse_location - The remote location being updated, expressed as an AWS Region code, such as us-west-2.

$sel:fleetArn:UpdateFleetCapacityResponse', updateFleetCapacityResponse_fleetArn - The Amazon Resource Name (ARN) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

$sel:fleetId:UpdateFleetCapacity', updateFleetCapacityResponse_fleetId - A unique identifier for the fleet that was updated.

$sel:httpStatus:UpdateFleetCapacityResponse', updateFleetCapacityResponse_httpStatus - The response's http status code.

Response Lenses

updateFleetCapacityResponse_location :: Lens' UpdateFleetCapacityResponse (Maybe Text) Source #

The remote location being updated, expressed as an AWS Region code, such as us-west-2.

updateFleetCapacityResponse_fleetArn :: Lens' UpdateFleetCapacityResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

updateFleetCapacityResponse_fleetId :: Lens' UpdateFleetCapacityResponse (Maybe Text) Source #

A unique identifier for the fleet that was updated.