Membuat jaminan elastisitas dengan menentukan parameter seperti zona di region tempat jaminan elastisitas berada, tipe instance, durasi pembelian, dan apakah akan mengaktifkan perpanjangan otomatis.
Deskripsi operasi
Jaminan elastisitas adalah metode pembelian dan penggunaan sumber daya baru yang menggabungkan fleksibilitas dan kepastian. Ini adalah layanan reservasi sumber daya yang menyediakan jaminan deterministik untuk instance ECS pay-as-you-go. Untuk informasi lebih lanjut, lihat Tinjauan jaminan elastisitas.
Setelah Anda membeli jaminan elastisitas, jaminan elastisitas reguler mendukung pengembalian dana, tetapi jaminan elastisitas tersegmentasi waktu tidak. Untuk detail penagihan, lihat Jaminan sumber daya.
Anda hanya dapat menggunakan jaminan elastisitas untuk membuat instance ECS yang menggunakan metode penagihan pay-as-you-go.
Saat ini, jumlah jaminan elastisitas hanya mendukung mode unlimited. Artinya, parameter
AssuranceTimeshanya dapat diatur keUnlimited. Setelah jaminan elastisitas mode unlimited mulai berlaku, ia akan dijalankan secara otomatis.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:CreateElasticityAssurance |
create |
*ElasticityAssurance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID region dari jaminan elastisitas. Anda dapat memanggil DescribeRegions untuk menanyakan daftar region Alibaba Cloud terbaru. |
cn-hangzhou |
| ResourceGroupId |
string |
No |
ID grup sumber daya tempat jaminan elastisitas berada. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
Daftar tag dari jaminan elastisitas. |
|
|
object |
No |
Informasi pasangan tag. |
||
| Value |
string |
No |
Nilai tag dari jaminan elastisitas. Nilai valid N: 1 sampai 20. Setelah suatu nilai diteruskan, string kosong diperbolehkan. Nilai dapat memiliki panjang hingga 128 karakter, tidak boleh diawali dengan |
TestValue |
| Key |
string |
No |
Kunci tag dari jaminan elastisitas. Nilai valid N: 1 sampai 20. Setelah suatu nilai diteruskan, string kosong tidak diperbolehkan. Nilai dapat memiliki panjang hingga 128 karakter, tidak boleh diawali dengan |
TestKey |
| Period |
integer |
No |
Durasi pembelian. Satuan durasi ditentukan oleh parameter
Nilai default: 1. |
1 |
| PeriodUnit |
string |
No |
Satuan durasi pembelian. Nilai valid:
Nilai default: Year. |
Year |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai, tetapi Anda harus memastikan bahwa itu unik di antara permintaan yang berbeda. Nilai |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| PrivatePoolOptions.Name |
string |
No |
Nama jaminan elastisitas. Nama harus memiliki panjang 2 sampai 128 karakter. Harus diawali dengan huruf atau karakter Cina dan tidak boleh diawali dengan |
eapTestName |
| Description |
string |
No |
Deskripsi jaminan elastisitas. Deskripsi harus memiliki panjang 2 sampai 256 karakter dan tidak boleh diawali dengan Parameter ini dibiarkan kosong secara default. |
This is description. |
| PrivatePoolOptions.MatchCriteria |
string |
No |
Mode pencocokan dari jaminan elastisitas. Nilai valid:
Nilai default: Open. |
Open |
| AssuranceTimes |
string |
No |
Total jumlah kali jaminan elastisitas dapat digunakan. Nilai: Unlimited. Hanya mode unlimited yang didukung dalam periode validitas layanan. Nilai default: Unlimited. |
Unlimited |
| InstanceAmount |
integer |
No |
Total jumlah instance yang perlu dicadangkan dalam suatu tipe instance. Nilai valid: 1 sampai 1000. Penting Parameter ini wajib diisi. |
2 |
| InstanceCpuCoreCount |
integer |
No |
Catatan
Parameter ini sudah usang. |
null |
| StartTime |
string |
No |
Waktu kapan jaminan elastisitas mulai berlaku. Nilai default adalah waktu ketika operasi CreateElasticityAssurance dipanggil untuk membuat jaminan elastisitas. Tentukan waktu dalam standar ISO 8601 dengan format |
2020-10-30T06:32:00Z |
| ZoneId |
array |
Yes |
ID zona di region tempat jaminan elastisitas dibuat. Saat ini, jaminan elastisitas hanya dapat dibuat dalam satu zona. |
cn-hangzhou-h |
|
string |
No |
ID zona di region tempat jaminan elastisitas dibuat. |
cn-hangzhou-h |
|
| InstanceType |
array |
Yes |
Tipe instance. Saat ini, jaminan elastisitas hanya mendukung satu tipe instance. |
ecs.c6.xlarge |
|
string |
No |
Tipe instance. |
ecs.c6.xlarge |
|
| RecurrenceRules |
array<object> |
No |
Daftar aturan perulangan dari jaminan elastisitas tersegmentasi waktu. |
|
|
object |
No |
Aturan perulangan dari jaminan elastisitas tersegmentasi waktu. |
||
| StartHour |
integer |
No |
Waktu mulai dari jaminan tersegmentasi waktu. Nilai harus tepat pada jam. Catatan
Anda harus menentukan baik |
4 |
| RecurrenceType |
string |
No |
Tipe aturan perulangan. Nilai valid:
Catatan
Anda harus menentukan baik |
Daily |
| EndHour |
integer |
No |
Waktu akhir dari jaminan tersegmentasi waktu. Nilai harus tepat pada jam. |
10 |
| RecurrenceValue |
string |
No |
Nilai dari aturan perulangan.
Catatan
Anda harus menentukan baik |
1 |
| AutoRenew |
boolean |
No |
Menentukan apakah perpanjangan otomatis diaktifkan. Nilai valid:
Nilai default: false. |
true |
| AutoRenewPeriod |
integer |
No |
Durasi perpanjangan otomatis. Satuan: bulan. Nilai valid: 1, 2, 3, 6, 12, 24, dan 36.
Catatan
Parameter ini wajib diisi ketika |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| PrivatePoolOptionsId |
string |
ID dari jaminan elastisitas. |
eap-bp67acfmxazb4**** |
| OrderId |
string |
ID dari order yang dihasilkan. |
1234567890 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PrivatePoolOptionsId": "eap-bp67acfmxazb4****",
"OrderId": "1234567890"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidOperation.PeriodUnitUnsupported | TimeDivisionElasticityAssurance only supports PeriodUnit of Day. | |
| 400 | InvalidParameter.RegionId | The specified RegionId is invalid. | |
| 400 | OperationDenied | The specified instanceType or zone is not available or not authorized. | |
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | |
| 400 | InvalidStartTime.NotSupported | The specified StartTime should be within 180 calendar days from the current date, and you must specify a precision to hour. | |
| 400 | InvalidStartTime.MalFormed | The specified StartTime is out of the permitted range. | |
| 400 | Invalid.PrivatePoolOptionsName.MalFormed | The specified PrivatePoolOptions.Name is not valid. | |
| 400 | Invalid.ZoneId | The specified ZoneId is not valid. | |
| 400 | Invalid.InstanceType | The specified InstanceType is not valid. | |
| 400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | |
| 400 | SpotNotSupported | Spot is not supported for PrivatePool. | |
| 400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | |
| 400 | Invalid.InstanceId | Instance does not exist. | |
| 400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | |
| 400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | |
| 400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | |
| 400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | |
| 400 | Invalid.PrivatePoolOptions.status | The PrivatePool status is not valid. | |
| 400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | |
| 400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | |
| 400 | MissingParameter.PackageType | The specified parameter "PackageType" can not be empty. | |
| 400 | MissingParameter.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" can not be empty. | |
| 400 | MissingParameter.InstanceCpuCoreCount | The specified parameter "InstanceCpuCoreCount" can not be empty. | |
| 400 | MissingParameter.InstanceAmount | The specified parameter "InstanceAmount" can not be empty. | |
| 400 | MissingParameter.InstanceCpuCoreCountOrInstanceAmount | The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. | |
| 400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | |
| 400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | |
| 400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | |
| 400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | |
| 400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | |
| 400 | Invalid.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. | |
| 400 | Invalid.PackageType | The specified parameter "PackageType" is invalid. | |
| 400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | |
| 400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | |
| 400 | RepeatStartPrivatePool | PrivatePool has already been started. | |
| 400 | Invalid.PeriodUnit | Only Month or Year is supported for PeriodUnit. | |
| 400 | AccountForbidden.ProductCreationLimited | The commodity must be officially operated by Aliyun and in pay-as-you-go billing method. | |
| 400 | RegionUnauthorized | There is no authority to create private pool in the specified region. | |
| 400 | PriceNotFound | The price of your queried resource is not available now, please try other resources. | |
| 400 | InvalidRecurrenceRules.CountLimitExceeded | The count of RecurrenceRules exceeds the limit. | |
| 400 | InvalidRecurrenceRulesStartHourEndHour.TooShort | The recurrence hour between RecurrenceRules.StartHour and RecurrenceRules.EndHour is too short. | |
| 400 | InvalidParameter.RecurrenceRulesStartHourEndHour | The specified parameter RecurrenceRules.StartHour or RecurrenceRules.EndHour is invalid. | |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceValueMonthly | The specified parameter RecurrenceRules.RecurrenceValue for Monthly is invalid. | |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceValueWeekly | The specified parameter RecurrenceRules.RecurrenceValue for Weekly is invalid. | |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceValueDaily | The specified parameter RecurrenceRules.RecurrenceValue for Daily is invalid. | |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceType | The specified parameter RecurrenceRules.RecurrenceType is invalid. | |
| 400 | InvalidAutoRenewPeriod.ValueNotSupported | The specified autoRenewPeriod is invalid. | |
| 400 | InvalidOperation.ElasticityAssuranceActiveTimeTooShort | The total active time of the ElasticityAssurance is too short. | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 403 | Zone.NotOpen | The specified zone is not granted to you to buy resources yet. | |
| 403 | InvalidResourceType.NotSupported | %s | |
| 403 | OperationDenied.NoStock | The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones. | |
| 403 | InvalidInstanceType.NotSupported | The specified InstanceType is invalid. | |
| 403 | Invalid.ZoneIds | At least one of the specified ZoneIds are invalid. | |
| 403 | Zone.NotOnSale | The specified zone is not available for purchase. | |
| 403 | QuotaExceed.ElasticityAssuranceCapacity | ElasticityAssurance Capacity quota exceeded. | |
| 403 | InvalidAccount.NotSupportEA | According to business rules, this account cannot purchase ECS ElasticityAssurance. | |
| 404 | InvalidZoneId.NotFound | The specified zoneId does not exist. | |
| 404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.