associateUserToPermissionGroup method

Future<AssociateUserToPermissionGroupResponse> associateUserToPermissionGroup({
  1. required String permissionGroupId,
  2. required String userId,
  3. String? clientToken,
})

Adds a user to a permission group to grant permissions for actions a user can perform in FinSpace.

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

Parameter permissionGroupId : The unique identifier for the permission group.

Parameter userId : The unique identifier for the user.

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

Implementation

Future<AssociateUserToPermissionGroupResponse>
    associateUserToPermissionGroup({
  required String permissionGroupId,
  required String userId,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/permission-group/${Uri.encodeComponent(permissionGroupId)}/users/${Uri.encodeComponent(userId)}',
    exceptionFnMap: _exceptionFns,
  );
  return AssociateUserToPermissionGroupResponse.fromJson(response);
}