IamUtil.renameUser()
DESCRIPTION
Update an IAM user’s username on device.
DECLARATION
static public func renameUser(connection: Connection,
username: String,
newUsername: String) throws
PARAMETERS
connection:- An established connection to the device
username:- Username for the user that should have username updated
newUsername:- New username for the user
THROWS ERRORS
USER_DOES_NOT_EXIST:- if the specified user does not exist on the device.
INVALID_INPUT:- if username is not valid as per https://docs.nabto.com/developer/api-reference/coap/iam/post-users.html#request
BLOCKED_BY_DEVICE_CONFIGURATION:- if the device configuration does not allow the current user to update the specified user's display name (the
IAM:SetUserUsernameaction is not allowed for the requesting role for theIAM:Usernameuser) IAM_NOT_SUPPORTED:- if Nabto Edge IAM is not supported by the device