Class: Infrawrench::AgentsSettingsNamespace

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

Overview

client.agents.settings

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ AgentsSettingsNamespace

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

Parameters:



450
451
452
# File 'lib/infrawrench/client.rb', line 450

def initialize(transport)
  @transport = transport
end

Instance Method Details

#get(org_id: nil, request_options: nil) ⇒ Hash?

Get saved Agents defaults

Requires permission: accounts:read.

GET /api/org/orgId/agents/settings

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:

  • (Hash, nil)

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

Raises:



466
467
468
469
470
471
472
473
# File 'lib/infrawrench/client.rb', line 466

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

#update(body:, org_id: nil, request_options: nil) ⇒ Hash

Save Agents defaults

Requires permission: accounts:write.

PUT /api/org/orgId/agents/settings

Parameters:

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

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

  • body (Hash)

    Request body, shaped as AgentSettings & Hash.

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

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

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

Returns:

  • (Hash)

    Parsed JSON, shaped as AgentSettings & Hash — see sig/infrawrench/sdk.rbs.

Raises:



488
489
490
491
492
493
494
495
496
# File 'lib/infrawrench/client.rb', line 488

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