{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Glacier.DeleteVaultAccessPolicy
(
DeleteVaultAccessPolicy (..),
newDeleteVaultAccessPolicy,
deleteVaultAccessPolicy_accountId,
deleteVaultAccessPolicy_vaultName,
DeleteVaultAccessPolicyResponse (..),
newDeleteVaultAccessPolicyResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glacier.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteVaultAccessPolicy = DeleteVaultAccessPolicy'
{
DeleteVaultAccessPolicy -> Text
accountId :: Prelude.Text,
DeleteVaultAccessPolicy -> Text
vaultName :: Prelude.Text
}
deriving (DeleteVaultAccessPolicy -> DeleteVaultAccessPolicy -> Bool
(DeleteVaultAccessPolicy -> DeleteVaultAccessPolicy -> Bool)
-> (DeleteVaultAccessPolicy -> DeleteVaultAccessPolicy -> Bool)
-> Eq DeleteVaultAccessPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVaultAccessPolicy -> DeleteVaultAccessPolicy -> Bool
$c/= :: DeleteVaultAccessPolicy -> DeleteVaultAccessPolicy -> Bool
== :: DeleteVaultAccessPolicy -> DeleteVaultAccessPolicy -> Bool
$c== :: DeleteVaultAccessPolicy -> DeleteVaultAccessPolicy -> Bool
Prelude.Eq, ReadPrec [DeleteVaultAccessPolicy]
ReadPrec DeleteVaultAccessPolicy
Int -> ReadS DeleteVaultAccessPolicy
ReadS [DeleteVaultAccessPolicy]
(Int -> ReadS DeleteVaultAccessPolicy)
-> ReadS [DeleteVaultAccessPolicy]
-> ReadPrec DeleteVaultAccessPolicy
-> ReadPrec [DeleteVaultAccessPolicy]
-> Read DeleteVaultAccessPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVaultAccessPolicy]
$creadListPrec :: ReadPrec [DeleteVaultAccessPolicy]
readPrec :: ReadPrec DeleteVaultAccessPolicy
$creadPrec :: ReadPrec DeleteVaultAccessPolicy
readList :: ReadS [DeleteVaultAccessPolicy]
$creadList :: ReadS [DeleteVaultAccessPolicy]
readsPrec :: Int -> ReadS DeleteVaultAccessPolicy
$creadsPrec :: Int -> ReadS DeleteVaultAccessPolicy
Prelude.Read, Int -> DeleteVaultAccessPolicy -> ShowS
[DeleteVaultAccessPolicy] -> ShowS
DeleteVaultAccessPolicy -> String
(Int -> DeleteVaultAccessPolicy -> ShowS)
-> (DeleteVaultAccessPolicy -> String)
-> ([DeleteVaultAccessPolicy] -> ShowS)
-> Show DeleteVaultAccessPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVaultAccessPolicy] -> ShowS
$cshowList :: [DeleteVaultAccessPolicy] -> ShowS
show :: DeleteVaultAccessPolicy -> String
$cshow :: DeleteVaultAccessPolicy -> String
showsPrec :: Int -> DeleteVaultAccessPolicy -> ShowS
$cshowsPrec :: Int -> DeleteVaultAccessPolicy -> ShowS
Prelude.Show, (forall x.
DeleteVaultAccessPolicy -> Rep DeleteVaultAccessPolicy x)
-> (forall x.
Rep DeleteVaultAccessPolicy x -> DeleteVaultAccessPolicy)
-> Generic DeleteVaultAccessPolicy
forall x. Rep DeleteVaultAccessPolicy x -> DeleteVaultAccessPolicy
forall x. DeleteVaultAccessPolicy -> Rep DeleteVaultAccessPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteVaultAccessPolicy x -> DeleteVaultAccessPolicy
$cfrom :: forall x. DeleteVaultAccessPolicy -> Rep DeleteVaultAccessPolicy x
Prelude.Generic)
newDeleteVaultAccessPolicy ::
Prelude.Text ->
Prelude.Text ->
DeleteVaultAccessPolicy
newDeleteVaultAccessPolicy :: Text -> Text -> DeleteVaultAccessPolicy
newDeleteVaultAccessPolicy Text
pAccountId_ Text
pVaultName_ =
DeleteVaultAccessPolicy' :: Text -> Text -> DeleteVaultAccessPolicy
DeleteVaultAccessPolicy'
{ $sel:accountId:DeleteVaultAccessPolicy' :: Text
accountId = Text
pAccountId_,
$sel:vaultName:DeleteVaultAccessPolicy' :: Text
vaultName = Text
pVaultName_
}
deleteVaultAccessPolicy_accountId :: Lens.Lens' DeleteVaultAccessPolicy Prelude.Text
deleteVaultAccessPolicy_accountId :: (Text -> f Text)
-> DeleteVaultAccessPolicy -> f DeleteVaultAccessPolicy
deleteVaultAccessPolicy_accountId = (DeleteVaultAccessPolicy -> Text)
-> (DeleteVaultAccessPolicy -> Text -> DeleteVaultAccessPolicy)
-> Lens DeleteVaultAccessPolicy DeleteVaultAccessPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVaultAccessPolicy' {Text
accountId :: Text
$sel:accountId:DeleteVaultAccessPolicy' :: DeleteVaultAccessPolicy -> Text
accountId} -> Text
accountId) (\s :: DeleteVaultAccessPolicy
s@DeleteVaultAccessPolicy' {} Text
a -> DeleteVaultAccessPolicy
s {$sel:accountId:DeleteVaultAccessPolicy' :: Text
accountId = Text
a} :: DeleteVaultAccessPolicy)
deleteVaultAccessPolicy_vaultName :: Lens.Lens' DeleteVaultAccessPolicy Prelude.Text
deleteVaultAccessPolicy_vaultName :: (Text -> f Text)
-> DeleteVaultAccessPolicy -> f DeleteVaultAccessPolicy
deleteVaultAccessPolicy_vaultName = (DeleteVaultAccessPolicy -> Text)
-> (DeleteVaultAccessPolicy -> Text -> DeleteVaultAccessPolicy)
-> Lens DeleteVaultAccessPolicy DeleteVaultAccessPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVaultAccessPolicy' {Text
vaultName :: Text
$sel:vaultName:DeleteVaultAccessPolicy' :: DeleteVaultAccessPolicy -> Text
vaultName} -> Text
vaultName) (\s :: DeleteVaultAccessPolicy
s@DeleteVaultAccessPolicy' {} Text
a -> DeleteVaultAccessPolicy
s {$sel:vaultName:DeleteVaultAccessPolicy' :: Text
vaultName = Text
a} :: DeleteVaultAccessPolicy)
instance Core.AWSRequest DeleteVaultAccessPolicy where
type
AWSResponse DeleteVaultAccessPolicy =
DeleteVaultAccessPolicyResponse
request :: DeleteVaultAccessPolicy -> Request DeleteVaultAccessPolicy
request =
ByteString
-> Request DeleteVaultAccessPolicy
-> Request DeleteVaultAccessPolicy
forall a. ByteString -> Request a -> Request a
Request.glacierVersionHeader (Service -> ByteString
Core._serviceVersion Service
defaultService)
(Request DeleteVaultAccessPolicy
-> Request DeleteVaultAccessPolicy)
-> (DeleteVaultAccessPolicy -> Request DeleteVaultAccessPolicy)
-> DeleteVaultAccessPolicy
-> Request DeleteVaultAccessPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> DeleteVaultAccessPolicy -> Request DeleteVaultAccessPolicy
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteVaultAccessPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVaultAccessPolicy)))
response =
AWSResponse DeleteVaultAccessPolicy
-> Logger
-> Service
-> Proxy DeleteVaultAccessPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVaultAccessPolicy)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteVaultAccessPolicy
DeleteVaultAccessPolicyResponse
DeleteVaultAccessPolicyResponse'
instance Prelude.Hashable DeleteVaultAccessPolicy
instance Prelude.NFData DeleteVaultAccessPolicy
instance Core.ToHeaders DeleteVaultAccessPolicy where
toHeaders :: DeleteVaultAccessPolicy -> [Header]
toHeaders = [Header] -> DeleteVaultAccessPolicy -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteVaultAccessPolicy where
toPath :: DeleteVaultAccessPolicy -> ByteString
toPath DeleteVaultAccessPolicy' {Text
vaultName :: Text
accountId :: Text
$sel:vaultName:DeleteVaultAccessPolicy' :: DeleteVaultAccessPolicy -> Text
$sel:accountId:DeleteVaultAccessPolicy' :: DeleteVaultAccessPolicy -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
accountId,
ByteString
"/vaults/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
vaultName,
ByteString
"/access-policy"
]
instance Core.ToQuery DeleteVaultAccessPolicy where
toQuery :: DeleteVaultAccessPolicy -> QueryString
toQuery = QueryString -> DeleteVaultAccessPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteVaultAccessPolicyResponse = DeleteVaultAccessPolicyResponse'
{
}
deriving (DeleteVaultAccessPolicyResponse
-> DeleteVaultAccessPolicyResponse -> Bool
(DeleteVaultAccessPolicyResponse
-> DeleteVaultAccessPolicyResponse -> Bool)
-> (DeleteVaultAccessPolicyResponse
-> DeleteVaultAccessPolicyResponse -> Bool)
-> Eq DeleteVaultAccessPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVaultAccessPolicyResponse
-> DeleteVaultAccessPolicyResponse -> Bool
$c/= :: DeleteVaultAccessPolicyResponse
-> DeleteVaultAccessPolicyResponse -> Bool
== :: DeleteVaultAccessPolicyResponse
-> DeleteVaultAccessPolicyResponse -> Bool
$c== :: DeleteVaultAccessPolicyResponse
-> DeleteVaultAccessPolicyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVaultAccessPolicyResponse]
ReadPrec DeleteVaultAccessPolicyResponse
Int -> ReadS DeleteVaultAccessPolicyResponse
ReadS [DeleteVaultAccessPolicyResponse]
(Int -> ReadS DeleteVaultAccessPolicyResponse)
-> ReadS [DeleteVaultAccessPolicyResponse]
-> ReadPrec DeleteVaultAccessPolicyResponse
-> ReadPrec [DeleteVaultAccessPolicyResponse]
-> Read DeleteVaultAccessPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVaultAccessPolicyResponse]
$creadListPrec :: ReadPrec [DeleteVaultAccessPolicyResponse]
readPrec :: ReadPrec DeleteVaultAccessPolicyResponse
$creadPrec :: ReadPrec DeleteVaultAccessPolicyResponse
readList :: ReadS [DeleteVaultAccessPolicyResponse]
$creadList :: ReadS [DeleteVaultAccessPolicyResponse]
readsPrec :: Int -> ReadS DeleteVaultAccessPolicyResponse
$creadsPrec :: Int -> ReadS DeleteVaultAccessPolicyResponse
Prelude.Read, Int -> DeleteVaultAccessPolicyResponse -> ShowS
[DeleteVaultAccessPolicyResponse] -> ShowS
DeleteVaultAccessPolicyResponse -> String
(Int -> DeleteVaultAccessPolicyResponse -> ShowS)
-> (DeleteVaultAccessPolicyResponse -> String)
-> ([DeleteVaultAccessPolicyResponse] -> ShowS)
-> Show DeleteVaultAccessPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVaultAccessPolicyResponse] -> ShowS
$cshowList :: [DeleteVaultAccessPolicyResponse] -> ShowS
show :: DeleteVaultAccessPolicyResponse -> String
$cshow :: DeleteVaultAccessPolicyResponse -> String
showsPrec :: Int -> DeleteVaultAccessPolicyResponse -> ShowS
$cshowsPrec :: Int -> DeleteVaultAccessPolicyResponse -> ShowS
Prelude.Show, (forall x.
DeleteVaultAccessPolicyResponse
-> Rep DeleteVaultAccessPolicyResponse x)
-> (forall x.
Rep DeleteVaultAccessPolicyResponse x
-> DeleteVaultAccessPolicyResponse)
-> Generic DeleteVaultAccessPolicyResponse
forall x.
Rep DeleteVaultAccessPolicyResponse x
-> DeleteVaultAccessPolicyResponse
forall x.
DeleteVaultAccessPolicyResponse
-> Rep DeleteVaultAccessPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVaultAccessPolicyResponse x
-> DeleteVaultAccessPolicyResponse
$cfrom :: forall x.
DeleteVaultAccessPolicyResponse
-> Rep DeleteVaultAccessPolicyResponse x
Prelude.Generic)
newDeleteVaultAccessPolicyResponse ::
DeleteVaultAccessPolicyResponse
newDeleteVaultAccessPolicyResponse :: DeleteVaultAccessPolicyResponse
newDeleteVaultAccessPolicyResponse =
DeleteVaultAccessPolicyResponse
DeleteVaultAccessPolicyResponse'
instance
Prelude.NFData
DeleteVaultAccessPolicyResponse