Class: Infrawrench::CostAlertsGetNamespace

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

Overview

client.cost_alerts.get

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ CostAlertsGetNamespace

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

Parameters:



3348
3349
3350
# File 'lib/infrawrench/client.rb', line 3348

def initialize(transport)
  @transport = transport
end

Instance Method Details

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

List change-based cost alerts

Requires permission: costs:read.

GET /api/org/orgId/cost-alerts

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

Raises:



3363
3364
3365
3366
3367
3368
3369
3370
# File 'lib/infrawrench/client.rb', line 3363

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

#get_org_org_id_cost_alerts_id(id:, org_id: nil, request_options: nil) ⇒ Hash

Get a cost alert

Requires permission: costs:read.

GET /api/org/orgId/cost-alerts/id

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.

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

Raises:



3386
3387
3388
3389
3390
3391
3392
3393
# File 'lib/infrawrench/client.rb', line 3386

def get_org_org_id_cost_alerts_id(id:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/cost-alerts/{id}",
    path_params: { "orgId" => org_id, "id" => id },
    request_options: request_options
  )
end