tencent cloud

APIs

DocumentationAPIsTencentDB for MySQLParameter APIsDescribeInstancePasswordComplexity

DescribeInstancePasswordComplexity

Download
Focus Mode
Font Size
Last updated: 2026-06-01 17:01:56

1. API Description

Domain name for API request: cdb.intl.tencentcloudapi.com.

This API is used to query the password complexity parameter list of the instance.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeInstancePasswordComplexity.
Version Yes String Common Params. The value used for this API: 2017-03-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Instance ID.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number of password complexity related parameters
Items Array of ParameterDetail Password complexity parameter details. The policy value ranges from "" to "LOW" or "MEDIUM". Empty or LOW means password complexity is off. MEDIUM means password complexity is on. When the policy parameter value is MEDIUM, the following parameters take effect. length: value ranges from 8 to 64, means the minimum number of characters. mixed_case_count: value ranges from 1 to 16, means the minimum count of uppercase and lowercase letters. number_count: value ranges from 1 to 16, means the minimum count of numeric characters. special_char_count: value ranges from 1 to 16, means the minimum count of special characters.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying the Password Complexity of an Instance

Query the password complexity of an instance

Input Example

POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeInstancePasswordComplexity
<Common request parameters>

{
    "InstanceId": "cdb-1urqrvpf"
}

Output Example

{
    "Response": {
        "Items": [
            {
                "CurrentValue": "8",
                "Default": "0",
                "Description": "The minimum number of characters that validate_password requires passwords to have.",
                "EnumValue": [],
                "IsNotSupportEdit": false,
                "Max": 64,
                "MaxFunc": "",
                "Min": 0,
                "MinFunc": "",
                "Name": "validate_password_length",
                "NeedReboot": 0,
                "ParamType": "integer"
            },
            {
                "CurrentValue": "1",
                "Default": "0",
                "Description": "The minimum number of lowercase and uppercase characters that validate_password requires passwords to have if the password policy is MEDIUM or stronger.",
                "EnumValue": [],
                "IsNotSupportEdit": false,
                "Max": 16,
                "MaxFunc": "",
                "Min": 0,
                "MinFunc": "",
                "Name": "validate_password_mixed_case_count",
                "NeedReboot": 0,
                "ParamType": "integer"
            },
            {
                "CurrentValue": "2",
                "Default": "0",
                "Description": "The minimum number of numeric (digit) characters that validate_password requires passwords to have if the password policy is MEDIUM or stronger.",
                "EnumValue": [],
                "IsNotSupportEdit": false,
                "Max": 16,
                "MaxFunc": "",
                "Min": 0,
                "MinFunc": "",
                "Name": "validate_password_number_count",
                "NeedReboot": 0,
                "ParamType": "integer"
            },
            {
                "CurrentValue": "MEDIUM",
                "Default": "LOW",
                "Description": "The password policy enforced by validate_password. The validate_password.policy value can be specified using numeric values 0, 1, 2.",
                "EnumValue": [
                    "LOW",
                    "MEDIUM",
                    "STRONG"
                ],
                "IsNotSupportEdit": false,
                "Max": 0,
                "MaxFunc": "",
                "Min": 0,
                "MinFunc": "",
                "Name": "validate_password_policy",
                "NeedReboot": 0,
                "ParamType": "enum"
            },
            {
                "CurrentValue": "3",
                "Default": "0",
                "Description": "The minimum number of nonalphanumeric characters that validate_password requires passwords to have if the password policy is MEDIUM or stronger.",
                "EnumValue": [],
                "IsNotSupportEdit": false,
                "Max": 16,
                "MaxFunc": "",
                "Min": 0,
                "MinFunc": "",
                "Name": "validate_password_special_char_count",
                "NeedReboot": 0,
                "ParamType": "integer"
            }
        ],
        "RequestId": "103be0cb-4ca7-400b-a6b1-4c3fc7b7227c",
        "TotalCount": 5
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure CAM signature/authentication error.
CdbError Backend or process error.
InternalError.CdbError System error.
InternalError.DatabaseAccessError Internal database error.
InternalError.InternalHttpServerError An exception occurred while executing the request.
InternalError.ParamError Parameter error
InternalError.UnknownError Unknown error
InvalidParameter Parameter error.
InvalidParameter.ControllerNotFoundError This API was not found.
InvalidParameter.InstanceNotFound The instance does not exist.
OperationDenied Operation denied.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback