{-# 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.UpdateServerCertificate
(
UpdateServerCertificate (..),
newUpdateServerCertificate,
updateServerCertificate_newServerCertificateName,
updateServerCertificate_newPath,
updateServerCertificate_serverCertificateName,
UpdateServerCertificateResponse (..),
newUpdateServerCertificateResponse,
)
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 UpdateServerCertificate = UpdateServerCertificate'
{
UpdateServerCertificate -> Maybe Text
newServerCertificateName' :: Prelude.Maybe Prelude.Text,
UpdateServerCertificate -> Maybe Text
newPath' :: Prelude.Maybe Prelude.Text,
UpdateServerCertificate -> Text
serverCertificateName :: Prelude.Text
}
deriving (UpdateServerCertificate -> UpdateServerCertificate -> Bool
(UpdateServerCertificate -> UpdateServerCertificate -> Bool)
-> (UpdateServerCertificate -> UpdateServerCertificate -> Bool)
-> Eq UpdateServerCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
$c/= :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
== :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
$c== :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
Prelude.Eq, ReadPrec [UpdateServerCertificate]
ReadPrec UpdateServerCertificate
Int -> ReadS UpdateServerCertificate
ReadS [UpdateServerCertificate]
(Int -> ReadS UpdateServerCertificate)
-> ReadS [UpdateServerCertificate]
-> ReadPrec UpdateServerCertificate
-> ReadPrec [UpdateServerCertificate]
-> Read UpdateServerCertificate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServerCertificate]
$creadListPrec :: ReadPrec [UpdateServerCertificate]
readPrec :: ReadPrec UpdateServerCertificate
$creadPrec :: ReadPrec UpdateServerCertificate
readList :: ReadS [UpdateServerCertificate]
$creadList :: ReadS [UpdateServerCertificate]
readsPrec :: Int -> ReadS UpdateServerCertificate
$creadsPrec :: Int -> ReadS UpdateServerCertificate
Prelude.Read, Int -> UpdateServerCertificate -> ShowS
[UpdateServerCertificate] -> ShowS
UpdateServerCertificate -> String
(Int -> UpdateServerCertificate -> ShowS)
-> (UpdateServerCertificate -> String)
-> ([UpdateServerCertificate] -> ShowS)
-> Show UpdateServerCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServerCertificate] -> ShowS
$cshowList :: [UpdateServerCertificate] -> ShowS
show :: UpdateServerCertificate -> String
$cshow :: UpdateServerCertificate -> String
showsPrec :: Int -> UpdateServerCertificate -> ShowS
$cshowsPrec :: Int -> UpdateServerCertificate -> ShowS
Prelude.Show, (forall x.
UpdateServerCertificate -> Rep UpdateServerCertificate x)
-> (forall x.
Rep UpdateServerCertificate x -> UpdateServerCertificate)
-> Generic UpdateServerCertificate
forall x. Rep UpdateServerCertificate x -> UpdateServerCertificate
forall x. UpdateServerCertificate -> Rep UpdateServerCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServerCertificate x -> UpdateServerCertificate
$cfrom :: forall x. UpdateServerCertificate -> Rep UpdateServerCertificate x
Prelude.Generic)
newUpdateServerCertificate ::
Prelude.Text ->
UpdateServerCertificate
newUpdateServerCertificate :: Text -> UpdateServerCertificate
newUpdateServerCertificate Text
pServerCertificateName_ =
UpdateServerCertificate' :: Maybe Text -> Maybe Text -> Text -> UpdateServerCertificate
UpdateServerCertificate'
{ $sel:newServerCertificateName':UpdateServerCertificate' :: Maybe Text
newServerCertificateName' =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:newPath':UpdateServerCertificate' :: Maybe Text
newPath' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverCertificateName:UpdateServerCertificate' :: Text
serverCertificateName = Text
pServerCertificateName_
}
updateServerCertificate_newServerCertificateName :: Lens.Lens' UpdateServerCertificate (Prelude.Maybe Prelude.Text)
updateServerCertificate_newServerCertificateName :: (Maybe Text -> f (Maybe Text))
-> UpdateServerCertificate -> f UpdateServerCertificate
updateServerCertificate_newServerCertificateName = (UpdateServerCertificate -> Maybe Text)
-> (UpdateServerCertificate
-> Maybe Text -> UpdateServerCertificate)
-> Lens
UpdateServerCertificate
UpdateServerCertificate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerCertificate' {Maybe Text
newServerCertificateName' :: Maybe Text
$sel:newServerCertificateName':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
newServerCertificateName'} -> Maybe Text
newServerCertificateName') (\s :: UpdateServerCertificate
s@UpdateServerCertificate' {} Maybe Text
a -> UpdateServerCertificate
s {$sel:newServerCertificateName':UpdateServerCertificate' :: Maybe Text
newServerCertificateName' = Maybe Text
a} :: UpdateServerCertificate)
updateServerCertificate_newPath :: Lens.Lens' UpdateServerCertificate (Prelude.Maybe Prelude.Text)
updateServerCertificate_newPath :: (Maybe Text -> f (Maybe Text))
-> UpdateServerCertificate -> f UpdateServerCertificate
updateServerCertificate_newPath = (UpdateServerCertificate -> Maybe Text)
-> (UpdateServerCertificate
-> Maybe Text -> UpdateServerCertificate)
-> Lens
UpdateServerCertificate
UpdateServerCertificate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerCertificate' {Maybe Text
newPath' :: Maybe Text
$sel:newPath':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
newPath'} -> Maybe Text
newPath') (\s :: UpdateServerCertificate
s@UpdateServerCertificate' {} Maybe Text
a -> UpdateServerCertificate
s {$sel:newPath':UpdateServerCertificate' :: Maybe Text
newPath' = Maybe Text
a} :: UpdateServerCertificate)
updateServerCertificate_serverCertificateName :: Lens.Lens' UpdateServerCertificate Prelude.Text
updateServerCertificate_serverCertificateName :: (Text -> f Text)
-> UpdateServerCertificate -> f UpdateServerCertificate
updateServerCertificate_serverCertificateName = (UpdateServerCertificate -> Text)
-> (UpdateServerCertificate -> Text -> UpdateServerCertificate)
-> Lens UpdateServerCertificate UpdateServerCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerCertificate' {Text
serverCertificateName :: Text
$sel:serverCertificateName:UpdateServerCertificate' :: UpdateServerCertificate -> Text
serverCertificateName} -> Text
serverCertificateName) (\s :: UpdateServerCertificate
s@UpdateServerCertificate' {} Text
a -> UpdateServerCertificate
s {$sel:serverCertificateName:UpdateServerCertificate' :: Text
serverCertificateName = Text
a} :: UpdateServerCertificate)
instance Core.AWSRequest UpdateServerCertificate where
type
AWSResponse UpdateServerCertificate =
UpdateServerCertificateResponse
request :: UpdateServerCertificate -> Request UpdateServerCertificate
request = Service
-> UpdateServerCertificate -> Request UpdateServerCertificate
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateServerCertificate)))
response =
AWSResponse UpdateServerCertificate
-> Logger
-> Service
-> Proxy UpdateServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateServerCertificate)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdateServerCertificate
UpdateServerCertificateResponse
UpdateServerCertificateResponse'
instance Prelude.Hashable UpdateServerCertificate
instance Prelude.NFData UpdateServerCertificate
instance Core.ToHeaders UpdateServerCertificate where
toHeaders :: UpdateServerCertificate -> [Header]
toHeaders = [Header] -> UpdateServerCertificate -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath UpdateServerCertificate where
toPath :: UpdateServerCertificate -> ByteString
toPath = ByteString -> UpdateServerCertificate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateServerCertificate where
toQuery :: UpdateServerCertificate -> QueryString
toQuery UpdateServerCertificate' {Maybe Text
Text
serverCertificateName :: Text
newPath' :: Maybe Text
newServerCertificateName' :: Maybe Text
$sel:serverCertificateName:UpdateServerCertificate' :: UpdateServerCertificate -> Text
$sel:newPath':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
$sel:newServerCertificateName':UpdateServerCertificate' :: UpdateServerCertificate -> 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
"UpdateServerCertificate" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"NewServerCertificateName"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
newServerCertificateName',
ByteString
"NewPath" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
newPath',
ByteString
"ServerCertificateName"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serverCertificateName
]
data UpdateServerCertificateResponse = UpdateServerCertificateResponse'
{
}
deriving (UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
(UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool)
-> (UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool)
-> Eq UpdateServerCertificateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
$c/= :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
== :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
$c== :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
Prelude.Eq, ReadPrec [UpdateServerCertificateResponse]
ReadPrec UpdateServerCertificateResponse
Int -> ReadS UpdateServerCertificateResponse
ReadS [UpdateServerCertificateResponse]
(Int -> ReadS UpdateServerCertificateResponse)
-> ReadS [UpdateServerCertificateResponse]
-> ReadPrec UpdateServerCertificateResponse
-> ReadPrec [UpdateServerCertificateResponse]
-> Read UpdateServerCertificateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServerCertificateResponse]
$creadListPrec :: ReadPrec [UpdateServerCertificateResponse]
readPrec :: ReadPrec UpdateServerCertificateResponse
$creadPrec :: ReadPrec UpdateServerCertificateResponse
readList :: ReadS [UpdateServerCertificateResponse]
$creadList :: ReadS [UpdateServerCertificateResponse]
readsPrec :: Int -> ReadS UpdateServerCertificateResponse
$creadsPrec :: Int -> ReadS UpdateServerCertificateResponse
Prelude.Read, Int -> UpdateServerCertificateResponse -> ShowS
[UpdateServerCertificateResponse] -> ShowS
UpdateServerCertificateResponse -> String
(Int -> UpdateServerCertificateResponse -> ShowS)
-> (UpdateServerCertificateResponse -> String)
-> ([UpdateServerCertificateResponse] -> ShowS)
-> Show UpdateServerCertificateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServerCertificateResponse] -> ShowS
$cshowList :: [UpdateServerCertificateResponse] -> ShowS
show :: UpdateServerCertificateResponse -> String
$cshow :: UpdateServerCertificateResponse -> String
showsPrec :: Int -> UpdateServerCertificateResponse -> ShowS
$cshowsPrec :: Int -> UpdateServerCertificateResponse -> ShowS
Prelude.Show, (forall x.
UpdateServerCertificateResponse
-> Rep UpdateServerCertificateResponse x)
-> (forall x.
Rep UpdateServerCertificateResponse x
-> UpdateServerCertificateResponse)
-> Generic UpdateServerCertificateResponse
forall x.
Rep UpdateServerCertificateResponse x
-> UpdateServerCertificateResponse
forall x.
UpdateServerCertificateResponse
-> Rep UpdateServerCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateServerCertificateResponse x
-> UpdateServerCertificateResponse
$cfrom :: forall x.
UpdateServerCertificateResponse
-> Rep UpdateServerCertificateResponse x
Prelude.Generic)
newUpdateServerCertificateResponse ::
UpdateServerCertificateResponse
newUpdateServerCertificateResponse :: UpdateServerCertificateResponse
newUpdateServerCertificateResponse =
UpdateServerCertificateResponse
UpdateServerCertificateResponse'
instance
Prelude.NFData
UpdateServerCertificateResponse