Class: Infrawrench::AgentRegistrationsNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.agent_registrations

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • id (String)
  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as AgentRevoked — see sig/infrawrench/sdk.rbs.

Raises:



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: 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.

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Array<Hash>)

    Parsed JSON, shaped as Array<AgentRegistration> — see sig/infrawrench/sdk.rbs.

Raises:



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: request_options
  )
end