{-# 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.UpdateSSHPublicKey
(
UpdateSSHPublicKey (..),
newUpdateSSHPublicKey,
updateSSHPublicKey_userName,
updateSSHPublicKey_sSHPublicKeyId,
updateSSHPublicKey_status,
UpdateSSHPublicKeyResponse (..),
newUpdateSSHPublicKeyResponse,
)
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 UpdateSSHPublicKey = UpdateSSHPublicKey'
{
UpdateSSHPublicKey -> Text
userName :: Prelude.Text,
UpdateSSHPublicKey -> Text
sSHPublicKeyId :: Prelude.Text,
UpdateSSHPublicKey -> StatusType
status :: StatusType
}
deriving (UpdateSSHPublicKey -> UpdateSSHPublicKey -> Bool
(UpdateSSHPublicKey -> UpdateSSHPublicKey -> Bool)
-> (UpdateSSHPublicKey -> UpdateSSHPublicKey -> Bool)
-> Eq UpdateSSHPublicKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSSHPublicKey -> UpdateSSHPublicKey -> Bool
$c/= :: UpdateSSHPublicKey -> UpdateSSHPublicKey -> Bool
== :: UpdateSSHPublicKey -> UpdateSSHPublicKey -> Bool
$c== :: UpdateSSHPublicKey -> UpdateSSHPublicKey -> Bool
Prelude.Eq, ReadPrec [UpdateSSHPublicKey]
ReadPrec UpdateSSHPublicKey
Int -> ReadS UpdateSSHPublicKey
ReadS [UpdateSSHPublicKey]
(Int -> ReadS UpdateSSHPublicKey)
-> ReadS [UpdateSSHPublicKey]
-> ReadPrec UpdateSSHPublicKey
-> ReadPrec [UpdateSSHPublicKey]
-> Read UpdateSSHPublicKey
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSSHPublicKey]
$creadListPrec :: ReadPrec [UpdateSSHPublicKey]
readPrec :: ReadPrec UpdateSSHPublicKey
$creadPrec :: ReadPrec UpdateSSHPublicKey
readList :: ReadS [UpdateSSHPublicKey]
$creadList :: ReadS [UpdateSSHPublicKey]
readsPrec :: Int -> ReadS UpdateSSHPublicKey
$creadsPrec :: Int -> ReadS UpdateSSHPublicKey
Prelude.Read, Int -> UpdateSSHPublicKey -> ShowS
[UpdateSSHPublicKey] -> ShowS
UpdateSSHPublicKey -> String
(Int -> UpdateSSHPublicKey -> ShowS)
-> (UpdateSSHPublicKey -> String)
-> ([UpdateSSHPublicKey] -> ShowS)
-> Show UpdateSSHPublicKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSSHPublicKey] -> ShowS
$cshowList :: [UpdateSSHPublicKey] -> ShowS
show :: UpdateSSHPublicKey -> String
$cshow :: UpdateSSHPublicKey -> String
showsPrec :: Int -> UpdateSSHPublicKey -> ShowS
$cshowsPrec :: Int -> UpdateSSHPublicKey -> ShowS
Prelude.Show, (forall x. UpdateSSHPublicKey -> Rep UpdateSSHPublicKey x)
-> (forall x. Rep UpdateSSHPublicKey x -> UpdateSSHPublicKey)
-> Generic UpdateSSHPublicKey
forall x. Rep UpdateSSHPublicKey x -> UpdateSSHPublicKey
forall x. UpdateSSHPublicKey -> Rep UpdateSSHPublicKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSSHPublicKey x -> UpdateSSHPublicKey
$cfrom :: forall x. UpdateSSHPublicKey -> Rep UpdateSSHPublicKey x
Prelude.Generic)
newUpdateSSHPublicKey ::
Prelude.Text ->
Prelude.Text ->
StatusType ->
UpdateSSHPublicKey
newUpdateSSHPublicKey :: Text -> Text -> StatusType -> UpdateSSHPublicKey
newUpdateSSHPublicKey
Text
pUserName_
Text
pSSHPublicKeyId_
StatusType
pStatus_ =
UpdateSSHPublicKey' :: Text -> Text -> StatusType -> UpdateSSHPublicKey
UpdateSSHPublicKey'
{ $sel:userName:UpdateSSHPublicKey' :: Text
userName = Text
pUserName_,
$sel:sSHPublicKeyId:UpdateSSHPublicKey' :: Text
sSHPublicKeyId = Text
pSSHPublicKeyId_,
$sel:status:UpdateSSHPublicKey' :: StatusType
status = StatusType
pStatus_
}
updateSSHPublicKey_userName :: Lens.Lens' UpdateSSHPublicKey Prelude.Text
updateSSHPublicKey_userName :: (Text -> f Text) -> UpdateSSHPublicKey -> f UpdateSSHPublicKey
updateSSHPublicKey_userName = (UpdateSSHPublicKey -> Text)
-> (UpdateSSHPublicKey -> Text -> UpdateSSHPublicKey)
-> Lens UpdateSSHPublicKey UpdateSSHPublicKey Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSSHPublicKey' {Text
userName :: Text
$sel:userName:UpdateSSHPublicKey' :: UpdateSSHPublicKey -> Text
userName} -> Text
userName) (\s :: UpdateSSHPublicKey
s@UpdateSSHPublicKey' {} Text
a -> UpdateSSHPublicKey
s {$sel:userName:UpdateSSHPublicKey' :: Text
userName = Text
a} :: UpdateSSHPublicKey)
updateSSHPublicKey_sSHPublicKeyId :: Lens.Lens' UpdateSSHPublicKey Prelude.Text
updateSSHPublicKey_sSHPublicKeyId :: (Text -> f Text) -> UpdateSSHPublicKey -> f UpdateSSHPublicKey
updateSSHPublicKey_sSHPublicKeyId = (UpdateSSHPublicKey -> Text)
-> (UpdateSSHPublicKey -> Text -> UpdateSSHPublicKey)
-> Lens UpdateSSHPublicKey UpdateSSHPublicKey Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSSHPublicKey' {Text
sSHPublicKeyId :: Text
$sel:sSHPublicKeyId:UpdateSSHPublicKey' :: UpdateSSHPublicKey -> Text
sSHPublicKeyId} -> Text
sSHPublicKeyId) (\s :: UpdateSSHPublicKey
s@UpdateSSHPublicKey' {} Text
a -> UpdateSSHPublicKey
s {$sel:sSHPublicKeyId:UpdateSSHPublicKey' :: Text
sSHPublicKeyId = Text
a} :: UpdateSSHPublicKey)
updateSSHPublicKey_status :: Lens.Lens' UpdateSSHPublicKey StatusType
updateSSHPublicKey_status :: (StatusType -> f StatusType)
-> UpdateSSHPublicKey -> f UpdateSSHPublicKey
updateSSHPublicKey_status = (UpdateSSHPublicKey -> StatusType)
-> (UpdateSSHPublicKey -> StatusType -> UpdateSSHPublicKey)
-> Lens UpdateSSHPublicKey UpdateSSHPublicKey StatusType StatusType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSSHPublicKey' {StatusType
status :: StatusType
$sel:status:UpdateSSHPublicKey' :: UpdateSSHPublicKey -> StatusType
status} -> StatusType
status) (\s :: UpdateSSHPublicKey
s@UpdateSSHPublicKey' {} StatusType
a -> UpdateSSHPublicKey
s {$sel:status:UpdateSSHPublicKey' :: StatusType
status = StatusType
a} :: UpdateSSHPublicKey)
instance Core.AWSRequest UpdateSSHPublicKey where
type
AWSResponse UpdateSSHPublicKey =
UpdateSSHPublicKeyResponse
request :: UpdateSSHPublicKey -> Request UpdateSSHPublicKey
request = Service -> UpdateSSHPublicKey -> Request UpdateSSHPublicKey
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateSSHPublicKey
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateSSHPublicKey)))
response =
AWSResponse UpdateSSHPublicKey
-> Logger
-> Service
-> Proxy UpdateSSHPublicKey
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateSSHPublicKey)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UpdateSSHPublicKey
UpdateSSHPublicKeyResponse
UpdateSSHPublicKeyResponse'
instance Prelude.Hashable UpdateSSHPublicKey
instance Prelude.NFData UpdateSSHPublicKey
instance Core.ToHeaders UpdateSSHPublicKey where
toHeaders :: UpdateSSHPublicKey -> [Header]
toHeaders = [Header] -> UpdateSSHPublicKey -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath UpdateSSHPublicKey where
toPath :: UpdateSSHPublicKey -> ByteString
toPath = ByteString -> UpdateSSHPublicKey -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateSSHPublicKey where
toQuery :: UpdateSSHPublicKey -> QueryString
toQuery UpdateSSHPublicKey' {Text
StatusType
status :: StatusType
sSHPublicKeyId :: Text
userName :: Text
$sel:status:UpdateSSHPublicKey' :: UpdateSSHPublicKey -> StatusType
$sel:sSHPublicKeyId:UpdateSSHPublicKey' :: UpdateSSHPublicKey -> Text
$sel:userName:UpdateSSHPublicKey' :: UpdateSSHPublicKey -> 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
"UpdateSSHPublicKey" :: 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,
ByteString
"Status" ByteString -> StatusType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: StatusType
status
]
data UpdateSSHPublicKeyResponse = UpdateSSHPublicKeyResponse'
{
}
deriving (UpdateSSHPublicKeyResponse -> UpdateSSHPublicKeyResponse -> Bool
(UpdateSSHPublicKeyResponse -> UpdateSSHPublicKeyResponse -> Bool)
-> (UpdateSSHPublicKeyResponse
-> UpdateSSHPublicKeyResponse -> Bool)
-> Eq UpdateSSHPublicKeyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSSHPublicKeyResponse -> UpdateSSHPublicKeyResponse -> Bool
$c/= :: UpdateSSHPublicKeyResponse -> UpdateSSHPublicKeyResponse -> Bool
== :: UpdateSSHPublicKeyResponse -> UpdateSSHPublicKeyResponse -> Bool
$c== :: UpdateSSHPublicKeyResponse -> UpdateSSHPublicKeyResponse -> Bool
Prelude.Eq, ReadPrec [UpdateSSHPublicKeyResponse]
ReadPrec UpdateSSHPublicKeyResponse
Int -> ReadS UpdateSSHPublicKeyResponse
ReadS [UpdateSSHPublicKeyResponse]
(Int -> ReadS UpdateSSHPublicKeyResponse)
-> ReadS [UpdateSSHPublicKeyResponse]
-> ReadPrec UpdateSSHPublicKeyResponse
-> ReadPrec [UpdateSSHPublicKeyResponse]
-> Read UpdateSSHPublicKeyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSSHPublicKeyResponse]
$creadListPrec :: ReadPrec [UpdateSSHPublicKeyResponse]
readPrec :: ReadPrec UpdateSSHPublicKeyResponse
$creadPrec :: ReadPrec UpdateSSHPublicKeyResponse
readList :: ReadS [UpdateSSHPublicKeyResponse]
$creadList :: ReadS [UpdateSSHPublicKeyResponse]
readsPrec :: Int -> ReadS UpdateSSHPublicKeyResponse
$creadsPrec :: Int -> ReadS UpdateSSHPublicKeyResponse
Prelude.Read, Int -> UpdateSSHPublicKeyResponse -> ShowS
[UpdateSSHPublicKeyResponse] -> ShowS
UpdateSSHPublicKeyResponse -> String
(Int -> UpdateSSHPublicKeyResponse -> ShowS)
-> (UpdateSSHPublicKeyResponse -> String)
-> ([UpdateSSHPublicKeyResponse] -> ShowS)
-> Show UpdateSSHPublicKeyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSSHPublicKeyResponse] -> ShowS
$cshowList :: [UpdateSSHPublicKeyResponse] -> ShowS
show :: UpdateSSHPublicKeyResponse -> String
$cshow :: UpdateSSHPublicKeyResponse -> String
showsPrec :: Int -> UpdateSSHPublicKeyResponse -> ShowS
$cshowsPrec :: Int -> UpdateSSHPublicKeyResponse -> ShowS
Prelude.Show, (forall x.
UpdateSSHPublicKeyResponse -> Rep UpdateSSHPublicKeyResponse x)
-> (forall x.
Rep UpdateSSHPublicKeyResponse x -> UpdateSSHPublicKeyResponse)
-> Generic UpdateSSHPublicKeyResponse
forall x.
Rep UpdateSSHPublicKeyResponse x -> UpdateSSHPublicKeyResponse
forall x.
UpdateSSHPublicKeyResponse -> Rep UpdateSSHPublicKeyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateSSHPublicKeyResponse x -> UpdateSSHPublicKeyResponse
$cfrom :: forall x.
UpdateSSHPublicKeyResponse -> Rep UpdateSSHPublicKeyResponse x
Prelude.Generic)
newUpdateSSHPublicKeyResponse ::
UpdateSSHPublicKeyResponse
newUpdateSSHPublicKeyResponse :: UpdateSSHPublicKeyResponse
newUpdateSSHPublicKeyResponse =
UpdateSSHPublicKeyResponse
UpdateSSHPublicKeyResponse'
instance Prelude.NFData UpdateSSHPublicKeyResponse