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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#disable_xpn_host
def disable_xpn_host(request, options = nil) -> ::Gapic::Rest::BaseOperation
def disable_xpn_host(project: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Disable this project as a shared VPC host project.
def disable_xpn_host(request, options = nil) -> ::Gapic::Rest::BaseOperation
disable_xpn_host
via a request object, either of type
DisableXpnHostProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#disable_xpn_resource
def disable_xpn_resource(request, options = nil) -> ::Gapic::Rest::BaseOperation
def disable_xpn_resource(project: nil, projects_disable_xpn_resource_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Disable a service resource (also known as service project) associated with this host project.
def disable_xpn_resource(request, options = nil) -> ::Gapic::Rest::BaseOperation
disable_xpn_resource
via a request object, either of type
DisableXpnResourceProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#enable_xpn_host
def enable_xpn_host(request, options = nil) -> ::Gapic::Rest::BaseOperation
def enable_xpn_host(project: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Enable this project as a shared VPC host project.
def enable_xpn_host(request, options = nil) -> ::Gapic::Rest::BaseOperation
enable_xpn_host
via a request object, either of type
EnableXpnHostProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#enable_xpn_resource
def enable_xpn_resource(request, options = nil) -> ::Gapic::Rest::BaseOperation
def enable_xpn_resource(project: nil, projects_enable_xpn_resource_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
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.
def enable_xpn_resource(request, options = nil) -> ::Gapic::Rest::BaseOperation
enable_xpn_resource
via a request object, either of type
EnableXpnResourceProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::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.
def get(request, options = nil) -> ::Google::Cloud::Compute::V1::Project
get
via a request object, either of type
GetProjectRequest or an equivalent Hash.
- 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
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).
- project (::String) — Project ID for this request.
- (result, response) — Access the result along with the Faraday response object
- result (::Google::Cloud::Compute::V1::Project)
- response (::Faraday::Response)
- (::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.
def get_xpn_host(request, options = nil) -> ::Google::Cloud::Compute::V1::Project
get_xpn_host
via a request object, either of type
GetXpnHostProjectRequest or an equivalent Hash.
- 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
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).
- project (::String) — Project ID for this request.
- (result, response) — Access the result along with the Faraday response object
- result (::Google::Cloud::Compute::V1::Project)
- response (::Faraday::Response)
- (::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.
def get_xpn_resources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>
get_xpn_resources
via a request object, either of type
GetXpnResourcesProjectsRequest or an equivalent Hash.
- 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>
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).
-
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 namedexample-instance
by specifyingname != 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 withowner
label use:labels.owner:*
You can also filter nested fields. For example, you could specifyscheduling.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 anAND
expression. However, you can includeAND
andOR
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 anextPageToken
that can be used to get the next page of results in subsequent list requests. Acceptable values are0
to500
, 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 thecreationTimestamp
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 byname
orcreationTimestamp desc
is supported. -
page_token (::String) — Specifies a page token to use. Set
pageToken
to thenextPageToken
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.
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>)
- response (::Faraday::Response)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#initialize
def initialize() { |config| ... } -> Client
Create a new Projects REST client object.
- (config) — Configure the Projects client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_xpn_hosts(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>
list_xpn_hosts
via a request object, either of type
ListXpnHostsProjectsRequest or an equivalent Hash.
- 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>
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).
-
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 namedexample-instance
by specifyingname != 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 withowner
label use:labels.owner:*
You can also filter nested fields. For example, you could specifyscheduling.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 anAND
expression. However, you can includeAND
andOR
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 anextPageToken
that can be used to get the next page of results in subsequent list requests. Acceptable values are0
to500
, 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 thecreationTimestamp
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 byname
orcreationTimestamp desc
is supported. -
page_token (::String) — Specifies a page token to use. Set
pageToken
to thenextPageToken
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.
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>)
- response (::Faraday::Response)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#move_disk
def move_disk(request, options = nil) -> ::Gapic::Rest::BaseOperation
def move_disk(disk_move_request_resource: nil, project: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Moves a persistent disk from one zone to another.
def move_disk(request, options = nil) -> ::Gapic::Rest::BaseOperation
move_disk
via a request object, either of type
MoveDiskProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#move_instance
def move_instance(request, options = nil) -> ::Gapic::Rest::BaseOperation
def move_instance(instance_move_request_resource: nil, project: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
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.
def move_instance(request, options = nil) -> ::Gapic::Rest::BaseOperation
move_instance
via a request object, either of type
MoveInstanceProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#set_common_instance_metadata
def set_common_instance_metadata(request, options = nil) -> ::Gapic::Rest::BaseOperation
def set_common_instance_metadata(metadata_resource: nil, project: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Sets metadata common to all instances within the specified project using the data included in the request.
def set_common_instance_metadata(request, options = nil) -> ::Gapic::Rest::BaseOperation
set_common_instance_metadata
via a request object, either of type
SetCommonInstanceMetadataProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#set_default_network_tier
def set_default_network_tier(request, options = nil) -> ::Gapic::Rest::BaseOperation
def set_default_network_tier(project: nil, projects_set_default_network_tier_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
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.
def set_default_network_tier(request, options = nil) -> ::Gapic::Rest::BaseOperation
set_default_network_tier
via a request object, either of type
SetDefaultNetworkTierProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#set_usage_export_bucket
def set_usage_export_bucket(request, options = nil) -> ::Gapic::Rest::BaseOperation
def set_usage_export_bucket(project: nil, request_id: nil, usage_export_location_resource: nil) -> ::Gapic::Rest::BaseOperation
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.
def set_usage_export_bucket(request, options = nil) -> ::Gapic::Rest::BaseOperation
set_usage_export_bucket
via a request object, either of type
SetUsageExportBucketProjectRequest or an equivalent Hash.
- 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::Rest::BaseOperation
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).
- 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
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::Rest::BaseOperation)
- response (::Faraday::Response)
- (::Gapic::Rest::BaseOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.