All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

更新時間:Nov 11, 2024

Queries the details of a Gateway Load Balancer (GWLB) instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
gwlb:GetLoadBalancerAttributeget
  • LoadBalancer
    acs:gwlb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LoadBalancerIdstringYes

The GWLB instance ID.

gwlb-9njtjmqt7zfcqm****

Response parameters

ParameterTypeDescriptionExample
object
AddressIpVersionstring

The protocol version. Valid values:

  • Ipv4: IPv4.
IPv4
CreateTimestring

The time when the resource 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
LoadBalancerBusinessStatusstring

The business status of the GWLB instance. Valid values:

  • Normal: running as expected
  • FinancialLocked: locked due to overdue payments
Normal
LoadBalancerIdstring

The GWLB instance ID.

gwlb-9njtjmqt7zfcqm****
LoadBalancerNamestring

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
LoadBalancerStatusstring

The GWLB instance status. Valid values:

  • Active: The GWLB instance is running.
  • Inactive: The GWLB instance is disabled. Listeners of GWLB instances in the Inactive state do not forward traffic.
  • Provisioning: The GWLB instance is being created.
  • Configuring: The GWLB instance is being modified.
Active
RequestIdstring

The request ID.

B6DC5DDC-9560-59BF-80FA-ED1E5CB417DF
ResourceGroupIdstring

The resource group ID.

rg-acfmx7pmxcy****
Tagsarray<object>

The tags.

TagModelobject
Keystring

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

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
Valuestring

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

testTagValue
VpcIdstring

The VPC ID.

vpc-k1aajsbwbaq4todet****
ZoneMappingsarray<object>

The mappings between zones and vSwitches. You must specify at least one zone. You can specify at most 20 zones. If the region supports two or more zones, specify at least two zones.

ZoneEniModelobject
LoadBalancerAddressesarray<object>

The information about the IP addresses used by the GWLB instance.

EniModelsobject
EniIdstring

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

eni-bp1iahwz3rzgvltz****
PrivateIpv4Addressstring

The private IPv4 address.

192.168.XX.XX
VSwitchIdstring

The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of a GWLB instance.

vsw-uf6v8l7d2f1k53xrl****
ZoneIdstring

The zone ID.

cn-hangzhou-j

Examples

Sample success responses

JSONformat

{
  "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"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400ResourceNotFound.LoadBalancerThe specified resource of %s is not found.The specified resource of .LoadBalancer is not found.
400MissingParam.LoadBalancerIdThe param of LoadBalancerId is missing.Load balancing ID parameter missing

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