google-cloud-compute-v1/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb
##
# Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
#
# @overload apply_updates_to_instances(request, options = nil)
#   Pass arguments to `apply_updates_to_instances` via a request object, either of type
#   {::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest} or an equivalent Hash.
#
#   @param request [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest, ::Hash]
#     A request object representing the call parameters. Required. To specify no
#     parameters, or to keep all the default parameter values, pass an empty Hash.
#   @param options [::Gapic::CallOptions, ::Hash]
#     Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#     Note: currently retry functionality is not implemented. While it is possible
#     to set it using ::Gapic::CallOptions, it will not be applied
#
# @overload apply_updates_to_instances(instance_group_manager: nil, instance_group_managers_apply_updates_request_resource: nil, project: nil, zone: nil)
#   Pass arguments to `apply_updates_to_instances` via keyword arguments. Note that at
#   least one keyword argument is required. To specify no parameters, or to keep all
#   the default parameter values, pass an empty Hash as a request object (see above).
#
#   @param instance_group_manager [::String]
#     The name of the managed instance group, should conform to RFC1035.
#   @param instance_group_managers_apply_updates_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersApplyUpdatesRequest, ::Hash]
#     The body resource for this request
#   @param project [::String]
#     Project ID for this request.
#   @param zone [::String]
#     The name of the zone where the managed instance group is located. Should conform to RFC1035.
# @yield [result, env] Access the result along with the Faraday environment object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
# @yieldparam env [::Faraday::Env]
#
# @return [::Google::Cloud::Compute::V1::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
Applies changes to selected instances on the managed instance group . This method can be used to apply new overrides and / or new versions .
def apply_updates_to_instances request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?
                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest
                options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
                call_metadata = {}
                call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
                  lib_name: @config.lib_name, lib_version: @config.lib_version,
                  gapic_version: ::Google::Cloud::Compute::V1::VERSION
                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     call_metadata
                (uri, body, _query_string_params) = transcode_apply_updates_to_instances request
                response = @client_stub.make_post_request(
                  uri:     uri,
                  body:    body,
                  options: options
                )
                result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
                yield result, response if block_given?
                result
              rescue ::Faraday::Error => e
                gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
                raise ::Google::Cloud::Error.from_error(gapic_error)
              end
def apply_updates_to_instances request , options = nil raise :: ArgumentError , "request must be provided" if request . nil? request = :: Gapic :: Protobuf . coerce request , to : :: Google :: Cloud :: Compute :: V1 :: ApplyUpdatesToInstancesInstanceGroupManagerRequest options = :: Gapic :: CallOptions . new ( ** options . to_h ) if options . respond_to? :to_h call_metadata = { } call_metadata [ :" x-goog-api-client " ] ||= :: Gapic :: Headers . x_goog_api_client lib_name : @config . lib_name , lib_version : @config . lib_version , gapic_version : :: Google :: Cloud :: Compute :: V1 :: VERSION options . apply_defaults timeout : @config . timeout , metadata : call_metadata ( uri , body , _query_string_params ) = transcode_apply_updates_to_instances request response = @client_stub . make_post_request ( uri : uri , body : body , options : options ) result = :: Google :: Cloud :: Compute :: V1 :: Operation . decode_json response . body , ignore_unknown_fields : true yield result , response if block_given? result rescue :: Faraday :: Error => e gapic_error = :: Gapic :: Rest :: Error . wrap_faraday_error e raise :: Google :: Cloud :: Error . from_error ( gapic_error ) end
Applies changes to selected instances on the managed instance group.
Applies changes to selected instances on the managed instance group .
# Converts hash and nil to an options object # Customize the options with defaults # Set x-goog-api-client header
None
::Google::Cloud::Compute::V1::Operation
[::Google::Cloud::Error] if the REST call is aborted.
[ :: Google :: Cloud :: Error ] if the REST call is aborted .
request
<not_specific>
options
<not_specific>
]
<not_specific>
Access the result along with the Faraday environment object
Access the result along with the Faraday environment object
<not_specific>
None
overload
apply_updates_to_instances(request, options = nil) Pass arguments to `apply_updates_to_instances` via a request object, either of type {::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest} or an equivalent Hash. @param request [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
apply_updates_to_instances ( request options = nil ) Pass arguments to ` apply_updates_to_instances ` via a request object either of type { :: Google :: Cloud :: Compute :: V1 :: ApplyUpdatesToInstancesInstanceGroupManagerRequest } or an equivalent Hash . @param request [ :: Google :: Cloud :: Compute :: V1 :: ApplyUpdatesToInstancesInstanceGroupManagerRequest :: Hash ] A request object representing the call parameters . Required . To specify no parameters or to keep all the default parameter values pass an empty Hash . @param options [ :: Gapic :: CallOptions :: Hash ] Overrides the default settings for this call e . g timeout retries etc . Optional . Note : currently retry functionality is not implemented . While it is possible to set it using :: Gapic :: CallOptions it will not be applied
overload
None