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