The
resourcerestrictions client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.PROJECT_RESTRICT permission can perform these actions. Currently only PROJECT resources are supported.
List Resource Restrictions
List returns a paginated list of resource restrictions. Defaults to a page size of 50. ResourceType, when non-empty, filters to a single resource type (currently only PROJECT is supported); when empty, restrictions of all supported types are returned.
Signature:
Restrict a Resource
Restrict marks a resource as restricted and returns the restriction record. This operation is idempotent — restricting an already-restricted resource returns the existing restriction without error.
Signature:
Unrestrict a Resource
Unrestrict removes a restriction from a resource. ResourceID is the ID of the restricted resource (e.g. a project ID), not the ID of the restriction record itself — the API dereferences from the restricted resource to the restriction it holds. It returns only an error.
Signature: