{-# 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.UpdateCertificateOptions
(
updateCertificateOptions
, UpdateCertificateOptions
, ucoCertificateARN
, ucoOptions
, updateCertificateOptionsResponse
, UpdateCertificateOptionsResponse
) 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 UpdateCertificateOptions = UpdateCertificateOptions'
{ _ucoCertificateARN :: !Text
, _ucoOptions :: !CertificateOptions
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateCertificateOptions
:: Text
-> CertificateOptions
-> UpdateCertificateOptions
updateCertificateOptions pCertificateARN_ pOptions_ =
UpdateCertificateOptions'
{_ucoCertificateARN = pCertificateARN_, _ucoOptions = pOptions_}
ucoCertificateARN :: Lens' UpdateCertificateOptions Text
ucoCertificateARN = lens _ucoCertificateARN (\ s a -> s{_ucoCertificateARN = a})
ucoOptions :: Lens' UpdateCertificateOptions CertificateOptions
ucoOptions = lens _ucoOptions (\ s a -> s{_ucoOptions = a})
instance AWSRequest UpdateCertificateOptions where
type Rs UpdateCertificateOptions =
UpdateCertificateOptionsResponse
request = postJSON certificateManager
response
= receiveNull UpdateCertificateOptionsResponse'
instance Hashable UpdateCertificateOptions where
instance NFData UpdateCertificateOptions where
instance ToHeaders UpdateCertificateOptions where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CertificateManager.UpdateCertificateOptions" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateCertificateOptions where
toJSON UpdateCertificateOptions'{..}
= object
(catMaybes
[Just ("CertificateArn" .= _ucoCertificateARN),
Just ("Options" .= _ucoOptions)])
instance ToPath UpdateCertificateOptions where
toPath = const "/"
instance ToQuery UpdateCertificateOptions where
toQuery = const mempty
data UpdateCertificateOptionsResponse =
UpdateCertificateOptionsResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
updateCertificateOptionsResponse
:: UpdateCertificateOptionsResponse
updateCertificateOptionsResponse = UpdateCertificateOptionsResponse'
instance NFData UpdateCertificateOptionsResponse
where