Membuat instans Application Load Balancer (ALB) di wilayah tertentu.
Deskripsi operasi
The CreateLoadBalancer operation is asynchronous. A successful call returns an instance ID, but the application load balancer instance is created in the background. Call GetLoadBalancerAttribute to check the creation status of the application load balancer instance:
-
If the instance is in the provisioning state, it is being created.
-
If the instance is in the active state, it has been created.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:CreateLoadBalancer |
create |
*LoadBalancer
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai unik untuk setiap permintaan. Parameter ClientToken hanya mendukung karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem menggunakan RequestId dari permintaan sebagai ClientToken. |
5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run. Nilai valid:
|
false |
| VpcId |
string |
Yes |
ID virtual private cloud (VPC) tempat instans ALB akan dibuat. |
vpc-bp1b49rqrybk45nio**** |
| AddressType |
string |
Yes |
Tipe alamat IP instans ALB. Nilai valid:
|
Internet |
| LoadBalancerName |
string |
No |
Nama instans ALB. Nama harus terdiri dari 2 hingga 128 karakter. Nama harus dimulai dengan huruf atau angka, dan dapat berisi angka, titik (.), garis bawah (_), tanda hubung (-), dan spasi. |
alb1 |
| DeletionProtectionEnabled |
boolean |
No |
Apakah akan mengaktifkan perlindungan penghapusan. Nilai valid:
|
false |
| ModificationProtectionConfig |
object |
No |
Konfigurasi perlindungan modifikasi. |
|
| Reason |
string |
No |
The reason for enabling modification protection. The reason must be 2 to 128 characters long. It must start with a letter or a Chinese character, and can contain digits, periods (.), underscores (_), and hyphens (-). Catatan
This parameter is effective only when Status is set to ConsoleProtection. |
托管实例 |
| Status |
string |
No |
The modification protection status of the Application Load Balancer instance. Valid values:
Catatan
If you set the value to ConsoleProtection, you cannot modify the instance in the Application Load Balancer console. However, you can still modify it by calling API operations. |
ConsoleProtection |
| ZoneMappings |
array<object> |
Yes |
Pemetaan antara zona dan vSwitch. Anda dapat menentukan hingga 10 zona. Jika wilayah mendukung dua zona atau lebih, tentukan setidaknya dua zona. |
|
|
object |
No |
The mappings between availability zones and subnets. You can specify up to 10 availability zones. If the region has two or more availability zones, you must specify at least two. |
||
| VSwitchId |
string |
Yes |
The ID of the subnet in the specified availability zone. Each availability zone can be mapped to only one subnet. |
vsw-sersdf**** |
| ZoneId |
string |
Yes |
The ID of the availability zone. You can call the DescribeZones operation to query for available zones. |
cn-hangzhou-a |
| AllocationId |
string |
No |
The ID of the Elastic IP address (EIP) to associate with the public-facing instance. |
eip-bp1aedxso6u80u0qf**** |
| EipType |
string |
No |
The type of the Elastic IP address. Valid values:
Catatan
For regions that support binding Anycast EIPs to an Application Load Balancer instance, see Limitations. |
Common |
| IntranetAddress |
string |
No |
The private IPv4 address. |
192.168.10.1 |
| AddressAllocatedMode |
string |
No |
Mode alokasi alamat IP. Nilai valid:
Catatan
Mulai 00:00:00 pada 25 Februari 2025 (UTC+8), semua instans yang dibuat dengan memanggil operasi ini adalah instans ALB yang ditingkatkan terlepas dari mode yang ditentukan. Mode IP tidak lagi dibedakan, dan alamat IP yang dialokasikan diskalakan secara otomatis. Instans ALB yang sudah ada yang dibuat sebelum peningkatan tidak terpengaruh. |
Fixed |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. |
rg-atstuj3rtop**** |
| LoadBalancerEdition |
string |
Yes |
Edisi instans ALB. Edisi yang berbeda menyediakan fitur yang berbeda dan menggunakan metode penagihan yang berbeda. Nilai valid:
|
Standard |
| LoadBalancerBillingConfig |
object |
Yes |
Konfigurasi penagihan instans ALB. |
|
| PayType |
string |
Yes |
The billing method of the instance. Set the value to PostPay for pay-as-you-go. |
PostPay |
| BandwidthPackageId |
string |
No |
The ID of the shared bandwidth package that is associated with the public-facing instance. |
cbwp-bp1vevu8h3ieh**** |
| AddressIpVersion |
string |
No |
Versi IP. Nilai valid:
|
IPv4 |
| Tag |
array<object> |
No |
Tag yang akan ditambahkan ke instans. |
|
|
object |
No |
The tag structure. |
||
| Key |
string |
No |
The tag key. The key can be up to 128 characters long, cannot start with aliyun or acs:, and cannot contain http:// or https://. |
env |
| Value |
string |
No |
The tag value. The value can be up to 128 characters long, cannot start with aliyun or acs:, and cannot contain http:// or https://. |
product |
| SecurityGroupIds |
array<object> |
No |
ID grup keamanan yang akan dikaitkan dengan instans. |
|
|
object |
No |
The IDs of the security groups to associate with the instance. |
||
| SecurityGroupId |
string |
No |
The ID of the security group. |
sg-gw82chzr7ru23iwbn9mu |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response from creating an Application Load Balancer instance. |
||
| LoadBalancerId |
string |
The Application Load Balancer instance ID. |
alb-o9ulmq5hqn68jk**** |
| RequestId |
string |
The request ID. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
Contoh
Respons sukses
JSONformat
{
"LoadBalancerId": "alb-o9ulmq5hqn68jk****",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ResourceNotEnough.VSwitchIp | The specified resource %s is not enough. | |
| 400 | QuotaExceeded.LoadBalancersNum | The quota of %s is exceeded, usage %s/%s. | |
| 400 | Mismatch.ZoneIdAndVSwitchId | The %s and %s are mismatched. | |
| 400 | DuplicatedParam.ZoneId | The param of ZoneId is duplicated. | |
| 400 | OperationDenyed.ServiceLinkedRoleNotExist | The service linked role AliyunServiceRoleForAlb does not exist. | |
| 404 | ResourceNotFound.VSwitch | The specified resource %s is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.