Class: Google::Apis::ResourceviewsV1beta1::ResourceviewsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::ResourceviewsV1beta1::ResourceviewsService
- Defined in:
- generated/google/apis/resourceviews_v1beta1/service.rb
Overview
Resource Views API
The Resource View API allows users to create and manage logical sets of Google Compute Engine instances.
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 Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#addresources_region_view(project_name, region, resource_view_name, region_views_add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Add resources to the view.
-
#addresources_zone_view(project_name, zone, resource_view_name, zone_views_add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Add resources to the view.
-
#delete_region_view(project_name, region, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Delete a resource view.
-
#delete_zone_view(project_name, zone, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Delete a resource view.
-
#get_region_view(project_name, region, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ResourceView
Get the information of a resource view.
-
#get_zone_view(project_name, zone, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ResourceView
Get the information of a zonal resource view.
-
#initialize ⇒ ResourceviewsService
constructor
A new instance of ResourceviewsService.
-
#insert_region_view(project_name, region, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::RegionViewsInsertResponse
Create a resource view.
-
#insert_zone_view(project_name, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ZoneViewsInsertResponse
Create a resource view.
-
#list_region_views(project_name, region, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::RegionViewsListResponse
List resource views.
-
#list_zone_views(project_name, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ZoneViewsListResponse
List resource views.
-
#listresources_region_view(project_name, region, resource_view_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::RegionViewsListResourcesResponse
List the resources in the view.
-
#listresources_zone_view(project_name, zone, resource_view_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ZoneViewsListResourcesResponse
List the resources of the resource view.
-
#removeresources_region_view(project_name, region, resource_view_name, region_views_remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Remove resources from the view.
-
#removeresources_zone_view(project_name, zone, resource_view_name, zone_views_remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Remove resources from the view.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ ResourceviewsService
Returns a new instance of ResourceviewsService
52 53 54 55 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'resourceviews/v1beta1/projects/') @batch_path = 'batch/resourceviews/v1beta1' 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.
39 40 41 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 39 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.
45 46 47 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 45 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.
50 51 52 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 50 def user_ip @user_ip end |
Instance Method Details
#addresources_region_view(project_name, region, resource_view_name, region_views_add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Add resources to the view.
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 86 def addresources_region_view(project_name, region, resource_view_name, region_views_add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/regions/{region}/resourceViews/{resourceViewName}/addResources', ) command.request_representation = Google::Apis::ResourceviewsV1beta1::RegionViewsAddResourcesRequest::Representation command.request_object = region_views_add_resources_request_object command.params['projectName'] = project_name unless project_name.nil? command.params['region'] = region unless region.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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 |
#addresources_zone_view(project_name, zone, resource_view_name, zone_views_add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Add resources to the view.
386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 386 def addresources_zone_view(project_name, zone, resource_view_name, zone_views_add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/resourceViews/{resourceViewName}/addResources', ) command.request_representation = Google::Apis::ResourceviewsV1beta1::ZoneViewsAddResourcesRequest::Representation command.request_object = zone_views_add_resources_request_object command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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_region_view(project_name, region, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Delete a resource view.
127 128 129 130 131 132 133 134 135 136 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 127 def delete_region_view(project_name, region, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{projectName}/regions/{region}/resourceViews/{resourceViewName}', ) command.params['projectName'] = project_name unless project_name.nil? command.params['region'] = region unless region.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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_zone_view(project_name, zone, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Delete a resource view.
427 428 429 430 431 432 433 434 435 436 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 427 def delete_zone_view(project_name, zone, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{projectName}/zones/{zone}/resourceViews/{resourceViewName}', ) command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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 |
#get_region_view(project_name, region, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ResourceView
Get the information of a resource view.
166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 166 def get_region_view(project_name, region, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/regions/{region}/resourceViews/{resourceViewName}', ) command.response_representation = Google::Apis::ResourceviewsV1beta1::ResourceView::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::ResourceView command.params['projectName'] = project_name unless project_name.nil? command.params['region'] = region unless region.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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 |
#get_zone_view(project_name, zone, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ResourceView
Get the information of a zonal resource view.
466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 466 def get_zone_view(project_name, zone, resource_view_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/zones/{zone}/resourceViews/{resourceViewName}', ) command.response_representation = Google::Apis::ResourceviewsV1beta1::ResourceView::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::ResourceView command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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 |
#insert_region_view(project_name, region, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::RegionViewsInsertResponse
Create a resource view.
206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 206 def insert_region_view(project_name, region, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/regions/{region}/resourceViews', ) command.request_representation = Google::Apis::ResourceviewsV1beta1::ResourceView::Representation command.request_object = resource_view_object command.response_representation = Google::Apis::ResourceviewsV1beta1::RegionViewsInsertResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::RegionViewsInsertResponse command.params['projectName'] = project_name unless project_name.nil? command.params['region'] = region unless region.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 |
#insert_zone_view(project_name, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ZoneViewsInsertResponse
Create a resource view.
506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 506 def insert_zone_view(project_name, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/resourceViews', ) command.request_representation = Google::Apis::ResourceviewsV1beta1::ResourceView::Representation command.request_object = resource_view_object command.response_representation = Google::Apis::ResourceviewsV1beta1::ZoneViewsInsertResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::ZoneViewsInsertResponse command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.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_region_views(project_name, region, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::RegionViewsListResponse
List resource views.
252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 252 def list_region_views(project_name, region, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/regions/{region}/resourceViews', ) command.response_representation = Google::Apis::ResourceviewsV1beta1::RegionViewsListResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::RegionViewsListResponse command.params['projectName'] = project_name unless project_name.nil? command.params['region'] = region unless region.nil? command.query['maxResults'] = max_results unless max_results.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_zone_views(project_name, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ZoneViewsListResponse
List resource views.
552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 552 def list_zone_views(project_name, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/zones/{zone}/resourceViews', ) command.response_representation = Google::Apis::ResourceviewsV1beta1::ZoneViewsListResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::ZoneViewsListResponse command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.query['maxResults'] = max_results unless max_results.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#listresources_region_view(project_name, region, resource_view_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::RegionViewsListResourcesResponse
List the resources in the view.
300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 300 def listresources_region_view(project_name, region, resource_view_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/regions/{region}/resourceViews/{resourceViewName}/resources', ) command.response_representation = Google::Apis::ResourceviewsV1beta1::RegionViewsListResourcesResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::RegionViewsListResourcesResponse command.params['projectName'] = project_name unless project_name.nil? command.params['region'] = region unless region.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.nil? command.query['maxResults'] = max_results unless max_results.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#listresources_zone_view(project_name, zone, resource_view_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta1::ZoneViewsListResourcesResponse
List the resources of the resource view.
600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 600 def listresources_zone_view(project_name, zone, resource_view_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/resourceViews/{resourceViewName}/resources', ) command.response_representation = Google::Apis::ResourceviewsV1beta1::ZoneViewsListResourcesResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta1::ZoneViewsListResourcesResponse command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.nil? command.query['maxResults'] = max_results unless max_results.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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#removeresources_region_view(project_name, region, resource_view_name, region_views_remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Remove resources from the view.
344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 344 def removeresources_region_view(project_name, region, resource_view_name, region_views_remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/regions/{region}/resourceViews/{resourceViewName}/removeResources', ) command.request_representation = Google::Apis::ResourceviewsV1beta1::RegionViewsRemoveResourcesRequest::Representation command.request_object = region_views_remove_resources_request_object command.params['projectName'] = project_name unless project_name.nil? command.params['region'] = region unless region.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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 |
#removeresources_zone_view(project_name, zone, resource_view_name, zone_views_remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Remove resources from the view.
644 645 646 647 648 649 650 651 652 653 654 655 |
# File 'generated/google/apis/resourceviews_v1beta1/service.rb', line 644 def removeresources_zone_view(project_name, zone, resource_view_name, zone_views_remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/resourceViews/{resourceViewName}/removeResources', ) command.request_representation = Google::Apis::ResourceviewsV1beta1::ZoneViewsRemoveResourcesRequest::Representation command.request_object = zone_views_remove_resources_request_object command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceViewName'] = resource_view_name unless resource_view_name.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 |