Updated on 2024-07-30 GMT+08:00

Querying the Password Strength Policy

Function

This API is used to query the password strength policy, including the regular expression and description, of a specified account.

The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.

Debugging

You can debug this API in API Explorer.

URI

GET /v3/domains/{domain_id}/config/security_compliance

Table 1 URI parameters

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.

Request Parameters

Table 2 Parameters in the request header

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

Table 3 Parameters in the response body

Parameter

Type

Description

config

Object

Configuration information

Table 4 config

Parameter

Type

Description

security_compliance

Object

Password policy information

Table 5 config.security_compliance

Parameter

Type

Description

password_regex

String

Regular expression of the password strength policy

password_regex_description

String

Description of the password strength policy

Example Request

Request for querying the password strength policy

GET https://iam.myhuaweicloud.com/v3/domains/{domain_id}/config/security_compliance

Example Response

Status code: 200

The request is successful.

{
    "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."
        }
    }
}

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.

503

Service unavailable.

Error Codes

None