
# 查询监听器详情 - ShowListener
#### 功能介绍
查询监听器详情。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-elb/elb_dy_0000.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-elb/elb_sq_0001.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                | 访问级别 | 资源类型（\*为必须） | 条件键                                                                                                                                                                                                                                                                                                                        | 别名                | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | elb:listeners:show | Read | listener \* | - g:ResourceTag/\<tag-key\>   - g:EnterpriseProjectId    | elb:listeners:get | -      |
     
  
 
#### URI
GET /v3/{project_id}/elb/listeners/{listener_id}
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                |
|:---|:---|:---|:---|
| project_id  | 是    | String | **参数解释** ：项目ID。获取方式请参见[获取项目ID](https://support.huaweicloud.com/api-elb/elb_fl_0008.html)。 **约束限制**：不涉及 **取值范围**：长度为32个字符，由小写字母和数字组成。 **默认取值**：不涉及 |
| listener_id | 是    | String | **参数解释**：监听器ID。 **约束限制**：不涉及 **取值范围**：不涉及 **默认取值**：不涉及                                                                                            |
   
#### 请求参数
表2请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                          |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | **参数解释**：IAM鉴权Token。 **约束限制**：不涉及 **取值范围**：不涉及 **默认取值**：不涉及 |
   
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数         | 参数类型                                                | 描述                                                                                  |
|:---|:---|:---|
| request_id | String                                              | **参数解释**：请求ID。 **取值范围**：由数字、小写字母和中划线（-）组成的字符串，自动生成。 |
| listener   | [Listener] object | **参数解释**：监听器对象。                                                                     |
   
 表4Listener 
| 参数                           | 参数类型                                                                          | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| admin_state_up               | Boolean                                                                       | **参数解释**：监听器的管理状态。 **取值范围**：true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| client_ca_tls_container_ref  | String                                                                        | **参数解释**：监听器使用的CA证书ID。当且仅当type=client时，才会使用该字段对应的证书。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| connection_limit             | Integer                                                                       | **参数解释**：监听器的最大连接数。 **取值范围**：大于等于-1的整数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| created_at                   | String                                                                        | **参数解释**：监听器的创建时间。 **取值范围**：不涉及 格式：yyyy-MM-dd'T'HH:mm:ss'Z'，如：2021-07-30T12:03:44Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| default_pool_id              | String                                                                        | **参数解释**：监听器的默认后端服务器组ID。当请求没有匹配的转发策略时，转发到默认后端服务器组上处理。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| default_tls_container_ref    | String                                                                        | **参数解释**：监听器使用的服务器证书ID。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| description                  | String                                                                        | **参数解释**：监听器的描述信息。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| http2_enable                 | Boolean                                                                       | **参数解释**：客户端与LB之间的HTTPS请求的HTTP2功能的开启状态。 开启后，可提升客户端与LB间的访问性能，但LB与后端服务器间仍采用HTTP1.X协议。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| id                           | String                                                                        | **参数解释**：监听器ID。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| insert_headers               | [ListenerInsertHeaders] object | **参数解释**：附加的HTTP头字段，ELB会将特定的HTTP头字段写入到请求头中，并随报文传递到后端服务器。例如可通过X-Forwarded-ELB-IP开关，将负载均衡器的弹性公网IP传到后端服务器。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| loadbalancers                | Array of [LoadBalancerRef] objects   | **参数解释**：监听器所属的负载均衡器的ID列表。实际上一个监听器只支持关联到一个LB。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| name                         | String                                                                        | **参数解释**：监听器的名称。若名称为空，则在控制台的监听器列表无法选择并查看监听器详情。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| project_id                   | String                                                                        | **参数解释**：监听器所在的项目ID。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| enterprise_project_id        | String                                                                        | **参数解释**：企业项目ID。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| protocol                     | String                                                                        | **参数解释**：监听器的监听协议。 **取值范围**：TCP、UDP、HTTP、HTTPS、TERMINATED_HTTPS、QUIC、TLS、IP。IP为网关型LB上的监听器独有的协议。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| protocol_port                | Integer                                                                       | **参数解释**：监听器的监听端口。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| sni_container_refs           | Array of strings                                                              | **参数解释**：监听器使用的SNI证书（带域名的服务器证书）ID列表。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| sni_match_algo               | String                                                                        | **参数解释**：监听器使用的SNI证书泛域名匹配方式。 **取值范围**：longest_suffix表示最长尾缀匹配；wildcard表示标准域名分级匹配。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| tags                         | Array of [Tag] objects                           | **参数解释**：标签列表。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| updated_at                   | String                                                                        | **参数解释**：监听器的更新时间。 **取值范围**： 格式：yyyy-MM-dd'T'HH:mm:ss'Z'，如：2021-07-30T12:03:44Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| tls_ciphers_policy           | String                                                                        | **参数解释**：监听器使用的安全策略。 **取值范围**：tls-1-0-inherit、tls-1-0、tls-1-1、tls-1-2、tls-1-2-strict、tls-1-2-fs、tls-1-0-with-1-3、tls-1-2-fs-with-1-3、hybrid-policy-1-0、tls-1-2-strict-no-cbc，默认：tls-1-2。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| security_policy_id           | String                                                                        | **参数解释**：自定义安全策略的ID。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| enable_member_retry          | Boolean                                                                       | **参数解释**：是否开启后端服务器的重试。 **取值范围**：true 开启重试，false 不开启重试。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| keepalive_timeout            | Integer                                                                       | **参数解释**：客户端连接空闲超时时间。在超过keepalive_timeout时长一直没有请求，负载均衡会暂时中断当前连接，直到下一次请求时重新建立新的连接。 **取值范围**： - TCP、UDP和IP监听器：10-4000s，默认值为300s。   - HTTP、HTTPS和TERMINATED_HTTPS监听器：0-4000s，默认值为60s。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| client_timeout               | Integer                                                                       | **参数解释**：等待客户端请求超时时间，包括两种情况： - 读取整个客户端请求头的超时时长：如果客户端未在超时时长内发送完整个请求头，则请求将被中断   - 两个连续body体的数据包到达LB的时间间隔，超出client_timeout将会断开连接。    **取值范围**：1-300，单位：秒。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| member_timeout               | Integer                                                                       | **参数解释**：等待后端服务器响应超时时间。请求转发后端服务器后，在等待超时member_timeout时长没有响应，负载均衡将终止等待，并返回HTTP504错误码。 **取值范围**：1-300，单位：秒。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ipgroup                      | [ListenerIpGroup] object             | **参数解释**：listener对象中的ipgroup信息。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| transparent_client_ip_enable | Boolean                                                                       | **参数解释**：是否透传客户端IP地址。开启后客户端IP地址将透传到后端服务器。 仅作用于共享型LB的TCP/UDP监听器。 **取值范围**： - 共享型LB的TCP/UDP监听器可设置为true或false，不传默认为false。   - 共享型LB的HTTP/HTTPS监听器只支持设置为true，不传默认为true。   - 独享型负载均衡器所有协议的监听器只支持设置为true，不传默认为true。                                                                                                                                                                                                                                                                                                                                                                               |
| proxy_protocol_enable        | Boolean                                                                       | **参数解释**：是否开启proxy_protocol。仅TLS监听器可指定，其他协议的监听器该字段不生效，proxy_protocol不开启。 **取值范围**：true 开启，false 不开启。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| enhance_l7policy_enable      | Boolean                                                                       | **参数解释**：是否开启高级转发策略功能。开启高级转发策略后，支持更灵活的转发策略和转发规则设置。 开启后支持如下场景： - 转发策略的action字段支持指定为REDIRECT_TO_URL、FIXED_RESPONSE，即支持URL重定向和响应固定的内容给客户端。   - 转发策略支持指定priority、redirect_url_config、fixed_response_config字段。   - 转发规则rule的type可以指定METHOD, HEADER, QUERY_STRING, SOURCE_IP这几种取值。   - 转发规则rule的type为HOST_NAME时，转发规则rule的value支持通配符\*。   - 转发规则支持指定conditions字段。    **取值范围**：true开启，false不开启。 |
| quic_config                  | [ListenerQuicConfig] object       | **参数解释**：当前监听器关联的QUIC监听器配置信息。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| protection_status            | String                                                                        | **参数解释**：修改保护状态。 **取值范围**： - nonProtection: 不保护。   - consoleProtection: 控制台修改保护。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| protection_reason            | String                                                                        | **参数解释**：设置保护的原因。作为protection_status的转态设置的原因。 **取值范围**：除'\<'和'\>'外通用Unicode字符集字符，最大255个字符。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| gzip_enable                  | Boolean                                                                       | **参数解释**：ELB是否开启gzip压缩。 **取值范围**：true开启，false不开启。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| port_ranges                  | Array of [PortRange] objects               | **参数解释**：全端口监听，指定端口监听范围（闭区间)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ssl_early_data_enable        | Boolean                                                                       | **参数解释**：监听器0-RTT能力开关                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| cps                          | Integer                                                                       | **参数解释**：监听器新建限速。当该限速值大于LB的限速值时，以LB的限速值生效。 **取值范围**：0-1000000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| connection                   | Integer                                                                       | **参数解释**：监听器并发限速。当该限速值大于LB的限速值时，以LB的限速值生效。 **取值范围**：0-1000000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| nat64_enable                 | Boolean                                                                       | **参数解释**：监听器地址转换能力开关，可以实现客户端通过访问LB的IPv4或者IPv6地址，来访问IPv4后端和IPv6后端。 **取值范围**： - true：开启地址转换功能。   - false：关闭地址转换功能。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   
 表5ListenerInsertHeaders 
| 参数                                         | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| X-Forwarded-ELB-IP                         | Boolean | **参数解释**：X-Forwarded-ELB-IP设为true可以将ELB实例的eip地址从报文的http头中带到后端服务器。                                                                                                                                                                                                                                                                                                 |
| X-Forwarded-Port                           | Boolean | **参数解释**：X-Forwarded-Port设为true可以将ELB实例的监听端口从报文的http头中带到后端服务器。                                                                                                                                                                                                                                                                                                    |
| X-Forwarded-For-Port                       | Boolean | **参数解释**：X-Forwarded-For-Port设为true可以将客户端的源端口从报文的http头中带到后端服务器。                                                                                                                                                                                                                                                                                                   |
| X-Forwarded-Host                           | Boolean | **参数解释**：X-Forwarded-Host设为true可以将客户请求头的X-Forwarded-Host设置为请求头的Host带到后端服务器。                                                                                                                                                                                                                                                                                       |
| X-Forwarded-Proto                          | Boolean | **参数解释**：X-Forwarded-Proto设为true可以将负载均衡器实例的监听协议通过报文的http头带到后端服务器。                                                                                                                                                                                                                                                                                                 |
| X-Real-IP                                  | Boolean | **参数解释**：X-Real-IP设为true可以将客户端的IP通过报文的http头带到后端服务器。                                                                                                                                                                                                                                                                                                               |
| X-Forwarded-ELB-ID                         | Boolean | **参数解释**：X-Forwarded-ELB-ID设为true可以将负载均衡器实例的ID通过报文的http头带到后端服务器。                                                                                                                                                                                                                                                                                                  |
| X-Forwarded-TLS-Certificate-ID             | Boolean | **参数解释**：X-Forwarded-TLS-Certificate-ID设为true可以将负载均衡器实例的证书ID通过报文的http头带到后端服务器。                                                                                                                                                                                                                                                                                    |
| X-Forwarded-TLS-Protocol                   | Boolean | **参数解释**：X-Forwarded-TLS-Protocol设为true可以将负载均衡器实例的算法协议通过报文的http头带到后端服务器。                                                                                                                                                                                                                                                                                          |
| X-Forwarded-TLS-Cipher                     | Boolean | **参数解释**：X-Forwarded-TLS-Cipher设为true可以将负载均衡器实例的算法套件通过报文的http头带到后端服务器。                                                                                                                                                                                                                                                                                            |
| X-Forwarded-TLS-Protocol-alias             | String  | **参数解释**：自定义X-Forwarded-TLS-Protocol头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                         |
| X-Forwarded-TLS-Cipher-alias               | String  | **参数解释**：自定义X-Forwarded-TLS-Cipher头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                           |
| X-Forwarded-For-Processing-Mode            | String  | **参数解释**：处理X-Forwarded-For头字段的模式： 配置 append，将请求发送至后端服务之前把最后一跳 IP 加入X-Forwarded-For头字段； 配置 remove，请求发送至后端服务之前删除X-Forwarded-For标头，无论请求是否携带X-Forwarded-For头字段； 配置preserve，保留请求中已有的X-Forwarded-For标头； **取值范围**：append、remove、preserve |
| X-Forwarded-Clientcert-subjectdn-enable    | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert-subjectdn头字段获取访问负载均衡实例客户端证书的所有者信息。 **取值范围**：true、false                                                                                                                                                                                                                                        |
| X-Forwarded-Clientcert-subjectdn-alias     | String  | **参数解释**：自定义X-Forwarded-Clientcert-subjectdn头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                 |
| X-Forwarded-Clientcert-issuerdn-enable     | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert-issuerdn头字段获取访问负载均衡实例客户端证书的发行者信息。 **取值范围**：true、false                                                                                                                                                                                                                                         |
| X-Forwarded-Clientcert-issuerdn-alias      | String  | **参数解释**：自定义X-Forwarded-Clientcert-issuerdn头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                  |
| X-Forwarded-Clientcert-fingerprint-enable  | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert-fingerprint头字段获取访问负载均衡实例客户端证书的指纹取值。 **取值范围**：true、false                                                                                                                                                                                                                                       |
| X-Forwarded-Clientcert-fingerprint-alias   | String  | **参数解释**：自定义X-Forwarded-Clientcert-fingerprint头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                               |
| X-Forwarded-Clientcert-clientverify-enable | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert-clientverify头字段获取对访问负载均衡实例客户端证书的校验结果。 **取值范围**：true、false                                                                                                                                                                                                                                     |
| X-Forwarded-Clientcert-clientverify-alias  | String  | **参数解释**：自定义X-Forwarded-Clientcert-clientverify头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                              |
| X-Forwarded-Clientcert-serialnumber-enable | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert-serialnumber 头字段获取客户端证书的序列号信息。 **取值范围**：true、false                                                                                                                                                                                                                                            |
| X-Forwarded-Clientcert-serialnumber-alias  | String  | **参数解释**：自定义X-Forwarded-Clientcert-serialnumber头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                              |
| X-Forwarded-Clientcert-enable              | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert 头字段获取客户端证书的内容。 **取值范围**：true、false                                                                                                                                                                                                                                                            |
| X-Forwarded-Clientcert-alias               | String  | **参数解释**：自定义X-Forwarded-Clientcert头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                           |
| X-Forwarded-Clientcert-ciphers-enable      | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert-ciphers 头字段获取客户端支持的TLS加密套件。 **取值范围**：true、false                                                                                                                                                                                                                                               |
| X-Forwarded-Clientcert-ciphers-alias       | String  | **参数解释**：自定义X-Forwarded-Clientcert-ciphers头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                   |
| X-Forwarded-Clientcert-end-enable          | Boolean | **参数解释**：是否通过X-Forwarded-Clientcert-end 头字段获取客户端证书的结束日期。 **取值范围**：true、false                                                                                                                                                                                                                                                      |
| X-Forwarded-Clientcert-end-alias           | String  | **参数解释**：自定义X-Forwarded-Clientcert-end头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                       |
| X-Forwarded-Tls-Alpn-Protocol-enable       | Boolean | **参数解释**：是否通过X-Forwarded-Tls-Alpn-Protocol 头字段获取客户端和服务器之间ALPN（Application-Layer Protocol Negotiation）协商的应用层协议。 **取值范围**：true、false                                                                                                                                                                                                |
| X-Forwarded-Tls-Alpn-Protocol-alias        | String  | **参数解释**：自定义X-Forwarded-Tls-Alpn-Protocol头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                    |
| X-Forwarded-Tls-Sni-enable                 | Boolean | **参数解释**：是否通过X-Forwarded-Tls-Sni 头字段获取客户端访问的sni证书的域名。 **取值范围**：true、false                                                                                                                                                                                                                                                         |
| X-Forwarded-Tls-Sni-alias                  | String  | **参数解释**：自定义X-Forwarded-Tls-Sni头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                              |
| X-Forwarded-Tls-Ja3-enable                 | Boolean | **参数解释**：是否通过X-Forwarded-Tls-Ja3头字段获取访问负载均衡实例客户端的ja3指纹。 **取值范围**：true、false                                                                                                                                                                                                                                                       |
| X-Forwarded-Tls-Ja3-alias                  | String  | **参数解释**：自定义X-Forwarded-Tls-Ja3头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                              |
| X-Forwarded-Tls-Ja4-enable                 | Boolean | **参数解释**：是否通过X-Forwarded-Tls-Ja4头字段获取访问负载均衡实例客户端的ja4指纹。 **取值范围**：true、false                                                                                                                                                                                                                                                       |
| X-Forwarded-Tls-Ja4-alias                  | String  | **参数解释**：自定义X-Forwarded-Tls-Ja4头字段名称。 **取值范围**：1\~40 个字符。支持字母 a\~z、短划线（-）、下划线（_）和数字。                                                                                                                                                                                                                                              |
   
 表6LoadBalancerRef 
| 参数 | 参数类型   | 描述                                                             |
|:---|:---|:---|
| id | String | **参数解释**：负载均衡器ID。 **取值范围**：不涉及 |
   
 表7Tag 
| 参数    | 参数类型   | 描述                                                         |
|:---|:---|:---|
| key   | String | **参数解释**：标签键。 **取值范围**：不涉及 |
| value | String | **参数解释**：标签值。 **取值范围**：不涉及 |
   
 表8ListenerIpGroup 
| 参数             | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| ipgroup_id     | String  | **参数解释**：监听器关联的访问控制组的ID。 关联多个IP地址组时ID使用逗号分隔。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                               |
| enable_ipgroup | Boolean | **参数解释**：访问控制组的状态。 开启访问控制的监听器，允许直接删除。 **取值范围**： - true:开启访问控制。   - false：关闭访问控制。    |
| type           | String  | **参数解释**：访问控制组的类型。 **取值范围**： - white:白名单，只允许指定ip访问。   - black:黑名单，不允许指定ip访问。                                        |
   
 表9ListenerQuicConfig 
| 参数                  | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| quic_listener_id    | String  | **参数解释**：监听器关联的QUIC监听器ID。 **取值范围**：不涉及                                                                                                                                                                                                                                                                                                                                                            |
| enable_quic_upgrade | Boolean | **参数解释**：QUIC升级的开启状态。开启HTTPS监听器升级QUIC监听器能力。 **取值范围**： - true:开启QUIC升级。   - false：关闭QUIC升级。    |
   
 表10PortRange 
| 参数         | 参数类型    | 描述                                                              |
|:---|:---|:---|
| start_port | Integer | **参数解释**：起始端口。 **取值范围**：1-65535 |
| end_port   | Integer | **参数解释**：结束端口。 **取值范围**：1-65535 |
   
#### 请求示例
查询监听器详情
```
GET https://{ELB_Endpoint}/v3/99a3fff0d03c428eac3678da6a7d0f24/elb/listeners/0b11747a-b139-492f-9692-2df0b1c87193
```
#### 响应示例
**状态码：200**
操作正常返回。
```
{
  "listener" : {
    "id" : "0b11747a-b139-492f-9692-2df0b1c87193",
    "name" : "My listener",
    "protocol_port" : 80,
    "protocol" : "HTTP",
    "ipgroup" : null,
    "description" : "My listener update.",
    "default_tls_container_ref" : null,
    "admin_state_up" : true,
    "loadbalancers" : [ {
      "id" : "098b2f68-af1c-41a9-8efd-69958722af62"
    } ],
    "member_timeout" : null,
    "client_timeout" : null,
    "keepalive_timeout" : 300,
    "client_ca_tls_container_ref" : null,
    "project_id" : "99a3fff0d03c428eac3678da6a7d0f24",
    "sni_container_refs" : [ ],
    "connection_limit" : -1,
    "default_pool_id" : null,
    "tls_ciphers_policy" : "tls-1-0",
    "tags" : [ ],
    "created_at" : "2019-04-02T00:12:32Z",
    "updated_at" : "2019-04-02T17:43:46Z",
    "http2_enable" : true,
    "insert_headers" : {
      "X-Forwarded-ELB-IP" : true
    },
    "transparent_client_ip_enable" : false,
    "nat64_enable" : false
  },
  "request_id" : "1394eb39-e4c8-4177-b96d-aaff569f1833"
}
```
#### SDK代码示例
SDK代码示例如下。
- [Java]
  ```
  package com.huaweicloud.sdk.test;
  import com.huaweicloud.sdk.core.auth.ICredential;
  import com.huaweicloud.sdk.core.auth.BasicCredentials;
  import com.huaweicloud.sdk.core.exception.ConnectionException;
  import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
  import com.huaweicloud.sdk.core.exception.ServiceResponseException;
  import com.huaweicloud.sdk.elb.v3.region.ElbRegion;
  import com.huaweicloud.sdk.elb.v3.*;
  import com.huaweicloud.sdk.elb.v3.model.*;
  public class ShowListenerSolution {
      public static void main(String[] args) {
          // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
          // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
          String ak = System.getenv("CLOUD_SDK_AK");
          String sk = System.getenv("CLOUD_SDK_SK");
          String projectId = "{project_id}";
          ICredential auth = new BasicCredentials()
                  .withProjectId(projectId)
                  .withAk(ak)
                  .withSk(sk);
          ElbClient client = ElbClient.newBuilder()
                  .withCredential(auth)
                  .withRegion(ElbRegion.valueOf("<YOUR REGION>"))
                  .build();
          ShowListenerRequest request = new ShowListenerRequest();
          request.withListenerId("{listener_id}");
          try {
              ShowListenerResponse response = client.showListener(request);
              System.out.println(response.toString());
          } catch (ConnectionException e) {
              e.printStackTrace();
          } catch (RequestTimeoutException e) {
              e.printStackTrace();
          } catch (ServiceResponseException e) {
              e.printStackTrace();
              System.out.println(e.getHttpStatusCode());
              System.out.println(e.getRequestId());
              System.out.println(e.getErrorCode());
              System.out.println(e.getErrorMsg());
          }
      }
  }
  ```
- [Python]
  ```
  # coding: utf-8
  import os
  from huaweicloudsdkcore.auth.credentials import BasicCredentials
  from huaweicloudsdkelb.v3.region.elb_region import ElbRegion
  from huaweicloudsdkcore.exceptions import exceptions
  from huaweicloudsdkelb.v3 import *
  if __name__ == "__main__":
      # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak = os.environ["CLOUD_SDK_AK"]
      sk = os.environ["CLOUD_SDK_SK"]
      projectId = "{project_id}"
      credentials = BasicCredentials(ak, sk, projectId)
      client = ElbClient.new_builder() \
          .with_credentials(credentials) \
          .with_region(ElbRegion.value_of("<YOUR REGION>")) \
          .build()
      try:
          request = ShowListenerRequest()
          request.listener_id = "{listener_id}"
          response = client.show_listener(request)
          print(response)
      except exceptions.ClientRequestException as e:
          print(e.status_code)
          print(e.request_id)
          print(e.error_code)
          print(e.error_msg)
  ```
- [Go]
  ```
  package main
  import (
  "fmt"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
      elb "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/elb/v3"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/elb/v3/model"
      region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/elb/v3/region"
  )
  func main() {
      // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak := os.Getenv("CLOUD_SDK_AK")
      sk := os.Getenv("CLOUD_SDK_SK")
      projectId := "{project_id}"
      auth, err := basic.NewCredentialsBuilder().
          WithAk(ak).
          WithSk(sk).
          WithProjectId(projectId).
          SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      hcClient, err := elb.ElbClientBuilder().
           WithRegion(region.ValueOf("<YOUR REGION>")).
           WithCredential(auth).
           SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      client := elb.NewElbClient(hcClient)
      request := &model.ShowListenerRequest{}
  request.ListenerId = "{listener_id}"
  response, err := client.ShowListener(request)
  if err == nil {
          fmt.Printf("%+v\n", response)
      } else {
          fmt.Println(err)
      }
  }
  ```
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/ELB/sdk?api=ShowListener&version=v3)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述      |
|:---|:---|
| 200 | 操作正常返回。 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-elb/ErrorCode.html)。
