{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Glacier.RemoveTagsFromVault
(
removeTagsFromVault
, RemoveTagsFromVault
, rtfvTagKeys
, rtfvAccountId
, rtfvVaultName
, removeTagsFromVaultResponse
, RemoveTagsFromVaultResponse
) where
import Network.AWS.Glacier.Types
import Network.AWS.Glacier.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data RemoveTagsFromVault = RemoveTagsFromVault'
{ _rtfvTagKeys :: !(Maybe [Text])
, _rtfvAccountId :: !Text
, _rtfvVaultName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
removeTagsFromVault
:: Text
-> Text
-> RemoveTagsFromVault
removeTagsFromVault pAccountId_ pVaultName_ =
RemoveTagsFromVault'
{ _rtfvTagKeys = Nothing
, _rtfvAccountId = pAccountId_
, _rtfvVaultName = pVaultName_
}
rtfvTagKeys :: Lens' RemoveTagsFromVault [Text]
rtfvTagKeys = lens _rtfvTagKeys (\ s a -> s{_rtfvTagKeys = a}) . _Default . _Coerce
rtfvAccountId :: Lens' RemoveTagsFromVault Text
rtfvAccountId = lens _rtfvAccountId (\ s a -> s{_rtfvAccountId = a})
rtfvVaultName :: Lens' RemoveTagsFromVault Text
rtfvVaultName = lens _rtfvVaultName (\ s a -> s{_rtfvVaultName = a})
instance AWSRequest RemoveTagsFromVault where
type Rs RemoveTagsFromVault =
RemoveTagsFromVaultResponse
request = postJSON glacier
response = receiveNull RemoveTagsFromVaultResponse'
instance Hashable RemoveTagsFromVault where
instance NFData RemoveTagsFromVault where
instance ToHeaders RemoveTagsFromVault where
toHeaders = const mempty
instance ToJSON RemoveTagsFromVault where
toJSON RemoveTagsFromVault'{..}
= object
(catMaybes [("TagKeys" .=) <$> _rtfvTagKeys])
instance ToPath RemoveTagsFromVault where
toPath RemoveTagsFromVault'{..}
= mconcat
["/", toBS _rtfvAccountId, "/vaults/",
toBS _rtfvVaultName, "/tags"]
instance ToQuery RemoveTagsFromVault where
toQuery = const (mconcat ["operation=remove"])
data RemoveTagsFromVaultResponse =
RemoveTagsFromVaultResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
removeTagsFromVaultResponse
:: RemoveTagsFromVaultResponse
removeTagsFromVaultResponse = RemoveTagsFromVaultResponse'
instance NFData RemoveTagsFromVaultResponse where