Class: Infrawrench::BastionsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::BastionsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.bastions
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Register a new bastion (returns the enrollment token once).
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke a bastion — accounts referencing it have their bastion binding cleared.
-
#initialize(transport) ⇒ BastionsNamespace
constructor
private
A new instance of BastionsNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List bastion agents registered to this org.
Constructor Details
#initialize(transport) ⇒ BastionsNamespace
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 BastionsNamespace.
821 822 823 |
# File 'lib/infrawrench/client.rb', line 821 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Register a new bastion (returns the enrollment token once)
Requires permission: bastions:write.
POST /api/org/orgId/bastions
Raises on 400: Bad request
840 841 842 843 844 845 846 847 848 |
# File 'lib/infrawrench/client.rb', line 840 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/bastions", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke a bastion — accounts referencing it have their bastion binding cleared
Requires permission: bastions:write.
DELETE /api/org/orgId/bastions/id
Raises on 404: Not found
865 866 867 868 869 870 871 872 |
# File 'lib/infrawrench/client.rb', line 865 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/bastions/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List bastion agents registered to this org
Requires permission: bastions:read.
GET /api/org/orgId/bastions
886 887 888 889 890 891 892 893 |
# File 'lib/infrawrench/client.rb', line 886 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/bastions", path_params: { "orgId" => org_id }, request_options: ) end |