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

Copyright(c) 2013-2018 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 # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Data AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

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 # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Show AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Generic AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Associated Types

type Rep AttachUserPolicy :: Type -> Type #

Hashable AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

AWSRequest AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Associated Types

type Rs AttachUserPolicy :: Type #

ToHeaders AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

ToPath AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

ToQuery AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

NFData AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Methods

rnf :: AttachUserPolicy -> () #

type Rep AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

type Rep AttachUserPolicy = D1 (MetaData "AttachUserPolicy" "Network.AWS.IAM.AttachUserPolicy" "amazonka-iam-1.6.1-BDjAp2BAcQu3GSS4Bsr6zu" False) (C1 (MetaCons "AttachUserPolicy'" PrefixI True) (S1 (MetaSel (Just "_aupUserName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_aupPolicyARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))
type Rs AttachUserPolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

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 # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Data AttachUserPolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

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 # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Show AttachUserPolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Generic AttachUserPolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

Associated Types

type Rep AttachUserPolicyResponse :: Type -> Type #

NFData AttachUserPolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

type Rep AttachUserPolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachUserPolicy

type Rep AttachUserPolicyResponse = D1 (MetaData "AttachUserPolicyResponse" "Network.AWS.IAM.AttachUserPolicy" "amazonka-iam-1.6.1-BDjAp2BAcQu3GSS4Bsr6zu" False) (C1 (MetaCons "AttachUserPolicyResponse'" PrefixI False) (U1 :: Type -> Type))