replace_iam_instance_profile_association
async
¶
replace_iam_instance_profile_association(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
iam_instance_profile: Optional[IamInstanceProfileSpecification] = None,
association_id: Optional[IamInstanceProfileAssociationId] = None,
) -> ReplaceIamInstanceProfileAssociationResult
Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.
Use DescribeIamInstanceProfileAssociations to get the association ID.
Parameters:
-
iam_instance_profile(Optional[IamInstanceProfileSpecification], default:None) –The IAM instance profile.
-
association_id(Optional[IamInstanceProfileAssociationId], default:None) –The ID of the existing IAM instance profile association.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
57625 57626 57627 57628 57629 57630 57631 57632 57633 57634 57635 57636 57637 57638 57639 57640 57641 57642 57643 57644 57645 57646 57647 57648 57649 57650 57651 57652 57653 57654 57655 57656 57657 57658 57659 57660 57661 57662 57663 57664 57665 57666 57667 57668 57669 57670 57671 57672 57673 57674 57675 57676 | |