Class: Google::Apis::MonitoringV3::MonitoringService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MonitoringV3::MonitoringService
- Defined in:
- generated/google/apis/monitoring_v3/service.rb
Overview
Stackdriver Monitoring API
Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#create_collectd_time_series(name, create_collectd_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Stackdriver Monitoring Agent only: Creates a new time series.
-
#create_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Group
Creates a new group.
-
#create_project_metric_descriptor(name, metric_descriptor_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::MetricDescriptor
Creates a new metric descriptor.
-
#create_time_series(name, create_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Creates or adds data to one or more time series.
-
#delete_project_group(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Deletes an existing group.
-
#delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Deletes a metric descriptor.
-
#get_project_group(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Group
Gets a single group.
-
#get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::MetricDescriptor
Gets a single metric descriptor.
-
#get_project_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::MonitoredResourceDescriptor
Gets a single monitored resource descriptor.
-
#initialize ⇒ MonitoringService
constructor
A new instance of MonitoringService.
-
#list_project_group_members(name, interval_end_time: nil, filter: nil, page_token: nil, interval_start_time: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListGroupMembersResponse
Lists the monitored resources that are members of a group.
-
#list_project_groups(name, children_of_group: nil, descendants_of_group: nil, page_token: nil, page_size: nil, ancestors_of_group: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListGroupsResponse
Lists the existing groups.
-
#list_project_metric_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListMetricDescriptorsResponse
Lists metric descriptors that match a filter.
-
#list_project_monitored_resource_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse
Lists monitored resource descriptors that match a filter.
-
#list_project_time_series(name, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, aggregation_per_series_aligner: nil, page_token: nil, interval_start_time: nil, view: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListTimeSeriesResponse
Lists time series that match a filter.
-
#update_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Group
Updates an existing group.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ MonitoringService
Returns a new instance of MonitoringService
47 48 49 50 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 47 def initialize super('https://monitoring.googleapis.com/', '') @batch_path = 'batch' 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.
40 41 42 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 40 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.
45 46 47 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#create_collectd_time_series(name, create_collectd_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Stackdriver Monitoring Agent only: Creates a new time series.
548 549 550 551 552 553 554 555 556 557 558 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 548 def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', ) command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation command.request_object = create_collectd_time_series_request_object command.response_representation = Google::Apis::MonitoringV3::Empty::Representation command.response_class = Google::Apis::MonitoringV3::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#create_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Group
Creates a new group.
458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 458 def create_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v3/{+name}/groups', ) command.request_representation = Google::Apis::MonitoringV3::Group::Representation command.request_object = group_object command.response_representation = Google::Apis::MonitoringV3::Group::Representation command.response_class = Google::Apis::MonitoringV3::Group command.params['name'] = name unless name.nil? command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#create_project_metric_descriptor(name, metric_descriptor_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::MetricDescriptor
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
154 155 156 157 158 159 160 161 162 163 164 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 154 def create_project_metric_descriptor(name, metric_descriptor_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', ) command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation command.request_object = metric_descriptor_object command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation command.response_class = Google::Apis::MonitoringV3::MetricDescriptor command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#create_time_series(name, create_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
686 687 688 689 690 691 692 693 694 695 696 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 686 def create_time_series(name, create_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v3/{+name}/timeSeries', ) command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation command.request_object = create_time_series_request_object command.response_representation = Google::Apis::MonitoringV3::Empty::Representation command.response_class = Google::Apis::MonitoringV3::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#delete_project_group(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Deletes an existing group.
298 299 300 301 302 303 304 305 306 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 298 def delete_project_group(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v3/{+name}', ) command.response_representation = Google::Apis::MonitoringV3::Empty::Representation command.response_class = Google::Apis::MonitoringV3::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Empty
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
188 189 190 191 192 193 194 195 196 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 188 def delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v3/{+name}', ) command.response_representation = Google::Apis::MonitoringV3::Empty::Representation command.response_class = Google::Apis::MonitoringV3::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#get_project_group(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Group
Gets a single group.
385 386 387 388 389 390 391 392 393 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 385 def get_project_group(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}', ) command.response_representation = Google::Apis::MonitoringV3::Group::Representation command.response_class = Google::Apis::MonitoringV3::Group command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::MetricDescriptor
Gets a single metric descriptor. This method does not require a Stackdriver account.
121 122 123 124 125 126 127 128 129 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 121 def get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}', ) command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation command.response_class = Google::Apis::MonitoringV3::MetricDescriptor command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#get_project_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::MonitoredResourceDescriptor
Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
267 268 269 270 271 272 273 274 275 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 267 def get_project_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}', ) command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_project_group_members(name, interval_end_time: nil, filter: nil, page_token: nil, interval_start_time: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListGroupMembersResponse
Lists the monitored resources that are members of a group.
509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 509 def list_project_group_members(name, interval_end_time: nil, filter: nil, page_token: nil, interval_start_time: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/members', ) command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse command.params['name'] = name unless name.nil? command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_project_groups(name, children_of_group: nil, descendants_of_group: nil, page_token: nil, page_size: nil, ancestors_of_group: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListGroupsResponse
Lists the existing groups.
349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 349 def list_project_groups(name, children_of_group: nil, descendants_of_group: nil, page_token: nil, page_size: nil, ancestors_of_group: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/groups', ) command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse command.params['name'] = name unless name.nil? command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil? command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_project_metric_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListMetricDescriptorsResponse
Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 85 def list_project_metric_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', ) command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_project_monitored_resource_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse
Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 231 def list_project_monitored_resource_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', ) command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_project_time_series(name, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, aggregation_per_series_aligner: nil, page_token: nil, interval_start_time: nil, view: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListTimeSeriesResponse
Lists time series that match a filter. This method does not require a Stackdriver account.
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 641 def list_project_time_series(name, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, aggregation_per_series_aligner: nil, page_token: nil, interval_start_time: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/timeSeries', ) command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse command.params['name'] = name unless name.nil? command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil? command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil? command.query['filter'] = filter unless filter.nil? command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? command.query['view'] = view unless view.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#update_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::Group
Updates an existing group. You can change any group attributes except name.
421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'generated/google/apis/monitoring_v3/service.rb', line 421 def update_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:put, 'v3/{+name}', ) command.request_representation = Google::Apis::MonitoringV3::Group::Representation command.request_object = group_object command.response_representation = Google::Apis::MonitoringV3::Group::Representation command.response_class = Google::Apis::MonitoringV3::Group command.params['name'] = name unless name.nil? command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |