{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.KMS.DeleteImportedKeyMaterial
(
DeleteImportedKeyMaterial (..),
newDeleteImportedKeyMaterial,
deleteImportedKeyMaterial_keyId,
DeleteImportedKeyMaterialResponse (..),
newDeleteImportedKeyMaterialResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.KMS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteImportedKeyMaterial = DeleteImportedKeyMaterial'
{
DeleteImportedKeyMaterial -> Text
keyId :: Prelude.Text
}
deriving (DeleteImportedKeyMaterial -> DeleteImportedKeyMaterial -> Bool
(DeleteImportedKeyMaterial -> DeleteImportedKeyMaterial -> Bool)
-> (DeleteImportedKeyMaterial -> DeleteImportedKeyMaterial -> Bool)
-> Eq DeleteImportedKeyMaterial
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteImportedKeyMaterial -> DeleteImportedKeyMaterial -> Bool
$c/= :: DeleteImportedKeyMaterial -> DeleteImportedKeyMaterial -> Bool
== :: DeleteImportedKeyMaterial -> DeleteImportedKeyMaterial -> Bool
$c== :: DeleteImportedKeyMaterial -> DeleteImportedKeyMaterial -> Bool
Prelude.Eq, ReadPrec [DeleteImportedKeyMaterial]
ReadPrec DeleteImportedKeyMaterial
Int -> ReadS DeleteImportedKeyMaterial
ReadS [DeleteImportedKeyMaterial]
(Int -> ReadS DeleteImportedKeyMaterial)
-> ReadS [DeleteImportedKeyMaterial]
-> ReadPrec DeleteImportedKeyMaterial
-> ReadPrec [DeleteImportedKeyMaterial]
-> Read DeleteImportedKeyMaterial
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteImportedKeyMaterial]
$creadListPrec :: ReadPrec [DeleteImportedKeyMaterial]
readPrec :: ReadPrec DeleteImportedKeyMaterial
$creadPrec :: ReadPrec DeleteImportedKeyMaterial
readList :: ReadS [DeleteImportedKeyMaterial]
$creadList :: ReadS [DeleteImportedKeyMaterial]
readsPrec :: Int -> ReadS DeleteImportedKeyMaterial
$creadsPrec :: Int -> ReadS DeleteImportedKeyMaterial
Prelude.Read, Int -> DeleteImportedKeyMaterial -> ShowS
[DeleteImportedKeyMaterial] -> ShowS
DeleteImportedKeyMaterial -> String
(Int -> DeleteImportedKeyMaterial -> ShowS)
-> (DeleteImportedKeyMaterial -> String)
-> ([DeleteImportedKeyMaterial] -> ShowS)
-> Show DeleteImportedKeyMaterial
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteImportedKeyMaterial] -> ShowS
$cshowList :: [DeleteImportedKeyMaterial] -> ShowS
show :: DeleteImportedKeyMaterial -> String
$cshow :: DeleteImportedKeyMaterial -> String
showsPrec :: Int -> DeleteImportedKeyMaterial -> ShowS
$cshowsPrec :: Int -> DeleteImportedKeyMaterial -> ShowS
Prelude.Show, (forall x.
DeleteImportedKeyMaterial -> Rep DeleteImportedKeyMaterial x)
-> (forall x.
Rep DeleteImportedKeyMaterial x -> DeleteImportedKeyMaterial)
-> Generic DeleteImportedKeyMaterial
forall x.
Rep DeleteImportedKeyMaterial x -> DeleteImportedKeyMaterial
forall x.
DeleteImportedKeyMaterial -> Rep DeleteImportedKeyMaterial x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteImportedKeyMaterial x -> DeleteImportedKeyMaterial
$cfrom :: forall x.
DeleteImportedKeyMaterial -> Rep DeleteImportedKeyMaterial x
Prelude.Generic)
newDeleteImportedKeyMaterial ::
Prelude.Text ->
DeleteImportedKeyMaterial
newDeleteImportedKeyMaterial :: Text -> DeleteImportedKeyMaterial
newDeleteImportedKeyMaterial Text
pKeyId_ =
DeleteImportedKeyMaterial' :: Text -> DeleteImportedKeyMaterial
DeleteImportedKeyMaterial' {$sel:keyId:DeleteImportedKeyMaterial' :: Text
keyId = Text
pKeyId_}
deleteImportedKeyMaterial_keyId :: Lens.Lens' DeleteImportedKeyMaterial Prelude.Text
deleteImportedKeyMaterial_keyId :: (Text -> f Text)
-> DeleteImportedKeyMaterial -> f DeleteImportedKeyMaterial
deleteImportedKeyMaterial_keyId = (DeleteImportedKeyMaterial -> Text)
-> (DeleteImportedKeyMaterial -> Text -> DeleteImportedKeyMaterial)
-> Lens
DeleteImportedKeyMaterial DeleteImportedKeyMaterial Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteImportedKeyMaterial' {Text
keyId :: Text
$sel:keyId:DeleteImportedKeyMaterial' :: DeleteImportedKeyMaterial -> Text
keyId} -> Text
keyId) (\s :: DeleteImportedKeyMaterial
s@DeleteImportedKeyMaterial' {} Text
a -> DeleteImportedKeyMaterial
s {$sel:keyId:DeleteImportedKeyMaterial' :: Text
keyId = Text
a} :: DeleteImportedKeyMaterial)
instance Core.AWSRequest DeleteImportedKeyMaterial where
type
AWSResponse DeleteImportedKeyMaterial =
DeleteImportedKeyMaterialResponse
request :: DeleteImportedKeyMaterial -> Request DeleteImportedKeyMaterial
request = Service
-> DeleteImportedKeyMaterial -> Request DeleteImportedKeyMaterial
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteImportedKeyMaterial
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteImportedKeyMaterial)))
response =
AWSResponse DeleteImportedKeyMaterial
-> Logger
-> Service
-> Proxy DeleteImportedKeyMaterial
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteImportedKeyMaterial)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteImportedKeyMaterial
DeleteImportedKeyMaterialResponse
DeleteImportedKeyMaterialResponse'
instance Prelude.Hashable DeleteImportedKeyMaterial
instance Prelude.NFData DeleteImportedKeyMaterial
instance Core.ToHeaders DeleteImportedKeyMaterial where
toHeaders :: DeleteImportedKeyMaterial -> [Header]
toHeaders =
[Header] -> DeleteImportedKeyMaterial -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"TrentService.DeleteImportedKeyMaterial" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteImportedKeyMaterial where
toJSON :: DeleteImportedKeyMaterial -> Value
toJSON DeleteImportedKeyMaterial' {Text
keyId :: Text
$sel:keyId:DeleteImportedKeyMaterial' :: DeleteImportedKeyMaterial -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"KeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
keyId)]
)
instance Core.ToPath DeleteImportedKeyMaterial where
toPath :: DeleteImportedKeyMaterial -> ByteString
toPath = ByteString -> DeleteImportedKeyMaterial -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteImportedKeyMaterial where
toQuery :: DeleteImportedKeyMaterial -> QueryString
toQuery = QueryString -> DeleteImportedKeyMaterial -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteImportedKeyMaterialResponse = DeleteImportedKeyMaterialResponse'
{
}
deriving (DeleteImportedKeyMaterialResponse
-> DeleteImportedKeyMaterialResponse -> Bool
(DeleteImportedKeyMaterialResponse
-> DeleteImportedKeyMaterialResponse -> Bool)
-> (DeleteImportedKeyMaterialResponse
-> DeleteImportedKeyMaterialResponse -> Bool)
-> Eq DeleteImportedKeyMaterialResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteImportedKeyMaterialResponse
-> DeleteImportedKeyMaterialResponse -> Bool
$c/= :: DeleteImportedKeyMaterialResponse
-> DeleteImportedKeyMaterialResponse -> Bool
== :: DeleteImportedKeyMaterialResponse
-> DeleteImportedKeyMaterialResponse -> Bool
$c== :: DeleteImportedKeyMaterialResponse
-> DeleteImportedKeyMaterialResponse -> Bool
Prelude.Eq, ReadPrec [DeleteImportedKeyMaterialResponse]
ReadPrec DeleteImportedKeyMaterialResponse
Int -> ReadS DeleteImportedKeyMaterialResponse
ReadS [DeleteImportedKeyMaterialResponse]
(Int -> ReadS DeleteImportedKeyMaterialResponse)
-> ReadS [DeleteImportedKeyMaterialResponse]
-> ReadPrec DeleteImportedKeyMaterialResponse
-> ReadPrec [DeleteImportedKeyMaterialResponse]
-> Read DeleteImportedKeyMaterialResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteImportedKeyMaterialResponse]
$creadListPrec :: ReadPrec [DeleteImportedKeyMaterialResponse]
readPrec :: ReadPrec DeleteImportedKeyMaterialResponse
$creadPrec :: ReadPrec DeleteImportedKeyMaterialResponse
readList :: ReadS [DeleteImportedKeyMaterialResponse]
$creadList :: ReadS [DeleteImportedKeyMaterialResponse]
readsPrec :: Int -> ReadS DeleteImportedKeyMaterialResponse
$creadsPrec :: Int -> ReadS DeleteImportedKeyMaterialResponse
Prelude.Read, Int -> DeleteImportedKeyMaterialResponse -> ShowS
[DeleteImportedKeyMaterialResponse] -> ShowS
DeleteImportedKeyMaterialResponse -> String
(Int -> DeleteImportedKeyMaterialResponse -> ShowS)
-> (DeleteImportedKeyMaterialResponse -> String)
-> ([DeleteImportedKeyMaterialResponse] -> ShowS)
-> Show DeleteImportedKeyMaterialResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteImportedKeyMaterialResponse] -> ShowS
$cshowList :: [DeleteImportedKeyMaterialResponse] -> ShowS
show :: DeleteImportedKeyMaterialResponse -> String
$cshow :: DeleteImportedKeyMaterialResponse -> String
showsPrec :: Int -> DeleteImportedKeyMaterialResponse -> ShowS
$cshowsPrec :: Int -> DeleteImportedKeyMaterialResponse -> ShowS
Prelude.Show, (forall x.
DeleteImportedKeyMaterialResponse
-> Rep DeleteImportedKeyMaterialResponse x)
-> (forall x.
Rep DeleteImportedKeyMaterialResponse x
-> DeleteImportedKeyMaterialResponse)
-> Generic DeleteImportedKeyMaterialResponse
forall x.
Rep DeleteImportedKeyMaterialResponse x
-> DeleteImportedKeyMaterialResponse
forall x.
DeleteImportedKeyMaterialResponse
-> Rep DeleteImportedKeyMaterialResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteImportedKeyMaterialResponse x
-> DeleteImportedKeyMaterialResponse
$cfrom :: forall x.
DeleteImportedKeyMaterialResponse
-> Rep DeleteImportedKeyMaterialResponse x
Prelude.Generic)
newDeleteImportedKeyMaterialResponse ::
DeleteImportedKeyMaterialResponse
newDeleteImportedKeyMaterialResponse :: DeleteImportedKeyMaterialResponse
newDeleteImportedKeyMaterialResponse =
DeleteImportedKeyMaterialResponse
DeleteImportedKeyMaterialResponse'
instance
Prelude.NFData
DeleteImportedKeyMaterialResponse