調用DescribeDedicatedHostAutoRenew查詢一台或多台訂用帳戶Dedicated Host自動續約狀態。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:DescribeDedicatedHostAutoRenew |
get |
*DedicatedHost
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DedicatedHostIds |
string |
是 |
Dedicated Host ID。最多可以輸入 100 個訂用帳戶Dedicated Host ID,ID 之間用半形逗號(,)隔開。 |
dh-bp165p6xk2tlw61e****,dh-bp1f9vxmno**** |
| RegionId |
string |
是 |
Dedicated Host所屬的地區 ID。 |
cn-hangzhou |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| DedicatedHostRenewAttributes |
object |
||
| DedicatedHostRenewAttribute |
array<object> |
Dedicated Host自動續約屬性群組成的數組。 |
|
|
object |
|||
| PeriodUnit |
string |
續約單位。可能值:
|
Month |
| Duration |
integer |
自動續約時間長度。 |
0 |
| DedicatedHostId |
string |
Dedicated Host ID。 |
dh-bp165p6xk2tlw61e**** |
| RenewalStatus |
string |
是否自動續約訂用帳戶Dedicated Host。取值範圍:
|
Normal |
| AutoRenewEnabled |
boolean |
是否自動續約。可能值:
|
false |
| AutoRenewWithEcs |
string |
訂用帳戶Dedicated Host內的訂用帳戶 ECS 執行個體自動續約時,如果 ECS 執行個體續約後的到期時間比Dedicated Host的到期時間晚,則該Dedicated Host是否隨 ECS 執行個體自動續約。可能值:
|
StopRenewWithEcs |
樣本
正常返回樣本
JSON格式
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"DedicatedHostRenewAttributes": {
"DedicatedHostRenewAttribute": [
{
"PeriodUnit": "Month",
"Duration": 0,
"DedicatedHostId": "dh-bp165p6xk2tlw61e****",
"RenewalStatus": "Normal",
"AutoRenewEnabled": false,
"AutoRenewWithEcs": "StopRenewWithEcs"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 403 | ChargeTypeViolation | Pay-As-You-Go dedicated host does not support this operation. | |
| 403 | MissingParameter.DedicatedHostId | DedicatedHostId should not be null. | 參數 DedicatedHostId 不可為空。 |
| 403 | InvalidParameter.ToManyDedicatedHostIds | DedicatedHostId should be less than 100. | 參數 DedicatedHostIds 包含的Dedicated Host ID 應該少於 100 個。 |
| 403 | InvalidParameter.InvalidDedicatedHostId | %s | 指定的參數 DedicatedHostId 無效。 |
| 403 | IncorrectDedicatedHostStatus | The current status of the resource does not support this operation. | |
| 403 | MissingParamter.InstanceId | InstanceId should not be null. | 執行個體id不可為空 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。