{-# 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.DAX.DeleteParameterGroup
(
deleteParameterGroup
, DeleteParameterGroup
, dpgParameterGroupName
, deleteParameterGroupResponse
, DeleteParameterGroupResponse
, dpgrsDeletionMessage
, dpgrsResponseStatus
) where
import Network.AWS.DAX.Types
import Network.AWS.DAX.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteParameterGroup = DeleteParameterGroup'
{ _dpgParameterGroupName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteParameterGroup
:: Text
-> DeleteParameterGroup
deleteParameterGroup pParameterGroupName_ =
DeleteParameterGroup' {_dpgParameterGroupName = pParameterGroupName_}
dpgParameterGroupName :: Lens' DeleteParameterGroup Text
dpgParameterGroupName = lens _dpgParameterGroupName (\ s a -> s{_dpgParameterGroupName = a})
instance AWSRequest DeleteParameterGroup where
type Rs DeleteParameterGroup =
DeleteParameterGroupResponse
request = postJSON dax
response
= receiveJSON
(\ s h x ->
DeleteParameterGroupResponse' <$>
(x .?> "DeletionMessage") <*> (pure (fromEnum s)))
instance Hashable DeleteParameterGroup where
instance NFData DeleteParameterGroup where
instance ToHeaders DeleteParameterGroup where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonDAXV3.DeleteParameterGroup" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteParameterGroup where
toJSON DeleteParameterGroup'{..}
= object
(catMaybes
[Just
("ParameterGroupName" .= _dpgParameterGroupName)])
instance ToPath DeleteParameterGroup where
toPath = const "/"
instance ToQuery DeleteParameterGroup where
toQuery = const mempty
data DeleteParameterGroupResponse = DeleteParameterGroupResponse'
{ _dpgrsDeletionMessage :: !(Maybe Text)
, _dpgrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteParameterGroupResponse
:: Int
-> DeleteParameterGroupResponse
deleteParameterGroupResponse pResponseStatus_ =
DeleteParameterGroupResponse'
{_dpgrsDeletionMessage = Nothing, _dpgrsResponseStatus = pResponseStatus_}
dpgrsDeletionMessage :: Lens' DeleteParameterGroupResponse (Maybe Text)
dpgrsDeletionMessage = lens _dpgrsDeletionMessage (\ s a -> s{_dpgrsDeletionMessage = a})
dpgrsResponseStatus :: Lens' DeleteParameterGroupResponse Int
dpgrsResponseStatus = lens _dpgrsResponseStatus (\ s a -> s{_dpgrsResponseStatus = a})
instance NFData DeleteParameterGroupResponse where