module Network.AWS.EC2.RevokeSecurityGroupEgress
(
RevokeSecurityGroupEgress
, revokeSecurityGroupEgress
, rsgeCidrIp
, rsgeDryRun
, rsgeFromPort
, rsgeGroupId
, rsgeIpPermissions
, rsgeIpProtocol
, rsgeSourceSecurityGroupName
, rsgeSourceSecurityGroupOwnerId
, rsgeToPort
, RevokeSecurityGroupEgressResponse
, revokeSecurityGroupEgressResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data RevokeSecurityGroupEgress = RevokeSecurityGroupEgress
{ _rsgeCidrIp :: Maybe Text
, _rsgeDryRun :: Maybe Bool
, _rsgeFromPort :: Maybe Int
, _rsgeGroupId :: Text
, _rsgeIpPermissions :: List "item" IpPermission
, _rsgeIpProtocol :: Maybe Text
, _rsgeSourceSecurityGroupName :: Maybe Text
, _rsgeSourceSecurityGroupOwnerId :: Maybe Text
, _rsgeToPort :: Maybe Int
} deriving (Eq, Show)
revokeSecurityGroupEgress :: Text
-> RevokeSecurityGroupEgress
revokeSecurityGroupEgress p1 = RevokeSecurityGroupEgress
{ _rsgeGroupId = p1
, _rsgeDryRun = Nothing
, _rsgeSourceSecurityGroupName = Nothing
, _rsgeSourceSecurityGroupOwnerId = Nothing
, _rsgeIpProtocol = Nothing
, _rsgeFromPort = Nothing
, _rsgeToPort = Nothing
, _rsgeCidrIp = Nothing
, _rsgeIpPermissions = mempty
}
rsgeCidrIp :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeCidrIp = lens _rsgeCidrIp (\s a -> s { _rsgeCidrIp = a })
rsgeDryRun :: Lens' RevokeSecurityGroupEgress (Maybe Bool)
rsgeDryRun = lens _rsgeDryRun (\s a -> s { _rsgeDryRun = a })
rsgeFromPort :: Lens' RevokeSecurityGroupEgress (Maybe Int)
rsgeFromPort = lens _rsgeFromPort (\s a -> s { _rsgeFromPort = a })
rsgeGroupId :: Lens' RevokeSecurityGroupEgress Text
rsgeGroupId = lens _rsgeGroupId (\s a -> s { _rsgeGroupId = a })
rsgeIpPermissions :: Lens' RevokeSecurityGroupEgress [IpPermission]
rsgeIpPermissions =
lens _rsgeIpPermissions (\s a -> s { _rsgeIpPermissions = a })
. _List
rsgeIpProtocol :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeIpProtocol = lens _rsgeIpProtocol (\s a -> s { _rsgeIpProtocol = a })
rsgeSourceSecurityGroupName :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeSourceSecurityGroupName =
lens _rsgeSourceSecurityGroupName
(\s a -> s { _rsgeSourceSecurityGroupName = a })
rsgeSourceSecurityGroupOwnerId :: Lens' RevokeSecurityGroupEgress (Maybe Text)
rsgeSourceSecurityGroupOwnerId =
lens _rsgeSourceSecurityGroupOwnerId
(\s a -> s { _rsgeSourceSecurityGroupOwnerId = a })
rsgeToPort :: Lens' RevokeSecurityGroupEgress (Maybe Int)
rsgeToPort = lens _rsgeToPort (\s a -> s { _rsgeToPort = a })
data RevokeSecurityGroupEgressResponse = RevokeSecurityGroupEgressResponse
deriving (Eq, Ord, Show, Generic)
revokeSecurityGroupEgressResponse :: RevokeSecurityGroupEgressResponse
revokeSecurityGroupEgressResponse = RevokeSecurityGroupEgressResponse
instance ToPath RevokeSecurityGroupEgress where
toPath = const "/"
instance ToQuery RevokeSecurityGroupEgress where
toQuery RevokeSecurityGroupEgress{..} = mconcat
[ "cidrIp" =? _rsgeCidrIp
, "dryRun" =? _rsgeDryRun
, "fromPort" =? _rsgeFromPort
, "groupId" =? _rsgeGroupId
, "ipPermissions" =? _rsgeIpPermissions
, "ipProtocol" =? _rsgeIpProtocol
, "sourceSecurityGroupName" =? _rsgeSourceSecurityGroupName
, "sourceSecurityGroupOwnerId" =? _rsgeSourceSecurityGroupOwnerId
, "toPort" =? _rsgeToPort
]
instance ToHeaders RevokeSecurityGroupEgress
instance AWSRequest RevokeSecurityGroupEgress where
type Sv RevokeSecurityGroupEgress = EC2
type Rs RevokeSecurityGroupEgress = RevokeSecurityGroupEgressResponse
request = post "RevokeSecurityGroupEgress"
response = nullResponse RevokeSecurityGroupEgressResponse