Class: Infrawrench::SshFanoutSnippetsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::SshFanoutSnippetsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.ssh_fanout.snippets
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Save a command snippet.
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a saved command snippet.
-
#get(org_id: nil, request_options: nil) ⇒ Hash
List saved command snippets.
-
#initialize(transport) ⇒ SshFanoutSnippetsNamespace
constructor
private
A new instance of SshFanoutSnippetsNamespace.
-
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Update a saved command snippet.
Constructor Details
#initialize(transport) ⇒ SshFanoutSnippetsNamespace
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 SshFanoutSnippetsNamespace.
6309 6310 6311 |
# File 'lib/infrawrench/client.rb', line 6309 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Save a command snippet
Requires permission: resources:execute.
POST /api/org/orgId/ssh-fanout/snippets
Raises on 400: Bad request
Raises on 409: Conflict
6329 6330 6331 6332 6333 6334 6335 6336 6337 |
# File 'lib/infrawrench/client.rb', line 6329 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/ssh-fanout/snippets", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a saved command snippet
Requires permission: resources:execute.
DELETE /api/org/orgId/ssh-fanout/snippets/id
Raises on 404: Not found
6353 6354 6355 6356 6357 6358 6359 6360 |
# File 'lib/infrawrench/client.rb', line 6353 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/ssh-fanout/snippets/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#get(org_id: nil, request_options: nil) ⇒ Hash
List saved command snippets
Org-shared saved commands for reuse from the fan-out screen and CLI.
Requires permission: resources:read.
GET /api/org/orgId/ssh-fanout/snippets
6375 6376 6377 6378 6379 6380 6381 6382 |
# File 'lib/infrawrench/client.rb', line 6375 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/ssh-fanout/snippets", path_params: { "orgId" => org_id }, request_options: ) end |
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Update a saved command snippet
Requires permission: resources:execute.
PUT /api/org/orgId/ssh-fanout/snippets/id
Raises on 400: Bad request
Raises on 404: Not found
6401 6402 6403 6404 6405 6406 6407 6408 6409 |
# File 'lib/infrawrench/client.rb', line 6401 def update(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/ssh-fanout/snippets/{id}", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |