addUser method
Create a new user.
Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.
Parameters:
useridID of the user.passwordPassword of the user. Defaults to''.displayNameDisplay name of the user. Defaults to''.emailEmail of the user. Defaults to''.groupsGroups of the user. Defaults to[].subadminGroups where the user is subadmin. Defaults to[].quotaQuota of the user. Defaults to''.languageLanguage of the user. Defaults to''.managerManager of the user.oCSAPIRequestRequired to be true for the API request to pass. Defaults totrue.
Status codes:
- 200: User added successfully
- 403: Missing permissions to make user subadmin
See:
- addUserRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.
Implementation
Future<DynamiteResponse<UsersAddUserResponseApplicationJson, void>> addUser({
required String userid,
String? password,
String? displayName,
String? email,
BuiltList<String>? groups,
BuiltList<String>? subadmin,
String? quota,
String? language,
String? manager,
bool? oCSAPIRequest,
}) async {
final rawResponse = addUserRaw(
userid: userid,
password: password,
displayName: displayName,
email: email,
groups: groups,
subadmin: subadmin,
quota: quota,
language: language,
manager: manager,
oCSAPIRequest: oCSAPIRequest,
);
return rawResponse.future;
}