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