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.

DeleteScalingPolicy

Deletes a fleet scaling policy. This action means that the policy is no longer in force and removes all record of it. To delete a scaling policy, specify both the scaling policy name and the fleet ID it is associated with.

To temporarily suspend scaling policies, call StopFleetActions. This operation suspends all policies for the fleet.

Request Syntax

{ "FleetId": "string", "Name": "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.

FleetId

Unique identifier for a fleet to be deleted.

Type: String

Pattern: ^fleet-\S+

Required: Yes

Name

Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

Type: String

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

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

Delete a scaling policy

To delete a policy, we must specify both the fleet ID and name. The combination of these two values is what uniquely identifies the policy. Once a delete request is received, the policy is put into status DELETING and no longer affects the fleet's scaling activity.

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: 336 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.DeleteScalingPolicy { "FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa", "Name": "My_Target_Policy_1" } } CLI syntax: $aws gamelift delete-scaling-policy --fleet-id "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa" --name "My_Target_Policy_1"

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: