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