module Network.AWS.RDS.RevokeDBSecurityGroupIngress
(
RevokeDBSecurityGroupIngress
, revokeDBSecurityGroupIngress
, rdbsgiCIDRIP
, rdbsgiDBSecurityGroupName
, rdbsgiEC2SecurityGroupId
, rdbsgiEC2SecurityGroupName
, rdbsgiEC2SecurityGroupOwnerId
, RevokeDBSecurityGroupIngressResponse
, revokeDBSecurityGroupIngressResponse
, rdbsgirDBSecurityGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data RevokeDBSecurityGroupIngress = RevokeDBSecurityGroupIngress
{ _rdbsgiCIDRIP :: Maybe Text
, _rdbsgiDBSecurityGroupName :: Text
, _rdbsgiEC2SecurityGroupId :: Maybe Text
, _rdbsgiEC2SecurityGroupName :: Maybe Text
, _rdbsgiEC2SecurityGroupOwnerId :: Maybe Text
} deriving (Eq, Ord, Show)
revokeDBSecurityGroupIngress :: Text
-> RevokeDBSecurityGroupIngress
revokeDBSecurityGroupIngress p1 = RevokeDBSecurityGroupIngress
{ _rdbsgiDBSecurityGroupName = p1
, _rdbsgiCIDRIP = Nothing
, _rdbsgiEC2SecurityGroupName = Nothing
, _rdbsgiEC2SecurityGroupId = Nothing
, _rdbsgiEC2SecurityGroupOwnerId = Nothing
}
rdbsgiCIDRIP :: Lens' RevokeDBSecurityGroupIngress (Maybe Text)
rdbsgiCIDRIP = lens _rdbsgiCIDRIP (\s a -> s { _rdbsgiCIDRIP = a })
rdbsgiDBSecurityGroupName :: Lens' RevokeDBSecurityGroupIngress Text
rdbsgiDBSecurityGroupName =
lens _rdbsgiDBSecurityGroupName
(\s a -> s { _rdbsgiDBSecurityGroupName = a })
rdbsgiEC2SecurityGroupId :: Lens' RevokeDBSecurityGroupIngress (Maybe Text)
rdbsgiEC2SecurityGroupId =
lens _rdbsgiEC2SecurityGroupId
(\s a -> s { _rdbsgiEC2SecurityGroupId = a })
rdbsgiEC2SecurityGroupName :: Lens' RevokeDBSecurityGroupIngress (Maybe Text)
rdbsgiEC2SecurityGroupName =
lens _rdbsgiEC2SecurityGroupName
(\s a -> s { _rdbsgiEC2SecurityGroupName = a })
rdbsgiEC2SecurityGroupOwnerId :: Lens' RevokeDBSecurityGroupIngress (Maybe Text)
rdbsgiEC2SecurityGroupOwnerId =
lens _rdbsgiEC2SecurityGroupOwnerId
(\s a -> s { _rdbsgiEC2SecurityGroupOwnerId = a })
newtype RevokeDBSecurityGroupIngressResponse = RevokeDBSecurityGroupIngressResponse
{ _rdbsgirDBSecurityGroup :: Maybe DBSecurityGroup
} deriving (Eq, Show)
revokeDBSecurityGroupIngressResponse :: RevokeDBSecurityGroupIngressResponse
revokeDBSecurityGroupIngressResponse = RevokeDBSecurityGroupIngressResponse
{ _rdbsgirDBSecurityGroup = Nothing
}
rdbsgirDBSecurityGroup :: Lens' RevokeDBSecurityGroupIngressResponse (Maybe DBSecurityGroup)
rdbsgirDBSecurityGroup =
lens _rdbsgirDBSecurityGroup (\s a -> s { _rdbsgirDBSecurityGroup = a })
instance ToPath RevokeDBSecurityGroupIngress where
toPath = const "/"
instance ToQuery RevokeDBSecurityGroupIngress where
toQuery RevokeDBSecurityGroupIngress{..} = mconcat
[ "CIDRIP" =? _rdbsgiCIDRIP
, "DBSecurityGroupName" =? _rdbsgiDBSecurityGroupName
, "EC2SecurityGroupId" =? _rdbsgiEC2SecurityGroupId
, "EC2SecurityGroupName" =? _rdbsgiEC2SecurityGroupName
, "EC2SecurityGroupOwnerId" =? _rdbsgiEC2SecurityGroupOwnerId
]
instance ToHeaders RevokeDBSecurityGroupIngress
instance AWSRequest RevokeDBSecurityGroupIngress where
type Sv RevokeDBSecurityGroupIngress = RDS
type Rs RevokeDBSecurityGroupIngress = RevokeDBSecurityGroupIngressResponse
request = post "RevokeDBSecurityGroupIngress"
response = xmlResponse
instance FromXML RevokeDBSecurityGroupIngressResponse where
parseXML = withElement "RevokeDBSecurityGroupIngressResult" $ \x -> RevokeDBSecurityGroupIngressResponse
<$> x .@? "DBSecurityGroup"