Bir veya daha fazla abonelik örneğinin otomatik yenileme özniteliklerini değiştirerek kaynakların süresinin dolmasıyla ilgili bakım maliyetlerini azaltmanıza yardımcı olur.
Operation description
Bu API'yi kullanmadan önce, Elastic Compute Service (ECS) faturalandırma yöntemlerini ve fiyatlandırma bilgilerini tam olarak anladığınızdan emin olun.
-
Hesap bakiyenizin veya kredi limitinizin yeterli olduğundan emin olun.
-
Yalnızca abonelik örnekleri desteklenir. Bu API'yi kullandıkça öde örnekleri için çağırırsanız bir hata döndürülür.
-
Otomatik yenileme tahsilat tarihi, örneğin süresinin dolmasından 9 gün öncesidir. Tahsilat işlemi 08:00:00 (UTC+8) saatinde başlar.
-
Önceki gün otomatik tahsilat işlemi başarısız olursa, tahsilat başarılı olana veya örneğin süresinin dolmasından 9 gün sonra kilitlenene kadar ertesi gün belirlenen saatte yeniden denenecektir.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyInstanceAutoRenewAttribute |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Örnek kimliği. Tek seferde en fazla 100 abonelik örneği belirtebilirsiniz. Birden fazla örnek kimliğini virgül (,) ile ayırın. |
i-bp67acfmxazb4ph****,i-bp67acfmxazb4pi**** |
| RegionId |
string |
Yes |
Örneğin bölge kimliği. Alibaba Cloud bölgelerinin en son listesini görüntülemek için DescribeRegions API'sini çağırabilirsiniz. DescribeRegions |
cn-hangzhou |
| Duration |
integer |
No |
Örneğin otomatik yenileme süresi.
|
1 |
| AutoRenew |
boolean |
No |
Örneğin süresi dolmadan önce otomatik olarak yenilenip yenilenmeyeceğini belirtir.
Varsayılan değer: false. |
true |
| RenewalStatus |
string |
No |
Örneğin otomatik yenileme durumu. Geçerli değerler:
Not
RenewalStatus parametresi, AutoRenew parametresine göre önceliklidir. RenewalStatus parametresi belirtilmezse, varsayılan olarak AutoRenew parametresi geçerli olur. |
AutoRenewal |
| PeriodUnit |
string |
No |
Yenileme süresinin birimi, yani Duration parametresinin birimi. Geçerli değerler:
|
Month |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
İstek kimliği. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Examples
Success response
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. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | MissingParameter.InstanceId | InstanceId should not be null. | The InstanceId parameter is required. |
| 403 | InvalidParameter.ToManyInstanceIds | InstanceId should be less 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. | |
| 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. | |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.