Kotlin: IamUtil.awaitUpdateUserDisplayName()

DESCRIPTION

Update an IAM user’s display name on device.

This function is meant to be used in a Kotlin coroutine to suspend execution until the operation has completed.

DECLARATION

suspend fun IamUtil.awaitUpdateUserDisplayName(
    connection: Connection,
    username: String,
    displayName: String,
) 

PARAMETERS

connection:
An established connection to the device
username:
Username for the user that should have display name updated
displayName:
New display name

THROWS EXCEPTIONS

USER_DOES_NOT_EXIST:
if the specified user does not exist on the device (see note above)
BLOCKED_BY_DEVICE_CONFIGURATION:
if the device configuration does not allow the current user to update the specified user's display name (the IAM:SetUserDisplayName action is not allowed for the requesting role for the IAM:Username user)
IAM_NOT_SUPPORTED:
if Nabto Edge IAM is not supported by the device