updatePermissions method

Future<UpdatePermissionsResponse> updatePermissions({
  1. required List<UpdateInstruction> updateInstructionBatch,
  2. required String workspaceId,
})

Updates which users in a workspace have the Grafana Admin or Editor roles.

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

Parameter updateInstructionBatch : An array of structures that contain the permission updates to make.

Parameter workspaceId : The ID of the workspace to update.

Implementation

Future<UpdatePermissionsResponse> updatePermissions({
  required List<UpdateInstruction> updateInstructionBatch,
  required String workspaceId,
}) async {
  final $payload = <String, dynamic>{
    'updateInstructionBatch': updateInstructionBatch,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/workspaces/${Uri.encodeComponent(workspaceId)}/permissions',
    exceptionFnMap: _exceptionFns,
  );
  return UpdatePermissionsResponse.fromJson(response);
}