呼叫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 |
| ActivationId |
string |
是 |
未被使用的啟用碼 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F1234**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| Activation |
object |
啟用碼及使用情況資訊組成的集合。 |
|
| ActivationId |
string |
啟用碼 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F1234**** |
| CreationTime |
string |
建立時間。格式為 ISO 8601,時區為 UTC。 |
2021-01-20T06:00:00Z |
| DeregisteredCount |
integer |
已取消註冊的執行個體數。 |
0 |
| Description |
string |
啟用碼對應的描述。 |
This is description. |
| InstanceCount |
integer |
啟用碼用於註冊託管執行個體的使用次數上限。 |
1 |
| InstanceName |
string |
預設的執行個體名稱前置字串。 |
test-InstanceName |
| IpAddressRange |
string |
允許使用該啟用碼的主機 IP。 |
0.0.0.0/0 |
| RegisteredCount |
integer |
已註冊的執行個體數。 |
0 |
| TimeToLiveInHours |
integer |
啟用碼的有效時間。單位:小時。 |
4 |
| RequestId |
string |
請求 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F74942176 |
樣本
正常返回樣本
JSON格式
{
"Activation": {
"ActivationId": "4ECEEE12-56F1-4FBC-9AB1-890F1234****",
"CreationTime": "2021-01-20T06:00:00Z",
"DeregisteredCount": 0,
"Description": "This is description.",
"InstanceCount": 1,
"InstanceName": "test-InstanceName",
"IpAddressRange": "0.0.0.0/0",
"RegisteredCount": 0,
"TimeToLiveInHours": 4
},
"RequestId": "4ECEEE12-56F1-4FBC-9AB1-890F74942176"
}
錯誤碼
|
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 | InvalidParameterCharacter | The specified parameter %s contains illegal characters. | |
| 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. | 指定的 RegionId 不存在,請您檢查此產品在該地域是否可用。 |
| 404 | ActivationId.NotFound | The specified activation id does not exist. | 指定的啟用碼不存在。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。