Create an IAM user on device.
See https://docs.nabto.com/developer/guides/concepts/iam/intro.html for an intro to the concept of users and roles.
static public func createUser(connection: Connection, username: String, password: String, role: String) throws
- An established connection to the device
- Username for the new user
- Password for the new user
- IAM role for the new user
- if username is not valid as per https://docs.nabto.com/developer/api-reference/coap/iam/post-users.html#request
- if the device configuration does not allow the current user to create a new user (the
IAM:CreateUseraction is not allowed for the requesting role)
- the specified role does not exist in the device IAM configuration
- if Nabto Edge IAM is not supported by the device
an IamUser instance describing the current user