All Products
Search
Document Center

Resource Access Management:GetPasswordPolicy

更新时间:Jul 24, 2025

Queries the details of the password policy for RAM users.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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 request ID.

BDAA8408-E67C-428B-BFF0-1B2AC05C9610
PasswordPolicyobject

The details of the password policy.

RequireNumbersboolean

Indicates whether the password must contain digits.

false
RequireLowercaseCharactersboolean

Indicates whether the password must contain lowercase letters.

false
PasswordReusePreventioninteger

The policy for password history check.

0
RequireSymbolsboolean

Indicates whether the password must contain special characters.

false
PasswordNotContainUserNameboolean

Indicates whether to exclude the username from the password.

false
MinimumPasswordDifferentCharacterinteger

The minimum number of unique characters in the password.

0
MaxPasswordAgeinteger

The validity period of the password.

0
HardExpireboolean

Indicates whether to disable logon after the password expires.

false
MinimumPasswordLengthinteger

The minimum required number of characters in a password.

8
RequireUppercaseCharactersboolean

Indicates whether the password must contain uppercase letters.

false
MaxLoginAttempsinteger

The maximum number of password retries.

0

Examples

Sample success responses

JSONformat

{
  "RequestId": "BDAA8408-E67C-428B-BFF0-1B2AC05C9610",
  "PasswordPolicy": {
    "RequireNumbers": false,
    "RequireLowercaseCharacters": false,
    "PasswordReusePrevention": 0,
    "RequireSymbols": false,
    "PasswordNotContainUserName": false,
    "MinimumPasswordDifferentCharacter": 0,
    "MaxPasswordAge": 0,
    "HardExpire": false,
    "MinimumPasswordLength": 8,
    "RequireUppercaseCharacters": false,
    "MaxLoginAttemps": 0
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-14API Description UpdateView Change Details