调用DescribeDedicatedHostAutoRenew查询一台或多台包年包月专有宿主机自动续费状态。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:DescribeDedicatedHostAutoRenew |
get |
*DedicatedHost
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DedicatedHostIds |
string |
是 |
专有宿主机 ID。最多可以输入 100 个包年包月专有宿主机 ID,ID 之间用半角逗号(,)隔开。 |
dh-bp165p6xk2tlw61e****,dh-bp1f9vxmno**** |
| RegionId |
string |
是 |
专有宿主机所属的地域 ID。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| DedicatedHostRenewAttributes |
object |
||
| DedicatedHostRenewAttribute |
array<object> |
专有宿主机自动续费属性组成的数组。 |
|
|
object |
|||
| PeriodUnit |
string |
续费单位。可能值:
|
Month |
| Duration |
integer |
自动续费时长。 |
0 |
| DedicatedHostId |
string |
专有宿主机 ID。 |
dh-bp165p6xk2tlw61e**** |
| RenewalStatus |
string |
是否自动续费包年包月专有宿主机。取值范围:
|
Normal |
| AutoRenewEnabled |
boolean |
是否自动续费。可能值:
|
false |
| AutoRenewWithEcs |
string |
包年包月专有宿主机内的包年包月 ECS 实例自动续费时,如果 ECS 实例续费后的到期时间比专有宿主机的到期时间晚,则该专有宿主机是否随 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 包含的专有宿主机 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不能为空 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。