Class: Infrawrench::QueryMonitorsGetNamespace

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

Overview

client.query_monitors.get

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ QueryMonitorsGetNamespace

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

Parameters:



11920
11921
11922
# File 'lib/infrawrench/client.rb', line 11920

def initialize(transport)
  @transport = transport
end

Instance Method Details

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

List query monitors

GET /api/org/orgId/query-monitors

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

Raises:



11933
11934
11935
11936
11937
11938
11939
11940
# File 'lib/infrawrench/client.rb', line 11933

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

#get_org_org_id_query_monitors_monitor_id(monitor_id:, org_id: nil, request_options: nil) ⇒ Hash

Get one query monitor

GET /api/org/orgId/query-monitors/monitorId

Raises on 404: Not found

Parameters:

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

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

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

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

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

Returns:

  • (Hash)

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

Raises:



11954
11955
11956
11957
11958
11959
11960
11961
# File 'lib/infrawrench/client.rb', line 11954

def get_org_org_id_query_monitors_monitor_id(monitor_id:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/query-monitors/{monitorId}",
    path_params: { "orgId" => org_id, "monitorId" => monitor_id },
    request_options: request_options
  )
end