module Network.AWS.EC2.CancelReservedInstancesListing
(
CancelReservedInstancesListing
, cancelReservedInstancesListing
, crilReservedInstancesListingId
, CancelReservedInstancesListingResponse
, cancelReservedInstancesListingResponse
, crilrReservedInstancesListings
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
newtype CancelReservedInstancesListing = CancelReservedInstancesListing
{ _crilReservedInstancesListingId :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
cancelReservedInstancesListing :: Text
-> CancelReservedInstancesListing
cancelReservedInstancesListing p1 = CancelReservedInstancesListing
{ _crilReservedInstancesListingId = p1
}
crilReservedInstancesListingId :: Lens' CancelReservedInstancesListing Text
crilReservedInstancesListingId =
lens _crilReservedInstancesListingId
(\s a -> s { _crilReservedInstancesListingId = a })
newtype CancelReservedInstancesListingResponse = CancelReservedInstancesListingResponse
{ _crilrReservedInstancesListings :: List "item" ReservedInstancesListing
} deriving (Eq, Show, Monoid, Semigroup)
cancelReservedInstancesListingResponse :: CancelReservedInstancesListingResponse
cancelReservedInstancesListingResponse = CancelReservedInstancesListingResponse
{ _crilrReservedInstancesListings = mempty
}
crilrReservedInstancesListings :: Lens' CancelReservedInstancesListingResponse [ReservedInstancesListing]
crilrReservedInstancesListings =
lens _crilrReservedInstancesListings
(\s a -> s { _crilrReservedInstancesListings = a })
. _List
instance ToPath CancelReservedInstancesListing where
toPath = const "/"
instance ToQuery CancelReservedInstancesListing where
toQuery CancelReservedInstancesListing{..} = mconcat
[ "reservedInstancesListingId" =? _crilReservedInstancesListingId
]
instance ToHeaders CancelReservedInstancesListing
instance AWSRequest CancelReservedInstancesListing where
type Sv CancelReservedInstancesListing = EC2
type Rs CancelReservedInstancesListing = CancelReservedInstancesListingResponse
request = post "CancelReservedInstancesListing"
response = xmlResponse
instance FromXML CancelReservedInstancesListingResponse where
parseXML x = CancelReservedInstancesListingResponse
<$> x .@? "reservedInstancesListingsSet" .!@ mempty