module Network.AWS.EC2.RevokeSecurityGroupIngress
(
revokeSecurityGroupIngress
, RevokeSecurityGroupIngress
, rsgiFromPort
, rsgiIPPermissions
, rsgiIPProtocol
, rsgiGroupId
, rsgiToPort
, rsgiCIdRIP
, rsgiSourceSecurityGroupOwnerId
, rsgiGroupName
, rsgiSourceSecurityGroupName
, rsgiDryRun
, revokeSecurityGroupIngressResponse
, RevokeSecurityGroupIngressResponse
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data RevokeSecurityGroupIngress = RevokeSecurityGroupIngress'
{ _rsgiFromPort :: !(Maybe Int)
, _rsgiIPPermissions :: !(Maybe [IPPermission])
, _rsgiIPProtocol :: !(Maybe Text)
, _rsgiGroupId :: !(Maybe Text)
, _rsgiToPort :: !(Maybe Int)
, _rsgiCIdRIP :: !(Maybe Text)
, _rsgiSourceSecurityGroupOwnerId :: !(Maybe Text)
, _rsgiGroupName :: !(Maybe Text)
, _rsgiSourceSecurityGroupName :: !(Maybe Text)
, _rsgiDryRun :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
revokeSecurityGroupIngress
:: RevokeSecurityGroupIngress
revokeSecurityGroupIngress =
RevokeSecurityGroupIngress'
{ _rsgiFromPort = Nothing
, _rsgiIPPermissions = Nothing
, _rsgiIPProtocol = Nothing
, _rsgiGroupId = Nothing
, _rsgiToPort = Nothing
, _rsgiCIdRIP = Nothing
, _rsgiSourceSecurityGroupOwnerId = Nothing
, _rsgiGroupName = Nothing
, _rsgiSourceSecurityGroupName = Nothing
, _rsgiDryRun = Nothing
}
rsgiFromPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
rsgiFromPort = lens _rsgiFromPort (\ s a -> s{_rsgiFromPort = a});
rsgiIPPermissions :: Lens' RevokeSecurityGroupIngress [IPPermission]
rsgiIPPermissions = lens _rsgiIPPermissions (\ s a -> s{_rsgiIPPermissions = a}) . _Default . _Coerce;
rsgiIPProtocol :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiIPProtocol = lens _rsgiIPProtocol (\ s a -> s{_rsgiIPProtocol = a});
rsgiGroupId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiGroupId = lens _rsgiGroupId (\ s a -> s{_rsgiGroupId = a});
rsgiToPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
rsgiToPort = lens _rsgiToPort (\ s a -> s{_rsgiToPort = a});
rsgiCIdRIP :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiCIdRIP = lens _rsgiCIdRIP (\ s a -> s{_rsgiCIdRIP = a});
rsgiSourceSecurityGroupOwnerId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiSourceSecurityGroupOwnerId = lens _rsgiSourceSecurityGroupOwnerId (\ s a -> s{_rsgiSourceSecurityGroupOwnerId = a});
rsgiGroupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiGroupName = lens _rsgiGroupName (\ s a -> s{_rsgiGroupName = a});
rsgiSourceSecurityGroupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiSourceSecurityGroupName = lens _rsgiSourceSecurityGroupName (\ s a -> s{_rsgiSourceSecurityGroupName = a});
rsgiDryRun :: Lens' RevokeSecurityGroupIngress (Maybe Bool)
rsgiDryRun = lens _rsgiDryRun (\ s a -> s{_rsgiDryRun = a});
instance AWSRequest RevokeSecurityGroupIngress where
type Rs RevokeSecurityGroupIngress =
RevokeSecurityGroupIngressResponse
request = postQuery ec2
response
= receiveNull RevokeSecurityGroupIngressResponse'
instance Hashable RevokeSecurityGroupIngress
instance ToHeaders RevokeSecurityGroupIngress where
toHeaders = const mempty
instance ToPath RevokeSecurityGroupIngress where
toPath = const "/"
instance ToQuery RevokeSecurityGroupIngress where
toQuery RevokeSecurityGroupIngress'{..}
= mconcat
["Action" =:
("RevokeSecurityGroupIngress" :: ByteString),
"Version" =: ("2015-10-01" :: ByteString),
"FromPort" =: _rsgiFromPort,
toQuery
(toQueryList "IpPermissions" <$> _rsgiIPPermissions),
"IpProtocol" =: _rsgiIPProtocol,
"GroupId" =: _rsgiGroupId, "ToPort" =: _rsgiToPort,
"CidrIp" =: _rsgiCIdRIP,
"SourceSecurityGroupOwnerId" =:
_rsgiSourceSecurityGroupOwnerId,
"GroupName" =: _rsgiGroupName,
"SourceSecurityGroupName" =:
_rsgiSourceSecurityGroupName,
"DryRun" =: _rsgiDryRun]
data RevokeSecurityGroupIngressResponse =
RevokeSecurityGroupIngressResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
revokeSecurityGroupIngressResponse
:: RevokeSecurityGroupIngressResponse
revokeSecurityGroupIngressResponse = RevokeSecurityGroupIngressResponse'