{-# 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.CertificateManager.RemoveTagsFromCertificate
(
removeTagsFromCertificate
, RemoveTagsFromCertificate
, rtfcCertificateARN
, rtfcTags
, removeTagsFromCertificateResponse
, RemoveTagsFromCertificateResponse
) where
import Network.AWS.CertificateManager.Types
import Network.AWS.CertificateManager.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data RemoveTagsFromCertificate = RemoveTagsFromCertificate'
{ _rtfcCertificateARN :: !Text
, _rtfcTags :: !(List1 Tag)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
removeTagsFromCertificate
:: Text
-> NonEmpty Tag
-> RemoveTagsFromCertificate
removeTagsFromCertificate pCertificateARN_ pTags_ =
RemoveTagsFromCertificate'
{_rtfcCertificateARN = pCertificateARN_, _rtfcTags = _List1 # pTags_}
rtfcCertificateARN :: Lens' RemoveTagsFromCertificate Text
rtfcCertificateARN = lens _rtfcCertificateARN (\ s a -> s{_rtfcCertificateARN = a})
rtfcTags :: Lens' RemoveTagsFromCertificate (NonEmpty Tag)
rtfcTags = lens _rtfcTags (\ s a -> s{_rtfcTags = a}) . _List1
instance AWSRequest RemoveTagsFromCertificate where
type Rs RemoveTagsFromCertificate =
RemoveTagsFromCertificateResponse
request = postJSON certificateManager
response
= receiveNull RemoveTagsFromCertificateResponse'
instance Hashable RemoveTagsFromCertificate where
instance NFData RemoveTagsFromCertificate where
instance ToHeaders RemoveTagsFromCertificate where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CertificateManager.RemoveTagsFromCertificate" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RemoveTagsFromCertificate where
toJSON RemoveTagsFromCertificate'{..}
= object
(catMaybes
[Just ("CertificateArn" .= _rtfcCertificateARN),
Just ("Tags" .= _rtfcTags)])
instance ToPath RemoveTagsFromCertificate where
toPath = const "/"
instance ToQuery RemoveTagsFromCertificate where
toQuery = const mempty
data RemoveTagsFromCertificateResponse =
RemoveTagsFromCertificateResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
removeTagsFromCertificateResponse
:: RemoveTagsFromCertificateResponse
removeTagsFromCertificateResponse = RemoveTagsFromCertificateResponse'
instance NFData RemoveTagsFromCertificateResponse
where