module Network.AWS.EC2.RevokeSecurityGroupIngress
(
RevokeSecurityGroupIngress
, revokeSecurityGroupIngress
, rsgiCidrIp
, rsgiDryRun
, rsgiFromPort
, rsgiGroupId
, rsgiGroupName
, rsgiIpPermissions
, rsgiIpProtocol
, rsgiSourceSecurityGroupName
, rsgiSourceSecurityGroupOwnerId
, rsgiToPort
, RevokeSecurityGroupIngressResponse
, revokeSecurityGroupIngressResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data RevokeSecurityGroupIngress = RevokeSecurityGroupIngress
{ _rsgiCidrIp :: Maybe Text
, _rsgiDryRun :: Maybe Bool
, _rsgiFromPort :: Maybe Int
, _rsgiGroupId :: Maybe Text
, _rsgiGroupName :: Maybe Text
, _rsgiIpPermissions :: List "item" IpPermission
, _rsgiIpProtocol :: Maybe Text
, _rsgiSourceSecurityGroupName :: Maybe Text
, _rsgiSourceSecurityGroupOwnerId :: Maybe Text
, _rsgiToPort :: Maybe Int
} deriving (Eq, Show)
revokeSecurityGroupIngress :: RevokeSecurityGroupIngress
revokeSecurityGroupIngress = RevokeSecurityGroupIngress
{ _rsgiDryRun = Nothing
, _rsgiGroupName = Nothing
, _rsgiGroupId = Nothing
, _rsgiSourceSecurityGroupName = Nothing
, _rsgiSourceSecurityGroupOwnerId = Nothing
, _rsgiIpProtocol = Nothing
, _rsgiFromPort = Nothing
, _rsgiToPort = Nothing
, _rsgiCidrIp = Nothing
, _rsgiIpPermissions = mempty
}
rsgiCidrIp :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiCidrIp = lens _rsgiCidrIp (\s a -> s { _rsgiCidrIp = a })
rsgiDryRun :: Lens' RevokeSecurityGroupIngress (Maybe Bool)
rsgiDryRun = lens _rsgiDryRun (\s a -> s { _rsgiDryRun = a })
rsgiFromPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
rsgiFromPort = lens _rsgiFromPort (\s a -> s { _rsgiFromPort = a })
rsgiGroupId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiGroupId = lens _rsgiGroupId (\s a -> s { _rsgiGroupId = a })
rsgiGroupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiGroupName = lens _rsgiGroupName (\s a -> s { _rsgiGroupName = a })
rsgiIpPermissions :: Lens' RevokeSecurityGroupIngress [IpPermission]
rsgiIpPermissions =
lens _rsgiIpPermissions (\s a -> s { _rsgiIpPermissions = a })
. _List
rsgiIpProtocol :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiIpProtocol = lens _rsgiIpProtocol (\s a -> s { _rsgiIpProtocol = a })
rsgiSourceSecurityGroupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiSourceSecurityGroupName =
lens _rsgiSourceSecurityGroupName
(\s a -> s { _rsgiSourceSecurityGroupName = a })
rsgiSourceSecurityGroupOwnerId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
rsgiSourceSecurityGroupOwnerId =
lens _rsgiSourceSecurityGroupOwnerId
(\s a -> s { _rsgiSourceSecurityGroupOwnerId = a })
rsgiToPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
rsgiToPort = lens _rsgiToPort (\s a -> s { _rsgiToPort = a })
data RevokeSecurityGroupIngressResponse = RevokeSecurityGroupIngressResponse
deriving (Eq, Ord, Show, Generic)
revokeSecurityGroupIngressResponse :: RevokeSecurityGroupIngressResponse
revokeSecurityGroupIngressResponse = RevokeSecurityGroupIngressResponse
instance ToPath RevokeSecurityGroupIngress where
toPath = const "/"
instance ToQuery RevokeSecurityGroupIngress where
toQuery RevokeSecurityGroupIngress{..} = mconcat
[ "CidrIp" =? _rsgiCidrIp
, "dryRun" =? _rsgiDryRun
, "FromPort" =? _rsgiFromPort
, "GroupId" =? _rsgiGroupId
, "GroupName" =? _rsgiGroupName
, "IpPermissions" `toQueryList` _rsgiIpPermissions
, "IpProtocol" =? _rsgiIpProtocol
, "SourceSecurityGroupName" =? _rsgiSourceSecurityGroupName
, "SourceSecurityGroupOwnerId" =? _rsgiSourceSecurityGroupOwnerId
, "ToPort" =? _rsgiToPort
]
instance ToHeaders RevokeSecurityGroupIngress
instance AWSRequest RevokeSecurityGroupIngress where
type Sv RevokeSecurityGroupIngress = EC2
type Rs RevokeSecurityGroupIngress = RevokeSecurityGroupIngressResponse
request = post "RevokeSecurityGroupIngress"
response = nullResponse RevokeSecurityGroupIngressResponse