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.AttachRolePolicy

Contents

Description

Attaches the specified managed policy to the specified IAM role. When you attach a managed policy to a role, the managed policy becomes part of the role's permission (access) policy.

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, see 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:

  • arpRoleName - The name (friendly name, not ARN) of the role 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: _+=,.@-
  • arpPolicyARN - 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 AttachRolePolicy Source #

See: attachRolePolicy smart constructor.

Instances
Eq AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Data AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

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

Defined in Network.AWS.IAM.AttachRolePolicy

Show AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Generic AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Associated Types

type Rep AttachRolePolicy :: Type -> Type #

Hashable AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

AWSRequest AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Associated Types

type Rs AttachRolePolicy :: Type #

ToHeaders AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

ToPath AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

ToQuery AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

NFData AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Methods

rnf :: AttachRolePolicy -> () #

type Rep AttachRolePolicy Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

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

Defined in Network.AWS.IAM.AttachRolePolicy

Request Lenses

arpRoleName :: Lens' AttachRolePolicy Text Source #

The name (friendly name, not ARN) of the role 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: _+=,.@-

arpPolicyARN :: Lens' AttachRolePolicy 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

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

Defined in Network.AWS.IAM.AttachRolePolicy

Data AttachRolePolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

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

Defined in Network.AWS.IAM.AttachRolePolicy

Show AttachRolePolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Generic AttachRolePolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Associated Types

type Rep AttachRolePolicyResponse :: Type -> Type #

NFData AttachRolePolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

type Rep AttachRolePolicyResponse Source # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

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