{-# 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.ElastiCache.RevokeCacheSecurityGroupIngress
(
revokeCacheSecurityGroupIngress
, RevokeCacheSecurityGroupIngress
, rcsgiCacheSecurityGroupName
, rcsgiEC2SecurityGroupName
, rcsgiEC2SecurityGroupOwnerId
, revokeCacheSecurityGroupIngressResponse
, RevokeCacheSecurityGroupIngressResponse
, rcsgirsCacheSecurityGroup
, rcsgirsResponseStatus
) where
import Network.AWS.ElastiCache.Types
import Network.AWS.ElastiCache.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data RevokeCacheSecurityGroupIngress = RevokeCacheSecurityGroupIngress'
{ _rcsgiCacheSecurityGroupName :: !Text
, _rcsgiEC2SecurityGroupName :: !Text
, _rcsgiEC2SecurityGroupOwnerId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
revokeCacheSecurityGroupIngress
:: Text
-> Text
-> Text
-> RevokeCacheSecurityGroupIngress
revokeCacheSecurityGroupIngress pCacheSecurityGroupName_ pEC2SecurityGroupName_ pEC2SecurityGroupOwnerId_ =
RevokeCacheSecurityGroupIngress'
{ _rcsgiCacheSecurityGroupName = pCacheSecurityGroupName_
, _rcsgiEC2SecurityGroupName = pEC2SecurityGroupName_
, _rcsgiEC2SecurityGroupOwnerId = pEC2SecurityGroupOwnerId_
}
rcsgiCacheSecurityGroupName :: Lens' RevokeCacheSecurityGroupIngress Text
rcsgiCacheSecurityGroupName = lens _rcsgiCacheSecurityGroupName (\ s a -> s{_rcsgiCacheSecurityGroupName = a})
rcsgiEC2SecurityGroupName :: Lens' RevokeCacheSecurityGroupIngress Text
rcsgiEC2SecurityGroupName = lens _rcsgiEC2SecurityGroupName (\ s a -> s{_rcsgiEC2SecurityGroupName = a})
rcsgiEC2SecurityGroupOwnerId :: Lens' RevokeCacheSecurityGroupIngress Text
rcsgiEC2SecurityGroupOwnerId = lens _rcsgiEC2SecurityGroupOwnerId (\ s a -> s{_rcsgiEC2SecurityGroupOwnerId = a})
instance AWSRequest RevokeCacheSecurityGroupIngress
where
type Rs RevokeCacheSecurityGroupIngress =
RevokeCacheSecurityGroupIngressResponse
request = postQuery elastiCache
response
= receiveXMLWrapper
"RevokeCacheSecurityGroupIngressResult"
(\ s h x ->
RevokeCacheSecurityGroupIngressResponse' <$>
(x .@? "CacheSecurityGroup") <*> (pure (fromEnum s)))
instance Hashable RevokeCacheSecurityGroupIngress
where
instance NFData RevokeCacheSecurityGroupIngress where
instance ToHeaders RevokeCacheSecurityGroupIngress
where
toHeaders = const mempty
instance ToPath RevokeCacheSecurityGroupIngress where
toPath = const "/"
instance ToQuery RevokeCacheSecurityGroupIngress
where
toQuery RevokeCacheSecurityGroupIngress'{..}
= mconcat
["Action" =:
("RevokeCacheSecurityGroupIngress" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"CacheSecurityGroupName" =:
_rcsgiCacheSecurityGroupName,
"EC2SecurityGroupName" =: _rcsgiEC2SecurityGroupName,
"EC2SecurityGroupOwnerId" =:
_rcsgiEC2SecurityGroupOwnerId]
data RevokeCacheSecurityGroupIngressResponse = RevokeCacheSecurityGroupIngressResponse'
{ _rcsgirsCacheSecurityGroup :: !(Maybe CacheSecurityGroup)
, _rcsgirsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
revokeCacheSecurityGroupIngressResponse
:: Int
-> RevokeCacheSecurityGroupIngressResponse
revokeCacheSecurityGroupIngressResponse pResponseStatus_ =
RevokeCacheSecurityGroupIngressResponse'
{ _rcsgirsCacheSecurityGroup = Nothing
, _rcsgirsResponseStatus = pResponseStatus_
}
rcsgirsCacheSecurityGroup :: Lens' RevokeCacheSecurityGroupIngressResponse (Maybe CacheSecurityGroup)
rcsgirsCacheSecurityGroup = lens _rcsgirsCacheSecurityGroup (\ s a -> s{_rcsgirsCacheSecurityGroup = a})
rcsgirsResponseStatus :: Lens' RevokeCacheSecurityGroupIngressResponse Int
rcsgirsResponseStatus = lens _rcsgirsResponseStatus (\ s a -> s{_rcsgirsResponseStatus = a})
instance NFData
RevokeCacheSecurityGroupIngressResponse
where