All Products
Search
Document Center

Server Load Balancer:DescribeLoadBalancerAttribute

Last Updated:Sep 20, 2024

Queries the detail of a Classic Load Balancer (CLB) instance.

Operation description

Note If backend servers are deployed in a vServer group, you can call the DescribeVServerGroupAttribute operation to query the backend servers.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
slb:DescribeLoadBalancerAttributeget
  • loadbalancer
    acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
  • slb:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The region ID of the CLB instance.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
LoadBalancerIdstringYes

The CLB instance ID.

lb-bp1b6c719dfa08ex****

Response parameters

ParameterTypeDescriptionExample
object
VpcIdstring

The ID of the virtual private cloud (VPC) where the internal-facing CLB instance is deployed.

vpc-25dvzy9f8****
Tagsarray<object>

The tags.

object
TagKeystring

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

The tag key can be at most 64 characters in length, and cannot contain http:// or https://. It must not start with aliyun or acs:.

test
TagValuestring

The tag value. 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 acs: or aliyun. The tag value cannot contain http:// or https://.

value
CreateTimeStamplong

The timestamp generated when the CA certificate is uploaded.

1504147745000
CreateTimestring

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

2017-08-31T02:49:05Z
LoadBalancerIdstring

The CLB instance ID.

lb-bp1b6c719dfa08ex****
PayTypestring

The billing method of the CLB instance. Valid values:

  • Only PayOnDemand may be returned, which indicates the pay-as-you-go billing method.
PayOnDemand
AddressTypestring

The address type of the CLB instance.

internet
NetworkTypestring

The network type of the CLB instance.

vpc
AddressIPVersionstring

The version of the IP address. Valid values: ipv4 and ipv6.

ipv4
RenewalCycUnitstring

The auto-renewal cycle. Valid values: Year and Month. Default value: Month.

Note This parameter is valid only if you create a subscription CLB instance on the Alibaba Cloud China site. In this case, PayType must be set to PrePay and RenewalStatus must be set to AutoRenewal.
Month
RequestIdstring

The request ID.

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

The maximum bandwidth of the Internet-facing CLB instance that is billed on a pay-by-bandwidth basis.

5
LoadBalancerNamestring

The name of the CLB instance.

lb-instance-test
Addressstring

The service IP address of the CLB instance.

42.XX.XX.6
SlaveZoneIdstring

The ID of the secondary zone to which the CLB instance belongs.

cn-hangzhou-d
EndTimeStamplong

The timestamp that indicates the expiration time of the CLB instance.

32493801600000
MasterZoneIdstring

The ID of the primary zone to which the CLB instance belongs.

cn-hangzhou-b
LoadBalancerSpecstring

The specification of the CLB instance.

slb.s1.small
AutoReleaseTimelong

The timestamp generated when the CLB instance is released.

1513947075000
ModificationProtectionReasonstring

The reason why the configuration read-only mode is enabled. The value is 1 to 80 characters in length. It starts with a letter and can contain digits, periods (.), underscores (_), and hyphens (-).

Note This parameter is valid only when ModificationProtectionStatus is set to ConsoleProtection.
Managed instance
RegionIdstring

The region ID of the CLB instance.

cn-hangzhou
ModificationProtectionStatusstring

Indicates whether the configuration read-only mode is enabled. Valid values:

  • NonProtection: The configuration read-only mode is disabled. After you disable the configuration read-only mode, the value of ModificationProtectionReason is cleared.
  • ConsoleProtection: The configuration read-only mode is enabled.
Note If this parameter is set to ConsoleProtection, you cannot modify instance configurations in the CLB console. However, you can modify instance configurations by calling API operations.
ConsoleProtection
EndTimestring

The time when the CLB instance expires.

2022-09-08T16:00:00Z
VSwitchIdstring

The ID of the vSwitch to which the internal-facing CLB instance belongs.

vsw-255ecrwq5****
LoadBalancerStatusstring

The status of the CLB instance. Valid values:

  • inactive: The CLB instance is disabled. CLB instances in the inactive state do not forward traffic.
  • active: The CLB instance is running as expected. Newly created CLB instances are in the active state by default.
  • locked: The CLB instance is locked. CLB instances may be locked due to overdue payments or other reasons.
active
ResourceGroupIdstring

The resource group ID.

rg-atstuj3rtop****
InternetChargeTypestring

The metering method of the Internet-facing CLB instance. Valid values:

  • paybytraffic
  • paybybandwidth
paybytraffic
DeleteProtectionstring

Indicates whether deletion protection is enabled for the CLB instance.

Valid values: on and off.

off
RegionIdAliasstring

The alias of the region to which the CLB instance belongs.

hangzhou
RenewalStatusstring

Indicates whether auto-renewal is enabled. Valid values:

  • AutoRenewal: Auto-renewal is enabled.

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

  • NotRenewal: The CLB instance will not be renewed upon expiration. If this value is returned, the system does not send notifications until three days before the expiration date.

    **

    Note This parameter is valid only when you create a subscription CLB instance on the Alibaba Cloud China site. In this case, PayType must be set to PrePay.

AutoRenewal
RenewalDurationinteger

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

  • Valid values when PeriodUnit is set to Year: 1, 2, and 3.

  • Valid values when PeriodUnit is set to Month: 1, 2, 3, and 6.

Note This parameter is valid only when you create a subscription CLB instance on the Alibaba Cloud China site. In this case, the PayType parameter must be set to PrePay.
1
ListenerPortsarray

The frontend port used by the CLB instance.

integer

The frontend port used by the CLB instance.

80
ListenerPortsAndProtocalarray<object>

The ports or protocols of the listeners.

object
ListenerProtocalstring

The frontend protocol that is used by the CLB instance.

http
ListenerPortinteger

The frontend port that is used by the CLB instance.

443
ListenerPortsAndProtocolarray<object>

The ports or protocols of the listeners.

object
ListenerPortinteger

The frontend port that is used by the CLB instance.

80
ListenerProtocolstring

The frontend protocol that is used by the CLB instance.

https
ListenerForwardstring

Indicates whether the listener is enabled.

on
Descriptionstring

Indicates whether the listener is enabled.

Listener Description
ForwardPortinteger

The destination listening port to which requests are forwarded. The port must be open and use HTTPS.

443
BackendServersarray<object>

The backend servers of the CLB instance.

object
Typestring

The type of the backend server.

ecs
Weightinteger

The weight of the backend server.

90
Descriptionstring

The description of the backend server.

Note This parameter is not returned if Description is not set.
backend server description
ServerIpstring

The ID of the elastic network interface (ENI) or elastic container instance.

192.XX.XX.11
ServerIdstring

The backend server ID.

i-2zej4lxhjoq1icu*****

Examples

Sample success responses

JSONformat

{
  "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": 32493801600000,
  "MasterZoneId": "cn-hangzhou-b",
  "LoadBalancerSpec": "slb.s1.small",
  "AutoReleaseTime": 1513947075000,
  "ModificationProtectionReason": "Managed instance",
  "RegionId": "cn-hangzhou",
  "ModificationProtectionStatus": "ConsoleProtection",
  "EndTime": "2022-09-08T16:00:00Z",
  "VSwitchId": "vsw-255ecrwq5****",
  "LoadBalancerStatus": "active",
  "ResourceGroupId": "rg-atstuj3rtop****",
  "InternetChargeType": "paybytraffic",
  "DeleteProtection": "off",
  "RegionIdAlias": "hangzhou",
  "RenewalStatus": "AutoRenewal",
  "RenewalDuration": 1,
  "ListenerPorts": {
    "ListenerPort": [
      80
    ]
  },
  "ListenerPortsAndProtocal": {
    "ListenerPortAndProtocal": [
      {
        "ListenerProtocal": "http",
        "ListenerPort": 443
      }
    ]
  },
  "ListenerPortsAndProtocol": {
    "ListenerPortAndProtocol": [
      {
        "ListenerPort": 80,
        "ListenerProtocol": "https",
        "ListenerForward": "on",
        "Description": "Listener Description",
        "ForwardPort": 443
      }
    ]
  },
  "BackendServers": {
    "BackendServer": [
      {
        "Type": "ecs",
        "Weight": 90,
        "Description": "backend server description",
        "ServerIp": "192.XX.XX.11",
        "ServerId": "i-2zej4lxhjoq1icu*****"
      }
    ]
  },
  "InstanceChargeType": "PayBySpec"
}

Error codes

HTTP status codeError codeError message
400LocationServiceTimeoutLocation service connection timeout. Please try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-08The Error code has changedView Change Details