Class: Infrawrench::QuotasNamespace

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

Overview

client.quotas

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ QuotasNamespace

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

Parameters:



10996
10997
10998
10999
# File 'lib/infrawrench/client.rb', line 10996

def initialize(transport)
  @transport = transport
  @settings = QuotasSettingsNamespace.new(@transport)
end

Instance Attribute Details

#settingsQuotasSettingsNamespace (readonly)

Returns client.quotas.settings.

Returns:



10992
10993
10994
# File 'lib/infrawrench/client.rb', line 10992

def settings
  @settings
end

Instance Method Details

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

List provider quota utilisation across the organization

How close each account is to the limits its provider enforces, with the trend fitted over the last 14 days of collected readings. Both halves of every row — the used figure and the limit — come from the provider; nothing is filled in from published defaults, so an account with an approved increase reads as having the headroom it has. This is a read over already-collected snapshots: no provider API calls are made here, and the readings are as fresh as the last collection pass (roughly six hours). A plugin that declares no quota capability contributes nothing rather than zero — see unsupportedPluginIds.

Requires permission: resources:read.

GET /api/org/orgId/quotas

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

Raises:



11022
11023
11024
11025
11026
11027
11028
11029
# File 'lib/infrawrench/client.rb', line 11022

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