replace_iam_instance_profile_association
¶
replace_iam_instance_profile_association(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
56831 56832 56833 56834 56835 56836 56837 56838 56839 56840 56841 56842 56843 56844 56845 56846 56847 56848 56849 56850 56851 56852 56853 56854 56855 56856 56857 56858 56859 56860 56861 56862 56863 56864 56865 56866 56867 56868 56869 56870 56871 56872 56873 56874 56875 56876 56877 56878 56879 56880 56881 | |