module Network.AWS.ElastiCache.RevokeCacheSecurityGroupIngress
(
RevokeCacheSecurityGroupIngress
, revokeCacheSecurityGroupIngress
, rcsgiCacheSecurityGroupName
, rcsgiEC2SecurityGroupName
, rcsgiEC2SecurityGroupOwnerId
, RevokeCacheSecurityGroupIngressResponse
, revokeCacheSecurityGroupIngressResponse
, rcsgirCacheSecurityGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElastiCache.Types
import qualified GHC.Exts
data RevokeCacheSecurityGroupIngress = RevokeCacheSecurityGroupIngress
{ _rcsgiCacheSecurityGroupName :: Text
, _rcsgiEC2SecurityGroupName :: Text
, _rcsgiEC2SecurityGroupOwnerId :: Text
} deriving (Eq, Ord, Show)
revokeCacheSecurityGroupIngress :: Text
-> Text
-> Text
-> RevokeCacheSecurityGroupIngress
revokeCacheSecurityGroupIngress p1 p2 p3 = RevokeCacheSecurityGroupIngress
{ _rcsgiCacheSecurityGroupName = p1
, _rcsgiEC2SecurityGroupName = p2
, _rcsgiEC2SecurityGroupOwnerId = p3
}
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 })
newtype RevokeCacheSecurityGroupIngressResponse = RevokeCacheSecurityGroupIngressResponse
{ _rcsgirCacheSecurityGroup :: Maybe CacheSecurityGroup
} deriving (Eq, Show)
revokeCacheSecurityGroupIngressResponse :: RevokeCacheSecurityGroupIngressResponse
revokeCacheSecurityGroupIngressResponse = RevokeCacheSecurityGroupIngressResponse
{ _rcsgirCacheSecurityGroup = Nothing
}
rcsgirCacheSecurityGroup :: Lens' RevokeCacheSecurityGroupIngressResponse (Maybe CacheSecurityGroup)
rcsgirCacheSecurityGroup =
lens _rcsgirCacheSecurityGroup
(\s a -> s { _rcsgirCacheSecurityGroup = a })
instance ToPath RevokeCacheSecurityGroupIngress where
toPath = const "/"
instance ToQuery RevokeCacheSecurityGroupIngress where
toQuery RevokeCacheSecurityGroupIngress{..} = mconcat
[ "CacheSecurityGroupName" =? _rcsgiCacheSecurityGroupName
, "EC2SecurityGroupName" =? _rcsgiEC2SecurityGroupName
, "EC2SecurityGroupOwnerId" =? _rcsgiEC2SecurityGroupOwnerId
]
instance ToHeaders RevokeCacheSecurityGroupIngress
instance AWSRequest RevokeCacheSecurityGroupIngress where
type Sv RevokeCacheSecurityGroupIngress = ElastiCache
type Rs RevokeCacheSecurityGroupIngress = RevokeCacheSecurityGroupIngressResponse
request = post "RevokeCacheSecurityGroupIngress"
response = xmlResponse
instance FromXML RevokeCacheSecurityGroupIngressResponse where
parseXML = withElement "RevokeCacheSecurityGroupIngressResult" $ \x -> RevokeCacheSecurityGroupIngressResponse
<$> x .@? "CacheSecurityGroup"