Menghapus grup host dan akun host dari daftar grup host dan akun host yang diizinkan untuk dikelola oleh pengguna.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:DetachHostGroupAccountsFromUser |
update |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID bastion host yang izin akses atas grup host dan akun host tertentu ingin Anda cabut dari pengguna. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mengkueri ID bastion host. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
ID region dari bastion host yang izin akses atas grup host dan akun host tertentu ingin Anda cabut dari pengguna. Catatan
Untuk informasi lebih lanjut tentang pemetaan antara ID region dan nama region, lihat Region dan zona. |
cn-hangzhou |
| UserId |
string |
Yes |
ID pengguna yang izin aksesnya atas grup host dan akun host tertentu ingin Anda cabut. Catatan
Anda dapat memanggil operasi ListUsers untuk mengkueri ID pengguna. |
1 |
| HostGroups |
string |
Yes |
ID grup host dan nama akun host yang izin aksesnya ingin Anda cabut dari pengguna. Anda dapat menentukan hingga 10 ID grup host dan hingga 10 nama akun host untuk setiap grup host. Anda dapat menentukan hanya ID grup host. Dalam hal ini, izin atas grup host yang ditentukan dan semua akun host dalam grup host tersebut akan dicabut dari pengguna. Untuk informasi lebih lanjut tentang parameter ini, lihat bagian "Deskripsi parameter HostGroups" pada topik ini. Catatan
Anda dapat memanggil operasi ListHostGroups untuk mengkueri ID grup host dan operasi ListHostAccounts untuk mengkueri nama akun host. |
[ {"HostGroupId":"1"}, {"HostGroupId":"2","HostAccountNames":["root","111","abc"]}] |
Struktur parameter HostGroups
| Parameter | Tipe | Contoh | Deskripsi |
| HostGroupId | string | 1 | ID grup host. |
| HostAccountNames | array[string] | ["root","111","abc"] | Nama akun host. Tentukan sebagai string JSON. Anda dapat menentukan hingga 10 nama akun host. |
Kode berikut memberikan contoh:
[
{"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 Parameter umum. Untuk informasi lebih lanjut tentang contoh permintaan, lihat bagian Contoh permintaan pada topik ini.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| Results |
array<object> |
Hasil panggilan. |
|
|
array<object> |
|||
| Code |
string |
Kode return yang menunjukkan apakah panggilan berhasil. Nilai yang valid:
|
OK |
| Message |
string |
Parameter ini sudah tidak digunakan lagi. |
None |
| HostGroupId |
string |
ID grup host. |
1 |
| UserId |
string |
ID pengguna. |
1 |
| HostAccountNames |
array<object> |
Hasil pencabutan izin atas akun host tertentu dari pengguna. |
|
|
object |
|||
| Code |
string |
The return code that indicates whether permissions on the specified host account were revoked from the user. 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",
"UserId": "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.