Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
Data source for listing workspaces.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const all = harness.platform.getWorkspaces({
orgId: "org_id",
projectId: "project_id",
});
import pulumi
import pulumi_harness as harness
all = harness.platform.get_workspaces(org_id="org_id",
project_id="project_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.GetWorkspaces(ctx, &platform.GetWorkspacesArgs{
OrgId: "org_id",
ProjectId: "project_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 all = Harness.Platform.GetWorkspaces.Invoke(new()
{
OrgId = "org_id",
ProjectId = "project_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.GetWorkspacesArgs;
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 all = PlatformFunctions.getWorkspaces(GetWorkspacesArgs.builder()
.orgId("org_id")
.projectId("project_id")
.build());
}
}
variables:
all:
fn::invoke:
function: harness:platform:getWorkspaces
arguments:
orgId: org_id
projectId: project_id
Using getWorkspaces
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 getWorkspaces(args: GetWorkspacesArgs, opts?: InvokeOptions): Promise<GetWorkspacesResult>
function getWorkspacesOutput(args: GetWorkspacesOutputArgs, opts?: InvokeOptions): Output<GetWorkspacesResult>def get_workspaces(org_id: Optional[str] = None,
project_id: Optional[str] = None,
search_term: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWorkspacesResult
def get_workspaces_output(org_id: pulumi.Input[Optional[str]] = None,
project_id: pulumi.Input[Optional[str]] = None,
search_term: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetWorkspacesResult]func GetWorkspaces(ctx *Context, args *GetWorkspacesArgs, opts ...InvokeOption) (*GetWorkspacesResult, error)
func GetWorkspacesOutput(ctx *Context, args *GetWorkspacesOutputArgs, opts ...InvokeOption) GetWorkspacesResultOutput> Note: This function is named GetWorkspaces in the Go SDK.
public static class GetWorkspaces
{
public static Task<GetWorkspacesResult> InvokeAsync(GetWorkspacesArgs args, InvokeOptions? opts = null)
public static Output<GetWorkspacesResult> Invoke(GetWorkspacesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetWorkspacesResult> getWorkspaces(GetWorkspacesArgs args, InvokeOptions options)
public static Output<GetWorkspacesResult> getWorkspaces(GetWorkspacesArgs args, InvokeOptions options)
fn::invoke:
function: harness:platform/getWorkspaces:getWorkspaces
arguments:
# arguments dictionaryThe following arguments are supported:
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Search
Term string - Filter results by partial name match when listing workspaces.
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Search
Term string - Filter results by partial name match when listing workspaces.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- search
Term String - Filter results by partial name match when listing workspaces.
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- search
Term string - Filter results by partial name match when listing workspaces.
- org_
id str - Organization Identifier
- project_
id str - Project Identifier
- search_
term str - Filter results by partial name match when listing workspaces.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- search
Term String - Filter results by partial name match when listing workspaces.
getWorkspaces Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifiers List<string>
- List of workspace identifiers matching the filters.
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Workspaces
List<Get
Workspaces Workspace> - List of workspaces matching the filters.
- Search
Term string - Filter results by partial name match when listing workspaces.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifiers []string
- List of workspace identifiers matching the filters.
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Workspaces
[]Get
Workspaces Workspace - List of workspaces matching the filters.
- Search
Term string - Filter results by partial name match when listing workspaces.
- id String
- The provider-assigned unique ID for this managed resource.
- identifiers List<String>
- List of workspace identifiers matching the filters.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- workspaces
List<Get
Workspaces Workspace> - List of workspaces matching the filters.
- search
Term String - Filter results by partial name match when listing workspaces.
- id string
- The provider-assigned unique ID for this managed resource.
- identifiers string[]
- List of workspace identifiers matching the filters.
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- workspaces
Get
Workspaces Workspace[] - List of workspaces matching the filters.
- search
Term string - Filter results by partial name match when listing workspaces.
- id str
- The provider-assigned unique ID for this managed resource.
- identifiers Sequence[str]
- List of workspace identifiers matching the filters.
- org_
id str - Organization Identifier
- project_
id str - Project Identifier
- workspaces
Sequence[Get
Workspaces Workspace] - List of workspaces matching the filters.
- search_
term str - Filter results by partial name match when listing workspaces.
- id String
- The provider-assigned unique ID for this managed resource.
- identifiers List<String>
- List of workspace identifiers matching the filters.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- workspaces List<Property Map>
- List of workspaces matching the filters.
- search
Term String - Filter results by partial name match when listing workspaces.
Supporting Types
GetWorkspacesWorkspace
- Account
Id string - Created int
- Description string
- Identifier string
- Name string
- Org
Id string - Project
Id string - Status string
- Updated int
- Account
Id string - Created int
- Description string
- Identifier string
- Name string
- Org
Id string - Project
Id string - Status string
- Updated int
- account
Id String - created Integer
- description String
- identifier String
- name String
- org
Id String - project
Id String - status String
- updated Integer
- account
Id string - created number
- description string
- identifier string
- name string
- org
Id string - project
Id string - status string
- updated number
- account_
id str - created int
- description str
- identifier str
- name str
- org_
id str - project_
id str - status str
- updated int
- account
Id String - created Number
- description String
- identifier String
- name String
- org
Id String - project
Id String - status String
- updated Number
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
