module Network.AWS.CloudWatchLogs.DeleteRetentionPolicy
(
deleteRetentionPolicy
, DeleteRetentionPolicy
, drpLogGroupName
, deleteRetentionPolicyResponse
, DeleteRetentionPolicyResponse
) where
import Network.AWS.CloudWatchLogs.Types
import Network.AWS.CloudWatchLogs.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteRetentionPolicy = DeleteRetentionPolicy'
{ _drpLogGroupName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRetentionPolicy
:: Text
-> DeleteRetentionPolicy
deleteRetentionPolicy pLogGroupName_ =
DeleteRetentionPolicy'
{ _drpLogGroupName = pLogGroupName_
}
drpLogGroupName :: Lens' DeleteRetentionPolicy Text
drpLogGroupName = lens _drpLogGroupName (\ s a -> s{_drpLogGroupName = a});
instance AWSRequest DeleteRetentionPolicy where
type Sv DeleteRetentionPolicy = CloudWatchLogs
type Rs DeleteRetentionPolicy =
DeleteRetentionPolicyResponse
request = postJSON
response = receiveNull DeleteRetentionPolicyResponse'
instance ToHeaders DeleteRetentionPolicy where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Logs_20140328.DeleteRetentionPolicy" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteRetentionPolicy where
toJSON DeleteRetentionPolicy'{..}
= object ["logGroupName" .= _drpLogGroupName]
instance ToPath DeleteRetentionPolicy where
toPath = const "/"
instance ToQuery DeleteRetentionPolicy where
toQuery = const mempty
data DeleteRetentionPolicyResponse =
DeleteRetentionPolicyResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRetentionPolicyResponse
:: DeleteRetentionPolicyResponse
deleteRetentionPolicyResponse = DeleteRetentionPolicyResponse'