Mencabut izin pada satu atau beberapa host dan akun host dari kelompok pengguna.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:DetachHostAccountsFromUserGroup |
update |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID bastion host tempat Anda ingin mencabut izin pada host dan akun host tertentu dari kelompok pengguna. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mengkueri ID bastion host. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
ID wilayah bastion host tempat Anda ingin mencabut izin pada host dan akun host tertentu dari kelompok pengguna. Catatan
Untuk informasi selengkapnya tentang pemetaan antara ID wilayah dan nama wilayah, lihat Wilayah dan zona. |
cn-hangzhou |
| UserGroupId |
string |
Yes |
ID kelompok pengguna yang izinnya pada host dan akun host tertentu ingin Anda cabut. Catatan
Anda dapat memanggil operasi ListUserGroups untuk mengkueri ID kelompok pengguna. |
1 |
| Hosts |
string |
Yes |
ID host dan akun host yang izinnya ingin Anda cabut dari kelompok pengguna. Anda dapat menentukan hingga 10 ID host dan hingga 10 ID akun host untuk setiap host. Anda dapat menentukan hanya ID host. Dalam hal ini, izin pada host tertentu dan semua akun host dari host tersebut dicabut dari kelompok pengguna. Untuk informasi selengkapnya tentang parameter ini, lihat bagian "Deskripsi parameter Hosts" di topik ini. Catatan
Anda dapat memanggil operasi ListHosts untuk mengkueri ID host dan operasi ListHostAccounts untuk mengkueri ID akun host. |
[ {"HostId":"1"}, {"HostId":"2","HostAccountIds":["1","2","3",...]}, {"HostId":"3","HostAccountIds":["4","5","6"]}, {"HostId":"4","HostAccountIds":["9","8","7"]} ] |
Deskripsi parameter Hosts.
| Field | Tipe | Contoh | Deskripsi |
| HostId | string | 1 | ID host. |
| HostAccountIds | array[string] | ["9","8","7"] | ID akun host. Nilainya adalah string JSON. Anda dapat menentukan hingga 10 ID akun host untuk setiap host. |
| Kode berikut memberikan contoh pengaturan parameter Hosts: |
[
{"HostId":"1"},
{"HostId":"2","HostAccountIds":["1","2","3",...]},
{"HostId":"3","HostAccountIds":["4","5","6",...]},
{"HostId":"4","HostAccountIds":["9","8","7",...]}
]
```.
Semua operasi API Alibaba Cloud harus menyertakan parameter permintaan umum. Untuk informasi selengkapnya tentang parameter permintaan umum, lihat [Parameter umum](~~315526~~).
Untuk informasi selengkapnya tentang contoh permintaan, lihat bagian "Contoh" di topik ini.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| Results |
array<object> |
The result of the call. |
|
|
array<object> |
|||
| Code |
string |
The return code that indicates whether the call was successful. Valid values:
|
OK |
| Message |
string |
This parameter is deprecated. |
None |
| HostId |
string |
The ID of the host. |
1 |
| UserGroupId |
string |
The ID of the group. |
1 |
| HostAccounts |
array<object> |
The result of revoking permissions on the specified host accounts from the user group. |
|
|
object |
|||
| Code |
string |
The return code that indicates whether permissions on the specified host account were revoked from the user group. Valid values:
|
OK |
| Message |
string |
This parameter is deprecated. |
None |
| HostAccountId |
string |
The ID of the host account. |
1 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"Results": [
{
"Code": "OK",
"Message": "None",
"HostId": "1",
"UserGroupId": "1",
"HostAccounts": [
{
"Code": "OK",
"Message": "None",
"HostAccountId": "1"
}
]
}
]
}
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.