Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data AddRoleToInstanceProfile = AddRoleToInstanceProfile' {}
- newAddRoleToInstanceProfile :: Text -> Text -> AddRoleToInstanceProfile
- addRoleToInstanceProfile_instanceProfileName :: Lens' AddRoleToInstanceProfile Text
- addRoleToInstanceProfile_roleName :: Lens' AddRoleToInstanceProfile Text
- data AddRoleToInstanceProfileResponse = AddRoleToInstanceProfileResponse' {
- newAddRoleToInstanceProfileResponse :: AddRoleToInstanceProfileResponse
Creating a Request
data AddRoleToInstanceProfile Source #
See: newAddRoleToInstanceProfile
smart constructor.
AddRoleToInstanceProfile' | |
|
Instances
newAddRoleToInstanceProfile Source #
:: Text | |
-> Text | |
-> AddRoleToInstanceProfile |
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:
$sel:instanceProfileName: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: _+=,.@-
$sel:roleName: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
newAddRoleToInstanceProfileResponse :: AddRoleToInstanceProfileResponse Source #
Create a value of AddRoleToInstanceProfileResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.