amazonka-iam-1.5.0: Amazon Identity and Access Management SDK.

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.IAM.AttachUserPolicy

Contents

Description

Attaches the specified managed policy to the specified user.

You use this API to attach a managed policy to a user. To embed an inline policy in a user, use PutUserPolicy .

For more information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

Synopsis

Creating a Request

attachUserPolicy Source #

Creates a value of AttachUserPolicy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • aupUserName - The name (friendly name, not ARN) of the IAM user to attach the policy to. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-
  • aupPolicyARN - The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .

data AttachUserPolicy Source #

See: attachUserPolicy smart constructor.

Instances

Eq AttachUserPolicy Source # 
Data AttachUserPolicy Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AttachUserPolicy -> c AttachUserPolicy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AttachUserPolicy #

toConstr :: AttachUserPolicy -> Constr #

dataTypeOf :: AttachUserPolicy -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AttachUserPolicy) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AttachUserPolicy) #

gmapT :: (forall b. Data b => b -> b) -> AttachUserPolicy -> AttachUserPolicy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AttachUserPolicy -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AttachUserPolicy -> r #

gmapQ :: (forall d. Data d => d -> u) -> AttachUserPolicy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AttachUserPolicy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AttachUserPolicy -> m AttachUserPolicy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AttachUserPolicy -> m AttachUserPolicy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AttachUserPolicy -> m AttachUserPolicy #

Read AttachUserPolicy Source # 
Show AttachUserPolicy Source # 
Generic AttachUserPolicy Source # 
Hashable AttachUserPolicy Source # 
NFData AttachUserPolicy Source # 

Methods

rnf :: AttachUserPolicy -> () #

AWSRequest AttachUserPolicy Source # 
ToQuery AttachUserPolicy Source # 
ToPath AttachUserPolicy Source # 
ToHeaders AttachUserPolicy Source # 
type Rep AttachUserPolicy Source # 
type Rep AttachUserPolicy = D1 (MetaData "AttachUserPolicy" "Network.AWS.IAM.AttachUserPolicy" "amazonka-iam-1.5.0-2w4nVHAOrDgI2P1QVLKd9e" False) (C1 (MetaCons "AttachUserPolicy'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_aupUserName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_aupPolicyARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs AttachUserPolicy Source # 

Request Lenses

aupUserName :: Lens' AttachUserPolicy Text Source #

The name (friendly name, not ARN) of the IAM user to attach the policy to. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-

aupPolicyARN :: Lens' AttachUserPolicy Text Source #

The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .

Destructuring the Response

attachUserPolicyResponse :: AttachUserPolicyResponse Source #

Creates a value of AttachUserPolicyResponse with the minimum fields required to make a request.

data AttachUserPolicyResponse Source #

See: attachUserPolicyResponse smart constructor.

Instances

Eq AttachUserPolicyResponse Source # 
Data AttachUserPolicyResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AttachUserPolicyResponse -> c AttachUserPolicyResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AttachUserPolicyResponse #

toConstr :: AttachUserPolicyResponse -> Constr #

dataTypeOf :: AttachUserPolicyResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AttachUserPolicyResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AttachUserPolicyResponse) #

gmapT :: (forall b. Data b => b -> b) -> AttachUserPolicyResponse -> AttachUserPolicyResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AttachUserPolicyResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AttachUserPolicyResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> AttachUserPolicyResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AttachUserPolicyResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AttachUserPolicyResponse -> m AttachUserPolicyResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AttachUserPolicyResponse -> m AttachUserPolicyResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AttachUserPolicyResponse -> m AttachUserPolicyResponse #

Read AttachUserPolicyResponse Source # 
Show AttachUserPolicyResponse Source # 
Generic AttachUserPolicyResponse Source # 
NFData AttachUserPolicyResponse Source # 
type Rep AttachUserPolicyResponse Source # 
type Rep AttachUserPolicyResponse = D1 (MetaData "AttachUserPolicyResponse" "Network.AWS.IAM.AttachUserPolicy" "amazonka-iam-1.5.0-2w4nVHAOrDgI2P1QVLKd9e" False) (C1 (MetaCons "AttachUserPolicyResponse'" PrefixI False) U1)