module Network.AWS.RDS.AuthorizeDBSecurityGroupIngress
(
authorizeDBSecurityGroupIngress
, AuthorizeDBSecurityGroupIngress
, adsgiEC2SecurityGroupOwnerId
, adsgiEC2SecurityGroupName
, adsgiCIdRIP
, adsgiEC2SecurityGroupId
, adsgiDBSecurityGroupName
, authorizeDBSecurityGroupIngressResponse
, AuthorizeDBSecurityGroupIngressResponse
, adsgirsDBSecurityGroup
, adsgirsResponseStatus
) where
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data AuthorizeDBSecurityGroupIngress = AuthorizeDBSecurityGroupIngress'
{ _adsgiEC2SecurityGroupOwnerId :: !(Maybe Text)
, _adsgiEC2SecurityGroupName :: !(Maybe Text)
, _adsgiCIdRIP :: !(Maybe Text)
, _adsgiEC2SecurityGroupId :: !(Maybe Text)
, _adsgiDBSecurityGroupName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
authorizeDBSecurityGroupIngress
:: Text
-> AuthorizeDBSecurityGroupIngress
authorizeDBSecurityGroupIngress pDBSecurityGroupName_ =
AuthorizeDBSecurityGroupIngress'
{ _adsgiEC2SecurityGroupOwnerId = Nothing
, _adsgiEC2SecurityGroupName = Nothing
, _adsgiCIdRIP = Nothing
, _adsgiEC2SecurityGroupId = Nothing
, _adsgiDBSecurityGroupName = pDBSecurityGroupName_
}
adsgiEC2SecurityGroupOwnerId :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adsgiEC2SecurityGroupOwnerId = lens _adsgiEC2SecurityGroupOwnerId (\ s a -> s{_adsgiEC2SecurityGroupOwnerId = a});
adsgiEC2SecurityGroupName :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adsgiEC2SecurityGroupName = lens _adsgiEC2SecurityGroupName (\ s a -> s{_adsgiEC2SecurityGroupName = a});
adsgiCIdRIP :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adsgiCIdRIP = lens _adsgiCIdRIP (\ s a -> s{_adsgiCIdRIP = a});
adsgiEC2SecurityGroupId :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adsgiEC2SecurityGroupId = lens _adsgiEC2SecurityGroupId (\ s a -> s{_adsgiEC2SecurityGroupId = a});
adsgiDBSecurityGroupName :: Lens' AuthorizeDBSecurityGroupIngress Text
adsgiDBSecurityGroupName = lens _adsgiDBSecurityGroupName (\ s a -> s{_adsgiDBSecurityGroupName = a});
instance AWSRequest AuthorizeDBSecurityGroupIngress
where
type Rs AuthorizeDBSecurityGroupIngress =
AuthorizeDBSecurityGroupIngressResponse
request = postQuery rDS
response
= receiveXMLWrapper
"AuthorizeDBSecurityGroupIngressResult"
(\ s h x ->
AuthorizeDBSecurityGroupIngressResponse' <$>
(x .@? "DBSecurityGroup") <*> (pure (fromEnum s)))
instance ToHeaders AuthorizeDBSecurityGroupIngress
where
toHeaders = const mempty
instance ToPath AuthorizeDBSecurityGroupIngress where
toPath = const "/"
instance ToQuery AuthorizeDBSecurityGroupIngress
where
toQuery AuthorizeDBSecurityGroupIngress'{..}
= mconcat
["Action" =:
("AuthorizeDBSecurityGroupIngress" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"EC2SecurityGroupOwnerId" =:
_adsgiEC2SecurityGroupOwnerId,
"EC2SecurityGroupName" =: _adsgiEC2SecurityGroupName,
"CIDRIP" =: _adsgiCIdRIP,
"EC2SecurityGroupId" =: _adsgiEC2SecurityGroupId,
"DBSecurityGroupName" =: _adsgiDBSecurityGroupName]
data AuthorizeDBSecurityGroupIngressResponse = AuthorizeDBSecurityGroupIngressResponse'
{ _adsgirsDBSecurityGroup :: !(Maybe DBSecurityGroup)
, _adsgirsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
authorizeDBSecurityGroupIngressResponse
:: Int
-> AuthorizeDBSecurityGroupIngressResponse
authorizeDBSecurityGroupIngressResponse pResponseStatus_ =
AuthorizeDBSecurityGroupIngressResponse'
{ _adsgirsDBSecurityGroup = Nothing
, _adsgirsResponseStatus = pResponseStatus_
}
adsgirsDBSecurityGroup :: Lens' AuthorizeDBSecurityGroupIngressResponse (Maybe DBSecurityGroup)
adsgirsDBSecurityGroup = lens _adsgirsDBSecurityGroup (\ s a -> s{_adsgirsDBSecurityGroup = a});
adsgirsResponseStatus :: Lens' AuthorizeDBSecurityGroupIngressResponse Int
adsgirsResponseStatus = lens _adsgirsResponseStatus (\ s a -> s{_adsgirsResponseStatus = a});