GetService

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

Example Usage

using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleService = Output.Create(Pagerduty.GetService.InvokeAsync(new Pagerduty.GetServiceArgs
        {
            Name = "My Service",
        }));
        var datadog = Output.Create(Pagerduty.GetVendor.InvokeAsync(new Pagerduty.GetVendorArgs
        {
            Name = "Datadog",
        }));
        var exampleServiceIntegration = new Pagerduty.ServiceIntegration("exampleServiceIntegration", new Pagerduty.ServiceIntegrationArgs
        {
            Vendor = datadog.Apply(datadog => datadog.Id),
            Service = exampleService.Apply(exampleService => exampleService.Id),
            Type = "generic_events_api_inbound_integration",
        });
    }

}

Coming soon!

import pulumi
import pulumi_pagerduty as pagerduty

example_service = pagerduty.get_service(name="My Service")
datadog = pagerduty.get_vendor(name="Datadog")
example_service_integration = pagerduty.ServiceIntegration("exampleServiceIntegration",
    vendor=datadog.id,
    service=example_service.id,
    type="generic_events_api_inbound_integration")
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const exampleService = pagerduty.getService({
    name: "My Service",
});
const datadog = pagerduty.getVendor({
    name: "Datadog",
});
const exampleServiceIntegration = new pagerduty.ServiceIntegration("exampleServiceIntegration", {
    vendor: datadog.then(datadog => datadog.id),
    service: exampleService.then(exampleService => exampleService.id),
    type: "generic_events_api_inbound_integration",
});

Using GetService

function getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function  get_service(name=None, opts=None)
func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)

Note: This function is named LookupService in the Go SDK.

public static class GetService {
    public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The service name to use to find a service in the PagerDuty API.

Name string

The service name to use to find a service in the PagerDuty API.

name string

The service name to use to find a service in the PagerDuty API.

name str

The service name to use to find a service in the PagerDuty API.

GetService Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string

The short name of the found service.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The short name of the found service.

id string

The provider-assigned unique ID for this managed resource.

name string

The short name of the found service.

id str

The provider-assigned unique ID for this managed resource.

name str

The short name of the found service.

Package Details

Repository
https://github.com/pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.