Querying the Password Strength Policy with Conditions
Function
This API is used to query the password strength policy, including the regular expression and description, of a specified account based on specified conditions.
The API can be called using both the global endpoint and region-specific endpoints.
Authorization Information
You do not need to obtain permissions to call this API.
URI
GET /v3/domains/{domain_id}/config/security_compliance/{option}
Parameter | Mandatory | Type | Description |
|---|---|---|---|
domain_id | Yes | String | Account ID. For details about how to obtain the account ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
option | Yes | String | Query condition, which can be password_regex or password_regex_description. password_regex indicates the regular expression of the password strength policy, and password_regex_description indicates the description of the password strength policy. Options:
|
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
Content-Type | Yes | String | Fill application/json;charset=utf8 in this field. |
X-Auth-Token | Yes | String | Token (no special permission requirements) of the IAM user corresponding to the domain_id specified in the URL. |
Response Parameters
Parameter | Type | Description |
|---|---|---|
Object | Configuration information. |
Parameter | Type | Description |
|---|---|---|
password_regex | String | Regular expression of the password strength policy. (This parameter is returned if option is set to password_regex.) |
password_regex_description | String | Description of the password strength policy. (This parameter is returned if option is set to password_regex_description.) |
Example Request
- Request for querying the password strength policy with option set to password_regex
GET https://iam.myhuaweicloud.eu/v3/domains/{domain_id}/config/security_compliance/password_regex - Request for querying the password strength policy with option set to password_regex_description
GET https://iam.myhuaweicloud.eu/v3/domains/{domain_id}/config/security_compliance/password_regex_description
Example Response
Status code: 200
The request is successful.
Example 1: Response to the request with the option parameter being set to password_regex
Example 2: Response to the request with the option parameter being set to password_regex_description
- Example 1
{ "config": { "password_regex": "^(?![A-Z]*$)(?![a-z]*$)(?![\\d]*$)(?![^\\W]*$)\\S{6,32}$" } } - Example 2
{ "config": { "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." } }
Status Codes
Status Code | Description |
|---|---|
200 | The request is successful. |
400 | Invalid parameters. |
401 | Authentication failed. |
403 | Access denied. |
404 | The requested resource cannot be found. |
405 | The method specified in the request is not allowed for the requested resource. |
413 | The request entity is too large. |
500 | Internal server error. |
Error Codes
None
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

