All Products
Search
Document Center

Auto Scaling:DeleteScalingConfiguration

Last Updated:Apr 29, 2024

Deletes a scaling configuration. If a scaling configuration is in the Inactive state and your scaling group contains no Elastic Compute Service (ECS) instances created from the scaling configuration, you can call the DeleteScalingConfiguration operation to delete the scaling configuration. This serves to efficiently block any unnecessary utilization of the scaling configuration quota.

Usage notes

You cannot delete a scaling configuration in one of the following scenarios:

  • The scaling configuration in your scaling group is in the Active state.
  • The scaling group contains ECS instances that were created from the scaling configuration.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DeleteScalingConfiguration

The operation that you want to perform. Set the value to DeleteScalingConfiguration.

ScalingConfigurationId String Yes asc-bp1bx8mzur534edp****

The ID of the scaling configuration that you want to delete.

Response parameters

Parameter

Type

Example

Description

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

The request ID. The request ID is returned regardless of whether the call is successful.

Examples

Sample requests

http(s)://ess.aliyuncs.com/?Action=DeleteScalingConfiguration
&ScalingConfigurationId=asc-bp1bx8mzur534edp****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DeleteScalingConfigurationResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</DeleteScalingConfigurationResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

For a list of error codes, see Service error codes.

HttpCode

Error code

Error message

Description

404

InvalidScalingConfigurationId.NotFound

The specified scaling configuration does not exist.

The specified scaling configuration does not exist within the Alibaba Cloud account.

400

IncorrectScalingConfigurationLifecycleState

The current lifecycle state of specified scaling configuration does not support this action.

The specified scaling configuration is in the Active state.

400

InstanceInUse

You cannot delete a scaling configuration or scaling group while there is an instance associated with it.

The scaling group contains ECS instances that are created from the scaling configuration.