Class: Infrawrench::SshTunnelsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::SshTunnelsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.ssh_tunnels
Instance Method Summary collapse
-
#active(org_id: nil, request_options: nil) ⇒ Hash
List active tunnels for this org.
-
#close(body:, org_id: nil, request_options: nil) ⇒ Hash
Close a tunnel by id.
-
#create_account(body:, org_id: nil, request_options: nil) ⇒ Hash
Create an account whose traffic is tunneled over SSH.
-
#exec(body:, org_id: nil, request_options: nil) ⇒ Hash
Run a command over SSH using an org SSH key.
-
#initialize(transport) ⇒ SshTunnelsNamespace
constructor
private
A new instance of SshTunnelsNamespace.
-
#open(body:, org_id: nil, request_options: nil) ⇒ Hash
Re-open the tunnel for an existing account.
Constructor Details
#initialize(transport) ⇒ SshTunnelsNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SshTunnelsNamespace.
3968 3969 3970 |
# File 'lib/infrawrench/client.rb', line 3968 def initialize(transport) @transport = transport end |
Instance Method Details
#active(org_id: nil, request_options: nil) ⇒ Hash
List active tunnels for this org
Requires permission: resources:execute.
GET /api/org/orgId/ssh-tunnels/active
3983 3984 3985 3986 3987 3988 3989 3990 |
# File 'lib/infrawrench/client.rb', line 3983 def active(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/ssh-tunnels/active", path_params: { "orgId" => org_id }, request_options: ) end |
#close(body:, org_id: nil, request_options: nil) ⇒ Hash
Close a tunnel by id
Requires permission: resources:execute.
POST /api/org/orgId/ssh-tunnels/close
4004 4005 4006 4007 4008 4009 4010 4011 4012 |
# File 'lib/infrawrench/client.rb', line 4004 def close(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/ssh-tunnels/close", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#create_account(body:, org_id: nil, request_options: nil) ⇒ Hash
Create an account whose traffic is tunneled over SSH
Verifies the SSH connection works before persisting.
Requires permission: accounts:write.
POST /api/org/orgId/ssh-tunnels/create-account
Raises on 400: Bad request
Raises on 404: Not found
4033 4034 4035 4036 4037 4038 4039 4040 4041 |
# File 'lib/infrawrench/client.rb', line 4033 def create_account(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/ssh-tunnels/create-account", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#exec(body:, org_id: nil, request_options: nil) ⇒ Hash
Run a command over SSH using an org SSH key
Requires permission: resources:execute.
POST /api/org/orgId/ssh-tunnels/exec
Raises on 400: Bad request
Raises on 404: Not found
4059 4060 4061 4062 4063 4064 4065 4066 4067 |
# File 'lib/infrawrench/client.rb', line 4059 def exec(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/ssh-tunnels/exec", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#open(body:, org_id: nil, request_options: nil) ⇒ Hash
Re-open the tunnel for an existing account
Requires permission: resources:execute.
POST /api/org/orgId/ssh-tunnels/open
Raises on 404: Not found
4083 4084 4085 4086 4087 4088 4089 4090 4091 |
# File 'lib/infrawrench/client.rb', line 4083 def open(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/ssh-tunnels/open", path_params: { "orgId" => org_id }, body: body, request_options: ) end |