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 #

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 #

See: attachRolePolicy smart constructor.

Instances
Eq AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

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

Defined in Network.AWS.IAM.AttachRolePolicy

Show AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Generic AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Associated Types

type Rep AttachRolePolicy :: Type -> Type #

Hashable AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

AWSRequest AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Associated Types

type Rs AttachRolePolicy :: Type #

ToHeaders AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

ToPath AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

ToQuery AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

NFData AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Methods

rnf :: AttachRolePolicy -> () #

type Rep AttachRolePolicy # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

type Rep AttachRolePolicy = D1 (MetaData "AttachRolePolicy" "Network.AWS.IAM.AttachRolePolicy" "amazonka-iam-1.6.1-GVjkJ4xTMMc7GNa2rMCkPz" 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 # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Request Lenses

arpRoleName :: Lens' AttachRolePolicy Text #

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 #

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 #

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

data AttachRolePolicyResponse #

See: attachRolePolicyResponse smart constructor.

Instances
Eq AttachRolePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

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

Defined in Network.AWS.IAM.AttachRolePolicy

Show AttachRolePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Generic AttachRolePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

Associated Types

type Rep AttachRolePolicyResponse :: Type -> Type #

NFData AttachRolePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

type Rep AttachRolePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.AttachRolePolicy

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