deleteUserProfile method

Future<DeleteUserProfileResult> deleteUserProfile({
  1. required String userArn,
})

Deletes a user profile in AWS CodeStar, including all personal preference data associated with that profile, such as display name and email address. It does not delete the history of that user, for example the history of commits made by that user.

May throw ValidationException.

Parameter userArn : The Amazon Resource Name (ARN) of the user to delete from AWS CodeStar.

Implementation

Future<DeleteUserProfileResult> deleteUserProfile({
  required String userArn,
}) async {
  ArgumentError.checkNotNull(userArn, 'userArn');
  _s.validateStringLength(
    'userArn',
    userArn,
    32,
    95,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeStar_20170419.DeleteUserProfile'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'userArn': userArn,
    },
  );

  return DeleteUserProfileResult.fromJson(jsonResponse.body);
}