Mengkueri host yang diotorisasi atau tidak diotorisasi untuk dikelola oleh pengguna.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:ListHostsForUser |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID bastion host tempat Anda ingin mengkueri host yang diotorisasi atau tidak diotorisasi untuk dikelola oleh 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 mengkueri host yang diotorisasi atau tidak diotorisasi untuk dikelola oleh pengguna. Catatan
Untuk informasi lebih lanjut tentang pemetaan antara ID wilayah dan nama wilayah, lihat Wilayah dan zona. |
cn-hangzhou |
| Mode |
string |
No |
Menentukan kategori host yang ingin Anda kueri. Nilai valid:
|
Authorized |
| UserId |
string |
Yes |
ID pengguna. Catatan
Anda dapat memanggil operasi ListUsers untuk mengkueri ID pengguna. |
1 |
| PageNumber |
string |
No |
Nomor halaman yang akan dikembalikan. Nilai default: 1. |
1 |
| PageSize |
string |
No |
Jumlah entri yang dikembalikan per halaman. Catatan
Kami menyarankan agar Anda tidak mengosongkan parameter ini. |
20 |
| HostAddress |
string |
No |
Titik akhir host yang ingin Anda kueri. Anda dapat mengatur parameter ini ke nama domain atau alamat IP. Hanya pencocokan persis yang didukung. |
192.168.XX.XX |
| HostName |
string |
No |
Nama host yang ingin Anda kueri. Hanya pencocokan persis yang didukung. |
abc |
| OSType |
string |
No |
Sistem operasi host yang ingin Anda kueri. Nilai valid:
|
Linux |
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" di topik ini.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of hosts returned. |
1 |
| RequestId |
string |
The request ID. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| Hosts |
array<object> |
The hosts returned. |
|
|
object |
|||
| Comment |
string |
The description of the host. |
comment |
| ActiveAddressType |
string |
The endpoint type of the host. Valid values:
|
Public |
| HostPublicAddress |
string |
The public endpoint of the host. The value is a domain name or an IP address. |
10.158.XX.XX |
| HostName |
string |
The name of the host. |
host01 |
| HostPrivateAddress |
string |
The internal endpoint of the host. The value is a domain name or an IP address. |
192.168.XX.XX |
| OSType |
string |
The operating system of the host. Valid values:
|
Linux |
| HostId |
string |
The ID of the host. |
1 |
Contoh
Respons sukses
JSONformat
{
"TotalCount": 1,
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE ",
"Hosts": [
{
"Comment": "comment",
"ActiveAddressType": "Public",
"HostPublicAddress": "10.158.XX.XX",
"HostName": "host01",
"HostPrivateAddress": "192.168.XX.XX",
"OSType": "Linux",
"HostId": "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.