Class: Google::Apis::MonitoringV3::MonitoringService

Inherits:
Core::BaseService show all
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.

Examples:

require 'google/apis/monitoring_v3'

Monitoring = Google::Apis::MonitoringV3 # Alias the module
service = Monitoring::MonitoringService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Constructor Details

#initializeMonitoringService

Returns a new instance of MonitoringService.



47
48
49
# File 'generated/google/apis/monitoring_v3/service.rb', line 47

def initialize
  super('https://monitoring.googleapis.com/', '')
end

Instance Attribute Details

#keyString

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.

Returns:

  • (String)

    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_userString

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.

Returns:

  • (String)

    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.

Parameters:

  • name (String)

    The project in which to create the time series. The format is "projects/ PROJECT_ID_OR_NUMBER".

  • create_collectd_time_series_request_object (Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest) (defaults to: nil)
  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



75
76
77
78
79
80
81
82
83
84
85
# File 'generated/google/apis/monitoring_v3/service.rb', line 75

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', options)
  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.

Parameters:

  • name (String)

    The project in which to create the group. The format is "projects/ project_id_or_number".

  • group_object (Google::Apis::MonitoringV3::Group) (defaults to: nil)
  • validate_only (Boolean) (defaults to: nil)

    If true, validate this request but do not create the group.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



182
183
184
185
186
187
188
189
190
191
192
193
# File 'generated/google/apis/monitoring_v3/service.rb', line 182

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', options)
  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 (/monitoring/custom-metrics).

Parameters:

  • name (String)

    The project on which to execute the request. The format is "projects/ project_id_or_number".

  • metric_descriptor_object (Google::Apis::MonitoringV3::MetricDescriptor) (defaults to: nil)
  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



394
395
396
397
398
399
400
401
402
403
404
# File 'generated/google/apis/monitoring_v3/service.rb', line 394

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', options)
  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.

Parameters:

  • name (String)

    The project on which to execute the request. The format is "projects/ project_id_or_number".

  • create_time_series_request_object (Google::Apis::MonitoringV3::CreateTimeSeriesRequest) (defaults to: nil)
  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



510
511
512
513
514
515
516
517
518
519
520
# File 'generated/google/apis/monitoring_v3/service.rb', line 510

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', options)
  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.

Parameters:

  • name (String)

    The group to delete. The format is "projects/project_id_or_number/ groups/group_id".

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



273
274
275
276
277
278
279
280
281
# File 'generated/google/apis/monitoring_v3/service.rb', line 273

def delete_project_group(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v3/{+name}', options)
  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 (/monitoring/ custom-metrics) can be deleted.

Parameters:

  • name (String)

    The metric descriptor on which to execute the request. The format is " projects/project_id_or_number/metricDescriptors/metric_id". An example of metric_id is: "custom.googleapis.com/my_test_metric".

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



476
477
478
479
480
481
482
483
484
# File 'generated/google/apis/monitoring_v3/service.rb', line 476

def delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v3/{+name}', options)
  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.

Parameters:

  • name (String)

    The group to retrieve. The format is "projects/project_id_or_number/ groups/group_id".

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



148
149
150
151
152
153
154
155
156
# File 'generated/google/apis/monitoring_v3/service.rb', line 148

def get_project_group(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}', options)
  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.

Parameters:

  • name (String)

    The metric descriptor on which to execute the request. The format is " projects/project_id_or_number/metricDescriptors/metric_id". An example value of metric_id is "compute.googleapis.com/instance/disk/ read_bytes_count".

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



361
362
363
364
365
366
367
368
369
# File 'generated/google/apis/monitoring_v3/service.rb', line 361

def get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}', options)
  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.

Parameters:

  • name (String)

    The monitored resource descriptor to get. The format is "projects/ project_id_or_number/monitoredResourceDescriptors/resource_type". The resource_type is a predefined type, such as cloudsql_database.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



645
646
647
648
649
650
651
652
653
# File 'generated/google/apis/monitoring_v3/service.rb', line 645

def get_project_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}', options)
  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, filter: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListGroupMembersResponse

Lists the monitored resources that are members of a group.

Parameters:

  • name (String)

    The group whose members are listed. The format is "projects/ project_id_or_number/groups/group_id".

  • filter (String) (defaults to: nil)

    An optional list filter (/monitoring/api/learn_more#filtering) describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter: resource.type = "gce_instance"

  • interval_end_time (String) (defaults to: nil)

    Required. The end of the time interval.

  • interval_start_time (String) (defaults to: nil)

    Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.

  • page_size (Fixnum) (defaults to: nil)

    A positive number that is the maximum number of results to return.

  • page_token (String) (defaults to: nil)

    If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'generated/google/apis/monitoring_v3/service.rb', line 322

def list_project_group_members(name, filter: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/members', options)
  command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation
  command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
  command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.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, descendants_of_group: nil, page_size: nil, children_of_group: nil, ancestors_of_group: nil, page_token: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV3::ListGroupsResponse

Lists the existing groups.

Parameters:

  • name (String)

    The project whose groups are to be listed. The format is "projects/ project_id_or_number".

  • descendants_of_group (String) (defaults to: nil)

    A group name: "projects/project_id_or_number/groups/group_id". Returns the descendants of the specified group. This is a superset of the results returned by the childrenOfGroup filter, and includes children-of- children, and so forth.

  • page_size (Fixnum) (defaults to: nil)

    A positive number that is the maximum number of results to return.

  • children_of_group (String) (defaults to: nil)

    A group name: "projects/project_id_or_number/groups/group_id". Returns groups whose parentName field contains the group name. If no groups have this parent, the results are empty.

  • ancestors_of_group (String) (defaults to: nil)

    A group name: "projects/project_id_or_number/groups/group_id". Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty.

  • page_token (String) (defaults to: nil)

    If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'generated/google/apis/monitoring_v3/service.rb', line 237

def list_project_groups(name, descendants_of_group: nil, page_size: nil, children_of_group: nil, ancestors_of_group: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/groups', options)
  command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation
  command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse
  command.params['name'] = name unless name.nil?
  command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil?
  command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil?
  command.query['pageToken'] = page_token unless page_token.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, page_size: nil, filter: nil, page_token: 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.

Parameters:

  • name (String)

    The project on which to execute the request. The format is "projects/ project_id_or_number".

  • page_size (Fixnum) (defaults to: nil)

    A positive number that is the maximum number of results to return.

  • filter (String) (defaults to: nil)

    If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter (/monitoring/api/v3/filters) specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics (/monitoring/custom-metrics): metric.type = starts_with("custom.googleapis.com/")

  • page_token (String) (defaults to: nil)

    If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



440
441
442
443
444
445
446
447
448
449
450
451
# File 'generated/google/apis/monitoring_v3/service.rb', line 440

def list_project_metric_descriptors(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/metricDescriptors', options)
  command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation
  command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse
  command.params['name'] = name unless name.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageToken'] = page_token unless page_token.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, page_size: nil, filter: nil, page_token: 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.

Parameters:

  • name (String)

    The project on which to execute the request. The format is "projects/ project_id_or_number".

  • page_size (Fixnum) (defaults to: nil)

    A positive number that is the maximum number of results to return.

  • filter (String) (defaults to: nil)

    An optional filter (/monitoring/api/v3/filters) describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label: resource.type = starts_with("gce_") AND resource.label:id

  • page_token (String) (defaults to: nil)

    If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



689
690
691
692
693
694
695
696
697
698
699
700
# File 'generated/google/apis/monitoring_v3/service.rb', line 689

def list_project_monitored_resource_descriptors(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options)
  command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation
  command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse
  command.params['name'] = name unless name.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageToken'] = page_token unless page_token.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, filter: nil, aggregation_group_by_fields: nil, aggregation_cross_series_reducer: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, view: nil, aggregation_alignment_period: nil, aggregation_per_series_aligner: nil, order_by: nil, page_token: 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.

Parameters:

  • name (String)

    The project on which to execute the request. The format is "projects/ project_id_or_number".

  • filter (String) (defaults to: nil)

    A monitoring filter (/monitoring/api/v3/filters) that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.label.instance_name = "my-instance-name"

  • aggregation_group_by_fields (Array<String>, String) (defaults to: nil)

    The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified, the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.

  • aggregation_cross_series_reducer (String) (defaults to: nil)

    The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.

  • interval_end_time (String) (defaults to: nil)

    Required. The end of the time interval.

  • interval_start_time (String) (defaults to: nil)

    Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.

  • page_size (Fixnum) (defaults to: nil)

    A positive number that is the maximum number of results to return. When view field sets to FULL, it limits the number of Points server will return; if view field is HEADERS, it limits the number of TimeSeries server will return.

  • view (String) (defaults to: nil)

    Specifies which information is returned about the time series.

  • aggregation_alignment_period (String) (defaults to: nil)

    The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.

  • aggregation_per_series_aligner (String) (defaults to: nil)

    The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.

  • order_by (String) (defaults to: nil)

    Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.

  • page_token (String) (defaults to: nil)

    If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'generated/google/apis/monitoring_v3/service.rb', line 601

def list_project_time_series(name, filter: nil, aggregation_group_by_fields: nil, aggregation_cross_series_reducer: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, view: nil, aggregation_alignment_period: nil, aggregation_per_series_aligner: nil, order_by: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/timeSeries', options)
  command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation
  command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil?
  command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil?
  command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
  command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['view'] = view unless view.nil?
  command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil?
  command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.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.

Parameters:

  • name (String)

    Output only. The name of this group. The format is "projects/ project_id_or_number/groups/group_id". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique group_id that is generated automatically.

  • group_object (Google::Apis::MonitoringV3::Group) (defaults to: nil)
  • validate_only (Boolean) (defaults to: nil)

    If true, validate this request but do not update the existing group.

  • quota_user (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



114
115
116
117
118
119
120
121
122
123
124
125
# File 'generated/google/apis/monitoring_v3/service.rb', line 114

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}', options)
  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