Class: Google::Apis::ResourceviewsV1beta2::ResourceviewsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::ResourceviewsV1beta2::ResourceviewsService
- Defined in:
- generated/google/apis/resourceviews_v1beta2/service.rb
Overview
Google Compute Engine Instance Groups 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
-
#add_zone_view_resources(project, zone, resource_view, add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Add resources to the view.
-
#delete_zone_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Delete a resource view.
-
#get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Retrieves the specified zone-specific operation resource.
-
#get_zone_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::ResourceView
Get the information of a zonal resource view.
-
#get_zone_view_service(project, zone, resource_view, resource_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::GetServiceResponse
Get the service information of a resource view or a resource.
-
#initialize ⇒ ResourceviewsService
constructor
A new instance of ResourceviewsService.
-
#insert_zone_view(project, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Create a resource view.
-
#list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::OperationList
Retrieves the list of operation resources contained within the specified zone.
-
#list_zone_view_resources(project, zone, resource_view, format: nil, list_state: nil, max_results: nil, page_token: nil, service_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::ListResourcesResponse
List the resources of the resource view.
-
#list_zone_views(project, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::ZoneViewsList
List resource views.
-
#remove_zone_view_resources(project, zone, resource_view, remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Remove resources from the view.
-
#set_zone_view_service(project, zone, resource_view, set_service_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Update the service information of a resource view or a resource.
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_v1beta2/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'resourceviews/v1beta2/projects/') @batch_path = 'batch/resourceviews/v1beta2' 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_v1beta2/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_v1beta2/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_v1beta2/service.rb', line 50 def user_ip @user_ip end |
Instance Method Details
#add_zone_view_resources(project, zone, resource_view, add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Add resources to the view.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 176 def add_zone_view_resources(project, zone, resource_view, add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/resourceViews/{resourceView}/addResources', ) command.request_representation = Google::Apis::ResourceviewsV1beta2::AddResourcesRequest::Representation command.request_object = add_resources_request_object command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceView'] = resource_view unless resource_view.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, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Delete a resource view.
219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 219 def delete_zone_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{project}/zones/{zone}/resourceViews/{resourceView}', ) command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceView'] = resource_view unless resource_view.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_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Retrieves the specified zone-specific operation resource.
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 85 def get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/operations/{operation}', ) command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['operation'] = operation unless operation.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, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::ResourceView
Get the information of a zonal resource view.
260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 260 def get_zone_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/resourceViews/{resourceView}', ) command.response_representation = Google::Apis::ResourceviewsV1beta2::ResourceView::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::ResourceView command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceView'] = resource_view unless resource_view.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_service(project, zone, resource_view, resource_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::GetServiceResponse
Get the service information of a resource view or a resource.
304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 304 def get_zone_view_service(project, zone, resource_view, resource_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/resourceViews/{resourceView}/getService', ) command.response_representation = Google::Apis::ResourceviewsV1beta2::GetServiceResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::GetServiceResponse command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceView'] = resource_view unless resource_view.nil? command.query['resourceName'] = resource_name unless resource_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_zone_view(project, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Create a resource view.
345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 345 def insert_zone_view(project, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/resourceViews', ) command.request_representation = Google::Apis::ResourceviewsV1beta2::ResourceView::Representation command.request_object = resource_view_object command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::Operation command.params['project'] = project unless project.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_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::OperationList
Retrieves the list of operation resources contained within the specified zone.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 132 def list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/operations', ) command.response_representation = Google::Apis::ResourceviewsV1beta2::OperationList::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::OperationList command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.query['filter'] = filter unless filter.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_view_resources(project, zone, resource_view, format: nil, list_state: nil, max_results: nil, page_token: nil, service_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::ListResourcesResponse
List the resources of the resource view.
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 448 def list_zone_view_resources(project, zone, resource_view, format: nil, list_state: nil, max_results: nil, page_token: nil, service_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/resourceViews/{resourceView}/resources', ) command.response_representation = Google::Apis::ResourceviewsV1beta2::ListResourcesResponse::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::ListResourcesResponse command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceView'] = resource_view unless resource_view.nil? command.query['format'] = format unless format.nil? command.query['listState'] = list_state unless list_state.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['serviceName'] = service_name unless service_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 |
#list_zone_views(project, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::ZoneViewsList
List resource views.
391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 391 def list_zone_views(project, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/resourceViews', ) command.response_representation = Google::Apis::ResourceviewsV1beta2::ZoneViewsList::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::ZoneViewsList command.params['project'] = project unless project.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 |
#remove_zone_view_resources(project, zone, resource_view, remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Remove resources from the view.
495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 495 def remove_zone_view_resources(project, zone, resource_view, remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/resourceViews/{resourceView}/removeResources', ) command.request_representation = Google::Apis::ResourceviewsV1beta2::RemoveResourcesRequest::Representation command.request_object = remove_resources_request_object command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceView'] = resource_view unless resource_view.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 |
#set_zone_view_service(project, zone, resource_view, set_service_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResourceviewsV1beta2::Operation
Update the service information of a resource view or a resource.
539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 539 def set_zone_view_service(project, zone, resource_view, set_service_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/resourceViews/{resourceView}/setService', ) command.request_representation = Google::Apis::ResourceviewsV1beta2::SetServiceRequest::Representation command.request_object = set_service_request_object command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation command.response_class = Google::Apis::ResourceviewsV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['resourceView'] = resource_view unless resource_view.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 |