[ aws . gamelift ]

update-fleet-capacity

Description

Updates capacity settings for a fleet. Use this operation to specify the number of EC2 instances (hosts) that you want this fleet to contain. Before calling this operation, you may want to call DescribeEC2InstanceLimits to get the maximum capacity based on the fleet’s EC2 instance type.

Specify minimum and maximum number of instances. Amazon GameLift will not change fleet capacity to values fall outside of this range. This is particularly important when using auto-scaling (see PutScalingPolicy ) to allow capacity to adjust based on player demand while imposing limits on automatic adjustments.

To update fleet capacity, specify the fleet ID and the number of instances you want the fleet to host. If successful, Amazon GameLift starts or terminates instances so that the fleet’s active instance count matches the desired instance count. You can view a fleet’s current capacity information by calling DescribeFleetCapacity . If the desired instance count is higher than the instance type’s limit, the “Limit Exceeded” exception occurs.

Learn more

Setting up GameLift Fleets

Related operations

  • CreateFleet

  • ListFleets

  • DeleteFleet

  • DescribeFleetAttributes

  • Update fleets:

    • UpdateFleetAttributes

    • UpdateFleetCapacity

    • UpdateFleetPortSettings

    • UpdateRuntimeConfiguration

  • StartFleetActions or StopFleetActions

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>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--fleet-id (string)

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

--desired-instances (integer)

Number of EC2 instances you want this fleet to host.

--min-size (integer)

The minimum value allowed for the fleet’s instance count. Default if not set is 0.

--max-size (integer)

The maximum value allowed for the fleet’s instance count. Default if not set is 1.

--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 a fleet that was updated.