deleteUser method
Deletes a specified user by user ARN and enrollment ARN.
May throw NotFoundException. May throw ConcurrentModificationException.
Parameter enrollmentId
:
The ARN of the user's enrollment in the organization. Required.
Parameter userArn
:
The ARN of the user to delete in the organization. Required.
Implementation
Future<void> deleteUser({
required String enrollmentId,
String? userArn,
}) async {
ArgumentError.checkNotNull(enrollmentId, 'enrollmentId');
_s.validateStringLength(
'enrollmentId',
enrollmentId,
0,
128,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AlexaForBusiness.DeleteUser'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'EnrollmentId': enrollmentId,
if (userArn != null) 'UserArn': userArn,
},
);
}