google-cloud-compute-v1/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb
##
# Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
#
# If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
#
# You can specify a maximum of 1000 instances with this method per request.
#
# @overload abandon_instances(request, options = nil)
#   Pass arguments to `abandon_instances` via a request object, either of type
#   {::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest} or an equivalent Hash.
#
#   @param request [::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest, ::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 abandon_instances(instance_group_manager: nil, instance_group_managers_abandon_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
#   Pass arguments to `abandon_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.
#   @param instance_group_managers_abandon_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersAbandonInstancesRequest, ::Hash]
#     The body resource for this request
#   @param project [::String]
#     Project ID for this request.
#   @param request_id [::String]
#     An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
#
#     For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
#
#     The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
#   @param zone [::String]
#     The name of the zone where the managed instance group is located.
# @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.
Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

You can specify a maximum of 1000 instances with this method per request.
Flags the specified instances to be removed from the managed instance group . Abandoning an instance does not delete the instance but it does remove the instance from any target pools that are applied by the managed instance group . This method reduces the targetSize of the managed instance group by the number of instances that you abandon . This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group . You must separately verify the status of the abandoning action with the listmanagedinstances method . If the group is part of a backend service that has enabled connection draining it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted . You can specify a maximum of 1000 instances with this method per request .
def abandon_instances request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?
                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest
                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_abandon_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 abandon_instances request , options = nil raise :: ArgumentError , "request must be provided" if request . nil? request = :: Gapic :: Protobuf . coerce request , to : :: Google :: Cloud :: Compute :: V1 :: AbandonInstancesInstanceGroupManagerRequest 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_abandon_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
Flags the specified instances to be removed from the managed instance group.
Flags the specified instances to be removed from 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
abandon_instances(request, options = nil) Pass arguments to `abandon_instances` via a request object, either of type {::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest} or an equivalent Hash. @param request [::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest, ::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
abandon_instances ( request options = nil ) Pass arguments to ` abandon_instances ` via a request object either of type { :: Google :: Cloud :: Compute :: V1 :: AbandonInstancesInstanceGroupManagerRequest } or an equivalent Hash . @param request [ :: Google :: Cloud :: Compute :: V1 :: AbandonInstancesInstanceGroupManagerRequest :: 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