Anda dapat membuat aturan otorisasi untuk mengotorisasi beberapa pengguna mengelola aset. Anda juga dapat menentukan periode validitas untuk aturan otorisasi. Dengan cara ini, Anda dapat mengelola pengguna dan aset secara lebih efisien dan membatasi pengatur waktu di mana pengguna dapat mengakses aset.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:ListOperationDatabaseAccounts |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID bastion host. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mengkueri ID bastion host. |
bastionhost-cn-2r42t9cvf0i |
| RegionId |
string |
No |
ID wilayah bastion host. Catatan
Untuk informasi lebih lanjut tentang pemetaan antara ID wilayah dan nama wilayah, lihat Wilayah dan zona. |
cn-shanghai |
| DatabaseId |
string |
Yes |
Nama aturan otorisasi. Nama dapat memiliki panjang hingga 128 karakter. |
56 |
| PageNumber |
string |
No |
Keterangan aturan otorisasi. Keterangan dapat memiliki panjang hingga 500 karakter. |
1 |
| PageSize |
string |
No |
Pengatur waktu mulai periode validitas aturan otorisasi. Tentukan stempel waktu UNIX yang mewakili jumlah detik yang telah berlalu sejak 1 Januari 1970, 00:00:00 UTC. |
20 |
| DatabaseAccountName |
string |
No |
Pengatur waktu berakhir periode validitas aturan otorisasi. Tentukan stempel waktu UNIX yang mewakili jumlah detik yang telah berlalu sejak 1 Januari 1970, 00:00:00 UTC. |
test |
Array Hosts.
Parameter Host
| Parameter | Tipe | Deskripsi |
| HostId | string | ID host. |
| HostAccountIds | array[string] | Array yang terdiri dari ID akun host. |
Array HostGroups.
Parameter HostGroup
| Parameter | Tipe | Deskripsi |
| HostGroupId | string | ID kelompok host. |
| HostAccountNames | array[string] | Array yang terdiri dari nama pengguna akun host. |
Parameter AssetGroup
| Parameter | Tipe | Deskripsi |
| AssetGroupId | string | ID kelompok aset. |
| AssetAccountNames | array[string] | Array yang terdiri dari nama pengguna akun aset. |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| DatabaseAccounts |
array<object> |
The database accounts returned. |
|
|
object |
|||
| DBName |
string |
The name of the PostgreSQL or Oracle database. |
xe |
| DatabaseAccountId |
string |
The database account ID. |
3 |
| DatabaseAccountName |
string |
The name of the database account. |
system |
| DatabaseId |
string |
The database ID. |
2 |
| HasPassword |
string |
Indicates whether a password is configured for the database host account. |
true |
| LoginAttribute |
string |
The logon attribute. One of the following values is returned if the database engine is Oracle:
|
SID |
| ProtocolName |
string |
The protocol that is used by the database account. |
MySQL |
| RequestId |
string |
The request ID. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| TotalCount |
integer |
The total number of entries returned. |
5 |
Contoh
Respons sukses
JSONformat
{
"DatabaseAccounts": [
{
"DBName": "xe",
"DatabaseAccountId": "3",
"DatabaseAccountName": "system",
"DatabaseId": "2",
"HasPassword": "true",
"LoginAttribute": "SID",
"ProtocolName": "MySQL"
}
],
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"TotalCount": 5
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | |
| 500 | InternalError | An unknown error occurred. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.