Method: projects.getAncestry

Gets a list of ancestors in the resource hierarchy for the Project identified by the specified projectId (for example, my-project-123).

The caller must have read permissions for this Project.

HTTP request

POST https://cloudresourcemanager.googleapis.com/v1beta1/projects/{projectId}:getAncestry

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
projectId

string

The Project ID (for example, my-project-123).

Required.

Authorization requires the following Google IAM permission on the specified resource project_id:

  • resourcemanager.projects.get

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response from the folders.getAncestry method.

JSON representation
{
  "ancestor": [
    {
      object(Ancestor)
    }
  ]
}
Fields
ancestor[]

object(Ancestor)

Ancestors are ordered from bottom to top of the resource hierarchy. The first ancestor is the project itself, followed by the project's parent, etc.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/cloudplatformprojects
  • https://www.googleapis.com/auth/cloudplatformprojects.readonly

For more information, see the Authentication Overview.

Ancestor

Identifying information for a single ancestor of a project.

JSON representation
{
  "resourceId": {
    object(ResourceId)
  }
}
Fields
resourceId

object(ResourceId)

Resource id of the ancestor.

このページは役立ちましたか?評価をお願いいたします。

フィードバックを送信...