catalog_permission.

put_declarative_permissions

put_declarative_permissions(workspace_id: str, declarative_workspace_permissions: CatalogDeclarativeWorkspacePermissions)

Sets the permissions for the workspace.

Parameters

nametypedescription
workspace_idstringWorkspace identification string. e.g. "demo"
declarative_workspace_permissionsCatalogDeclarativeWorkspacePermissionsObject Containing Workspace Permissions.

Returns

None

Example

permissions=[CatalogDeclarativeSingleWorkspacePermission(name="ANALYZE", assignee=CatalogAssigneeIdentifier(id="demo", type="user"))]
hierarchy_permissions=[CatalogDeclarativeWorkspaceHierarchyPermission(name="ANALYZE", assignee=CatalogAssigneeIdentifier(id="adminGroup", type="userGroup"))]
declarative_permissions = CatalogDeclarativeWorkspacePermissions(permissions=permissions, hierarchy_permissions=hierarchy_permissions)

# Update permissions on the server with your changes
sdk.catalog_permission.put_declarative_permissions(workspace_id=workspace_id,
                                                    declarative_workspace_permissions=declarative_permissions)