All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Aug 28, 2026

Queries detailed information about a Gateway Load Balancer (GWLB) instance, including its status, zone mappings, and tags.

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 GWLB instance ID.

gwlb-9njtjmqt7zfcqm****

Response elements

Element

Type

Description

Example

object

AddressIpVersion

string

The IP version of the instance. Valid values:

  • Ipv4: IPv4.

IPv4

CreateTime

string

The time when the GWLB instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2024-07-08T10:12:58Z

LoadBalancerBusinessStatus

string

The business status of the GWLB instance. Valid values:

  • Normal: running as expected

  • FinancialLocked: locked due to overdue payments

Normal

LoadBalancerId

string

The GWLB instance ID.

gwlb-9njtjmqt7zfcqm****

LoadBalancerName

string

The GWLB instance name.

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

gwlb

LoadBalancerStatus

string

The GWLB instance status. Valid values:

  • Active: The GWLB instance is running.

  • Inactive: The GWLB instance is disabled. Listeners on disabled instances do not forward traffic.

  • Provisioning: The GWLB instance is being created.

  • Configuring: The GWLB instance is being modified.

Active

RequestId

string

The request ID.

B6DC5DDC-9560-59BF-80FA-ED1E5CB417DF

ResourceGroupId

string

The resource group ID.

rg-acfmx7pmxcy****

Tags

array<object>

The tags.

object

The information about the tag.

Key

string

The tag key. Must not be empty.

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

testTagKey

Value

string

The tag value. Up to 256 characters in length. Must not contain http:// or https://.

testTagValue

VpcId

string

The VPC ID.

vpc-k1aajsbwbaq4todet****

ZoneMappings

array<object>

The zone-to-vSwitch mappings. At least one zone is required, and up to 20 zones are supported. If the region supports two or more zones, specify at least two zones.

array<object>

The information about the zones and vSwitches.

LoadBalancerAddresses

array<object>

The GWLB instance addresses.

object

The details of the GWLB instance addresses.

EniId

string

The ENI (elastic network interface) ID used by the GWLB instance.

eni-bp1iahwz3rzgvltz****

PrivateIpv4Address

string

The private IPv4 address.

192.168.XX.XX

VSwitchId

string

The vSwitch in the zone. Only one vSwitch (subnet) can be specified per zone for a GWLB instance.

vsw-uf6v8l7d2f1k53xrl****

ZoneId

string

The zone ID.

cn-hangzhou-j

TrafficMode

string

The traffic processing mode. Valid values:

  • LoadBalance: load balancing mode. GWLB forwards traffic to backend servers.

  • ByPass: bypass mode. GWLB returns traffic directly to the GWLB endpoint without forwarding it to backend servers.

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.