# 根据防护域名Id查询云模式防护域名详细信息 - ShowHost
#### 功能介绍
根据防护域名Id查询云模式防护域名详细信息
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-waf/waf_02_0007.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-waf/waf_02_0119.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项          | 访问级别 | 资源类型（\*为必须） | 条件键                   | 别名               | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | waf:host:get | Read | host \*     | g:EnterpriseProjectId | waf:instance:get | -      |
     
  
 
#### URI
GET /v1/{project_id}/waf/instance/{instance_id}
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                      |
|:---|:---|:---|:---|
| project_id  | 是    | String | 项目ID，对应华为云控制台用户名-\>我的凭证-\>项目列表-\>项目ID   |
| instance_id | 是    | String | 域名id，您可以通过调用查询云模式防护域名列表（ListHost）获取域名id |
   
表2Query参数 
| 参数                    | 是否必选 | 参数类型   | 描述                                                                                                        |
|:---|:---|:---|:---|
| enterprise_project_id | 否    | String | 您可以通过调用企业项目管理服务（EPS）的查询企业项目列表接口（ListEnterpriseProject）查询企业项目id。若需要查询当前用户所有企业项目绑定的资源信息，请传参all_granted_eps。 |
   
#### 请求参数
表3请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | **参数解释：** 用户Token，通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 **约束限制：** 不涉及 **取值范围：** 不涉及 **默认取值：** 不涉及 |
| Content-Type | 是    | String | 内容类型                                                                                                                                                                                                                                                                                                             |
   
#### 响应参数
**状态码：200**
表4响应Body参数 
| 参数                    | 参数类型                                                                    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|:---|:---|:---|
| id                    | String                                                                  | 域名id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| hostname              | String                                                                  | 创建的云模式防护域名                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| policyid              | String                                                                  | 防护域名的防护策略id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| domainid              | String                                                                  | 账号ID,对应华为云控制台用户名-\>我的凭证-\>账号ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| projectid             | String                                                                  | 项目ID，对应华为云控制台用户名-\>我的凭证-\>项目列表-\>项目ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| enterprise_project_id | String                                                                  | 企业项目ID，对应华为云控制台用户名-\>企业-\>项目管理-\>点击项目名称-\>ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| protocol              | String                                                                  | 后端包含的协议类型：HTTPS、HTTP、HTTP\&HTTPS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| server                | Array of [CloudWafServer] objects   | 防护域名的源站服务器配置信息                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| proxy                 | Boolean                                                                 | 防护域名是否使用代理 - false：不使用代理   - true：使用代理                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| protect_status        | Integer                                                                 | **参数解释：** 域名防护状态标识，用于指定域名在WAF中的防护运行状态 **取值范围：** - -1：bypass，该域名的请求直接到达其后端服务器，不再经过WAF   - 0：暂停防护，WAF只转发该域名的请求，不做攻击检测   - 1：开启防护，WAF根据您配置的策略进行攻击检测                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| access_status         | Integer                                                                 | **参数解释：** 域名接入状态 **取值范围：** - 0: 未接入   - 1: 已接入                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| access_code           | String                                                                  | cname前缀，完整的cname域名由access_code和cname后缀组成                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| locked                | Integer                                                                 | 预留参数，用于后期设计冻结域名，解锁域名功能，目前暂不支持                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| timestamp             | Long                                                                    | 创建防护域名的时间戳（毫秒）                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| certificateid         | String                                                                  | https证书id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| certificatename       | String                                                                  | 证书名称                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| tls                   | String                                                                  | 配置的最低TLS版本（TLS v1.0/TLS v1.1/TLS v1.2）,默认为TLS v1.0版本，对于低于最低TLS版本的请求，将无法正常访问网站                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| cipher                | String                                                                  | 加密套件（cipher_1，cipher_2，cipher_3，cipher_4，cipher_default）： - cipher_1： 加密算法为ECDHE-ECDSA-AES256-GCM-SHA384:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!DES:!MD5:!PSK:!RC4:!kRSA:!SRP:!3DES:!DSS:!EXP:!CAMELLIA:@STRENGTH   - cipher_2：加密算法为EECDH+AESGCM:EDH+AESGCM   - cipher_3：加密算法为ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH   - cipher_4：加密算法为ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!EDH   - cipher_default： 加密算法为ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM    cipher_5：加密算法为AES128-SHA:AES256-SHA:AES128-SHA256:AES256-SHA256:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4:!DHE:@STRENGTH cipher_6：加密算法为ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| block_page            | [BlockPage] object                       | 告警页面配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| extend                | Map\<String,String\>                                                    | 扩展字段，用于存放Web基础防护中一些开关配置等信息                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| traffic_mark          | [TrafficMark] object                   | 流量标识                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| circuit_breaker       | [CircuitBreaker] object             | 熔断配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| lb_algorithm          | String                                                                  | **参数解释：** LB负载均衡，仅专业版和企业版支持配置负载均衡算法 **取值范围：** - ip_hash: 源IP Hash,将某个IP的请求定向到同一个服务器   - round_robin: 加权轮询,所有请求将按权重轮流分配给源站服务器   - session_hash: 将某个Session标识的请求定向到同一个源站服务器，请确保在域名添加完毕后配置攻击惩罚的流量标识，否则Session Hash配置不生效                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| timeout_config        | [TimeoutConfig] object               | 超时配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| web_tag               | String                                                                  | 网站名称，对应WAF控制台域名详情中的网站名称                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| flag                  | [Flag] object                                 | 特殊标识，用于前端使用                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| description           | String                                                                  | 网站备注                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| http2_enable          | Boolean                                                                 | 是否支持http2 - true：表示支持http2   - false：表示不支持http2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| exclusive_ip          | Boolean                                                                 | 是否使用独享ip - true：使用独享ip   - false：不使用独享ip                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| access_progress       | Array of [Access_progress] objects | 接入进度，仅用于新版console(前端)使用                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| forward_header_map    | Map\<String,String\>                                                    | 字段转发配置，WAF会将添加的字段插到header中，转给源站；Key不能跟nginx原生字段重复。Value支持的值包括: - $time_local   - $request_id   - $connection_requests   - $tenant_id   - $project_id   - $remote_addr   - $remote_port   - $scheme   - $request_method   - $http_host   - $request_length   - $ssl_server_name   - $ssl_protocol   - $ssl_curves   - $ssl_session_reused    -$origin_uri |
   
 表5CloudWafServer 
| 参数             | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| front_protocol | String  | **参数解释：** 客户端请求访问防护域名源站服务器的协议 **取值范围：** - HTTP: HTTP协议   - HTTPS: HTTPS协议        |
| back_protocol  | String  | **参数解释：** WAF转发客户端请求到防护域名源站服务器的协议 **取值范围：** - HTTP: HTTP协议   - HTTPS: HTTPS协议    |
| weight         | Integer | 源站权重，负载均衡算法将按该权重将请求分配给源站，默认值是1，云模式的冗余字段                                                                                                                                                                                                                                                                                                                                                                                                  |
| address        | String  | 客户端访问的源站服务器的IP地址                                                                                                                                                                                                                                                                                                                                                                                                                         |
| port           | Integer | WAF转发客户端请求到源站服务的业务端口                                                                                                                                                                                                                                                                                                                                                                                                                     |
| type           | String  | 源站地址为ipv4或ipv6                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
 表6BlockPage 
| 参数           | 参数类型                                                | 描述                                                   |
|:---|:---|:---|
| template     | String                                              | 模板名称，默认页面请输入default，自定义告警页面时请输入custom，重定向请输入redirect |
| custom_page  | [CustomPage] object | 自定义告警页面                                              |
| redirect_url | String                                              | "重定向"页面URL                                           |
   
 表7CustomPage 
| 参数           | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| status_code  | String | 返回状态码                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| content_type | String | **参数解释：** "自定义"告警页面内容类型 **取值范围：** - text/html   - text/xml   - application/json    |
| content      | String | 根据选择的"页面类型"配置对应的页面内容，具体示例可以参考"Web应用防火墙 WAF"用户手册                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   
 表8TrafficMark 
| 参数     | 参数类型             | 描述                                                        |
|:---|:---|:---|
| sip    | Array of strings | IP标记，客户端最原始的IP地址的HTTP请求头字段。                               |
| cookie | String           | Session标记，用于Cookie恶意请求的攻击惩罚功能。在选择Cookie拦截的攻击惩罚功能前，必须配置该标识 |
| params | String           | User标记，用于Params恶意请求的攻击惩罚功能。在选择Params拦截的攻击惩罚功能前，必须配置该标识。   |
   
 表9CircuitBreaker 
| 参数                | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|:---|:---|:---|
| switch            | Boolean | 熔断开关，是否开启连接保护 - true：开启连接保护   - false: 关闭连接保护                                                                                                                                                                                                                                               |
| dead_num          | Integer | 502/504数量阈值，每30s累加的502/504数量阈值                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| dead_ratio        | Number  | 502/504数量占比(%)，总请求数量中502/504数量占比达到所设定值，并且与数量阈值同时满足时触发宕机保护                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| block_time        | Integer | 初次触发宕机的保护时间，即WAF将停止转发用户请求的时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| superposition_num | Integer | 连续触发时，保护时间延长最大倍数，叠加周期为3600s。例如，"初次保护时间"设置为180s，"连续触发叠加系数"设置为3。 - 当触发次数为2（即小于3）时，保护时间为360s。   - 当次数大于等于3时，保护时间为540s。   - 当累计保护时间超过1小时（3600s），叠加次数会从头计数。    |
| suspend_num       | Integer | 读等待URL请求数量阈值，读等待URL请求数量到达设定值即触发连接保护                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| sus_block_time    | Integer | 读等待URL请求数量超过阈值后的熔断时间，达到数量阈值所触发的保护时间，即WAF将停止转发用户请求的时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
   
 表10TimeoutConfig 
| 参数              | 参数类型    | 描述             |
|:---|:---|:---|
| connect_timeout | Integer | WAF连接源站超时配置    |
| send_timeout    | Integer | WAF发送请求到源站超时配置 |
| read_timeout    | Integer | WAF接收源站响应超时配置  |
   
 表11Flag 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                         |
|:---|:---|:---|
| pci_3ds    | String | 是否开启pci_3ds合规认证 - true：开启   - false：不开启    |
| pci_dss    | String | 是否开启pci_dss合规认证 - true：开启   - false：不开启    |
| cname      | String | old：代表域名使用的老的cname，new：代表域名使用新的cname                                                                                                                                                                                                                                                                                                       |
| is_dual_az | String | 域名是否开启ipv6 - true：开启   - false：不开启         |
| ipv6       | String | 域名是否开启ipv6 - true：开启   - false：不开启         |
   
 表12Access_progress 
| 参数     | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|
| step   | Integer | 步骤 - 1: 指回源IP加白   - 2: 指本地验证   - 3：指修改DNS解析    |
| status | Integer | **参数解释：** 步骤完成状态标识，用于指示对应步骤的完成情况 **取值范围：** - 0：未完成这个步骤   - 1：已完成这个步骤                                                     |
   
**状态码：400**
表13响应Body参数 
| 参数                            | 参数类型                                                                      | 描述                                                                                                 |
|:---|:---|:---|
| error_code                    | String                                                                    | 错误码                                                                                                |
| error_msg                     | String                                                                    | 错误信息                                                                                               |
| encoded_authorization_message | String                                                                    | 编码 (加密) 后的详细拒绝原因，用户可以自行调用 STS 服务的decode-authorization-message接口进行解码，可参考STS5联调自验证。IAM5鉴权错误时才会返回此字段。 |
| details                       | Array of [IAM5ErrorDetails] objects | 调用下游服务的报错信息集合，IAM5鉴权错误时才会返回此字段。                                                                    |
   
 表14IAM5ErrorDetails 
| 参数         | 参数类型   | 描述       |
|:---|:---|:---|
| error_code | String | 下游服务错误码  |
| error_msg  | String | 下游服务报错信息 |
   
**状态码：401**
表15响应Body参数 
| 参数                            | 参数类型                                                                        | 描述                                                                                                 |
|:---|:---|:---|
| error_code                    | String                                                                      | 错误码                                                                                                |
| error_msg                     | String                                                                      | 错误信息                                                                                               |
| encoded_authorization_message | String                                                                      | 编码 (加密) 后的详细拒绝原因，用户可以自行调用 STS 服务的decode-authorization-message接口进行解码，可参考STS5联调自验证。IAM5鉴权错误时才会返回此字段。 |
| details                       | Array of [IAM5ErrorDetails] objects | 调用下游服务的报错信息集合，IAM5鉴权错误时才会返回此字段。                                                                    |
   
 表16IAM5ErrorDetails 
| 参数         | 参数类型   | 描述       |
|:---|:---|:---|
| error_code | String | 下游服务错误码  |
| error_msg  | String | 下游服务报错信息 |
   
**状态码：500**
表17响应Body参数 
| 参数                            | 参数类型                                                                        | 描述                                                                                                 |
|:---|:---|:---|
| error_code                    | String                                                                      | 错误码                                                                                                |
| error_msg                     | String                                                                      | 错误信息                                                                                               |
| encoded_authorization_message | String                                                                      | 编码 (加密) 后的详细拒绝原因，用户可以自行调用 STS 服务的decode-authorization-message接口进行解码，可参考STS5联调自验证。IAM5鉴权错误时才会返回此字段。 |
| details                       | Array of [IAM5ErrorDetails] objects | 调用下游服务的报错信息集合，IAM5鉴权错误时才会返回此字段。                                                                    |
   
 表18IAM5ErrorDetails 
| 参数         | 参数类型   | 描述       |
|:---|:---|:---|
| error_code | String | 下游服务错误码  |
| error_msg  | String | 下游服务报错信息 |
   
#### 请求示例
获取项目id为project_id，防护域名Id为instance_id的云模式防护域名详细信息
```
GET https://{Endpoint}/v1/{project_id}/waf/instance/{instance_id}?enterprise_project_id=0
```
#### 响应示例
**状态码：200**
```
{
  "id" : "31af669f567246c289771694f2112289",
  "hostname" : "www.demo.com",
  "protocol" : "HTTP",
  "server" : [ {
    "address" : "x.x.x.x",
    "port" : 80,
    "type" : "ipv4",
    "weight" : 1,
    "front_protocol" : "HTTP",
    "back_protocol" : "HTTP"
  } ],
  "proxy" : false,
  "locked" : 0,
  "timestamp" : 1650527546420,
  "flag" : {
    "pci_3ds" : "false",
    "pci_dss" : "false",
    "ipv6" : "false",
    "cname" : "new",
    "is_dual_az" : "true"
  },
  "description" : "",
  "policyid" : "41cba8aee2e94bcdbf57460874205494",
  "domainid" : "d4ecb00b031941ce9171b7bc3386883f",
  "projectid" : "0456cf04d6f64725ab02ed5bd2efdfa4",
  "enterprise_project_id" : "0",
  "protect_status" : 0,
  "access_status" : 0,
  "access_code" : "1b18879b9d064f8bbcbf8abce7294cac",
  "block_page" : {
    "template" : "default"
  },
  "web_tag" : "",
  "exclusive_ip" : false,
  "http2_enable" : false
}
```
#### 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.waf.v1.region.WafRegion;
  import com.huaweicloud.sdk.waf.v1.*;
  import com.huaweicloud.sdk.waf.v1.model.*;
  public class ShowHostSolution {
      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);
          WafClient client = WafClient.newBuilder()
                  .withCredential(auth)
                  .withRegion(WafRegion.valueOf("<YOUR REGION>"))
                  .build();
          ShowHostRequest request = new ShowHostRequest();
          request.withInstanceId("{instance_id}");
          try {
              ShowHostResponse response = client.showHost(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 huaweicloudsdkwaf.v1.region.waf_region import WafRegion
  from huaweicloudsdkcore.exceptions import exceptions
  from huaweicloudsdkwaf.v1 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 = WafClient.new_builder() \
          .with_credentials(credentials) \
          .with_region(WafRegion.value_of("<YOUR REGION>")) \
          .build()
      try:
          request = ShowHostRequest()
          request.instance_id = "{instance_id}"
          response = client.show_host(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"
      waf "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/waf/v1"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/waf/v1/model"
      region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/waf/v1/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 := waf.WafClientBuilder().
           WithRegion(region.ValueOf("<YOUR REGION>")).
           WithCredential(auth).
           SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      client := waf.NewWafClient(hcClient)
      request := &model.ShowHostRequest{}
  request.InstanceId = "{instance_id}"
  response, err := client.ShowHost(request)
  if err == nil {
          fmt.Printf("%+v\n", response)
      } else {
          fmt.Println(err)
      }
  }
  ```
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/WAF/sdk?api=ShowHost)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述        |
|:---|:---|
| 200 | OK        |
| 400 | 请求失败      |
| 401 | token权限不足 |
| 500 | 服务器内部错误   |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-waf/ErrorCode.html)。
