module Network.AWS.DAX.UpdateParameterGroup
(
updateParameterGroup
, UpdateParameterGroup
, upgParameterGroupName
, upgParameterNameValues
, updateParameterGroupResponse
, UpdateParameterGroupResponse
, upgrsParameterGroup
, upgrsResponseStatus
) 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
data UpdateParameterGroup = UpdateParameterGroup'
{ _upgParameterGroupName :: !Text
, _upgParameterNameValues :: ![ParameterNameValue]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateParameterGroup
:: Text
-> UpdateParameterGroup
updateParameterGroup pParameterGroupName_ =
UpdateParameterGroup'
{ _upgParameterGroupName = pParameterGroupName_
, _upgParameterNameValues = mempty
}
upgParameterGroupName :: Lens' UpdateParameterGroup Text
upgParameterGroupName = lens _upgParameterGroupName (\ s a -> s{_upgParameterGroupName = a});
upgParameterNameValues :: Lens' UpdateParameterGroup [ParameterNameValue]
upgParameterNameValues = lens _upgParameterNameValues (\ s a -> s{_upgParameterNameValues = a}) . _Coerce;
instance AWSRequest UpdateParameterGroup where
type Rs UpdateParameterGroup =
UpdateParameterGroupResponse
request = postJSON dax
response
= receiveJSON
(\ s h x ->
UpdateParameterGroupResponse' <$>
(x .?> "ParameterGroup") <*> (pure (fromEnum s)))
instance Hashable UpdateParameterGroup where
instance NFData UpdateParameterGroup where
instance ToHeaders UpdateParameterGroup where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonDAXV3.UpdateParameterGroup" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateParameterGroup where
toJSON UpdateParameterGroup'{..}
= object
(catMaybes
[Just
("ParameterGroupName" .= _upgParameterGroupName),
Just
("ParameterNameValues" .= _upgParameterNameValues)])
instance ToPath UpdateParameterGroup where
toPath = const "/"
instance ToQuery UpdateParameterGroup where
toQuery = const mempty
data UpdateParameterGroupResponse = UpdateParameterGroupResponse'
{ _upgrsParameterGroup :: !(Maybe ParameterGroup)
, _upgrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateParameterGroupResponse
:: Int
-> UpdateParameterGroupResponse
updateParameterGroupResponse pResponseStatus_ =
UpdateParameterGroupResponse'
{_upgrsParameterGroup = Nothing, _upgrsResponseStatus = pResponseStatus_}
upgrsParameterGroup :: Lens' UpdateParameterGroupResponse (Maybe ParameterGroup)
upgrsParameterGroup = lens _upgrsParameterGroup (\ s a -> s{_upgrsParameterGroup = a});
upgrsResponseStatus :: Lens' UpdateParameterGroupResponse Int
upgrsResponseStatus = lens _upgrsResponseStatus (\ s a -> s{_upgrsResponseStatus = a});
instance NFData UpdateParameterGroupResponse where