From 7721542340c4b8f92318bd534e4f87806f8cf29d Mon Sep 17 00:00:00 2001 From: Simon Heckmann Date: Fri, 27 Sep 2024 09:52:05 +0200 Subject: [PATCH] Update compass.py Small enhancements to the documentation for compass.api_update_resource_roles with a payload example for patch_grants --- .../src/foundry_dev_tools/clients/compass.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/foundry-dev-tools/src/foundry_dev_tools/clients/compass.py b/libs/foundry-dev-tools/src/foundry_dev_tools/clients/compass.py index f1bd1d6..0d4f52f 100644 --- a/libs/foundry-dev-tools/src/foundry_dev_tools/clients/compass.py +++ b/libs/foundry-dev-tools/src/foundry_dev_tools/clients/compass.py @@ -1093,7 +1093,18 @@ def api_update_resource_roles( Args: rid: resource identifier, for the resource for which roles will be updated - grant_patches: the role grants that should be patched + grant_patches: list of role grants that should be patched. + grant_patches have the following structure + [{ + "patchOperation": "ADD" | "REMOVE", + "roleGrant": { + "role": roleset_id, + "principal": { + "id": multipass_id, + "type": "USER" | "GROUP" | "EVERYONE" + } + } + }] disable_inherited_permissions_for_principals: patch role grants for the provided inherited permissions disable_inherited_permissions: disable inherited permissions **kwargs: gets passed to :py:meth:`APIClient.api_request`