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

harness.platform.getServiceList

Explore with Pulumi AI

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

    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, &platform.GetServiceListArgs{}, 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:

    OrgId string
    ProjectId string
    OrgId string
    ProjectId string
    orgId String
    projectId String
    orgId string
    projectId string
    orgId String
    projectId String

    getServiceList Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Services List<GetServiceListService>
    OrgId string
    ProjectId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Services []GetServiceListService
    OrgId string
    ProjectId string
    id String
    The provider-assigned unique ID for this managed resource.
    services List<GetServiceListService>
    orgId String
    projectId String
    id string
    The provider-assigned unique ID for this managed resource.
    services GetServiceListService[]
    orgId string
    projectId string
    id str
    The provider-assigned unique ID for this managed resource.
    services Sequence[GetServiceListService]
    org_id str
    project_id str
    id String
    The provider-assigned unique ID for this managed resource.
    services List<Property Map>
    orgId String
    projectId String

    Supporting Types

    GetServiceListService

    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