------------------------------------------------------------
-- DescribeSpotInstanceRequests
------------------------------------------------------------
describeSpotInstanceRequests
    :: (MonadResource m, MonadBaseControl IO m)
    => [Text] -- ^ SpotInstanceRequestIds
    -> [Filter] -- ^ Filters
    -> EC2 m (ResumableSource m SpotInstanceRequest)
describeSpotInstanceRequests requests filters = do
--    ec2QueryDebug "DescribeInstances" params
    ec2QuerySource "DescribeSpotInstanceRequests" params path $
        itemConduit spotInstanceRequestConv
  where
    path = itemsPath "spotInstanceRequestSet"
    params =
        [ "SpotInstanceRequestId" |.#= requests
        , filtersParam filters
        ]
describeSpotInstanceRequests
    :: (MonadResource m, MonadBaseControl IO m)
    => [Text] -- ^ SpotInstanceRequestIds
    -> [Filter] -- ^ Filters
    -> EC2 m (ResumableSource m SpotInstanceRequest)
describeSpotInstanceRequests requests filters = do
--    ec2QueryDebug "DescribeInstances" params
    ec2QuerySource "DescribeSpotInstanceRequests" params path $
        itemConduit spotInstanceRequestConv
  where
    path = itemsPath "spotInstanceRequestSet"
    params =
        [ "SpotInstanceRequestId" |.#= requests
        , filtersParam filters
        ]
describeSpotInstanceRequests requests filters = do
--    ec2QueryDebug "DescribeInstances" params
    ec2QuerySource "DescribeSpotInstanceRequests" params path $
        itemConduit spotInstanceRequestConv
  where
    path = itemsPath "spotInstanceRequestSet"
    params =
        [ "SpotInstanceRequestId" |.#= requests
        , filtersParam filters
        ]