All Products
Search
Document Center

Resource Access Management:GetPasswordPolicy

Last Updated:Aug 09, 2024

Queries the password policy, including the password strength, of RAM users.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ram:GetPasswordPolicyget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

04F0F334-1335-436C-A1D7-6C044FE73368
PasswordPolicyobject

The policy to manage passwords.

RequireNumbersboolean

Indicates whether a password must contain one or more digits.

true
RequireLowercaseCharactersboolean

Indicates whether a password must contain one or more lowercase letters.

true
HardExpiryboolean

Indicates whether the password has expired.

Valid values: true and false. Default value: false.

  • If the value of this parameter is true, the parent Alibaba Cloud account must reset the password before the RAM user can log on to the console.
  • If the value of this parameter is false, the RAM user can change the password and then log on to the console.
false
PasswordReusePreventioninteger

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

0
RequireSymbolsboolean

Indicates whether a password must contain one or more special characters.

true
MaxPasswordAgeinteger

The number of days for which a password is valid. Default value: 0. The default value indicates that the password never expires.

0
MinimumPasswordLengthinteger

The minimum required number of characters in a password.

12
RequireUppercaseCharactersboolean

Indicates whether a password must contain one or more uppercase letters.

true
MaxLoginAttempsinteger

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

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
No change history