Configures global security preferences for RAM users in an Alibaba Cloud account.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ram:SetSecurityPreference |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| EnableSaveMFATicket |
boolean |
No |
Specifies whether to remember multi-factor authentication (MFA) devices of RAM users for seven days. Valid values:
|
true |
| AllowUserToChangePassword |
boolean |
No |
Specifies whether RAM users can change their passwords. Valid values:
|
true |
| AllowUserToManageAccessKeys |
boolean |
No |
Specifies whether RAM users can manage their AccessKey pairs. Valid values:
|
false |
| AllowUserToManagePublicKeys |
boolean |
No |
Specifies whether RAM users can manage their public keys. Valid values:
Note
This parameter is valid only for the Japan site. |
false |
| AllowUserToManageMFADevices |
boolean |
No |
Specifies whether RAM users can manage their MFA devices. Valid values:
|
true |
| LoginSessionDuration |
integer |
No |
The validity period of the logon session of RAM users. Valid values: 1 to 24. Default value: 6. Unit: hours. |
6 |
| LoginNetworkMasks |
string |
No |
The subnet mask that specifies the IP addresses from which logon to the Alibaba Cloud Management Console is allowed. This parameter applies to password-based logon and single sign-on (SSO), but not to API calls authenticated by AccessKey pairs.
To specify multiple subnet masks, separate them with semicolons (;). Example: 192.168.0.0/16;10.0.0.0/8. You can specify up to 40 subnet masks. Maximum total length: 512 characters. |
10.0.0.0/8 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| SecurityPreference |
object |
The security preferences. |
|
| AccessKeyPreference |
object |
The AccessKey pair preference. |
|
| AllowUserToManageAccessKeys |
boolean |
Indicates whether RAM users can manage their AccessKey pairs. |
false |
| MFAPreference |
object |
The MFA preference. |
|
| AllowUserToManageMFADevices |
boolean |
Indicates whether RAM users can manage their MFA devices. |
false |
| LoginProfilePreference |
object |
The logon preference. |
|
| EnableSaveMFATicket |
boolean |
Indicates whether the MFA devices of RAM users are remembered. |
false |
| LoginSessionDuration |
integer |
The validity period of the logon session of RAM users. |
6 |
| LoginNetworkMasks |
string |
The subnet mask. |
10.0.0.0/8 |
| AllowUserToChangePassword |
boolean |
Indicates whether RAM users can change their passwords. |
true |
| PublicKeyPreference |
object |
The public key preference. Note
This parameter is valid only for the Japan site. |
|
| AllowUserToManagePublicKeys |
boolean |
Indicates whether RAM users can manage their public keys. |
false |
| RequestId |
string |
The request ID. |
A978915D-F279-4CA0-A89B-9A71219FFB3E |
Examples
Success response
JSON format
{
"SecurityPreference": {
"AccessKeyPreference": {
"AllowUserToManageAccessKeys": false
},
"MFAPreference": {
"AllowUserToManageMFADevices": false
},
"LoginProfilePreference": {
"EnableSaveMFATicket": false,
"LoginSessionDuration": 6,
"LoginNetworkMasks": "10.0.0.0/8",
"AllowUserToChangePassword": true
},
"PublicKeyPreference": {
"AllowUserToManagePublicKeys": false
}
},
"RequestId": "A978915D-F279-4CA0-A89B-9A71219FFB3E"
}
Error response
JSON format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"SecurityPreference": {
"LoginProfilePreference": {
"EnableSaveMFATicket": true,
"AllowUserToChangePassword": true
},
"AccessKeyPreference": {
"AllowUserToManageAccessKeys": false
},
"MFAPreference": {
"AllowUserToManageMFADevices": true
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.