Operasi ini digunakan untuk memperpanjang satu atau lebih instance terreservasi. Operasi ini memungkinkan Anda menentukan durasi perpanjangan dan mengonfigurasi perpanjangan otomatis saat memperpanjang.
Deskripsi operasi
Sebelum Anda menggunakan operasi ini, pastikan Anda memahami metode penagihan dan harga instance terreservasi.
Instance terreservasi mendukung perpanjangan manual dan perpanjangan otomatis. Untuk informasi selengkapnya, lihat Memperpanjang instance terreservasi.
Anda dapat memanggil operasi DescribeReservedInstances untuk mengkueri instance terreservasi yang telah Anda beli.
Operasi ini mendukung pengaktifan perpanjangan otomatis tetapi tidak mendukung penonaktifan perpanjangan otomatis. Anda dapat memanggil operasi ModifyReservedInstanceAutoRenewAttribute untuk menonaktifkan perpanjangan otomatis.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:RenewReservedInstances |
create |
*ReservedInstance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ReservedInstanceId |
array |
No |
ID instance terreservasi. |
|
|
string |
No |
ID instance terreservasi. Anda dapat memanggil operasi DescribeReservedInstances untuk mengkueri instance terreservasi yang telah Anda beli. Maksimal 10 instance terreservasi dapat diperpanjang dalam satu waktu. |
ecsri-2ze53qonjqxg7r**** |
|
| RegionId |
string |
No |
ID wilayah instance terreservasi. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah Alibaba Cloud terbaru. |
cn-hangzhou |
| Period |
integer |
No |
Durasi perpanjangan instance terreservasi. Nilai yang valid: 1 dan 3. Nilai default: 1. |
1 |
| PeriodUnit |
string |
No |
Unit durasi perpanjangan instance terreservasi. Nilai yang valid: Year. Nilai default: Year. |
Year |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilainya, tetapi Anda harus memastikan bahwa nilainya unik di antara permintaan yang berbeda. ClientToken hanya boleh berisi karakter ASCII dan tidak boleh melebihi 64 karakter. Untuk informasi selengkapnya, lihat Cara memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
| AutoRenew |
boolean |
No |
Menentukan apakah perpanjangan otomatis diaktifkan.
Nilai default: false. |
true |
| AutoRenewPeriod |
integer |
No |
Durasi perpanjangan otomatis. Unit: bulan. Parameter ini hanya berlaku saat AutoRenew diatur ke true. Nilai yang valid: 12 dan 36. Nilai default: 12. |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
8C314443-AF0D-4766-9562-C83B7F1**** |
| ReservedInstanceIdSets |
object |
||
| ReservedInstanceId |
array |
Daftar ID instance terreservasi. |
|
|
string |
ID instance terreservasi. |
ecsri-2ze53qonjqxg7r**** |
|
| OrderId |
string |
ID pesanan. |
2023912123**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "8C314443-AF0D-4766-9562-C83B7F1****",
"ReservedInstanceIdSets": {
"ReservedInstanceId": [
"ecsri-2ze53qonjqxg7r****"
]
},
"OrderId": "2023912123****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidInstanceType.ValueUnauthorized | The specified InstanceType is not authorized. | |
| 400 | InvalidParameter.Conflict | The specified region and cluster do not match. | |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | |
| 400 | InvalidPeriodUnit.ValueNotSupported | The specified parameter PeriodUnit is not valid. | |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | |
| 400 | InvalidChargeType.ValueNotSupported | ChargeType is not valid. | |
| 400 | OperationDenied | The specified InstanceType or Zone is not authorized for current user. | |
| 400 | InvalidPeriod | The specified Period or PeriodUnit is not correct. | |
| 400 | MissingParameter.ReservedInstanceIds | The specified ReservedInstanceIds does not exist. | |
| 400 | InvalidParameter.PeriodUnit | The specified PeriodUnit is invalid. | |
| 400 | InvalidParameter.Period | The specified Period is invalid. | |
| 400 | InvalidParameter.ReservedInstanceIds | The specified ReservedInstanceIds is invalid. | |
| 400 | InvalidPeriod.ExceededMaximumExpiration | The specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | |
| 403 | OperationDenied | Sales of this resource are temporarily suspended in the specified region; please try again later. | |
| 403 | NodeControllerUnavailable | The Node Controller is temporarily unavailable. | |
| 403 | InvalidParameter.ResourceOwnerAccount | ResourceOwnerAccount is Invalid. | |
| 403 | Zone.NotOpen | The specified zone is not granted to you to buy resources yet. | |
| 403 | Zone.NotOnSale | The specified zone is not available for purchase. | |
| 403 | Account.Arrearage | Your account has been in arrears. | |
| 403 | InvalidReservedInstanceName.Malformed | The specified parameter ReservedInstanceName is invalid. | |
| 403 | InvalidParameter.Scope | The specified parameter 'Scope' is invalid. | |
| 403 | InvalidReservedInstanceStatus.ValueNotSupported | ReservedInstance status is not supported. | |
| 403 | InvalidReservedInstanceOfferingType.ValueNotSupported | The OfferingType is not supported. | |
| 403 | InvalidReservedInstanceOfferingClass.ValueNotSupported | The OfferingClass is not supported. | |
| 403 | MissingParameter.ZoneId | The specified zoneId should be not empty. | |
| 403 | MissingParameter.InstanceType | The instanceType should be not empty. | |
| 403 | MissingParameter.ReservedInstanceId | The ids of reservedInstance can not be empty. | |
| 403 | MissingParameter.ReservedInstanceConfiguration | The configurations of reservedInstance can not be empty. | |
| 403 | InvalidParameter.SplitOrMerge | The Many-to-many of modification is not supported. | |
| 403 | MissingParameter.InstanceTypeAndAmountBothEmpty | The instanceType and amount can not be both empty. | |
| 403 | InvalidReservedInstancePlatform.ValueNotSupported | The Platform is not supported. | |
| 403 | InvalidParameter.ReservedInstanceName | The reservedInstanceName is invalid. | |
| 403 | InvalidReservedInstanceZone.ValueNotSupported | The zoneId is not exist. | |
| 403 | InvalidParameter.ValueNotSupported | The instanceTypeFamily of the instance to be changed must be consistent. | |
| 403 | IncorrectInstanceStatus | The status of specified reservedInstance must be active. | |
| 403 | InvalidPlatform.ValueNotSupported | The platform of reservedInstance is invalid. | |
| 403 | InvalidScope.ValueNotSupported | The scope of reservedInstance is invalid, The valid value is Zone or Region. | |
| 403 | InvalidConfiguration.ValueNotSupported | The modification Configuration should not be empty. | |
| 403 | InvalidZoneId.ValueNotSupported | The specified zoneId should be same. | |
| 403 | InvalidParameter | The parameter is invalid.Please check it. | |
| 403 | InvalidInstanceAmount.ValueNotSupported | The instanceAmount is invalid. | |
| 403 | OperationDenied.OnlyModifyName | It is not allowed to modify the ReservedInstanceName only. | |
| 403 | InvalidReservedInstanceId.NotFound | The specified parameter ReservedInstanceId is invalid. | |
| 403 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | |
| 404 | InvalidZoneId.NotFound | The ZoneId provided does not exist in our records. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.