Method: Fog::Google::Monitoring::MetricDescriptors#all

Defined in:
lib/fog/google/models/monitoring/metric_descriptors.rb

#all(filter: nil, page_size: nil, page_token: nil) ⇒ Array<Fog::Google::Monitoring::MetricDescriptor>

Lists all Metric Descriptors.

Parameters:

  • filter (String) (defaults to: nil)

    Monitoring filter specifying which metric descriptors are to be returned. @see cloud.google.com/monitoring/api/v3/filters filter documentation

  • page_size (String) (defaults to: nil)

    Maximum number of metric descriptors per page. Used for pagination.

  • page_token (String) (defaults to: nil)

    The pagination token, which is used to page through large result sets.

Returns:



18
19
20
21
22
23
24
25
26
# File 'lib/fog/google/models/monitoring/metric_descriptors.rb', line 18

def all(filter: nil, page_size: nil, page_token: nil)
  data = service.list_metric_descriptors(
    :filter => filter,
    :page_size => page_size,
    :page_token => page_token
  ).to_h[:metric_descriptors] || []

  load(data)
end