deleteInstanceProfile method
Deletes the specified instance profile. The instance profile must not have an associated role. For more information about instance profiles, go to About Instance Profiles.
May throw NoSuchEntityException. May throw DeleteConflictException. May throw LimitExceededException. May throw ServiceFailureException.
Parameter instanceProfileName
:
The name of the instance profile to delete.
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> deleteInstanceProfile({
required String instanceProfileName,
}) async {
ArgumentError.checkNotNull(instanceProfileName, 'instanceProfileName');
_s.validateStringLength(
'instanceProfileName',
instanceProfileName,
1,
128,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['InstanceProfileName'] = instanceProfileName;
await _protocol.send(
$request,
action: 'DeleteInstanceProfile',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DeleteInstanceProfileRequest'],
shapes: shapes,
);
}