Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture resourceType from GET Groups API #154

Closed
nsenno-dbr opened this issue Jun 8, 2023 · 2 comments
Closed

Capture resourceType from GET Groups API #154

nsenno-dbr opened this issue Jun 8, 2023 · 2 comments
Labels
OpenAPI issues related to metadata across all SDKs

Comments

@nsenno-dbr
Copy link

The SCIM Groups API returns a value under meta.resourceType which can have a value of Group (account level group) or WorkspaceGroup (workspace local group).

Currently, the SDK does not capture this piece of information

@dataclass
class Group:
    display_name: str = None
    entitlements: 'List[ComplexValue]' = None
    external_id: str = None
    groups: 'List[ComplexValue]' = None
    id: str = None
    members: 'List[ComplexValue]' = None
    roles: 'List[ComplexValue]' = None

Note that the value is present when accessing the API directly

image

I propose we add the meta.resourceType field to the Group data class. This functionality is currently leveraged by the UC-Migration project

Note that I'm happy to make an attempt at contributing this functionality. I don't see any contribution guides for this project.

@nfx nfx added the OpenAPI issues related to metadata across all SDKs label Jun 8, 2023
@nfx
Copy link
Contributor

nfx commented Jun 8, 2023

@nsenno-dbr this is done on the level of OpenAPI spec in the universe, adding the meta now..

@nfx
Copy link
Contributor

nfx commented Jun 8, 2023

as per discussion: please use

from databricks.sdk import AccountClient
a = AccountClient()
for g in a.groups.list():
  ...

@nfx nfx closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenAPI issues related to metadata across all SDKs
Projects
None yet
Development

No branches or pull requests

2 participants