28611 lines
1.8 MiB
28611 lines
1.8 MiB
# Copyright 2015 Google Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
require 'google/apis/core/base_service'
|
|
require 'google/apis/core/json_representation'
|
|
require 'google/apis/core/hashable'
|
|
require 'google/apis/errors'
|
|
|
|
module Google
|
|
module Apis
|
|
module ComputeBeta
|
|
# Compute Engine API
|
|
#
|
|
# Creates and runs virtual machines on Google Cloud Platform.
|
|
#
|
|
# @example
|
|
# require 'google/apis/compute_beta'
|
|
#
|
|
# Compute = Google::Apis::ComputeBeta # Alias the module
|
|
# service = Compute::ComputeService.new
|
|
#
|
|
# @see https://developers.google.com/compute/docs/reference/latest/
|
|
class ComputeService < Google::Apis::Core::BaseService
|
|
# @return [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.
|
|
attr_accessor :key
|
|
|
|
# @return [String]
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
attr_accessor :quota_user
|
|
|
|
# @return [String]
|
|
# Deprecated. Please use quotaUser instead.
|
|
attr_accessor :user_ip
|
|
|
|
def initialize
|
|
super('https://compute.googleapis.com/', 'compute/beta/projects/')
|
|
@batch_path = 'batch/compute/beta'
|
|
end
|
|
|
|
# Retrieves an aggregated list of accelerator types.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AcceleratorTypeAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AcceleratorTypeAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_accelerator_type_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/acceleratorTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AcceleratorTypeAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AcceleratorTypeAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns the specified accelerator type.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] accelerator_type
|
|
# Name of the accelerator type to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AcceleratorType] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AcceleratorType]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_accelerator_type(project, zone, accelerator_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/acceleratorTypes/{acceleratorType}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AcceleratorType::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AcceleratorType
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['acceleratorType'] = accelerator_type unless accelerator_type.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
|
|
|
|
# Retrieves a list of accelerator types available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AcceleratorTypeList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AcceleratorTypeList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_accelerator_types(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/acceleratorTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AcceleratorTypeList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AcceleratorTypeList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Retrieves an aggregated list of addresses.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AddressAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AddressAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_addresses(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/addresses', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AddressAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AddressAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified address resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] address
|
|
# Name of the address resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_address(project, region, address, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/addresses/{address}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['address'] = address unless address.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified address resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] address
|
|
# Name of the address resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Address] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Address]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_address(project, region, address, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/addresses/{address}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Address::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Address
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['address'] = address unless address.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
|
|
|
|
# Creates an address resource in the specified project by using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::Address] address_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_address(project, region, address_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/addresses', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Address::Representation
|
|
command.request_object = address_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of addresses contained within the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AddressList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AddressList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_addresses(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/addresses', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AddressList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AddressList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the labels on an Address. To learn more about labels, read the Labeling
|
|
# Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_address_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/addresses/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation
|
|
command.request_object = region_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_address_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/addresses/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of autoscalers.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AutoscalerAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AutoscalerAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_autoscalers(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/autoscalers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AutoscalerAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AutoscalerAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified autoscaler.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_autoscaler(project, zone, autoscaler, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/autoscalers/{autoscaler}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['autoscaler'] = autoscaler unless autoscaler.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified autoscaler resource. Gets a list of available
|
|
# autoscalers by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Autoscaler] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Autoscaler]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/autoscalers/{autoscaler}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Autoscaler
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['autoscaler'] = autoscaler unless autoscaler.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
|
|
|
|
# Creates an autoscaler in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [Google::Apis::ComputeBeta::Autoscaler] autoscaler_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_autoscaler(project, zone, autoscaler_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/autoscalers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.request_object = autoscaler_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of autoscalers contained within the specified zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AutoscalerList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AutoscalerList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_autoscalers(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/autoscalers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AutoscalerList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AutoscalerList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates an autoscaler in the specified project using the data included in the
|
|
# request. This method supports PATCH semantics and uses the JSON merge patch
|
|
# format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [Google::Apis::ComputeBeta::Autoscaler] autoscaler_object
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to patch.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_autoscaler(project, zone, autoscaler_object = nil, autoscaler: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/autoscalers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.request_object = autoscaler_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['autoscaler'] = autoscaler unless autoscaler.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_autoscaler_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates an autoscaler in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [Google::Apis::ComputeBeta::Autoscaler] autoscaler_object
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to update.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_autoscaler(project, zone, autoscaler_object = nil, autoscaler: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/zones/{zone}/autoscalers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.request_object = autoscaler_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['autoscaler'] = autoscaler unless autoscaler.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Adds a key for validating requests with signed URLs for this backend bucket.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_bucket
|
|
# Name of the BackendBucket resource to which the Signed URL Key should be added.
|
|
# The name should conform to RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::SignedUrlKey] signed_url_key_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_backend_bucket_signed_url_key(project, backend_bucket, signed_url_key_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SignedUrlKey::Representation
|
|
command.request_object = signed_url_key_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendBucket'] = backend_bucket unless backend_bucket.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified BackendBucket resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_bucket
|
|
# Name of the BackendBucket resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_backend_bucket(project, backend_bucket, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/backendBuckets/{backendBucket}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendBucket'] = backend_bucket unless backend_bucket.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes a key for validating requests with signed URLs for this backend bucket.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_bucket
|
|
# Name of the BackendBucket resource to which the Signed URL Key should be added.
|
|
# The name should conform to RFC1035.
|
|
# @param [String] key_name
|
|
# The name of the Signed URL Key to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_backend_bucket_signed_url_key(project, backend_bucket, key_name, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendBucket'] = backend_bucket unless backend_bucket.nil?
|
|
command.query['keyName'] = key_name unless key_name.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified BackendBucket resource. Gets a list of available backend
|
|
# buckets by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_bucket
|
|
# Name of the BackendBucket resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendBucket] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendBucket]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_backend_bucket(project, backend_bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/backendBuckets/{backendBucket}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendBucket::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendBucket
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendBucket'] = backend_bucket unless backend_bucket.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
|
|
|
|
# Creates a BackendBucket resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::BackendBucket] backend_bucket_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_backend_bucket(project, backend_bucket_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendBuckets', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendBucket::Representation
|
|
command.request_object = backend_bucket_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of BackendBucket resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendBucketList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendBucketList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_backend_buckets(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/backendBuckets', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendBucketList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendBucketList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates the specified BackendBucket resource with the data included in the
|
|
# request. This method supports PATCH semantics and uses the JSON merge patch
|
|
# format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_bucket
|
|
# Name of the BackendBucket resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::BackendBucket] backend_bucket_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_backend_bucket(project, backend_bucket, backend_bucket_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/backendBuckets/{backendBucket}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendBucket::Representation
|
|
command.request_object = backend_bucket_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendBucket'] = backend_bucket unless backend_bucket.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Updates the specified BackendBucket resource with the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_bucket
|
|
# Name of the BackendBucket resource to update.
|
|
# @param [Google::Apis::ComputeBeta::BackendBucket] backend_bucket_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_backend_bucket(project, backend_bucket, backend_bucket_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/global/backendBuckets/{backendBucket}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendBucket::Representation
|
|
command.request_object = backend_bucket_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendBucket'] = backend_bucket unless backend_bucket.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Adds a key for validating requests with signed URLs for this backend service.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to which the Signed URL Key should be
|
|
# added. The name should conform to RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::SignedUrlKey] signed_url_key_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_backend_service_signed_url_key(project, backend_service, signed_url_key_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendServices/{backendService}/addSignedUrlKey', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SignedUrlKey::Representation
|
|
command.request_object = signed_url_key_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of all BackendService resources, regional and global,
|
|
# available to the specified project.
|
|
# @param [String] project
|
|
# Name of the project scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendServiceAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendServiceAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_backend_service_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/backendServices', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendServiceAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendServiceAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified BackendService resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_backend_service(project, backend_service, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/backendServices/{backendService}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes a key for validating requests with signed URLs for this backend
|
|
# service.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to which the Signed URL Key should be
|
|
# added. The name should conform to RFC1035.
|
|
# @param [String] key_name
|
|
# The name of the Signed URL Key to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_backend_service_signed_url_key(project, backend_service, key_name, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendServices/{backendService}/deleteSignedUrlKey', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['keyName'] = key_name unless key_name.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified BackendService resource. Gets a list of available
|
|
# backend services.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendService] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendService]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_backend_service(project, backend_service, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/backendServices/{backendService}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendService
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.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
|
|
|
|
# Gets the most recent health check results for this BackendService.
|
|
# @param [String] project
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to which the queried instance belongs.
|
|
# @param [Google::Apis::ComputeBeta::ResourceGroupReference] resource_group_reference_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendServiceGroupHealth] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendServiceGroupHealth]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_backend_service_health(project, backend_service, resource_group_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendServices/{backendService}/getHealth', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ResourceGroupReference::Representation
|
|
command.request_object = resource_group_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendServiceGroupHealth::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendServiceGroupHealth
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.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
|
|
|
|
# Creates a BackendService resource in the specified project using the data
|
|
# included in the request. There are several restrictions and guidelines to keep
|
|
# in mind when creating a backend service. Read Restrictions and Guidelines for
|
|
# more information.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::BackendService] backend_service_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_backend_service(project, backend_service_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendServices', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.request_object = backend_service_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of BackendService resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendServiceList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendServiceList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_backend_services(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/backendServices', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendServiceList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendServiceList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Patches the specified BackendService resource with the data included in the
|
|
# request. There are several restrictions and guidelines to keep in mind when
|
|
# updating a backend service. Read Restrictions and Guidelines for more
|
|
# information. This method supports PATCH semantics and uses the JSON merge
|
|
# patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::BackendService] backend_service_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_backend_service(project, backend_service, backend_service_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/backendServices/{backendService}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.request_object = backend_service_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the security policy for the specified backend service.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to which the security policy should be set.
|
|
# The name should conform to RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::SecurityPolicyReference] security_policy_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_backend_service_security_policy(project, backend_service, security_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendServices/{backendService}/setSecurityPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SecurityPolicyReference::Representation
|
|
command.request_object = security_policy_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_backend_service_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/backendServices/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the specified BackendService resource with the data included in the
|
|
# request. There are several restrictions and guidelines to keep in mind when
|
|
# updating a backend service. Read Restrictions and Guidelines for more
|
|
# information.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to update.
|
|
# @param [Google::Apis::ComputeBeta::BackendService] backend_service_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_backend_service(project, backend_service, backend_service_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/global/backendServices/{backendService}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.request_object = backend_service_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of disk types.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::DiskTypeAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::DiskTypeAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_disk_types(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/diskTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::DiskTypeAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::DiskTypeAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns the specified disk type. Gets a list of available disk types by making
|
|
# a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] disk_type
|
|
# Name of the disk type to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::DiskType] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::DiskType]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_disk_type(project, zone, disk_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/diskTypes/{diskType}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::DiskType::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::DiskType
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['diskType'] = disk_type unless disk_type.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
|
|
|
|
# Retrieves a list of disk types available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::DiskTypeList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::DiskTypeList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_disk_types(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/diskTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::DiskTypeList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::DiskTypeList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Adds existing resource policies to a disk. You can only add one policy which
|
|
# will be applied to this disk for scheduling snapshot creation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] disk
|
|
# The disk name for this request.
|
|
# @param [Google::Apis::ComputeBeta::DisksAddResourcePoliciesRequest] disks_add_resource_policies_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_disk_resource_policies(project, zone, disk, disks_add_resource_policies_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{disk}/addResourcePolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::DisksAddResourcePoliciesRequest::Representation
|
|
command.request_object = disks_add_resource_policies_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of persistent disks.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::DiskAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::DiskAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_disk(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/disks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::DiskAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::DiskAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Creates a snapshot of a specified persistent disk.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] disk
|
|
# Name of the persistent disk to snapshot.
|
|
# @param [Google::Apis::ComputeBeta::Snapshot] snapshot_object
|
|
# @param [Boolean] guest_flush
|
|
# [Input Only] Specifies to create an application consistent snapshot by
|
|
# informing the OS to prepare for the snapshot process. Currently only supported
|
|
# on Windows instances using the Volume Shadow Copy Service (VSS).
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def create_disk_snapshot(project, zone, disk, snapshot_object = nil, guest_flush: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{disk}/createSnapshot', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Snapshot::Representation
|
|
command.request_object = snapshot_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['guestFlush'] = guest_flush unless guest_flush.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified persistent disk. Deleting a disk removes its data
|
|
# permanently and is irreversible. However, deleting a disk does not delete any
|
|
# snapshots previously made from the disk. You must separately delete snapshots.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] disk
|
|
# Name of the persistent disk to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_disk(project, zone, disk, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/disks/{disk}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns a specified persistent disk. Gets a list of available persistent disks
|
|
# by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] disk
|
|
# Name of the persistent disk to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Disk] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Disk]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_disk(project, zone, disk, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/disks/{disk}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Disk::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Disk
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['disk'] = disk unless disk.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_disk_iam_policy(project, zone, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/disks/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates a persistent disk in the specified project using the data in the
|
|
# request. You can create a disk with a sourceImage, a sourceSnapshot, or create
|
|
# an empty 500 GB data disk by omitting all properties. You can also create a
|
|
# disk that is larger than the default size by specifying the sizeGb property.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [Google::Apis::ComputeBeta::Disk] disk_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] source_image
|
|
# Optional. Source image to restore onto a disk.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_disk(project, zone, disk_object = nil, request_id: nil, source_image: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Disk::Representation
|
|
command.request_object = disk_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.nil?
|
|
command.query['sourceImage'] = source_image unless source_image.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
|
|
|
|
# Retrieves a list of persistent disks contained within the specified zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::DiskList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::DiskList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_disks(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/disks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::DiskList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::DiskList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Removes resource policies from a disk.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] disk
|
|
# The disk name for this request.
|
|
# @param [Google::Apis::ComputeBeta::DisksRemoveResourcePoliciesRequest] disks_remove_resource_policies_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def remove_disk_resource_policies(project, zone, disk, disks_remove_resource_policies_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{disk}/removeResourcePolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::DisksRemoveResourcePoliciesRequest::Representation
|
|
command.request_object = disks_remove_resource_policies_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Resizes the specified persistent disk. You can only increase the size of the
|
|
# disk.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] disk
|
|
# The name of the persistent disk.
|
|
# @param [Google::Apis::ComputeBeta::DisksResizeRequest] disks_resize_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def resize_disk(project, zone, disk, disks_resize_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{disk}/resize', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::DisksResizeRequest::Representation
|
|
command.request_object = disks_resize_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::ZoneSetPolicyRequest] zone_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_disk_iam_policy(project, zone, resource, zone_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ZoneSetPolicyRequest::Representation
|
|
command.request_object = zone_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Sets the labels on a disk. To learn more about labels, read the Labeling
|
|
# Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::ZoneSetLabelsRequest] zone_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_disk_labels(project, zone, resource, zone_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ZoneSetLabelsRequest::Representation
|
|
command.request_object = zone_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_disk_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified externalVpnGateway.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] external_vpn_gateway
|
|
# Name of the externalVpnGateways to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_external_vpn_gateway(project, external_vpn_gateway, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/externalVpnGateways/{externalVpnGateway}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['externalVpnGateway'] = external_vpn_gateway unless external_vpn_gateway.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified externalVpnGateway. Get a list of available
|
|
# externalVpnGateways by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] external_vpn_gateway
|
|
# Name of the externalVpnGateway to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ExternalVpnGateway] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ExternalVpnGateway]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_external_vpn_gateway(project, external_vpn_gateway, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/externalVpnGateways/{externalVpnGateway}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ExternalVpnGateway::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ExternalVpnGateway
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['externalVpnGateway'] = external_vpn_gateway unless external_vpn_gateway.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
|
|
|
|
# Creates a ExternalVpnGateway in the specified project using the data included
|
|
# in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::ExternalVpnGateway] external_vpn_gateway_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_external_vpn_gateway(project, external_vpn_gateway_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/externalVpnGateways', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ExternalVpnGateway::Representation
|
|
command.request_object = external_vpn_gateway_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of ExternalVpnGateway available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ExternalVpnGatewayList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ExternalVpnGatewayList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_external_vpn_gateways(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/externalVpnGateways', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ExternalVpnGatewayList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ExternalVpnGatewayList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the labels on an ExternalVpnGateway. To learn more about labels, read the
|
|
# Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetLabelsRequest] global_set_labels_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_external_vpn_gateway_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/externalVpnGateways/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetLabelsRequest::Representation
|
|
command.request_object = global_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_external_vpn_gateway_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/externalVpnGateways/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified firewall.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] firewall
|
|
# Name of the firewall rule to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_firewall(project, firewall, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/firewalls/{firewall}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['firewall'] = firewall unless firewall.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified firewall.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] firewall
|
|
# Name of the firewall rule to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Firewall] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Firewall]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_firewall(project, firewall, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/firewalls/{firewall}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Firewall::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Firewall
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['firewall'] = firewall unless firewall.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
|
|
|
|
# Creates a firewall rule in the specified project using the data included in
|
|
# the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::Firewall] firewall_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_firewall(project, firewall_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/firewalls', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Firewall::Representation
|
|
command.request_object = firewall_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of firewall rules available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::FirewallList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::FirewallList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_firewalls(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/firewalls', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::FirewallList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::FirewallList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates the specified firewall rule with the data included in the request.
|
|
# This method supports PATCH semantics and uses the JSON merge patch format and
|
|
# processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] firewall
|
|
# Name of the firewall rule to patch.
|
|
# @param [Google::Apis::ComputeBeta::Firewall] firewall_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_firewall(project, firewall, firewall_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/firewalls/{firewall}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Firewall::Representation
|
|
command.request_object = firewall_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['firewall'] = firewall unless firewall.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_firewall_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/firewalls/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the specified firewall rule with the data included in the request. The
|
|
# PUT method can only update the following fields of firewall rule: allowed,
|
|
# description, sourceRanges, sourceTags, targetTags.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] firewall
|
|
# Name of the firewall rule to update.
|
|
# @param [Google::Apis::ComputeBeta::Firewall] firewall_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_firewall(project, firewall, firewall_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/global/firewalls/{firewall}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Firewall::Representation
|
|
command.request_object = firewall_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['firewall'] = firewall unless firewall.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of forwarding rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ForwardingRuleAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ForwardingRuleAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_forwarding_rules(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/forwardingRules', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ForwardingRuleAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ForwardingRuleAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified ForwardingRule resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_forwarding_rule(project, region, forwarding_rule, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/forwardingRules/{forwardingRule}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified ForwardingRule resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ForwardingRule] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ForwardingRule]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_forwarding_rule(project, region, forwarding_rule, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/forwardingRules/{forwardingRule}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ForwardingRule::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ForwardingRule
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.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
|
|
|
|
# Creates a ForwardingRule resource in the specified project and region using
|
|
# the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::ForwardingRule] forwarding_rule_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_forwarding_rule(project, region, forwarding_rule_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/forwardingRules', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ForwardingRule::Representation
|
|
command.request_object = forwarding_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of ForwardingRule resources available to the specified
|
|
# project and region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ForwardingRuleList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ForwardingRuleList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_forwarding_rules(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/forwardingRules', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ForwardingRuleList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ForwardingRuleList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates the specified forwarding rule with the data included in the request.
|
|
# This method supports PATCH semantics and uses the JSON merge patch format and
|
|
# processing rules. Currently, you can only patch the network_tier field.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::ForwardingRule] forwarding_rule_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_forwarding_rule(project, region, forwarding_rule, forwarding_rule_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/forwardingRules/{forwardingRule}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ForwardingRule::Representation
|
|
command.request_object = forwarding_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the labels on the specified resource. To learn more about labels, read
|
|
# the Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_forwarding_rule_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/forwardingRules/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation
|
|
command.request_object = region_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes target URL for forwarding rule. The new target should be of the same
|
|
# type as the old target.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource in which target is to be set.
|
|
# @param [Google::Apis::ComputeBeta::TargetReference] target_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_forwarding_rule_target(project, region, forwarding_rule, target_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetReference::Representation
|
|
command.request_object = target_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_forwarding_rule_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified address resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] address
|
|
# Name of the address resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_global_address(project, address, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/addresses/{address}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['address'] = address unless address.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified address resource. Gets a list of available addresses by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] address
|
|
# Name of the address resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Address] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Address]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_global_address(project, address, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/addresses/{address}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Address::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Address
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['address'] = address unless address.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
|
|
|
|
# Creates an address resource in the specified project by using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::Address] address_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_global_address(project, address_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/addresses', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Address::Representation
|
|
command.request_object = address_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of global addresses.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::AddressList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::AddressList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_global_addresses(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/addresses', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::AddressList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::AddressList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the labels on a GlobalAddress. To learn more about labels, read the
|
|
# Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetLabelsRequest] global_set_labels_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_global_address_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/addresses/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetLabelsRequest::Representation
|
|
command.request_object = global_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_global_address_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/addresses/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified GlobalForwardingRule resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_global_forwarding_rule(project, forwarding_rule, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/forwardingRules/{forwardingRule}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified GlobalForwardingRule resource. Gets a list of available
|
|
# forwarding rules by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ForwardingRule] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ForwardingRule]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_global_forwarding_rule(project, forwarding_rule, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/forwardingRules/{forwardingRule}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ForwardingRule::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ForwardingRule
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.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
|
|
|
|
# Creates a GlobalForwardingRule resource in the specified project using the
|
|
# data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::ForwardingRule] forwarding_rule_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_global_forwarding_rule(project, forwarding_rule_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/forwardingRules', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ForwardingRule::Representation
|
|
command.request_object = forwarding_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of GlobalForwardingRule resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ForwardingRuleList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ForwardingRuleList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_global_forwarding_rules(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/forwardingRules', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ForwardingRuleList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ForwardingRuleList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates the specified forwarding rule with the data included in the request.
|
|
# This method supports PATCH semantics and uses the JSON merge patch format and
|
|
# processing rules. Currently, you can only patch the network_tier field.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::ForwardingRule] forwarding_rule_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_global_forwarding_rule(project, forwarding_rule, forwarding_rule_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/forwardingRules/{forwardingRule}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ForwardingRule::Representation
|
|
command.request_object = forwarding_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the labels on the specified resource. To learn more about labels, read
|
|
# the Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetLabelsRequest] global_set_labels_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_global_forwarding_rule_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/forwardingRules/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetLabelsRequest::Representation
|
|
command.request_object = global_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Changes target URL for the GlobalForwardingRule resource. The new target
|
|
# should be of the same type as the old target.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] forwarding_rule
|
|
# Name of the ForwardingRule resource in which target is to be set.
|
|
# @param [Google::Apis::ComputeBeta::TargetReference] target_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_global_forwarding_rule_target(project, forwarding_rule, target_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/forwardingRules/{forwardingRule}/setTarget', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetReference::Representation
|
|
command.request_object = target_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_global_forwarding_rule_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/forwardingRules/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of all operations.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::OperationAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::OperationAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_global_operation(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/operations', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::OperationAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::OperationAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified Operations resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] operation
|
|
# Name of the Operations resource to delete.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [void]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_global_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/operations/{operation}', options)
|
|
command.params['project'] = project unless project.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
|
|
|
|
# Retrieves the specified Operations resource. Gets a list of operations by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] operation
|
|
# Name of the Operations resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_global_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/operations/{operation}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.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
|
|
|
|
# Retrieves a list of Operation resources contained within the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::OperationList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::OperationList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_global_operations(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/operations', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::OperationList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::OperationList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Retrieves the list of all HealthCheck resources, regional and global,
|
|
# available to the specified project.
|
|
# @param [String] project
|
|
# Name of the project scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HealthChecksAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HealthChecksAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_health_check_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/healthChecks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HealthChecksAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HealthChecksAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified HealthCheck resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_health_check(project, health_check, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/healthChecks/{healthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified HealthCheck resource. Gets a list of available health
|
|
# checks by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HealthCheck] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HealthCheck]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_health_check(project, health_check, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/healthChecks/{healthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HealthCheck
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.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
|
|
|
|
# Creates a HealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::HealthCheck] health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_health_check(project, health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/healthChecks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.request_object = health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of HealthCheck resources available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HealthCheckList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HealthCheckList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_health_checks(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/healthChecks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HealthCheckList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HealthCheckList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates a HealthCheck resource in the specified project using the data
|
|
# included in the request. This method supports PATCH semantics and uses the
|
|
# JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::HealthCheck] health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_health_check(project, health_check, health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/healthChecks/{healthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.request_object = health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_health_check_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/healthChecks/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates a HealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to update.
|
|
# @param [Google::Apis::ComputeBeta::HealthCheck] health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_health_check(project, health_check, health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/global/healthChecks/{healthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.request_object = health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified HttpHealthCheck resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] http_health_check
|
|
# Name of the HttpHealthCheck resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_http_health_check(project, http_health_check, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/httpHealthChecks/{httpHealthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpHealthCheck'] = http_health_check unless http_health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified HttpHealthCheck resource. Gets a list of available HTTP
|
|
# health checks by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] http_health_check
|
|
# Name of the HttpHealthCheck resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HttpHealthCheck] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HttpHealthCheck]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_http_health_check(project, http_health_check, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/httpHealthChecks/{httpHealthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HttpHealthCheck::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HttpHealthCheck
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpHealthCheck'] = http_health_check unless http_health_check.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
|
|
|
|
# Creates a HttpHealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::HttpHealthCheck] http_health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_http_health_check(project, http_health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/httpHealthChecks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HttpHealthCheck::Representation
|
|
command.request_object = http_health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of HttpHealthCheck resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HttpHealthCheckList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HttpHealthCheckList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_http_health_checks(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/httpHealthChecks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HttpHealthCheckList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HttpHealthCheckList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates a HttpHealthCheck resource in the specified project using the data
|
|
# included in the request. This method supports PATCH semantics and uses the
|
|
# JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] http_health_check
|
|
# Name of the HttpHealthCheck resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::HttpHealthCheck] http_health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_http_health_check(project, http_health_check, http_health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/httpHealthChecks/{httpHealthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HttpHealthCheck::Representation
|
|
command.request_object = http_health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpHealthCheck'] = http_health_check unless http_health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_http_health_check_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/httpHealthChecks/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates a HttpHealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] http_health_check
|
|
# Name of the HttpHealthCheck resource to update.
|
|
# @param [Google::Apis::ComputeBeta::HttpHealthCheck] http_health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_http_health_check(project, http_health_check, http_health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/global/httpHealthChecks/{httpHealthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HttpHealthCheck::Representation
|
|
command.request_object = http_health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpHealthCheck'] = http_health_check unless http_health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified HttpsHealthCheck resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] https_health_check
|
|
# Name of the HttpsHealthCheck resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_https_health_check(project, https_health_check, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/httpsHealthChecks/{httpsHealthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpsHealthCheck'] = https_health_check unless https_health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified HttpsHealthCheck resource. Gets a list of available
|
|
# HTTPS health checks by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] https_health_check
|
|
# Name of the HttpsHealthCheck resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HttpsHealthCheck] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HttpsHealthCheck]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_https_health_check(project, https_health_check, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/httpsHealthChecks/{httpsHealthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HttpsHealthCheck::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HttpsHealthCheck
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpsHealthCheck'] = https_health_check unless https_health_check.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
|
|
|
|
# Creates a HttpsHealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::HttpsHealthCheck] https_health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_https_health_check(project, https_health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/httpsHealthChecks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HttpsHealthCheck::Representation
|
|
command.request_object = https_health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of HttpsHealthCheck resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HttpsHealthCheckList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HttpsHealthCheckList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_https_health_checks(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/httpsHealthChecks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HttpsHealthCheckList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HttpsHealthCheckList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates a HttpsHealthCheck resource in the specified project using the data
|
|
# included in the request. This method supports PATCH semantics and uses the
|
|
# JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] https_health_check
|
|
# Name of the HttpsHealthCheck resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::HttpsHealthCheck] https_health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_https_health_check(project, https_health_check, https_health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/httpsHealthChecks/{httpsHealthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HttpsHealthCheck::Representation
|
|
command.request_object = https_health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpsHealthCheck'] = https_health_check unless https_health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_https_health_check_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/httpsHealthChecks/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates a HttpsHealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] https_health_check
|
|
# Name of the HttpsHealthCheck resource to update.
|
|
# @param [Google::Apis::ComputeBeta::HttpsHealthCheck] https_health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_https_health_check(project, https_health_check, https_health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/global/httpsHealthChecks/{httpsHealthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HttpsHealthCheck::Representation
|
|
command.request_object = https_health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['httpsHealthCheck'] = https_health_check unless https_health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified image.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] image
|
|
# Name of the image resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_image(project, image, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/images/{image}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['image'] = image unless image.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the deprecation status of an image.
|
|
# If an empty request body is given, clears the deprecation status instead.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] image
|
|
# Image name.
|
|
# @param [Google::Apis::ComputeBeta::DeprecationStatus] deprecation_status_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def deprecate_image(project, image, deprecation_status_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/images/{image}/deprecate', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::DeprecationStatus::Representation
|
|
command.request_object = deprecation_status_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['image'] = image unless image.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified image. Gets a list of available images by making a list()
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] image
|
|
# Name of the image resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Image] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Image]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_image(project, image, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/images/{image}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Image::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Image
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['image'] = image unless image.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
|
|
|
|
# Returns the latest image that is part of an image family and is not deprecated.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] family
|
|
# Name of the image family to search for.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Image] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Image]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_image_from_family(project, family, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/images/family/{family}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Image::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Image
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['family'] = family unless family.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_image_iam_policy(project, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/images/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates an image in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::Image] image_object
|
|
# @param [Boolean] force_create
|
|
# Force image creation if true.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_image(project, image_object = nil, force_create: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/images', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Image::Representation
|
|
command.request_object = image_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['forceCreate'] = force_create unless force_create.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of custom images available to the specified project. Custom
|
|
# images are images you create that belong to your project. This method does not
|
|
# get any images that belong to other projects, including publicly-available
|
|
# images, like Debian 8. If you want to get a list of publicly-available images,
|
|
# use this method to make a request to the respective image project, such as
|
|
# debian-cloud or windows-cloud.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ImageList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ImageList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_images(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/images', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ImageList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ImageList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetPolicyRequest] global_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_image_iam_policy(project, resource, global_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/images/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetPolicyRequest::Representation
|
|
command.request_object = global_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Sets the labels on an image. To learn more about labels, read the Labeling
|
|
# Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetLabelsRequest] global_set_labels_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_image_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/images/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetLabelsRequest::Representation
|
|
command.request_object = global_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_image_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/images/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Flags the specified instances to be removed from the managed instance group.
|
|
# Abandoning an instance does not delete the instance, but it does remove the
|
|
# instance from any target pools that are applied by the managed instance group.
|
|
# This method reduces the targetSize of the managed instance group by the number
|
|
# of instances that you abandon. This operation is marked as DONE when the
|
|
# action is scheduled even if the instances have not yet been removed from the
|
|
# group. You must separately verify the status of the abandoning action with the
|
|
# listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# You can specify a maximum of 1000 instances with this method per request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersAbandonInstancesRequest] instance_group_managers_abandon_instances_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def abandon_instance_group_manager_instances(project, zone, instance_group_manager, instance_group_managers_abandon_instances_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersAbandonInstancesRequest::Representation
|
|
command.request_object = instance_group_managers_abandon_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of managed instance groups and groups them by zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupManagerAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupManagerAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_instance_group_managers(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/instanceGroupManagers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupManagerAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupManagerAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Apply changes to selected instances on the managed instance group. This method
|
|
# can be used to apply new overrides and/or new versions.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located. Should
|
|
# conform to RFC1035.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group, should conform to RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersApplyUpdatesRequest] instance_group_managers_apply_updates_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def apply_instance_group_manager_updates_to_instances(project, zone, instance_group_manager, instance_group_managers_apply_updates_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersApplyUpdatesRequest::Representation
|
|
command.request_object = instance_group_managers_apply_updates_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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
|
|
|
|
# Deletes the specified managed instance group and all of the instances in that
|
|
# group. Note that the instance group must not belong to a backend service. Read
|
|
# Deleting an instance group for more information.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_instance_group_manager(project, zone, instance_group_manager, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Flags the specified instances in the managed instance group for immediate
|
|
# deletion. The instances are also removed from any target pools of which they
|
|
# were a member. This method reduces the targetSize of the managed instance
|
|
# group by the number of instances that you delete. This operation is marked as
|
|
# DONE when the action is scheduled even if the instances are still being
|
|
# deleted. You must separately verify the status of the deleting action with the
|
|
# listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# You can specify a maximum of 1000 instances with this method per request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersDeleteInstancesRequest] instance_group_managers_delete_instances_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_instance_group_manager_instances(project, zone, instance_group_manager, instance_group_managers_delete_instances_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersDeleteInstancesRequest::Representation
|
|
command.request_object = instance_group_managers_delete_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns all of the details about the specified managed instance group. Gets a
|
|
# list of available managed instance groups by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupManager] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupManager]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupManager
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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
|
|
|
|
# Creates a managed instance group using the information that you specify in the
|
|
# request. After the group is created, instances in the group are created using
|
|
# the specified instance template. This operation is marked as DONE when the
|
|
# group is created even if the instances in the group have not yet been created.
|
|
# You must separately verify the status of the individual instances with the
|
|
# listmanagedinstances method.
|
|
# A managed instance group can have up to 1000 VM instances per group. Please
|
|
# contact Cloud Support if you need an increase in this limit.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where you want to create the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManager] instance_group_manager_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_instance_group_manager(project, zone, instance_group_manager_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.request_object = instance_group_manager_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of managed instance groups that are contained within the
|
|
# specified project and zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupManagerList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupManagerList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_instance_group_managers(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instanceGroupManagers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupManagerList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupManagerList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists all of the instances in the managed instance group. Each instance in the
|
|
# list has a currentAction, which indicates the action that the managed instance
|
|
# group is performing on the instance. For example, if the group is still
|
|
# creating an instance, the currentAction is CREATING. If a previous action
|
|
# failed, the list displays the errors for that failed action.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupManagersListManagedInstancesResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupManagersListManagedInstancesResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_instance_group_manager_managed_instances(project, zone, instance_group_manager, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupManagersListManagedInstancesResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupManagersListManagedInstancesResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['order_by'] = order_by unless order_by.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
|
|
|
|
# Updates a managed instance group using the information that you specify in the
|
|
# request. This operation is marked as DONE when the group is patched even if
|
|
# the instances in the group are still in the process of being patched. You must
|
|
# separately verify the status of the individual instances with the
|
|
# listManagedInstances method. This method supports PATCH semantics and uses the
|
|
# JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where you want to create the managed instance group.
|
|
# @param [String] instance_group_manager
|
|
# The name of the instance group manager.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManager] instance_group_manager_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_instance_group_manager(project, zone, instance_group_manager, instance_group_manager_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.request_object = instance_group_manager_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Flags the specified instances in the managed instance group to be immediately
|
|
# recreated. The instances are deleted and recreated using the current instance
|
|
# template for the managed instance group. This operation is marked as DONE when
|
|
# the flag is set even if the instances have not yet been recreated. You must
|
|
# separately verify the status of the recreating action with the
|
|
# listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# You can specify a maximum of 1000 instances with this method per request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersRecreateInstancesRequest] instance_group_managers_recreate_instances_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def recreate_instance_group_manager_instances(project, zone, instance_group_manager, instance_group_managers_recreate_instances_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersRecreateInstancesRequest::Representation
|
|
command.request_object = instance_group_managers_recreate_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Resizes the managed instance group. If you increase the size, the group
|
|
# creates new instances using the current instance template. If you decrease the
|
|
# size, the group deletes instances. The resize operation is marked DONE when
|
|
# the resize actions are scheduled even if the group has not yet added or
|
|
# deleted any instances. You must separately verify the status of the creating
|
|
# or deleting actions with the listmanagedinstances method.
|
|
# When resizing down, the instance group arbitrarily chooses the order in which
|
|
# VMs are deleted. The group takes into account some VM attributes when making
|
|
# the selection including:
|
|
# + The status of the VM instance. + The health of the VM instance. + The
|
|
# instance template version the VM is based on. + For regional managed instance
|
|
# groups, the location of the VM instance.
|
|
# This list is subject to change.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Fixnum] size
|
|
# The number of running instances that the managed instance group should
|
|
# maintain at any given time. The group automatically adds or removes instances
|
|
# to maintain the number of instances specified by this parameter.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def resize_instance_group_manager(project, zone, instance_group_manager, size, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.nil?
|
|
command.query['size'] = size unless size.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
|
|
|
|
# Resizes the managed instance group with advanced configuration options like
|
|
# disabling creation retries. This is an extended version of the resize method.
|
|
# If you increase the size of the instance group, the group creates new
|
|
# instances using the current instance template. If you decrease the size, the
|
|
# group deletes instances. The resize operation is marked DONE when the resize
|
|
# actions are scheduled even if the group has not yet added or deleted any
|
|
# instances. You must separately verify the status of the creating,
|
|
# creatingWithoutRetries, or deleting actions with the get or
|
|
# listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersResizeAdvancedRequest] instance_group_managers_resize_advanced_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def resize_instance_group_manager_advanced(project, zone, instance_group_manager, instance_group_managers_resize_advanced_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersResizeAdvancedRequest::Representation
|
|
command.request_object = instance_group_managers_resize_advanced_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Modifies the autohealing policies. [Deprecated] This method is deprecated.
|
|
# Please use Patch instead.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the instance group manager.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersSetAutoHealingRequest] instance_group_managers_set_auto_healing_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_group_manager_auto_healing_policies(project, zone, instance_group_manager, instance_group_managers_set_auto_healing_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersSetAutoHealingRequest::Representation
|
|
command.request_object = instance_group_managers_set_auto_healing_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Specifies the instance template to use when creating new instances in this
|
|
# group. The templates for existing instances in the group do not change unless
|
|
# you recreate them.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersSetInstanceTemplateRequest] instance_group_managers_set_instance_template_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_group_manager_instance_template(project, zone, instance_group_manager, instance_group_managers_set_instance_template_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersSetInstanceTemplateRequest::Representation
|
|
command.request_object = instance_group_managers_set_instance_template_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Modifies the target pools to which all instances in this managed instance
|
|
# group are assigned. The target pools automatically apply to all of the
|
|
# instances in the managed instance group. This operation is marked DONE when
|
|
# you make the request even if the instances have not yet been added to their
|
|
# target pools. The change might take some time to apply to all of the instances
|
|
# in the group depending on the size of the group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the managed instance group is located.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManagersSetTargetPoolsRequest] instance_group_managers_set_target_pools_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_group_manager_target_pools(project, zone, instance_group_manager, instance_group_managers_set_target_pools_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManagersSetTargetPoolsRequest::Representation
|
|
command.request_object = instance_group_managers_set_target_pools_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_instance_group_manager_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates a managed instance group using the information that you specify in the
|
|
# request. This operation is marked as DONE when the group is updated even if
|
|
# the instances in the group have not yet been updated. You must separately
|
|
# verify the status of the individual instances with the listManagedInstances
|
|
# method.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where you want to create the managed instance group.
|
|
# @param [String] instance_group_manager
|
|
# The name of the instance group manager.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManager] instance_group_manager_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_instance_group_manager(project, zone, instance_group_manager, instance_group_manager_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.request_object = instance_group_manager_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Adds a list of instances to the specified instance group. All of the instances
|
|
# in the instance group must be in the same network/subnetwork. Read Adding
|
|
# instances for more information.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the instance group is located.
|
|
# @param [String] instance_group
|
|
# The name of the instance group where you are adding instances.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupsAddInstancesRequest] instance_groups_add_instances_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_instance_group_instances(project, zone, instance_group, instance_groups_add_instances_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupsAddInstancesRequest::Representation
|
|
command.request_object = instance_groups_add_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of instance groups and sorts them by zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_instance_groups(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/instanceGroups', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified instance group. The instances in the group are not
|
|
# deleted. Note that instance group must not belong to a backend service. Read
|
|
# Deleting an instance group for more information.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the instance group is located.
|
|
# @param [String] instance_group
|
|
# The name of the instance group to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_instance_group(project, zone, instance_group, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/instanceGroups/{instanceGroup}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified instance group. Gets a list of available instance groups
|
|
# by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the instance group is located.
|
|
# @param [String] instance_group
|
|
# The name of the instance group.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroup] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroup]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_group(project, zone, instance_group, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instanceGroups/{instanceGroup}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroup::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroup
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.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
|
|
|
|
# Creates an instance group in the specified project using the parameters that
|
|
# are included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where you want to create the instance group.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroup] instance_group_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_instance_group(project, zone, instance_group_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroups', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroup::Representation
|
|
command.request_object = instance_group_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of instance groups that are located in the specified
|
|
# project and zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the instance group is located.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_instance_groups(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instanceGroups', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists the instances in the specified instance group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the instance group is located.
|
|
# @param [String] instance_group
|
|
# The name of the instance group from which you want to generate a list of
|
|
# included instances.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupsListInstancesRequest] instance_groups_list_instances_request_object
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupsListInstances] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupsListInstances]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_instance_group_instances(project, zone, instance_group, instance_groups_list_instances_request_object = nil, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupsListInstancesRequest::Representation
|
|
command.request_object = instance_groups_list_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupsListInstances::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupsListInstances
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Removes one or more instances from the specified instance group, but does not
|
|
# delete those instances.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration before
|
|
# the VM instance is removed or deleted.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the instance group is located.
|
|
# @param [String] instance_group
|
|
# The name of the instance group where the specified instances will be removed.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupsRemoveInstancesRequest] instance_groups_remove_instances_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def remove_instance_group_instances(project, zone, instance_group, instance_groups_remove_instances_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupsRemoveInstancesRequest::Representation
|
|
command.request_object = instance_groups_remove_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the named ports for the specified instance group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the instance group is located.
|
|
# @param [String] instance_group
|
|
# The name of the instance group where the named ports are updated.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupsSetNamedPortsRequest] instance_groups_set_named_ports_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_group_named_ports(project, zone, instance_group, instance_groups_set_named_ports_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupsSetNamedPortsRequest::Representation
|
|
command.request_object = instance_groups_set_named_ports_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_instance_group_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified instance template. Deleting an instance template is
|
|
# permanent and cannot be undone. It is not possible to delete templates that
|
|
# are already in use by a managed instance group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] instance_template
|
|
# The name of the instance template to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_instance_template(project, instance_template, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/instanceTemplates/{instanceTemplate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['instanceTemplate'] = instance_template unless instance_template.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified instance template. Gets a list of available instance
|
|
# templates by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] instance_template
|
|
# The name of the instance template.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceTemplate] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceTemplate]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_template(project, instance_template, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/instanceTemplates/{instanceTemplate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceTemplate::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceTemplate
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['instanceTemplate'] = instance_template unless instance_template.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_template_iam_policy(project, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/instanceTemplates/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates an instance template in the specified project using the data that is
|
|
# included in the request. If you are creating a new template to update an
|
|
# existing instance group, your new instance template must use the same network
|
|
# or, if applicable, the same subnetwork as the original template.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::InstanceTemplate] instance_template_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_instance_template(project, instance_template_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/instanceTemplates', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceTemplate::Representation
|
|
command.request_object = instance_template_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of instance templates that are contained within the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceTemplateList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceTemplateList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_instance_templates(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/instanceTemplates', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceTemplateList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceTemplateList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetPolicyRequest] global_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_template_iam_policy(project, resource, global_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/instanceTemplates/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetPolicyRequest::Representation
|
|
command.request_object = global_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_instance_template_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/instanceTemplates/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Adds an access config to an instance's network interface.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# The instance name for this request.
|
|
# @param [String] network_interface
|
|
# The name of the network interface to add to this instance.
|
|
# @param [Google::Apis::ComputeBeta::AccessConfig] access_config_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_instance_access_config(project, zone, instance, network_interface, access_config_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/addAccessConfig', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::AccessConfig::Representation
|
|
command.request_object = access_config_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['networkInterface'] = network_interface unless network_interface.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves aggregated list of all of the instances in your project across all
|
|
# regions and zones.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_instances(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/instances', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Attaches an existing Disk resource to an instance. You must first create the
|
|
# disk before you can attach it. It is not possible to create and attach a disk
|
|
# at the same time. For more information, read Adding a persistent disk to your
|
|
# instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# The instance name for this request.
|
|
# @param [Google::Apis::ComputeBeta::AttachedDisk] attached_disk_object
|
|
# @param [Boolean] force_attach
|
|
# Whether to force attach the disk even if it's currently attached to another
|
|
# instance.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def attach_disk(project, zone, instance, attached_disk_object = nil, force_attach: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/attachDisk', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::AttachedDisk::Representation
|
|
command.request_object = attached_disk_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['forceAttach'] = force_attach unless force_attach.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified Instance resource. For more information, see Stopping or
|
|
# Deleting an Instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_instance(project, zone, instance, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/instances/{instance}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes an access config from an instance's network interface.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# The instance name for this request.
|
|
# @param [String] access_config
|
|
# The name of the access config to delete.
|
|
# @param [String] network_interface
|
|
# The name of the network interface.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_instance_access_config(project, zone, instance, access_config, network_interface, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/deleteAccessConfig', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['accessConfig'] = access_config unless access_config.nil?
|
|
command.query['networkInterface'] = network_interface unless network_interface.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Detaches a disk from an instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Instance name for this request.
|
|
# @param [String] device_name
|
|
# The device name of the disk to detach. Make a get() request on the instance to
|
|
# view currently attached disks and device names.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def detach_disk(project, zone, instance, device_name, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/detachDisk', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['deviceName'] = device_name unless device_name.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified Instance resource. Gets a list of available instances by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Instance] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Instance]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances/{instance}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Instance::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Instance
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.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
|
|
|
|
# Returns the specified guest attributes entry.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [String] query_path
|
|
# Specifies the guest attributes path to be queried.
|
|
# @param [String] variable_key
|
|
# Specifies the key for the guest attributes entry.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::GuestAttributes] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::GuestAttributes]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_guest_attributes(project, zone, instance, query_path: nil, variable_key: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances/{instance}/getGuestAttributes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::GuestAttributes::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::GuestAttributes
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['queryPath'] = query_path unless query_path.nil?
|
|
command.query['variableKey'] = variable_key unless variable_key.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_iam_policy(project, zone, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Returns the last 1 MB of serial port output from the specified instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Fixnum] port
|
|
# Specifies which COM or serial port to retrieve data from.
|
|
# @param [Fixnum] start
|
|
# Returns output starting from a specific byte position. Use this to page
|
|
# through output when the output is too large to return in a single request. For
|
|
# the initial request, leave this field unspecified. For subsequent calls, this
|
|
# field should be set to the next value returned in the previous call.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SerialPortOutput] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SerialPortOutput]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_serial_port_output(project, zone, instance, port: nil, start: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances/{instance}/serialPort', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SerialPortOutput::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SerialPortOutput
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['port'] = port unless port.nil?
|
|
command.query['start'] = start unless start.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
|
|
|
|
# Returns the Shielded Instance Identity of an instance
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name or id of the instance scoping this request.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ShieldedInstanceIdentity] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ShieldedInstanceIdentity]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_shielded_instance_identity(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ShieldedInstanceIdentity::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ShieldedInstanceIdentity
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.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
|
|
|
|
# Returns the Shielded VM Identity of an instance
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ShieldedVmIdentity] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ShieldedVmIdentity]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_instance_shielded_vm_identity(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ShieldedVmIdentity::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ShieldedVmIdentity
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.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
|
|
|
|
# Creates an instance resource in the specified project using the data included
|
|
# in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [Google::Apis::ComputeBeta::Instance] instance_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] source_instance_template
|
|
# Specifies instance template to create the instance.
|
|
# This field is optional. It can be a full or partial URL. For example, the
|
|
# following are all valid URLs to an instance template:
|
|
# - https://www.googleapis.com/compute/v1/projects/project/global/
|
|
# instanceTemplates/instanceTemplate
|
|
# - projects/project/global/instanceTemplates/instanceTemplate
|
|
# - global/instanceTemplates/instanceTemplate
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_instance(project, zone, instance_object = nil, request_id: nil, source_instance_template: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Instance::Representation
|
|
command.request_object = instance_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.nil?
|
|
command.query['sourceInstanceTemplate'] = source_instance_template unless source_instance_template.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
|
|
|
|
# Retrieves the list of instances contained within the specified zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_instances(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Retrieves the list of referrers to instances contained within the specified
|
|
# zone. For more information, read Viewing Referrers to VM Instances.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the target instance scoping this request, or '-' if the request should
|
|
# span over all instances in the container.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceListReferrers] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceListReferrers]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_instance_referrers(project, zone, instance, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/instances/{instance}/referrers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceListReferrers::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceListReferrers
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Performs a reset on the instance. This is a hard reset the VM does not do a
|
|
# graceful shutdown. For more information, see Resetting an instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def reset_instance(project, zone, instance, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/reset', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Resumes an instance that was suspended using the instances().suspend method.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to resume.
|
|
# @param [Google::Apis::ComputeBeta::InstancesResumeRequest] instances_resume_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def resume_instance(project, zone, instance, instances_resume_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/resume', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstancesResumeRequest::Representation
|
|
command.request_object = instances_resume_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets deletion protection on the instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Boolean] deletion_protection
|
|
# Whether the resource should be protected against deletion.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_deletion_protection(project, zone, resource, deletion_protection: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{resource}/setDeletionProtection', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['deletionProtection'] = deletion_protection unless deletion_protection.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the auto-delete flag for a disk attached to an instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# The instance name for this request.
|
|
# @param [Boolean] auto_delete
|
|
# Whether to auto-delete the disk when the instance is deleted.
|
|
# @param [String] device_name
|
|
# The device name of the disk to modify. Make a get() request on the instance to
|
|
# view currently attached disks and device names.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_disk_auto_delete(project, zone, instance, auto_delete, device_name, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['autoDelete'] = auto_delete unless auto_delete.nil?
|
|
command.query['deviceName'] = device_name unless device_name.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::ZoneSetPolicyRequest] zone_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_iam_policy(project, zone, resource, zone_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ZoneSetPolicyRequest::Representation
|
|
command.request_object = zone_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Sets labels on an instance. To learn more about labels, read the Labeling
|
|
# Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::InstancesSetLabelsRequest] instances_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_labels(project, zone, instance, instances_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstancesSetLabelsRequest::Representation
|
|
command.request_object = instances_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the number and/or type of accelerator for a stopped instance to the
|
|
# values specified in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::InstancesSetMachineResourcesRequest] instances_set_machine_resources_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_machine_resources(project, zone, instance, instances_set_machine_resources_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setMachineResources', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstancesSetMachineResourcesRequest::Representation
|
|
command.request_object = instances_set_machine_resources_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the machine type for a stopped instance to the machine type specified
|
|
# in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::InstancesSetMachineTypeRequest] instances_set_machine_type_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_machine_type(project, zone, instance, instances_set_machine_type_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setMachineType', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstancesSetMachineTypeRequest::Representation
|
|
command.request_object = instances_set_machine_type_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets metadata for the specified instance to the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::Metadata] metadata_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_metadata(project, zone, instance, metadata_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setMetadata', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Metadata::Representation
|
|
command.request_object = metadata_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the minimum CPU platform that this instance should use. This method
|
|
# can only be called on a stopped instance. For more information, read
|
|
# Specifying a Minimum CPU Platform.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::InstancesSetMinCpuPlatformRequest] instances_set_min_cpu_platform_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_min_cpu_platform(project, zone, instance, instances_set_min_cpu_platform_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstancesSetMinCpuPlatformRequest::Representation
|
|
command.request_object = instances_set_min_cpu_platform_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets an instance's scheduling options.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Instance name for this request.
|
|
# @param [Google::Apis::ComputeBeta::Scheduling] scheduling_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_scheduling(project, zone, instance, scheduling_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setScheduling', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Scheduling::Representation
|
|
command.request_object = scheduling_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the service account on the instance. For more information, read Changing
|
|
# the service account and access scopes for an instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to start.
|
|
# @param [Google::Apis::ComputeBeta::InstancesSetServiceAccountRequest] instances_set_service_account_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_service_account(project, zone, instance, instances_set_service_account_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setServiceAccount', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstancesSetServiceAccountRequest::Representation
|
|
command.request_object = instances_set_service_account_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the Shielded Instance integrity policy for an instance. You can only use
|
|
# this method on a running instance. This method supports PATCH semantics and
|
|
# uses the JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name or id of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::ShieldedInstanceIntegrityPolicy] shielded_instance_integrity_policy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_shielded_instance_integrity_policy(project, zone, instance, shielded_instance_integrity_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ShieldedInstanceIntegrityPolicy::Representation
|
|
command.request_object = shielded_instance_integrity_policy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the Shielded VM integrity policy for a VM instance. You can only use this
|
|
# method on a running VM instance. This method supports PATCH semantics and uses
|
|
# the JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::ShieldedVmIntegrityPolicy] shielded_vm_integrity_policy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_shielded_vm_integrity_policy(project, zone, instance, shielded_vm_integrity_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ShieldedVmIntegrityPolicy::Representation
|
|
command.request_object = shielded_vm_integrity_policy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets network tags for the specified instance to the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::Tags] tags_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_instance_tags(project, zone, instance, tags_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setTags', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Tags::Representation
|
|
command.request_object = tags_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Simulates a maintenance event on the instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def simulate_instance_maintenance_event(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.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
|
|
|
|
# Starts an instance that was stopped using the instances().stop method. For
|
|
# more information, see Restart an instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to start.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def start_instance(project, zone, instance, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/start', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Starts an instance that was stopped using the instances().stop method. For
|
|
# more information, see Restart an instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to start.
|
|
# @param [Google::Apis::ComputeBeta::InstancesStartWithEncryptionKeyRequest] instances_start_with_encryption_key_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def start_instance_with_encryption_key(project, zone, instance, instances_start_with_encryption_key_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstancesStartWithEncryptionKeyRequest::Representation
|
|
command.request_object = instances_start_with_encryption_key_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Stops a running instance, shutting it down cleanly, and allows you to restart
|
|
# the instance at a later time. Stopped instances do not incur VM usage charges
|
|
# while they are stopped. However, resources that the VM is using, such as
|
|
# persistent disks and static IP addresses, will continue to be charged until
|
|
# they are deleted. For more information, see Stopping an instance.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to stop.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def stop_instance(project, zone, instance, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/stop', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# This method suspends a running instance, saving its state to persistent
|
|
# storage, and allows you to resume the instance at a later time. Suspended
|
|
# instances incur reduced per-minute, virtual machine usage charges while they
|
|
# are suspended. Any resources the virtual machine is using, such as persistent
|
|
# disks and static IP addresses, will continue to be charged until they are
|
|
# deleted.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance resource to suspend.
|
|
# @param [Boolean] discard_local_ssd
|
|
# If true, discard the contents of any attached localSSD partitions. Default
|
|
# value is false (== preserve localSSD data).
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def suspend_instance(project, zone, instance, discard_local_ssd: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/suspend', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['discardLocalSsd'] = discard_local_ssd unless discard_local_ssd.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_instance_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the specified access config from an instance's network interface with
|
|
# the data included in the request. This method supports PATCH semantics and
|
|
# uses the JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# The instance name for this request.
|
|
# @param [String] network_interface
|
|
# The name of the network interface where the access config is attached.
|
|
# @param [Google::Apis::ComputeBeta::AccessConfig] access_config_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_instance_access_config(project, zone, instance, network_interface, access_config_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/updateAccessConfig', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::AccessConfig::Representation
|
|
command.request_object = access_config_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['networkInterface'] = network_interface unless network_interface.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Updates the Display config for a VM instance. You can only use this method on
|
|
# a stopped VM instance. This method supports PATCH semantics and uses the JSON
|
|
# merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::DisplayDevice] display_device_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_instance_display_device(project, zone, instance, display_device_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/instances/{instance}/updateDisplayDevice', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::DisplayDevice::Representation
|
|
command.request_object = display_device_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Updates an instance's network interface. This method follows PATCH semantics.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# The instance name for this request.
|
|
# @param [String] network_interface
|
|
# The name of the network interface to update.
|
|
# @param [Google::Apis::ComputeBeta::NetworkInterface] network_interface_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_instance_network_interface(project, zone, instance, network_interface, network_interface_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/instances/{instance}/updateNetworkInterface', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworkInterface::Representation
|
|
command.request_object = network_interface_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['networkInterface'] = network_interface unless network_interface.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Updates the Shielded Instance config for an instance. You can only use this
|
|
# method on a stopped instance. This method supports PATCH semantics and uses
|
|
# the JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name or id of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::ShieldedInstanceConfig] shielded_instance_config_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_instance_shielded_instance_config(project, zone, instance, shielded_instance_config_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ShieldedInstanceConfig::Representation
|
|
command.request_object = shielded_instance_config_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Updates the Shielded VM config for a VM instance. You can only use this method
|
|
# on a stopped VM instance. This method supports PATCH semantics and uses the
|
|
# JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] instance
|
|
# Name of the instance scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::ShieldedVmConfig] shielded_vm_config_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_instance_shielded_vm_config(project, zone, instance, shielded_vm_config_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ShieldedVmConfig::Representation
|
|
command.request_object = shielded_vm_config_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['instance'] = instance unless instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of interconnect attachments.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InterconnectAttachmentAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InterconnectAttachmentAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_interconnect_attachment_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/interconnectAttachments', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InterconnectAttachmentAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InterconnectAttachmentAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified interconnect attachment.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] interconnect_attachment
|
|
# Name of the interconnect attachment to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_interconnect_attachment(project, region, interconnect_attachment, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['interconnectAttachment'] = interconnect_attachment unless interconnect_attachment.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified interconnect attachment.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] interconnect_attachment
|
|
# Name of the interconnect attachment to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InterconnectAttachment] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InterconnectAttachment]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_interconnect_attachment(project, region, interconnect_attachment, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InterconnectAttachment::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InterconnectAttachment
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['interconnectAttachment'] = interconnect_attachment unless interconnect_attachment.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
|
|
|
|
# Creates an InterconnectAttachment in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::InterconnectAttachment] interconnect_attachment_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_interconnect_attachment(project, region, interconnect_attachment_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/interconnectAttachments', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InterconnectAttachment::Representation
|
|
command.request_object = interconnect_attachment_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of interconnect attachments contained within the specified
|
|
# region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InterconnectAttachmentList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InterconnectAttachmentList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_interconnect_attachments(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/interconnectAttachments', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InterconnectAttachmentList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InterconnectAttachmentList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates the specified interconnect attachment with the data included in the
|
|
# request. This method supports PATCH semantics and uses the JSON merge patch
|
|
# format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] interconnect_attachment
|
|
# Name of the interconnect attachment to patch.
|
|
# @param [Google::Apis::ComputeBeta::InterconnectAttachment] interconnect_attachment_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_interconnect_attachment(project, region, interconnect_attachment, interconnect_attachment_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InterconnectAttachment::Representation
|
|
command.request_object = interconnect_attachment_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['interconnectAttachment'] = interconnect_attachment unless interconnect_attachment.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the labels on an InterconnectAttachment. To learn more about labels, read
|
|
# the Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_interconnect_attachment_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/interconnectAttachments/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation
|
|
command.request_object = region_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_interconnect_attachment_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns the details for the specified interconnect location. Gets a list of
|
|
# available interconnect locations by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] interconnect_location
|
|
# Name of the interconnect location to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InterconnectLocation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InterconnectLocation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_interconnect_location(project, interconnect_location, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/interconnectLocations/{interconnectLocation}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InterconnectLocation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InterconnectLocation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['interconnectLocation'] = interconnect_location unless interconnect_location.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
|
|
|
|
# Retrieves the list of interconnect locations available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InterconnectLocationList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InterconnectLocationList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_interconnect_locations(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/interconnectLocations', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InterconnectLocationList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InterconnectLocationList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified interconnect.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] interconnect
|
|
# Name of the interconnect to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_interconnect(project, interconnect, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/interconnects/{interconnect}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['interconnect'] = interconnect unless interconnect.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified interconnect. Get a list of available interconnects by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] interconnect
|
|
# Name of the interconnect to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Interconnect] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Interconnect]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_interconnect(project, interconnect, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/interconnects/{interconnect}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Interconnect::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Interconnect
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['interconnect'] = interconnect unless interconnect.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
|
|
|
|
# Returns the interconnectDiagnostics for the specified interconnect.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] interconnect
|
|
# Name of the interconnect resource to query.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InterconnectsGetDiagnosticsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InterconnectsGetDiagnosticsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_interconnect_diagnostics(project, interconnect, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/interconnects/{interconnect}/getDiagnostics', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InterconnectsGetDiagnosticsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InterconnectsGetDiagnosticsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['interconnect'] = interconnect unless interconnect.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
|
|
|
|
# Creates a Interconnect in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::Interconnect] interconnect_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_interconnect(project, interconnect_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/interconnects', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Interconnect::Representation
|
|
command.request_object = interconnect_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of interconnect available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InterconnectList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InterconnectList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_interconnects(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/interconnects', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InterconnectList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InterconnectList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates the specified interconnect with the data included in the request. This
|
|
# method supports PATCH semantics and uses the JSON merge patch format and
|
|
# processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] interconnect
|
|
# Name of the interconnect to update.
|
|
# @param [Google::Apis::ComputeBeta::Interconnect] interconnect_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_interconnect(project, interconnect, interconnect_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/interconnects/{interconnect}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Interconnect::Representation
|
|
command.request_object = interconnect_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['interconnect'] = interconnect unless interconnect.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the labels on an Interconnect. To learn more about labels, read the
|
|
# Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetLabelsRequest] global_set_labels_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_interconnect_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/interconnects/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetLabelsRequest::Representation
|
|
command.request_object = global_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_interconnect_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/interconnects/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Return a specified license code. License codes are mirrored across all
|
|
# projects that have permissions to read the License Code.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] license_code
|
|
# Number corresponding to the License code resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::LicenseCode] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::LicenseCode]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_license_code(project, license_code, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/licenseCodes/{licenseCode}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::LicenseCode::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::LicenseCode
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['licenseCode'] = license_code unless license_code.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
|
|
|
|
# Deletes the specified license.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] license
|
|
# Name of the license resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_license(project, license, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/licenses/{license}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['license'] = license unless license.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified License resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] license
|
|
# Name of the License resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::License] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::License]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_license(project, license, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/licenses/{license}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::License::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::License
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['license'] = license unless license.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_license_iam_policy(project, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/licenses/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Create a License resource in the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::License] license_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_license(project, license_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/licenses', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::License::Representation
|
|
command.request_object = license_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of licenses available in the specified project. This method
|
|
# does not get any licenses that belong to other projects, including licenses
|
|
# attached to publicly-available images, like Debian 9. If you want to get a
|
|
# list of publicly-available licenses, use this method to make a request to the
|
|
# respective image project, such as debian-cloud or windows-cloud.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::LicensesListResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::LicensesListResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_licenses(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/licenses', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::LicensesListResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::LicensesListResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetPolicyRequest] global_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_license_iam_policy(project, resource, global_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/licenses/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetPolicyRequest::Representation
|
|
command.request_object = global_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of machine types.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::MachineTypeAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::MachineTypeAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_machine_types(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/machineTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::MachineTypeAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::MachineTypeAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns the specified machine type. Gets a list of available machine types by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] machine_type
|
|
# Name of the machine type to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::MachineType] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::MachineType]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_machine_type(project, zone, machine_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/machineTypes/{machineType}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::MachineType::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::MachineType
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['machineType'] = machine_type unless machine_type.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
|
|
|
|
# Retrieves a list of machine types available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::MachineTypeList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::MachineTypeList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_machine_types(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/machineTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::MachineTypeList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::MachineTypeList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Retrieves the list of network endpoint groups and sorts them by zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NetworkEndpointGroupAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NetworkEndpointGroupAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_network_endpoint_group_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/networkEndpointGroups', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NetworkEndpointGroupAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NetworkEndpointGroupAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Attach a list of network endpoints to the specified network endpoint group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the network endpoint group is located. It should
|
|
# comply with RFC1035.
|
|
# @param [String] network_endpoint_group
|
|
# The name of the network endpoint group where you are attaching network
|
|
# endpoints to. It should comply with RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::NetworkEndpointGroupsAttachEndpointsRequest] network_endpoint_groups_attach_endpoints_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def attach_network_endpoint_group_network_endpoints(project, zone, network_endpoint_group, network_endpoint_groups_attach_endpoints_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworkEndpointGroupsAttachEndpointsRequest::Representation
|
|
command.request_object = network_endpoint_groups_attach_endpoints_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['networkEndpointGroup'] = network_endpoint_group unless network_endpoint_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified network endpoint group. The network endpoints in the NEG
|
|
# and the VM instances they belong to are not terminated when the NEG is deleted.
|
|
# Note that the NEG cannot be deleted if there are backend services referencing
|
|
# it.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the network endpoint group is located. It should
|
|
# comply with RFC1035.
|
|
# @param [String] network_endpoint_group
|
|
# The name of the network endpoint group to delete. It should comply with
|
|
# RFC1035.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_network_endpoint_group(project, zone, network_endpoint_group, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['networkEndpointGroup'] = network_endpoint_group unless network_endpoint_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Detach a list of network endpoints from the specified network endpoint group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the network endpoint group is located. It should
|
|
# comply with RFC1035.
|
|
# @param [String] network_endpoint_group
|
|
# The name of the network endpoint group where you are removing network
|
|
# endpoints. It should comply with RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::NetworkEndpointGroupsDetachEndpointsRequest] network_endpoint_groups_detach_endpoints_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def detach_network_endpoint_group_network_endpoints(project, zone, network_endpoint_group, network_endpoint_groups_detach_endpoints_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworkEndpointGroupsDetachEndpointsRequest::Representation
|
|
command.request_object = network_endpoint_groups_detach_endpoints_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['networkEndpointGroup'] = network_endpoint_group unless network_endpoint_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified network endpoint group. Gets a list of available network
|
|
# endpoint groups by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the network endpoint group is located. It should
|
|
# comply with RFC1035.
|
|
# @param [String] network_endpoint_group
|
|
# The name of the network endpoint group. It should comply with RFC1035.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NetworkEndpointGroup] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NetworkEndpointGroup]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_network_endpoint_group(project, zone, network_endpoint_group, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NetworkEndpointGroup::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NetworkEndpointGroup
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['networkEndpointGroup'] = network_endpoint_group unless network_endpoint_group.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
|
|
|
|
# Creates a network endpoint group in the specified project using the parameters
|
|
# that are included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where you want to create the network endpoint group. It
|
|
# should comply with RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::NetworkEndpointGroup] network_endpoint_group_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_network_endpoint_group(project, zone, network_endpoint_group_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/networkEndpointGroups', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworkEndpointGroup::Representation
|
|
command.request_object = network_endpoint_group_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of network endpoint groups that are located in the
|
|
# specified project and zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the network endpoint group is located. It should
|
|
# comply with RFC1035.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NetworkEndpointGroupList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NetworkEndpointGroupList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_network_endpoint_groups(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/networkEndpointGroups', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NetworkEndpointGroupList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NetworkEndpointGroupList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists the network endpoints in the specified network endpoint group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone where the network endpoint group is located. It should
|
|
# comply with RFC1035.
|
|
# @param [String] network_endpoint_group
|
|
# The name of the network endpoint group from which you want to generate a list
|
|
# of included network endpoints. It should comply with RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::NetworkEndpointGroupsListEndpointsRequest] network_endpoint_groups_list_endpoints_request_object
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NetworkEndpointGroupsListNetworkEndpoints] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NetworkEndpointGroupsListNetworkEndpoints]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_network_endpoint_group_network_endpoints(project, zone, network_endpoint_group, network_endpoint_groups_list_endpoints_request_object = nil, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworkEndpointGroupsListEndpointsRequest::Representation
|
|
command.request_object = network_endpoint_groups_list_endpoints_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::NetworkEndpointGroupsListNetworkEndpoints::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NetworkEndpointGroupsListNetworkEndpoints
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['networkEndpointGroup'] = network_endpoint_group unless network_endpoint_group.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_network_endpoint_group_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Adds a peering to the specified network.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network resource to add peering to.
|
|
# @param [Google::Apis::ComputeBeta::NetworksAddPeeringRequest] networks_add_peering_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_network_peering(project, network, networks_add_peering_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/networks/{network}/addPeering', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworksAddPeeringRequest::Representation
|
|
command.request_object = networks_add_peering_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified network.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_network(project, network, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/networks/{network}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified network. Gets a list of available networks by making a
|
|
# list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Network] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Network]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_network(project, network, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/networks/{network}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Network::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Network
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.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
|
|
|
|
# Creates a network in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::Network] network_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_network(project, network_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/networks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Network::Representation
|
|
command.request_object = network_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of networks available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NetworkList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NetworkList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_networks(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/networks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NetworkList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NetworkList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists the peering routes exchanged over peering connection.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network for this request.
|
|
# @param [String] direction
|
|
# The direction of the exchanged routes.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] peering_name
|
|
# The response will show routes exchanged over the given peering connection.
|
|
# @param [String] region
|
|
# The region of the request. The response will include all subnet routes, static
|
|
# routes and dynamic routes in the region.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ExchangedPeeringRoutesList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ExchangedPeeringRoutesList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_network_peering_routes(project, network, direction: nil, filter: nil, max_results: nil, order_by: nil, page_token: nil, peering_name: nil, region: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/networks/{network}/listPeeringRoutes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ExchangedPeeringRoutesList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ExchangedPeeringRoutesList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.nil?
|
|
command.query['direction'] = direction unless direction.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.nil?
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
command.query['peeringName'] = peering_name unless peering_name.nil?
|
|
command.query['region'] = region unless region.nil?
|
|
command.query['fields'] = fields unless fields.nil?
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
execute_or_queue_command(command, &block)
|
|
end
|
|
|
|
# Patches the specified network with the data included in the request. Only the
|
|
# following fields can be modified: routingConfig.routingMode.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network to update.
|
|
# @param [Google::Apis::ComputeBeta::Network] network_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_network(project, network, network_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/networks/{network}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Network::Representation
|
|
command.request_object = network_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Removes a peering from the specified network.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network resource to remove peering from.
|
|
# @param [Google::Apis::ComputeBeta::NetworksRemovePeeringRequest] networks_remove_peering_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def remove_network_peering(project, network, networks_remove_peering_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/networks/{network}/removePeering', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworksRemovePeeringRequest::Representation
|
|
command.request_object = networks_remove_peering_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Switches the network mode from auto subnet mode to custom subnet mode.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network to be updated.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def switch_network_to_custom_mode(project, network, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/networks/{network}/switchToCustomMode', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_network_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/networks/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the specified network peering with the data included in the request
|
|
# Only the following fields can be modified: NetworkPeering.export_custom_routes,
|
|
# and NetworkPeering.import_custom_routes
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] network
|
|
# Name of the network resource which the updated peering is belonging to.
|
|
# @param [Google::Apis::ComputeBeta::NetworksUpdatePeeringRequest] networks_update_peering_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_network_peering(project, network, networks_update_peering_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/networks/{network}/updatePeering', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NetworksUpdatePeeringRequest::Representation
|
|
command.request_object = networks_update_peering_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['network'] = network unless network.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Adds specified number of nodes to the node group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] node_group
|
|
# Name of the NodeGroup resource.
|
|
# @param [Google::Apis::ComputeBeta::NodeGroupsAddNodesRequest] node_groups_add_nodes_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_node_group_nodes(project, zone, node_group, node_groups_add_nodes_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NodeGroupsAddNodesRequest::Representation
|
|
command.request_object = node_groups_add_nodes_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['nodeGroup'] = node_group unless node_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes
|
|
# for more details about each group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeGroupAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeGroupAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_node_group_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/nodeGroups', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeGroupAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeGroupAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified NodeGroup resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] node_group
|
|
# Name of the NodeGroup resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_node_group(project, zone, node_group, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/nodeGroups/{nodeGroup}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['nodeGroup'] = node_group unless node_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes specified nodes from the node group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] node_group
|
|
# Name of the NodeGroup resource whose nodes will be deleted.
|
|
# @param [Google::Apis::ComputeBeta::NodeGroupsDeleteNodesRequest] node_groups_delete_nodes_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_node_group_nodes(project, zone, node_group, node_groups_delete_nodes_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NodeGroupsDeleteNodesRequest::Representation
|
|
command.request_object = node_groups_delete_nodes_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['nodeGroup'] = node_group unless node_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified NodeGroup. Get a list of available NodeGroups by making
|
|
# a list() request. Note: the "nodes" field should not be used. Use nodeGroups.
|
|
# listNodes instead.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] node_group
|
|
# Name of the node group to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeGroup] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeGroup]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_node_group(project, zone, node_group, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/nodeGroups/{nodeGroup}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeGroup::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeGroup
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['nodeGroup'] = node_group unless node_group.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_node_group_iam_policy(project, zone, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates a NodeGroup resource in the specified project using the data included
|
|
# in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [Fixnum] initial_node_count
|
|
# Initial count of nodes in the node group.
|
|
# @param [Google::Apis::ComputeBeta::NodeGroup] node_group_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_node_group(project, zone, initial_node_count, node_group_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/nodeGroups', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NodeGroup::Representation
|
|
command.request_object = node_group_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['initialNodeCount'] = initial_node_count unless initial_node_count.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of node groups available to the specified project. Note: use
|
|
# nodeGroups.listNodes for more details about each group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeGroupList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeGroupList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_node_groups(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/nodeGroups', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeGroupList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeGroupList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists nodes in the node group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] node_group
|
|
# Name of the NodeGroup resource whose nodes you want to list.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeGroupsListNodes] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeGroupsListNodes]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_node_group_nodes(project, zone, node_group, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeGroupsListNodes::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeGroupsListNodes
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['nodeGroup'] = node_group unless node_group.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::ZoneSetPolicyRequest] zone_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_node_group_iam_policy(project, zone, resource, zone_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ZoneSetPolicyRequest::Representation
|
|
command.request_object = zone_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the node template of the node group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] node_group
|
|
# Name of the NodeGroup resource to update.
|
|
# @param [Google::Apis::ComputeBeta::NodeGroupsSetNodeTemplateRequest] node_groups_set_node_template_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_node_group_node_template(project, zone, node_group, node_groups_set_node_template_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NodeGroupsSetNodeTemplateRequest::Representation
|
|
command.request_object = node_groups_set_node_template_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['nodeGroup'] = node_group unless node_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_node_group_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of node templates.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeTemplateAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeTemplateAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_node_template_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/nodeTemplates', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeTemplateAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeTemplateAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified NodeTemplate resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] node_template
|
|
# Name of the NodeTemplate resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_node_template(project, region, node_template, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/nodeTemplates/{nodeTemplate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['nodeTemplate'] = node_template unless node_template.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified node template. Gets a list of available node templates
|
|
# by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] node_template
|
|
# Name of the node template to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeTemplate] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeTemplate]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_node_template(project, region, node_template, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/nodeTemplates/{nodeTemplate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeTemplate::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeTemplate
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['nodeTemplate'] = node_template unless node_template.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_node_template_iam_policy(project, region, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates a NodeTemplate resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::NodeTemplate] node_template_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_node_template(project, region, node_template_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/nodeTemplates', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::NodeTemplate::Representation
|
|
command.request_object = node_template_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of node templates available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeTemplateList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeTemplateList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_node_templates(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/nodeTemplates', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeTemplateList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeTemplateList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetPolicyRequest] region_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_node_template_iam_policy(project, region, resource, region_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetPolicyRequest::Representation
|
|
command.request_object = region_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_node_template_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of node types.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeTypeAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeTypeAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_node_type_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/nodeTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeTypeAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeTypeAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns the specified node type. Gets a list of available node types by making
|
|
# a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] node_type
|
|
# Name of the node type to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeType] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeType]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_node_type(project, zone, node_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/nodeTypes/{nodeType}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeType::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeType
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['nodeType'] = node_type unless node_type.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
|
|
|
|
# Retrieves a list of node types available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::NodeTypeList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::NodeTypeList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_node_types(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/nodeTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::NodeTypeList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::NodeTypeList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Disable this project as a shared VPC host project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def disable_project_xpn_host(project, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/disableXpnHost', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Disable a service resource (also known as service project) associated with
|
|
# this host project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::ProjectsDisableXpnResourceRequest] projects_disable_xpn_resource_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def disable_project_xpn_resource(project, projects_disable_xpn_resource_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/disableXpnResource', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ProjectsDisableXpnResourceRequest::Representation
|
|
command.request_object = projects_disable_xpn_resource_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Enable this project as a shared VPC host project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def enable_project_xpn_host(project, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/enableXpnHost', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# 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.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::ProjectsEnableXpnResourceRequest] projects_enable_xpn_resource_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def enable_project_xpn_resource(project, projects_enable_xpn_resource_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/enableXpnResource', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ProjectsEnableXpnResourceRequest::Representation
|
|
command.request_object = projects_enable_xpn_resource_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified Project resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Project] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Project]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_project(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Project::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Project
|
|
command.params['project'] = project unless project.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
|
|
|
|
# Gets the shared VPC host project that this project links to. May be empty if
|
|
# no link exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Project] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Project]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_project_xpn_host(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/getXpnHost', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Project::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Project
|
|
command.params['project'] = project unless project.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
|
|
|
|
# Gets service resources (a.k.a service project) associated with this host
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ProjectsGetXpnResources] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ProjectsGetXpnResources]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_project_xpn_resources(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/getXpnResources', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ProjectsGetXpnResources::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ProjectsGetXpnResources
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['order_by'] = order_by unless order_by.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
|
|
|
|
# Lists all shared VPC host projects visible to the user in an organization.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::ProjectsListXpnHostsRequest] projects_list_xpn_hosts_request_object
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::XpnHostList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::XpnHostList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_project_xpn_hosts(project, projects_list_xpn_hosts_request_object = nil, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/listXpnHosts', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ProjectsListXpnHostsRequest::Representation
|
|
command.request_object = projects_list_xpn_hosts_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::XpnHostList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::XpnHostList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['order_by'] = order_by unless order_by.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
|
|
|
|
# Moves a persistent disk from one zone to another.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::DiskMoveRequest] disk_move_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def move_disk(project, disk_move_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/moveDisk', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::DiskMoveRequest::Representation
|
|
command.request_object = disk_move_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Moves an instance and its attached persistent disks from one zone to another.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::MoveInstanceRequest] move_instance_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def move_instance(project, move_instance_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/moveInstance', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::MoveInstanceRequest::Representation
|
|
command.request_object = move_instance_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets metadata common to all instances within the specified project using the
|
|
# data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::Metadata] metadata_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_common_instance_metadata(project, metadata_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/setCommonInstanceMetadata', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Metadata::Representation
|
|
command.request_object = metadata_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# 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.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::ProjectsSetDefaultNetworkTierRequest] projects_set_default_network_tier_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_project_default_network_tier(project, projects_set_default_network_tier_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/setDefaultNetworkTier', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ProjectsSetDefaultNetworkTierRequest::Representation
|
|
command.request_object = projects_set_default_network_tier_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# 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.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::UsageExportLocation] usage_export_location_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_usage_export_bucket(project, usage_export_location_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/setUsageExportBucket', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UsageExportLocation::Representation
|
|
command.request_object = usage_export_location_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified autoscaler.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_autoscaler(project, region, autoscaler, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/autoscalers/{autoscaler}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['autoscaler'] = autoscaler unless autoscaler.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified autoscaler.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Autoscaler] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Autoscaler]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_autoscaler(project, region, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/autoscalers/{autoscaler}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Autoscaler
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['autoscaler'] = autoscaler unless autoscaler.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
|
|
|
|
# Creates an autoscaler in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::Autoscaler] autoscaler_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_autoscaler(project, region, autoscaler_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/autoscalers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.request_object = autoscaler_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of autoscalers contained within the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RegionAutoscalerList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RegionAutoscalerList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_autoscalers(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/autoscalers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RegionAutoscalerList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RegionAutoscalerList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates an autoscaler in the specified project using the data included in the
|
|
# request. This method supports PATCH semantics and uses the JSON merge patch
|
|
# format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::Autoscaler] autoscaler_object
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to patch.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_region_autoscaler(project, region, autoscaler_object = nil, autoscaler: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/autoscalers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.request_object = autoscaler_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['autoscaler'] = autoscaler unless autoscaler.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_region_autoscaler_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/autoscalers/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates an autoscaler in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::Autoscaler] autoscaler_object
|
|
# @param [String] autoscaler
|
|
# Name of the autoscaler to update.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_region_autoscaler(project, region, autoscaler_object = nil, autoscaler: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/regions/{region}/autoscalers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Autoscaler::Representation
|
|
command.request_object = autoscaler_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['autoscaler'] = autoscaler unless autoscaler.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified regional BackendService resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_backend_service(project, region, backend_service, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/backendServices/{backendService}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified regional BackendService resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendService] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendService]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_backend_service(project, region, backend_service, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/backendServices/{backendService}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendService
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.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
|
|
|
|
# Gets the most recent health check results for this regional BackendService.
|
|
# @param [String] project
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource for which to get health.
|
|
# @param [Google::Apis::ComputeBeta::ResourceGroupReference] resource_group_reference_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendServiceGroupHealth] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendServiceGroupHealth]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_backend_service_health(project, region, backend_service, resource_group_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/backendServices/{backendService}/getHealth', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ResourceGroupReference::Representation
|
|
command.request_object = resource_group_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendServiceGroupHealth::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendServiceGroupHealth
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.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
|
|
|
|
# Creates a regional BackendService resource in the specified project using the
|
|
# data included in the request. There are several restrictions and guidelines to
|
|
# keep in mind when creating a regional backend service. Read Restrictions and
|
|
# Guidelines for more information.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::BackendService] backend_service_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_backend_service(project, region, backend_service_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/backendServices', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.request_object = backend_service_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of regional BackendService resources available to the
|
|
# specified project in the given region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::BackendServiceList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::BackendServiceList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_backend_services(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/backendServices', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::BackendServiceList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::BackendServiceList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates the specified regional BackendService resource with the data included
|
|
# in the request. There are several restrictions and guidelines to keep in mind
|
|
# when updating a backend service. Read Restrictions and Guidelines for more
|
|
# information. This method supports PATCH semantics and uses the JSON merge
|
|
# patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::BackendService] backend_service_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_region_backend_service(project, region, backend_service, backend_service_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/backendServices/{backendService}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.request_object = backend_service_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_region_backend_service_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/backendServices/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the specified regional BackendService resource with the data included
|
|
# in the request. There are several restrictions and guidelines to keep in mind
|
|
# when updating a backend service. Read Restrictions and Guidelines for more
|
|
# information.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] backend_service
|
|
# Name of the BackendService resource to update.
|
|
# @param [Google::Apis::ComputeBeta::BackendService] backend_service_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_region_backend_service(project, region, backend_service, backend_service_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/regions/{region}/backendServices/{backendService}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::BackendService::Representation
|
|
command.request_object = backend_service_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['backendService'] = backend_service unless backend_service.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of commitments.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::CommitmentAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::CommitmentAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_region_commitment_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/commitments', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::CommitmentAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::CommitmentAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns the specified commitment resource. Gets a list of available
|
|
# commitments by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] commitment
|
|
# Name of the commitment to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Commitment] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Commitment]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_commitment(project, region, commitment, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/commitments/{commitment}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Commitment::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Commitment
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['commitment'] = commitment unless commitment.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
|
|
|
|
# Creates a commitment in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::Commitment] commitment_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_commitment(project, region, commitment_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/commitments', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Commitment::Representation
|
|
command.request_object = commitment_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of commitments contained within the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::CommitmentList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::CommitmentList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_commitments(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/commitments', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::CommitmentList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::CommitmentList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Update the shape of reservations for GPUS/Local SSDs of reservations within
|
|
# the commitments.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] commitment
|
|
# Name of the commitment for which the reservation is being updated.
|
|
# @param [Google::Apis::ComputeBeta::RegionCommitmentsUpdateReservationsRequest] region_commitments_update_reservations_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_region_commitment_reservations(project, region, commitment, region_commitments_update_reservations_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/commitments/{commitment}/updateReservations', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionCommitmentsUpdateReservationsRequest::Representation
|
|
command.request_object = region_commitments_update_reservations_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['commitment'] = commitment unless commitment.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified regional disk type. Gets a list of available disk types
|
|
# by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] disk_type
|
|
# Name of the disk type to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::DiskType] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::DiskType]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_disk_type(project, region, disk_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/diskTypes/{diskType}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::DiskType::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::DiskType
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['diskType'] = disk_type unless disk_type.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
|
|
|
|
# Retrieves a list of regional disk types available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RegionDiskTypeList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RegionDiskTypeList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_disk_types(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/diskTypes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RegionDiskTypeList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RegionDiskTypeList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Adds existing resource policies to a regional disk. You can only add one
|
|
# policy which will be applied to this disk for scheduling snapshot creation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] disk
|
|
# The disk name for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionDisksAddResourcePoliciesRequest] region_disks_add_resource_policies_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_region_disk_resource_policies(project, region, disk, region_disks_add_resource_policies_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks/{disk}/addResourcePolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionDisksAddResourcePoliciesRequest::Representation
|
|
command.request_object = region_disks_add_resource_policies_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Creates a snapshot of this regional disk.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] disk
|
|
# Name of the regional persistent disk to snapshot.
|
|
# @param [Google::Apis::ComputeBeta::Snapshot] snapshot_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def create_region_disk_snapshot(project, region, disk, snapshot_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks/{disk}/createSnapshot', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Snapshot::Representation
|
|
command.request_object = snapshot_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified regional persistent disk. Deleting a regional disk
|
|
# removes all the replicas of its data permanently and is irreversible. However,
|
|
# deleting a disk does not delete any snapshots previously made from the disk.
|
|
# You must separately delete snapshots.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] disk
|
|
# Name of the regional persistent disk to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_disk(project, region, disk, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/disks/{disk}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns a specified regional persistent disk.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] disk
|
|
# Name of the regional persistent disk to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Disk] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Disk]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_disk(project, region, disk, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/disks/{disk}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Disk::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Disk
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['disk'] = disk unless disk.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_disk_iam_policy(project, region, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/disks/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates a persistent regional disk in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::Disk] disk_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] source_image
|
|
# Optional. Source image to restore onto a disk.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_disk(project, region, disk_object = nil, request_id: nil, source_image: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Disk::Representation
|
|
command.request_object = disk_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.nil?
|
|
command.query['sourceImage'] = source_image unless source_image.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
|
|
|
|
# Retrieves the list of persistent disks contained within the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::DiskList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::DiskList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_disks(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/disks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::DiskList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::DiskList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Removes resource policies from a regional disk.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] disk
|
|
# The disk name for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionDisksRemoveResourcePoliciesRequest] region_disks_remove_resource_policies_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def remove_region_disk_resource_policies(project, region, disk, region_disks_remove_resource_policies_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks/{disk}/removeResourcePolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionDisksRemoveResourcePoliciesRequest::Representation
|
|
command.request_object = region_disks_remove_resource_policies_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Resizes the specified regional persistent disk.
|
|
# @param [String] project
|
|
# The project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] disk
|
|
# Name of the regional persistent disk.
|
|
# @param [Google::Apis::ComputeBeta::RegionDisksResizeRequest] region_disks_resize_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def resize_region_disk(project, region, disk, region_disks_resize_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks/{disk}/resize', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionDisksResizeRequest::Representation
|
|
command.request_object = region_disks_resize_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['disk'] = disk unless disk.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetPolicyRequest] region_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_disk_iam_policy(project, region, resource, region_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetPolicyRequest::Representation
|
|
command.request_object = region_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Sets the labels on the target regional disk.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_disk_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation
|
|
command.request_object = region_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_region_disk_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/disks/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified HealthCheck resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_health_check(project, region, health_check, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/healthChecks/{healthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified HealthCheck resource. Gets a list of available health
|
|
# checks by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HealthCheck] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HealthCheck]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_health_check(project, region, health_check, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/healthChecks/{healthCheck}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HealthCheck
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.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
|
|
|
|
# Creates a HealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::HealthCheck] health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_health_check(project, region, health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/healthChecks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.request_object = health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of HealthCheck resources available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::HealthCheckList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::HealthCheckList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_health_checks(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/healthChecks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::HealthCheckList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::HealthCheckList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Updates a HealthCheck resource in the specified project using the data
|
|
# included in the request. This method supports PATCH semantics and uses the
|
|
# JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::HealthCheck] health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_region_health_check(project, region, health_check, health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/healthChecks/{healthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.request_object = health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Updates a HealthCheck resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] health_check
|
|
# Name of the HealthCheck resource to update.
|
|
# @param [Google::Apis::ComputeBeta::HealthCheck] health_check_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_region_health_check(project, region, health_check, health_check_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/regions/{region}/healthChecks/{healthCheck}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::HealthCheck::Representation
|
|
command.request_object = health_check_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['healthCheck'] = health_check unless health_check.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Flags the specified instances to be immediately removed from the managed
|
|
# instance group. Abandoning an instance does not delete the instance, but it
|
|
# does remove the instance from any target pools that are applied by the managed
|
|
# instance group. This method reduces the targetSize of the managed instance
|
|
# group by the number of instances that you abandon. This operation is marked as
|
|
# DONE when the action is scheduled even if the instances have not yet been
|
|
# removed from the group. You must separately verify the status of the
|
|
# abandoning action with the listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# You can specify a maximum of 1000 instances with this method per request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupManagersAbandonInstancesRequest] region_instance_group_managers_abandon_instances_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def abandon_region_instance_group_manager_instances(project, region, instance_group_manager, region_instance_group_managers_abandon_instances_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersAbandonInstancesRequest::Representation
|
|
command.request_object = region_instance_group_managers_abandon_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Apply updates to selected instances the managed instance group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request, should conform to RFC1035.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group, should conform to RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupManagersApplyUpdatesRequest] region_instance_group_managers_apply_updates_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def apply_region_instance_group_manager_updates_to_instances(project, region, instance_group_manager, region_instance_group_managers_apply_updates_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersApplyUpdatesRequest::Representation
|
|
command.request_object = region_instance_group_managers_apply_updates_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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
|
|
|
|
# Deletes the specified managed instance group and all of the instances in that
|
|
# group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_instance_group_manager(project, region, instance_group_manager, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Flags the specified instances in the managed instance group to be immediately
|
|
# deleted. The instances are also removed from any target pools of which they
|
|
# were a member. This method reduces the targetSize of the managed instance
|
|
# group by the number of instances that you delete. The deleteInstances
|
|
# operation is marked DONE if the deleteInstances request is successful. The
|
|
# underlying actions take additional time. You must separately verify the status
|
|
# of the deleting action with the listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# You can specify a maximum of 1000 instances with this method per request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupManagersDeleteInstancesRequest] region_instance_group_managers_delete_instances_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_instance_group_manager_instances(project, region, instance_group_manager, region_instance_group_managers_delete_instances_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersDeleteInstancesRequest::Representation
|
|
command.request_object = region_instance_group_managers_delete_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns all of the details about the specified managed instance group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroupManager] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroupManager]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_instance_group_manager(project, region, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroupManager
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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
|
|
|
|
# Creates a managed instance group using the information that you specify in the
|
|
# request. After the group is created, instances in the group are created using
|
|
# the specified instance template. This operation is marked as DONE when the
|
|
# group is created even if the instances in the group have not yet been created.
|
|
# You must separately verify the status of the individual instances with the
|
|
# listmanagedinstances method.
|
|
# A regional managed instance group can contain up to 2000 instances.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManager] instance_group_manager_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_instance_group_manager(project, region, instance_group_manager_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.request_object = instance_group_manager_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of managed instance groups that are contained within the
|
|
# specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RegionInstanceGroupManagerList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RegionInstanceGroupManagerList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_instance_group_managers(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/instanceGroupManagers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagerList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RegionInstanceGroupManagerList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists the instances in the managed instance group and instances that are
|
|
# scheduled to be created. The list includes any current actions that the group
|
|
# has scheduled for its instances.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RegionInstanceGroupManagersListInstancesResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RegionInstanceGroupManagersListInstancesResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_instance_group_manager_managed_instances(project, region, instance_group_manager, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersListInstancesResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RegionInstanceGroupManagersListInstancesResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['order_by'] = order_by unless order_by.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
|
|
|
|
# Updates a managed instance group using the information that you specify in the
|
|
# request. This operation is marked as DONE when the group is patched even if
|
|
# the instances in the group are still in the process of being patched. You must
|
|
# separately verify the status of the individual instances with the
|
|
# listmanagedinstances method. This method supports PATCH semantics and uses the
|
|
# JSON merge patch format and processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# The name of the instance group manager.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManager] instance_group_manager_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_region_instance_group_manager(project, region, instance_group_manager, instance_group_manager_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.request_object = instance_group_manager_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Flags the specified instances in the managed instance group to be immediately
|
|
# recreated. The instances are deleted and recreated using the current instance
|
|
# template for the managed instance group. This operation is marked as DONE when
|
|
# the flag is set even if the instances have not yet been recreated. You must
|
|
# separately verify the status of the recreating action with the
|
|
# listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# You can specify a maximum of 1000 instances with this method per request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupManagersRecreateRequest] region_instance_group_managers_recreate_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def recreate_region_instance_group_manager_instances(project, region, instance_group_manager, region_instance_group_managers_recreate_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersRecreateRequest::Representation
|
|
command.request_object = region_instance_group_managers_recreate_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the intended size of the managed instance group. If you increase the
|
|
# size, the group creates new instances using the current instance template. If
|
|
# you decrease the size, the group deletes one or more instances.
|
|
# The resize operation is marked DONE if the resize request is successful. The
|
|
# underlying actions take additional time. You must separately verify the status
|
|
# of the creating or deleting actions with the listmanagedinstances method.
|
|
# If the group is part of a backend service that has enabled connection draining,
|
|
# it can take up to 60 seconds after the connection draining duration has
|
|
# elapsed before the VM instance is removed or deleted.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group.
|
|
# @param [Fixnum] size
|
|
# Number of instances that should exist in this instance group manager.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def resize_region_instance_group_manager(project, region, instance_group_manager, size, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.nil?
|
|
command.query['size'] = size unless size.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
|
|
|
|
# Modifies the autohealing policy for the instances in this managed instance
|
|
# group. [Deprecated] This method is deprecated. Please use Patch instead.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupManagersSetAutoHealingRequest] region_instance_group_managers_set_auto_healing_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_instance_group_manager_auto_healing_policies(project, region, instance_group_manager, region_instance_group_managers_set_auto_healing_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersSetAutoHealingRequest::Representation
|
|
command.request_object = region_instance_group_managers_set_auto_healing_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the instance template to use when creating new instances or recreating
|
|
# instances in this group. Existing instances are not affected.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# The name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupManagersSetTemplateRequest] region_instance_group_managers_set_template_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_instance_group_manager_instance_template(project, region, instance_group_manager, region_instance_group_managers_set_template_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersSetTemplateRequest::Representation
|
|
command.request_object = region_instance_group_managers_set_template_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Modifies the target pools to which all new instances in this group are
|
|
# assigned. Existing instances in the group are not affected.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# Name of the managed instance group.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupManagersSetTargetPoolsRequest] region_instance_group_managers_set_target_pools_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_instance_group_manager_target_pools(project, region, instance_group_manager, region_instance_group_managers_set_target_pools_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupManagersSetTargetPoolsRequest::Representation
|
|
command.request_object = region_instance_group_managers_set_target_pools_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_region_instance_group_manager_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates a managed instance group using the information that you specify in the
|
|
# request. This operation is marked as DONE when the group is updated even if
|
|
# the instances in the group have not yet been updated. You must separately
|
|
# verify the status of the individual instances with the listmanagedinstances
|
|
# method.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group_manager
|
|
# The name of the instance group manager.
|
|
# @param [Google::Apis::ComputeBeta::InstanceGroupManager] instance_group_manager_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_region_instance_group_manager(project, region, instance_group_manager, instance_group_manager_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceGroupManager::Representation
|
|
command.request_object = instance_group_manager_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified instance group resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group
|
|
# Name of the instance group resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::InstanceGroup] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::InstanceGroup]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_instance_group(project, region, instance_group, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/instanceGroups/{instanceGroup}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::InstanceGroup::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::InstanceGroup
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.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
|
|
|
|
# Retrieves the list of instance group resources contained within the specified
|
|
# region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RegionInstanceGroupList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RegionInstanceGroupList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_instance_groups(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/instanceGroups', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RegionInstanceGroupList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RegionInstanceGroupList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists the instances in the specified instance group and displays information
|
|
# about the named ports. Depending on the specified options, this method can
|
|
# list all instances or only the instances that are running.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group
|
|
# Name of the regional instance group for which we want to list the instances.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupsListInstancesRequest] region_instance_groups_list_instances_request_object
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RegionInstanceGroupsListInstances] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RegionInstanceGroupsListInstances]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_instance_group_instances(project, region, instance_group, region_instance_groups_list_instances_request_object = nil, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupsListInstancesRequest::Representation
|
|
command.request_object = region_instance_groups_list_instances_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::RegionInstanceGroupsListInstances::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RegionInstanceGroupsListInstances
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the named ports for the specified regional instance group.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] instance_group
|
|
# The name of the regional instance group where the named ports are updated.
|
|
# @param [Google::Apis::ComputeBeta::RegionInstanceGroupsSetNamedPortsRequest] region_instance_groups_set_named_ports_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_instance_group_named_ports(project, region, instance_group, region_instance_groups_set_named_ports_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionInstanceGroupsSetNamedPortsRequest::Representation
|
|
command.request_object = region_instance_groups_set_named_ports_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['instanceGroup'] = instance_group unless instance_group.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_region_instance_group_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified region-specific Operations resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] operation
|
|
# Name of the Operations resource to delete.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [void]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_operation(project, region, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/operations/{operation}', options)
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.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
|
|
|
|
# Retrieves the specified region-specific Operations resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] operation
|
|
# Name of the Operations resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_operation(project, region, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/operations/{operation}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.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
|
|
|
|
# Retrieves a list of Operation resources contained within the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::OperationList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::OperationList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_operations(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/operations', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::OperationList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::OperationList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified SslCertificate resource in the region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] ssl_certificate
|
|
# Name of the SslCertificate resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_ssl_certificate(project, region, ssl_certificate, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/sslCertificates/{sslCertificate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['sslCertificate'] = ssl_certificate unless ssl_certificate.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified SslCertificate resource in the specified region. Get a
|
|
# list of available SSL certificates by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] ssl_certificate
|
|
# Name of the SslCertificate resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslCertificate] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslCertificate]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_ssl_certificate(project, region, ssl_certificate, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/sslCertificates/{sslCertificate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslCertificate::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslCertificate
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['sslCertificate'] = ssl_certificate unless ssl_certificate.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
|
|
|
|
# Creates a SslCertificate resource in the specified project and region using
|
|
# the data included in the request
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::SslCertificate] ssl_certificate_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_ssl_certificate(project, region, ssl_certificate_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/sslCertificates', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SslCertificate::Representation
|
|
command.request_object = ssl_certificate_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of SslCertificate resources available to the specified
|
|
# project in the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslCertificateList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslCertificateList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_ssl_certificates(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/sslCertificates', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslCertificateList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslCertificateList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified TargetHttpProxy resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_http_proxy
|
|
# Name of the TargetHttpProxy resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_target_http_proxy(project, region, target_http_proxy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified TargetHttpProxy resource in the specified region. Gets a
|
|
# list of available target HTTP proxies by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_http_proxy
|
|
# Name of the TargetHttpProxy resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpProxy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpProxy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_target_http_proxy(project, region, target_http_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpProxy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpProxy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.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
|
|
|
|
# Creates a TargetHttpProxy resource in the specified project and region using
|
|
# the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetHttpProxy] target_http_proxy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_target_http_proxy(project, region, target_http_proxy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetHttpProxies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetHttpProxy::Representation
|
|
command.request_object = target_http_proxy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of TargetHttpProxy resources available to the specified
|
|
# project in the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpProxyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpProxyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_target_http_proxies(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetHttpProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpProxyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpProxyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Changes the URL map for TargetHttpProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_http_proxy
|
|
# Name of the TargetHttpProxy to set a URL map for.
|
|
# @param [Google::Apis::ComputeBeta::UrlMapReference] url_map_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_target_http_proxy_url_map(project, region, target_http_proxy, url_map_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMapReference::Representation
|
|
command.request_object = url_map_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified TargetHttpsProxy resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_target_https_proxy(project, region, target_https_proxy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified TargetHttpsProxy resource in the specified region. Gets
|
|
# a list of available target HTTP proxies by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpsProxy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpsProxy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_target_https_proxy(project, region, target_https_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpsProxy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpsProxy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.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
|
|
|
|
# Creates a TargetHttpsProxy resource in the specified project and region using
|
|
# the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetHttpsProxy] target_https_proxy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_target_https_proxy(project, region, target_https_proxy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetHttpsProxies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetHttpsProxy::Representation
|
|
command.request_object = target_https_proxy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of TargetHttpsProxy resources available to the specified
|
|
# project in the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpsProxyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpsProxyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_target_https_proxies(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetHttpsProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpsProxyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpsProxyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Replaces SslCertificates for TargetHttpsProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
|
|
# @param [Google::Apis::ComputeBeta::RegionTargetHttpsProxiesSetSslCertificatesRequest] region_target_https_proxies_set_ssl_certificates_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_target_https_proxy_ssl_certificates(project, region, target_https_proxy, region_target_https_proxies_set_ssl_certificates_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionTargetHttpsProxiesSetSslCertificatesRequest::Representation
|
|
command.request_object = region_target_https_proxies_set_ssl_certificates_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the URL map for TargetHttpsProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy to set a URL map for.
|
|
# @param [Google::Apis::ComputeBeta::UrlMapReference] url_map_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_region_target_https_proxy_url_map(project, region, target_https_proxy, url_map_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMapReference::Representation
|
|
command.request_object = url_map_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified UrlMap resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to delete.
|
|
# @param [String] request_id
|
|
# begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_region_url_map(project, region, url_map, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/urlMaps/{urlMap}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified UrlMap resource. Gets a list of available URL maps by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::UrlMap] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::UrlMap]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region_url_map(project, region, url_map, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/urlMaps/{urlMap}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::UrlMap
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['urlMap'] = url_map unless url_map.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
|
|
|
|
# Creates a UrlMap resource in the specified project using the data included in
|
|
# the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::UrlMap] url_map_object
|
|
# @param [String] request_id
|
|
# begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_region_url_map(project, region, url_map_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/urlMaps', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.request_object = url_map_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Initiates a cache invalidation operation, invalidating the specified path,
|
|
# scoped to the specified UrlMap.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::CacheInvalidationRule] cache_invalidation_rule_object
|
|
# @param [String] request_id
|
|
# begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def invalidate_region_url_map_cache(project, region, url_map, cache_invalidation_rule_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/urlMaps/{urlMap}/invalidateCache', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::CacheInvalidationRule::Representation
|
|
command.request_object = cache_invalidation_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of UrlMap resources available to the specified project in
|
|
# the specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::UrlMapList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::UrlMapList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_region_url_maps(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/urlMaps', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::UrlMapList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::UrlMapList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Patches the specified UrlMap resource with the data included in the request.
|
|
# This method supports PATCH semantics and uses JSON merge patch format and
|
|
# processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::UrlMap] url_map_object
|
|
# @param [String] request_id
|
|
# begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_region_url_map(project, region, url_map, url_map_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/urlMaps/{urlMap}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.request_object = url_map_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Updates the specified UrlMap resource with the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to update.
|
|
# @param [Google::Apis::ComputeBeta::UrlMap] url_map_object
|
|
# @param [String] request_id
|
|
# begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_region_url_map(project, region, url_map, url_map_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/regions/{region}/urlMaps/{urlMap}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.request_object = url_map_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Runs static validation for the UrlMap. In particular, the tests of the
|
|
# provided UrlMap will be run. Calling this method does NOT create the UrlMap.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to be validated as.
|
|
# @param [Google::Apis::ComputeBeta::RegionUrlMapsValidateRequest] region_url_maps_validate_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ValidateUrlMapsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ValidateUrlMapsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def validate_region_url_map(project, region, url_map, region_url_maps_validate_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/urlMaps/{urlMap}/validate', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionUrlMapsValidateRequest::Representation
|
|
command.request_object = region_url_maps_validate_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::ValidateUrlMapsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ValidateUrlMapsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['urlMap'] = url_map unless url_map.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
|
|
|
|
# Returns the specified Region resource. Gets a list of available regions by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Region] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Region]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_region(project, region, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Region::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Region
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['fields'] = fields unless fields.nil?
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
execute_or_queue_command(command, &block)
|
|
end
|
|
|
|
# Retrieves the list of region resources available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RegionList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RegionList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_regions(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RegionList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RegionList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Retrieves an aggregated list of reservations.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ReservationAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ReservationAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_reservation_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/reservations', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ReservationAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ReservationAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified reservation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] reservation
|
|
# Name of the reservation to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_reservation(project, zone, reservation, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/reservations/{reservation}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['reservation'] = reservation unless reservation.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves information about the specified reservation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] reservation
|
|
# Name of the reservation to retrieve.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Reservation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Reservation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_reservation(project, zone, reservation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/reservations/{reservation}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Reservation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Reservation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['reservation'] = reservation unless reservation.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_reservation_iam_policy(project, zone, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/reservations/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates a new reservation. For more information, read Reserving zonal
|
|
# resources.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [Google::Apis::ComputeBeta::Reservation] reservation_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_reservation(project, zone, reservation_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/reservations', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Reservation::Representation
|
|
command.request_object = reservation_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# A list of all the reservations that have been configured for the specified
|
|
# project in specified zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ReservationList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ReservationList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_reservations(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/reservations', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ReservationList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ReservationList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Resizes the reservation (applicable to standalone reservations only). For more
|
|
# information, read Modifying reservations.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] reservation
|
|
# Name of the reservation to update.
|
|
# @param [Google::Apis::ComputeBeta::ReservationsResizeRequest] reservations_resize_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def resize_reservation(project, zone, reservation, reservations_resize_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/reservations/{reservation}/resize', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ReservationsResizeRequest::Representation
|
|
command.request_object = reservations_resize_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['reservation'] = reservation unless reservation.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::ZoneSetPolicyRequest] zone_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_reservation_iam_policy(project, zone, resource, zone_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/reservations/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ZoneSetPolicyRequest::Representation
|
|
command.request_object = zone_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_reservation_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/reservations/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of resource policies.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ResourcePolicyAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ResourcePolicyAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_resource_policy_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/resourcePolicies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ResourcePolicyAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ResourcePolicyAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified resource policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] resource_policy
|
|
# Name of the resource policy to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_resource_policy(project, region, resource_policy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/resourcePolicies/{resourcePolicy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resourcePolicy'] = resource_policy unless resource_policy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves all information of the specified resource policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] resource_policy
|
|
# Name of the resource policy to retrieve.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ResourcePolicy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ResourcePolicy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_resource_policy(project, region, resource_policy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/resourcePolicies/{resourcePolicy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ResourcePolicy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ResourcePolicy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resourcePolicy'] = resource_policy unless resource_policy.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_resource_policy_iam_policy(project, region, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates a new resource policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::ResourcePolicy] resource_policy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_resource_policy(project, region, resource_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/resourcePolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ResourcePolicy::Representation
|
|
command.request_object = resource_policy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# A list all the resource policies that have been configured for the specified
|
|
# project in specified region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ResourcePolicyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ResourcePolicyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_resource_policies(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/resourcePolicies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ResourcePolicyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ResourcePolicyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetPolicyRequest] region_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_resource_policy_iam_policy(project, region, resource, region_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetPolicyRequest::Representation
|
|
command.request_object = region_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_resource_policy_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of routers.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RouterAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RouterAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_routers(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/routers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RouterAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RouterAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified Router resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] router
|
|
# Name of the Router resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_router(project, region, router, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/routers/{router}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['router'] = router unless router.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified Router resource. Gets a list of available routers by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] router
|
|
# Name of the Router resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Router] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Router]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_router(project, region, router, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/routers/{router}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Router::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Router
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['router'] = router unless router.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
|
|
|
|
# Retrieves runtime Nat mapping information of VM endpoints.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] router
|
|
# Name of the Router resource to query for Nat Mapping information of VM
|
|
# endpoints.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] nat_name
|
|
# Name of the nat service to filter the Nat Mapping information. If it is
|
|
# omitted, all nats for this router will be returned. Name should conform to
|
|
# RFC1035.
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VmEndpointNatMappingsList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VmEndpointNatMappingsList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_router_nat_mapping_info(project, region, router, filter: nil, max_results: nil, nat_name: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/routers/{router}/getNatMappingInfo', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VmEndpointNatMappingsList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VmEndpointNatMappingsList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['router'] = router unless router.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['natName'] = nat_name unless nat_name.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Retrieves runtime information of the specified router.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] router
|
|
# Name of the Router resource to query.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RouterStatusResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RouterStatusResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_router_status(project, region, router, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/routers/{router}/getRouterStatus', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RouterStatusResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RouterStatusResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['router'] = router unless router.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
|
|
|
|
# Creates a Router resource in the specified project and region using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::Router] router_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_router(project, region, router_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/routers', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Router::Representation
|
|
command.request_object = router_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of Router resources available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RouterList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RouterList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_routers(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/routers', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RouterList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RouterList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Patches the specified Router resource with the data included in the request.
|
|
# This method supports PATCH semantics and uses JSON merge patch format and
|
|
# processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] router
|
|
# Name of the Router resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::Router] router_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_router(project, region, router, router_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/routers/{router}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Router::Representation
|
|
command.request_object = router_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['router'] = router unless router.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Preview fields auto-generated during router create and update operations.
|
|
# Calling this method does NOT create or update the router.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] router
|
|
# Name of the Router resource to query.
|
|
# @param [Google::Apis::ComputeBeta::Router] router_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RoutersPreviewResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RoutersPreviewResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def preview_router(project, region, router, router_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/routers/{router}/preview', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Router::Representation
|
|
command.request_object = router_object
|
|
command.response_representation = Google::Apis::ComputeBeta::RoutersPreviewResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RoutersPreviewResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['router'] = router unless router.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_router_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/routers/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the specified Router resource with the data included in the request.
|
|
# This method conforms to PUT semantics, which requests that the state of the
|
|
# target resource be created or replaced with the state defined by the
|
|
# representation enclosed in the request message payload.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] router
|
|
# Name of the Router resource to update.
|
|
# @param [Google::Apis::ComputeBeta::Router] router_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_router(project, region, router, router_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/regions/{region}/routers/{router}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Router::Representation
|
|
command.request_object = router_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['router'] = router unless router.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Deletes the specified Route resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] route
|
|
# Name of the Route resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_route(project, route, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/routes/{route}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['route'] = route unless route.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified Route resource. Gets a list of available routes by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] route
|
|
# Name of the Route resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Route] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Route]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_route(project, route, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/routes/{route}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Route::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Route
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['route'] = route unless route.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
|
|
|
|
# Creates a Route resource in the specified project using the data included in
|
|
# the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::Route] route_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_route(project, route_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/routes', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Route::Representation
|
|
command.request_object = route_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of Route resources available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::RouteList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::RouteList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_routes(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/routes', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::RouteList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::RouteList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_route_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/routes/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Inserts a rule into a security policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] security_policy
|
|
# Name of the security policy to update.
|
|
# @param [Google::Apis::ComputeBeta::SecurityPolicyRule] security_policy_rule_object
|
|
# @param [Boolean] validate_only
|
|
# If true, the request will not be committed.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_security_policy_rule(project, security_policy, security_policy_rule_object = nil, validate_only: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/addRule', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SecurityPolicyRule::Representation
|
|
command.request_object = security_policy_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['securityPolicy'] = security_policy unless security_policy.nil?
|
|
command.query['validateOnly'] = validate_only unless validate_only.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
|
|
|
|
# Deletes the specified policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] security_policy
|
|
# Name of the security policy to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_security_policy(project, security_policy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/securityPolicies/{securityPolicy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['securityPolicy'] = security_policy unless security_policy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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 all of the ordered rules present in a single specified policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] security_policy
|
|
# Name of the security policy to get.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SecurityPolicy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SecurityPolicy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_security_policy(project, security_policy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/securityPolicies/{securityPolicy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SecurityPolicy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SecurityPolicy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['securityPolicy'] = security_policy unless security_policy.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
|
|
|
|
# Gets a rule at the specified priority.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] security_policy
|
|
# Name of the security policy to which the queried rule belongs.
|
|
# @param [Fixnum] priority
|
|
# The priority of the rule to get from the security policy.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SecurityPolicyRule] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SecurityPolicyRule]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_security_policy_rule(project, security_policy, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/securityPolicies/{securityPolicy}/getRule', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SecurityPolicyRule::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SecurityPolicyRule
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['securityPolicy'] = security_policy unless security_policy.nil?
|
|
command.query['priority'] = priority unless priority.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
|
|
|
|
# Creates a new policy in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::SecurityPolicy] security_policy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [Boolean] validate_only
|
|
# If true, the request will not be committed.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_security_policy(project, security_policy_object = nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/securityPolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SecurityPolicy::Representation
|
|
command.request_object = security_policy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.nil?
|
|
command.query['validateOnly'] = validate_only unless validate_only.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 all the policies that have been configured for the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SecurityPolicyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SecurityPolicyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_security_policies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/securityPolicies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SecurityPolicyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SecurityPolicyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Gets the current list of preconfigured Web Application Firewall (WAF)
|
|
# expressions.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SecurityPoliciesListPreconfiguredExpressionSetsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SecurityPoliciesListPreconfiguredExpressionSetsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_security_policy_preconfigured_expression_sets(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/securityPolicies/listPreconfiguredExpressionSets', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SecurityPoliciesListPreconfiguredExpressionSetsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SecurityPoliciesListPreconfiguredExpressionSetsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Patches the specified policy with the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] security_policy
|
|
# Name of the security policy to update.
|
|
# @param [Google::Apis::ComputeBeta::SecurityPolicy] security_policy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_security_policy(project, security_policy, security_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/securityPolicies/{securityPolicy}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SecurityPolicy::Representation
|
|
command.request_object = security_policy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['securityPolicy'] = security_policy unless security_policy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Patches a rule at the specified priority.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] security_policy
|
|
# Name of the security policy to update.
|
|
# @param [Google::Apis::ComputeBeta::SecurityPolicyRule] security_policy_rule_object
|
|
# @param [Fixnum] priority
|
|
# The priority of the rule to patch.
|
|
# @param [Boolean] validate_only
|
|
# If true, the request will not be committed.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_security_policy_rule(project, security_policy, security_policy_rule_object = nil, priority: nil, validate_only: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/patchRule', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SecurityPolicyRule::Representation
|
|
command.request_object = security_policy_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['securityPolicy'] = security_policy unless security_policy.nil?
|
|
command.query['priority'] = priority unless priority.nil?
|
|
command.query['validateOnly'] = validate_only unless validate_only.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
|
|
|
|
# Deletes a rule at the specified priority.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] security_policy
|
|
# Name of the security policy to update.
|
|
# @param [Fixnum] priority
|
|
# The priority of the rule to remove from the security policy.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def remove_security_policy_rule(project, security_policy, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/removeRule', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['securityPolicy'] = security_policy unless security_policy.nil?
|
|
command.query['priority'] = priority unless priority.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
|
|
|
|
# Sets the labels on a security policy. To learn more about labels, read the
|
|
# Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetLabelsRequest] global_set_labels_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_security_policy_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/securityPolicies/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetLabelsRequest::Representation
|
|
command.request_object = global_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_security_policy_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/securityPolicies/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified Snapshot resource. Keep in mind that deleting a single
|
|
# snapshot might not necessarily delete all the data on that snapshot. If any
|
|
# data on the snapshot that is marked for deletion is needed for subsequent
|
|
# snapshots, the data will be moved to the next corresponding snapshot.
|
|
# For more information, see Deleting snapshots.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] snapshot
|
|
# Name of the Snapshot resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_snapshot(project, snapshot, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/snapshots/{snapshot}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['snapshot'] = snapshot unless snapshot.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified Snapshot resource. Gets a list of available snapshots by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] snapshot
|
|
# Name of the Snapshot resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Snapshot] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Snapshot]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_snapshot(project, snapshot, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/snapshots/{snapshot}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Snapshot::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Snapshot
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['snapshot'] = snapshot unless snapshot.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_snapshot_iam_policy(project, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/snapshots/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Retrieves the list of Snapshot resources contained within the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SnapshotList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SnapshotList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_snapshots(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/snapshots', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SnapshotList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SnapshotList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetPolicyRequest] global_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_snapshot_iam_policy(project, resource, global_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/snapshots/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetPolicyRequest::Representation
|
|
command.request_object = global_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Sets the labels on a snapshot. To learn more about labels, read the Labeling
|
|
# Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::GlobalSetLabelsRequest] global_set_labels_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_snapshot_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/snapshots/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::GlobalSetLabelsRequest::Representation
|
|
command.request_object = global_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_snapshot_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/snapshots/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves the list of all SslCertificate resources, regional and global,
|
|
# available to the specified project.
|
|
# @param [String] project
|
|
# Name of the project scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslCertificateAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslCertificateAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_ssl_certificate_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/sslCertificates', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslCertificateAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslCertificateAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified SslCertificate resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] ssl_certificate
|
|
# Name of the SslCertificate resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_ssl_certificate(project, ssl_certificate, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/sslCertificates/{sslCertificate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['sslCertificate'] = ssl_certificate unless ssl_certificate.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified SslCertificate resource. Gets a list of available SSL
|
|
# certificates by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] ssl_certificate
|
|
# Name of the SslCertificate resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslCertificate] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslCertificate]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_ssl_certificate(project, ssl_certificate, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/sslCertificates/{sslCertificate}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslCertificate::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslCertificate
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['sslCertificate'] = ssl_certificate unless ssl_certificate.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
|
|
|
|
# Creates a SslCertificate resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::SslCertificate] ssl_certificate_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_ssl_certificate(project, ssl_certificate_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/sslCertificates', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SslCertificate::Representation
|
|
command.request_object = ssl_certificate_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of SslCertificate resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslCertificateList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslCertificateList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_ssl_certificates(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/sslCertificates', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslCertificateList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslCertificateList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_ssl_certificate_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/sslCertificates/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified SSL policy. The SSL policy resource can be deleted only
|
|
# if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] ssl_policy
|
|
# Name of the SSL policy to delete. The name must be 1-63 characters long, and
|
|
# comply with RFC1035.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_ssl_policy(project, ssl_policy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/sslPolicies/{sslPolicy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['sslPolicy'] = ssl_policy unless ssl_policy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Lists all of the ordered rules present in a single specified policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] ssl_policy
|
|
# Name of the SSL policy to update. The name must be 1-63 characters long, and
|
|
# comply with RFC1035.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslPolicy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslPolicy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_ssl_policy(project, ssl_policy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/sslPolicies/{sslPolicy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslPolicy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslPolicy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['sslPolicy'] = ssl_policy unless ssl_policy.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
|
|
|
|
# Returns the specified SSL policy resource. Gets a list of available SSL
|
|
# policies by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::SslPolicy] ssl_policy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_ssl_policy(project, ssl_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/sslPolicies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SslPolicy::Representation
|
|
command.request_object = ssl_policy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Lists all the SSL policies that have been configured for the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslPoliciesList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslPoliciesList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_ssl_policies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/sslPolicies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslPoliciesList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslPoliciesList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Lists all features that can be specified in the SSL policy when using custom
|
|
# profile.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SslPoliciesListAvailableFeaturesResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SslPoliciesListAvailableFeaturesResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_ssl_policy_available_features(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/sslPolicies/listAvailableFeatures', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SslPoliciesListAvailableFeaturesResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SslPoliciesListAvailableFeaturesResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Patches the specified SSL policy with the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] ssl_policy
|
|
# Name of the SSL policy to update. The name must be 1-63 characters long, and
|
|
# comply with RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::SslPolicy] ssl_policy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_ssl_policy(project, ssl_policy, ssl_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/sslPolicies/{sslPolicy}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SslPolicy::Representation
|
|
command.request_object = ssl_policy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['sslPolicy'] = ssl_policy unless ssl_policy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_ssl_policy_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/sslPolicies/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of subnetworks.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SubnetworkAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SubnetworkAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_subnetworks(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/subnetworks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SubnetworkAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SubnetworkAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified subnetwork.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] subnetwork
|
|
# Name of the Subnetwork resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_subnetwork(project, region, subnetwork, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/subnetworks/{subnetwork}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['subnetwork'] = subnetwork unless subnetwork.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Expands the IP CIDR range of the subnetwork to a specified value.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] subnetwork
|
|
# Name of the Subnetwork resource to update.
|
|
# @param [Google::Apis::ComputeBeta::SubnetworksExpandIpCidrRangeRequest] subnetworks_expand_ip_cidr_range_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def expand_subnetwork_ip_cidr_range(project, region, subnetwork, subnetworks_expand_ip_cidr_range_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SubnetworksExpandIpCidrRangeRequest::Representation
|
|
command.request_object = subnetworks_expand_ip_cidr_range_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['subnetwork'] = subnetwork unless subnetwork.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified subnetwork. Gets a list of available subnetworks list()
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] subnetwork
|
|
# Name of the Subnetwork resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Subnetwork] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Subnetwork]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_subnetwork(project, region, subnetwork, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/subnetworks/{subnetwork}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Subnetwork::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Subnetwork
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['subnetwork'] = subnetwork unless subnetwork.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
|
|
|
|
# Gets the access control policy for a resource. May be empty if no such policy
|
|
# or resource exists.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Fixnum] options_requested_policy_version
|
|
# Requested IAM Policy version.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_subnetwork_iam_policy(project, region, resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/subnetworks/{resource}/getIamPolicy', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
|
|
|
|
# Creates a subnetwork in the specified project using the data included in the
|
|
# request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::Subnetwork] subnetwork_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_subnetwork(project, region, subnetwork_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/subnetworks', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Subnetwork::Representation
|
|
command.request_object = subnetwork_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of subnetworks available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::SubnetworkList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::SubnetworkList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_subnetworks(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/subnetworks', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::SubnetworkList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::SubnetworkList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Retrieves an aggregated list of all usable subnetworks in the project. The
|
|
# list contains all of the subnetworks in the project and the subnetworks that
|
|
# were shared by a Shared VPC host project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::UsableSubnetworksAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::UsableSubnetworksAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_subnetwork_usable(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/subnetworks/listUsable', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::UsableSubnetworksAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::UsableSubnetworksAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Patches the specified subnetwork with the data included in the request. Only
|
|
# certain fields can up updated with a patch request as indicated in the field
|
|
# descriptions. You must specify the current fingeprint of the subnetwork
|
|
# resource being patched.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] subnetwork
|
|
# Name of the Subnetwork resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::Subnetwork] subnetwork_object
|
|
# @param [Fixnum] drain_timeout_seconds
|
|
# The drain timeout specifies the upper bound in seconds on the amount of time
|
|
# allowed to drain connections from the current ACTIVE subnetwork to the current
|
|
# BACKUP subnetwork. The drain timeout is only applicable when the following
|
|
# conditions are true: - the subnetwork being patched has purpose =
|
|
# INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP -
|
|
# the patch request is setting the role to ACTIVE. Note that after this patch
|
|
# operation the roles of the ACTIVE and BACKUP subnetworks will be swapped.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_subnetwork(project, region, subnetwork, subnetwork_object = nil, drain_timeout_seconds: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/regions/{region}/subnetworks/{subnetwork}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::Subnetwork::Representation
|
|
command.request_object = subnetwork_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['subnetwork'] = subnetwork unless subnetwork.nil?
|
|
command.query['drainTimeoutSeconds'] = drain_timeout_seconds unless drain_timeout_seconds.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the access control policy on the specified resource. Replaces any
|
|
# existing policy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetPolicyRequest] region_set_policy_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Policy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Policy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_subnetwork_iam_policy(project, region, resource, region_set_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/subnetworks/{resource}/setIamPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetPolicyRequest::Representation
|
|
command.request_object = region_set_policy_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Policy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Policy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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 whether VMs in this subnet can access Google services without assigning
|
|
# external IP addresses through Private Google Access.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] subnetwork
|
|
# Name of the Subnetwork resource.
|
|
# @param [Google::Apis::ComputeBeta::SubnetworksSetPrivateIpGoogleAccessRequest] subnetworks_set_private_ip_google_access_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_subnetwork_private_ip_google_access(project, region, subnetwork, subnetworks_set_private_ip_google_access_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SubnetworksSetPrivateIpGoogleAccessRequest::Representation
|
|
command.request_object = subnetworks_set_private_ip_google_access_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['subnetwork'] = subnetwork unless subnetwork.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_subnetwork_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/subnetworks/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves the list of all TargetHttpProxy resources, regional and global,
|
|
# available to the specified project.
|
|
# @param [String] project
|
|
# Name of the project scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpProxyAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpProxyAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_target_http_proxy_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/targetHttpProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpProxyAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpProxyAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified TargetHttpProxy resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_http_proxy
|
|
# Name of the TargetHttpProxy resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_target_http_proxy(project, target_http_proxy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/targetHttpProxies/{targetHttpProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified TargetHttpProxy resource. Gets a list of available
|
|
# target HTTP proxies by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_http_proxy
|
|
# Name of the TargetHttpProxy resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpProxy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpProxy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_http_proxy(project, target_http_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetHttpProxies/{targetHttpProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpProxy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpProxy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.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
|
|
|
|
# Creates a TargetHttpProxy resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetHttpProxy] target_http_proxy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_target_http_proxy(project, target_http_proxy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetHttpProxies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetHttpProxy::Representation
|
|
command.request_object = target_http_proxy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of TargetHttpProxy resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpProxyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpProxyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_target_http_proxies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetHttpProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpProxyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpProxyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Changes the URL map for TargetHttpProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_http_proxy
|
|
# Name of the TargetHttpProxy to set a URL map for.
|
|
# @param [Google::Apis::ComputeBeta::UrlMapReference] url_map_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_http_proxy_url_map(project, target_http_proxy, url_map_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMapReference::Representation
|
|
command.request_object = url_map_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_target_http_proxy_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetHttpProxies/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves the list of all TargetHttpsProxy resources, regional and global,
|
|
# available to the specified project.
|
|
# @param [String] project
|
|
# Name of the project scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpsProxyAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpsProxyAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_target_https_proxy_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/targetHttpsProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpsProxyAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpsProxyAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified TargetHttpsProxy resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_target_https_proxy(project, target_https_proxy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/targetHttpsProxies/{targetHttpsProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified TargetHttpsProxy resource. Gets a list of available
|
|
# target HTTPS proxies by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpsProxy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpsProxy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_https_proxy(project, target_https_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetHttpsProxies/{targetHttpsProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpsProxy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpsProxy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.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
|
|
|
|
# Creates a TargetHttpsProxy resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetHttpsProxy] target_https_proxy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_target_https_proxy(project, target_https_proxy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetHttpsProxies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetHttpsProxy::Representation
|
|
command.request_object = target_https_proxy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of TargetHttpsProxy resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetHttpsProxyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetHttpsProxyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_target_https_proxies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetHttpsProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetHttpsProxyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetHttpsProxyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the QUIC override policy for TargetHttpsProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource to set the QUIC override policy for. The
|
|
# name should conform to RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::TargetHttpsProxiesSetQuicOverrideRequest] target_https_proxies_set_quic_override_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_https_proxy_quic_override(project, target_https_proxy, target_https_proxies_set_quic_override_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetHttpsProxiesSetQuicOverrideRequest::Representation
|
|
command.request_object = target_https_proxies_set_quic_override_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Replaces SslCertificates for TargetHttpsProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
|
|
# @param [Google::Apis::ComputeBeta::TargetHttpsProxiesSetSslCertificatesRequest] target_https_proxies_set_ssl_certificates_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_https_proxy_ssl_certificates(project, target_https_proxy, target_https_proxies_set_ssl_certificates_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetHttpsProxiesSetSslCertificatesRequest::Representation
|
|
command.request_object = target_https_proxies_set_ssl_certificates_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-
|
|
# side support for SSL features. This affects connections between clients and
|
|
# the HTTPS proxy load balancer. They do not affect the connection between the
|
|
# load balancer and the backends.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name
|
|
# must be 1-63 characters long, and comply with RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::SslPolicyReference] ssl_policy_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_https_proxy_ssl_policy(project, target_https_proxy, ssl_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SslPolicyReference::Representation
|
|
command.request_object = ssl_policy_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the URL map for TargetHttpsProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_https_proxy
|
|
# Name of the TargetHttpsProxy resource whose URL map is to be set.
|
|
# @param [Google::Apis::ComputeBeta::UrlMapReference] url_map_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_https_proxy_url_map(project, target_https_proxy, url_map_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMapReference::Representation
|
|
command.request_object = url_map_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_target_https_proxy_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetHttpsProxies/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves an aggregated list of target instances.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetInstanceAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetInstanceAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_target_instance(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/targetInstances', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetInstanceAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetInstanceAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified TargetInstance resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone scoping this request.
|
|
# @param [String] target_instance
|
|
# Name of the TargetInstance resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_target_instance(project, zone, target_instance, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/targetInstances/{targetInstance}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['targetInstance'] = target_instance unless target_instance.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified TargetInstance resource. Gets a list of available target
|
|
# instances by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone scoping this request.
|
|
# @param [String] target_instance
|
|
# Name of the TargetInstance resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetInstance] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetInstance]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_instance(project, zone, target_instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/targetInstances/{targetInstance}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetInstance::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetInstance
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['targetInstance'] = target_instance unless target_instance.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
|
|
|
|
# Creates a TargetInstance resource in the specified project and zone using the
|
|
# data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetInstance] target_instance_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_target_instance(project, zone, target_instance_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/targetInstances', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetInstance::Representation
|
|
command.request_object = target_instance_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of TargetInstance resources available to the specified
|
|
# project and zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetInstanceList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetInstanceList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_target_instances(project, zone, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}/targetInstances', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetInstanceList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetInstanceList
|
|
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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# The name of the zone for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_target_instance_iam_permissions(project, zone, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['zone'] = zone unless zone.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Adds health check URLs to a target pool.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_pool
|
|
# Name of the target pool to add a health check to.
|
|
# @param [Google::Apis::ComputeBeta::AddTargetPoolsHealthCheckRequest] add_target_pools_health_check_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_target_pool_health_check(project, region, target_pool, add_target_pools_health_check_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::AddTargetPoolsHealthCheckRequest::Representation
|
|
command.request_object = add_target_pools_health_check_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Adds an instance to a target pool.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_pool
|
|
# Name of the TargetPool resource to add instances to.
|
|
# @param [Google::Apis::ComputeBeta::AddTargetPoolsInstanceRequest] add_target_pools_instance_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def add_target_pool_instance(project, region, target_pool, add_target_pools_instance_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools/{targetPool}/addInstance', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::AddTargetPoolsInstanceRequest::Representation
|
|
command.request_object = add_target_pools_instance_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of target pools.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetPoolAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetPoolAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_target_pools(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/targetPools', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetPoolAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetPoolAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified target pool.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_pool
|
|
# Name of the TargetPool resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_target_pool(project, region, target_pool, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/targetPools/{targetPool}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified target pool. Gets a list of available target pools by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_pool
|
|
# Name of the TargetPool resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetPool] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetPool]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_pool(project, region, target_pool, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetPools/{targetPool}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetPool::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetPool
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.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
|
|
|
|
# Gets the most recent health check results for each IP for the instance that is
|
|
# referenced by the given target pool.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_pool
|
|
# Name of the TargetPool resource to which the queried instance belongs.
|
|
# @param [Google::Apis::ComputeBeta::InstanceReference] instance_reference_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetPoolInstanceHealth] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetPoolInstanceHealth]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_pool_health(project, region, target_pool, instance_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools/{targetPool}/getHealth', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::InstanceReference::Representation
|
|
command.request_object = instance_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetPoolInstanceHealth::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetPoolInstanceHealth
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.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
|
|
|
|
# Creates a target pool in the specified project and region using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetPool] target_pool_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_target_pool(project, region, target_pool_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetPool::Representation
|
|
command.request_object = target_pool_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of target pools available to the specified project and region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetPoolList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetPoolList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_target_pools(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetPools', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetPoolList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetPoolList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Removes health check URL from a target pool.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] target_pool
|
|
# Name of the target pool to remove health checks from.
|
|
# @param [Google::Apis::ComputeBeta::RemoveTargetPoolsHealthCheckRequest] remove_target_pools_health_check_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def remove_target_pool_health_check(project, region, target_pool, remove_target_pools_health_check_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RemoveTargetPoolsHealthCheckRequest::Representation
|
|
command.request_object = remove_target_pools_health_check_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Removes instance URL from a target pool.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_pool
|
|
# Name of the TargetPool resource to remove instances from.
|
|
# @param [Google::Apis::ComputeBeta::RemoveTargetPoolsInstanceRequest] remove_target_pools_instance_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def remove_target_pool_instance(project, region, target_pool, remove_target_pools_instance_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools/{targetPool}/removeInstance', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RemoveTargetPoolsInstanceRequest::Representation
|
|
command.request_object = remove_target_pools_instance_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes a backup target pool's configurations.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region scoping this request.
|
|
# @param [String] target_pool
|
|
# Name of the TargetPool resource to set a backup pool for.
|
|
# @param [Google::Apis::ComputeBeta::TargetReference] target_reference_object
|
|
# @param [Float] failover_ratio
|
|
# New failoverRatio value for the target pool.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_pool_backup(project, region, target_pool, target_reference_object = nil, failover_ratio: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools/{targetPool}/setBackup', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetReference::Representation
|
|
command.request_object = target_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetPool'] = target_pool unless target_pool.nil?
|
|
command.query['failoverRatio'] = failover_ratio unless failover_ratio.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_target_pool_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetPools/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified TargetSslProxy resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_ssl_proxy
|
|
# Name of the TargetSslProxy resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_target_ssl_proxy(project, target_ssl_proxy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/targetSslProxies/{targetSslProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified TargetSslProxy resource. Gets a list of available target
|
|
# SSL proxies by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_ssl_proxy
|
|
# Name of the TargetSslProxy resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetSslProxy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetSslProxy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_ssl_proxy(project, target_ssl_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetSslProxies/{targetSslProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetSslProxy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetSslProxy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.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
|
|
|
|
# Creates a TargetSslProxy resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetSslProxy] target_ssl_proxy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_target_ssl_proxy(project, target_ssl_proxy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetSslProxies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetSslProxy::Representation
|
|
command.request_object = target_ssl_proxy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of TargetSslProxy resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetSslProxyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetSslProxyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_target_ssl_proxies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetSslProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetSslProxyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetSslProxyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Changes the BackendService for TargetSslProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_ssl_proxy
|
|
# Name of the TargetSslProxy resource whose BackendService resource is to be set.
|
|
# @param [Google::Apis::ComputeBeta::TargetSslProxiesSetBackendServiceRequest] target_ssl_proxies_set_backend_service_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_ssl_proxy_backend_service(project, target_ssl_proxy, target_ssl_proxies_set_backend_service_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetSslProxies/{targetSslProxy}/setBackendService', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetSslProxiesSetBackendServiceRequest::Representation
|
|
command.request_object = target_ssl_proxies_set_backend_service_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the ProxyHeaderType for TargetSslProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_ssl_proxy
|
|
# Name of the TargetSslProxy resource whose ProxyHeader is to be set.
|
|
# @param [Google::Apis::ComputeBeta::TargetSslProxiesSetProxyHeaderRequest] target_ssl_proxies_set_proxy_header_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_ssl_proxy_proxy_header(project, target_ssl_proxy, target_ssl_proxies_set_proxy_header_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetSslProxiesSetProxyHeaderRequest::Representation
|
|
command.request_object = target_ssl_proxies_set_proxy_header_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes SslCertificates for TargetSslProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_ssl_proxy
|
|
# Name of the TargetSslProxy resource whose SslCertificate resource is to be set.
|
|
# @param [Google::Apis::ComputeBeta::TargetSslProxiesSetSslCertificatesRequest] target_ssl_proxies_set_ssl_certificates_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_ssl_proxy_ssl_certificates(project, target_ssl_proxy, target_ssl_proxies_set_ssl_certificates_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetSslProxiesSetSslCertificatesRequest::Representation
|
|
command.request_object = target_ssl_proxies_set_ssl_certificates_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-
|
|
# side support for SSL features. This affects connections between clients and
|
|
# the SSL proxy load balancer. They do not affect the connection between the
|
|
# load balancer and the backends.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_ssl_proxy
|
|
# Name of the TargetSslProxy resource whose SSL policy is to be set. The name
|
|
# must be 1-63 characters long, and comply with RFC1035.
|
|
# @param [Google::Apis::ComputeBeta::SslPolicyReference] ssl_policy_reference_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_ssl_proxy_ssl_policy(project, target_ssl_proxy, ssl_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::SslPolicyReference::Representation
|
|
command.request_object = ssl_policy_reference_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_target_ssl_proxy_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetSslProxies/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified TargetTcpProxy resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_tcp_proxy
|
|
# Name of the TargetTcpProxy resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_target_tcp_proxy(project, target_tcp_proxy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/targetTcpProxies/{targetTcpProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetTcpProxy'] = target_tcp_proxy unless target_tcp_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified TargetTcpProxy resource. Gets a list of available target
|
|
# TCP proxies by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_tcp_proxy
|
|
# Name of the TargetTcpProxy resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetTcpProxy] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetTcpProxy]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_tcp_proxy(project, target_tcp_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetTcpProxies/{targetTcpProxy}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetTcpProxy::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetTcpProxy
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetTcpProxy'] = target_tcp_proxy unless target_tcp_proxy.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
|
|
|
|
# Creates a TargetTcpProxy resource in the specified project using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetTcpProxy] target_tcp_proxy_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_target_tcp_proxy(project, target_tcp_proxy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetTcpProxies', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetTcpProxy::Representation
|
|
command.request_object = target_tcp_proxy_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of TargetTcpProxy resources available to the specified
|
|
# project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetTcpProxyList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetTcpProxyList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_target_tcp_proxies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/targetTcpProxies', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetTcpProxyList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetTcpProxyList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Changes the BackendService for TargetTcpProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_tcp_proxy
|
|
# Name of the TargetTcpProxy resource whose BackendService resource is to be set.
|
|
# @param [Google::Apis::ComputeBeta::TargetTcpProxiesSetBackendServiceRequest] target_tcp_proxies_set_backend_service_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_tcp_proxy_backend_service(project, target_tcp_proxy, target_tcp_proxies_set_backend_service_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetTcpProxiesSetBackendServiceRequest::Representation
|
|
command.request_object = target_tcp_proxies_set_backend_service_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetTcpProxy'] = target_tcp_proxy unless target_tcp_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Changes the ProxyHeaderType for TargetTcpProxy.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] target_tcp_proxy
|
|
# Name of the TargetTcpProxy resource whose ProxyHeader is to be set.
|
|
# @param [Google::Apis::ComputeBeta::TargetTcpProxiesSetProxyHeaderRequest] target_tcp_proxies_set_proxy_header_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_tcp_proxy_proxy_header(project, target_tcp_proxy, target_tcp_proxies_set_proxy_header_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetTcpProxiesSetProxyHeaderRequest::Representation
|
|
command.request_object = target_tcp_proxies_set_proxy_header_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['targetTcpProxy'] = target_tcp_proxy unless target_tcp_proxy.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of target VPN gateways.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetVpnGatewayAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetVpnGatewayAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_target_vpn_gateways(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/targetVpnGateways', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetVpnGatewayAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetVpnGatewayAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified target VPN gateway.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] target_vpn_gateway
|
|
# Name of the target VPN gateway to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_target_vpn_gateway(project, region, target_vpn_gateway, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetVpnGateway'] = target_vpn_gateway unless target_vpn_gateway.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified target VPN gateway. Gets a list of available target VPN
|
|
# gateways by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] target_vpn_gateway
|
|
# Name of the target VPN gateway to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetVpnGateway] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetVpnGateway]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_target_vpn_gateway(project, region, target_vpn_gateway, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetVpnGateway::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetVpnGateway
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['targetVpnGateway'] = target_vpn_gateway unless target_vpn_gateway.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
|
|
|
|
# Creates a target VPN gateway in the specified project and region using the
|
|
# data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::TargetVpnGateway] target_vpn_gateway_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_target_vpn_gateway(project, region, target_vpn_gateway_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetVpnGateways', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TargetVpnGateway::Representation
|
|
command.request_object = target_vpn_gateway_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of target VPN gateways available to the specified project and
|
|
# region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TargetVpnGatewayList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TargetVpnGatewayList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_target_vpn_gateways(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/targetVpnGateways', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::TargetVpnGatewayList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TargetVpnGatewayList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the labels on a TargetVpnGateway. To learn more about labels, read the
|
|
# Labeling Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_target_vpn_gateway_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetVpnGateways/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation
|
|
command.request_object = region_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_target_vpn_gateway_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Retrieves the list of all UrlMap resources, regional and global, available to
|
|
# the specified project.
|
|
# @param [String] project
|
|
# Name of the project scoping this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::UrlMapsAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::UrlMapsAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_url_map_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/urlMaps', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::UrlMapsAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::UrlMapsAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified UrlMap resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_url_map(project, url_map, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/global/urlMaps/{urlMap}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified UrlMap resource. Gets a list of available URL maps by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::UrlMap] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::UrlMap]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_url_map(project, url_map, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/urlMaps/{urlMap}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::UrlMap
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['urlMap'] = url_map unless url_map.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
|
|
|
|
# Creates a UrlMap resource in the specified project using the data included in
|
|
# the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [Google::Apis::ComputeBeta::UrlMap] url_map_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_url_map(project, url_map_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/urlMaps', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.request_object = url_map_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Initiates a cache invalidation operation, invalidating the specified path,
|
|
# scoped to the specified UrlMap.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap scoping this request.
|
|
# @param [Google::Apis::ComputeBeta::CacheInvalidationRule] cache_invalidation_rule_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def invalidate_url_map_cache(project, url_map, cache_invalidation_rule_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/urlMaps/{urlMap}/invalidateCache', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::CacheInvalidationRule::Representation
|
|
command.request_object = cache_invalidation_rule_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves the list of UrlMap resources available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::UrlMapList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::UrlMapList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_url_maps(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/global/urlMaps', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::UrlMapList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::UrlMapList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Patches the specified UrlMap resource with the data included in the request.
|
|
# This method supports PATCH semantics and uses the JSON merge patch format and
|
|
# processing rules.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to patch.
|
|
# @param [Google::Apis::ComputeBeta::UrlMap] url_map_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def patch_url_map(project, url_map, url_map_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:patch, '{project}/global/urlMaps/{urlMap}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.request_object = url_map_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_url_map_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/urlMaps/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Updates the specified UrlMap resource with the data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to update.
|
|
# @param [Google::Apis::ComputeBeta::UrlMap] url_map_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def update_url_map(project, url_map, url_map_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:put, '{project}/global/urlMaps/{urlMap}', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::UrlMap::Representation
|
|
command.request_object = url_map_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['urlMap'] = url_map unless url_map.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Runs static validation for the UrlMap. In particular, the tests of the
|
|
# provided UrlMap will be run. Calling this method does NOT create the UrlMap.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] url_map
|
|
# Name of the UrlMap resource to be validated as.
|
|
# @param [Google::Apis::ComputeBeta::ValidateUrlMapsRequest] validate_url_maps_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ValidateUrlMapsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ValidateUrlMapsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def validate_url_map(project, url_map, validate_url_maps_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/global/urlMaps/{urlMap}/validate', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::ValidateUrlMapsRequest::Representation
|
|
command.request_object = validate_url_maps_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::ValidateUrlMapsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ValidateUrlMapsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['urlMap'] = url_map unless url_map.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
|
|
|
|
# Retrieves an aggregated list of VPN gateways.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VpnGatewayAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VpnGatewayAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def aggregated_vpn_gateway_list(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/vpnGateways', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VpnGatewayAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VpnGatewayAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified VPN gateway.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] vpn_gateway
|
|
# Name of the VPN gateway to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_vpn_gateway(project, region, vpn_gateway, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/vpnGateways/{vpnGateway}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['vpnGateway'] = vpn_gateway unless vpn_gateway.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified VPN gateway. Gets a list of available VPN gateways by
|
|
# making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] vpn_gateway
|
|
# Name of the VPN gateway to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VpnGateway] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VpnGateway]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_vpn_gateway(project, region, vpn_gateway, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/vpnGateways/{vpnGateway}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VpnGateway::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VpnGateway
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['vpnGateway'] = vpn_gateway unless vpn_gateway.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
|
|
|
|
# Returns the status for the specified VPN gateway.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] vpn_gateway
|
|
# Name of the VPN gateway to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VpnGatewaysGetStatusResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VpnGatewaysGetStatusResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_vpn_gateway_status(project, region, vpn_gateway, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VpnGatewaysGetStatusResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VpnGatewaysGetStatusResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['vpnGateway'] = vpn_gateway unless vpn_gateway.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
|
|
|
|
# Creates a VPN gateway in the specified project and region using the data
|
|
# included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::VpnGateway] vpn_gateway_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_vpn_gateway(project, region, vpn_gateway_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/vpnGateways', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::VpnGateway::Representation
|
|
command.request_object = vpn_gateway_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of VPN gateways available to the specified project and region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VpnGatewayList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VpnGatewayList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_vpn_gateways(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/vpnGateways', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VpnGatewayList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VpnGatewayList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the labels on a VpnGateway. To learn more about labels, read the Labeling
|
|
# Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_vpn_gateway_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/vpnGateways/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation
|
|
command.request_object = region_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves an aggregated list of VPN tunnels.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VpnTunnelAggregatedList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VpnTunnelAggregatedList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_aggregated_vpn_tunnel(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/aggregated/vpnTunnels', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VpnTunnelAggregatedList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VpnTunnelAggregatedList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Deletes the specified VpnTunnel resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] vpn_tunnel
|
|
# Name of the VpnTunnel resource to delete.
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_vpn_tunnel(project, region, vpn_tunnel, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/regions/{region}/vpnTunnels/{vpnTunnel}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['vpnTunnel'] = vpn_tunnel unless vpn_tunnel.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels
|
|
# by making a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] vpn_tunnel
|
|
# Name of the VpnTunnel resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VpnTunnel] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VpnTunnel]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_vpn_tunnel(project, region, vpn_tunnel, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/vpnTunnels/{vpnTunnel}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VpnTunnel::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VpnTunnel
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['vpnTunnel'] = vpn_tunnel unless vpn_tunnel.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
|
|
|
|
# Creates a VpnTunnel resource in the specified project and region using the
|
|
# data included in the request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [Google::Apis::ComputeBeta::VpnTunnel] vpn_tunnel_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def insert_vpn_tunnel(project, region, vpn_tunnel_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/vpnTunnels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::VpnTunnel::Representation
|
|
command.request_object = vpn_tunnel_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Retrieves a list of VpnTunnel resources contained in the specified project and
|
|
# region.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# Name of the region for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::VpnTunnelList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::VpnTunnelList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_vpn_tunnels(project, region, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/regions/{region}/vpnTunnels', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::VpnTunnelList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::VpnTunnelList
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
# Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling
|
|
# Resources documentation.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object
|
|
# @param [String] request_id
|
|
# 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).
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def set_vpn_tunnel_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/vpnTunnels/{resource}/setLabels', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation
|
|
command.request_object = region_set_labels_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Operation
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.nil?
|
|
command.query['requestId'] = request_id unless request_id.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
|
|
|
|
# Returns permissions that a caller has on the specified resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] region
|
|
# The name of the region for this request.
|
|
# @param [String] resource
|
|
# Name or id of the resource for this request.
|
|
# @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_permissions_request_object
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::TestPermissionsResponse] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::TestPermissionsResponse]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def test_vpn_tunnel_iam_permissions(project, region, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:post, '{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions', options)
|
|
command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation
|
|
command.request_object = test_permissions_request_object
|
|
command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse
|
|
command.params['project'] = project unless project.nil?
|
|
command.params['region'] = region unless region.nil?
|
|
command.params['resource'] = resource unless resource.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
|
|
|
|
# Deletes the specified zone-specific Operations resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] operation
|
|
# Name of the Operations resource to delete.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [NilClass] No result returned for this method
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [void]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def delete_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:delete, '{project}/zones/{zone}/operations/{operation}', options)
|
|
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
|
|
|
|
# Retrieves the specified zone-specific Operations resource.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for this request.
|
|
# @param [String] operation
|
|
# Name of the Operations resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Operation]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
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::ComputeBeta::Operation::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::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
|
|
|
|
# Retrieves a list of Operation resources contained within the specified zone.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone for request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::OperationList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::OperationList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_zone_operations(project, zone, filter: nil, max_results: nil, order_by: 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::ComputeBeta::OperationList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::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['orderBy'] = order_by unless order_by.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
|
|
|
|
# Returns the specified Zone resource. Gets a list of available zones by making
|
|
# a list() request.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] zone
|
|
# Name of the zone resource to return.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::Zone] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::Zone]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def get_zone(project, zone, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones/{zone}', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::Zone::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::Zone
|
|
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
|
|
|
|
# Retrieves the list of Zone resources available to the specified project.
|
|
# @param [String] project
|
|
# Project ID for this request.
|
|
# @param [String] filter
|
|
# A filter expression that filters resources listed in the response. The
|
|
# expression must specify the field name, a comparison operator, and the value
|
|
# that you want to use for filtering. The value must be a string, a number, or a
|
|
# boolean. The comparison 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.
|
|
# 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).
|
|
# @param [Fixnum] max_results
|
|
# 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)
|
|
# @param [String] order_by
|
|
# 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.
|
|
# @param [String] page_token
|
|
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
|
# a previous list request to get the next page of results.
|
|
# @param [String] fields
|
|
# Selector specifying which fields to include in a partial response.
|
|
# @param [String] quota_user
|
|
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
|
# characters.
|
|
# @param [String] user_ip
|
|
# Deprecated. Please use quotaUser instead.
|
|
# @param [Google::Apis::RequestOptions] options
|
|
# Request-specific options
|
|
#
|
|
# @yield [result, err] Result & error if block supplied
|
|
# @yieldparam result [Google::Apis::ComputeBeta::ZoneList] parsed result object
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
#
|
|
# @return [Google::Apis::ComputeBeta::ZoneList]
|
|
#
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
def list_zones(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
command = make_simple_command(:get, '{project}/zones', options)
|
|
command.response_representation = Google::Apis::ComputeBeta::ZoneList::Representation
|
|
command.response_class = Google::Apis::ComputeBeta::ZoneList
|
|
command.params['project'] = project unless project.nil?
|
|
command.query['filter'] = filter unless filter.nil?
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
command.query['orderBy'] = order_by unless order_by.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
|
|
|
|
protected
|
|
|
|
def apply_command_defaults(command)
|
|
command.query['key'] = key unless key.nil?
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|