1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getProjectList
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.platform.getProjectList

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    Data source for retrieving Harness project list.

    Example Usage

    Org Level Project List

    Without the Pagination

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const example = harness.platform.getProjectList({
        orgId: "org_id",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    example = harness.platform.get_project_list(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.GetProjectList(ctx, &platform.GetProjectListArgs{
    			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 example = Harness.Platform.GetProjectList.Invoke(new()
        {
            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.GetProjectListArgs;
    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 = PlatformFunctions.getProjectList(GetProjectListArgs.builder()
                .orgId("org_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: harness:platform:getProjectList
          Arguments:
            orgId: org_id
    

    With Pagination Logic

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const example = harness.platform.getProjectList({
        orgId: "org_id",
        page: 1,
        limit: 4,
    });
    
    import pulumi
    import pulumi_harness as harness
    
    example = harness.platform.get_project_list(org_id="org_id",
        page=1,
        limit=4)
    
    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.GetProjectList(ctx, &platform.GetProjectListArgs{
    			OrgId: "org_id",
    			Page:  pulumi.IntRef(1),
    			Limit: pulumi.IntRef(4),
    		}, 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 example = Harness.Platform.GetProjectList.Invoke(new()
        {
            OrgId = "org_id",
            Page = 1,
            Limit = 4,
        });
    
    });
    
    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.GetProjectListArgs;
    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 = PlatformFunctions.getProjectList(GetProjectListArgs.builder()
                .orgId("org_id")
                .page(1)
                .limit(4)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: harness:platform:getProjectList
          Arguments:
            orgId: org_id
            page: 1
            limit: 4
    

    Using getProjectList

    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 getProjectList(args: GetProjectListArgs, opts?: InvokeOptions): Promise<GetProjectListResult>
    function getProjectListOutput(args: GetProjectListOutputArgs, opts?: InvokeOptions): Output<GetProjectListResult>
    def get_project_list(identifier: Optional[str] = None,
                         limit: Optional[int] = None,
                         name: Optional[str] = None,
                         org_id: Optional[str] = None,
                         page: Optional[int] = None,
                         opts: Optional[InvokeOptions] = None) -> GetProjectListResult
    def get_project_list_output(identifier: Optional[pulumi.Input[str]] = None,
                         limit: Optional[pulumi.Input[int]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         org_id: Optional[pulumi.Input[str]] = None,
                         page: Optional[pulumi.Input[int]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetProjectListResult]
    func GetProjectList(ctx *Context, args *GetProjectListArgs, opts ...InvokeOption) (*GetProjectListResult, error)
    func GetProjectListOutput(ctx *Context, args *GetProjectListOutputArgs, opts ...InvokeOption) GetProjectListResultOutput

    > Note: This function is named GetProjectList in the Go SDK.

    public static class GetProjectList 
    {
        public static Task<GetProjectListResult> InvokeAsync(GetProjectListArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectListResult> Invoke(GetProjectListInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectListResult> getProjectList(GetProjectListArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: harness:platform/getProjectList:getProjectList
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OrgId string
    Unique identifier of the organization.
    Identifier string
    Limit int
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    Name string
    Page int
    Optional pagination parameter indicating the page number when retrieving entities.
    OrgId string
    Unique identifier of the organization.
    Identifier string
    Limit int
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    Name string
    Page int
    Optional pagination parameter indicating the page number when retrieving entities.
    orgId String
    Unique identifier of the organization.
    identifier String
    limit Integer
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name String
    page Integer
    Optional pagination parameter indicating the page number when retrieving entities.
    orgId string
    Unique identifier of the organization.
    identifier string
    limit number
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name string
    page number
    Optional pagination parameter indicating the page number when retrieving entities.
    org_id str
    Unique identifier of the organization.
    identifier str
    limit int
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name str
    page int
    Optional pagination parameter indicating the page number when retrieving entities.
    orgId String
    Unique identifier of the organization.
    identifier String
    limit Number
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name String
    page Number
    Optional pagination parameter indicating the page number when retrieving entities.

    getProjectList Result

    The following output properties are available:

    Description string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    Unique identifier of the organization.
    Projects List<GetProjectListProject>
    Containing list of all projects with details identifier and name.
    Tags List<string>
    Identifier string
    Limit int
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    Name string
    Page int
    Optional pagination parameter indicating the page number when retrieving entities.
    Description string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    Unique identifier of the organization.
    Projects []GetProjectListProject
    Containing list of all projects with details identifier and name.
    Tags []string
    Identifier string
    Limit int
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    Name string
    Page int
    Optional pagination parameter indicating the page number when retrieving entities.
    description String
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    Unique identifier of the organization.
    projects List<GetProjectListProject>
    Containing list of all projects with details identifier and name.
    tags List<String>
    identifier String
    limit Integer
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name String
    page Integer
    Optional pagination parameter indicating the page number when retrieving entities.
    description string
    id string
    The provider-assigned unique ID for this managed resource.
    orgId string
    Unique identifier of the organization.
    projects GetProjectListProject[]
    Containing list of all projects with details identifier and name.
    tags string[]
    identifier string
    limit number
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name string
    page number
    Optional pagination parameter indicating the page number when retrieving entities.
    description str
    id str
    The provider-assigned unique ID for this managed resource.
    org_id str
    Unique identifier of the organization.
    projects Sequence[GetProjectListProject]
    Containing list of all projects with details identifier and name.
    tags Sequence[str]
    identifier str
    limit int
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name str
    page int
    Optional pagination parameter indicating the page number when retrieving entities.
    description String
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    Unique identifier of the organization.
    projects List<Property Map>
    Containing list of all projects with details identifier and name.
    tags List<String>
    identifier String
    limit Number
    Optional pagination parameter indicating the maximum number of entities to retrieve per page.
    name String
    page Number
    Optional pagination parameter indicating the page number when retrieving entities.

    Supporting Types

    GetProjectListProject

    Identifier string
    Name string
    Identifier string
    Name string
    identifier String
    name String
    identifier string
    name string
    identifier String
    name String

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi