module Network.AWS.EC2.RevokeSecurityGroupEgress
(
revokeSecurityGroupEgress
, RevokeSecurityGroupEgress
, rsgeFromPort
, rsgeIPPermissions
, rsgeIPProtocol
, rsgeToPort
, rsgeCIdRIP
, rsgeSourceSecurityGroupOwnerId
, rsgeSourceSecurityGroupName
, rsgeDryRun
, rsgeGroupId
, revokeSecurityGroupEgressResponse
, RevokeSecurityGroupEgressResponse
) 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 RevokeSecurityGroupEgress = RevokeSecurityGroupEgress'
{ _rsgeFromPort :: !(Maybe Int)
, _rsgeIPPermissions :: !(Maybe [IPPermission])
, _rsgeIPProtocol :: !(Maybe Text)
, _rsgeToPort :: !(Maybe Int)
, _rsgeCIdRIP :: !(Maybe Text)
, _rsgeSourceSecurityGroupOwnerId :: !(Maybe Text)
, _rsgeSourceSecurityGroupName :: !(Maybe Text)
, _rsgeDryRun :: !(Maybe Bool)
, _rsgeGroupId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
revokeSecurityGroupEgress
:: Text
-> RevokeSecurityGroupEgress
revokeSecurityGroupEgress pGroupId_ =
RevokeSecurityGroupEgress'
{ _rsgeFromPort = Nothing
, _rsgeIPPermissions = Nothing
, _rsgeIPProtocol = Nothing
, _rsgeToPort = Nothing
, _rsgeCIdRIP = Nothing
, _rsgeSourceSecurityGroupOwnerId = Nothing
, _rsgeSourceSecurityGroupName = Nothing
, _rsgeDryRun = Nothing
, _rsgeGroupId = pGroupId_
}
rsgeFromPort :: Lens' RevokeSecurityGroupEgress (Maybe Int)
rsgeFromPort = lens _rsgeFromPort (\ s a -> s{_rsgeFromPort = a});
rsgeIPPermissions :: Lens' RevokeSecurityGroupEgress [IPPermission]
rsgeIPPermissions = lens _rsgeIPPermissions (\ s a -> s{_rsgeIPPermissions = a}) . _Default . _Coerce;
rsgeIPProtocol :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeIPProtocol = lens _rsgeIPProtocol (\ s a -> s{_rsgeIPProtocol = a});
rsgeToPort :: Lens' RevokeSecurityGroupEgress (Maybe Int)
rsgeToPort = lens _rsgeToPort (\ s a -> s{_rsgeToPort = a});
rsgeCIdRIP :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeCIdRIP = lens _rsgeCIdRIP (\ s a -> s{_rsgeCIdRIP = a});
rsgeSourceSecurityGroupOwnerId :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeSourceSecurityGroupOwnerId = lens _rsgeSourceSecurityGroupOwnerId (\ s a -> s{_rsgeSourceSecurityGroupOwnerId = a});
rsgeSourceSecurityGroupName :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeSourceSecurityGroupName = lens _rsgeSourceSecurityGroupName (\ s a -> s{_rsgeSourceSecurityGroupName = a});
rsgeDryRun :: Lens' RevokeSecurityGroupEgress (Maybe Bool)
rsgeDryRun = lens _rsgeDryRun (\ s a -> s{_rsgeDryRun = a});
rsgeGroupId :: Lens' RevokeSecurityGroupEgress Text
rsgeGroupId = lens _rsgeGroupId (\ s a -> s{_rsgeGroupId = a});
instance AWSRequest RevokeSecurityGroupEgress where
type Rs RevokeSecurityGroupEgress =
RevokeSecurityGroupEgressResponse
request = postQuery ec2
response
= receiveNull RevokeSecurityGroupEgressResponse'
instance Hashable RevokeSecurityGroupEgress
instance ToHeaders RevokeSecurityGroupEgress where
toHeaders = const mempty
instance ToPath RevokeSecurityGroupEgress where
toPath = const "/"
instance ToQuery RevokeSecurityGroupEgress where
toQuery RevokeSecurityGroupEgress'{..}
= mconcat
["Action" =:
("RevokeSecurityGroupEgress" :: ByteString),
"Version" =: ("2015-10-01" :: ByteString),
"FromPort" =: _rsgeFromPort,
toQuery
(toQueryList "IpPermissions" <$> _rsgeIPPermissions),
"IpProtocol" =: _rsgeIPProtocol,
"ToPort" =: _rsgeToPort, "CidrIp" =: _rsgeCIdRIP,
"SourceSecurityGroupOwnerId" =:
_rsgeSourceSecurityGroupOwnerId,
"SourceSecurityGroupName" =:
_rsgeSourceSecurityGroupName,
"DryRun" =: _rsgeDryRun, "GroupId" =: _rsgeGroupId]
data RevokeSecurityGroupEgressResponse =
RevokeSecurityGroupEgressResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
revokeSecurityGroupEgressResponse
:: RevokeSecurityGroupEgressResponse
revokeSecurityGroupEgressResponse = RevokeSecurityGroupEgressResponse'