{-# 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.DeleteImportedKeyMaterial
(
deleteImportedKeyMaterial
, DeleteImportedKeyMaterial
, dikmKeyId
, deleteImportedKeyMaterialResponse
, DeleteImportedKeyMaterialResponse
) 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 DeleteImportedKeyMaterial = DeleteImportedKeyMaterial'
{ _dikmKeyId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteImportedKeyMaterial
:: Text
-> DeleteImportedKeyMaterial
deleteImportedKeyMaterial pKeyId_ =
DeleteImportedKeyMaterial'
{ _dikmKeyId = pKeyId_
}
dikmKeyId :: Lens' DeleteImportedKeyMaterial Text
dikmKeyId = lens _dikmKeyId (\ s a -> s{_dikmKeyId = a});
instance AWSRequest DeleteImportedKeyMaterial where
type Rs DeleteImportedKeyMaterial =
DeleteImportedKeyMaterialResponse
request = postJSON kms
response
= receiveNull DeleteImportedKeyMaterialResponse'
instance Hashable DeleteImportedKeyMaterial
instance NFData DeleteImportedKeyMaterial
instance ToHeaders DeleteImportedKeyMaterial where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("TrentService.DeleteImportedKeyMaterial" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteImportedKeyMaterial where
toJSON DeleteImportedKeyMaterial'{..}
= object (catMaybes [Just ("KeyId" .= _dikmKeyId)])
instance ToPath DeleteImportedKeyMaterial where
toPath = const "/"
instance ToQuery DeleteImportedKeyMaterial where
toQuery = const mempty
data DeleteImportedKeyMaterialResponse =
DeleteImportedKeyMaterialResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteImportedKeyMaterialResponse
:: DeleteImportedKeyMaterialResponse
deleteImportedKeyMaterialResponse = DeleteImportedKeyMaterialResponse'
instance NFData DeleteImportedKeyMaterialResponse