Class: Infrawrench::AgentRegistrationsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::AgentRegistrationsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.agent_registrations
Instance Method Summary collapse
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke an agent registration.
-
#initialize(transport) ⇒ AgentRegistrationsNamespace
constructor
private
A new instance of AgentRegistrationsNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List the agent registrations acting in this organization.
Constructor Details
#initialize(transport) ⇒ AgentRegistrationsNamespace
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 AgentRegistrationsNamespace.
1029 1030 1031 |
# File 'lib/infrawrench/client.rb', line 1029 def initialize(transport) @transport = transport end |
Instance Method Details
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke an agent registration
The row is kept so audit entries naming this agent stay legible; its credential stops working on the next request. Closed to agent credentials.
DELETE /api/org/orgId/agent-registrations/id
Raises on 400: Bad request
Raises on 401: Unauthenticated
Raises on 402: Payment required — the organization's plan does not include this
Raises on 403: Forbidden
Raises on 404: Not found
Raises on 409: Conflict
Raises on 500: Server error
Raises on 503: A backing service this endpoint depends on is not available
Raises on reauth: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.
1066 1067 1068 1069 1070 1071 1072 1073 |
# File 'lib/infrawrench/client.rb', line 1066 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/agent-registrations/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List the agent registrations acting in this organization
GET /api/org/orgId/agent-registrations
Raises on 400: Bad request
Raises on 401: Unauthenticated
Raises on 402: Payment required — the organization's plan does not include this
Raises on 403: Forbidden
Raises on 404: Not found
Raises on 409: Conflict
Raises on 500: Server error
Raises on 503: A backing service this endpoint depends on is not available
Raises on reauth: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.
1105 1106 1107 1108 1109 1110 1111 1112 |
# File 'lib/infrawrench/client.rb', line 1105 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/agent-registrations", path_params: { "orgId" => org_id }, request_options: ) end |