Skip to main content
The resource_restrictions functions are currently in ALPHA. The API may change without notice. A one-time warning is emitted on first use.
Restricting a resource prevents roles bound at higher hierarchy levels (space, org, account) from granting access to it. Only users with the PROJECT_RESTRICT permission can perform these actions. Currently only PROJECT resources are supported.

Restrict a Resource

import { restrictResource } from "@arizeai/ax-client";

const restriction = await restrictResource({
  resourceId: "your_project_id",  // global ID of the resource to restrict
});

Unrestrict a Resource

import { unrestrictResource } from "@arizeai/ax-client";

await unrestrictResource({
  resourceId: "your_project_id",  // global ID of the resource to unrestrict
});