Sets or cancels an automatic release time for a pay-as-you-go dedicated host.

Description

The pay-as-you-go dedicated host is automatically released at the specified automatic release time. Make sure that the dedicated host is no longer needed and that its data is backed up.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesModifyDedicatedHostAutoReleaseTime

The operation that you want to perform. Set the value to ModifyDedicatedHostAutoReleaseTime.

RegionIdStringYescn-hangzhou

The region ID of the dedicated host. You can call the DescribeRegions operation to query the most recent region list.

DedicatedHostIdStringYesdh-bp165p6xk2tlw61e****

The ID of the dedicated host.

AutoReleaseTimeStringNo2019-06-04T13:35:00Z

The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

  • The specified release time must be at least 30 minutes from the current time.
  • The specified release time can be at most 3 years from the current time.
  • If the value of the seconds (ss) is not 00, it is automatically set to 00.
  • If you do not specify the AutoReleaseTime parameter, automatic release is disabled. The dedicated host will not be released at the scheduled time.

Response parameters

ParameterTypeExampleDescription
RequestIdString04F0F334-1335-436C-A1D7-6C044FE7****

The ID of the request.

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=ModifyDedicatedHostAutoReleaseTime
&DedicatedHostId=dh-bp165p6xk2tlw61e****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyDedicatedHostAutoReleaseTimeResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE7****</RequestId>
</ModifyDedicatedHostAutoReleaseTimeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "04F0F334-1335-436C-A1D7-6C044FE7****"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterDedicatedHostId should not be null.The error message returned because the DedicatedHostIds parameter is not specified.
400UnsupportedParameterThe parameters is unsupported.The error message returned because a specified parameter is invalid.
400InvalidAutoReleaseTime.MalformedThe specified parameter AutoReleaseTime is not valid.The error message returned because the specified AutoReleaseTime parameter is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
403ChargeTypeViolationThe operation is not permitted due to charge type of the dedicated host.The error message returned because the billing method of the dedicated host does not support the operation.
404NoSuchResourceThe specified resource is not found.The error message returned because the specified resource does not exist.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.The error message returned because an internal error has occurred. Try again later.

For a list of error codes, see Service error codes.