StartFleetActions - Amazon GameLift

StartFleetActions

Resumes certain types of activity on fleet instances that were suspended with StopFleetActions. For multi-location fleets, fleet actions are managed separately for each location. Currently, this operation is used to restart a fleet's auto-scaling activity.

This operation can be used in the following ways:

  • To restart actions on instances in the fleet's home Region, provide a fleet ID and the type of actions to resume.

  • To restart actions on instances in one of the fleet's remote locations, provide a fleet ID, a location name, and the type of actions to resume.

If successful, Amazon GameLift once again initiates scaling events as triggered by the fleet's scaling policies. If actions on the fleet location were never stopped, this operation will have no effect.

Learn more

Setting up Amazon GameLift fleets

Request Syntax

{ "Actions": [ "string" ], "FleetId": "string", "Location": "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 restart on the fleet.

Type: Array of strings

Array Members: Fixed number of 1 item.

Valid Values: AUTO_SCALING

Required: Yes

FleetId

A unique identifier for the fleet to restart actions on. You can use either the fleet ID or ARN value.

Type: String

Pattern: ^fleet-\S+|^arn:.*:fleet\/fleet-\S+

Required: Yes

Location

The fleet location to restart fleet actions for. Specify a location in the form of an AWS Region code, such as us-west-2.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9\-]+

Required: No

Response Syntax

{ "FleetArn": "string", "FleetId": "string" }

Response Elements

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

The following data is returned in JSON format by the service.

FleetArn

The Amazon Resource Name (ARN) that is assigned to a Amazon 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.

Type: String

Pattern: ^arn:.*:fleet\/fleet-\S+

FleetId

A unique identifier for the fleet to restart actions on.

Type: String

Pattern: ^fleet-\S+

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

The requested resources was not found. The resource was either not created yet or deleted.

HTTP Status Code: 400

UnauthorizedException

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

HTTP Status Code: 400

UnsupportedRegionException

The requested operation is not supported in the Region specified.

HTTP Status Code: 400

Examples

Restart automatic scaling activity for a fleet

In this example, we want to resume the use a fleet's scaling policies that had be previously suspended. Once started, the scaling policies immediately begin tracking their respective metrics.

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

Sample Request

{ "FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa", "Actions": ["AUTO_SCALING"] }

Sample Response

{ "FleetArn": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa", "FleetId": "arn:aws:gamelift:us-west-2::fleet/fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa" }

See Also

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