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.
3793 3794 3795 |
# File 'lib/infrawrench/client.rb', line 3793 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
3808 3809 3810 3811 3812 3813 3814 3815 |
# File 'lib/infrawrench/client.rb', line 3808 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
3829 3830 3831 3832 3833 3834 3835 3836 3837 |
# File 'lib/infrawrench/client.rb', line 3829 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
3858 3859 3860 3861 3862 3863 3864 3865 3866 |
# File 'lib/infrawrench/client.rb', line 3858 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
3884 3885 3886 3887 3888 3889 3890 3891 3892 |
# File 'lib/infrawrench/client.rb', line 3884 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
3908 3909 3910 3911 3912 3913 3914 3915 3916 |
# File 'lib/infrawrench/client.rb', line 3908 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 |