amazonka-iam-1.6.0: 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.AddRoleToInstanceProfile

Contents

Description

Adds the specified IAM role to the specified instance profile. An instance profile can contain only one role, and this limit cannot be increased. You can remove the existing role and then add a different role to an instance profile. You must then wait for the change to appear across all of AWS because of eventual consistency . To force the change, you must disassociate the instance profile and then associate the instance profile , or you can stop your instance and then restart it.

For more information about roles, go to Working with Roles . For more information about instance profiles, go to About Instance Profiles .

Synopsis

Creating a Request

addRoleToInstanceProfile #

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

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

  • artipInstanceProfileName - The name of the instance profile to update. 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: _+=,.@-
  • artipRoleName - The name of the role to add. 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: _+=,.@-

data AddRoleToInstanceProfile #

See: addRoleToInstanceProfile smart constructor.

Instances

Eq AddRoleToInstanceProfile # 
Data AddRoleToInstanceProfile # 

Methods

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

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

toConstr :: AddRoleToInstanceProfile -> Constr #

dataTypeOf :: AddRoleToInstanceProfile -> DataType #

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

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

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

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

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

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

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

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

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

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

Read AddRoleToInstanceProfile # 
Show AddRoleToInstanceProfile # 
Generic AddRoleToInstanceProfile # 
Hashable AddRoleToInstanceProfile # 
NFData AddRoleToInstanceProfile # 
AWSRequest AddRoleToInstanceProfile # 
ToHeaders AddRoleToInstanceProfile # 
ToPath AddRoleToInstanceProfile # 
ToQuery AddRoleToInstanceProfile # 
type Rep AddRoleToInstanceProfile # 
type Rep AddRoleToInstanceProfile = D1 * (MetaData "AddRoleToInstanceProfile" "Network.AWS.IAM.AddRoleToInstanceProfile" "amazonka-iam-1.6.0-1EzdHSXYgBWIEzsCXYmity" False) (C1 * (MetaCons "AddRoleToInstanceProfile'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_artipInstanceProfileName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_artipRoleName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))
type Rs AddRoleToInstanceProfile # 

Request Lenses

artipInstanceProfileName :: Lens' AddRoleToInstanceProfile Text #

The name of the instance profile to update. 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: _+=,.@-

artipRoleName :: Lens' AddRoleToInstanceProfile Text #

The name of the role to add. 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: _+=,.@-

Destructuring the Response

addRoleToInstanceProfileResponse :: AddRoleToInstanceProfileResponse #

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

data AddRoleToInstanceProfileResponse #

See: addRoleToInstanceProfileResponse smart constructor.

Instances

Eq AddRoleToInstanceProfileResponse # 
Data AddRoleToInstanceProfileResponse # 

Methods

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

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

toConstr :: AddRoleToInstanceProfileResponse -> Constr #

dataTypeOf :: AddRoleToInstanceProfileResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read AddRoleToInstanceProfileResponse # 
Show AddRoleToInstanceProfileResponse # 
Generic AddRoleToInstanceProfileResponse # 
NFData AddRoleToInstanceProfileResponse # 
type Rep AddRoleToInstanceProfileResponse # 
type Rep AddRoleToInstanceProfileResponse = D1 * (MetaData "AddRoleToInstanceProfileResponse" "Network.AWS.IAM.AddRoleToInstanceProfile" "amazonka-iam-1.6.0-1EzdHSXYgBWIEzsCXYmity" False) (C1 * (MetaCons "AddRoleToInstanceProfileResponse'" PrefixI False) (U1 *))