Membuat server aplikasi sederhana langganan.
Deskripsi operasi
Before you call this operation, we recommend that you understand the billing rules of Simple Application Server. For more information, see Billable items.
If you have coupons in your Alibaba Cloud account, the coupons are preferentially used to pay for the simple application servers.
-
You can create a maximum of 50 simple application servers in a region for an Alibaba Cloud account.
-
When you call this operation to create simple application servers, make sure that the balance in your account is sufficient to pay for the servers. If the balance in your account is insufficient, the servers cannot be created.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:CreateInstances |
create |
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID Wilayah server aplikasi sederhana. Anda dapat memanggil operasi ListRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ImageId |
string |
Yes |
ID image. Anda dapat memanggil operasi ListImages untuk mengkueri image yang tersedia di wilayah yang ditentukan. |
e2c9c365024a44369c9b955a998a**** |
| PlanId |
string |
Yes |
ID paket. Anda dapat memanggil operasi ListPlans untuk mengkueri semua paket yang disediakan oleh Simple Application Server di wilayah yang ditentukan. |
swas.s1.c1m1s40b3t05 |
| Period |
integer |
Yes |
Periode langganan server. Unit: bulan. Nilai valid: 1, 3, 6, 12, 24, dan 36. |
1 |
| AutoRenew |
boolean |
No |
Apakah akan mengaktifkan perpanjangan otomatis. Nilai valid:
Nilai default: false. |
false |
| AutoRenewPeriod |
integer |
No |
Periode perpanjangan otomatis. Parameter ini diperlukan hanya jika Anda menetapkan AutoRenew ke true. Unit: bulan. Nilai valid: 1, 3, 6, 12, 24, dan 36. |
3 |
| DataDiskSize |
integer |
No |
Ukuran disk data yang dilampirkan ke server. Unit: GB. Nilai valid: 0 hingga 16380. Nilai harus merupakan kelipatan bulat dari 20.
Nilai default: 0. |
20 |
| Amount |
integer |
No |
Jumlah server aplikasi sederhana yang ingin Anda buat. Nilai valid: 1 hingga 20. Nilai default: 1. |
1 |
| ChargeType |
string |
No |
Metode penagihan server aplikasi sederhana. Tetapkan nilai ke PrePaid, yang menunjukkan metode penagihan langganan. Nilai default: PrePaid. |
PrePaid |
| ClientToken |
string |
No |
Token Klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan Klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Nilai ClientToken hanya dapat berisi karakter ASCII dan tidak boleh melebihi 64 karakter. Untuk informasi lebih lanjut, lihat Cara memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
30637AD6-D977-4833-A54C-CC89483E1FEE |
| InstanceIds |
array |
The IDs of the simple application servers. |
|
|
string |
The ID of the simple application server. |
3a658ca270df4df39f22e289b338**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "30637AD6-D977-4833-A54C-CC89483E1FEE",
"InstanceIds": [
"3a658ca270df4df39f22e289b338****"
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ExceedAccountQuota | The accumulated instance amounts including this order have exceeded the quota of the account. | |
| 400 | NotEnoughStock | The stock is insufficient. | |
| 400 | PlatformNotMatch | The platform of specified ImageId and PlanId does not match. | |
| 400 | InvalidPeriod.ValueNotSupported | The specified parameter Period is invalid. | |
| 400 | InvalidDataDiskSize.ValueNotSupported | The specified parameter DataDiskSize is invalid. | |
| 400 | InvalidAmount.ValueNotSupported | The specified parameter Amount is invalid. | |
| 400 | InvalidChargeType.ValueNotSupported | The specified parameter ChargeType is invalid. | |
| 400 | InvalidAutoRenewPeriod.ValueNotSupported | The specified parameter AutoRenewPeriod is invalid. | |
| 400 | InvalidPlanIdSize.ValueNotSupported | The system disk size in the specified planId does not support the image. | |
| 400 | InvalidPlanMemorySize.ValueNotSupported | The memory size in the specified planId does not support the image. | |
| 400 | CSS_SYSTEM_ERROR | The sales system encountered an error. | |
| 400 | SWAS_NOT_ENOUGH_ACTIVITY_STOCK | The configuration you selected is sold out in the current region. Please try to select another configuration or region. | |
| 500 | InternalError | An error occurred while processing your request. | |
| 500 | NotEnoughUpgradeStock | The upgrade stock is insufficient. | |
| 403 | PaymentFailed | Payment failed. Please check your account balance. | |
| 403 | InvalidInstance.UnPaidOrder | The specified Instance has an unpaid order. | |
| 403 | InvalidParam | The specified parameter value is invalid. | |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. | |
| 404 | InvalidPlanId.NotFound | The specified PlanId does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.