调用DeleteScalingConfiguration删除一个伸缩配置。
接口说明
以下情况不能删除伸缩配置:
- 伸缩配置在伸缩组中处于生效状态。
- 伸缩组中仍然存在使用该伸缩配置创建的ECS实例。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 | 
|---|---|---|---|---|
| Action | String | 是 | DeleteScalingConfiguration | 系统规定参数。取值:DeleteScalingConfiguration | 
| ScalingConfigurationId | String | 是 | asc-bp1bx8mzur534edp**** | 待删除伸缩配置的ID。 | 
返回数据
| 名称 | 类型 | 示例值 | 描述 | 
|---|---|---|---|
| RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E | 请求 ID。无论调用接口成功与否,我们都会返回请求 ID。 | 
示例
请求示例
https://ess.aliyuncs.com/?Action=DeleteScalingConfiguration &ScalingConfigurationId=asc-bp1bx8mzur534edp**** &<公共请求参数>
正常返回示例
XML 格式 
<DeleteScalingConfigurationResponse>
      <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</DeleteScalingConfigurationResponse> 
     JSON 格式 
{
    "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
} 
    错误码
访问错误中心查看更多错误码。
| HttpCode | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 404 | InvalidScalingConfigurationId.NotFound | The specified scaling configuration does not exist. | 指定的伸缩配置在该用户账号下不存在。 | 
| 400 | IncorrectScalingConfigurationLifecycleState | The current lifecycle state of specified scaling configuration does not support this action. | 指定的伸缩配置未处于Inactive状态。 | 
| 400 | InstanceInUse | You cannot delete a scaling configuration or scaling group while there is an instance associated with it. | 指定的伸缩配置还有关联的ECS实例未被删除。 |