Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi
harness.platform.getEnvironmentList
Explore with Pulumi AI
Data source for retrieving Harness environment list.
Example Usage
Project Level Environment List
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getEnvironmentList({
orgId: "org_id",
projectId: "project_id",
});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_environment_list(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.GetEnvironmentList(ctx, &platform.GetEnvironmentListArgs{
OrgId: pulumi.StringRef("org_id"),
ProjectId: pulumi.StringRef("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 example = Harness.Platform.GetEnvironmentList.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.GetEnvironmentListArgs;
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.getEnvironmentList(GetEnvironmentListArgs.builder()
.orgId("org_id")
.projectId("project_id")
.build());
}
}
variables:
example:
fn::invoke:
Function: harness:platform:getEnvironmentList
Arguments:
orgId: org_id
projectId: project_id
Organisation Level Environment List
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getEnvironmentList({
orgId: "org_id",
});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_environment_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.GetEnvironmentList(ctx, &platform.GetEnvironmentListArgs{
OrgId: pulumi.StringRef("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.GetEnvironmentList.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.GetEnvironmentListArgs;
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.getEnvironmentList(GetEnvironmentListArgs.builder()
.orgId("org_id")
.build());
}
}
variables:
example:
fn::invoke:
Function: harness:platform:getEnvironmentList
Arguments:
orgId: org_id
Account Level Environment List
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getEnvironmentList({});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_environment_list()
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.GetEnvironmentList(ctx, &platform.GetEnvironmentListArgs{}, 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.GetEnvironmentList.Invoke();
});
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.GetEnvironmentListArgs;
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.getEnvironmentList();
}
}
variables:
example:
fn::invoke:
Function: harness:platform:getEnvironmentList
Arguments: {}
Using getEnvironmentList
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 getEnvironmentList(args: GetEnvironmentListArgs, opts?: InvokeOptions): Promise<GetEnvironmentListResult>
function getEnvironmentListOutput(args: GetEnvironmentListOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentListResult>
def get_environment_list(org_id: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEnvironmentListResult
def get_environment_list_output(org_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentListResult]
func GetEnvironmentList(ctx *Context, args *GetEnvironmentListArgs, opts ...InvokeOption) (*GetEnvironmentListResult, error)
func GetEnvironmentListOutput(ctx *Context, args *GetEnvironmentListOutputArgs, opts ...InvokeOption) GetEnvironmentListResultOutput
> Note: This function is named GetEnvironmentList
in the Go SDK.
public static class GetEnvironmentList
{
public static Task<GetEnvironmentListResult> InvokeAsync(GetEnvironmentListArgs args, InvokeOptions? opts = null)
public static Output<GetEnvironmentListResult> Invoke(GetEnvironmentListInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEnvironmentListResult> getEnvironmentList(GetEnvironmentListArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: harness:platform/getEnvironmentList:getEnvironmentList
arguments:
# arguments dictionary
The following arguments are supported:
- org_
id str - project_
id str
getEnvironmentList Result
The following output properties are available:
- Environments
List<Get
Environment List Environment> - Id string
- The provider-assigned unique ID for this managed resource.
- Org
Id string - Project
Id string
- Environments
[]Get
Environment List Environment - Id string
- The provider-assigned unique ID for this managed resource.
- Org
Id string - Project
Id string
- environments
List<Get
Environment List Environment> - id String
- The provider-assigned unique ID for this managed resource.
- org
Id String - project
Id String
- environments
Get
Environment List Environment[] - id string
- The provider-assigned unique ID for this managed resource.
- org
Id string - project
Id string
- environments
Sequence[Get
Environment List Environment] - id str
- The provider-assigned unique ID for this managed resource.
- org_
id str - project_
id str
- environments List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- org
Id String - project
Id String
Supporting Types
GetEnvironmentListEnvironment
- Identifier string
- Name string
- Identifier string
- Name string
- identifier String
- name String
- identifier string
- name string
- identifier str
- name str
- 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.