module Network.AWS.ElastiCache.ModifyReplicationGroup
(
modifyReplicationGroup
, ModifyReplicationGroup
, mrgAutomaticFailoverEnabled
, mrgEngineVersion
, mrgSnapshottingClusterId
, mrgSecurityGroupIds
, mrgAutoMinorVersionUpgrade
, mrgReplicationGroupDescription
, mrgCacheParameterGroupName
, mrgSnapshotWindow
, mrgPrimaryClusterId
, mrgPreferredMaintenanceWindow
, mrgSnapshotRetentionLimit
, mrgNotificationTopicStatus
, mrgApplyImmediately
, mrgNotificationTopicARN
, mrgCacheSecurityGroupNames
, mrgReplicationGroupId
, modifyReplicationGroupResponse
, ModifyReplicationGroupResponse
, mrgrsReplicationGroup
, mrgrsStatus
) 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 ModifyReplicationGroup = ModifyReplicationGroup'
{ _mrgAutomaticFailoverEnabled :: !(Maybe Bool)
, _mrgEngineVersion :: !(Maybe Text)
, _mrgSnapshottingClusterId :: !(Maybe Text)
, _mrgSecurityGroupIds :: !(Maybe [Text])
, _mrgAutoMinorVersionUpgrade :: !(Maybe Bool)
, _mrgReplicationGroupDescription :: !(Maybe Text)
, _mrgCacheParameterGroupName :: !(Maybe Text)
, _mrgSnapshotWindow :: !(Maybe Text)
, _mrgPrimaryClusterId :: !(Maybe Text)
, _mrgPreferredMaintenanceWindow :: !(Maybe Text)
, _mrgSnapshotRetentionLimit :: !(Maybe Int)
, _mrgNotificationTopicStatus :: !(Maybe Text)
, _mrgApplyImmediately :: !(Maybe Bool)
, _mrgNotificationTopicARN :: !(Maybe Text)
, _mrgCacheSecurityGroupNames :: !(Maybe [Text])
, _mrgReplicationGroupId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyReplicationGroup
:: Text
-> ModifyReplicationGroup
modifyReplicationGroup pReplicationGroupId_ =
ModifyReplicationGroup'
{ _mrgAutomaticFailoverEnabled = Nothing
, _mrgEngineVersion = Nothing
, _mrgSnapshottingClusterId = Nothing
, _mrgSecurityGroupIds = Nothing
, _mrgAutoMinorVersionUpgrade = Nothing
, _mrgReplicationGroupDescription = Nothing
, _mrgCacheParameterGroupName = Nothing
, _mrgSnapshotWindow = Nothing
, _mrgPrimaryClusterId = Nothing
, _mrgPreferredMaintenanceWindow = Nothing
, _mrgSnapshotRetentionLimit = Nothing
, _mrgNotificationTopicStatus = Nothing
, _mrgApplyImmediately = Nothing
, _mrgNotificationTopicARN = Nothing
, _mrgCacheSecurityGroupNames = Nothing
, _mrgReplicationGroupId = pReplicationGroupId_
}
mrgAutomaticFailoverEnabled :: Lens' ModifyReplicationGroup (Maybe Bool)
mrgAutomaticFailoverEnabled = lens _mrgAutomaticFailoverEnabled (\ s a -> s{_mrgAutomaticFailoverEnabled = a});
mrgEngineVersion :: Lens' ModifyReplicationGroup (Maybe Text)
mrgEngineVersion = lens _mrgEngineVersion (\ s a -> s{_mrgEngineVersion = a});
mrgSnapshottingClusterId :: Lens' ModifyReplicationGroup (Maybe Text)
mrgSnapshottingClusterId = lens _mrgSnapshottingClusterId (\ s a -> s{_mrgSnapshottingClusterId = a});
mrgSecurityGroupIds :: Lens' ModifyReplicationGroup [Text]
mrgSecurityGroupIds = lens _mrgSecurityGroupIds (\ s a -> s{_mrgSecurityGroupIds = a}) . _Default . _Coerce;
mrgAutoMinorVersionUpgrade :: Lens' ModifyReplicationGroup (Maybe Bool)
mrgAutoMinorVersionUpgrade = lens _mrgAutoMinorVersionUpgrade (\ s a -> s{_mrgAutoMinorVersionUpgrade = a});
mrgReplicationGroupDescription :: Lens' ModifyReplicationGroup (Maybe Text)
mrgReplicationGroupDescription = lens _mrgReplicationGroupDescription (\ s a -> s{_mrgReplicationGroupDescription = a});
mrgCacheParameterGroupName :: Lens' ModifyReplicationGroup (Maybe Text)
mrgCacheParameterGroupName = lens _mrgCacheParameterGroupName (\ s a -> s{_mrgCacheParameterGroupName = a});
mrgSnapshotWindow :: Lens' ModifyReplicationGroup (Maybe Text)
mrgSnapshotWindow = lens _mrgSnapshotWindow (\ s a -> s{_mrgSnapshotWindow = a});
mrgPrimaryClusterId :: Lens' ModifyReplicationGroup (Maybe Text)
mrgPrimaryClusterId = lens _mrgPrimaryClusterId (\ s a -> s{_mrgPrimaryClusterId = a});
mrgPreferredMaintenanceWindow :: Lens' ModifyReplicationGroup (Maybe Text)
mrgPreferredMaintenanceWindow = lens _mrgPreferredMaintenanceWindow (\ s a -> s{_mrgPreferredMaintenanceWindow = a});
mrgSnapshotRetentionLimit :: Lens' ModifyReplicationGroup (Maybe Int)
mrgSnapshotRetentionLimit = lens _mrgSnapshotRetentionLimit (\ s a -> s{_mrgSnapshotRetentionLimit = a});
mrgNotificationTopicStatus :: Lens' ModifyReplicationGroup (Maybe Text)
mrgNotificationTopicStatus = lens _mrgNotificationTopicStatus (\ s a -> s{_mrgNotificationTopicStatus = a});
mrgApplyImmediately :: Lens' ModifyReplicationGroup (Maybe Bool)
mrgApplyImmediately = lens _mrgApplyImmediately (\ s a -> s{_mrgApplyImmediately = a});
mrgNotificationTopicARN :: Lens' ModifyReplicationGroup (Maybe Text)
mrgNotificationTopicARN = lens _mrgNotificationTopicARN (\ s a -> s{_mrgNotificationTopicARN = a});
mrgCacheSecurityGroupNames :: Lens' ModifyReplicationGroup [Text]
mrgCacheSecurityGroupNames = lens _mrgCacheSecurityGroupNames (\ s a -> s{_mrgCacheSecurityGroupNames = a}) . _Default . _Coerce;
mrgReplicationGroupId :: Lens' ModifyReplicationGroup Text
mrgReplicationGroupId = lens _mrgReplicationGroupId (\ s a -> s{_mrgReplicationGroupId = a});
instance AWSRequest ModifyReplicationGroup where
type Sv ModifyReplicationGroup = ElastiCache
type Rs ModifyReplicationGroup =
ModifyReplicationGroupResponse
request = postQuery
response
= receiveXMLWrapper "ModifyReplicationGroupResult"
(\ s h x ->
ModifyReplicationGroupResponse' <$>
(x .@? "ReplicationGroup") <*> (pure (fromEnum s)))
instance ToHeaders ModifyReplicationGroup where
toHeaders = const mempty
instance ToPath ModifyReplicationGroup where
toPath = const "/"
instance ToQuery ModifyReplicationGroup where
toQuery ModifyReplicationGroup'{..}
= mconcat
["Action" =:
("ModifyReplicationGroup" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"AutomaticFailoverEnabled" =:
_mrgAutomaticFailoverEnabled,
"EngineVersion" =: _mrgEngineVersion,
"SnapshottingClusterId" =: _mrgSnapshottingClusterId,
"SecurityGroupIds" =:
toQuery
(toQueryList "SecurityGroupId" <$>
_mrgSecurityGroupIds),
"AutoMinorVersionUpgrade" =:
_mrgAutoMinorVersionUpgrade,
"ReplicationGroupDescription" =:
_mrgReplicationGroupDescription,
"CacheParameterGroupName" =:
_mrgCacheParameterGroupName,
"SnapshotWindow" =: _mrgSnapshotWindow,
"PrimaryClusterId" =: _mrgPrimaryClusterId,
"PreferredMaintenanceWindow" =:
_mrgPreferredMaintenanceWindow,
"SnapshotRetentionLimit" =:
_mrgSnapshotRetentionLimit,
"NotificationTopicStatus" =:
_mrgNotificationTopicStatus,
"ApplyImmediately" =: _mrgApplyImmediately,
"NotificationTopicArn" =: _mrgNotificationTopicARN,
"CacheSecurityGroupNames" =:
toQuery
(toQueryList "CacheSecurityGroupName" <$>
_mrgCacheSecurityGroupNames),
"ReplicationGroupId" =: _mrgReplicationGroupId]
data ModifyReplicationGroupResponse = ModifyReplicationGroupResponse'
{ _mrgrsReplicationGroup :: !(Maybe ReplicationGroup)
, _mrgrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyReplicationGroupResponse
:: Int
-> ModifyReplicationGroupResponse
modifyReplicationGroupResponse pStatus_ =
ModifyReplicationGroupResponse'
{ _mrgrsReplicationGroup = Nothing
, _mrgrsStatus = pStatus_
}
mrgrsReplicationGroup :: Lens' ModifyReplicationGroupResponse (Maybe ReplicationGroup)
mrgrsReplicationGroup = lens _mrgrsReplicationGroup (\ s a -> s{_mrgrsReplicationGroup = a});
mrgrsStatus :: Lens' ModifyReplicationGroupResponse Int
mrgrsStatus = lens _mrgrsStatus (\ s a -> s{_mrgrsStatus = a});