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.
1952 1953 1954 |
# File 'lib/infrawrench/client.rb', line 1952 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
1971 1972 1973 1974 1975 1976 1977 1978 1979 |
# File 'lib/infrawrench/client.rb', line 1971 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
1996 1997 1998 1999 2000 2001 2002 2003 |
# File 'lib/infrawrench/client.rb', line 1996 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
2017 2018 2019 2020 2021 2022 2023 2024 |
# File 'lib/infrawrench/client.rb', line 2017 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 |