module Network.AWS.ElastiCache.RevokeCacheSecurityGroupIngress
(
revokeCacheSecurityGroupIngress
, RevokeCacheSecurityGroupIngress
, rcsgiCacheSecurityGroupName
, rcsgiEC2SecurityGroupName
, rcsgiEC2SecurityGroupOwnerId
, revokeCacheSecurityGroupIngressResponse
, RevokeCacheSecurityGroupIngressResponse
, rcsgirsCacheSecurityGroup
, rcsgirsStatus
) 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 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 Sv RevokeCacheSecurityGroupIngress = ElastiCache
type Rs RevokeCacheSecurityGroupIngress =
RevokeCacheSecurityGroupIngressResponse
request = postQuery
response
= receiveXMLWrapper
"RevokeCacheSecurityGroupIngressResult"
(\ s h x ->
RevokeCacheSecurityGroupIngressResponse' <$>
(x .@? "CacheSecurityGroup") <*> (pure (fromEnum s)))
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)
, _rcsgirsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
revokeCacheSecurityGroupIngressResponse
:: Int
-> RevokeCacheSecurityGroupIngressResponse
revokeCacheSecurityGroupIngressResponse pStatus_ =
RevokeCacheSecurityGroupIngressResponse'
{ _rcsgirsCacheSecurityGroup = Nothing
, _rcsgirsStatus = pStatus_
}
rcsgirsCacheSecurityGroup :: Lens' RevokeCacheSecurityGroupIngressResponse (Maybe CacheSecurityGroup)
rcsgirsCacheSecurityGroup = lens _rcsgirsCacheSecurityGroup (\ s a -> s{_rcsgirsCacheSecurityGroup = a});
rcsgirsStatus :: Lens' RevokeCacheSecurityGroupIngressResponse Int
rcsgirsStatus = lens _rcsgirsStatus (\ s a -> s{_rcsgirsStatus = a});