All Products
Search
Document Center

Server Load Balancer:DescribeLoadBalancerAttribute

Last Updated:Oct 12, 2026

Queries the details of a specified SLB instance.

Operation description

Note

If backend servers are added to a vServer group, call DescribeVServerGroupAttribute to query the details.

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:DescribeLoadBalancerAttribute

get

*loadbalancer

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

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

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID of the Classic Load Balancer instance.

You can call DescribeRegions to query region IDs.

cn-hangzhou

LoadBalancerId

string

Yes

The ID of the Classic Load Balancer instance.

lb-bp1b6c719dfa08ex****

Response elements

Element

Type

Description

Example

object

VpcId

string

The VPC ID of the internal-facing Classic Load Balancer instance.

vpc-25dvzy9f8****

Tags

object

Tag

array<object>

The list of tags.

object

The list of tags.

TagKey

string

The tag key of the instance. Valid values of N: 1 to 20. The tag key cannot be an empty string.

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

test

TagValue

string

The tag value of the instance. Valid values of N: 1 to 20. The tag value can be an empty string.

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

value

CreateTimeStamp

integer

The UNIX timestamp when the Classic Load Balancer instance was created.

1504147745000

CreateTime

string

The time when the Classic Load Balancer instance was created. The time is in the YYYY-MM-DDThh:mm:ssZ format.

2017-08-31T02:49:05Z

LoadBalancerId

string

The ID of the Classic Load Balancer instance.

lb-bp1b6c719dfa08ex****

PayType

string

The billing method of the Classic Load Balancer instance. Valid values:

  • PayOnDemand (default): pay-as-you-go.

PayOnDemand

AddressType

string

The address type of the Classic Load Balancer instance.

internet

NetworkType

string

The network type of the Classic Load Balancer instance.

vpc

AddressIPVersion

string

The IP version. Valid values: ipv4 and ipv6.

ipv4

RenewalCycUnit

string

The auto-renewal cycle. Valid values: Year and Month (default).

Note

This parameter is valid only for subscription instances on the China site, where PayType is set to PrePay and RenewalStatus is set to AutoRenewal.

Month

RequestId

string

The request ID.

365F4154-92F6-4AE4-92F8-7FF34B540710

Bandwidth

integer

The peak bandwidth of the Internet-facing instance that is billed by bandwidth.

5

LoadBalancerName

string

The name of the Classic Load Balancer instance.

lb-instance-test

Address

string

The endpoint of the Classic Load Balancer instance.

42.XX.XX.6

SlaveZoneId

string

The ID of the secondary zone for the Classic Load Balancer instance.

cn-hangzhou-d

EndTimeStamp

integer

The UNIX timestamp when the Classic Load Balancer instance expires.

3249380160000

MasterZoneId

string

The ID of the primary zone for the Classic Load Balancer instance.

cn-hangzhou-b

LoadBalancerSpec

string

The performance specification of the Classic Load Balancer instance.

Note

Instances that use pay-by-usage billing do not have a performance specification property. The default value slb.lcu.elastic is returned.

slb.s1.small

AutoReleaseTime

integer

The timestamp when the instance is released.

1513947075000

ModificationProtectionReason

string

The reason for setting the modification protection status. The reason must be 1 to 80 characters in length, and must start with a letter or Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-).

Note

This parameter is valid only when ModificationProtectionStatus is set to ConsoleProtection.

Instance service guarantee period

RegionId

string

The region ID of the Classic Load Balancer instance.

cn-hangzhou

ModificationProtectionStatus

string

The modification protection status of the Classic Load Balancer. Valid values:

  • NonProtection: Modification protection is not enabled. After you set this value, the previously configured ModificationProtectionReason is cleared.

  • ConsoleProtection: Configuration read-only mode is enabled in the console.

Note

When this parameter is set to ConsoleProtection, you cannot modify the instance configurations in the SLB console, but you can call API operations to modify the instance configurations.

ConsoleProtection

EndTime

string

The expiration time of the Classic Load Balancer instance. The time is in the YYYY-MM-DDThh:mm:ssZ format and displayed in UTC.

2022-09-08T16:00:00Z

VSwitchId

string

The vSwitch ID of the internal-facing instance.

vsw-255ecrwq5****

LoadBalancerStatus

string

The status of the Classic Load Balancer instance. Valid values:

  • inactive: The instance is stopped. Listeners of instances in this state do not forward traffic.

  • active: The instance is running. This is the default state after an instance is created.

  • locked: The instance is locked due to an overdue payment or being locked by Alibaba Cloud.

active

ResourceGroupId

string

The ID of the resource group.

rg-atstuj3rtop****

InternetChargeType

string

The billing method for Internet-facing instances. Valid values:

  • paybytraffic: pay-by-data-transfer.

  • paybybandwidth: pay-by-bandwidth.

paybytraffic

DeleteProtection

string

Indicates whether deletion protection is enabled for the instance.

Valid values: on and off.

off

RegionIdAlias

string

The region alias of the Classic Load Balancer instance.

cn-hangzhou

RenewalStatus

string

The renewal status. Valid values:

  • AutoRenewal: Auto-renewal is enabled.

  • Normal: Auto-renewal is disabled. You must manually renew the SLB instance.

  • NotRenewal: The instance is not renewed. After this value is returned, the system no longer sends expiration reminders, but sends a non-renewal reminder three days before expiration.

Note

This parameter is valid only for subscription instances on the China site, where PayType is set to PrePay.

AutoRenewal

RenewalDuration

integer

The auto-renewal duration. This parameter is valid only when RenewalStatus is set to AutoRenewal.

  • If RenewalCycUnit is set to Year, valid values are 1 to 5.

  • If RenewalCycUnit is set to Month, valid values are 1 to 9.

Note

This parameter is valid only for subscription instances on the China site, where PayType is set to PrePay.

1

ListenerPorts

object

ListenerPort

array

The frontend ports used by the Classic Load Balancer instance.

integer

The frontend ports used by the Classic Load Balancer instance.

80

ListenerPortsAndProtocal

object

ListenerPortAndProtocal

array<object>

The listener ports or protocols.

object

The frontend protocols used by the Classic Load Balancer instance.

ListenerProtocal

string

The frontend protocols used by the Classic Load Balancer instance.

http

ListenerPort

integer

The frontend port that is used by the CLB instance.

443

ListenerPortsAndProtocol

object

ListenerPortAndProtocol

array<object>

The frontend ports and protocols used by the instance.

object

The frontend ports and protocols used by the instance.

ListenerPort

integer

The frontend port that is used by the CLB instance.

80

ListenerProtocol

string

The frontend protocols used by the instance.

https

ListenerForward

string

Indicates whether listener forwarding is enabled.

on

Description

string

The description of the listener port and protocol.

The description of listener port and protocol.

ForwardPort

integer

The destination listener port to which traffic is forwarded. It must be an existing HTTPS listener port.

443

BackendServers

object

BackendServer

array<object>

The list of backend servers for the instance.

object

The list of backend servers for the instance.

Type

string

The backend server type. Valid values:

  • ecs: ECS instance (default).

  • eni: elastic network interface (ENI).

  • eci: elastic container instance.

ecs

Weight

integer

The weight of the backend server.

90

Description

string

The description of the backend server.

Note

If Description is not set, this parameter is not returned.

Backend servers

ServerIp

string

The instance ID of the ENI or ECI.

192.XX.XX.11

ServerId

string

The instance ID of the backend server.

i-2zej4lxhjoq1icu*****

Examples

Success response

JSON format

{
  "VpcId": "vpc-25dvzy9f8****",
  "Tags": {
    "Tag": [
      {
        "TagKey": "test",
        "TagValue": "value"
      }
    ]
  },
  "CreateTimeStamp": 1504147745000,
  "CreateTime": "2017-08-31T02:49:05Z",
  "LoadBalancerId": "lb-bp1b6c719dfa08ex****",
  "PayType": "PayOnDemand",
  "AddressType": "internet",
  "NetworkType": "vpc",
  "AddressIPVersion": "ipv4",
  "RenewalCycUnit": "Month",
  "RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "Bandwidth": 5,
  "LoadBalancerName": "lb-instance-test",
  "Address": "42.XX.XX.6",
  "SlaveZoneId": "cn-hangzhou-d",
  "EndTimeStamp": 3249380160000,
  "MasterZoneId": "cn-hangzhou-b",
  "LoadBalancerSpec": "slb.s1.small",
  "AutoReleaseTime": 1513947075000,
  "ModificationProtectionReason": "Instance service guarantee period",
  "RegionId": "cn-hangzhou",
  "ModificationProtectionStatus": "ConsoleProtection",
  "EndTime": "2022-09-08T16:00:00Z",
  "VSwitchId": "vsw-255ecrwq5****",
  "LoadBalancerStatus": "active",
  "ResourceGroupId": "rg-atstuj3rtop****",
  "InternetChargeType": "paybytraffic",
  "DeleteProtection": "off",
  "RegionIdAlias": "cn-hangzhou",
  "RenewalStatus": "AutoRenewal",
  "RenewalDuration": 1,
  "ListenerPorts": {
    "ListenerPort": [
      80
    ]
  },
  "ListenerPortsAndProtocal": {
    "ListenerPortAndProtocal": [
      {
        "ListenerProtocal": "http",
        "ListenerPort": 443
      }
    ]
  },
  "ListenerPortsAndProtocol": {
    "ListenerPortAndProtocol": [
      {
        "ListenerPort": 80,
        "ListenerProtocol": "https",
        "ListenerForward": "on",
        "Description": "The description of listener port and protocol.",
        "ForwardPort": 443
      }
    ]
  },
  "BackendServers": {
    "BackendServer": [
      {
        "Type": "ecs",
        "Weight": 90,
        "Description": "Backend servers",
        "ServerIp": "192.XX.XX.11",
        "ServerId": "i-2zej4lxhjoq1icu*****"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 LocationServiceTimeout Location service connection timeout. Please try again later.
403 UnauthorizedRegion The specified region of is not authorized. The specified region of is not authorized.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.