Update an IAM user’s role on device.
Known issue: This function currently assumes the user exists. To be able to interpret the ROLE_DOES_NOT_EXIST code correctly, this assumption most hold. Later it can gracefully handle non-existing users
This function is meant to be used in a Kotlin coroutine to suspend execution until the operation has completed.
See https://docs.nabto.com/developer/guides/iam/intro.html for an intro to the concept of roles.
suspend fun IamUtil.awaitUpdateUserRole( connection: Connection, username: String, role: String, )
- An established connection to the device
- Username for the user that should have password updated
- New role for the user
- if the specified user does not exist on the device (see note above)
- the specified role does not exist in the device IAM configuration (see note above)
- if the device configuration does not allow the current user to update the specified user's role (the
IAM:SetUserRoleaction is not allowed for the requesting role for the
- if Nabto Edge IAM is not supported by the device