GCP projects under an org or folder
Lists the GCP projects directly under one parent container - an organization or a folder. Project enumeration is the entry point for any org-wide GCP audit: the projectId values returned here are the fan-out dimension for every per-project query.
Query
SELECT projectId, displayName, state, parent, createTime, labels
FROM google.cloudresourcemanager.projects
WHERE parent = '{{parent}}';
Variation: one project by id
Supplying projectsId reads a single project. Its name field carries the
resource path projects/
SELECT projectId, displayName, state, parent, name, labels
FROM google.cloudresourcemanager.projects
WHERE projectsId = 'my-project';
Notes
This is the v3 Resource Manager API, where the state column is called state and carries ACTIVE or DELETE_REQUESTED - the v1 name lifecycleState no longer exists and selecting it fails with a no such column error. parent is mandatory for the listing form: omitting it fails with HTTP 400 and 'field [parent] has issue [invalid parent name]' rather than listing everything the credential can see. The listing is not recursive - it returns only the projects immediately under the container, so descend a hierarchy by recursing through google.cloudresourcemanager.folders with the same parent form. Filter to state = 'ACTIVE' before fanning out, since DELETE_REQUESTED projects still appear but reject most API calls.