All Products
Search
Document Center

Resource Access Management:GetPasswordPolicy

Last Updated:Jun 10, 2026

Mengkueri kebijakan kata sandi pengguna Resource Access Management (RAM), termasuk kekuatan kata sandi.

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:GetPasswordPolicy

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Tidak ada parameter yang diperlukan.

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The request ID.

04F0F334-1335-436C-A1D7-6C044FE73368

PasswordPolicy

object

The password policy.

RequireNumbers

boolean

Indicates whether a password must contain one or more digits.

true

RequireLowercaseCharacters

boolean

Indicates whether a password must contain one or more lowercase letters.

true

HardExpiry

boolean

Indicates whether a password expires. Valid values: true and false. Default value: false. If the parameter is unspecified, the default value false is returned.

  • If this parameter is set to true, the Alibaba Cloud account to which the RAM users belong must reset the password before the RAM users can log on to the Alibaba Cloud Management Console.

  • If this parameter is set to false, the RAM users can change the passwords after the passwords expire and then log on to the Alibaba Cloud Management Console.

false

PasswordReusePrevention

integer

The number of previous passwords that a RAM user is prevented from reusing. Default value: 0. The default value indicates that the RAM user can reuse previous passwords.

0

RequireSymbols

boolean

Indicates whether a password must contain one or more special characters.

true

MaxPasswordAge

integer

The number of days for which a password is valid. If you reset a password, the password validity period restarts. Default value: 0. The default value indicates that the password never expires.

0

MinimumPasswordLength

integer

The minimum number of characters in a password.

12

RequireUppercaseCharacters

boolean

Indicates whether a password must contain one or more uppercase letters.

true

MaxLoginAttemps

integer

The maximum number of permitted logon attempts within one hour. The number of logon attempts is reset to zero if a RAM user changes the password.

5

Contoh

Respons sukses

JSONformat

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "PasswordPolicy": {
    "RequireNumbers": true,
    "RequireLowercaseCharacters": true,
    "HardExpiry": false,
    "PasswordReusePrevention": 0,
    "RequireSymbols": true,
    "MaxPasswordAge": 0,
    "MinimumPasswordLength": 12,
    "RequireUppercaseCharacters": true,
    "MaxLoginAttemps": 5
  }
}

Respons error

JSONformat

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
    "PasswordPolicy": {
        "MinimumPasswordLength": 12,
        "RequireLowercaseCharacters": true,
        "RequireUppercaseCharacters": true,
        "RequireNumbers": true,
        "RequireSymbols": true
    }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.