Class: Google::Apis::MonitoringV1::MonitoringService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MonitoringV1::MonitoringService
- Defined in:
- generated/google/apis/monitoring_v1/service.rb
Overview
Cloud Monitoring API
Manages your Cloud Monitoring data and configurations. Most projects must be associated with a Workspace, with a few exceptions as noted on the individual method pages. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the Cloud Monitoring documentation.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_project_dashboard(parent, dashboard_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Dashboard
Creates a new custom dashboard.This method requires the monitoring.dashboards.
-
#delete_project_dashboard(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Empty
Deletes an existing custom dashboard.This method requires the monitoring.
-
#get_project_dashboard(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Dashboard
Fetches a specific dashboard.This method requires the monitoring.dashboards.
-
#initialize ⇒ MonitoringService
constructor
A new instance of MonitoringService.
-
#list_project_dashboards(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::ListDashboardsResponse
Lists the existing dashboards.This method requires the monitoring.dashboards.
-
#patch_project_dashboard(name, dashboard_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Dashboard
Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard.
Constructor Details
#initialize ⇒ MonitoringService
Returns a new instance of MonitoringService.
49 50 51 52 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 49 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.
42 43 44 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 42 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.
47 48 49 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 47 def quota_user @quota_user end |
Instance Method Details
#create_project_dashboard(parent, dashboard_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Dashboard
Creates a new custom dashboard.This method requires the monitoring.dashboards. create permission on the specified project. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
79 80 81 82 83 84 85 86 87 88 89 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 79 def create_project_dashboard(parent, dashboard_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/dashboards', ) command.request_representation = Google::Apis::MonitoringV1::Dashboard::Representation command.request_object = dashboard_object command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation command.response_class = Google::Apis::MonitoringV1::Dashboard command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_dashboard(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Empty
Deletes an existing custom dashboard.This method requires the monitoring. dashboards.delete permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
114 115 116 117 118 119 120 121 122 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 114 def delete_project_dashboard(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::MonitoringV1::Empty::Representation command.response_class = Google::Apis::MonitoringV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_dashboard(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Dashboard
Fetches a specific dashboard.This method requires the monitoring.dashboards. get permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
148 149 150 151 152 153 154 155 156 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 148 def get_project_dashboard(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation command.response_class = Google::Apis::MonitoringV1::Dashboard command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_dashboards(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::ListDashboardsResponse
Lists the existing dashboards.This method requires the monitoring.dashboards. list permission on the specified project. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
188 189 190 191 192 193 194 195 196 197 198 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 188 def list_project_dashboards(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/dashboards', ) command.response_representation = Google::Apis::MonitoringV1::ListDashboardsResponse::Representation command.response_class = Google::Apis::MonitoringV1::ListDashboardsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_dashboard(name, dashboard_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MonitoringV1::Dashboard
Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google. com/iam).
224 225 226 227 228 229 230 231 232 233 234 |
# File 'generated/google/apis/monitoring_v1/service.rb', line 224 def patch_project_dashboard(name, dashboard_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::MonitoringV1::Dashboard::Representation command.request_object = dashboard_object command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation command.response_class = Google::Apis::MonitoringV1::Dashboard command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |