module Network.AWS.Redshift.RevokeClusterSecurityGroupIngress
(
RevokeClusterSecurityGroupIngress
, revokeClusterSecurityGroupIngress
, rcsgiCIDRIP
, rcsgiClusterSecurityGroupName
, rcsgiEC2SecurityGroupName
, rcsgiEC2SecurityGroupOwnerId
, RevokeClusterSecurityGroupIngressResponse
, revokeClusterSecurityGroupIngressResponse
, rcsgirClusterSecurityGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
data RevokeClusterSecurityGroupIngress = RevokeClusterSecurityGroupIngress
{ _rcsgiCIDRIP :: Maybe Text
, _rcsgiClusterSecurityGroupName :: Text
, _rcsgiEC2SecurityGroupName :: Maybe Text
, _rcsgiEC2SecurityGroupOwnerId :: Maybe Text
} deriving (Eq, Ord, Show)
revokeClusterSecurityGroupIngress :: Text
-> RevokeClusterSecurityGroupIngress
revokeClusterSecurityGroupIngress p1 = RevokeClusterSecurityGroupIngress
{ _rcsgiClusterSecurityGroupName = p1
, _rcsgiCIDRIP = Nothing
, _rcsgiEC2SecurityGroupName = Nothing
, _rcsgiEC2SecurityGroupOwnerId = Nothing
}
rcsgiCIDRIP :: Lens' RevokeClusterSecurityGroupIngress (Maybe Text)
rcsgiCIDRIP = lens _rcsgiCIDRIP (\s a -> s { _rcsgiCIDRIP = a })
rcsgiClusterSecurityGroupName :: Lens' RevokeClusterSecurityGroupIngress Text
rcsgiClusterSecurityGroupName =
lens _rcsgiClusterSecurityGroupName
(\s a -> s { _rcsgiClusterSecurityGroupName = a })
rcsgiEC2SecurityGroupName :: Lens' RevokeClusterSecurityGroupIngress (Maybe Text)
rcsgiEC2SecurityGroupName =
lens _rcsgiEC2SecurityGroupName
(\s a -> s { _rcsgiEC2SecurityGroupName = a })
rcsgiEC2SecurityGroupOwnerId :: Lens' RevokeClusterSecurityGroupIngress (Maybe Text)
rcsgiEC2SecurityGroupOwnerId =
lens _rcsgiEC2SecurityGroupOwnerId
(\s a -> s { _rcsgiEC2SecurityGroupOwnerId = a })
newtype RevokeClusterSecurityGroupIngressResponse = RevokeClusterSecurityGroupIngressResponse
{ _rcsgirClusterSecurityGroup :: Maybe ClusterSecurityGroup
} deriving (Eq, Show)
revokeClusterSecurityGroupIngressResponse :: RevokeClusterSecurityGroupIngressResponse
revokeClusterSecurityGroupIngressResponse = RevokeClusterSecurityGroupIngressResponse
{ _rcsgirClusterSecurityGroup = Nothing
}
rcsgirClusterSecurityGroup :: Lens' RevokeClusterSecurityGroupIngressResponse (Maybe ClusterSecurityGroup)
rcsgirClusterSecurityGroup =
lens _rcsgirClusterSecurityGroup
(\s a -> s { _rcsgirClusterSecurityGroup = a })
instance ToPath RevokeClusterSecurityGroupIngress where
toPath = const "/"
instance ToQuery RevokeClusterSecurityGroupIngress where
toQuery RevokeClusterSecurityGroupIngress{..} = mconcat
[ "CIDRIP" =? _rcsgiCIDRIP
, "ClusterSecurityGroupName" =? _rcsgiClusterSecurityGroupName
, "EC2SecurityGroupName" =? _rcsgiEC2SecurityGroupName
, "EC2SecurityGroupOwnerId" =? _rcsgiEC2SecurityGroupOwnerId
]
instance ToHeaders RevokeClusterSecurityGroupIngress
instance AWSRequest RevokeClusterSecurityGroupIngress where
type Sv RevokeClusterSecurityGroupIngress = Redshift
type Rs RevokeClusterSecurityGroupIngress = RevokeClusterSecurityGroupIngressResponse
request = post "RevokeClusterSecurityGroupIngress"
response = xmlResponse
instance FromXML RevokeClusterSecurityGroupIngressResponse where
parseXML = withElement "RevokeClusterSecurityGroupIngressResult" $ \x -> RevokeClusterSecurityGroupIngressResponse
<$> x .@? "ClusterSecurityGroup"