All Products
Search
Document Center

Resource Access Management:GetSecurityPreference

Last Updated:May 08, 2024

Queries the security preferences for RAM users.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:GetSecurityPreferenceRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

For more information about common request parameters, see API Reference.

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

SecurityPreferenceobject

The details of security preferences.

AccessKeyPreferenceobject

The AccessKey pair preference.

AllowUserToManageAccessKeysboolean

Indicates whether RAM users can manage their AccessKey pairs. Valid values:

  • true
  • false
false
LoginProfilePreferenceobject

The logon preference.

EnableSaveMFATicketboolean

Indicates whether RAM users can remember the multi-factor authentication (MFA) devices for seven days. Valid values:

  • true
  • false
false
LoginSessionDurationinteger

The validity period of the logon session of RAM users. Unit: hours.

6
LoginNetworkMasksstring

The subnet mask.

10.0.0.0/8
AllowUserToChangePasswordboolean

Indicates whether RAM users can change their passwords. Valid values:

  • true
  • false
true
OperationForRiskLoginstring

Indicates whether to enable MFA for RAM users who initiated unusual logons. Valid values:

  • autonomous (default): yes. MFA is prompted for RAM users who initiated unusual logons. However, the RAM users are allowed to skip MFA.
  • enforceVerify: MFA is prompted for RAM users who initiated unusual logons and the RAM users cannot skip MFA.
autonomous
MFAOperationForLoginstring

Indicates whether MFA is required for all RAM users when they log on to the Alibaba Cloud Management Console. Valid values:

  • mandatory: MFA is required for all RAM users. If you use EnforceMFAForLogin, set the value to true.
  • independent (default): User-specific settings are applied. If you use EnforceMFAForLogin, set the value to false.
  • adaptive: MFA is required only for RAM users who initiated unusual logons.
adaptive
MFAPreferenceobject

The MFA preference.

AllowUserToManageMFADevicesboolean

Indicates whether RAM users can manage their MFA devices. Valid values:

  • true
  • false
false
VerificationPreferenceobject

The MFA method preference.

VerificationTypesarray

The MFA methods.

string

The MFA method. Valid values:

  • sms: mobile phone
  • email: email
["sms","email"]
PersonalInfoPreferenceobject

The personal information preference.

AllowUserToManagePersonalDingTalkboolean

Indicates whether RAM users can manage their personal DingTalk accounts, such as binding and unbinding of the accounts. Valid values:

  • true
  • false
true
RequestIdstring

The request ID.

30C9068D-FBAA-4998-9986-8A562FED0BC3

Examples

Sample success responses

JSONformat

{
  "SecurityPreference": {
    "AccessKeyPreference": {
      "AllowUserToManageAccessKeys": false
    },
    "LoginProfilePreference": {
      "EnableSaveMFATicket": false,
      "LoginSessionDuration": 6,
      "LoginNetworkMasks": "10.0.0.0/8",
      "AllowUserToChangePassword": true,
      "OperationForRiskLogin": "autonomous",
      "MFAOperationForLogin": "adaptive"
    },
    "MFAPreference": {
      "AllowUserToManageMFADevices": false
    },
    "VerificationPreference": {
      "VerificationTypes": [
        "[\"sms\",\"email\"]"
      ]
    },
    "PersonalInfoPreference": {
      "AllowUserToManagePersonalDingTalk": true
    }
  },
  "RequestId": "30C9068D-FBAA-4998-9986-8A562FED0BC3"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-03-20The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-01-06The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2021-08-11The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2021-08-11The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.