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
instance NFData DisableKeyRotation
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