[ aws . gamelift ]

update-fleet-capacity

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

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  update-fleet-capacity
--fleet-id <value>
[--desired-instances <value>]
[--min-size <value>]
[--max-size <value>]
[--location <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--fleet-id (string)

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

--desired-instances (integer)

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.

--min-size (integer)

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

--max-size (integer)

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

--location (string)

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 .

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Output

FleetId -> (string)

A unique identifier for the fleet that was updated.

FleetArn -> (string)

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 .

Location -> (string)

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