Class: Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService
- Defined in:
- generated/google/apis/cloudmonitoring_v2beta2/service.rb
Overview
Cloud Monitoring API
Accesses Google Cloud Monitoring data.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Google::Apis::Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#create_metric_descriptor(project, metric_descriptor_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
Create a new metric.
-
#delete_metric_descriptor(project, metric, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse
Delete an existing metric.
-
#initialize ⇒ CloudMonitoringService
constructor
A new instance of CloudMonitoringService.
-
#list_metric_descriptors(project, list_metric_descriptors_request_object = nil, count: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse
List metric descriptors that match the query.
-
#list_timeseries(project, metric, youngest, list_timeseries_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse
List the data points of the time series that match the metric and labels values and that have data points in the interval.
-
#list_timeseries_descriptors(project, metric, youngest, list_timeseries_descriptors_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse
List the descriptors of the time series that match the metric and labels values and that have data points in the interval.
-
#write_timeseries(project, write_timeseries_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse
Put data points to one or more time series for one or more metrics.
Methods inherited from Google::Apis::Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ CloudMonitoringService
Returns a new instance of CloudMonitoringService.
51 52 53 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'cloudmonitoring/v2beta2/projects/') end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
38 39 40 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#create_metric_descriptor(project, metric_descriptor_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
Create a new metric.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 81 def create_metric_descriptor(project, metric_descriptor_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/metricDescriptors', ) command.request_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation command.request_object = metric_descriptor_object command.response_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation command.response_class = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor command.params['project'] = project unless project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_metric_descriptor(project, metric, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse
Delete an existing metric.
120 121 122 123 124 125 126 127 128 129 130 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 120 def delete_metric_descriptor(project, metric, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{project}/metricDescriptors/{metric}', ) command.response_representation = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse::Representation command.response_class = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse command.params['project'] = project unless project.nil? command.params['metric'] = metric unless metric.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_metric_descriptors(project, list_metric_descriptors_request_object = nil, count: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse
List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 175 def list_metric_descriptors(project, list_metric_descriptors_request_object = nil, count: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/metricDescriptors', ) command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest::Representation command.request_object = list_metric_descriptors_request_object command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse::Representation command.response_class = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse command.params['project'] = project unless project.nil? command.query['count'] = count unless count.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['query'] = query unless query.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_timeseries(project, metric, youngest, list_timeseries_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse
List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 272 def list_timeseries(project, metric, youngest, list_timeseries_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/timeseries/{metric}', ) command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest::Representation command.request_object = list_timeseries_request_object command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse::Representation command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse command.params['project'] = project unless project.nil? command.params['metric'] = metric unless metric.nil? command.query['aggregator'] = aggregator unless aggregator.nil? command.query['count'] = count unless count.nil? command.query['labels'] = labels unless labels.nil? command.query['oldest'] = oldest unless oldest.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['timespan'] = timespan unless timespan.nil? command.query['window'] = window unless window.nil? command.query['youngest'] = youngest unless youngest.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_timeseries_descriptors(project, metric, youngest, list_timeseries_descriptors_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse
List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 420 def list_timeseries_descriptors(project, metric, youngest, list_timeseries_descriptors_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/timeseriesDescriptors/{metric}', ) command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest::Representation command.request_object = list_timeseries_descriptors_request_object command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse::Representation command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse command.params['project'] = project unless project.nil? command.params['metric'] = metric unless metric.nil? command.query['aggregator'] = aggregator unless aggregator.nil? command.query['count'] = count unless count.nil? command.query['labels'] = labels unless labels.nil? command.query['oldest'] = oldest unless oldest.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['timespan'] = timespan unless timespan.nil? command.query['window'] = window unless window.nil? command.query['youngest'] = youngest unless youngest.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#write_timeseries(project, write_timeseries_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse
Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time.
326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/service.rb', line 326 def write_timeseries(project, write_timeseries_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/timeseries:write', ) command.request_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest::Representation command.request_object = write_timeseries_request_object command.response_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse::Representation command.response_class = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse command.params['project'] = project unless project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |