Harness v0.3.2 published on Monday, Sep 16, 2024 by Pulumi
harness.platform.getServiceList
Explore with Pulumi AI
Data source for retrieving Harness service list.
Example Usage
Project Level Service List
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getServiceList({
orgId: "org_id",
projectId: "project_id",
});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_service_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.GetServiceList(ctx, &platform.GetServiceListArgs{
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.GetServiceList.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.GetServiceListArgs;
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.getServiceList(GetServiceListArgs.builder()
.orgId("org_id")
.projectId("project_id")
.build());
}
}
variables:
example:
fn::invoke:
Function: harness:platform:getServiceList
Arguments:
orgId: org_id
projectId: project_id
Organisation Level Service List
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getServiceList({
orgId: "org_id",
});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_service_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.GetServiceList(ctx, &platform.GetServiceListArgs{
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.GetServiceList.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.GetServiceListArgs;
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.getServiceList(GetServiceListArgs.builder()
.orgId("org_id")
.build());
}
}
variables:
example:
fn::invoke:
Function: harness:platform:getServiceList
Arguments:
orgId: org_id
Account Level Service List
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getServiceList({});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_service_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.GetServiceList(ctx, nil, 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.GetServiceList.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.GetServiceListArgs;
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.getServiceList();
}
}
variables:
example:
fn::invoke:
Function: harness:platform:getServiceList
Arguments: {}
Using getServiceList
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 getServiceList(args: GetServiceListArgs, opts?: InvokeOptions): Promise<GetServiceListResult>
function getServiceListOutput(args: GetServiceListOutputArgs, opts?: InvokeOptions): Output<GetServiceListResult>
def get_service_list(org_id: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceListResult
def get_service_list_output(org_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceListResult]
func GetServiceList(ctx *Context, args *GetServiceListArgs, opts ...InvokeOption) (*GetServiceListResult, error)
func GetServiceListOutput(ctx *Context, args *GetServiceListOutputArgs, opts ...InvokeOption) GetServiceListResultOutput
> Note: This function is named GetServiceList
in the Go SDK.
public static class GetServiceList
{
public static Task<GetServiceListResult> InvokeAsync(GetServiceListArgs args, InvokeOptions? opts = null)
public static Output<GetServiceListResult> Invoke(GetServiceListInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceListResult> getServiceList(GetServiceListArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: harness:platform/getServiceList:getServiceList
arguments:
# arguments dictionary
The following arguments are supported:
- org_
id str - project_
id str
getServiceList Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Services
List<Get
Service List Service> - Org
Id string - Project
Id string
- Id string
- The provider-assigned unique ID for this managed resource.
- Services
[]Get
Service List Service - Org
Id string - Project
Id string
- id String
- The provider-assigned unique ID for this managed resource.
- services
List<Get
Service List Service> - org
Id String - project
Id String
- id string
- The provider-assigned unique ID for this managed resource.
- services
Get
Service List Service[] - org
Id string - project
Id string
- id str
- The provider-assigned unique ID for this managed resource.
- services
Sequence[Get
Service List Service] - org_
id str - project_
id str
- id String
- The provider-assigned unique ID for this managed resource.
- services List<Property Map>
- org
Id String - project
Id String
Supporting Types
GetServiceListService
- 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.