1. Registry
  2. Packages
  3. Logfire
  4. API Docs
  5. getPagerdutyService
Viewing docs for Logfire v0.1.21
published on Wednesday, Sep 9, 2026 by Pydantic
logfire logo
Viewing docs for Logfire v0.1.21
published on Wednesday, Sep 9, 2026 by Pydantic

    Resolves a PagerDuty service approved through a Logfire connection to the IDs required by a pagerduty-integration channel. PagerDuty’s external service ID is resolved to Logfire’s internal installation and resource IDs. The provider API key requires the organization:read_channel scope.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as logfire from "@pydantic/pulumi-logfire";
    
    const onCall = logfire.getPagerdutyService({
        accountSubdomain: "acme",
        region: "us",
        pagerdutyServiceId: "PABC123",
    });
    const pagerdutyApp = new logfire.Channel("pagerdutyApp", {config: [{
        type: "pagerduty-integration",
        installId: onCall.then(onCall => onCall.installId),
        serviceId: onCall.then(onCall => onCall.serviceId),
    }]});
    
    import pulumi
    import pulumi_logfire as logfire
    
    on_call = logfire.get_pagerduty_service(account_subdomain="acme",
        region="us",
        pagerduty_service_id="PABC123")
    pagerduty_app = logfire.Channel("pagerdutyApp", config=[{
        "type": "pagerduty-integration",
        "installId": on_call.install_id,
        "serviceId": on_call.service_id,
    }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pydantic/pulumi-logfire/sdk/go/logfire"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		onCall, err := logfire.GetPagerdutyService(ctx, &logfire.GetPagerdutyServiceArgs{
    			AccountSubdomain:   "acme",
    			Region:             pulumi.StringRef("us"),
    			PagerdutyServiceId: "PABC123",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = logfire.NewChannel(ctx, "pagerdutyApp", &logfire.ChannelArgs{
    			Config: logfire.ChannelConfigArgs{
    				map[string]interface{}{
    					"type":      "pagerduty-integration",
    					"installId": onCall.InstallId,
    					"serviceId": onCall.ServiceId,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logfire = Pulumi.Logfire;
    
    return await Deployment.RunAsync(() => 
    {
        var onCall = Logfire.GetPagerdutyService.Invoke(new()
        {
            AccountSubdomain = "acme",
            Region = "us",
            PagerdutyServiceId = "PABC123",
        });
    
        var pagerdutyApp = new Logfire.Channel("pagerdutyApp", new()
        {
            Config = new[]
            {
                
                {
                    { "type", "pagerduty-integration" },
                    { "installId", onCall.Apply(getPagerdutyServiceResult => getPagerdutyServiceResult.InstallId) },
                    { "serviceId", onCall.Apply(getPagerdutyServiceResult => getPagerdutyServiceResult.ServiceId) },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logfire.LogfireFunctions;
    import com.pulumi.logfire.inputs.GetPagerdutyServiceArgs;
    import com.pulumi.logfire.Channel;
    import com.pulumi.logfire.ChannelArgs;
    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 onCall = LogfireFunctions.getPagerdutyService(GetPagerdutyServiceArgs.builder()
                .accountSubdomain("acme")
                .region("us")
                .pagerdutyServiceId("PABC123")
                .build());
    
            var pagerdutyApp = new Channel("pagerdutyApp", ChannelArgs.builder()
                .config(ChannelConfigArgs.builder()
                    .type("pagerduty-integration")
                    .installId(onCall.installId())
                    .serviceId(onCall.serviceId())
                    .build())
                .build());
    
        }
    }
    
    resources:
      pagerdutyApp:
        type: logfire:Channel
        properties:
          config:
            - type: pagerduty-integration
              installId: ${onCall.installId}
              serviceId: ${onCall.serviceId}
    variables:
      onCall:
        fn::invoke:
          function: logfire:getPagerdutyService
          arguments:
            accountSubdomain: acme
            region: us
            pagerdutyServiceId: PABC123
    
    Example coming soon!
    

    Using getPagerdutyService

    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 getPagerdutyService(args: GetPagerdutyServiceArgs, opts?: InvokeOptions): Promise<GetPagerdutyServiceResult>
    function getPagerdutyServiceOutput(args: GetPagerdutyServiceOutputArgs, opts?: InvokeOutputOptions): Output<GetPagerdutyServiceResult>
    def get_pagerduty_service(account_subdomain: Optional[str] = None,
                              pagerduty_service_id: Optional[str] = None,
                              region: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetPagerdutyServiceResult
    def get_pagerduty_service_output(account_subdomain: pulumi.Input[Optional[str]] = None,
                              pagerduty_service_id: pulumi.Input[Optional[str]] = None,
                              region: pulumi.Input[Optional[str]] = None,
                              opts: Optional[InvokeOutputOptions] = None) -> Output[GetPagerdutyServiceResult]
    func GetPagerdutyService(ctx *Context, args *GetPagerdutyServiceArgs, opts ...InvokeOption) (*GetPagerdutyServiceResult, error)
    func GetPagerdutyServiceOutput(ctx *Context, args *GetPagerdutyServiceOutputArgs, opts ...InvokeOption) GetPagerdutyServiceResultOutput

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

    public static class GetPagerdutyService 
    {
        public static Task<GetPagerdutyServiceResult> InvokeAsync(GetPagerdutyServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetPagerdutyServiceResult> Invoke(GetPagerdutyServiceInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetPagerdutyServiceResult> Invoke(GetPagerdutyServiceInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetPagerdutyServiceResult> getPagerdutyService(GetPagerdutyServiceArgs args, InvokeOptions options)
    public static Output<GetPagerdutyServiceResult> getPagerdutyService(GetPagerdutyServiceArgs args, InvokeOptions options)
    public static Output<GetPagerdutyServiceResult> getPagerdutyService(GetPagerdutyServiceArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: logfire:index/getPagerdutyService:getPagerdutyService
      arguments:
        # arguments dictionary
    data "logfire_get_pagerduty_service" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountSubdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    PagerdutyServiceId string
    PagerDuty's service ID, such as PABC123.
    Region string
    PagerDuty account region (us or eu). Defaults to us.
    AccountSubdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    PagerdutyServiceId string
    PagerDuty's service ID, such as PABC123.
    Region string
    PagerDuty account region (us or eu). Defaults to us.
    account_subdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    pagerduty_service_id string
    PagerDuty's service ID, such as PABC123.
    region string
    PagerDuty account region (us or eu). Defaults to us.
    accountSubdomain String
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    pagerdutyServiceId String
    PagerDuty's service ID, such as PABC123.
    region String
    PagerDuty account region (us or eu). Defaults to us.
    accountSubdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    pagerdutyServiceId string
    PagerDuty's service ID, such as PABC123.
    region string
    PagerDuty account region (us or eu). Defaults to us.
    account_subdomain str
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    pagerduty_service_id str
    PagerDuty's service ID, such as PABC123.
    region str
    PagerDuty account region (us or eu). Defaults to us.
    accountSubdomain String
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    pagerdutyServiceId String
    PagerDuty's service ID, such as PABC123.
    region String
    PagerDuty account region (us or eu). Defaults to us.

    getPagerdutyService Result

    The following output properties are available:

    AccountSubdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstallId string
    Internal Logfire installation UUID for logfire_channel.config.install_id.
    PagerdutyServiceId string
    PagerDuty's service ID, such as PABC123.
    Region string
    PagerDuty account region (us or eu). Defaults to us.
    ServiceId string
    Internal Logfire resource UUID for logfire_channel.config.service_id.
    ServiceName string
    PagerDuty service name.
    AccountSubdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstallId string
    Internal Logfire installation UUID for logfire_channel.config.install_id.
    PagerdutyServiceId string
    PagerDuty's service ID, such as PABC123.
    Region string
    PagerDuty account region (us or eu). Defaults to us.
    ServiceId string
    Internal Logfire resource UUID for logfire_channel.config.service_id.
    ServiceName string
    PagerDuty service name.
    account_subdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    id string
    The provider-assigned unique ID for this managed resource.
    install_id string
    Internal Logfire installation UUID for logfire_channel.config.install_id.
    pagerduty_service_id string
    PagerDuty's service ID, such as PABC123.
    region string
    PagerDuty account region (us or eu). Defaults to us.
    service_id string
    Internal Logfire resource UUID for logfire_channel.config.service_id.
    service_name string
    PagerDuty service name.
    accountSubdomain String
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    id String
    The provider-assigned unique ID for this managed resource.
    installId String
    Internal Logfire installation UUID for logfire_channel.config.install_id.
    pagerdutyServiceId String
    PagerDuty's service ID, such as PABC123.
    region String
    PagerDuty account region (us or eu). Defaults to us.
    serviceId String
    Internal Logfire resource UUID for logfire_channel.config.service_id.
    serviceName String
    PagerDuty service name.
    accountSubdomain string
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    id string
    The provider-assigned unique ID for this managed resource.
    installId string
    Internal Logfire installation UUID for logfire_channel.config.install_id.
    pagerdutyServiceId string
    PagerDuty's service ID, such as PABC123.
    region string
    PagerDuty account region (us or eu). Defaults to us.
    serviceId string
    Internal Logfire resource UUID for logfire_channel.config.service_id.
    serviceName string
    PagerDuty service name.
    account_subdomain str
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    id str
    The provider-assigned unique ID for this managed resource.
    install_id str
    Internal Logfire installation UUID for logfire_channel.config.install_id.
    pagerduty_service_id str
    PagerDuty's service ID, such as PABC123.
    region str
    PagerDuty account region (us or eu). Defaults to us.
    service_id str
    Internal Logfire resource UUID for logfire_channel.config.service_id.
    service_name str
    PagerDuty service name.
    accountSubdomain String
    PagerDuty account subdomain, such as acme from acme.pagerduty.com.
    id String
    The provider-assigned unique ID for this managed resource.
    installId String
    Internal Logfire installation UUID for logfire_channel.config.install_id.
    pagerdutyServiceId String
    PagerDuty's service ID, such as PABC123.
    region String
    PagerDuty account region (us or eu). Defaults to us.
    serviceId String
    Internal Logfire resource UUID for logfire_channel.config.service_id.
    serviceName String
    PagerDuty service name.

    Package Details

    Repository
    logfire pydantic/pulumi-logfire
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the logfire Terraform Provider.
    logfire logo
    Viewing docs for Logfire v0.1.21
    published on Wednesday, Sep 9, 2026 by Pydantic

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial