Configures the password policy for RAM users, including the password strength.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ram:SetPasswordPolicy | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
MinimumPasswordLength | integer | No | The minimum required number of characters in a password. Valid values: 8 to 32. Default value: 8. | 12 |
RequireLowercaseCharacters | boolean | No | Specifies whether a password must contain one or more lowercase letters. | true |
RequireUppercaseCharacters | boolean | No | Specifies whether a password must contain one or more uppercase letters. | true |
RequireNumbers | boolean | No | Specifies whether a password must contain one or more digits. | true |
RequireSymbols | boolean | No | Specifies whether a password must contain one or more special characters. | true |
HardExpiry | boolean | No | Specifies whether a password will expire. Valid values:
| false |
MaxPasswordAge | integer | No | The number of days for which a password is valid. Default value: 0. The default value indicates that the password never expires. | 0 |
PasswordReusePrevention | integer | No | The number of previous passwords that a RAM user is prevented from reusing. Default value: 0. The default value indicates that the RAM user can reuse previous passwords. | 0 |
MaxLoginAttemps | integer | No | 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. | 5 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"PasswordPolicy": {
"RequireNumbers": true,
"RequireLowercaseCharacters": true,
"HardExpiry": false,
"PasswordReusePrevention": 0,
"RequireSymbols": true,
"MaxPasswordAge": 0,
"MinimumPasswordLength": 12,
"RequireUppercaseCharacters": true,
"MaxLoginAttemps": 5
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|