Class: Infrawrench::NetworkFlowsSettingsNamespace

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

Overview

client.network_flows.settings

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ NetworkFlowsSettingsNamespace

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

Parameters:



9795
9796
9797
# File 'lib/infrawrench/client.rb', line 9795

def initialize(transport)
  @transport = transport
end

Instance Method Details

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

Read the network flow collection switch

Requires permission: costs:read.

GET /api/org/orgId/network-flows/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)

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

Raises:



9811
9812
9813
9814
9815
9816
9817
9818
# File 'lib/infrawrench/client.rb', line 9811

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

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

Turn network flow collection on or off

Collection is off by default. Enabling it authorizes Infrawrench to run daily queries against the provider's log store — and on AWS those queries are billed to your own cloud account per GB of log data scanned, every day, until you turn them off. That is why the write is governed by org:settings:write rather than costs:write, and why it is audit-logged.

Requires permission: org:settings:write.

PUT /api/org/orgId/network-flows/settings

Raises on 400: Bad request

Raises on 403: Forbidden

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

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

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

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

Returns:

  • (Hash)

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

Raises:



9844
9845
9846
9847
9848
9849
9850
9851
9852
# File 'lib/infrawrench/client.rb', line 9844

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