module Network.AWS.RDS.AuthorizeDBSecurityGroupIngress
(
AuthorizeDBSecurityGroupIngress
, authorizeDBSecurityGroupIngress
, adbsgiCIDRIP
, adbsgiDBSecurityGroupName
, adbsgiEC2SecurityGroupId
, adbsgiEC2SecurityGroupName
, adbsgiEC2SecurityGroupOwnerId
, AuthorizeDBSecurityGroupIngressResponse
, authorizeDBSecurityGroupIngressResponse
, adbsgirDBSecurityGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data AuthorizeDBSecurityGroupIngress = AuthorizeDBSecurityGroupIngress
{ _adbsgiCIDRIP :: Maybe Text
, _adbsgiDBSecurityGroupName :: Text
, _adbsgiEC2SecurityGroupId :: Maybe Text
, _adbsgiEC2SecurityGroupName :: Maybe Text
, _adbsgiEC2SecurityGroupOwnerId :: Maybe Text
} deriving (Eq, Ord, Show)
authorizeDBSecurityGroupIngress :: Text
-> AuthorizeDBSecurityGroupIngress
authorizeDBSecurityGroupIngress p1 = AuthorizeDBSecurityGroupIngress
{ _adbsgiDBSecurityGroupName = p1
, _adbsgiCIDRIP = Nothing
, _adbsgiEC2SecurityGroupName = Nothing
, _adbsgiEC2SecurityGroupId = Nothing
, _adbsgiEC2SecurityGroupOwnerId = Nothing
}
adbsgiCIDRIP :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adbsgiCIDRIP = lens _adbsgiCIDRIP (\s a -> s { _adbsgiCIDRIP = a })
adbsgiDBSecurityGroupName :: Lens' AuthorizeDBSecurityGroupIngress Text
adbsgiDBSecurityGroupName =
lens _adbsgiDBSecurityGroupName
(\s a -> s { _adbsgiDBSecurityGroupName = a })
adbsgiEC2SecurityGroupId :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adbsgiEC2SecurityGroupId =
lens _adbsgiEC2SecurityGroupId
(\s a -> s { _adbsgiEC2SecurityGroupId = a })
adbsgiEC2SecurityGroupName :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adbsgiEC2SecurityGroupName =
lens _adbsgiEC2SecurityGroupName
(\s a -> s { _adbsgiEC2SecurityGroupName = a })
adbsgiEC2SecurityGroupOwnerId :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adbsgiEC2SecurityGroupOwnerId =
lens _adbsgiEC2SecurityGroupOwnerId
(\s a -> s { _adbsgiEC2SecurityGroupOwnerId = a })
newtype AuthorizeDBSecurityGroupIngressResponse = AuthorizeDBSecurityGroupIngressResponse
{ _adbsgirDBSecurityGroup :: Maybe DBSecurityGroup
} deriving (Eq, Show)
authorizeDBSecurityGroupIngressResponse :: AuthorizeDBSecurityGroupIngressResponse
authorizeDBSecurityGroupIngressResponse = AuthorizeDBSecurityGroupIngressResponse
{ _adbsgirDBSecurityGroup = Nothing
}
adbsgirDBSecurityGroup :: Lens' AuthorizeDBSecurityGroupIngressResponse (Maybe DBSecurityGroup)
adbsgirDBSecurityGroup =
lens _adbsgirDBSecurityGroup (\s a -> s { _adbsgirDBSecurityGroup = a })
instance ToPath AuthorizeDBSecurityGroupIngress where
toPath = const "/"
instance ToQuery AuthorizeDBSecurityGroupIngress where
toQuery AuthorizeDBSecurityGroupIngress{..} = mconcat
[ "CIDRIP" =? _adbsgiCIDRIP
, "DBSecurityGroupName" =? _adbsgiDBSecurityGroupName
, "EC2SecurityGroupId" =? _adbsgiEC2SecurityGroupId
, "EC2SecurityGroupName" =? _adbsgiEC2SecurityGroupName
, "EC2SecurityGroupOwnerId" =? _adbsgiEC2SecurityGroupOwnerId
]
instance ToHeaders AuthorizeDBSecurityGroupIngress
instance AWSRequest AuthorizeDBSecurityGroupIngress where
type Sv AuthorizeDBSecurityGroupIngress = RDS
type Rs AuthorizeDBSecurityGroupIngress = AuthorizeDBSecurityGroupIngressResponse
request = post "AuthorizeDBSecurityGroupIngress"
response = xmlResponse
instance FromXML AuthorizeDBSecurityGroupIngressResponse where
parseXML = withElement "AuthorizeDBSecurityGroupIngressResult" $ \x -> AuthorizeDBSecurityGroupIngressResponse
<$> x .@? "DBSecurityGroup"