{-# 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.DeleteCertificateAuthority
(
deleteCertificateAuthority
, DeleteCertificateAuthority
, dcaCertificateAuthorityARN
, deleteCertificateAuthorityResponse
, DeleteCertificateAuthorityResponse
) 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
newtype DeleteCertificateAuthority = DeleteCertificateAuthority'
{ _dcaCertificateAuthorityARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteCertificateAuthority
:: Text
-> DeleteCertificateAuthority
deleteCertificateAuthority pCertificateAuthorityARN_ =
DeleteCertificateAuthority'
{_dcaCertificateAuthorityARN = pCertificateAuthorityARN_}
dcaCertificateAuthorityARN :: Lens' DeleteCertificateAuthority Text
dcaCertificateAuthorityARN = lens _dcaCertificateAuthorityARN (\ s a -> s{_dcaCertificateAuthorityARN = a})
instance AWSRequest DeleteCertificateAuthority where
type Rs DeleteCertificateAuthority =
DeleteCertificateAuthorityResponse
request = postJSON certificateManagerPCA
response
= receiveNull DeleteCertificateAuthorityResponse'
instance Hashable DeleteCertificateAuthority where
instance NFData DeleteCertificateAuthority where
instance ToHeaders DeleteCertificateAuthority where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("ACMPrivateCA.DeleteCertificateAuthority" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteCertificateAuthority where
toJSON DeleteCertificateAuthority'{..}
= object
(catMaybes
[Just
("CertificateAuthorityArn" .=
_dcaCertificateAuthorityARN)])
instance ToPath DeleteCertificateAuthority where
toPath = const "/"
instance ToQuery DeleteCertificateAuthority where
toQuery = const mempty
data DeleteCertificateAuthorityResponse =
DeleteCertificateAuthorityResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteCertificateAuthorityResponse
:: DeleteCertificateAuthorityResponse
deleteCertificateAuthorityResponse = DeleteCertificateAuthorityResponse'
instance NFData DeleteCertificateAuthorityResponse
where