Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.projects.getAncestry
Explore with Pulumi AI
Retrieve the ancestors for a project. See the REST API for more details.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.projects.ProjectsFunctions;
import com.pulumi.gcp.projects.inputs.GetAncestryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = ProjectsFunctions.getAncestry(GetAncestryArgs.builder()
            .projectId("example-project")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: gcp:projects:getAncestry
      arguments:
        projectId: example-project
Using getAncestry
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAncestry(args: GetAncestryArgs, opts?: InvokeOptions): Promise<GetAncestryResult>
function getAncestryOutput(args: GetAncestryOutputArgs, opts?: InvokeOptions): Output<GetAncestryResult>def get_ancestry(project: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetAncestryResult
def get_ancestry_output(project: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetAncestryResult]func GetAncestry(ctx *Context, args *GetAncestryArgs, opts ...InvokeOption) (*GetAncestryResult, error)
func GetAncestryOutput(ctx *Context, args *GetAncestryOutputArgs, opts ...InvokeOption) GetAncestryResultOutput> Note: This function is named GetAncestry in the Go SDK.
public static class GetAncestry 
{
    public static Task<GetAncestryResult> InvokeAsync(GetAncestryArgs args, InvokeOptions? opts = null)
    public static Output<GetAncestryResult> Invoke(GetAncestryInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAncestryResult> getAncestry(GetAncestryArgs args, InvokeOptions options)
public static Output<GetAncestryResult> getAncestry(GetAncestryArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:projects/getAncestry:getAncestry
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Project string
- The ID of the project. If it is not provided, the provider project is used.
- Project string
- The ID of the project. If it is not provided, the provider project is used.
- project String
- The ID of the project. If it is not provided, the provider project is used.
- project string
- The ID of the project. If it is not provided, the provider project is used.
- project str
- The ID of the project. If it is not provided, the provider project is used.
- project String
- The ID of the project. If it is not provided, the provider project is used.
getAncestry Result
The following output properties are available:
- Ancestors
List<GetAncestry Ancestor> 
- A list of the project's ancestors. Structure is defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- OrgId string
- The optional user-assigned display name of the project.
- ParentId string
- The parent's id.
- ParentType string
- One of "folder"or"organization".
- Project string
- Ancestors
[]GetAncestry Ancestor 
- A list of the project's ancestors. Structure is defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- OrgId string
- The optional user-assigned display name of the project.
- ParentId string
- The parent's id.
- ParentType string
- One of "folder"or"organization".
- Project string
- ancestors
List<GetAncestry Ancestor> 
- A list of the project's ancestors. Structure is defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- orgId String
- The optional user-assigned display name of the project.
- parentId String
- The parent's id.
- parentType String
- One of "folder"or"organization".
- project String
- ancestors
GetAncestry Ancestor[] 
- A list of the project's ancestors. Structure is defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- orgId string
- The optional user-assigned display name of the project.
- parentId string
- The parent's id.
- parentType string
- One of "folder"or"organization".
- project string
- ancestors
Sequence[GetAncestry Ancestor] 
- A list of the project's ancestors. Structure is defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- org_id str
- The optional user-assigned display name of the project.
- parent_id str
- The parent's id.
- parent_type str
- One of "folder"or"organization".
- project str
- ancestors List<Property Map>
- A list of the project's ancestors. Structure is defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- orgId String
- The optional user-assigned display name of the project.
- parentId String
- The parent's id.
- parentType String
- One of "folder"or"organization".
- project String
Supporting Types
GetAncestryAncestor  
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.