{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Module : Network.AWS.EC2.DeleteNetworkAcl -- Copyright : (c) 2013-2014 Brendan Hay -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICENSE file or -- you can obtain it at http://mozilla.org/MPL/2.0/. -- Maintainer : Brendan Hay -- Stability : experimental -- Portability : non-portable (GHC extensions) -- -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | Deletes the specified network ACL. You can't delete the ACL if it's -- associated with any subnets. You can't delete the default network ACL. -- -- module Network.AWS.EC2.DeleteNetworkAcl ( -- * Request DeleteNetworkAcl -- ** Request constructor , deleteNetworkAcl -- ** Request lenses , dnaDryRun , dnaNetworkAclId -- * Response , DeleteNetworkAclResponse -- ** Response constructor , deleteNetworkAclResponse ) where import Network.AWS.Prelude import Network.AWS.Request.Query import Network.AWS.EC2.Types import qualified GHC.Exts data DeleteNetworkAcl = DeleteNetworkAcl { _dnaDryRun :: Maybe Bool , _dnaNetworkAclId :: Text } deriving (Eq, Ord, Show) -- | 'DeleteNetworkAcl' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dnaDryRun' @::@ 'Maybe' 'Bool' -- -- * 'dnaNetworkAclId' @::@ 'Text' -- deleteNetworkAcl :: Text -- ^ 'dnaNetworkAclId' -> DeleteNetworkAcl deleteNetworkAcl p1 = DeleteNetworkAcl { _dnaNetworkAclId = p1 , _dnaDryRun = Nothing } dnaDryRun :: Lens' DeleteNetworkAcl (Maybe Bool) dnaDryRun = lens _dnaDryRun (\s a -> s { _dnaDryRun = a }) -- | The ID of the network ACL. dnaNetworkAclId :: Lens' DeleteNetworkAcl Text dnaNetworkAclId = lens _dnaNetworkAclId (\s a -> s { _dnaNetworkAclId = a }) data DeleteNetworkAclResponse = DeleteNetworkAclResponse deriving (Eq, Ord, Show, Generic) -- | 'DeleteNetworkAclResponse' constructor. deleteNetworkAclResponse :: DeleteNetworkAclResponse deleteNetworkAclResponse = DeleteNetworkAclResponse instance ToPath DeleteNetworkAcl where toPath = const "/" instance ToQuery DeleteNetworkAcl where toQuery DeleteNetworkAcl{..} = mconcat [ "dryRun" =? _dnaDryRun , "networkAclId" =? _dnaNetworkAclId ] instance ToHeaders DeleteNetworkAcl instance AWSRequest DeleteNetworkAcl where type Sv DeleteNetworkAcl = EC2 type Rs DeleteNetworkAcl = DeleteNetworkAclResponse request = post "DeleteNetworkAcl" response = nullResponse DeleteNetworkAclResponse