amazonka-iam-2.0: Amazon Identity and Access Management SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.IAM.AddRoleToInstanceProfile

Description

Adds the specified IAM role to the specified instance profile. An instance profile can contain only one role, and this quota 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 Amazon Web Services 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.

The caller of this operation must be granted the PassRole permission on the IAM role by a permissions policy.

For more information about roles, see Working with roles. For more information about instance profiles, see About instance profiles.

Synopsis

Creating a Request

data AddRoleToInstanceProfile Source #

See: newAddRoleToInstanceProfile smart constructor.

Constructors

AddRoleToInstanceProfile' 

Fields

  • instanceProfileName :: Text

    The name of the instance profile to update.

    This parameter allows (through 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: _+=,.@-

  • roleName :: Text

    The name of the role to add.

    This parameter allows (through 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: _+=,.@-

Instances

Instances details
ToHeaders AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

ToPath AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

ToQuery AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

AWSRequest AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Generic AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Associated Types

type Rep AddRoleToInstanceProfile :: Type -> Type #

Read AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Show AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

NFData AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Eq AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Hashable AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

type AWSResponse AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

type Rep AddRoleToInstanceProfile Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

type Rep AddRoleToInstanceProfile = D1 ('MetaData "AddRoleToInstanceProfile" "Amazonka.IAM.AddRoleToInstanceProfile" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "AddRoleToInstanceProfile'" 'PrefixI 'True) (S1 ('MetaSel ('Just "instanceProfileName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "roleName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newAddRoleToInstanceProfile Source #

Create a value of AddRoleToInstanceProfile with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

AddRoleToInstanceProfile, addRoleToInstanceProfile_instanceProfileName - The name of the instance profile to update.

This parameter allows (through 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: _+=,.@-

AddRoleToInstanceProfile, addRoleToInstanceProfile_roleName - The name of the role to add.

This parameter allows (through 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: _+=,.@-

Request Lenses

addRoleToInstanceProfile_instanceProfileName :: Lens' AddRoleToInstanceProfile Text Source #

The name of the instance profile to update.

This parameter allows (through 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: _+=,.@-

addRoleToInstanceProfile_roleName :: Lens' AddRoleToInstanceProfile Text Source #

The name of the role to add.

This parameter allows (through 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

data AddRoleToInstanceProfileResponse Source #

See: newAddRoleToInstanceProfileResponse smart constructor.

Instances

Instances details
Generic AddRoleToInstanceProfileResponse Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Associated Types

type Rep AddRoleToInstanceProfileResponse :: Type -> Type #

Read AddRoleToInstanceProfileResponse Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Show AddRoleToInstanceProfileResponse Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

NFData AddRoleToInstanceProfileResponse Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

Eq AddRoleToInstanceProfileResponse Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

type Rep AddRoleToInstanceProfileResponse Source # 
Instance details

Defined in Amazonka.IAM.AddRoleToInstanceProfile

type Rep AddRoleToInstanceProfileResponse = D1 ('MetaData "AddRoleToInstanceProfileResponse" "Amazonka.IAM.AddRoleToInstanceProfile" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "AddRoleToInstanceProfileResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newAddRoleToInstanceProfileResponse :: AddRoleToInstanceProfileResponse Source #

Create a value of AddRoleToInstanceProfileResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.