Mengubah port untuk protokol O&M pada satu atau beberapa host.
Deskripsi operasi
Usage notes
Changes the port for the O&M protocol on one or more hosts. If the standard port for your O&M protocol is vulnerable to attacks, specify a custom port instead. For example, the standard SSH port is port 22.
Ports 0 to 1024 are reserved for Bastionhost. Do not change the port for the O&M protocol to a reserved port.
QPS limit
You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:ModifyHostsPort |
update |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID Host Bastion yang ingin Anda ubah port host-nya. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mengkueri ID Host Bastion. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
ID Wilayah Host Bastion yang ingin Anda ubah port host-nya. Catatan
Untuk informasi lebih lanjut tentang Pemetaan antara ID wilayah dan nama wilayah, lihat Wilayah dan zona. |
cn-hangzhou |
| HostIds |
string |
Yes |
ID host yang ingin Anda ubah port-nya. Nilainya adalah string JSON. Anda dapat menambahkan hingga 100 ID host. Jika Anda menentukan beberapa ID, pisahkan ID dengan koma (,). Catatan
Anda dapat memanggil operasi ListHosts untuk mengkueri ID host. |
["1","2","3"] |
| ProtocolName |
string |
Yes |
Protokol yang digunakan untuk terhubung ke host. Nilai valid:
|
SSH |
| Port |
string |
Yes |
Port baru host. Nomor port harus berupa bilangan bulat. Nilai valid: 22 hingga 65535. |
22 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request, which is used to locate and troubleshoot issues. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| Results |
array<object> |
The result of the call. |
|
|
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 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"Results": [
{
"Code": "OK",
"Message": "None",
"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.