Harness v0.7.2 published on Tuesday, Apr 15, 2025 by Pulumi
harness.platform.getProject
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const exampleById = harness.platform.getProject({
    identifier: "identifier",
    orgId: "org_id",
});
const exampleByName = harness.platform.getProject({
    name: "name",
    orgId: "org_id",
});
import pulumi
import pulumi_harness as harness
example_by_id = harness.platform.get_project(identifier="identifier",
    org_id="org_id")
example_by_name = harness.platform.get_project(name="name",
    org_id="org_id")
package main
import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.LookupProject(ctx, &platform.LookupProjectArgs{
			Identifier: pulumi.StringRef("identifier"),
			OrgId:      "org_id",
		}, nil)
		if err != nil {
			return err
		}
		_, err = platform.LookupProject(ctx, &platform.LookupProjectArgs{
			Name:  pulumi.StringRef("name"),
			OrgId: "org_id",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() => 
{
    var exampleById = Harness.Platform.GetProject.Invoke(new()
    {
        Identifier = "identifier",
        OrgId = "org_id",
    });
    var exampleByName = Harness.Platform.GetProject.Invoke(new()
    {
        Name = "name",
        OrgId = "org_id",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PlatformFunctions;
import com.pulumi.harness.platform.inputs.GetProjectArgs;
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 exampleById = PlatformFunctions.getProject(GetProjectArgs.builder()
            .identifier("identifier")
            .orgId("org_id")
            .build());
        final var exampleByName = PlatformFunctions.getProject(GetProjectArgs.builder()
            .name("name")
            .orgId("org_id")
            .build());
    }
}
variables:
  exampleById:
    fn::invoke:
      function: harness:platform:getProject
      arguments:
        identifier: identifier
        orgId: org_id
  exampleByName:
    fn::invoke:
      function: harness:platform:getProject
      arguments:
        name: name
        orgId: org_id
Using getProject
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 getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>def get_project(identifier: Optional[str] = None,
                name: Optional[str] = None,
                org_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(identifier: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                org_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput> Note: This function is named LookupProject in the Go SDK.
public static class GetProject 
{
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
fn::invoke:
  function: harness:platform/getProject:getProject
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Org
Id string - Unique identifier of the organization.
 - Identifier string
 - Unique identifier of the resource.
 - Name string
 - Name of the resource.
 
- Org
Id string - Unique identifier of the organization.
 - Identifier string
 - Unique identifier of the resource.
 - Name string
 - Name of the resource.
 
- org
Id String - Unique identifier of the organization.
 - identifier String
 - Unique identifier of the resource.
 - name String
 - Name of the resource.
 
- org
Id string - Unique identifier of the organization.
 - identifier string
 - Unique identifier of the resource.
 - name string
 - Name of the resource.
 
- org_
id str - Unique identifier of the organization.
 - identifier str
 - Unique identifier of the resource.
 - name str
 - Name of the resource.
 
- org
Id String - Unique identifier of the organization.
 - identifier String
 - Unique identifier of the resource.
 - name String
 - Name of the resource.
 
getProject Result
The following output properties are available:
- Color string
 - Color of the project.
 - Description string
 - Description of the resource.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Modules List<string>
 - Modules in the project.
 - Org
Id string - Unique identifier of the organization.
 - List<string>
 - Tags to associate with the resource.
 - Identifier string
 - Unique identifier of the resource.
 - Name string
 - Name of the resource.
 
- Color string
 - Color of the project.
 - Description string
 - Description of the resource.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Modules []string
 - Modules in the project.
 - Org
Id string - Unique identifier of the organization.
 - []string
 - Tags to associate with the resource.
 - Identifier string
 - Unique identifier of the resource.
 - Name string
 - Name of the resource.
 
- color String
 - Color of the project.
 - description String
 - Description of the resource.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - modules List<String>
 - Modules in the project.
 - org
Id String - Unique identifier of the organization.
 - List<String>
 - Tags to associate with the resource.
 - identifier String
 - Unique identifier of the resource.
 - name String
 - Name of the resource.
 
- color string
 - Color of the project.
 - description string
 - Description of the resource.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - modules string[]
 - Modules in the project.
 - org
Id string - Unique identifier of the organization.
 - string[]
 - Tags to associate with the resource.
 - identifier string
 - Unique identifier of the resource.
 - name string
 - Name of the resource.
 
- color str
 - Color of the project.
 - description str
 - Description of the resource.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - modules Sequence[str]
 - Modules in the project.
 - org_
id str - Unique identifier of the organization.
 - Sequence[str]
 - Tags to associate with the resource.
 - identifier str
 - Unique identifier of the resource.
 - name str
 - Name of the resource.
 
- color String
 - Color of the project.
 - description String
 - Description of the resource.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - modules List<String>
 - Modules in the project.
 - org
Id String - Unique identifier of the organization.
 - List<String>
 - Tags to associate with the resource.
 - identifier String
 - Unique identifier of the resource.
 - name String
 - Name of the resource.
 
Package Details
- Repository
 - harness pulumi/pulumi-harness
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
harnessTerraform Provider.