全部產品
Search
文件中心

Auto Scaling:DeleteScalingConfiguration

更新時間:Jan 14, 2025

如果當前伸縮配置處於未生效狀態,且伸縮組中不存在使用該伸縮配置自動建立的ECS執行個體,您可以調用API DeleteScalingConfiguration刪除不再需要的伸縮配置,可以有效避免佔用伸縮配置的配額。

介面說明

以下情況不能刪除伸縮配置:

  • 伸縮配置在伸縮組中處於生效狀態。
  • 伸縮組中仍然存在使用該伸縮配置建立的ECS執行個體。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

請求參數

名稱

類型

是否必選

樣本值

描述

Action String DeleteScalingConfiguration

系統規定參數。取值:DeleteScalingConfiguration

ScalingConfigurationId String asc-bp1bx8mzur534edp****

待刪除伸縮配置的ID。

返回資料

名稱

類型

樣本值

描述

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

請求ID。無論調用介面成功與否,我們都會返回請求ID。

樣本

請求樣本

http(s)://ess.aliyuncs.com/?Action=DeleteScalingConfiguration
&ScalingConfigurationId=asc-bp1bx8mzur534edp****
&公用請求參數

正常返回樣本

XML格式

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

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

JSON格式

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

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

錯誤碼

訪問錯誤中心查看更多錯誤碼。

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執行個體未被刪除。