• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. API Reference
  4. Enhanced Load Balancer APIs
  5. Listener
  6. Querying Details of a Listener

Querying Details of a Listener

Function

This API is used to query details of a listener by its ID.

URI

GET /v2.0/lbaas/listeners/{listener_id}

Table 1 Parameter description

Parameter

Type

Mandatory

Description

listener_id

Uuid

Yes

Specifies the listener ID.

Request

None

Response

Table 2 Parameter description

Parameter

Type

Description

listener

Dict

Lists the listeners. For details, see Table 3.

Table 3 listeners field description

Parameter

Type

Description

id

Uuid

Specifies the listener ID.

tenant_id

String (255)

Specifies the ID of the project where the listener is used.

name

String (255)

Specifies the listener name.

description

String (255)

Provides supplementary information about the listener.

protocol

String

Specifies the listener protocol.

The value can be TCP, HTTP, UDP, or TERMINATED_HTTPS.

protocol_port

Int

Specifies the listening port.

The port number ranges from 1 to 65535.

loadbalancers

List

Specifies the ID of the associated load balancer.

connection_limit

Int

Specifies the maximum number of connections.

The value ranges from -1 to 2,147,483,647. The default value is -1, indicating that there is no restriction on maximum connections.

This parameter is reserved and has been not used.

admin_state_up

Bool

Specifies the administrative status of the listener.

This parameter is reserved and has been not used. The value can only be true.

http2_enable

Bool

Specifies whether to use HTTP/2.

The value can be true or false. true: HTTP/2 is used. false: HTTP/2 is not used.

This parameter is valid only when the listener protocol is set to TERMINATED_HTTPS.

default_pool_id

Uuid

Specifies the ID of the associated backend server group.

If a request does not match the forwarding policy, the request is forwarded to the default backend server group for processing. If the value is null, the listener has no default backend server group.

default_tls_container_ref

String (128)

Specifies the ID of the server certificate used by the listener. For details, see SSL Certificate.

This parameter is mandatory when protocol is set to TERMINATED_HTTPS.

client_ca_tls_container_ref

String (128)

Specifies the ID of the CA certificate used by the listener. For details, see SSL Certificate.

sni_container_refs

String-list

Lists the IDs of SNI certificates (server certificates with a domain name) used by the listener.

If the parameter value is an empty list, the SNI feature is disabled. If the parameter value is an empty list, the SNI feature is disabled.

tags

String-list

Tags the listener.

created_at

String (19)

Specifies the time when a listener was created. The time is in YYYY-MM-DDTHH:MM:SS format.

updated_at

String (19)

Specifies the time when the listener was updated. The time is in YYYY-MM-DDTHH:MM:SS format.

Example

  • Example request: Viewing details of a listener
    GET https://{Endpoint}/v2.0/lbaas/listeners/09e64049-2ab0-4763-a8c5-f4207875dc3e
  • Example response
    {
        "listener": {
            "protocol_port": 8000,
            "protocol": "TCP",
            "description": "",
            "client_ca_tls_container_ref": null,
            "default_tls_container_ref": null,
            "admin_state_up": true,
            "http2_enable": false,
            "loadbalancers": [
                {
                    "id": "3d77894d-2ffe-4411-ac0a-0d57689779b8"
                }
            ],
            "tenant_id": "1867112d054b427e808cc6096d8193a1",
            
            "sni_container_refs": [],
            "connection_limit": -1,
            "default_pool_id": "b7e53dbd-62ab-4505-a280-5c066078a5c9",
            "id": "09e64049-2ab0-4763-a8c5-f4207875dc3e",
            "tags": [],
            "name": "listener-2",
            "created_at": "2018-07-25T01:54:13", 
            "updated_at": "2018-07-25T01:54:14"
            
        }
    }

Response Codes

For details, see HTTP Status Codes for Enhanced Load Balancers.