Memanggil SetBackendServers untuk mengatur bobot server backend.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:SetBackendServers |
update |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| LoadBalancerId |
string |
Yes |
ID instans Server Load Balancer (SLB). |
lb-5s7crik3yo3bp03gqrbp5**** |
| BackendServers |
array<object> |
Yes |
Daftar server backend yang akan ditambahkan. Anda dapat memodifikasi maksimal 20 server backend dalam setiap panggilan. |
|
|
object |
No |
Daftar server backend. |
||
| ServerId |
string |
Yes |
ID instans server backend. |
i-5ze0o05xccvbljtn**** |
| Weight |
integer |
Yes |
Bobot server backend. Nilai default: 100. Nilai valid: 0 hingga 100. Catatan
Jika nilainya 0, permintaan tidak akan diteruskan ke server backend. |
20 |
| Type |
string |
No |
Tipe server backend. Nilai valid:
|
ens |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Respons. |
||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| BackendServers |
object |
||
| BackendServer |
array<object> |
Daftar server backend. |
|
|
object |
Daftar server backend. |
||
| ServerId |
string |
The ID of the instance that you want to use as the backend server. |
i-5uf6hj58zvml4ali8**** |
| Weight |
integer |
The weight of the backend server. Default value: 100. Valid values: 0 to 100. Catatan
The value 0 indicates that requests are not forwarded to the backend server. |
100 |
| Type |
string |
The type of the backend server. Valid values:
|
ens |
| Ip |
string |
The IP address of the backend server. |
192.168.0.1 |
| Port |
integer |
The backend port that is used by the ELB instance. |
0 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"BackendServers": {
"BackendServer": [
{
"ServerId": "i-5uf6hj58zvml4ali8****",
"Weight": 100,
"Type": "ens",
"Ip": "192.168.0.1",
"Port": 0
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ens.interface.error | An error occurred while call the API. | |
| 400 | LoadBalancerNotFound | The input parameter loadBalancerId that is not found. | |
| 400 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 400 | BackendServerNotFound | The input parameter serverId that is not found. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | InstanceNotFound | The input parameter instanceId that is not found. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.