module Network.AWS.ElastiCache.CreateCacheParameterGroup
(
createCacheParameterGroup
, CreateCacheParameterGroup
, ccpgCacheParameterGroupName
, ccpgCacheParameterGroupFamily
, ccpgDescription
, createCacheParameterGroupResponse
, CreateCacheParameterGroupResponse
, ccpgrsCacheParameterGroup
, ccpgrsResponseStatus
) where
import Network.AWS.ElastiCache.Types
import Network.AWS.ElastiCache.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data CreateCacheParameterGroup = CreateCacheParameterGroup'
{ _ccpgCacheParameterGroupName :: !Text
, _ccpgCacheParameterGroupFamily :: !Text
, _ccpgDescription :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createCacheParameterGroup
:: Text
-> Text
-> Text
-> CreateCacheParameterGroup
createCacheParameterGroup pCacheParameterGroupName_ pCacheParameterGroupFamily_ pDescription_ =
CreateCacheParameterGroup'
{ _ccpgCacheParameterGroupName = pCacheParameterGroupName_
, _ccpgCacheParameterGroupFamily = pCacheParameterGroupFamily_
, _ccpgDescription = pDescription_
}
ccpgCacheParameterGroupName :: Lens' CreateCacheParameterGroup Text
ccpgCacheParameterGroupName = lens _ccpgCacheParameterGroupName (\ s a -> s{_ccpgCacheParameterGroupName = a});
ccpgCacheParameterGroupFamily :: Lens' CreateCacheParameterGroup Text
ccpgCacheParameterGroupFamily = lens _ccpgCacheParameterGroupFamily (\ s a -> s{_ccpgCacheParameterGroupFamily = a});
ccpgDescription :: Lens' CreateCacheParameterGroup Text
ccpgDescription = lens _ccpgDescription (\ s a -> s{_ccpgDescription = a});
instance AWSRequest CreateCacheParameterGroup where
type Rs CreateCacheParameterGroup =
CreateCacheParameterGroupResponse
request = postQuery elastiCache
response
= receiveXMLWrapper "CreateCacheParameterGroupResult"
(\ s h x ->
CreateCacheParameterGroupResponse' <$>
(x .@? "CacheParameterGroup") <*>
(pure (fromEnum s)))
instance ToHeaders CreateCacheParameterGroup where
toHeaders = const mempty
instance ToPath CreateCacheParameterGroup where
toPath = const "/"
instance ToQuery CreateCacheParameterGroup where
toQuery CreateCacheParameterGroup'{..}
= mconcat
["Action" =:
("CreateCacheParameterGroup" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"CacheParameterGroupName" =:
_ccpgCacheParameterGroupName,
"CacheParameterGroupFamily" =:
_ccpgCacheParameterGroupFamily,
"Description" =: _ccpgDescription]
data CreateCacheParameterGroupResponse = CreateCacheParameterGroupResponse'
{ _ccpgrsCacheParameterGroup :: !(Maybe CacheParameterGroup)
, _ccpgrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createCacheParameterGroupResponse
:: Int
-> CreateCacheParameterGroupResponse
createCacheParameterGroupResponse pResponseStatus_ =
CreateCacheParameterGroupResponse'
{ _ccpgrsCacheParameterGroup = Nothing
, _ccpgrsResponseStatus = pResponseStatus_
}
ccpgrsCacheParameterGroup :: Lens' CreateCacheParameterGroupResponse (Maybe CacheParameterGroup)
ccpgrsCacheParameterGroup = lens _ccpgrsCacheParameterGroup (\ s a -> s{_ccpgrsCacheParameterGroup = a});
ccpgrsResponseStatus :: Lens' CreateCacheParameterGroupResponse Int
ccpgrsResponseStatus = lens _ccpgrsResponseStatus (\ s a -> s{_ccpgrsResponseStatus = a});