updateKxUser method

Future<UpdateKxUserResponse> updateKxUser({
  1. required String environmentId,
  2. required String iamRole,
  3. required String userName,
  4. String? clientToken,
})

Updates the user details. You can only update the IAM role associated with a user.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter environmentId : A unique identifier for the kdb environment.

Parameter iamRole : The IAM role ARN that is associated with the user.

Parameter userName : A unique identifier for the user.

Parameter clientToken : A token that ensures idempotency. This token expires in 10 minutes.

Implementation

Future<UpdateKxUserResponse> updateKxUser({
  required String environmentId,
  required String iamRole,
  required String userName,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'iamRole': iamRole,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/kx/environments/${Uri.encodeComponent(environmentId)}/users/${Uri.encodeComponent(userName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateKxUserResponse.fromJson(response);
}