# Copyright 2020 Google LLC # # 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 NetworkconnectivityV1 # Network Connectivity API # # This API enables connectivity with and between Google Cloud resources. # # @example # require 'google/apis/networkconnectivity_v1' # # Networkconnectivity = Google::Apis::NetworkconnectivityV1 # Alias the module # service = Networkconnectivity::NetworkconnectivityService.new # # @see https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest class NetworkconnectivityService < 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] # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. attr_accessor :quota_user def initialize super('https://networkconnectivity.googleapis.com/', '', client_name: 'google-apis-networkconnectivity_v1', client_version: Google::Apis::NetworkconnectivityV1::GEM_VERSION) @batch_path = 'batch' end # Gets information about a location. # @param [String] name # Resource name for the location. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Location] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::Location] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Location::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Location command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Lists information about the supported locations for this service. # @param [String] name # The resource that owns the locations collection, if applicable. # @param [String] filter # A filter to narrow down results to a preferred subset. The filtering language # accepts strings like `"displayName=tokyo"`, and is documented in more detail # in [AIP-160](https://google.aip.dev/160). # @param [Fixnum] page_size # The maximum number of results to return. If not set, the service selects a # default. # @param [String] page_token # A page token received from the `next_page_token` field in the response. Send # that page token to receive the subsequent page. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListLocationsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListLocationsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/locations', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListLocationsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListLocationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Accepts a proposal to attach a Network Connectivity Center spoke to the hub. # @param [String] name # Required. The name of the hub. # @param [Google::Apis::NetworkconnectivityV1::AcceptHubSpokeRequest] accept_hub_spoke_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def accept_project_location_global_hub_spoke(name, accept_hub_spoke_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:acceptSpoke', options) command.request_representation = Google::Apis::NetworkconnectivityV1::AcceptHubSpokeRequest::Representation command.request_object = accept_hub_spoke_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a new Network Connectivity Center hub in the specified project. # @param [String] parent # Required. The parent resource. # @param [Google::Apis::NetworkconnectivityV1::Hub] hub_object # @param [String] hub_id # Required. A unique identifier for the hub. # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server will know to ignore the # request if it has already been completed. The server guarantees that a request # doesn't result in creation of duplicate commitments for at least 60 minutes. # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request ID, the # server can check to see whether the original operation was received. If it was, # the server ignores the second request. This behavior prevents clients from # mistakenly creating 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_global_hub(parent, hub_object = nil, hub_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/hubs', options) command.request_representation = Google::Apis::NetworkconnectivityV1::Hub::Representation command.request_object = hub_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['hubId'] = hub_id unless hub_id.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? execute_or_queue_command(command, &block) end # Deletes a Network Connectivity Center hub. # @param [String] name # Required. The name of the hub to delete. # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server will know to ignore the # request if it has already been completed. The server guarantees that a request # doesn't result in creation of duplicate commitments for at least 60 minutes. # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request ID, the # server can check to see whether the original operation was received. If it was, # the server ignores the second request. This behavior prevents clients from # mistakenly creating 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_global_hub(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless 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? execute_or_queue_command(command, &block) end # Gets details about a Network Connectivity Center hub. # @param [String] name # Required. The name of the hub resource to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Hub] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::Hub] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hub(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Hub::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Hub command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the access control policy for a resource. Returns an empty policy if the # resource exists and does not have a policy set. # @param [String] resource # REQUIRED: The resource for which the policy is being requested. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The maximum policy version that will be used to format the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. Requests for policies with any conditional role bindings must # specify version 3. Policies with no conditional role bindings may specify any # valid value or leave the field unset. The policy in the response might use the # policy version that you specified, or it might use a lower policy version. For # example, if you specify version 3, but the policy has no conditional role # bindings, the response uses version 1. To learn which resources support # conditions in their IAM policies, see the [IAM documentation](https://cloud. # google.com/iam/help/conditions/resource-policies). # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_global_hub_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = 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? execute_or_queue_command(command, &block) end # Lists the Network Connectivity Center hubs associated with a given project. # @param [String] parent # Required. The parent resource's name. # @param [String] filter # An expression that filters the list of results. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results per page to return. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListHubsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListHubsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hubs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/hubs', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListHubsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListHubsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Lists the Network Connectivity Center spokes associated with a specified hub # and location. The list includes both spokes that are attached to the hub and # spokes that have been proposed but not yet accepted. # @param [String] name # Required. The name of the hub. # @param [String] filter # An expression that filters the list of results. # @param [String] order_by # Sort the results by name or create_time. # @param [Fixnum] page_size # The maximum number of results to return per page. # @param [String] page_token # The page token. # @param [Array, String] spoke_locations # A list of locations. Specify one of the following: `[global]`, a single region # (for example, `[us-central1]`), or a combination of values (for example, `[ # global, us-central1, us-west1]`). If the spoke_locations field is populated, # the list of results includes only spokes in the specified location. If the # spoke_locations field is not populated, the list of results includes spokes in # all locations. # @param [String] view # The view of the spoke to return. The view that you use determines which spoke # fields are included in the response. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListHubSpokesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListHubSpokesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hub_spokes(name, filter: nil, order_by: nil, page_size: nil, page_token: nil, spoke_locations: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}:listSpokes', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListHubSpokesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListHubSpokesResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['spokeLocations'] = spoke_locations unless spoke_locations.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Updates the description and/or labels of a Network Connectivity Center hub. # @param [String] name # Immutable. The name of the hub. Hub names must be unique. They use the # following form: `projects/`project_number`/locations/global/hubs/`hub_id`` # @param [Google::Apis::NetworkconnectivityV1::Hub] hub_object # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server will know to ignore the # request if it has already been completed. The server guarantees that a request # doesn't result in creation of duplicate commitments for at least 60 minutes. # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request ID, the # server can check to see whether the original operation was received. If it was, # the server ignores the second request. This behavior prevents clients from # mistakenly creating 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] update_mask # Optional. In the case of an update to an existing hub, field mask is used to # specify the fields to be overwritten. The fields specified in the update_mask # are relative to the resource, not the full request. A field is overwritten if # it is in the mask. If the user does not provide a mask, then all fields are # overwritten. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_global_hub(name, hub_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::NetworkconnectivityV1::Hub::Representation command.request_object = hub_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Rejects a Network Connectivity Center spoke from being attached to the hub. If # the spoke was previously in the `ACTIVE` state, it transitions to the ` # INACTIVE` state and is no longer able to connect to other spokes that are # attached to the hub. # @param [String] name # Required. The name of the hub. # @param [Google::Apis::NetworkconnectivityV1::RejectHubSpokeRequest] reject_hub_spoke_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def reject_project_location_global_hub_spoke(name, reject_hub_spoke_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:rejectSpoke', options) command.request_representation = Google::Apis::NetworkconnectivityV1::RejectHubSpokeRequest::Representation command.request_object = reject_hub_spoke_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors. # @param [String] resource # REQUIRED: The resource for which the policy is being specified. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_hub_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns permissions that a caller has on the specified resource. If the # resource does not exist, this will return an empty set of permissions, not a ` # NOT_FOUND` error. Note: This operation is designed to be used for building # permission-aware UIs and command-line tools, not for authorization checking. # This operation may "fail open" without warning. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. See [ # Resource names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_hub_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets details about a Network Connectivity Center group. # @param [String] name # Required. The name of the route table resource. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Group] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::Group] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hub_group(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Group::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Group command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the access control policy for a resource. Returns an empty policy if the # resource exists and does not have a policy set. # @param [String] resource # REQUIRED: The resource for which the policy is being requested. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The maximum policy version that will be used to format the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. Requests for policies with any conditional role bindings must # specify version 3. Policies with no conditional role bindings may specify any # valid value or leave the field unset. The policy in the response might use the # policy version that you specified, or it might use a lower policy version. For # example, if you specify version 3, but the policy has no conditional role # bindings, the response uses version 1. To learn which resources support # conditions in their IAM policies, see the [IAM documentation](https://cloud. # google.com/iam/help/conditions/resource-policies). # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_global_hub_group_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = 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? execute_or_queue_command(command, &block) end # Lists groups in a given hub. # @param [String] parent # Required. The parent resource's name. # @param [String] filter # An expression that filters the list of results. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results to return per page. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListGroupsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListGroupsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hub_groups(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/groups', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListGroupsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListGroupsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors. # @param [String] resource # REQUIRED: The resource for which the policy is being specified. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_group_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns permissions that a caller has on the specified resource. If the # resource does not exist, this will return an empty set of permissions, not a ` # NOT_FOUND` error. Note: This operation is designed to be used for building # permission-aware UIs and command-line tools, not for authorization checking. # This operation may "fail open" without warning. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. See [ # Resource names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets details about a Network Connectivity Center route table. # @param [String] name # Required. The name of the route table resource. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::RouteTable] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::RouteTable] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hub_route_table(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::RouteTable::Representation command.response_class = Google::Apis::NetworkconnectivityV1::RouteTable command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Lists route tables in a given project. # @param [String] parent # Required. The parent resource's name. # @param [String] filter # An expression that filters the list of results. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results to return per page. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListRouteTablesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListRouteTablesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hub_route_tables(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/routeTables', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListRouteTablesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListRouteTablesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Gets details about the specified route. # @param [String] name # Required. The name of the route resource. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Route] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_global_hub_route_table_route(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Route::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Route command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Lists routes in a given project. # @param [String] parent # Required. The parent resource's name. # @param [String] filter # An expression that filters the list of results. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results to return per page. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListRoutesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListRoutesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_hub_route_table_routes(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/routes', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListRoutesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListRoutesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Creates a new PolicyBasedRoute in a given project and location. # @param [String] parent # Required. The parent resource's name of the PolicyBasedRoute. # @param [Google::Apis::NetworkconnectivityV1::PolicyBasedRoute] policy_based_route_object # @param [String] policy_based_route_id # Required. Unique id for the Policy Based Route to create. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_global_policy_based_route(parent, policy_based_route_object = nil, policy_based_route_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/policyBasedRoutes', options) command.request_representation = Google::Apis::NetworkconnectivityV1::PolicyBasedRoute::Representation command.request_object = policy_based_route_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['policyBasedRouteId'] = policy_based_route_id unless policy_based_route_id.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? execute_or_queue_command(command, &block) end # Deletes a single PolicyBasedRoute. # @param [String] name # Required. Name of the PolicyBasedRoute resource to delete. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_global_policy_based_route(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless 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? execute_or_queue_command(command, &block) end # Gets details of a single PolicyBasedRoute. # @param [String] name # Required. Name of the PolicyBasedRoute resource to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::PolicyBasedRoute] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::PolicyBasedRoute] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_policy_based_route(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::PolicyBasedRoute::Representation command.response_class = Google::Apis::NetworkconnectivityV1::PolicyBasedRoute command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the access control policy for a resource. Returns an empty policy if the # resource exists and does not have a policy set. # @param [String] resource # REQUIRED: The resource for which the policy is being requested. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The maximum policy version that will be used to format the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. Requests for policies with any conditional role bindings must # specify version 3. Policies with no conditional role bindings may specify any # valid value or leave the field unset. The policy in the response might use the # policy version that you specified, or it might use a lower policy version. For # example, if you specify version 3, but the policy has no conditional role # bindings, the response uses version 1. To learn which resources support # conditions in their IAM policies, see the [IAM documentation](https://cloud. # google.com/iam/help/conditions/resource-policies). # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_global_policy_based_route_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = 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? execute_or_queue_command(command, &block) end # Lists PolicyBasedRoutes in a given project and location. # @param [String] parent # Required. The parent resource's name. # @param [String] filter # A filter expression that filters the results listed in the response. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results per page that should be returned. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListPolicyBasedRoutesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListPolicyBasedRoutesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_global_policy_based_routes(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/policyBasedRoutes', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListPolicyBasedRoutesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListPolicyBasedRoutesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors. # @param [String] resource # REQUIRED: The resource for which the policy is being specified. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_policy_based_route_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns permissions that a caller has on the specified resource. If the # resource does not exist, this will return an empty set of permissions, not a ` # NOT_FOUND` error. Note: This operation is designed to be used for building # permission-aware UIs and command-line tools, not for authorization checking. # This operation may "fail open" without warning. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. See [ # Resource names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_policy_based_route_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a new internal range in a given project and location. # @param [String] parent # Required. The parent resource's name of the internal range. # @param [Google::Apis::NetworkconnectivityV1::InternalRange] internal_range_object # @param [String] internal_range_id # Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ # internalRanges/foo') See https://google.aip.dev/122#resource-id-segments # Unique per location. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_internal_range(parent, internal_range_object = nil, internal_range_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/internalRanges', options) command.request_representation = Google::Apis::NetworkconnectivityV1::InternalRange::Representation command.request_object = internal_range_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['internalRangeId'] = internal_range_id unless internal_range_id.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? execute_or_queue_command(command, &block) end # Deletes a single internal range. # @param [String] name # Required. The name of the internal range to delete. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_internal_range(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless 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? execute_or_queue_command(command, &block) end # Gets details of a single internal range. # @param [String] name # Required. Name of the InternalRange to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::InternalRange] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::InternalRange] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_internal_range(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::InternalRange::Representation command.response_class = Google::Apis::NetworkconnectivityV1::InternalRange command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Lists internal ranges in a given project and location. # @param [String] parent # Required. The parent resource's name. # @param [String] filter # A filter expression that filters the results listed in the response. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results per page that should be returned. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListInternalRangesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListInternalRangesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_internal_ranges(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/internalRanges', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListInternalRangesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListInternalRangesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Updates the parameters of a single internal range. # @param [String] name # Immutable. The name of an internal range. Format: projects/`project`/locations/ # `location`/internalRanges/`internal_range` See: https://google.aip.dev/122# # fields-representing-resource-names # @param [Google::Apis::NetworkconnectivityV1::InternalRange] internal_range_object # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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] update_mask # Optional. Field mask is used to specify the fields to be overwritten in the # InternalRange resource by the update. The fields specified in the update_mask # are relative to the resource, not the full request. A field will be # overwritten if it is in the mask. If the user does not provide a mask then all # fields will be overwritten. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_internal_range(name, internal_range_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::NetworkconnectivityV1::InternalRange::Representation command.request_object = internal_range_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Starts asynchronous cancellation on a long-running operation. The server makes # a best effort to cancel the operation, but success is not guaranteed. If the # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. # Clients can use Operations.GetOperation or other methods to check whether the # cancellation succeeded or whether the operation completed despite cancellation. # On successful cancellation, the operation is not deleted; instead, it becomes # an operation with an Operation.error value with a google.rpc.Status.code of 1, # corresponding to `Code.CANCELLED`. # @param [String] name # The name of the operation resource to be cancelled. # @param [Google::Apis::NetworkconnectivityV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def cancel_project_location_operation(name, google_longrunning_cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', options) command.request_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningCancelOperationRequest::Representation command.request_object = google_longrunning_cancel_operation_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Empty::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Deletes a long-running operation. This method indicates that the client is no # longer interested in the operation result. It does not cancel the operation. # If the server doesn't support this method, it returns `google.rpc.Code. # UNIMPLEMENTED`. # @param [String] name # The name of the operation resource to be deleted. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Empty::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the latest state of a long-running operation. Clients can use this method # to poll the operation result at intervals as recommended by the API service. # @param [String] name # The name of the operation resource. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Lists operations that match the specified filter in the request. If the server # doesn't support this method, it returns `UNIMPLEMENTED`. # @param [String] name # The name of the operation's parent resource. # @param [String] filter # The standard list filter. # @param [Fixnum] page_size # The standard list page size. # @param [String] page_token # The standard list page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/operations', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Deletes a single ServiceClass. # @param [String] name # Required. The name of the ServiceClass to delete. # @param [String] etag # Optional. The etag is computed by the server, and may be sent on update and # delete requests to ensure the client has an up-to-date value before proceeding. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_class(name, etag: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.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? execute_or_queue_command(command, &block) end # Gets details of a single ServiceClass. # @param [String] name # Required. Name of the ServiceClass to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ServiceClass] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ServiceClass] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_class(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ServiceClass::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ServiceClass command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the access control policy for a resource. Returns an empty policy if the # resource exists and does not have a policy set. # @param [String] resource # REQUIRED: The resource for which the policy is being requested. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The maximum policy version that will be used to format the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. Requests for policies with any conditional role bindings must # specify version 3. Policies with no conditional role bindings may specify any # valid value or leave the field unset. The policy in the response might use the # policy version that you specified, or it might use a lower policy version. For # example, if you specify version 3, but the policy has no conditional role # bindings, the response uses version 1. To learn which resources support # conditions in their IAM policies, see the [IAM documentation](https://cloud. # google.com/iam/help/conditions/resource-policies). # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_service_class_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = 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? execute_or_queue_command(command, &block) end # Lists ServiceClasses in a given project and location. # @param [String] parent # Required. The parent resource's name. ex. projects/123/locations/us-east1 # @param [String] filter # A filter expression that filters the results listed in the response. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results per page that should be returned. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListServiceClassesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListServiceClassesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_classes(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/serviceClasses', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListServiceClassesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListServiceClassesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Updates the parameters of a single ServiceClass. # @param [String] name # Immutable. The name of a ServiceClass resource. Format: projects/`project`/ # locations/`location`/serviceClasses/`service_class` See: https://google.aip. # dev/122#fields-representing-resource-names # @param [Google::Apis::NetworkconnectivityV1::ServiceClass] service_class_object # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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] update_mask # Optional. Field mask is used to specify the fields to be overwritten in the # ServiceClass resource by the update. The fields specified in the update_mask # are relative to the resource, not the full request. A field will be # overwritten if it is in the mask. If the user does not provide a mask then all # fields will be overwritten. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_class(name, service_class_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::NetworkconnectivityV1::ServiceClass::Representation command.request_object = service_class_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors. # @param [String] resource # REQUIRED: The resource for which the policy is being specified. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_service_class_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns permissions that a caller has on the specified resource. If the # resource does not exist, this will return an empty set of permissions, not a ` # NOT_FOUND` error. Note: This operation is designed to be used for building # permission-aware UIs and command-line tools, not for authorization checking. # This operation may "fail open" without warning. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. See [ # Resource names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_service_class_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a new ServiceConnectionMap in a given project and location. # @param [String] parent # Required. The parent resource's name of the ServiceConnectionMap. ex. projects/ # 123/locations/us-east1 # @param [Google::Apis::NetworkconnectivityV1::ServiceConnectionMap] service_connection_map_object # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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] service_connection_map_id # Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ # serviceConnectionMaps/foo') See https://google.aip.dev/122#resource-id- # segments Unique per location. If one is not provided, one will be generated. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_map(parent, service_connection_map_object = nil, request_id: nil, service_connection_map_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/serviceConnectionMaps', options) command.request_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionMap::Representation command.request_object = service_connection_map_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['serviceConnectionMapId'] = service_connection_map_id unless service_connection_map_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Deletes a single ServiceConnectionMap. # @param [String] name # Required. The name of the ServiceConnectionMap to delete. # @param [String] etag # Optional. The etag is computed by the server, and may be sent on update and # delete requests to ensure the client has an up-to-date value before proceeding. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_map(name, etag: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.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? execute_or_queue_command(command, &block) end # Gets details of a single ServiceConnectionMap. # @param [String] name # Required. Name of the ServiceConnectionMap to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ServiceConnectionMap] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ServiceConnectionMap] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_connection_map(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionMap::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ServiceConnectionMap command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the access control policy for a resource. Returns an empty policy if the # resource exists and does not have a policy set. # @param [String] resource # REQUIRED: The resource for which the policy is being requested. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The maximum policy version that will be used to format the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. Requests for policies with any conditional role bindings must # specify version 3. Policies with no conditional role bindings may specify any # valid value or leave the field unset. The policy in the response might use the # policy version that you specified, or it might use a lower policy version. For # example, if you specify version 3, but the policy has no conditional role # bindings, the response uses version 1. To learn which resources support # conditions in their IAM policies, see the [IAM documentation](https://cloud. # google.com/iam/help/conditions/resource-policies). # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_service_connection_map_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = 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? execute_or_queue_command(command, &block) end # Lists ServiceConnectionMaps in a given project and location. # @param [String] parent # Required. The parent resource's name. ex. projects/123/locations/us-east1 # @param [String] filter # A filter expression that filters the results listed in the response. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results per page that should be returned. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListServiceConnectionMapsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListServiceConnectionMapsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_connection_maps(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/serviceConnectionMaps', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListServiceConnectionMapsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListServiceConnectionMapsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Updates the parameters of a single ServiceConnectionMap. # @param [String] name # Immutable. The name of a ServiceConnectionMap. Format: projects/`project`/ # locations/`location`/serviceConnectionMaps/`service_connection_map` See: https: # //google.aip.dev/122#fields-representing-resource-names # @param [Google::Apis::NetworkconnectivityV1::ServiceConnectionMap] service_connection_map_object # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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] update_mask # Optional. Field mask is used to specify the fields to be overwritten in the # ServiceConnectionMap resource by the update. The fields specified in the # update_mask are relative to the resource, not the full request. A field will # be overwritten if it is in the mask. If the user does not provide a mask then # all fields will be overwritten. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_map(name, service_connection_map_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionMap::Representation command.request_object = service_connection_map_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors. # @param [String] resource # REQUIRED: The resource for which the policy is being specified. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_service_connection_map_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns permissions that a caller has on the specified resource. If the # resource does not exist, this will return an empty set of permissions, not a ` # NOT_FOUND` error. Note: This operation is designed to be used for building # permission-aware UIs and command-line tools, not for authorization checking. # This operation may "fail open" without warning. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. See [ # Resource names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_service_connection_map_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a new ServiceConnectionPolicy in a given project and location. # @param [String] parent # Required. The parent resource's name of the ServiceConnectionPolicy. ex. # projects/123/locations/us-east1 # @param [Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy] service_connection_policy_object # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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] service_connection_policy_id # Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ # serviceConnectionPolicies/foo') See https://google.aip.dev/122#resource-id- # segments Unique per location. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_policy(parent, service_connection_policy_object = nil, request_id: nil, service_connection_policy_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/serviceConnectionPolicies', options) command.request_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy::Representation command.request_object = service_connection_policy_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['serviceConnectionPolicyId'] = service_connection_policy_id unless service_connection_policy_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Deletes a single ServiceConnectionPolicy. # @param [String] name # Required. The name of the ServiceConnectionPolicy to delete. # @param [String] etag # Optional. The etag is computed by the server, and may be sent on update and # delete requests to ensure the client has an up-to-date value before proceeding. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_policy(name, etag: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.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? execute_or_queue_command(command, &block) end # Gets details of a single ServiceConnectionPolicy. # @param [String] name # Required. Name of the ServiceConnectionPolicy to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_connection_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the access control policy for a resource. Returns an empty policy if the # resource exists and does not have a policy set. # @param [String] resource # REQUIRED: The resource for which the policy is being requested. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The maximum policy version that will be used to format the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. Requests for policies with any conditional role bindings must # specify version 3. Policies with no conditional role bindings may specify any # valid value or leave the field unset. The policy in the response might use the # policy version that you specified, or it might use a lower policy version. For # example, if you specify version 3, but the policy has no conditional role # bindings, the response uses version 1. To learn which resources support # conditions in their IAM policies, see the [IAM documentation](https://cloud. # google.com/iam/help/conditions/resource-policies). # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_service_connection_policy_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = 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? execute_or_queue_command(command, &block) end # Lists ServiceConnectionPolicies in a given project and location. # @param [String] parent # Required. The parent resource's name. ex. projects/123/locations/us-east1 # @param [String] filter # A filter expression that filters the results listed in the response. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results per page that should be returned. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListServiceConnectionPoliciesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListServiceConnectionPoliciesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_connection_policies(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/serviceConnectionPolicies', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListServiceConnectionPoliciesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListServiceConnectionPoliciesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Updates the parameters of a single ServiceConnectionPolicy. # @param [String] name # Immutable. The name of a ServiceConnectionPolicy. Format: projects/`project`/ # locations/`location`/serviceConnectionPolicies/`service_connection_policy` See: # https://google.aip.dev/122#fields-representing-resource-names # @param [Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy] service_connection_policy_object # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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] update_mask # Optional. Field mask is used to specify the fields to be overwritten in the # ServiceConnectionPolicy resource by the update. The fields specified in the # update_mask are relative to the resource, not the full request. A field will # be overwritten if it is in the mask. If the user does not provide a mask then # all fields will be overwritten. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_policy(name, service_connection_policy_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionPolicy::Representation command.request_object = service_connection_policy_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors. # @param [String] resource # REQUIRED: The resource for which the policy is being specified. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_service_connection_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns permissions that a caller has on the specified resource. If the # resource does not exist, this will return an empty set of permissions, not a ` # NOT_FOUND` error. Note: This operation is designed to be used for building # permission-aware UIs and command-line tools, not for authorization checking. # This operation may "fail open" without warning. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. See [ # Resource names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_service_connection_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a new ServiceConnectionToken in a given project and location. # @param [String] parent # Required. The parent resource's name of the ServiceConnectionToken. ex. # projects/123/locations/us-east1 # @param [Google::Apis::NetworkconnectivityV1::ServiceConnectionToken] service_connection_token_object # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes since the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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] service_connection_token_id # Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ # ServiceConnectionTokens/foo') See https://google.aip.dev/122#resource-id- # segments Unique per location. If one is not provided, one will be generated. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_token(parent, service_connection_token_object = nil, request_id: nil, service_connection_token_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/serviceConnectionTokens', options) command.request_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionToken::Representation command.request_object = service_connection_token_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['serviceConnectionTokenId'] = service_connection_token_id unless service_connection_token_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Deletes a single ServiceConnectionToken. # @param [String] name # Required. The name of the ServiceConnectionToken to delete. # @param [String] etag # Optional. The etag is computed by the server, and may be sent on update and # delete requests to ensure the client has an up-to-date value before proceeding. # @param [String] request_id # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. For example, consider a # situation where you make an initial request and the request times out. If you # make the request again with the same request ID, the server can check if # original operation with the same request ID was received, and if so, will # ignore the second request. This prevents clients from accidentally creating # 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_service_connection_token(name, etag: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.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? execute_or_queue_command(command, &block) end # Gets details of a single ServiceConnectionToken. # @param [String] name # Required. Name of the ServiceConnectionToken to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ServiceConnectionToken] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ServiceConnectionToken] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_connection_token(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ServiceConnectionToken::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ServiceConnectionToken command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Lists ServiceConnectionTokens in a given project and location. # @param [String] parent # Required. The parent resource's name. ex. projects/123/locations/us-east1 # @param [String] filter # A filter expression that filters the results listed in the response. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results per page that should be returned. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListServiceConnectionTokensResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListServiceConnectionTokensResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_service_connection_tokens(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/serviceConnectionTokens', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListServiceConnectionTokensResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListServiceConnectionTokensResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Accepts a proposal to attach a Network Connectivity Center spoke to the hub. # @param [String] name # Required. The name of the spoke to accept. # @param [Google::Apis::NetworkconnectivityV1::AcceptSpokeRequest] accept_spoke_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def accept_spoke(name, accept_spoke_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:accept', options) command.request_representation = Google::Apis::NetworkconnectivityV1::AcceptSpokeRequest::Representation command.request_object = accept_spoke_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a Network Connectivity Center spoke. # @param [String] parent # Required. The parent resource. # @param [Google::Apis::NetworkconnectivityV1::Spoke] spoke_object # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server will know to ignore the # request if it has already been completed. The server guarantees that a request # doesn't result in creation of duplicate commitments for at least 60 minutes. # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request ID, the # server can check to see whether the original operation was received. If it was, # the server ignores the second request. This behavior prevents clients from # mistakenly creating 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] spoke_id # Required. Unique id for the spoke to create. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_spoke(parent, spoke_object = nil, request_id: nil, spoke_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/spokes', options) command.request_representation = Google::Apis::NetworkconnectivityV1::Spoke::Representation command.request_object = spoke_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['spokeId'] = spoke_id unless spoke_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Deletes a Network Connectivity Center spoke. # @param [String] name # Required. The name of the spoke to delete. # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server will know to ignore the # request if it has already been completed. The server guarantees that a request # doesn't result in creation of duplicate commitments for at least 60 minutes. # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request ID, the # server can check to see whether the original operation was received. If it was, # the server ignores the second request. This behavior prevents clients from # mistakenly creating 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_spoke(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless 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? execute_or_queue_command(command, &block) end # Gets details about a Network Connectivity Center spoke. # @param [String] name # Required. The name of the spoke resource. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Spoke] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::Spoke] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_spoke(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Spoke::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Spoke command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets the access control policy for a resource. Returns an empty policy if the # resource exists and does not have a policy set. # @param [String] resource # REQUIRED: The resource for which the policy is being requested. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The maximum policy version that will be used to format the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. Requests for policies with any conditional role bindings must # specify version 3. Policies with no conditional role bindings may specify any # valid value or leave the field unset. The policy in the response might use the # policy version that you specified, or it might use a lower policy version. For # example, if you specify version 3, but the policy has no conditional role # bindings, the response uses version 1. To learn which resources support # conditions in their IAM policies, see the [IAM documentation](https://cloud. # google.com/iam/help/conditions/resource-policies). # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_project_location_spoke_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = 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? execute_or_queue_command(command, &block) end # Lists the Network Connectivity Center spokes in a specified project and # location. # @param [String] parent # Required. The parent resource. # @param [String] filter # An expression that filters the list of results. # @param [String] order_by # Sort the results by a certain order. # @param [Fixnum] page_size # The maximum number of results to return per page. # @param [String] page_token # The page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListSpokesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::ListSpokesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_location_spokes(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/spokes', options) command.response_representation = Google::Apis::NetworkconnectivityV1::ListSpokesResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::ListSpokesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end # Updates the parameters of a Network Connectivity Center spoke. # @param [String] name # Immutable. The name of the spoke. Spoke names must be unique. They use the # following form: `projects/`project_number`/locations/`region`/spokes/`spoke_id` # ` # @param [Google::Apis::NetworkconnectivityV1::Spoke] spoke_object # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server will know to ignore the # request if it has already been completed. The server guarantees that a request # doesn't result in creation of duplicate commitments for at least 60 minutes. # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request ID, the # server can check to see whether the original operation was received. If it was, # the server ignores the second request. This behavior prevents clients from # mistakenly creating 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] update_mask # Optional. In the case of an update to an existing spoke, field mask is used to # specify the fields to be overwritten. The fields specified in the update_mask # are relative to the resource, not the full request. A field is overwritten if # it is in the mask. If the user does not provide a mask, then all fields are # overwritten. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_project_location_spoke(name, spoke_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::NetworkconnectivityV1::Spoke::Representation command.request_object = spoke_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Rejects a Network Connectivity Center spoke from being attached to the hub. If # the spoke was previously in the `ACTIVE` state, it transitions to the ` # INACTIVE` state and is no longer able to connect to other spokes that are # attached to the hub. # @param [String] name # Required. The name of the spoke to reject. # @param [Google::Apis::NetworkconnectivityV1::RejectSpokeRequest] reject_spoke_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def reject_spoke(name, reject_spoke_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:reject', options) command.request_representation = Google::Apis::NetworkconnectivityV1::RejectSpokeRequest::Representation command.request_object = reject_spoke_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors. # @param [String] resource # REQUIRED: The resource for which the policy is being specified. See [Resource # names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::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_spoke_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation command.response_class = Google::Apis::NetworkconnectivityV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns permissions that a caller has on the specified resource. If the # resource does not exist, this will return an empty set of permissions, not a ` # NOT_FOUND` error. Note: This operation is designed to be used for building # permission-aware UIs and command-line tools, not for authorization checking. # This operation may "fail open" without warning. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. See [ # Resource names](https://cloud.google.com/apis/design/resource_names) for the # appropriate value for this field. # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_spoke_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.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? end end end end end