Membuat instans Network Load Balancer (NLB) di wilayah tertentu.
Deskripsi operasi
-
Saat membuat instans NLB, peran terkait layanan AliyunServiceRoleForNlb akan dibuat dan ditetapkan untuk Anda secara otomatis.
-
CreateLoadBalancer merupakan operasi asinkron. Setelah mengirim permintaan, sistem mengembalikan ID instans dan menjalankan tugas di latar belakang. Anda dapat memanggil GetLoadBalancerAttribute untuk mengecek status instans NLB.
Jika instans NLB berada dalam status Provisioning, instans tersebut sedang dalam proses pembuatan.
Jika instans NLB berada dalam status Active, instans tersebut telah berhasil dibuat.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nlb:CreateLoadBalancer |
create |
*LoadBalancer
*VSwitch
EipAddress
*VPC
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| LoadBalancerType |
string |
No |
Tipe instans Server Load Balancer (SLB). Tetapkan nilainya ke network, yang menunjukkan instans NLB. |
network |
| LoadBalancerName |
string |
No |
Nama instans NLB. Panjangnya harus 2 hingga 128 karakter, dapat berisi huruf, angka, titik (.), garis bawah (_), dan tanda hubung (-), serta harus dimulai dengan huruf. |
NLB1 |
| AddressType |
string |
Yes |
Tipe alamat IPv4 yang digunakan untuk instans NLB. Nilai yang valid adalah:
Catatan
Untuk mengaktifkan alamat IPv6 publik pada instans NLB dual-stack, panggil operasi EnableLoadBalancerIpv6Internet. |
Internet |
| AddressIpVersion |
string |
No |
Versi alamat IP yang digunakan untuk instans NLB. Nilai yang valid:
|
ipv4 |
| VpcId |
string |
Yes |
ID VPC tempat Anda ingin membuat instans NLB. |
vpc-bp1b49rqrybk45nio**** |
| ZoneMappings |
array<object> |
Yes |
Pemetaan antara zona dan vSwitch. Instans NLB dapat ditempatkan di hingga 10 zona. Jika wilayah mendukung dua zona atau lebih, Anda harus menentukan minimal dua zona. |
|
|
object |
No |
Pemetaan antara zona dan vSwitch. Instans NLB dapat ditempatkan di hingga 10 zona. Jika wilayah mendukung dua zona atau lebih, Anda harus menentukan minimal dua zona. |
||
| VSwitchId |
string |
Yes |
ID vSwitch di zona tersebut. Anda hanya dapat menentukan satu vSwitch (subnet) di setiap zona instans NLB. Instans NLB dapat ditempatkan di hingga 10 zona. Jika wilayah mendukung dua zona atau lebih, Anda harus menentukan minimal dua zona. |
vsw-sersdf**** |
| ZoneId |
string |
Yes |
ID zona tempat instans NLB ditempatkan. Instans NLB dapat ditempatkan di hingga 10 zona. Jika wilayah mendukung dua zona atau lebih, tentukan minimal dua zona. Anda dapat memanggil operasi DescribeZones untuk menanyakan daftar zona terbaru. |
cn-hangzhou-a |
| PrivateIPv4Address |
string |
No |
Alamat IP virtual (VIP) versi IPv4 pribadi. Alamat IPv4 pribadi yang digunakan instans NLB untuk menyediakan layanan eksternal. |
192.168.10.1 |
| AllocationId |
string |
No |
ID alamat IP elastis (EIP) yang dikaitkan dengan instans NLB yang menghadap Internet. Setiap zona diberi satu EIP. Instans NLB dapat ditempatkan di hingga 10 zona. Jika wilayah mendukung dua zona atau lebih, tentukan minimal dua zona. |
eip-bp1aedxso6u80u0qf**** |
| Ipv6Address |
string |
No |
VIP versi IPv6. Alamat IPv6 yang digunakan instans NLB untuk menyediakan layanan eksternal. |
2408:400a:d5:3080:b409:840a:ca:e8e5 |
| Ipv4LocalAddresses |
array |
No |
Alamat IPv4 lokal. Alamat IP yang digunakan instans NLB untuk berkomunikasi dengan server backend. Jumlah alamat IP harus genap, minimal 2 dan maksimal 8. |
|
|
string |
No |
Alamat IPv4 lokal. |
192.168.10.2 |
|
| Ipv6LocalAddresses |
array |
No |
Alamat IPv6 lokal. Alamat IP yang digunakan instans NLB untuk berkomunikasi dengan server backend. Jumlah alamat IP harus genap, minimal 2 dan maksimal 8. |
|
|
string |
No |
Alamat IPv6 lokal. |
2408:400a:d5:3080:b409:840a:ca:e8e6 |
|
| BandwidthPackageId |
string |
No |
ID instans Bandwidth Internet Bersama yang dikaitkan dengan instans NLB yang menghadap Internet. |
cbwp-bp1vevu8h3ieh**** |
| LoadBalancerBillingConfig |
object |
No |
Pengaturan penagihan instans NLB. |
|
| PayType |
string |
No |
Metode penagihan instans NLB. Tetapkan nilainya ke PostPay, yang menunjukkan metode penagihan bayar sesuai pemakaian. |
PostPay |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya tempat instans tersebut berada. |
rg-atstuj3rtop**** |
| DryRun |
boolean |
No |
Lakukan dry run tanpa benar-benar membuat permintaan. Nilai yang valid adalah:
|
false |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token tersebut. Pastikan token unik di antara permintaan yang berbeda. Hanya karakter ASCII yang diizinkan. Catatan
Jika Anda tidak menentukan parameter ini, nilai RequestId akan digunakan.**** Nilai RequestId berbeda untuk setiap permintaan. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
No |
ID wilayah tempat instans NLB ditempatkan. Anda dapat memanggil operasi DescribeRegions untuk menanyakan daftar wilayah terbaru. |
cn-hangzhou |
| DeletionProtectionConfig |
object |
No |
Konfigurasi fitur perlindungan penghapusan. |
|
| Enabled |
boolean |
No |
Menentukan apakah fitur perlindungan penghapusan diaktifkan. Nilai yang valid:
|
false |
| Reason |
string |
No |
Alasan mengapa fitur perlindungan penghapusan diaktifkan atau dinonaktifkan. Panjang alasan harus 2 hingga 128 karakter, dapat berisi huruf, angka, titik (.), garis bawah (_), dan tanda hubung (-), serta harus dimulai dengan huruf. |
The instance is running |
| ModificationProtectionConfig |
object |
No |
Konfigurasi mode baca-saja konfigurasi. |
|
| Status |
string |
No |
Menentukan apakah mode baca-saja konfigurasi diaktifkan. Nilai yang valid:
Catatan
Jika parameter disetel ke ConsoleProtection, mode baca-saja konfigurasi diaktifkan. Anda tidak dapat mengubah konfigurasi instans NLB di Konsol NLB. Namun, Anda dapat memanggil operasi API untuk mengubah konfigurasi instans NLB. |
ConsoleProtection |
| Reason |
string |
No |
Alasan mengaktifkan mode baca-saja konfigurasi. Panjang alasan harus 2 hingga 128 karakter, dapat berisi huruf, angka, titik (.), garis bawah (_), dan tanda hubung (-), serta harus dimulai dengan huruf. Catatan
Parameter ini hanya berlaku ketika Status disetel ke ConsoleProtection. |
Service guarantee period |
| Tag |
array<object> |
No |
Tag. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag. Panjang kunci tag maksimal 64 karakter, tidak boleh dimulai dengan Anda dapat menentukan hingga 20 tag dalam setiap panggilan. |
env |
| Value |
string |
No |
Nilai tag. Panjang nilai tag maksimal 128 karakter, tidak boleh dimulai dengan Anda dapat menentukan hingga 20 tag dalam setiap panggilan. |
product |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
respons |
||
| RequestId |
string |
ID permintaan. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
| LoadbalancerId |
string |
ID instans NLB. |
nlb-83ckzc8d4xlp8o**** |
| OrderId |
integer |
ID pesanan untuk instans NLB. |
20230000 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"LoadbalancerId": "nlb-83ckzc8d4xlp8o****",
"OrderId": 20230000
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationDenied.OnlyPayByTrafficSupported | The operation is not allowed because of OnlyPayByTrafficSupported. | |
| 400 | OperationFailed.%s | The operation failed because of %s. | Failed to call the API operation due to %. |
| 400 | Mismatch.ZoneIdAndVswitchId | The ZoneIdAndVswitchId is mismatched for %s and %s. | |
| 400 | QuotaExceeded.%s | The quota of %s is exceeded, usage %s/%s. | |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | Request validation has been passed with DryRun flag set. |
| 400 | OperationDenied.OnlyPostPaidSupported | The operation is not allowed because of OnlyPostPaidSupported. | |
| 400 | OperationFailed.DuplicateZones. | The operation failed because of Can not Specify duplicate zones. | |
| 400 | ResourceNotEnough.VSwitchIp | The specified resource of VSwitchIp is not enough. | The specified virtual switch (vSwitch) IP resources are insufficient. |
| 400 | DuplicatedParam.AllocationId | The param of AllocationId is duplicated. | |
| 400 | ResourceInConfiguring.VswitchId | The specified resource of VswitchId is being configured, please try again later. | The specified resource of VswitchId is being configured, please try again later. |
| 400 | IllegalParam | The param of %s is illegal. | |
| 400 | OperationFailed.UnpaidBill | The operation failed because of UnpaidBill. | |
| 400 | OperationDenied.ServiceLinkedRoleNotExist | The operation is not allowed because of ServiceLinkedRoleNotExist. | The operation is not allowed because of ServiceLinkedRoleNotExist.Please check if the necessary permissions are granted in RAM for the NLB. |
| 400 | ResourceAlreadyAssociated.AllocationId | The specified resource of %s is already associated. | |
| 400 | OperationFailed.vSwitchNotSupportIpv6 | The operation failed because of vSwitchNotSupportIpv6. | |
| 400 | InvalidZones | The current zone list is illegal. | The Availability Zone used in Zone maping is illegal. |
| 400 | QuotaExceeded.QuotaInsufficient | The quota of %s is exceeded, usage %s/%s. | The quota is insufficient, currently used %s/%s. Please modify the quota size in the quota center. |
| 400 | ResourceInUse.IP | The specified resource of IP is in use. | |
| 400 | OperationFailed.CreateOrderError | Operation failed because CreateOrderError. | The operation failed because the order creation failed. |
| 400 | OperationFailed.NotExist.ResourceGroup | Operation failed because ResourceGroup not exist. | The specified resource group does not exist. |
| 400 | IllegalParam.loadBalancerName | Param loadBalancerName is illegal. | The instance name is invalid. Check the parameters. |
| 400 | SystemBusy | System is busy, please try again later. | |
| 400 | MissingParam.%s | The parameter of %s is missing. | |
| 400 | IllegalParam.DeletionProtectionConfig | DeletionProtectionConfig reason is illegal. | The reason parameter for changing the delete protection status is invalid. |
| 400 | IllegalParam.ModificationProtectionConfig | ModificationProtectionConfig reason is illegal. | ModificationProtectionConfig reason is illegal. |
| 400 | Throttling.User | Request was denied due to api flow control. | Request was denied due to api flow control. |
| 403 | UnauthorizedZone | The specified zone of %s is not authorized. | |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. | Authentication is failed for NoPermission. |
| 403 | UnauthorizedRegion | The specified region of %s is not authorized. | |
| 404 | ResourceNotFound.VSwitch | The specified resource of vSwitch is not found. | The specified vSwitch resource was not found. Please check the input parameters. |
| 404 | ResourceNotFound.Vpc | The specified resource of Vpc is not found. | The specified VPC resource was not found. Please check the input parameters. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.