Tüm Ürünler
Search
Belge Merkezi

:SetBackendServers

Son Güncelleme:Sep 29, 2026

Arka uç sunucu ağırlığını ayarlar.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

slb:SetBackendServers

update

instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

*loadbalancer

acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}

  • ecs:tag
  • slb:tag
  • slb:tag
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

Classic Load Balancer (CLB) örneğinin bölge kimliği.

cn-hangzhou

LoadBalancerId

string

Yes

Classic Load Balancer (CLB) örneğinin kimliği.

lb-bp1qjwo61pqz3a******

BackendServers

string

No

Eklenecek arka uç sunucuların listesi. Liste aşağıdaki parametreleri içerir:

  • ServerId: Dize, zorunlu. Arka uç sunucunun örnek kimliği. Değer, bir ECS örneğinin, ENI örneğinin veya ECI örneğinin kimliği olabilir. ServerId bir ENI veya ECI örneğinin kimliği olarak ayarlanırsa, Type parametresi zorunludur.

  • Weight: Arka uç sunucunun ağırlığı. Geçerli değerler: 0 ile 100 arası. Varsayılan değer: 100. Değer 0 olarak ayarlanırsa, arka uç sunucuya hiçbir istek yönlendirilmez.

  • Description: Dize, isteğe bağlı. Arka uç sunucunun açıklaması. Açıklama 1 ila 80 karakter uzunluğunda olmalı ve Çince karakterler, harfler, rakamlar, tire (-), eğik çizgi (/), nokta (.) ve alt çizgi (_) içerebilir.

  • Type: Arka uç sunucunun sunucu türü. Geçerli değerler:

    • ecs: ECS örneği (varsayılan).

    • eni: ağ arabirimi denetleyicisi (NIC) örneği.

    • eci: Elastic Container Instance (ECI) örneği.

Not

Yalnızca performans garantili örnekler, eni ve eci türündeki arka uç sunucuların eklenmesini destekler.

  • ServerIp: ENI veya ECI örneğinin IP adresi.

Örnekler:

  • Bir ECS örneği bağlama:

    [{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Description":"test-112" }]

  • Bir ENI bağlama:

    [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Description":"test-112" }]

  • Birden fazla IP adresine sahip bir ENI bağlama:

    [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Description":"test-113" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Description":"test-113" }]

  • Bir ECI örneği bağlama:

    [{ "ServerId": "eci-xxxxxxxxx", "Weight": "100", "Type": "eci", "ServerIp": "192.168.**.**", "Description":"test-114" }]

Not

Yalnızca çalışır durumdaki arka uç sunucular bir Server Load Balancer örneğine eklenebilir. Her çağrıda en fazla 20 arka uç sunucu ekleyebilirsiniz.

[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Description":"test-113" }]

Response elements

Element

Type

Description

Example

object

LoadBalancerId

string

Classic Load Balancer (CLB) örneğinin kimliği.

lb-bp1qjwo61pqz3a******

RequestId

string

İstek kimliği.

365F4154-92F6-4AE4-92F8-7F******

BackendServers

object

BackendServer

array<object>

Arka uç sunucuların listesi.

object

Arka uç sunucuların listesi.

Type

string

Arka uç sunucunun sunucu türü. Geçerli değerler:

  • ecs (varsayılan): ECS örneği.

  • eni: ağ arabirimi denetleyicisi (NIC) örneği.

  • eci: Elastic Container Instance (ECI) örneği.

eni

Weight

string

Arka uç sunucunun ağırlığı.

100

Description

string

Arka uç sunucunun açıklaması.

The description of the backend server.

ServerId

string

Arka uç sunucunun kimliği.

eni-hhshhs****

Examples

Success response

JSON format

{
  "LoadBalancerId": "lb-bp1qjwo61pqz3a******",
  "RequestId": "365F4154-92F6-4AE4-92F8-7F******",
  "BackendServers": {
    "BackendServer": [
      {
        "Type": "eni",
        "Weight": "100",
        "Description": "The description of the backend server.",
        "ServerId": "eni-hhshhs****"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Mismatched.ZoneId The zone of the server is not matched with the cloud box loadbalancer.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.