Skip to content

IAM  >  Operations  >  remove_role_from_instance_profile

remove_role_from_instance_profile

Operation

remove_role_from_instance_profile async

remove_role_from_instance_profile(input: RemoveRoleFromInstanceProfileInput, plugins: list[Plugin] | None = None) -> RemoveRoleFromInstanceProfileOutput

Removes the specified IAM role from the specified Amazon EC2 instance profile.

Warning

Make sure that you do not have any Amazon EC2 instances running with the role you are about to remove from the instance profile. Removing a role from an instance profile that is associated with a running instance might break any applications running on the instance.

For more information about roles, see IAM roles in the IAM User Guide. For more information about instance profiles, see Using instance profiles in the IAM User Guide.

Parameters:

Name Type Description Default
input RemoveRoleFromInstanceProfileInput

An instance of RemoveRoleFromInstanceProfileInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
RemoveRoleFromInstanceProfileOutput

An instance of RemoveRoleFromInstanceProfileOutput.

Input

RemoveRoleFromInstanceProfileInput dataclass

Bases: _SerdeShape

Dataclass for RemoveRoleFromInstanceProfileInput structure.

Attributes

instance_profile_name class-attribute instance-attribute
instance_profile_name: str | None = ...

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: _+=,.@-

role_name class-attribute instance-attribute
role_name: str | None = ...

The name of the role to remove.

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: _+=,.@-

Output

RemoveRoleFromInstanceProfileOutput dataclass

Bases: _SerdeShape

Dataclass for RemoveRoleFromInstanceProfileOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.