module Network.AWS.EC2.ReplaceNetworkAclEntry
(
ReplaceNetworkAclEntry
, replaceNetworkAclEntry
, rnaeCidrBlock
, rnaeDryRun
, rnaeEgress
, rnaeIcmpTypeCode
, rnaeNetworkAclId
, rnaePortRange
, rnaeProtocol
, rnaeRuleAction
, rnaeRuleNumber
, ReplaceNetworkAclEntryResponse
, replaceNetworkAclEntryResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data ReplaceNetworkAclEntry = ReplaceNetworkAclEntry
{ _rnaeCidrBlock :: Text
, _rnaeDryRun :: Maybe Bool
, _rnaeEgress :: Bool
, _rnaeIcmpTypeCode :: Maybe IcmpTypeCode
, _rnaeNetworkAclId :: Text
, _rnaePortRange :: Maybe PortRange
, _rnaeProtocol :: Text
, _rnaeRuleAction :: Text
, _rnaeRuleNumber :: Int
} deriving (Eq, Show)
replaceNetworkAclEntry :: Text
-> Int
-> Text
-> Text
-> Bool
-> Text
-> ReplaceNetworkAclEntry
replaceNetworkAclEntry p1 p2 p3 p4 p5 p6 = ReplaceNetworkAclEntry
{ _rnaeNetworkAclId = p1
, _rnaeRuleNumber = p2
, _rnaeProtocol = p3
, _rnaeRuleAction = p4
, _rnaeEgress = p5
, _rnaeCidrBlock = p6
, _rnaeDryRun = Nothing
, _rnaeIcmpTypeCode = Nothing
, _rnaePortRange = Nothing
}
rnaeCidrBlock :: Lens' ReplaceNetworkAclEntry Text
rnaeCidrBlock = lens _rnaeCidrBlock (\s a -> s { _rnaeCidrBlock = a })
rnaeDryRun :: Lens' ReplaceNetworkAclEntry (Maybe Bool)
rnaeDryRun = lens _rnaeDryRun (\s a -> s { _rnaeDryRun = a })
rnaeEgress :: Lens' ReplaceNetworkAclEntry Bool
rnaeEgress = lens _rnaeEgress (\s a -> s { _rnaeEgress = a })
rnaeIcmpTypeCode :: Lens' ReplaceNetworkAclEntry (Maybe IcmpTypeCode)
rnaeIcmpTypeCode = lens _rnaeIcmpTypeCode (\s a -> s { _rnaeIcmpTypeCode = a })
rnaeNetworkAclId :: Lens' ReplaceNetworkAclEntry Text
rnaeNetworkAclId = lens _rnaeNetworkAclId (\s a -> s { _rnaeNetworkAclId = a })
rnaePortRange :: Lens' ReplaceNetworkAclEntry (Maybe PortRange)
rnaePortRange = lens _rnaePortRange (\s a -> s { _rnaePortRange = a })
rnaeProtocol :: Lens' ReplaceNetworkAclEntry Text
rnaeProtocol = lens _rnaeProtocol (\s a -> s { _rnaeProtocol = a })
rnaeRuleAction :: Lens' ReplaceNetworkAclEntry Text
rnaeRuleAction = lens _rnaeRuleAction (\s a -> s { _rnaeRuleAction = a })
rnaeRuleNumber :: Lens' ReplaceNetworkAclEntry Int
rnaeRuleNumber = lens _rnaeRuleNumber (\s a -> s { _rnaeRuleNumber = a })
data ReplaceNetworkAclEntryResponse = ReplaceNetworkAclEntryResponse
deriving (Eq, Ord, Show, Generic)
replaceNetworkAclEntryResponse :: ReplaceNetworkAclEntryResponse
replaceNetworkAclEntryResponse = ReplaceNetworkAclEntryResponse
instance ToPath ReplaceNetworkAclEntry where
toPath = const "/"
instance ToQuery ReplaceNetworkAclEntry where
toQuery ReplaceNetworkAclEntry{..} = mconcat
[ "cidrBlock" =? _rnaeCidrBlock
, "dryRun" =? _rnaeDryRun
, "egress" =? _rnaeEgress
, "Icmp" =? _rnaeIcmpTypeCode
, "networkAclId" =? _rnaeNetworkAclId
, "portRange" =? _rnaePortRange
, "protocol" =? _rnaeProtocol
, "ruleAction" =? _rnaeRuleAction
, "ruleNumber" =? _rnaeRuleNumber
]
instance ToHeaders ReplaceNetworkAclEntry
instance AWSRequest ReplaceNetworkAclEntry where
type Sv ReplaceNetworkAclEntry = EC2
type Rs ReplaceNetworkAclEntry = ReplaceNetworkAclEntryResponse
request = post "ReplaceNetworkAclEntry"
response = nullResponse ReplaceNetworkAclEntryResponse