Configures auto-renewal for one or more subscription instances. To reduce maintenance workloads after subscription instances expire, you can configure auto-renewal for the instances.
Operation description
Before you call this operation, make sure that you are familiar with the billing methods and pricing of Elastic Compute Service (ECS). For more information, see the Elastic Compute Service product page.
- The payment for auto-renewal of an instance is automatically deducted at 08:00:00 (UTC+8) nine days before the instance expires.
- If the deduction fails, Alibaba Cloud attempts to deduct the payment every day until the payment is deducted or until the instance is locked after the nine-day period ends. Make sure that your account balance or credit balance is sufficient.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the instance. You can specify up to 100 subscription instance IDs. Separate the instance IDs with commas (,). | i-bp67acfmxazb4ph****,i-bp67acfmxazb4pi**** |
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Duration | integer | No | The auto-renewal period of the instance.
| 1 |
AutoRenew | boolean | No | Specifies whether to enable auto-renewal for the instance. Default value: false. | true |
RenewalStatus | string | No | The auto-renewal status of the instance. Valid values:
Note
RenewalStatus takes precedence over AutoRenew . If you do not specify RenewalStatus , AutoRenew is used by default.
| AutoRenewal |
PeriodUnit | string | No | The unit of the renewal period (
| Month |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | OperationDenied.StarterPackage | Instance created with a Starter Package plan can not set auto renew. | - |
403 | MissingParameter.InstanceId | InstanceId should not be null. | The InstanceId parameter is required. |
403 | InvalidParameter.ToManyInstanceIds | InstanceId should be less than 100. | The number of instances must be smaller than 100. |
403 | InvalidParameter.InvalidInstanceId | %s | The specified InstanceId parameter is invalid. |
403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | The resource is in a state that does not support the current operation. |
403 | ChargeTypeViolation | Pay-As-You-Go instances do not support this operation. | The operation is not supported by pay-as-you-go instances. Check the billing method of the instance. |
403 | InvalidParameter.Duration | %s | The specified Duration parameter is invalid. |
403 | InvalidParameter.RenewalStatus | %s | The specified RenewalStatus parameter is invalid. |
403 | InvalidPeriodUnit.ValueNotSupported | The specified parameter PeriodUnit is not valid. | The specified PeriodUnit parameter is invalid. |
403 | InvalidPeriod.StarterPackage | This instance was created by using a Starter Package plan and can only be renewed monthly, not yearly. | The instance was created in a Starter Package plan and can only be automatically renewed on a monthly basis. |
500 | InternalError | The request processing has failed due to some unknown error. | An internal error has occurred. Try again later. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|