Show / Hide Table of Contents

Class GetProject

Inheritance
System.Object
GetProject
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Projects
Assembly: Pulumi.Gcp.dll
Syntax
public static class GetProject

Methods

View Source

InvokeAsync(GetProjectArgs, InvokeOptions)

Retrieve information about a set of projects based on a filter. See the REST API for more details.

Example Usage - searching for projects about to be deleted in an org

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var my_org_projects = Output.Create(Gcp.Projects.GetProject.InvokeAsync(new Gcp.Projects.GetProjectArgs
    {
        Filter = "parent.id:012345678910 lifecycleState:DELETE_REQUESTED",
    }));
    var deletion_candidate = my_org_projects.Apply(my_org_projects => Output.Create(Gcp.Organizations.GetProject.InvokeAsync(new Gcp.Organizations.GetProjectArgs
    {
        ProjectId = my_org_projects.Projects[0].ProjectId,
    })));
}

}
Declaration
public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetProjectArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetProjectResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.