{-# 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.KMS.DisableKeyRotation
(
disableKeyRotation
, DisableKeyRotation
, dkrKeyId
, disableKeyRotationResponse
, DisableKeyRotationResponse
) where
import Network.AWS.KMS.Types
import Network.AWS.KMS.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DisableKeyRotation = DisableKeyRotation'
{ _dkrKeyId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disableKeyRotation
:: Text
-> DisableKeyRotation
disableKeyRotation pKeyId_ = DisableKeyRotation' {_dkrKeyId = pKeyId_}
dkrKeyId :: Lens' DisableKeyRotation Text
dkrKeyId = lens _dkrKeyId (\ s a -> s{_dkrKeyId = a})
instance AWSRequest DisableKeyRotation where
type Rs DisableKeyRotation =
DisableKeyRotationResponse
request = postJSON kms
response = receiveNull DisableKeyRotationResponse'
instance Hashable DisableKeyRotation where
instance NFData DisableKeyRotation where
instance ToHeaders DisableKeyRotation where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("TrentService.DisableKeyRotation" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisableKeyRotation where
toJSON DisableKeyRotation'{..}
= object (catMaybes [Just ("KeyId" .= _dkrKeyId)])
instance ToPath DisableKeyRotation where
toPath = const "/"
instance ToQuery DisableKeyRotation where
toQuery = const mempty
data DisableKeyRotationResponse =
DisableKeyRotationResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
disableKeyRotationResponse
:: DisableKeyRotationResponse
disableKeyRotationResponse = DisableKeyRotationResponse'
instance NFData DisableKeyRotationResponse where