google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

Support Cloud Identity

Open kbroughton opened this issue 3 years ago • 12 comments

I can see the gcloud client has python code for cloud identity at ~/google-cloud-sdk/lib/googlecloudsdk/command_lib/identity/groups

I want to run gcloud identity groups describe type calls using the python SDK but it doesn't appear to be supported in the new googleapis libs.

I can see this in mirrors of the googlecloudsdk at https://github.com/twistedpair/google-cloud-sdk/blob/master/google-cloud-sdk/lib/googlecloudsdk/command_lib/identity/groups/memberships/hooks.py

But it is no longer available. So it appears that the gcloud experience and the API experience will now diverge substantially.

One thing AWS did very well was match the boto3 experience with the awscli. Azure did a terrible job of this requiring cobbling together various APIs to get coverage. I hope GCP is not going down this path.

kbroughton avatar Oct 26 '21 20:10 kbroughton

Hi @kbroughton,

Thanks for opening an issue. It looks like cloudidentity/v1 is in our list of Google Cloud Client Libraries to generate. I've asked for an update on a pre-requisite step (publishing protos to https://github.com/googleapis/googleapis). I will let you know when I get a response.

Googlers see internal issue 179725617.

You may be able to use the older library google-api-python-client to access the API programmatically in the meantime.

  • https://github.com/googleapis/google-api-python-client
  • https://googleapis.github.io/google-api-python-client/docs/dyn/cloudidentity_v1.html
from googleapiclient import discovery
service = discovery.build("cloudidentity", "v1")
service.groups().memberships().list(parent="groups/abc").execute()

busunkim96 avatar Oct 27 '21 15:10 busunkim96

It looks like there are no major blockers to getting a google-cloud-* library published. The libraries should be available 1-4 weeks.

busunkim96 avatar Oct 27 '21 17:10 busunkim96

@busunkim96 Are they available now?

bcbwatt avatar May 17 '22 10:05 bcbwatt

I'm keen for this also: using discovery.build('cloudidentity', ... is a bit painful

simon-anz avatar Jun 18 '22 09:06 simon-anz

We would also like Cloud Identity APIs to be available through a Cloud Client Library for Python.

jasonpnnl avatar Jul 21 '22 22:07 jasonpnnl

Hi, any updates on this library?

Andy-Zhan avatar Sep 12 '22 05:09 Andy-Zhan

Also looking for an update. It's been a year since this issue was opened.

ngander64 avatar Oct 03 '22 21:10 ngander64

@busunkim96 I have a problem with the groups().search() API. I tried to use that command with gcloud on Google Cloud console to retrieve the groups specifying an organization id, but I can't do the same thing using the API. What is the syntax for doing the query in the groups().search() method? I've tried as follow:

response = service.groups().search(query="parent == 'organization/{org_id}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels").execute()

But I've received a googleapiclient.errors.HttpError: HttpError 400 with "Request contains an invalid argument." as error detail.

Can you help me? Many thanks in advance

emilianooddo avatar Oct 06 '22 12:10 emilianooddo

A friendly november bump. Feel free to delete or hide this comment.

thor avatar Nov 25 '22 21:11 thor

I'm still having this problem. Has anybody taken a look at this issue again? Thank you in advance!

undadasea avatar Mar 29 '23 12:03 undadasea

would like this too

pcarleton avatar Sep 06 '24 13:09 pcarleton

Googlers see internal feature request: b/365129966

parthea avatar Sep 06 '24 19:09 parthea