module Network.AWS.EC2.CreateNetworkACLEntry
(
createNetworkACLEntry
, CreateNetworkACLEntry
, cnaeICMPTypeCode
, cnaePortRange
, cnaeDryRun
, cnaeNetworkACLId
, cnaeRuleNumber
, cnaeProtocol
, cnaeRuleAction
, cnaeEgress
, cnaeCIdRBlock
, createNetworkACLEntryResponse
, CreateNetworkACLEntryResponse
) 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 CreateNetworkACLEntry = CreateNetworkACLEntry'
{ _cnaeICMPTypeCode :: !(Maybe ICMPTypeCode)
, _cnaePortRange :: !(Maybe PortRange)
, _cnaeDryRun :: !(Maybe Bool)
, _cnaeNetworkACLId :: !Text
, _cnaeRuleNumber :: !Int
, _cnaeProtocol :: !Text
, _cnaeRuleAction :: !RuleAction
, _cnaeEgress :: !Bool
, _cnaeCIdRBlock :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createNetworkACLEntry
:: Text
-> Int
-> Text
-> RuleAction
-> Bool
-> Text
-> CreateNetworkACLEntry
createNetworkACLEntry pNetworkACLId_ pRuleNumber_ pProtocol_ pRuleAction_ pEgress_ pCIdRBlock_ =
CreateNetworkACLEntry'
{ _cnaeICMPTypeCode = Nothing
, _cnaePortRange = Nothing
, _cnaeDryRun = Nothing
, _cnaeNetworkACLId = pNetworkACLId_
, _cnaeRuleNumber = pRuleNumber_
, _cnaeProtocol = pProtocol_
, _cnaeRuleAction = pRuleAction_
, _cnaeEgress = pEgress_
, _cnaeCIdRBlock = pCIdRBlock_
}
cnaeICMPTypeCode :: Lens' CreateNetworkACLEntry (Maybe ICMPTypeCode)
cnaeICMPTypeCode = lens _cnaeICMPTypeCode (\ s a -> s{_cnaeICMPTypeCode = a});
cnaePortRange :: Lens' CreateNetworkACLEntry (Maybe PortRange)
cnaePortRange = lens _cnaePortRange (\ s a -> s{_cnaePortRange = a});
cnaeDryRun :: Lens' CreateNetworkACLEntry (Maybe Bool)
cnaeDryRun = lens _cnaeDryRun (\ s a -> s{_cnaeDryRun = a});
cnaeNetworkACLId :: Lens' CreateNetworkACLEntry Text
cnaeNetworkACLId = lens _cnaeNetworkACLId (\ s a -> s{_cnaeNetworkACLId = a});
cnaeRuleNumber :: Lens' CreateNetworkACLEntry Int
cnaeRuleNumber = lens _cnaeRuleNumber (\ s a -> s{_cnaeRuleNumber = a});
cnaeProtocol :: Lens' CreateNetworkACLEntry Text
cnaeProtocol = lens _cnaeProtocol (\ s a -> s{_cnaeProtocol = a});
cnaeRuleAction :: Lens' CreateNetworkACLEntry RuleAction
cnaeRuleAction = lens _cnaeRuleAction (\ s a -> s{_cnaeRuleAction = a});
cnaeEgress :: Lens' CreateNetworkACLEntry Bool
cnaeEgress = lens _cnaeEgress (\ s a -> s{_cnaeEgress = a});
cnaeCIdRBlock :: Lens' CreateNetworkACLEntry Text
cnaeCIdRBlock = lens _cnaeCIdRBlock (\ s a -> s{_cnaeCIdRBlock = a});
instance AWSRequest CreateNetworkACLEntry where
type Rs CreateNetworkACLEntry =
CreateNetworkACLEntryResponse
request = postQuery ec2
response = receiveNull CreateNetworkACLEntryResponse'
instance Hashable CreateNetworkACLEntry
instance NFData CreateNetworkACLEntry
instance ToHeaders CreateNetworkACLEntry where
toHeaders = const mempty
instance ToPath CreateNetworkACLEntry where
toPath = const "/"
instance ToQuery CreateNetworkACLEntry where
toQuery CreateNetworkACLEntry'{..}
= mconcat
["Action" =: ("CreateNetworkAclEntry" :: ByteString),
"Version" =: ("2015-10-01" :: ByteString),
"Icmp" =: _cnaeICMPTypeCode,
"PortRange" =: _cnaePortRange,
"DryRun" =: _cnaeDryRun,
"NetworkAclId" =: _cnaeNetworkACLId,
"RuleNumber" =: _cnaeRuleNumber,
"Protocol" =: _cnaeProtocol,
"RuleAction" =: _cnaeRuleAction,
"Egress" =: _cnaeEgress,
"CidrBlock" =: _cnaeCIdRBlock]
data CreateNetworkACLEntryResponse =
CreateNetworkACLEntryResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
createNetworkACLEntryResponse
:: CreateNetworkACLEntryResponse
createNetworkACLEntryResponse = CreateNetworkACLEntryResponse'
instance NFData CreateNetworkACLEntryResponse