{-# 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.IAM.DeleteSSHPublicKey
(
DeleteSSHPublicKey (..),
newDeleteSSHPublicKey,
deleteSSHPublicKey_userName,
deleteSSHPublicKey_sSHPublicKeyId,
DeleteSSHPublicKeyResponse (..),
newDeleteSSHPublicKeyResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IAM.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 DeleteSSHPublicKey = DeleteSSHPublicKey'
{
DeleteSSHPublicKey -> Text
userName :: Prelude.Text,
DeleteSSHPublicKey -> Text
sSHPublicKeyId :: Prelude.Text
}
deriving (DeleteSSHPublicKey -> DeleteSSHPublicKey -> Bool
(DeleteSSHPublicKey -> DeleteSSHPublicKey -> Bool)
-> (DeleteSSHPublicKey -> DeleteSSHPublicKey -> Bool)
-> Eq DeleteSSHPublicKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSSHPublicKey -> DeleteSSHPublicKey -> Bool
$c/= :: DeleteSSHPublicKey -> DeleteSSHPublicKey -> Bool
== :: DeleteSSHPublicKey -> DeleteSSHPublicKey -> Bool
$c== :: DeleteSSHPublicKey -> DeleteSSHPublicKey -> Bool
Prelude.Eq, ReadPrec [DeleteSSHPublicKey]
ReadPrec DeleteSSHPublicKey
Int -> ReadS DeleteSSHPublicKey
ReadS [DeleteSSHPublicKey]
(Int -> ReadS DeleteSSHPublicKey)
-> ReadS [DeleteSSHPublicKey]
-> ReadPrec DeleteSSHPublicKey
-> ReadPrec [DeleteSSHPublicKey]
-> Read DeleteSSHPublicKey
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSSHPublicKey]
$creadListPrec :: ReadPrec [DeleteSSHPublicKey]
readPrec :: ReadPrec DeleteSSHPublicKey
$creadPrec :: ReadPrec DeleteSSHPublicKey
readList :: ReadS [DeleteSSHPublicKey]
$creadList :: ReadS [DeleteSSHPublicKey]
readsPrec :: Int -> ReadS DeleteSSHPublicKey
$creadsPrec :: Int -> ReadS DeleteSSHPublicKey
Prelude.Read, Int -> DeleteSSHPublicKey -> ShowS
[DeleteSSHPublicKey] -> ShowS
DeleteSSHPublicKey -> String
(Int -> DeleteSSHPublicKey -> ShowS)
-> (DeleteSSHPublicKey -> String)
-> ([DeleteSSHPublicKey] -> ShowS)
-> Show DeleteSSHPublicKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSSHPublicKey] -> ShowS
$cshowList :: [DeleteSSHPublicKey] -> ShowS
show :: DeleteSSHPublicKey -> String
$cshow :: DeleteSSHPublicKey -> String
showsPrec :: Int -> DeleteSSHPublicKey -> ShowS
$cshowsPrec :: Int -> DeleteSSHPublicKey -> ShowS
Prelude.Show, (forall x. DeleteSSHPublicKey -> Rep DeleteSSHPublicKey x)
-> (forall x. Rep DeleteSSHPublicKey x -> DeleteSSHPublicKey)
-> Generic DeleteSSHPublicKey
forall x. Rep DeleteSSHPublicKey x -> DeleteSSHPublicKey
forall x. DeleteSSHPublicKey -> Rep DeleteSSHPublicKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSSHPublicKey x -> DeleteSSHPublicKey
$cfrom :: forall x. DeleteSSHPublicKey -> Rep DeleteSSHPublicKey x
Prelude.Generic)
newDeleteSSHPublicKey ::
Prelude.Text ->
Prelude.Text ->
DeleteSSHPublicKey
newDeleteSSHPublicKey :: Text -> Text -> DeleteSSHPublicKey
newDeleteSSHPublicKey Text
pUserName_ Text
pSSHPublicKeyId_ =
DeleteSSHPublicKey' :: Text -> Text -> DeleteSSHPublicKey
DeleteSSHPublicKey'
{ $sel:userName:DeleteSSHPublicKey' :: Text
userName = Text
pUserName_,
$sel:sSHPublicKeyId:DeleteSSHPublicKey' :: Text
sSHPublicKeyId = Text
pSSHPublicKeyId_
}
deleteSSHPublicKey_userName :: Lens.Lens' DeleteSSHPublicKey Prelude.Text
deleteSSHPublicKey_userName :: (Text -> f Text) -> DeleteSSHPublicKey -> f DeleteSSHPublicKey
deleteSSHPublicKey_userName = (DeleteSSHPublicKey -> Text)
-> (DeleteSSHPublicKey -> Text -> DeleteSSHPublicKey)
-> Lens DeleteSSHPublicKey DeleteSSHPublicKey Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSSHPublicKey' {Text
userName :: Text
$sel:userName:DeleteSSHPublicKey' :: DeleteSSHPublicKey -> Text
userName} -> Text
userName) (\s :: DeleteSSHPublicKey
s@DeleteSSHPublicKey' {} Text
a -> DeleteSSHPublicKey
s {$sel:userName:DeleteSSHPublicKey' :: Text
userName = Text
a} :: DeleteSSHPublicKey)
deleteSSHPublicKey_sSHPublicKeyId :: Lens.Lens' DeleteSSHPublicKey Prelude.Text
deleteSSHPublicKey_sSHPublicKeyId :: (Text -> f Text) -> DeleteSSHPublicKey -> f DeleteSSHPublicKey
deleteSSHPublicKey_sSHPublicKeyId = (DeleteSSHPublicKey -> Text)
-> (DeleteSSHPublicKey -> Text -> DeleteSSHPublicKey)
-> Lens DeleteSSHPublicKey DeleteSSHPublicKey Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSSHPublicKey' {Text
sSHPublicKeyId :: Text
$sel:sSHPublicKeyId:DeleteSSHPublicKey' :: DeleteSSHPublicKey -> Text
sSHPublicKeyId} -> Text
sSHPublicKeyId) (\s :: DeleteSSHPublicKey
s@DeleteSSHPublicKey' {} Text
a -> DeleteSSHPublicKey
s {$sel:sSHPublicKeyId:DeleteSSHPublicKey' :: Text
sSHPublicKeyId = Text
a} :: DeleteSSHPublicKey)
instance Core.AWSRequest DeleteSSHPublicKey where
type
AWSResponse DeleteSSHPublicKey =
DeleteSSHPublicKeyResponse
request :: DeleteSSHPublicKey -> Request DeleteSSHPublicKey
request = Service -> DeleteSSHPublicKey -> Request DeleteSSHPublicKey
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSSHPublicKey
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSSHPublicKey)))
response =
AWSResponse DeleteSSHPublicKey
-> Logger
-> Service
-> Proxy DeleteSSHPublicKey
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSSHPublicKey)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteSSHPublicKey
DeleteSSHPublicKeyResponse
DeleteSSHPublicKeyResponse'
instance Prelude.Hashable DeleteSSHPublicKey
instance Prelude.NFData DeleteSSHPublicKey
instance Core.ToHeaders DeleteSSHPublicKey where
toHeaders :: DeleteSSHPublicKey -> [Header]
toHeaders = [Header] -> DeleteSSHPublicKey -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteSSHPublicKey where
toPath :: DeleteSSHPublicKey -> ByteString
toPath = ByteString -> DeleteSSHPublicKey -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteSSHPublicKey where
toQuery :: DeleteSSHPublicKey -> QueryString
toQuery DeleteSSHPublicKey' {Text
sSHPublicKeyId :: Text
userName :: Text
$sel:sSHPublicKeyId:DeleteSSHPublicKey' :: DeleteSSHPublicKey -> Text
$sel:userName:DeleteSSHPublicKey' :: DeleteSSHPublicKey -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteSSHPublicKey" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"UserName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
userName,
ByteString
"SSHPublicKeyId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sSHPublicKeyId
]
data DeleteSSHPublicKeyResponse = DeleteSSHPublicKeyResponse'
{
}
deriving (DeleteSSHPublicKeyResponse -> DeleteSSHPublicKeyResponse -> Bool
(DeleteSSHPublicKeyResponse -> DeleteSSHPublicKeyResponse -> Bool)
-> (DeleteSSHPublicKeyResponse
-> DeleteSSHPublicKeyResponse -> Bool)
-> Eq DeleteSSHPublicKeyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSSHPublicKeyResponse -> DeleteSSHPublicKeyResponse -> Bool
$c/= :: DeleteSSHPublicKeyResponse -> DeleteSSHPublicKeyResponse -> Bool
== :: DeleteSSHPublicKeyResponse -> DeleteSSHPublicKeyResponse -> Bool
$c== :: DeleteSSHPublicKeyResponse -> DeleteSSHPublicKeyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSSHPublicKeyResponse]
ReadPrec DeleteSSHPublicKeyResponse
Int -> ReadS DeleteSSHPublicKeyResponse
ReadS [DeleteSSHPublicKeyResponse]
(Int -> ReadS DeleteSSHPublicKeyResponse)
-> ReadS [DeleteSSHPublicKeyResponse]
-> ReadPrec DeleteSSHPublicKeyResponse
-> ReadPrec [DeleteSSHPublicKeyResponse]
-> Read DeleteSSHPublicKeyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSSHPublicKeyResponse]
$creadListPrec :: ReadPrec [DeleteSSHPublicKeyResponse]
readPrec :: ReadPrec DeleteSSHPublicKeyResponse
$creadPrec :: ReadPrec DeleteSSHPublicKeyResponse
readList :: ReadS [DeleteSSHPublicKeyResponse]
$creadList :: ReadS [DeleteSSHPublicKeyResponse]
readsPrec :: Int -> ReadS DeleteSSHPublicKeyResponse
$creadsPrec :: Int -> ReadS DeleteSSHPublicKeyResponse
Prelude.Read, Int -> DeleteSSHPublicKeyResponse -> ShowS
[DeleteSSHPublicKeyResponse] -> ShowS
DeleteSSHPublicKeyResponse -> String
(Int -> DeleteSSHPublicKeyResponse -> ShowS)
-> (DeleteSSHPublicKeyResponse -> String)
-> ([DeleteSSHPublicKeyResponse] -> ShowS)
-> Show DeleteSSHPublicKeyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSSHPublicKeyResponse] -> ShowS
$cshowList :: [DeleteSSHPublicKeyResponse] -> ShowS
show :: DeleteSSHPublicKeyResponse -> String
$cshow :: DeleteSSHPublicKeyResponse -> String
showsPrec :: Int -> DeleteSSHPublicKeyResponse -> ShowS
$cshowsPrec :: Int -> DeleteSSHPublicKeyResponse -> ShowS
Prelude.Show, (forall x.
DeleteSSHPublicKeyResponse -> Rep DeleteSSHPublicKeyResponse x)
-> (forall x.
Rep DeleteSSHPublicKeyResponse x -> DeleteSSHPublicKeyResponse)
-> Generic DeleteSSHPublicKeyResponse
forall x.
Rep DeleteSSHPublicKeyResponse x -> DeleteSSHPublicKeyResponse
forall x.
DeleteSSHPublicKeyResponse -> Rep DeleteSSHPublicKeyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSSHPublicKeyResponse x -> DeleteSSHPublicKeyResponse
$cfrom :: forall x.
DeleteSSHPublicKeyResponse -> Rep DeleteSSHPublicKeyResponse x
Prelude.Generic)
newDeleteSSHPublicKeyResponse ::
DeleteSSHPublicKeyResponse
newDeleteSSHPublicKeyResponse :: DeleteSSHPublicKeyResponse
newDeleteSSHPublicKeyResponse =
DeleteSSHPublicKeyResponse
DeleteSSHPublicKeyResponse'
instance Prelude.NFData DeleteSSHPublicKeyResponse