Questions tagged [google-cloud-resource-manager]

Google Cloud's Resource Manager allows you to group and hierarchically organize GCP's resources, facilitating the management of resources by project, folder, and organization.

Google Cloud's Resource Manager allows you to group and hierarchically organize GCP's resources, facilitating the management of resources by project, folder, and organization.

39 questions
10
votes
2 answers

How do I get the organization ID of my current project in Google Cloud Platform?

I would like to know the organization ID of my current project in GCP. gcloud projects describe PROJECT_ID will show the parent which can be the organization, but if the parent is a folder, the organization ID does not appear. I could recurse up…
Joshua Fox
  • 18,704
  • 23
  • 87
  • 147
7
votes
1 answer

How to find, list, or search resources across services (APIs) and projects in Google Cloud Platform?

In Google Cloud Platform (GCP), you can use list APIs or commands to list resources in a given project for a given type in a given service, like BigQuery datasets or compute instances. But how to find or search resources across types, services, or…
5
votes
1 answer

How to list, find, or search iam policies across services (APIs), resource types, and projects in google cloud platform (GCP)?

In Google Cloud Platform (GCP), you can only get the IAM policy for a specific resource by calling getIamPolicy (get-iam-policy in gcloud). Is there a way to list, search, list, search, or find IAM policies across resources, services, or…
4
votes
1 answer

Is there a list of restricted words for the Google Cloud project ID?

I create new Google Cloud projects using the Resource Manager API. As far as I now, passing the project ID is required. At least it's not marked "optional" in the REST API and also it fails if I try to create a new project with just the…
2
votes
1 answer

Getting "google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument" error , in list_projects method in ProjectsClient class

I am trying to list out projects using resourcemanager api. I am using the below code. from google.cloud import resourcemanager from google.cloud.resourcemanager import ProjectsClient from google.oauth2 import service_account path_json_file =…
2
votes
1 answer

Google Cloud Platform: How to fetch permissions assigned for particular Identity across all GCP resources via REST call

GCP IAM: In IAM, permission to access a resource isn't granted directly to the end-user. Instead, permissions are grouped into roles, and roles are granted to authenticated members. An IAM policy defines and enforces what roles are granted to which…
2
votes
2 answers

How to list all projects inside GCP organization using Resource Manager API?

I am trying to list all projects I have in GCP by using the projects.list method from the Resource Manager API but I cannot figure out what access token to be used. Let's say I have three projects: My Project 44572 Testing My First Project And…
1
vote
1 answer

Set Iam Policy using Resource Manager Python V3 GCP API doesn't have a policy field?

I am trying to add service accounts to a certain role in a project in GCP. In order to do so, I get the IAM policy and then add the accounts desired, but am unable to get set_iam_policy to work correctly. I add the projects_to_add to the member list…
1
vote
0 answers

I am not able to list all the projects in my GCP organization using Python

I need to list all projects under an Organization in GCP. I am using Resource Manager for the same. def list_projects(): proj_list = [] credentials = service_account.Credentials.from_service_account_file('../key.json') # Create resourcemanager_v3…
Atharva
  • 11
  • 2
1
vote
1 answer

google-cloud-resource-manage list projects 403 The caller does not have permission

I created a GCP service account and assigned the needed permissions for listing the projects inside the organization. When I'm using the gcloud cli, everything works: gcloud auth activate-service-account --key-file=./key.json gcloud projects list #…
1
vote
2 answers

How to create an Org Policy Constraint with conditions? - GCP

I am working on a small project in python, with which I could create the org policy gcp.disableSerialPortAccess as "Not Enforced" Org Policy with the condition of "tagValues/776487819778". I can feel it that is something simple, but i do not…
1
vote
1 answer

What the difference these formats of identifying a resource on gcp when running certain commands

I was trying to list the grantable roles for a project of mine on google cloud platform, and I came across these two formats for identifying the resource and running the command against. The formats…
1
vote
1 answer

Update Org Policy constraints with Python

I am working on a small project, to update an org policy constraints by using python. I want to use python because I have set up Secret Manager and Impersonation. Right now I am at this final stage, of modifying the org policy constraint I have…
1
vote
1 answer

List all GCP projects of an organization using resource manager (Java library)

I'm building an application in Java for getting all the GCP projects and all the resources under the projects of an organization. I saw one option to get all the projects under an organization using resource manager, when I hit through REST API like…
1
vote
0 answers

The Google API for creating projects in GCP initially worked, and then they no longer worked

I am developing an application that uses the google api to create projects on the google cloud platform and enable these projects to the Dialogflow api. For this reason I created a service account with the Cloud Resource Manager API and Service…
1
2 3