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