Queries the password policy, including the password strength, of RAM users.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetPasswordPolicy |
The operation that you want to perform. Set the value to GetPasswordPolicy. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PasswordPolicy |
The policy to manage passwords. |
||
HardExpiry | Boolean | false |
Indicates whether the password has expired. Valid values:
|
MaxLoginAttemps | Integer | 5 |
The maximum number of permitted logon attempts within one hour. The number of logon attempts is reset to zero if a RAM user changes the password. |
MaxPasswordAge | Integer | 0 |
The number of days for which a password is valid. Default value: 0. The default value indicates that the password never expires. |
MinimumPasswordLength | Integer | 12 |
The minimum required number of characters in a password. |
PasswordReusePrevention | Integer | 0 |
The number of previous passwords that the user is prevented from reusing. Default value: 0. The default value indicates that the RAM user is not prevented from reusing previous passwords |
RequireLowercaseCharacters | Boolean | true |
Indicates whether a password must contain one or more lowercase letters. |
RequireNumbers | Boolean | true |
Indicates whether a password must contain one or more digits. |
RequireSymbols | Boolean | true |
Indicates whether a password must contain one or more special characters. |
RequireUppercaseCharacters | Boolean | true |
Indicates whether a password must contain one or more uppercase letters. |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE73368 |
The ID of the request. |
Examples
Sample requests
https://ram.aliyuncs.com/?Action=GetPasswordPolicy
&AcccountAlias=myalias
&<Common request parameters>
Sample success responses
XML
format
<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
<PasswordPolicy>
<HardExpiry>false</HardExpiry>
<MaxLoginAttemps>5</MaxLoginAttemps>
<MaxPasswordAge>0</MaxPasswordAge>
<PasswordReusePrevention>0</PasswordReusePrevention>
<MinimumPasswordLength>12</MinimumPasswordLength>
<RequireLowercaseCharacters>true</RequireLowercaseCharacters>
<RequireUppercaseCharacters>true</RequireUppercaseCharacters>
<RequireNumbers>true</RequireNumbers>
<RequireSymbols>true</RequireSymbols>
</PasswordPolicy>
JSON
format
{
"RequestId":"04F0F334-1335-436C-A1D7-6C044FE73368",
"PasswordPolicy":{
"RequireUppercaseCharacters":true,
"MaxPasswordAge":0,
"HardExpiry":false,
"RequireNumbers":true,
"RequireSymbols":true,
"MaxLoginAttemps":5,
"PasswordReusePrevention":0,
"RequireLowercaseCharacters":true,
"MinimumPasswordLength":12
}
}
Error codes
For a list of error codes, visit the API Error Center.