Mengambil detail aturan otorisasi tertentu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:GetRule |
get |
*Semua sumber daya.
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans Host Bastion. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mengambil parameter ini. |
bastionhost-cn-wwo35essw07 |
| RegionId |
string |
No |
ID wilayah instans Host Bastion. Catatan
Untuk pemetaan antara ID wilayah dan nama wilayah, lihat Regions and zones. |
cn-beijing |
| RuleId |
string |
Yes |
ID aturan otorisasi yang akan dikueri. Catatan
Anda dapat memanggil operasi ListRules untuk mengambil parameter ini. |
18 |
| ProjectId |
integer |
No |
ID proyek. |
3 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
Pengidentifikasi unik yang dihasilkan oleh Alibaba Cloud untuk permintaan. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| Rule |
object |
Informasi aturan otorisasi. |
|
| Comment |
string |
Komentar aturan otorisasi. |
comment |
| Databases |
array<object> |
Informasi tentang database yang diotorisasi. |
|
|
array<object> |
|||
| DatabaseAccounts |
array<object> |
Informasi tentang akun database yang diotorisasi. |
|
|
object |
|||
| DatabaseAccountId |
string |
ID akun database yang diotorisasi. |
5 |
| DatabaseId |
string |
ID instans database otorisasi. |
2 |
| EffectiveEndTime |
string |
Pengatur waktu berakhir periode validitas aturan otorisasi. Nilainya adalah stempel waktu UNIX dalam detik. |
1698720972 |
| EffectiveStartTime |
string |
Pengatur waktu mulai periode validitas aturan otorisasi. Nilainya adalah stempel waktu UNIX dalam detik. |
1687140883 |
| HostGroups |
array<object> |
Daftar kelompok host yang diotorisasi. |
|
|
object |
|||
| HostAccountNames |
array |
Informasi tentang akun host yang diotorisasi. |
|
|
string |
Nama akun yang diotorisasi dalam kelompok host. |
root |
|
| HostGroupId |
string |
ID kelompok host yang diotorisasi. |
7 |
| Hosts |
array<object> |
Informasi tentang host yang diotorisasi. |
|
|
array<object> |
|||
| HostAccounts |
array<object> |
Daftar akun host yang diotorisasi. |
|
|
object |
|||
| HostAccountId |
string |
ID akun host yang diotorisasi. |
9 |
| HostAccountName |
string |
Nama akun host yang diotorisasi. |
root |
| HostId |
string |
ID host yang diotorisasi. |
52 |
| RuleId |
string |
ID aturan otorisasi. |
3 |
| RuleName |
string |
Nama aturan otorisasi. |
rule |
| UserGroups |
array<object> |
Daftar kelompok pengguna yang diotorisasi. |
|
|
object |
|||
| UserGroupId |
string |
ID kelompok pengguna yang diotorisasi. |
2 |
| Users |
array<object> |
Daftar pengguna yang diotorisasi. |
|
|
object |
|||
| UserId |
string |
ID pengguna yang diotorisasi. |
3 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"Rule": {
"Comment": "comment",
"Databases": [
{
"DatabaseAccounts": [
{
"DatabaseAccountId": "5"
}
],
"DatabaseId": "2"
}
],
"EffectiveEndTime": "1698720972",
"EffectiveStartTime": "1687140883",
"HostGroups": [
{
"HostAccountNames": [
"root"
],
"HostGroupId": "7"
}
],
"Hosts": [
{
"HostAccounts": [
{
"HostAccountId": "9",
"HostAccountName": "root"
}
],
"HostId": "52"
}
],
"RuleId": "3",
"RuleName": "rule",
"UserGroups": [
{
"UserGroupId": "2"
}
],
"Users": [
{
"UserId": "3"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | |
| 500 | InternalError | An unknown error occurred. | |
| 404 | RuleNotFound | The rule is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.