POST /staged_config/deployment/hosts/{id}/tunnels/{name}
Updates a tunnel by host ID and tunnel name. The update is in the staged configuration and a deployment is needed. The only editable field is reverse_source. The default is false and can be set to true.
Updates a tunnel by host ID and tunnel name. The update is in the staged configuration and a deployment is needed. The only editable field is reverse_source. The default is false and can be set to true.
MIME Type |
---|
application/json |
Parameter | Type | Optionality | Data Type | MIME Type | Description |
---|---|---|---|---|---|
id |
path |
Required |
Number (Integer) |
text/plain |
Required - The ID of the staged host. |
name |
path |
Required |
String |
text/plain |
Required - The name of the tunnel to be retrieved. |
fields |
header |
Optional |
String |
text/plain |
Optional - Use this parameter to specify which fields you would like to get back in the response. Fields that are not named are excluded. Specify subfields in brackets and multiple fields in the same object are separated by commas. |
Parameter | Data Type | MIME Type | Description | Sample |
---|---|---|---|---|
tunnel |
Object |
application/json |
Required - The tunnel values to be updated. The reverse_source field is the only field that can be edited, and it is a required field. The default is false and can be set to true. When it's set to true the remote and originating hosts are swapped. |
{ "local_port": 42, "name": "String", "remote_host_id": 42, "remote_port": 42, "reverse_source": true } |
HTTP Response Code | Unique Code | Description |
---|---|---|
200 |
An SSH tunnel. This will be the tunnel that was updated for the staged host. |
|
404 |
1012 |
Could not find the tunnel. |
404 |
1013 |
Host id provided is invalid. |
422 |
1010 |
Invalid tunnel_name provided. |
422 |
1011 |
Invalid host_id provided. |
422 |
1014 |
Tunnel update not permitted when origin or remote host is a Console. |
422 |
1016 |
One or more provided parameters are invalid. |
Response Description
- name - The name of the tunnel object.
- remote_hostID - The host ID of the remote host of the tunnel.
- remote_port - The port on the remote host that is used by the tunnel.
- local_port - The port on the originating host that is used by the tunnel.
- reverse_source - Set this value to true to initiate the tunnel on the remote host instead of the originating host. This has no effect if either the originating or the remote host is a console.
Response Sample
{
"local_port": 42,
"name": "String",
"remote_host_id": 42,
"remote_port": 42,
"reverse_source": true
}