Class: Infrawrench::AgentsNamespace

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

Overview

client.agents

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ AgentsNamespace

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

Parameters:



508
509
510
511
512
# File 'lib/infrawrench/client.rb', line 508

def initialize(transport)
  @transport = transport
  @sessions = AgentsSessionsNamespace.new(@transport)
  @settings = AgentsSettingsNamespace.new(@transport)
end

Instance Attribute Details

#sessionsAgentsSessionsNamespace (readonly)

Returns client.agents.sessions.

Returns:



502
503
504
# File 'lib/infrawrench/client.rb', line 502

def sessions
  @sessions
end

#settingsAgentsSettingsNamespace (readonly)

Returns client.agents.settings.

Returns:



504
505
506
# File 'lib/infrawrench/client.rb', line 504

def settings
  @settings
end

Instance Method Details

#accounts(org_id: nil, request_options: nil) ⇒ Array<Hash>

List accounts whose plugins can create agent VMs

Requires permission: accounts:read.

GET /api/org/orgId/agents/accounts

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<AgentVmAccount> — see sig/infrawrench/sdk.rbs.

Raises:



526
527
528
529
530
531
532
533
# File 'lib/infrawrench/client.rb', line 526

def accounts(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/agents/accounts",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end