All Products
Search
Document Center

Elastic Compute Service:DescribeDedicatedHostAutoRenew

Last Updated:Mar 19, 2024

Queries the auto-renewal states of one or more subscription dedicated hosts.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DedicatedHostIdsstringYes

The region ID of the dedicated host.

dh-bp165p6xk2tlw61e****,dh-bp1f9vxmno****
RegionIdstringYes

The ID of the request.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

Details about the auto-renewal attributes of the dedicated hosts.

04F0F334-1335-436C-A1D7-6C044FE73368
DedicatedHostRenewAttributesobject []

The unit of the auto-renewal period. Valid values:

  • Week
  • Month
PeriodUnitstring

The auto-renewal period.

Month
Durationinteger

The ID of the dedicated host.

0
DedicatedHostIdstring

Indicates whether the subscription dedicated host is automatically renewed. Valid values:

  • AutoRenewal: The dedicated host is automatically renewed.
  • Normal: The dedicated host is not automatically renewed, and you will receive notifications for renewal.
  • NotRenewal: The dedicated host is not renewed, and no expiration notification is sent. Notifications for renewal are automatically sent three days before the dedicated host expires. You can change the value of this parameter from NotRenewal to Normal for the dedicated host and manually renew it by calling the RenewDedicatedHosts operation. Alternatively, you can set this parameter to AutoRenewal to configure the dedicated host to be automatically renewed.
dh-bp165p6xk2tlw61e****
RenewalStatusstring

Indicates whether the subscription dedicated host is automatically renewed. Valid values:

  • true: The dedicated host is automatically renewed.
  • false: The dedicated host is not automatically renewed.
Normal
AutoRenewEnabledboolean

Indicates whether the subscription dedicated host is automatically renewed along with the subscription Elastic Compute Service (ECS) instances hosted on it if the new expiration time of the renewed instances is later than the expiration time of the dedicated host. Valid values:

  • AutoRenewWithEcs: The subscription dedicated host is automatically renewed along with the subscription ECS instances hosted on it.
  • StopRenewWithEcs: The subscription dedicated host is not automatically renewed along with the subscription ECS instances hosted on it.
false

Examples

Sample success responses

JSONformat

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "DedicatedHostRenewAttributes": {
    "DedicatedHostRenewAttribute": [
      {
        "PeriodUnit": "Month",
        "Duration": 0,
        "DedicatedHostId": "dh-bp165p6xk2tlw61e****",
        "RenewalStatus": "Normal",
        "AutoRenewEnabled": false,
        "AutoRenewWithEcs": "StopRenewWithEcs"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
403MissingParameter.DedicatedHostIdDedicatedHostId should not be null.The DedicatedHostId parameter is required.
403InvalidParameter.ToManyDedicatedHostIdsDedicatedHostId should be less than 100.More than 100 dedicated host IDs are specified in the DedicatedHostIds value.
403InvalidParameter.InvalidDedicatedHostId%sThe specified DedicatedHostId parameter is invalid.
403IncorrectDedicatedHostStatusThe current status of the resource does not support this operation.The resource is in a state that does not support the current operation.
403ChargeTypeViolationPay-As-You-Go dedicated host do not support this operation.-
403MissingParamter.InstanceIdInstanceId should not be null.The instance ID must be specified.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-06-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change