Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Amazonka.EC2.AssociateIamInstanceProfile
Description
Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.
Synopsis
- data AssociateIamInstanceProfile = AssociateIamInstanceProfile' {}
- newAssociateIamInstanceProfile :: IamInstanceProfileSpecification -> Text -> AssociateIamInstanceProfile
- associateIamInstanceProfile_iamInstanceProfile :: Lens' AssociateIamInstanceProfile IamInstanceProfileSpecification
- associateIamInstanceProfile_instanceId :: Lens' AssociateIamInstanceProfile Text
- data AssociateIamInstanceProfileResponse = AssociateIamInstanceProfileResponse' {}
- newAssociateIamInstanceProfileResponse :: Int -> AssociateIamInstanceProfileResponse
- associateIamInstanceProfileResponse_iamInstanceProfileAssociation :: Lens' AssociateIamInstanceProfileResponse (Maybe IamInstanceProfileAssociation)
- associateIamInstanceProfileResponse_httpStatus :: Lens' AssociateIamInstanceProfileResponse Int
Creating a Request
data AssociateIamInstanceProfile Source #
See: newAssociateIamInstanceProfile
smart constructor.
Constructors
AssociateIamInstanceProfile' | |
Fields
|
Instances
newAssociateIamInstanceProfile Source #
Arguments
:: IamInstanceProfileSpecification | |
-> Text | |
-> AssociateIamInstanceProfile |
Create a value of AssociateIamInstanceProfile
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:
AssociateIamInstanceProfile
, associateIamInstanceProfile_iamInstanceProfile
- The IAM instance profile.
AssociateIamInstanceProfile
, associateIamInstanceProfile_instanceId
- The ID of the instance.
Request Lenses
associateIamInstanceProfile_iamInstanceProfile :: Lens' AssociateIamInstanceProfile IamInstanceProfileSpecification Source #
The IAM instance profile.
associateIamInstanceProfile_instanceId :: Lens' AssociateIamInstanceProfile Text Source #
The ID of the instance.
Destructuring the Response
data AssociateIamInstanceProfileResponse Source #
See: newAssociateIamInstanceProfileResponse
smart constructor.
Constructors
AssociateIamInstanceProfileResponse' | |
Fields
|
Instances
newAssociateIamInstanceProfileResponse Source #
Arguments
:: Int | |
-> AssociateIamInstanceProfileResponse |
Create a value of AssociateIamInstanceProfileResponse
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:iamInstanceProfileAssociation:AssociateIamInstanceProfileResponse'
, associateIamInstanceProfileResponse_iamInstanceProfileAssociation
- Information about the IAM instance profile association.
$sel:httpStatus:AssociateIamInstanceProfileResponse'
, associateIamInstanceProfileResponse_httpStatus
- The response's http status code.
Response Lenses
associateIamInstanceProfileResponse_iamInstanceProfileAssociation :: Lens' AssociateIamInstanceProfileResponse (Maybe IamInstanceProfileAssociation) Source #
Information about the IAM instance profile association.
associateIamInstanceProfileResponse_httpStatus :: Lens' AssociateIamInstanceProfileResponse Int Source #
The response's http status code.