Mencabut izin pada satu atau beberapa kelompok host dan akun host dari kelompok pengguna.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:DetachHostGroupAccountsFromUserGroup |
update |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID bastion host yang ingin Anda cabut izinnya pada kelompok host dan akun host yang ditentukan dari kelompok pengguna. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mengkueri ID bastion host. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
ID Wilayah bastion host yang ingin Anda cabut izinnya pada kelompok host dan akun host yang ditentukan dari kelompok pengguna. Catatan
Untuk informasi lebih lanjut tentang Pemetaan antara ID wilayah dan nama wilayah, lihat Regions and zones. |
cn-hangzhou |
| UserGroupId |
string |
Yes |
ID kelompok pengguna yang ingin Anda cabut izinnya pada kelompok host dan akun host yang ditentukan. Catatan
Anda dapat memanggil operasi ListUserGroups untuk mengkueri ID kelompok pengguna. |
1 |
| HostGroups |
string |
Yes |
ID kelompok host dan nama akun host yang izinnya ingin Anda cabut dari kelompok pengguna. Anda dapat menentukan hingga 10 ID kelompok host dan hingga 10 nama akun host untuk setiap kelompok host. Anda juga dapat menentukan hanya ID kelompok host. Dalam kasus ini, izin pada kelompok host yang ditentukan dan semua akun host dalam kelompok host akan dicabut dari kelompok pengguna. Untuk informasi lebih lanjut tentang parameter ini, lihat bagian "Description of the HostGroups parameter" dari topik ini. Catatan
Anda dapat memanggil operasi ListHostGroups untuk mengkueri ID kelompok host dan operasi ListHostAccounts untuk mengkueri nama akun host. |
[ {"HostGroupId":"1"}, {"HostGroupId":"2","HostAccountNames":["root","111","abc"]}, {"HostGroupId":"3","HostAccountNames":["root","111","abc"]}, {"HostGroupId":"4","HostAccountNames":["root","111","abc"]}] |
Deskripsi parameter HostGroups.
| Field | Tipe | Contoh | Deskripsi |
| HostGroupId | string | 1 | ID kelompok host. |
| HostAccountNames | array[string] | ["root","111","abc"] | Nama akun host. Nilainya berupa string JSON. Anda dapat menentukan hingga 10 nama akun host untuk setiap kelompok host. |
| Kode berikut memberikan contoh pengaturan parameter HostGroups: |
[
{"HostGroupId":"1"},
{"HostGroupId":"2","HostAccountNames":["root","111","abc"]},
{"HostGroupId":"3","HostAccountNames":["root","111","abc"]},
{"HostGroupId":"4","HostAccountNames":["root","111","abc"]}
]
```.
Semua operasi API Alibaba Cloud harus menyertakan parameter permintaan umum. Untuk informasi lebih lanjut tentang parameter permintaan umum, lihat [Common parameters](~~315526~~).
Untuk informasi lebih lanjut tentang contoh permintaan, lihat bagian "Examples" dari 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 |
| HostGroupId |
string |
The ID of the host group. |
1 |
| UserGroupId |
string |
The ID of the group. |
1 |
| HostAccountNames |
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 specified user group. Valid values:
|
OK |
| Message |
string |
This parameter is deprecated. |
None |
| HostAccountName |
string |
The name of the host account. |
root |
Contoh
Respons sukses
JSONformat
{
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"Results": [
{
"Code": "OK",
"Message": "None",
"HostGroupId": "1",
"UserGroupId": "1",
"HostAccountNames": [
{
"Code": "OK",
"Message": "None",
"HostAccountName": "root"
}
]
}
]
}
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.