{-# 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.CertificateManagerPCA.UntagCertificateAuthority
(
untagCertificateAuthority
, UntagCertificateAuthority
, uCertificateAuthorityARN
, uTags
, untagCertificateAuthorityResponse
, UntagCertificateAuthorityResponse
) where
import Network.AWS.CertificateManagerPCA.Types
import Network.AWS.CertificateManagerPCA.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UntagCertificateAuthority = UntagCertificateAuthority'
{ _uCertificateAuthorityARN :: !Text
, _uTags :: !(List1 Tag)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagCertificateAuthority
:: Text
-> NonEmpty Tag
-> UntagCertificateAuthority
untagCertificateAuthority pCertificateAuthorityARN_ pTags_ =
UntagCertificateAuthority'
{ _uCertificateAuthorityARN = pCertificateAuthorityARN_
, _uTags = _List1 # pTags_
}
uCertificateAuthorityARN :: Lens' UntagCertificateAuthority Text
uCertificateAuthorityARN = lens _uCertificateAuthorityARN (\ s a -> s{_uCertificateAuthorityARN = a})
uTags :: Lens' UntagCertificateAuthority (NonEmpty Tag)
uTags = lens _uTags (\ s a -> s{_uTags = a}) . _List1
instance AWSRequest UntagCertificateAuthority where
type Rs UntagCertificateAuthority =
UntagCertificateAuthorityResponse
request = postJSON certificateManagerPCA
response
= receiveNull UntagCertificateAuthorityResponse'
instance Hashable UntagCertificateAuthority where
instance NFData UntagCertificateAuthority where
instance ToHeaders UntagCertificateAuthority where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("ACMPrivateCA.UntagCertificateAuthority" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UntagCertificateAuthority where
toJSON UntagCertificateAuthority'{..}
= object
(catMaybes
[Just
("CertificateAuthorityArn" .=
_uCertificateAuthorityARN),
Just ("Tags" .= _uTags)])
instance ToPath UntagCertificateAuthority where
toPath = const "/"
instance ToQuery UntagCertificateAuthority where
toQuery = const mempty
data UntagCertificateAuthorityResponse =
UntagCertificateAuthorityResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
untagCertificateAuthorityResponse
:: UntagCertificateAuthorityResponse
untagCertificateAuthorityResponse = UntagCertificateAuthorityResponse'
instance NFData UntagCertificateAuthorityResponse
where