removeRoleFromInstanceProfile method
Removes the specified IAM role from the specified Amazon EC2 instance profile. 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.
May throw LimitExceededException.
May throw NoSuchEntityException.
May throw ServiceFailureException.
May throw UnmodifiableEntityException.
Parameter 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: _+=,.@-
Parameter roleName :
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: _+=,.@-
Implementation
Future<void> removeRoleFromInstanceProfile({
required String instanceProfileName,
required String roleName,
}) async {
final $request = <String, String>{
'InstanceProfileName': instanceProfileName,
'RoleName': roleName,
};
await _protocol.send(
$request,
action: 'RemoveRoleFromInstanceProfile',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
);
}