{-# 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.RDS.CreateDBClusterParameterGroup
(
createDBClusterParameterGroup
, CreateDBClusterParameterGroup
, cdcpgTags
, cdcpgDBClusterParameterGroupName
, cdcpgDBParameterGroupFamily
, cdcpgDescription
, createDBClusterParameterGroupResponse
, CreateDBClusterParameterGroupResponse
, cdbcpgrsDBClusterParameterGroup
, cdbcpgrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data CreateDBClusterParameterGroup = CreateDBClusterParameterGroup'
{ _cdcpgTags :: !(Maybe [Tag])
, _cdcpgDBClusterParameterGroupName :: !Text
, _cdcpgDBParameterGroupFamily :: !Text
, _cdcpgDescription :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createDBClusterParameterGroup
:: Text
-> Text
-> Text
-> CreateDBClusterParameterGroup
createDBClusterParameterGroup pDBClusterParameterGroupName_ pDBParameterGroupFamily_ pDescription_ =
CreateDBClusterParameterGroup'
{ _cdcpgTags = Nothing
, _cdcpgDBClusterParameterGroupName = pDBClusterParameterGroupName_
, _cdcpgDBParameterGroupFamily = pDBParameterGroupFamily_
, _cdcpgDescription = pDescription_
}
cdcpgTags :: Lens' CreateDBClusterParameterGroup [Tag]
cdcpgTags = lens _cdcpgTags (\ s a -> s{_cdcpgTags = a}) . _Default . _Coerce;
cdcpgDBClusterParameterGroupName :: Lens' CreateDBClusterParameterGroup Text
cdcpgDBClusterParameterGroupName = lens _cdcpgDBClusterParameterGroupName (\ s a -> s{_cdcpgDBClusterParameterGroupName = a});
cdcpgDBParameterGroupFamily :: Lens' CreateDBClusterParameterGroup Text
cdcpgDBParameterGroupFamily = lens _cdcpgDBParameterGroupFamily (\ s a -> s{_cdcpgDBParameterGroupFamily = a});
cdcpgDescription :: Lens' CreateDBClusterParameterGroup Text
cdcpgDescription = lens _cdcpgDescription (\ s a -> s{_cdcpgDescription = a});
instance AWSRequest CreateDBClusterParameterGroup
where
type Rs CreateDBClusterParameterGroup =
CreateDBClusterParameterGroupResponse
request = postQuery rds
response
= receiveXMLWrapper
"CreateDBClusterParameterGroupResult"
(\ s h x ->
CreateDBClusterParameterGroupResponse' <$>
(x .@? "DBClusterParameterGroup") <*>
(pure (fromEnum s)))
instance Hashable CreateDBClusterParameterGroup
instance NFData CreateDBClusterParameterGroup
instance ToHeaders CreateDBClusterParameterGroup
where
toHeaders = const mempty
instance ToPath CreateDBClusterParameterGroup where
toPath = const "/"
instance ToQuery CreateDBClusterParameterGroup where
toQuery CreateDBClusterParameterGroup'{..}
= mconcat
["Action" =:
("CreateDBClusterParameterGroup" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"Tags" =: toQuery (toQueryList "Tag" <$> _cdcpgTags),
"DBClusterParameterGroupName" =:
_cdcpgDBClusterParameterGroupName,
"DBParameterGroupFamily" =:
_cdcpgDBParameterGroupFamily,
"Description" =: _cdcpgDescription]
data CreateDBClusterParameterGroupResponse = CreateDBClusterParameterGroupResponse'
{ _cdbcpgrsDBClusterParameterGroup :: !(Maybe DBClusterParameterGroup)
, _cdbcpgrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createDBClusterParameterGroupResponse
:: Int
-> CreateDBClusterParameterGroupResponse
createDBClusterParameterGroupResponse pResponseStatus_ =
CreateDBClusterParameterGroupResponse'
{ _cdbcpgrsDBClusterParameterGroup = Nothing
, _cdbcpgrsResponseStatus = pResponseStatus_
}
cdbcpgrsDBClusterParameterGroup :: Lens' CreateDBClusterParameterGroupResponse (Maybe DBClusterParameterGroup)
cdbcpgrsDBClusterParameterGroup = lens _cdbcpgrsDBClusterParameterGroup (\ s a -> s{_cdbcpgrsDBClusterParameterGroup = a});
cdbcpgrsResponseStatus :: Lens' CreateDBClusterParameterGroupResponse Int
cdbcpgrsResponseStatus = lens _cdbcpgrsResponseStatus (\ s a -> s{_cdbcpgrsResponseStatus = a});
instance NFData CreateDBClusterParameterGroupResponse