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