def placement_groups(options = {})
      batches = Enumerator.new do |y|
        batch = []
        resp = @client.describe_placement_groups(options)
        resp.data.placement_groups.each do |p|
          batch << PlacementGroup.new(
            name: p.group_name,
            data: p,
            client: @client
          )
        end
        y.yield(batch)
      end
      PlacementGroup::Collection.new(batches)
    end
def placement_groups(options = {})
      batches = Enumerator.new do |y|
        batch = []
        resp = @client.describe_placement_groups(options)
        resp.data.placement_groups.each do |p|
          batch << PlacementGroup.new(
            name: p.group_name,
            data: p,
            client: @client
          )
        end
        y.yield(batch)
      end
      PlacementGroup::Collection.new(batches)
    end
@example Request syntax with placeholder values

   placement_groups = ec2.placement_groups({
     filters: [
       {
         name: "String",
         values: ["String"],
       },
     ],
     dry_run: false,
     group_names: ["String"],
   })
 @param [Hash] options ({})
 @option options [Array<Types::Filter>] :filters
   The filters.

   * `group-name` - The name of the placement group.

   * `state` - The state of the placement group (`pending` \| `available`
     \| `deleting` \| `deleted`).

   * `strategy` - The strategy of the placement group (`cluster` \|
     `spread` \| `partition`).
 @option options [Boolean] :dry_run
   Checks whether you have the required permissions for the action,
   without actually making the request, and provides an error response.
   If you have the required permissions, the error response is
   `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
 @option options [Array<String>] :group_names
   The names of the placement groups.

   Default: Describes all your placement groups, or only those otherwise
   specified.
 @return [PlacementGroup::Collection]