You can call GetSecurityPreference to query the global security preferences for Resource Access Management (RAM) users.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ram:GetSecurityPreference |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response that is returned. |
||
| SecurityPreference |
object |
The information about security preferences. |
|
| AccessKeyPreference |
object |
The AccessKey preferences. |
|
| AllowUserToManageAccessKeys |
boolean |
Indicates whether RAM users can manage their own AccessKey pairs. Valid values:
|
false |
| LoginProfilePreference |
object |
The logon preferences. |
|
| EnableSaveMFATicket |
boolean |
Indicates whether to save the multi-factor authentication (MFA) status for seven days after a RAM user logs on using MFA. Valid values:
|
false |
| LoginSessionDuration |
integer |
The logon session duration for RAM users. Unit: hours. |
6 |
| LoginNetworkMasks |
string |
The logon mask. |
10.0.0.0/8 |
| AllowUserToChangePassword |
boolean |
Indicates whether RAM users can manage their own passwords. Valid values:
|
true |
OperationForRiskLogin
deprecated
|
string |
Indicates whether to use MFA for secondary authentication during a risk-based logon. Valid values:
|
autonomous |
| MFAOperationForLogin |
string |
Specifies whether MFA is required for logon. This parameter replaces the EnforceMFAForLogin parameter. The original parameter is still valid. Use this new parameter. Valid values:
|
adaptive |
| AllowUserToLoginWithPasskey |
boolean |
Indicates whether RAM users can log on using passkeys. Valid values:
|
true |
| MFAPreference |
object |
The MFA preferences. |
|
| AllowUserToManageMFADevices |
boolean |
Indicates whether RAM users can manage their own MFA devices. Valid values:
|
false |
| VerificationPreference |
object |
The preferences for MFA methods. |
|
| VerificationTypes |
array |
The MFA methods. |
|
|
string |
The MFA method. Valid values:
|
["sms","email"] |
|
| PersonalInfoPreference |
object |
The personal information preferences. |
|
| AllowUserToManagePersonalDingTalk |
boolean |
Indicates whether RAM users can manage the attachment and detachment of their personal DingTalk accounts. Valid values:
|
true |
| MaxIdleDays |
object |
The configuration of the maximum idle period, in days. |
|
| MaxIdleDaysForUsers |
integer |
The maximum idle period for RAM users, in days. If a RAM user with console logon enabled remains inactive for this period, their console logon is automatically disabled the next day. This does not apply to single sign-on (SSO) logons. The default value is 730. |
730 |
| MaxIdleDaysForAccessKeys |
integer |
The maximum idle period for the AccessKey pair of a RAM user, in days. If an AccessKey pair remains unused for this period, it is automatically disabled the next day. The default value is 730. |
730 |
| RequestId |
string |
The request ID. |
30C9068D-FBAA-4998-9986-8A562FED0BC3 |
Examples
Success response
JSON format
{
"SecurityPreference": {
"AccessKeyPreference": {
"AllowUserToManageAccessKeys": false
},
"LoginProfilePreference": {
"EnableSaveMFATicket": false,
"LoginSessionDuration": 6,
"LoginNetworkMasks": "10.0.0.0/8",
"AllowUserToChangePassword": true,
"OperationForRiskLogin": "autonomous",
"MFAOperationForLogin": "adaptive",
"AllowUserToLoginWithPasskey": true
},
"MFAPreference": {
"AllowUserToManageMFADevices": false
},
"VerificationPreference": {
"VerificationTypes": [
"[\"sms\",\"email\"]"
]
},
"PersonalInfoPreference": {
"AllowUserToManagePersonalDingTalk": true
},
"MaxIdleDays": {
"MaxIdleDaysForUsers": 730,
"MaxIdleDaysForAccessKeys": 730
}
},
"RequestId": "30C9068D-FBAA-4998-9986-8A562FED0BC3"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.