{-# 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.CopyDBClusterParameterGroup
(
copyDBClusterParameterGroup
, CopyDBClusterParameterGroup
, cdbcpgTags
, cdbcpgSourceDBClusterParameterGroupIdentifier
, cdbcpgTargetDBClusterParameterGroupIdentifier
, cdbcpgTargetDBClusterParameterGroupDescription
, copyDBClusterParameterGroupResponse
, CopyDBClusterParameterGroupResponse
, cdcpgrsDBClusterParameterGroup
, cdcpgrsResponseStatus
) 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 CopyDBClusterParameterGroup = CopyDBClusterParameterGroup'
{ _cdbcpgTags :: !(Maybe [Tag])
, _cdbcpgSourceDBClusterParameterGroupIdentifier :: !Text
, _cdbcpgTargetDBClusterParameterGroupIdentifier :: !Text
, _cdbcpgTargetDBClusterParameterGroupDescription :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
copyDBClusterParameterGroup
:: Text
-> Text
-> Text
-> CopyDBClusterParameterGroup
copyDBClusterParameterGroup pSourceDBClusterParameterGroupIdentifier_ pTargetDBClusterParameterGroupIdentifier_ pTargetDBClusterParameterGroupDescription_ =
CopyDBClusterParameterGroup'
{ _cdbcpgTags = Nothing
, _cdbcpgSourceDBClusterParameterGroupIdentifier =
pSourceDBClusterParameterGroupIdentifier_
, _cdbcpgTargetDBClusterParameterGroupIdentifier =
pTargetDBClusterParameterGroupIdentifier_
, _cdbcpgTargetDBClusterParameterGroupDescription =
pTargetDBClusterParameterGroupDescription_
}
cdbcpgTags :: Lens' CopyDBClusterParameterGroup [Tag]
cdbcpgTags = lens _cdbcpgTags (\ s a -> s{_cdbcpgTags = a}) . _Default . _Coerce
cdbcpgSourceDBClusterParameterGroupIdentifier :: Lens' CopyDBClusterParameterGroup Text
cdbcpgSourceDBClusterParameterGroupIdentifier = lens _cdbcpgSourceDBClusterParameterGroupIdentifier (\ s a -> s{_cdbcpgSourceDBClusterParameterGroupIdentifier = a})
cdbcpgTargetDBClusterParameterGroupIdentifier :: Lens' CopyDBClusterParameterGroup Text
cdbcpgTargetDBClusterParameterGroupIdentifier = lens _cdbcpgTargetDBClusterParameterGroupIdentifier (\ s a -> s{_cdbcpgTargetDBClusterParameterGroupIdentifier = a})
cdbcpgTargetDBClusterParameterGroupDescription :: Lens' CopyDBClusterParameterGroup Text
cdbcpgTargetDBClusterParameterGroupDescription = lens _cdbcpgTargetDBClusterParameterGroupDescription (\ s a -> s{_cdbcpgTargetDBClusterParameterGroupDescription = a})
instance AWSRequest CopyDBClusterParameterGroup where
type Rs CopyDBClusterParameterGroup =
CopyDBClusterParameterGroupResponse
request = postQuery rds
response
= receiveXMLWrapper
"CopyDBClusterParameterGroupResult"
(\ s h x ->
CopyDBClusterParameterGroupResponse' <$>
(x .@? "DBClusterParameterGroup") <*>
(pure (fromEnum s)))
instance Hashable CopyDBClusterParameterGroup where
instance NFData CopyDBClusterParameterGroup where
instance ToHeaders CopyDBClusterParameterGroup where
toHeaders = const mempty
instance ToPath CopyDBClusterParameterGroup where
toPath = const "/"
instance ToQuery CopyDBClusterParameterGroup where
toQuery CopyDBClusterParameterGroup'{..}
= mconcat
["Action" =:
("CopyDBClusterParameterGroup" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"Tags" =:
toQuery (toQueryList "Tag" <$> _cdbcpgTags),
"SourceDBClusterParameterGroupIdentifier" =:
_cdbcpgSourceDBClusterParameterGroupIdentifier,
"TargetDBClusterParameterGroupIdentifier" =:
_cdbcpgTargetDBClusterParameterGroupIdentifier,
"TargetDBClusterParameterGroupDescription" =:
_cdbcpgTargetDBClusterParameterGroupDescription]
data CopyDBClusterParameterGroupResponse = CopyDBClusterParameterGroupResponse'
{ _cdcpgrsDBClusterParameterGroup :: !(Maybe DBClusterParameterGroup)
, _cdcpgrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
copyDBClusterParameterGroupResponse
:: Int
-> CopyDBClusterParameterGroupResponse
copyDBClusterParameterGroupResponse pResponseStatus_ =
CopyDBClusterParameterGroupResponse'
{ _cdcpgrsDBClusterParameterGroup = Nothing
, _cdcpgrsResponseStatus = pResponseStatus_
}
cdcpgrsDBClusterParameterGroup :: Lens' CopyDBClusterParameterGroupResponse (Maybe DBClusterParameterGroup)
cdcpgrsDBClusterParameterGroup = lens _cdcpgrsDBClusterParameterGroup (\ s a -> s{_cdcpgrsDBClusterParameterGroup = a})
cdcpgrsResponseStatus :: Lens' CopyDBClusterParameterGroupResponse Int
cdcpgrsResponseStatus = lens _cdcpgrsResponseStatus (\ s a -> s{_cdcpgrsResponseStatus = a})
instance NFData CopyDBClusterParameterGroupResponse
where