All Products
Search
Document Center

Server Load Balancer:GetListenerAttribute

更新時間:Dec 02, 2024

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

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:GetListenerAttributeget
*LoadBalancer
acs:gwlb:{#regionId}:{#accountId}:loadbalancer/{#LoadbalancerId}
*Listener
acs:gwlb:{#regionId}:{#accountId}:listener/{#ListenerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ListenerIdstringYes

The listener ID.

lsn-brx2y3hqdinciz****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

ListenerDescriptionstring

The listener description.

The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

listener_description
ListenerIdstring

The listener ID.

lsn-3kbj3587mqhm3p****
ListenerStatusstring

The listener status. Valid values:

  • Provisioning: The listener is being created.
  • Running: The listener is running.
  • Configuring: The listener is being configured.
  • Deleting: The listener is being deleted.
Provisioning
LoadBalancerIdstring

The GWLB instance ID.

gwlb-te609d6696632f76****
RegionIdstring

The region ID of the GWLB instance.

cn-hangzhou
RequestIdstring

The request ID.

75CC3312-7757-5EE1-90D8-49CEA66608AE
ServerGroupIdstring

The server group ID.

sgp-sp8d2r6y7t0xtl****
Tagsarray<object>

The tags.

TagModelobject

The tag.

Keystring

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

testKey
Valuestring

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

testValue

Examples

Sample success responses

JSONformat

{
  "ListenerDescription": "listener_description",
  "ListenerId": "lsn-3kbj3587mqhm3p****",
  "ListenerStatus": "Provisioning",
  "LoadBalancerId": "gwlb-te609d6696632f76****",
  "RegionId": "cn-hangzhou",
  "RequestId": "75CC3312-7757-5EE1-90D8-49CEA66608AE",
  "ServerGroupId": "sgp-sp8d2r6y7t0xtl****",
  "Tags": [
    {
      "Key": "testKey",
      "Value": "testValue"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
404ResourceNotFound.ListenerThe specified resource of %s is not found.The specified resource of %s is not found.

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