Mengambil daftar instans tempat pengguna tertentu memiliki izin.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:ListAuthorizedInstancesForUser |
none |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| UserId |
string |
Yes |
ID pengguna. Anda dapat memanggil operasi GetUser untuk mengambil nilai parameter ini. Catatan
Parameter ini wajib diisi ketika nilai parameter IdentityType adalah USER. |
51**** |
| EnvType |
string |
No |
Tipe lingkungan. Nilai valid:
|
product |
| DbType |
string |
No |
Tipe database. Nilai valid:
|
MySQL |
| SearchKey |
string |
No |
Kata kunci pencarian. |
policy_test |
| PageNumber |
string |
No |
Nomor halaman. |
1 |
| PageSize |
string |
No |
Jumlah catatan per halaman. |
20 |
| Tid |
integer |
No |
ID penyewa. Catatan
Untuk mengambil ID penyewa, arahkan pointer ke gambar profil di sudut kanan atas Konsol DMS. Untuk informasi selengkapnya, lihat Melihat informasi tentang penyewa saat ini. |
3*** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Respons. |
||
| RequestId |
string |
ID permintaan. Digunakan untuk melacak log dan memecahkan masalah. |
B7DB89CC-017D-5503-8953-38FFE241A618 |
| Instances |
array<object> |
Daftar instans tempat pengguna memiliki izin. |
|
|
array<object> |
Daftar instans. |
||
| InstanceId |
string |
ID instans. |
21**** |
| Host |
string |
Titik akhir yang digunakan untuk terhubung ke instans. |
rm-2zex9lrc0gz0****.mysql.rds.aliyuncs.com |
| Port |
string |
Port yang digunakan untuk terhubung ke instans. |
3306 |
| DbType |
string |
Tipe database. |
MySQL |
| UserId |
string |
ID pengguna. |
51**** |
| UserName |
string |
Nama pengguna. |
user_test |
| InstanceAlias |
string |
Alias instans. |
DMS_TEST |
| EnvType |
string |
Tipe lingkungan instans. |
product |
| PermissionDetail |
object |
Detail izin. Format detail izin bervariasi berdasarkan sumber izin. Contoh berikut menunjukkan format ketika sumber izin adalah izin umum. |
|
| DsType |
string |
The type of object on which the operation is performed. |
DATABASE |
| PermType |
string |
The type of the permission. Valid values:
|
CORRECT |
| ExpireDate |
string |
The time when the permission expires. |
2024-12-06 10:00:00 |
| Message |
string |
If the permission source is a permission policy, the value of this parameter includes the policy name and the operations that are allowed for the user. |
权限策略通过,策略名:INSTANCE_OWNER,被允许的操作:instance:InstanceQuery |
Contoh
Respons sukses
JSONformat
{
"RequestId": "B7DB89CC-017D-5503-8953-38FFE241A618",
"Instances": [
{
"InstanceId": "21****",
"Host": "rm-2zex9lrc0gz0****.mysql.rds.aliyuncs.com",
"Port": "3306",
"DbType": "MySQL",
"UserId": "51****",
"UserName": "user_test",
"InstanceAlias": "DMS_TEST",
"EnvType": "product",
"PermissionDetail": {
"DsType": "DATABASE",
"PermType": "CORRECT",
"ExpireDate": "2024-12-06 10:00:00\n",
"Message": "权限策略通过,策略名:INSTANCE_OWNER,被允许的操作:instance:InstanceQuery"
}
}
]
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.