{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Shield.DeleteSubscription
(
deleteSubscription
, DeleteSubscription
, deleteSubscriptionResponse
, DeleteSubscriptionResponse
, drsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Shield.Types
import Network.AWS.Shield.Types.Product
data DeleteSubscription =
DeleteSubscription'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSubscription
:: DeleteSubscription
deleteSubscription = DeleteSubscription'
instance AWSRequest DeleteSubscription where
type Rs DeleteSubscription =
DeleteSubscriptionResponse
request = postJSON shield
response
= receiveEmpty
(\ s h x ->
DeleteSubscriptionResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteSubscription where
instance NFData DeleteSubscription where
instance ToHeaders DeleteSubscription where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSShield_20160616.DeleteSubscription" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteSubscription where
toJSON = const (Object mempty)
instance ToPath DeleteSubscription where
toPath = const "/"
instance ToQuery DeleteSubscription where
toQuery = const mempty
newtype DeleteSubscriptionResponse = DeleteSubscriptionResponse'
{ _drsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSubscriptionResponse
:: Int
-> DeleteSubscriptionResponse
deleteSubscriptionResponse pResponseStatus_ =
DeleteSubscriptionResponse' {_drsResponseStatus = pResponseStatus_}
drsResponseStatus :: Lens' DeleteSubscriptionResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a})
instance NFData DeleteSubscriptionResponse where