1. Packages
  2. Ibm Provider
  3. API Docs
  4. getEnPagerdutyTemplate
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getEnPagerdutyTemplate

Explore with Pulumi AI

Provides a read-only data source for Webhook template. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const pagerdutyTemplate = ibm.getEnPagerdutyTemplate({
    instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
    templateId: ibm_en_pagerduty_template.en_pagerduty_template.template_id,
});
Copy
import pulumi
import pulumi_ibm as ibm

pagerduty_template = ibm.get_en_pagerduty_template(instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
    template_id=ibm_en_pagerduty_template["en_pagerduty_template"]["template_id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.LookupEnPagerdutyTemplate(ctx, &ibm.LookupEnPagerdutyTemplateArgs{
			InstanceGuid: ibm_resource_instance.En_terraform_test_resource.Guid,
			TemplateId:   ibm_en_pagerduty_template.En_pagerduty_template.Template_id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var pagerdutyTemplate = Ibm.GetEnPagerdutyTemplate.Invoke(new()
    {
        InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
        TemplateId = ibm_en_pagerduty_template.En_pagerduty_template.Template_id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetEnPagerdutyTemplateArgs;
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 pagerdutyTemplate = IbmFunctions.getEnPagerdutyTemplate(GetEnPagerdutyTemplateArgs.builder()
            .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
            .templateId(ibm_en_pagerduty_template.en_pagerduty_template().template_id())
            .build());

    }
}
Copy
variables:
  pagerdutyTemplate:
    fn::invoke:
      function: ibm:getEnPagerdutyTemplate
      arguments:
        instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
        templateId: ${ibm_en_pagerduty_template.en_pagerduty_template.template_id}
Copy

Using getEnPagerdutyTemplate

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 getEnPagerdutyTemplate(args: GetEnPagerdutyTemplateArgs, opts?: InvokeOptions): Promise<GetEnPagerdutyTemplateResult>
function getEnPagerdutyTemplateOutput(args: GetEnPagerdutyTemplateOutputArgs, opts?: InvokeOptions): Output<GetEnPagerdutyTemplateResult>
Copy
def get_en_pagerduty_template(id: Optional[str] = None,
                              instance_guid: Optional[str] = None,
                              template_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetEnPagerdutyTemplateResult
def get_en_pagerduty_template_output(id: Optional[pulumi.Input[str]] = None,
                              instance_guid: Optional[pulumi.Input[str]] = None,
                              template_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetEnPagerdutyTemplateResult]
Copy
func LookupEnPagerdutyTemplate(ctx *Context, args *LookupEnPagerdutyTemplateArgs, opts ...InvokeOption) (*LookupEnPagerdutyTemplateResult, error)
func LookupEnPagerdutyTemplateOutput(ctx *Context, args *LookupEnPagerdutyTemplateOutputArgs, opts ...InvokeOption) LookupEnPagerdutyTemplateResultOutput
Copy

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

public static class GetEnPagerdutyTemplate 
{
    public static Task<GetEnPagerdutyTemplateResult> InvokeAsync(GetEnPagerdutyTemplateArgs args, InvokeOptions? opts = null)
    public static Output<GetEnPagerdutyTemplateResult> Invoke(GetEnPagerdutyTemplateInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEnPagerdutyTemplateResult> getEnPagerdutyTemplate(GetEnPagerdutyTemplateArgs args, InvokeOptions options)
public static Output<GetEnPagerdutyTemplateResult> getEnPagerdutyTemplate(GetEnPagerdutyTemplateArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getEnPagerdutyTemplate:getEnPagerdutyTemplate
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceGuid This property is required. string
Unique identifier for IBM Cloud Event Notifications instance.
TemplateId This property is required. string
Unique identifier for Template.
Id string
The unique identifier of the pagerduty_template.
InstanceGuid This property is required. string
Unique identifier for IBM Cloud Event Notifications instance.
TemplateId This property is required. string
Unique identifier for Template.
Id string
The unique identifier of the pagerduty_template.
instanceGuid This property is required. String
Unique identifier for IBM Cloud Event Notifications instance.
templateId This property is required. String
Unique identifier for Template.
id String
The unique identifier of the pagerduty_template.
instanceGuid This property is required. string
Unique identifier for IBM Cloud Event Notifications instance.
templateId This property is required. string
Unique identifier for Template.
id string
The unique identifier of the pagerduty_template.
instance_guid This property is required. str
Unique identifier for IBM Cloud Event Notifications instance.
template_id This property is required. str
Unique identifier for Template.
id str
The unique identifier of the pagerduty_template.
instanceGuid This property is required. String
Unique identifier for IBM Cloud Event Notifications instance.
templateId This property is required. String
Unique identifier for Template.
id String
The unique identifier of the pagerduty_template.

getEnPagerdutyTemplate Result

The following output properties are available:

Description string
(String) The template description.
Id string
The unique identifier of the pagerduty_template.
InstanceGuid string
Name string
(String) The Template name.
SubscriptionCount double
(Integer) Number of subscriptions.
SubscriptionNames List<string>
(List) List of subscriptions.
TemplateId string
Type string
(String) Template type pagerduty.notification.
UpdatedAt string
(String) Last updated time.
Description string
(String) The template description.
Id string
The unique identifier of the pagerduty_template.
InstanceGuid string
Name string
(String) The Template name.
SubscriptionCount float64
(Integer) Number of subscriptions.
SubscriptionNames []string
(List) List of subscriptions.
TemplateId string
Type string
(String) Template type pagerduty.notification.
UpdatedAt string
(String) Last updated time.
description String
(String) The template description.
id String
The unique identifier of the pagerduty_template.
instanceGuid String
name String
(String) The Template name.
subscriptionCount Double
(Integer) Number of subscriptions.
subscriptionNames List<String>
(List) List of subscriptions.
templateId String
type String
(String) Template type pagerduty.notification.
updatedAt String
(String) Last updated time.
description string
(String) The template description.
id string
The unique identifier of the pagerduty_template.
instanceGuid string
name string
(String) The Template name.
subscriptionCount number
(Integer) Number of subscriptions.
subscriptionNames string[]
(List) List of subscriptions.
templateId string
type string
(String) Template type pagerduty.notification.
updatedAt string
(String) Last updated time.
description str
(String) The template description.
id str
The unique identifier of the pagerduty_template.
instance_guid str
name str
(String) The Template name.
subscription_count float
(Integer) Number of subscriptions.
subscription_names Sequence[str]
(List) List of subscriptions.
template_id str
type str
(String) Template type pagerduty.notification.
updated_at str
(String) Last updated time.
description String
(String) The template description.
id String
The unique identifier of the pagerduty_template.
instanceGuid String
name String
(String) The Template name.
subscriptionCount Number
(Integer) Number of subscriptions.
subscriptionNames List<String>
(List) List of subscriptions.
templateId String
type String
(String) Template type pagerduty.notification.
updatedAt String
(String) Last updated time.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.