module Network.AWS.EC2.ReplaceNetworkAclAssociation
(
ReplaceNetworkAclAssociation
, replaceNetworkAclAssociation
, rnaaAssociationId
, rnaaDryRun
, rnaaNetworkAclId
, ReplaceNetworkAclAssociationResponse
, replaceNetworkAclAssociationResponse
, rnaarNewAssociationId
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data ReplaceNetworkAclAssociation = ReplaceNetworkAclAssociation
{ _rnaaAssociationId :: Text
, _rnaaDryRun :: Maybe Bool
, _rnaaNetworkAclId :: Text
} deriving (Eq, Ord, Read, Show)
replaceNetworkAclAssociation :: Text
-> Text
-> ReplaceNetworkAclAssociation
replaceNetworkAclAssociation p1 p2 = ReplaceNetworkAclAssociation
{ _rnaaAssociationId = p1
, _rnaaNetworkAclId = p2
, _rnaaDryRun = Nothing
}
rnaaAssociationId :: Lens' ReplaceNetworkAclAssociation Text
rnaaAssociationId =
lens _rnaaAssociationId (\s a -> s { _rnaaAssociationId = a })
rnaaDryRun :: Lens' ReplaceNetworkAclAssociation (Maybe Bool)
rnaaDryRun = lens _rnaaDryRun (\s a -> s { _rnaaDryRun = a })
rnaaNetworkAclId :: Lens' ReplaceNetworkAclAssociation Text
rnaaNetworkAclId = lens _rnaaNetworkAclId (\s a -> s { _rnaaNetworkAclId = a })
newtype ReplaceNetworkAclAssociationResponse = ReplaceNetworkAclAssociationResponse
{ _rnaarNewAssociationId :: Maybe Text
} deriving (Eq, Ord, Read, Show, Monoid)
replaceNetworkAclAssociationResponse :: ReplaceNetworkAclAssociationResponse
replaceNetworkAclAssociationResponse = ReplaceNetworkAclAssociationResponse
{ _rnaarNewAssociationId = Nothing
}
rnaarNewAssociationId :: Lens' ReplaceNetworkAclAssociationResponse (Maybe Text)
rnaarNewAssociationId =
lens _rnaarNewAssociationId (\s a -> s { _rnaarNewAssociationId = a })
instance ToPath ReplaceNetworkAclAssociation where
toPath = const "/"
instance ToQuery ReplaceNetworkAclAssociation where
toQuery ReplaceNetworkAclAssociation{..} = mconcat
[ "AssociationId" =? _rnaaAssociationId
, "DryRun" =? _rnaaDryRun
, "NetworkAclId" =? _rnaaNetworkAclId
]
instance ToHeaders ReplaceNetworkAclAssociation
instance AWSRequest ReplaceNetworkAclAssociation where
type Sv ReplaceNetworkAclAssociation = EC2
type Rs ReplaceNetworkAclAssociation = ReplaceNetworkAclAssociationResponse
request = post "ReplaceNetworkAclAssociation"
response = xmlResponse
instance FromXML ReplaceNetworkAclAssociationResponse where
parseXML x = ReplaceNetworkAclAssociationResponse
<$> x .@? "newAssociationId"