1. Packages
  2. PagerDuty
  3. API Docs
  4. getBusinessService
PagerDuty v4.13.1 published on Friday, Jun 21, 2024 by Pulumi

pagerduty.getBusinessService

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.13.1 published on Friday, Jun 21, 2024 by Pulumi

    Use this data source to get information about a specific business service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const example = pagerduty.getBusinessService({
        name: "My Service",
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    example = pagerduty.get_business_service(name="My Service")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := pagerduty.LookupBusinessService(ctx, &pagerduty.LookupBusinessServiceArgs{
    			Name: "My Service",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Pagerduty.GetBusinessService.Invoke(new()
        {
            Name = "My Service",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.pagerduty.PagerdutyFunctions;
    import com.pulumi.pagerduty.inputs.GetBusinessServiceArgs;
    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 = PagerdutyFunctions.getBusinessService(GetBusinessServiceArgs.builder()
                .name("My Service")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: pagerduty:getBusinessService
          Arguments:
            name: My Service
    

    Using getBusinessService

    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 getBusinessService(args: GetBusinessServiceArgs, opts?: InvokeOptions): Promise<GetBusinessServiceResult>
    function getBusinessServiceOutput(args: GetBusinessServiceOutputArgs, opts?: InvokeOptions): Output<GetBusinessServiceResult>
    def get_business_service(name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetBusinessServiceResult
    def get_business_service_output(name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetBusinessServiceResult]
    func LookupBusinessService(ctx *Context, args *LookupBusinessServiceArgs, opts ...InvokeOption) (*LookupBusinessServiceResult, error)
    func LookupBusinessServiceOutput(ctx *Context, args *LookupBusinessServiceOutputArgs, opts ...InvokeOption) LookupBusinessServiceResultOutput

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

    public static class GetBusinessService 
    {
        public static Task<GetBusinessServiceResult> InvokeAsync(GetBusinessServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetBusinessServiceResult> Invoke(GetBusinessServiceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBusinessServiceResult> getBusinessService(GetBusinessServiceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: pagerduty:index/getBusinessService:getBusinessService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The business service name to use to find a business service in the PagerDuty API.
    Name string
    The business service name to use to find a business service in the PagerDuty API.
    name String
    The business service name to use to find a business service in the PagerDuty API.
    name string
    The business service name to use to find a business service in the PagerDuty API.
    name str
    The business service name to use to find a business service in the PagerDuty API.
    name String
    The business service name to use to find a business service in the PagerDuty API.

    getBusinessService Result

    The following output properties are available:

    Id string
    The ID of the found business service.
    Name string
    The short name of the found business service.
    Type string
    The type of object. The value returned will be business_service. Can be used for passing to a service dependency.
    Id string
    The ID of the found business service.
    Name string
    The short name of the found business service.
    Type string
    The type of object. The value returned will be business_service. Can be used for passing to a service dependency.
    id String
    The ID of the found business service.
    name String
    The short name of the found business service.
    type String
    The type of object. The value returned will be business_service. Can be used for passing to a service dependency.
    id string
    The ID of the found business service.
    name string
    The short name of the found business service.
    type string
    The type of object. The value returned will be business_service. Can be used for passing to a service dependency.
    id str
    The ID of the found business service.
    name str
    The short name of the found business service.
    type str
    The type of object. The value returned will be business_service. Can be used for passing to a service dependency.
    id String
    The ID of the found business service.
    name String
    The short name of the found business service.
    type String
    The type of object. The value returned will be business_service. Can be used for passing to a service dependency.

    Package Details

    Repository
    PagerDuty pulumi/pulumi-pagerduty
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the pagerduty Terraform Provider.
    pagerduty logo
    PagerDuty v4.13.1 published on Friday, Jun 21, 2024 by Pulumi