All Products
Search
Document Center

Resource Access Management:GetSecurityPreference

Last Updated:Jun 10, 2026

Gunakan `GetSecurityPreference` untuk mengkueri preferensi keamanan global pengguna RAM.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

ram:GetSecurityPreference

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Tidak ada parameter yang diperlukan.

Elemen respons

Element

Type

Description

Example

object

Data yang dikembalikan.

SecurityPreference

object

Preferensi keamanan.

AccessKeyPreference

object

Preferensi AccessKey.

AllowUserToManageAccessKeys

boolean

Specifies whether Resource Access Management (RAM) users can manage their own access keys. Valid values:

  • true: Allowed.

  • false: Not allowed.

false

AllowUserToManageServiceCredentials

boolean

false

LoginProfilePreference

object

Preferensi login.

EnableSaveMFATicket

boolean

Specifies whether to save the multi-factor authentication (MFA) verification status for seven days after a RAM user authenticates with an MFA device. Valid values:

  • true: Allowed.

  • false: Not allowed.

false

LoginSessionDuration

integer

The login session duration for a RAM user. Unit: hours.

6

LoginNetworkMasks

string

The login network mask. This setting specifies the IP addresses or CIDR blocks from which RAM users can sign in to the console.

10.0.0.0/8

AllowUserToChangePassword

boolean

Specifies whether RAM users can change their own passwords. Valid values:

  • true: Allowed.

  • false: Not allowed.

true

OperationForRiskLogin deprecated

string

Specifies whether to require multi-factor authentication (MFA) for an abnormal logon. Valid values:

  • autonomous (default): MFA is not required. An MFA device does not need to be bound.

  • enforceVerify: MFA is required.

autonomous

MFAOperationForLogin

string

Specifies whether MFA is required for console logons. This parameter replaces EnforceMFAForLogin. Although EnforceMFAForLogin is still valid, we recommend using this new parameter. Valid values:

  • mandatory: MFA is required for all RAM users. This value corresponds to true for the EnforceMFAForLogin parameter.

  • independent (default): Each RAM user manages their own MFA settings. This value corresponds to false for the EnforceMFAForLogin parameter.

  • adaptive: MFA is required only for abnormal logons.

adaptive

AllowUserToLoginWithPasskey

boolean

Specifies whether RAM users can sign in with a passkey. Valid values:

  • true: Allowed.

  • false: Not allowed.

true

MFAPreference

object

Preferensi MFA.

AllowUserToManageMFADevices

boolean

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

  • true: Allowed.

  • false: Not allowed.

false

VerificationPreference

object

Preferensi untuk metode MFA.

VerificationTypes

array

The MFA verification methods.

string

The MFA verification method. Valid values:

  • sms: security phone number.

  • email: security email address.

["sms","email"]

PersonalInfoPreference

object

Preferensi informasi pribadi.

AllowUserToManagePersonalDingTalk

boolean

Specifies whether RAM users can bind or unbind their personal DingTalk accounts. Valid values:

  • true: Allowed.

  • false: Not allowed.

true

MaxIdleDays

object

Pengaturan periode idle maksimum, dalam hari.

MaxIdleDaysForUsers

integer

The maximum number of days that a RAM user can be idle. If a user with console login enabled is inactive for this number of consecutive days, their console logon is automatically disabled the next day. This setting does not apply to single sign-on (SSO) logons. Default value: 730.

730

MaxIdleDaysForAccessKeys

integer

The maximum number of days that an access key can be idle. If an access key remains unused for this number of consecutive days, it is automatically disabled the next day. Default value: 730.

730

RequestId

string

ID permintaan.

30C9068D-FBAA-4998-9986-8A562FED0BC3

Contoh

Respons sukses

JSONformat

{
  "SecurityPreference": {
    "AccessKeyPreference": {
      "AllowUserToManageAccessKeys": false,
      "AllowUserToManageServiceCredentials": 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"
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.