Mengkueri host di bastion host.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:ListHosts |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID bastion host tempat Anda ingin mengkueri host. 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. Catatan
Untuk informasi selengkapnya tentang pemetaan antara ID wilayah dan nama wilayah, lihat Regions and zones. |
cn-hangzhou |
| PageNumber |
string |
No |
Nomor halaman. Nilai default: 1. |
1 |
| PageSize |
string |
No |
Jumlah entri per halaman. Nilai default: 10. Catatan
Jangan biarkan parameter ini kosong. |
20 |
| OSType |
string |
No |
Sistem operasi host yang ingin Anda kueri. Nilai valid:
|
Linux |
| HostName |
string |
No |
Nama host yang ingin Anda kueri. Hanya pencocokan tepat yang didukung. |
host |
| HostAddress |
string |
No |
Alamat host yang ingin Anda kueri. Anda dapat mengatur parameter ini ke nama domain atau alamat IP. Hanya pencocokan tepat yang didukung. |
1.1.XX.XX |
| Source |
string |
No |
Sumber host yang ingin Anda kueri. Nilai valid:
|
Local |
| SourceInstanceId |
string |
No |
ID Instans ECS atau host di klaster khusus Database Apsara MyBase yang ingin Anda kueri. Hanya pencocokan tepat yang didukung. |
i-bp19ienyt0yax748**** |
| SourceInstanceState |
string |
No |
Status host yang ingin Anda kueri. Nilai valid:
|
Normal |
| HostGroupId |
string |
No |
ID kelompok host tempat host yang akan dikueri berada. Catatan
Anda dapat memanggil operasi ListHostGroups untuk mengkueri ID kelompok host. |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of hosts returned. |
1 |
| RequestId |
string |
The ID of the request, which is used to locate and troubleshoot issues. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| Hosts |
array<object> |
An array that consists of the hosts returned. |
|
|
object |
|||
| Comment |
string |
The description of the host. |
host |
| ActiveAddressType |
string |
The address type of the host. Valid values:
|
Public |
| HostPublicAddress |
string |
The public address of the host. The value is a domain name or an IP address. |
1.1.XX.XX |
| HostName |
string |
The name of the host. |
name |
| HostAccountCount |
integer |
The number of host accounts. |
1 |
| Source |
string |
The source of the host. Valid values:
|
Local |
| HostPrivateAddress |
string |
The private address 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 |
| SourceInstanceState |
string |
The status of the host. Valid values:
|
Normal |
| SourceInstanceId |
string |
The ID of the ECS instance or the host in an ApsaraDB MyBase dedicated cluster. Catatan
No value is returned for this parameter if the Source parameter is set to Local. |
i-bp19ienyt0yax748**** |
Contoh
Respons sukses
JSONformat
{
"TotalCount": 1,
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"Hosts": [
{
"Comment": "host",
"ActiveAddressType": "Public",
"HostPublicAddress": "1.1.XX.XX",
"HostName": "name",
"HostAccountCount": 1,
"Source": "Local",
"HostPrivateAddress": "192.168.XX.XX",
"OSType": "Linux",
"HostId": "1",
"SourceInstanceState": "Normal",
"SourceInstanceId": "i-bp19ienyt0yax748****"
}
]
}
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.