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