All Products
Search
Document Center

Elastic Compute Service:DescribeDedicatedHostAutoRenew

Last Updated:Apr 29, 2024

Queries the auto-renewal status of 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 ID of the dedicated host. You can specify up to 100 subscription dedicated host IDs. Separate multiple IDs with commas (,).

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

The ID of the region where the dedicated host resides.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

The array that consists of dedicated host auto-renewal attributes.

PeriodUnitstring

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

  • Week
  • Month
Month
Durationinteger

The auto-renewal period.

0
DedicatedHostIdstring

The ID of the dedicated host.

dh-bp165p6xk2tlw61e****
RenewalStatusstring

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, but renewal notifications are sent.
  • NotRenewal: The dedicated host is not automatically renewed, and no expiration notification is sent. Alibaba Cloud sends only a non-renewal notice three days before the host expires. If the renewal status of a dedicated host is NotRenewal, you can change the value to Normal and then call RenewDedicatedHosts to manually renew the dedicated host, or directly change the value to AutoRenewal.
Normal
AutoRenewEnabledboolean

Indicates whether auto-renewal is enabled. Valid values:

  • true
  • false
false
AutoRenewWithEcsstring

Indicates whether the dedicated host is automatically renewed if a subscription ECS instance it hosts, after being automatically renewed, has a new expiration time that is later than that of the dedicated host. Valid values:

  • AutoRenewWithEcs: The dedicated host is automatically renewed along with the ECS instance.
  • StopRenewWithEcs: The dedicated host is not automatically renewed along with the ECS instance.
StopRenewWithEcs

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
403ChargeTypeViolationPay-As-You-Go dedicated host does not support this operation.-
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.
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