Amazon GameLift Service
API Reference (API Version 2015-10-01)
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

StopFleetActions

Suspends activity on a fleet. Currently, this operation is used to stop a fleet's auto-scaling activity. It is used to temporarily stop scaling events triggered by the fleet's scaling policies. The policies can be retained and auto-scaling activity can be restarted using StartFleetActions. You can view a fleet's stopped actions using DescribeFleetAttributes.

To stop fleet actions, specify the fleet ID and the type of actions to suspend. When auto-scaling fleet actions are stopped, Amazon GameLift no longer initiates scaling events except to maintain the fleet's desired instances setting (FleetCapacity. Changes to the fleet's capacity must be done manually using UpdateFleetCapacity.

Learn more

Working with Fleets.

Related operations

Request Syntax

{ "Actions": [ "string" ], "FleetId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

Actions

List of actions to suspend on the fleet.

Type: Array of strings

Array Members: Fixed number of 1 item.

Valid Values: AUTO_SCALING

Required: Yes

FleetId

Unique identifier for a fleet

Type: String

Pattern: ^fleet-\S+

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceException

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

HTTP Status Code: 500

InvalidRequestException

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

HTTP Status Code: 400

NotFoundException

A service resource associated with the request could not be found. Clients should not retry such requests.

HTTP Status Code: 400

UnauthorizedException

The client failed authentication. Clients should not retry such requests.

HTTP Status Code: 400

Example

Stop fleet auto-scaling activity

In this example, we want to suspend all scaling policies that are defined for a specified fleet. Once the policies are suspended, fleet capacity will remain at the last "desired instances" setting unless we adjust capacity manually by calling UpdateFleetCapacity.

HTTP requests are authenticated using an AWS Signature Version 4 signature in the Authorization header field.

Sample Request

POST / HTTP/1.1 Host: gamelift.us-west-2.amazonaws.com; Accept-Encoding: identity Content-Length: 208 User-Agent: aws-cli/1.11.36 Python/2.7.9 Windows/7 botocore/1.4.93 Content-Type: application/x-amz-json-1.0 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20170406/us-west-2/gamelift/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY X-Amz-Date: 20170406T004805Z X-Amz-Target: GameLift.StopFleetActions { "FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa", "Actions": ["AUTO_SCALING"] }

Sample Response

HTTP/1.1 200 OK undefined

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: