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