Queries the auto-renewal status of subscription Elastic Compute Service (ECS) instances.
Operation description
- Before you configure auto-renewal or manual renewal for subscription instances, you can query the auto-renewal status of the instances.
- This operation is applicable to only subscription instances. An error is returned if you call this operation on pay-as-you-go instances.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | No | The IDs of the instances. You can specify up to 100 subscription instance IDs in a single request. Separate multiple instance IDs with commas (,). Note
InstanceId and RenewalStatus cannot be empty at the same time.
| i-bp18x3z4hc7bixhx****,i-bp1g6zv0ce8oghu7**** |
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
RenewalStatus | string | No | The auto-renewal state of the instance. Valid values:
| AutoRenewal |
PageSize | string | No | The number of entries per page. Valid values: 1 to 100. Default value: 10. | 10 |
PageNumber | string | No | The page number. Pages start from page 1. Default value: 1. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 6,
"InstanceRenewAttributes": {
"InstanceRenewAttribute": [
{
"PeriodUnit": "week",
"Duration": 1,
"RenewalStatus": "Normal",
"InstanceId": "i-bp18x3z4hc7bixhx****",
"AutoRenewEnabled": false
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Throttling | Request was denied due to request throttling. | - |
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.RenewalStatus | The specified parameter RenewalStatus is not valid. | The specified RenewalStatus parameter is invalid. |
403 | InvalidParameter.RenewalStatusInstanceId | The parameter RenewalStatus and InstanceId can not be both empty. | The RenewalStatus and InstanceId parameters are required. |
403 | InvalidParameter.PageSize | The specified parameter PageSize is not valid. | The PageSize parameter is invalid. |
403 | InvalidParameter.PageNumber | The specified parameter PageNumber is not valid. | The specified PageNumber parameter is invalid. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2021-11-04 | The Error code has changed | see changesets | ||||||
|