調用DeleteActivation刪除一個未被使用的啟用碼。
介面說明
介面說明
啟用碼必須未被使用,即啟用碼對應註冊的受管理的執行個體數量為 0。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:DeleteActivation |
update |
*activation
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
地區 ID。目前支援的地區:華北 1(青島)、華北 2(北京)、華北 3(張家口)、華北 5(呼和浩特)、華北 6(烏蘭察布)、華東 1(杭州)、華東 2(上海)、華南 1(深圳)、華南 2(河源)、華南 3(廣州)、西南 1(成都)、中國香港、新加坡、日本(東京)、美國(矽谷)、美國(維吉尼亞)。 您可以調用 DescribeRegions 查看地區對應的 ID 等資訊。 |
cn-hangzhou |
| RegionId |
string |
是 |
地區 ID。目前支援的地區:華北 1(青島)、華北 2(北京)、華北 3(張家口)、華北 5(呼和浩特)、華北 6(烏蘭察布)、華東 1(杭州)、華東 2(上海)、華南 1(深圳)、華南 2(河源)、華南 3(廣州)、西南 1(成都)、中國香港、新加坡、日本(東京)、美國(矽谷)、美國(維吉尼亞)。 您可以調用 DescribeRegions 查看地區對應的 ID 等資訊。 |
cn-hangzhou |
| ActivationId |
string |
是 |
未被使用的啟用碼 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F1234**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F74942176 |
| Activation |
object |
啟用碼及使用方式資訊組成的集合。 |
|
| CreationTime |
string |
建立時間。 |
2021-01-20T06:00:00Z |
| DeregisteredCount |
integer |
已登出的執行個體數。 |
0 |
| InstanceCount |
integer |
啟用碼用於註冊受管理的執行個體的使用次數上限。 |
1 |
| Description |
string |
啟用碼對應的描述。 |
This is description. |
| RegisteredCount |
integer |
登入的執行個體數。 |
0 |
| InstanceName |
string |
預設的執行個體名稱首碼。 |
test-InstanceName |
| IpAddressRange |
string |
允許使用該啟用碼的主機 IP。 |
0.0.0.0/0 |
| TimeToLiveInHours |
integer |
啟用碼的有效時間。單位:小時。 |
4 |
| ActivationId |
string |
啟用碼 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F1234**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "4ECEEE12-56F1-4FBC-9AB1-890F74942176",
"Activation": {
"CreationTime": "2021-01-20T06:00:00Z",
"DeregisteredCount": 0,
"InstanceCount": 1,
"Description": "This is description.",
"RegisteredCount": 0,
"InstanceName": "test-InstanceName",
"IpAddressRange": "0.0.0.0/0",
"TimeToLiveInHours": 4,
"ActivationId": "4ECEEE12-56F1-4FBC-9AB1-890F1234****"
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | RegionId.ApiNotSupported | The api is not supported in this region. | 指定地區下不支援調用 API。請檢查 RegionId 參數取值是否正確。 |
| 500 | InternalError.Dispatch | An error occurred when you dispatched the request. | 發送請求時發生錯誤,請稍後重試。 |
| 403 | ActivationId.InUse | The specified activation id is in use. | 指定的啟用碼仍在使用中。 |
| 403 | Operation.Forbidden | The operation is not permitted. | 該操作是不被允許的。 |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 地區資訊錯誤 |
| 404 | ActivationId.NotFound | The specified activation id does not exist. | 指定的啟用碼不存在。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。