All Products
Search
Document Center

Resource Access Management:ListEntitiesForPolicy

Last Updated:Jun 10, 2026

Mengkueri entitas yang dilampiri kebijakan.

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

get

Policy

acs:ram:*:system:policy/{#PolicyName}

Policy

acs:ram:*:{#accountId}:policy/{#PolicyName}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

PolicyType

string

No

Tipe kebijakan. Nilai valid: System dan Custom.

Custom

PolicyName

string

No

Nama kebijakan.

OSS-Administrator

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The request ID.

7B8A4E7D-6CFF-471D-84DF-195A7A241ECB

Groups

object

Group

array<object>

The information about the Resource Access Management (RAM) user groups.

object

The information about the RAM user group.

GroupName

string

The name of the RAM user group.

QA-Team

Comments

string

The description of the RAM user group.

测试团队

AttachDate

string

The time when the policy was attached to the RAM user group.

2015-02-18T17:22:08Z

Roles

object

Role

array<object>

The information about the RAM roles.

object

The information about the RAM role.

Description

string

The description of the RAM role.

ECS管理角色

RoleName

string

The name of the RAM role.

ECSAdmin

AttachDate

string

The time when the policy was attached to the RAM role.

2015-01-23T12:33:18Z

Arn

string

The Alibaba Cloud Resource Name (ARN) of the RAM role.

acs:ram::123456789012****:role/ECSAdmin

RoleId

string

The ID of the RAM role.

122748924538****

Users

object

User

array<object>

The information about the RAM users.

object

The information about the RAM user.

DisplayName

string

The display name of the RAM user.

张*

UserId

string

The unique ID of the RAM user.

122748924538****

UserName

string

The name of the RAM user.

zhangq****

AttachDate

string

The time when the policy was attached to the RAM user.

2015-01-23T12:33:18Z

Contoh

Respons sukses

JSONformat

{
  "RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  "Groups": {
    "Group": [
      {
        "GroupName": "QA-Team",
        "Comments": "测试团队",
        "AttachDate": "2015-02-18T17:22:08Z"
      }
    ]
  },
  "Roles": {
    "Role": [
      {
        "Description": "ECS管理角色",
        "RoleName": "ECSAdmin",
        "AttachDate": "2015-01-23T12:33:18Z",
        "Arn": "acs:ram::123456789012****:role/ECSAdmin",
        "RoleId": "122748924538****"
      }
    ]
  },
  "Users": {
    "User": [
      {
        "DisplayName": "张*",
        "UserId": "122748924538****",
        "UserName": "zhangq****",
        "AttachDate": "2015-01-23T12:33:18Z"
      }
    ]
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.