edit-icon download-icon

SetPasswordPolicy

Last Updated: Nov 10, 2017

Interface description

Sets the password policy for a user, including the password strength.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Operation interface, required. The parameter value is “SetPasswordPolicy”.

MinimumPasswordLength

  • Type: Integer
  • Required: No
  • Description: Minimum password length.

RequireLowercaseCharacters

  • Type: Boolean
  • Required: No
  • Description: Lowercase letters must be included.

RequireUppercaseCharacters

  • Type: Boolean
  • Required: No
  • Description: Uppercase letters must be included.

RequireNumbers

  • Type: Boolean
  • Required: No
  • Description: Numbers must be included.

RequireSymbols

  • Type: Boolean
  • Required: No
  • Description: Special letters must be included.

Return parameters

PasswordPolicy

Required permissions

Action

ram:SetPasswordPolicy

Resource

acs:ram:*:${AccountId}:*

Error messages

InvalidParameter.MinimumPasswordLength.Range
  • HTTP Status: 400
  • Error Message: The parameter - “MinimumPasswordLength” MUST be in the range of 8 and 32.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=SetPasswordPolicy
  2. &MinimumPasswordLength=12
  3. &RequireLowercaseCharacters=true
  4. &RequireUppercaseCharacters=true
  5. &RequireNumbers=true
  6. &RequireSymbols=true
  7. &<Public request parameters>

Return example

XML format

  1. <SetPasswordPolicyResponse>
  2. <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
  3. <PasswordPolicy>
  4. <MinimumPasswordLength>12</MinimumPasswordLength>
  5. <RequireLowercaseCharacters>true</RequireLowercaseCharacters>
  6. <RequireUppercaseCharacters>true</RequireUppercaseCharacters>
  7. <RequireNumbers>true</RequireNumbers>
  8. <RequireSymbols>true</RequireSymbols>
  9. </PasswordPolicy>
  10. </SetPasswordPolicyResponse>

JSON format

  1. {
  2. "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  3. "PasswordPolicy": {
  4. "MinimumPasswordLength": 12,
  5. "RequireLowercaseCharacters": true,
  6. "RequireUppercaseCharacters": true,
  7. "RequireNumbers": true,
  8. "RequireSymbols": true
  9. }
  10. }
Thank you! We've received your feedback.