All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Oct 26, 2026

Queries the details of a load balancing instance.

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

gwlb:GetLoadBalancerAttribute

get

*LoadBalancer

acs:gwlb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

LoadBalancerId

string

Yes

The ID of the gateway load balancing instance.

gwlb-9njtjmqt7zfcqm****

Response elements

Element

Type

Description

Example

object

AddressIpVersion

string

The protocol version. Valid values:

  • Ipv4: IPv4.

Ipv4

CreateTime

string

The time when the resource was created. The time is in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ.

2024-07-08T10:12:58Z

LoadBalancerBusinessStatus

string

The business status of the gateway load balancing instance. Valid values:

  • Normal: Normal.

  • FinancialLocked: Locked due to overdue payment.

Normal

LoadBalancerId

string

The ID of the gateway load balancing instance.

gwlb-9njtjmqt7zfcqm****

LoadBalancerName

string

The name of the gateway load balancing instance.

The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character.

gwlb

LoadBalancerStatus

string

The instance status of the gateway load balancing instance. Valid values:

  • Active: Running.

  • Inactive: Stopped. The listeners of the instance no longer forward traffic.

  • Provisioning: Creating.

  • Configuring: Upgrade/Downgrade.

Active

RequestId

string

The ID of the request.

B6DC5DDC-9560-59BF-80FA-ED1E5CB417DF

ResourceGroupId

string

The ID of the resource group.

rg-acfmx7pmxcy****

Tags

array<object>

The list of tags.

object

The tag object.

Key

string

The tag key. The tag key cannot be an empty string.

A tag key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

testTagKey

Value

string

The tag value. A tag value can be up to 256 characters in length and cannot contain http:// or https://.

testTagValue

VpcId

string

The ID of the virtual private cloud (VPC).

vpc-k1aajsbwbaq4todet****

ZoneMappings

array<object>

The list of zone and vSwitch mappings. You must specify at least one zone and can specify up to 20 zones. If the region has two or more zones, specify at least two zones.

array<object>

The zone and vSwitch mapping.

LoadBalancerAddresses

array<object>

The list of addresses for the gateway load balancing instance.

object

The address object of the gateway load balancing instance.

EniId

string

The ID of the elastic network interface controller (NIC).

eni-bp1iahwz3rzgvltz****

PrivateIpv4Address

string

The IPv4 private network address.

192.168.XX.XX

VSwitchId

string

The vSwitch associated with the zone. Each zone can use only one vSwitch and one subnet.

vsw-uf6v8l7d2f1k53xrl****

ZoneId

string

The zone ID.

cn-hangzhou-j

TrafficMode

string

The traffic mode. Valid values:

  • LoadBalance: Load balancing.

  • ByPass: Bypass mode.

LoadBalance

Examples

Success response

JSON format

{
  "AddressIpVersion": "IPv4",
  "CreateTime": "2024-07-08T10:12:58Z",
  "LoadBalancerBusinessStatus": "Normal",
  "LoadBalancerId": "gwlb-9njtjmqt7zfcqm****",
  "LoadBalancerName": "gwlb",
  "LoadBalancerStatus": "Active",
  "RequestId": "B6DC5DDC-9560-59BF-80FA-ED1E5CB417DF",
  "ResourceGroupId": "rg-acfmx7pmxcy****",
  "Tags": [
    {
      "Key": "testTagKey",
      "Value": "testTagValue"
    }
  ],
  "VpcId": "vpc-k1aajsbwbaq4todet****",
  "ZoneMappings": [
    {
      "LoadBalancerAddresses": [
        {
          "EniId": "eni-bp1iahwz3rzgvltz****",
          "PrivateIpv4Address": "192.168.XX.XX"
        }
      ],
      "VSwitchId": "vsw-uf6v8l7d2f1k53xrl****",
      "ZoneId": "cn-hangzhou-j"
    }
  ],
  "TrafficMode": "LoadBalance"
}

Error codes

HTTP status code

Error code

Error message

Description

400 ResourceNotFound.LoadBalancer The specified resource of %s is not found.
400 MissingParam.LoadBalancerId The param of LoadBalancerId is missing. Load balancing ID parameter missing

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.