Search code examples
pythonpython-3.xgoogle-cloud-platformgoogle-cloud-resource-manager

Where could I find further documentation for the method set_iam_policy of the google.cloud.resourcemanager_v3


I try to use the set_iam_policy method of the GCP python library google-cloud-resource-manager, but I'm unable to find appropriate documentations about the expected input. The documentation notes to use a google.iam.v1.iam_policy_pb2.SetIamPolicyRequest as input for request but SetIamPolicyRequest is not linked / described. Does anyone know how to get more information about google.iam.v1.iam_policy_pb2.SetIamPolicyRequest. enter image description here

Ideally, there is a hyperlink which provides further information, as seen in the following picture. enter image description here


Solution

  • I received from the GCP support the following URL: https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#google.iam.v1.SetIamPolicyRequest

    The website delivers the documentation for SetIamPolicyRequest, but not that detailed. For example, the field resource is not described what it should be. It worked for me that way: "resource": f"projects/{project_id}"