Class Google::Cloud::Compute::V1::Projects::Rest::Client (v1.2.0)

REST client for the Projects service.

The Projects API.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Projects Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Projects clients
::Google::Cloud::Compute::V1::Projects::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the Projects Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#disable_xpn_host

def disable_xpn_host(request, options = nil) -> ::Gapic::GenericLRO::Operation
def disable_xpn_host(project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Disable this project as a shared VPC host project.

Overloads
def disable_xpn_host(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to disable_xpn_host via a request object, either of type DisableXpnHostProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::DisableXpnHostProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def disable_xpn_host(project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to disable_xpn_host via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • project (::String) — Project ID for this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#disable_xpn_resource

def disable_xpn_resource(request, options = nil) -> ::Gapic::GenericLRO::Operation
def disable_xpn_resource(project: nil, projects_disable_xpn_resource_request_resource: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Disable a service resource (also known as service project) associated with this host project.

Overloads
def disable_xpn_resource(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to disable_xpn_resource via a request object, either of type DisableXpnResourceProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::DisableXpnResourceProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def disable_xpn_resource(project: nil, projects_disable_xpn_resource_request_resource: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to disable_xpn_resource via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • project (::String) — Project ID for this request.
  • projects_disable_xpn_resource_request_resource (::Google::Cloud::Compute::V1::ProjectsDisableXpnResourceRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#enable_xpn_host

def enable_xpn_host(request, options = nil) -> ::Gapic::GenericLRO::Operation
def enable_xpn_host(project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Enable this project as a shared VPC host project.

Overloads
def enable_xpn_host(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to enable_xpn_host via a request object, either of type EnableXpnHostProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::EnableXpnHostProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def enable_xpn_host(project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to enable_xpn_host via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • project (::String) — Project ID for this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#enable_xpn_resource

def enable_xpn_resource(request, options = nil) -> ::Gapic::GenericLRO::Operation
def enable_xpn_resource(project: nil, projects_enable_xpn_resource_request_resource: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Overloads
def enable_xpn_resource(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to enable_xpn_resource via a request object, either of type EnableXpnResourceProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::EnableXpnResourceProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def enable_xpn_resource(project: nil, projects_enable_xpn_resource_request_resource: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to enable_xpn_resource via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • project (::String) — Project ID for this request.
  • projects_enable_xpn_resource_request_resource (::Google::Cloud::Compute::V1::ProjectsEnableXpnResourceRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get

def get(request, options = nil) -> ::Google::Cloud::Compute::V1::Project
def get(project: nil) -> ::Google::Cloud::Compute::V1::Project

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Overloads
def get(request, options = nil) -> ::Google::Cloud::Compute::V1::Project
Pass arguments to get via a request object, either of type GetProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::GetProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def get(project: nil) -> ::Google::Cloud::Compute::V1::Project
Pass arguments to get via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • project (::String) — Project ID for this request.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_xpn_host

def get_xpn_host(request, options = nil) -> ::Google::Cloud::Compute::V1::Project
def get_xpn_host(project: nil) -> ::Google::Cloud::Compute::V1::Project

Gets the shared VPC host project that this project links to. May be empty if no link exists.

Overloads
def get_xpn_host(request, options = nil) -> ::Google::Cloud::Compute::V1::Project
Pass arguments to get_xpn_host via a request object, either of type GetXpnHostProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::GetXpnHostProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def get_xpn_host(project: nil) -> ::Google::Cloud::Compute::V1::Project
Pass arguments to get_xpn_host via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • project (::String) — Project ID for this request.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_xpn_resources

def get_xpn_resources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>
def get_xpn_resources(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>

Gets service resources (a.k.a service project) associated with this host project.

Overloads
def get_xpn_resources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>
Pass arguments to get_xpn_resources via a request object, either of type GetXpnResourcesProjectsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::GetXpnResourcesProjectsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def get_xpn_resources(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>
Pass arguments to get_xpn_resources via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • filter (::String) — A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either =, !=, >, <, <=, >= or :. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. The : operator can be used with string fields to match substrings. For non-string fields it is equivalent to the = operator. The :* comparison can be used to test whether a key has been defined. For example, to find all objects with owner label use: labels.owner:* You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)
  • max_results (::Integer) — The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
  • order_by (::String) — Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported.
  • page_token (::String) — Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
  • project (::String) — Project ID for this request.
  • return_partial_success (::Boolean) — Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#global_operations

def global_operations() -> ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client

Get the associated client for long-running operations via GlobalOperations.

#initialize

def initialize() { |config| ... } -> Client

Create a new Projects REST client object.

Yields
  • (config) — Configure the Projects client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_xpn_hosts

def list_xpn_hosts(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>
def list_xpn_hosts(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, projects_list_xpn_hosts_request_resource: nil, return_partial_success: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>

Lists all shared VPC host projects visible to the user in an organization.

Overloads
def list_xpn_hosts(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>
Pass arguments to list_xpn_hosts via a request object, either of type ListXpnHostsProjectsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::ListXpnHostsProjectsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def list_xpn_hosts(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, projects_list_xpn_hosts_request_resource: nil, return_partial_success: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>
Pass arguments to list_xpn_hosts via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • filter (::String) — A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either =, !=, >, <, <=, >= or :. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. The : operator can be used with string fields to match substrings. For non-string fields it is equivalent to the = operator. The :* comparison can be used to test whether a key has been defined. For example, to find all objects with owner label use: labels.owner:* You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)
  • max_results (::Integer) — The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
  • order_by (::String) — Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported.
  • page_token (::String) — Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
  • project (::String) — Project ID for this request.
  • projects_list_xpn_hosts_request_resource (::Google::Cloud::Compute::V1::ProjectsListXpnHostsRequest, ::Hash) — The body resource for this request
  • return_partial_success (::Boolean) — Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#move_disk

def move_disk(request, options = nil) -> ::Gapic::GenericLRO::Operation
def move_disk(disk_move_request_resource: nil, project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Moves a persistent disk from one zone to another.

Overloads
def move_disk(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to move_disk via a request object, either of type MoveDiskProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::MoveDiskProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def move_disk(disk_move_request_resource: nil, project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to move_disk via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • disk_move_request_resource (::Google::Cloud::Compute::V1::DiskMoveRequest, ::Hash) — The body resource for this request
  • project (::String) — Project ID for this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#move_instance

def move_instance(request, options = nil) -> ::Gapic::GenericLRO::Operation
def move_instance(instance_move_request_resource: nil, project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue.

Overloads
def move_instance(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to move_instance via a request object, either of type MoveInstanceProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::MoveInstanceProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def move_instance(instance_move_request_resource: nil, project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to move_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_move_request_resource (::Google::Cloud::Compute::V1::InstanceMoveRequest, ::Hash) — The body resource for this request
  • project (::String) — Project ID for this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#set_common_instance_metadata

def set_common_instance_metadata(request, options = nil) -> ::Gapic::GenericLRO::Operation
def set_common_instance_metadata(metadata_resource: nil, project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Sets metadata common to all instances within the specified project using the data included in the request.

Overloads
def set_common_instance_metadata(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to set_common_instance_metadata via a request object, either of type SetCommonInstanceMetadataProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::SetCommonInstanceMetadataProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def set_common_instance_metadata(metadata_resource: nil, project: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to set_common_instance_metadata via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • metadata_resource (::Google::Cloud::Compute::V1::Metadata, ::Hash) — The body resource for this request
  • project (::String) — Project ID for this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#set_default_network_tier

def set_default_network_tier(request, options = nil) -> ::Gapic::GenericLRO::Operation
def set_default_network_tier(project: nil, projects_set_default_network_tier_request_resource: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Overloads
def set_default_network_tier(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to set_default_network_tier via a request object, either of type SetDefaultNetworkTierProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::SetDefaultNetworkTierProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def set_default_network_tier(project: nil, projects_set_default_network_tier_request_resource: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to set_default_network_tier via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • project (::String) — Project ID for this request.
  • projects_set_default_network_tier_request_resource (::Google::Cloud::Compute::V1::ProjectsSetDefaultNetworkTierRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#set_usage_export_bucket

def set_usage_export_bucket(request, options = nil) -> ::Gapic::GenericLRO::Operation
def set_usage_export_bucket(project: nil, request_id: nil, usage_export_location_resource: nil) -> ::Gapic::GenericLRO::Operation

Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

Overloads
def set_usage_export_bucket(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to set_usage_export_bucket via a request object, either of type SetUsageExportBucketProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::SetUsageExportBucketProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def set_usage_export_bucket(project: nil, request_id: nil, usage_export_location_resource: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to set_usage_export_bucket via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • project (::String) — Project ID for this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
  • usage_export_location_resource (::Google::Cloud::Compute::V1::UsageExportLocation, ::Hash) — The body resource for this request
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.