
# 查询账号密码强度策略 - KeystoneShowSecurityCompliance
#### 功能介绍
该接口可以用于查询账号密码强度策略，查询结果包括密码强度策略的正则表达式及其描述。
该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见：[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/IAM/doc?api=KeystoneShowSecurityCompliance)中调试该接口。
#### 授权信息
当前API调用无需策略权限。
#### URI
GET /v3/domains/{domain_id}/config/security_compliance
表1路径参数 
| 参数        | 是否必选 | 参数类型   | 描述                                                                                                          |
|:---|:---|:---|:---|
| domain_id | 是    | String | 待查询的账号ID，获取方式请参见：[获取账号、IAM用户、项目、用户组、区域、委托的名称和ID](https://support.huaweicloud.com/api-iam/iam_17_0002.html)。 |
   
#### 请求参数
表2请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                      |
|:---|:---|:---|:---|
| Content-Type | 是    | String | 该字段内容填为"application/json;charset=utf8"。 |
| X-Auth-Token | 是    | String | URL中domain_id所对应账号中IAM用户的token（无需特殊权限）。 |
   
#### 响应参数
表3响应Body参数 
| 参数                                                                 | 参数类型   | 描述    |
|:---|:---|:---|
| [config] | Object | 配置信息。 |
   
 表4config 
| 参数                                                                                                | 参数类型   | 描述        |
|:---|:---|:---|
| [security_compliance] | Object | 密码强度策略信息。 |
   
 表5config.security_compliance 
| 参数                         | 参数类型   | 描述            |
|:---|:---|:---|
| password_regex             | String | 密码强度策略的正则表达式。 |
| password_regex_description | String | 密码强度策略的描述。    |
   
#### 请求示例
查询账号密码强度策略。
```
GET https://iam.myhuaweicloud.com/v3/domains/{domain_id}/config/security_compliance
```
#### 响应示例
**状态码为 200 时:**
请求成功。
```
{
    "config": {
        "security_compliance": {
            "password_regex": "^(?![A-Z]*$)(?![a-z]*$)(?![\\d]*$)(?![^\\W]*$)\\S{6,32}$",
            "password_regex_description": "The password must contain at least two of the following character types: uppercase letters, lowercase letters, digits, and special characters, and be a length between 6 and 32."
        }
    }
}
```
#### 返回值
| 返回值 | 描述        |
|:---|:---|
| 200 | 请求成功。     |
| 400 | 参数无效。     |
| 401 | 认证失败。     |
| 403 | 没有操作权限。   |
| 404 | 未找到相应的资源。 |
| 405 | 不允许的方法。   |
| 413 | 请求体过大。    |
| 500 | 内部服务错误。   |
| 503 | 服务不可用。    |
   
#### 错误码
无
