Generates a random password string.
Operation description
For more information about the access policy required by a RAM user or RAM role to call this API, see Resource Access Management.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PasswordLength |
string |
No |
The number of bytes that the password to be generated contains. Valid values: 8 to 128. Default value: 32 |
32 |
| ExcludeCharacters |
string |
No |
The characters that are not included in the password to be generated. Valid values:
This parameter is empty by default. |
ABCabc |
| ExcludeLowercase |
string |
No |
Specifies whether to exclude lowercase letters. Valid values:
|
false |
| ExcludeUppercase |
string |
No |
Specifies whether to exclude uppercase letters. Valid values:
|
false |
| ExcludeNumbers |
string |
No |
Specifies whether to exclude digits. Valid values:
|
false |
| ExcludePunctuation |
string |
No |
Specifies whether to exclude special characters. Valid values:
|
false |
| RequireEachIncludedType |
string |
No |
Specifies whether to include all the preceding character types. Valid values:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RandomPassword |
string |
The generated random password. |
IxGn>NMmNB(y?iZ |
| RequestId |
string |
The request ID. |
6b0cbe25-5e33-467e-972e-7a83c6c97604 |
Examples
Success response
JSON format
{
"RandomPassword": "IxGn>NMmNB(y?iZ
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | some of the specified parameters "\" is not valid | |
| 500 | InternalFailure | Internal Failure |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.