Class: Google::Apis::ResourceviewsV1beta2::ResourceviewsService

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

Examples:

require 'google/apis/resourceviews_v1beta2'

Resourceviews = Google::Apis::ResourceviewsV1beta2 # Alias the module
service = Resourceviews::ResourceviewsService.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

Methods included from Core::Logging

#logger

Constructor Details

#initializeResourceviewsService

Returns a new instance of ResourceviewsService



50
51
52
53
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 50

def initialize
  super('https://www.googleapis.com/', 'resourceviews/v1beta2/projects/')
  @batch_path = 'batch/resourceviews/v1beta2'
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.



39
40
41
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 39

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



44
45
46
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



48
49
50
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 48

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.

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view (String)

    The name of the resource view.

  • add_resources_request_object (Google::Apis::ResourceviewsV1beta2::AddResourcesRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 168

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view (String)

    The name of the resource view.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



209
210
211
212
213
214
215
216
217
218
219
220
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 209

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

Parameters:

  • project (String)

    Name of the project scoping this request.

  • zone (String)

    Name of the zone scoping this request.

  • operation (String)

    Name of the operation resource to return.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



81
82
83
84
85
86
87
88
89
90
91
92
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 81

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view (String)

    The name of the resource view.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



248
249
250
251
252
253
254
255
256
257
258
259
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 248

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view (String)

    The name of the resource view.

  • resource_name (String)

    The name of the resource if user wants to get the service information of the resource.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 290

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view_object (Google::Apis::ResourceviewsV1beta2::ResourceView) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 329

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

Parameters:

  • project (String)

    Name of the project scoping this request.

  • zone (String)

    Name of the zone scoping this request.

  • filter (String)

    Optional. Filter expression for filtering listed resources.

  • max_results (Fixnum)

    Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.

  • page_token (String)

    Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 126

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view (String)

    The name of the resource view.

  • format (String)

    The requested format of the return value. It can be URL or URL_PORT. A JSON object will be included in the response based on the format. The default format is NONE, which results in no JSON in the response.

  • list_state (String)

    The state of the instance to list. By default, it lists all instances.

  • max_results (Fixnum)

    Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)

  • page_token (String)

    Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.

  • service_name (String)

    The service name to return in the response. It is optional and if it is not set, all the service end points will be returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 428

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • max_results (Fixnum)

    Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)

  • page_token (String)

    Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



373
374
375
376
377
378
379
380
381
382
383
384
385
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 373

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view (String)

    The name of the resource view.

  • remove_resources_request_object (Google::Apis::ResourceviewsV1beta2::RemoveResourcesRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



473
474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 473

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

Parameters:

  • project (String)

    The project name of the resource view.

  • zone (String)

    The zone name of the resource view.

  • resource_view (String)

    The name of the resource view.

  • set_service_request_object (Google::Apis::ResourceviewsV1beta2::SetServiceRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'generated/google/apis/resourceviews_v1beta2/service.rb', line 515

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