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

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

Network.AWS.IAM.AttachRolePolicy

Contents

Description

Attaches the specified managed policy to the specified role.

When you attach a managed policy to a role, the managed policy is used as the role's access (permissions) policy. You cannot use a managed policy as the role's trust policy. The role's trust policy is created at the same time as the role, using CreateRole. You can update a role's trust policy using UpdateAssumeRolePolicy.

Use this API to attach a managed policy to a role. To embed an inline policy in a role, use PutRolePolicy. For more information about policies, refer to Managed Policies and Inline Policies in the IAM User Guide.

Synopsis

Creating a Request

attachRolePolicy Source #

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

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

data AttachRolePolicy Source #

See: attachRolePolicy smart constructor.

Instances

Eq AttachRolePolicy Source # 
Data AttachRolePolicy Source # 

Methods

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

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

toConstr :: AttachRolePolicy -> Constr #

dataTypeOf :: AttachRolePolicy -> DataType #

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

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

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

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

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

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

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

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

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

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

Read AttachRolePolicy Source # 
Show AttachRolePolicy Source # 
Generic AttachRolePolicy Source # 
Hashable AttachRolePolicy Source # 
NFData AttachRolePolicy Source # 

Methods

rnf :: AttachRolePolicy -> () #

AWSRequest AttachRolePolicy Source # 
ToPath AttachRolePolicy Source # 
ToHeaders AttachRolePolicy Source # 
ToQuery AttachRolePolicy Source # 
type Rep AttachRolePolicy Source # 
type Rep AttachRolePolicy = D1 (MetaData "AttachRolePolicy" "Network.AWS.IAM.AttachRolePolicy" "amazonka-iam-1.4.3-KkHaDC3pmsZLURksVtoSGT" False) (C1 (MetaCons "AttachRolePolicy'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_arpRoleName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_arpPolicyARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs AttachRolePolicy Source # 

Request Lenses

arpRoleName :: Lens' AttachRolePolicy Text Source #

The name (friendly name, not ARN) of the role to attach the policy to.

Destructuring the Response

attachRolePolicyResponse :: AttachRolePolicyResponse Source #

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

data AttachRolePolicyResponse Source #

See: attachRolePolicyResponse smart constructor.

Instances

Eq AttachRolePolicyResponse Source # 
Data AttachRolePolicyResponse Source # 

Methods

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

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

toConstr :: AttachRolePolicyResponse -> Constr #

dataTypeOf :: AttachRolePolicyResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read AttachRolePolicyResponse Source # 
Show AttachRolePolicyResponse Source # 
Generic AttachRolePolicyResponse Source # 
NFData AttachRolePolicyResponse Source # 
type Rep AttachRolePolicyResponse Source # 
type Rep AttachRolePolicyResponse = D1 (MetaData "AttachRolePolicyResponse" "Network.AWS.IAM.AttachRolePolicy" "amazonka-iam-1.4.3-KkHaDC3pmsZLURksVtoSGT" False) (C1 (MetaCons "AttachRolePolicyResponse'" PrefixI False) U1)