def detach(options = {})
      batch = []
      options = Aws::Util.deep_merge(options,
        auto_scaling_group_name: @group_name,
        instance_ids: [@id]
      )
      resp = @client.detach_instances(options)
      resp.data.activities.each do |a|
        batch << Activity.new(
          id: a.activity_id,
          data: a,
          client: @client
        )
      end
      Activity::Collection.new([batch], size: batch.size)
    end
def detach(options = {})
      batch = []
      options = Aws::Util.deep_merge(options,
        auto_scaling_group_name: @group_name,
        instance_ids: [@id]
      )
      resp = @client.detach_instances(options)
      resp.data.activities.each do |a|
        batch << Activity.new(
          id: a.activity_id,
          data: a,
          client: @client
        )
      end
      Activity::Collection.new([batch], size: batch.size)
    end
@example Request syntax with placeholder values

   activity = instance.detach({
     should_decrement_desired_capacity: false, # required
   })
 @param [Hash] options ({})
 @option options [required, Boolean] :should_decrement_desired_capacity
   Indicates whether the Auto Scaling group decrements the desired
   capacity value by the number of instances detached.
 @return [Activity::Collection]