Sha256: ab3a36010c91ac7b6dd6e0378c0bfc132228226ad84e9f76280eb7d836714724

Contents?: true

Size: 1.22 KB

Versions: 13

Compression:

Stored size: 1.22 KB

Contents

require "fog/core/collection"
require "fog/google/models/monitoring/metric_descriptor"

module Fog
  module Google
    class Monitoring
      class MetricDescriptors < Fog::Collection
        model Fog::Google::Monitoring::MetricDescriptor

        ##
        # Lists all Metric Descriptors.
        #
        # @param [Hash] options Optional query parameters.
        # @option options [String] count Maximum number of time series descriptors per page. Used for pagination.
        # @option options [String] page_token The pagination token, which is used to page through large result sets.
        # @option options [String] query The query used to search against existing metrics. Separate keywords with a space;
        #   the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned.
        #   If this field is omitted, all metrics are returned. If an empty string is passed with this field,
        #   no metrics are returned.
        # @return [Array<Fog::Google::Monitoring::MetricDescriptor>] List of Metric Descriptors.
        def all(options = {})
          data = service.list_metric_descriptors(options).body["metrics"] || []
          load(data)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fog-google-0.5.5 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.5.4 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.5.3 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.5.2 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.5.1 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.5.0 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.4.2 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.4.1 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.4.0 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.3.2 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.3.1 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.3.0 lib/fog/google/models/monitoring/metric_descriptors.rb
fog-google-0.2.0 lib/fog/google/models/monitoring/metric_descriptors.rb