pagerduty.getVendor
Explore with Pulumi AI
Use this data source to get information about a specific vendor that you can use for a service integration (e.g. Amazon Cloudwatch, Splunk, Datadog).
For the case of vendors that rely on Change Events (e.g. Jekings CI, Github, Gitlab, …) is important to know that those vendors are only available with PagerDuty AIOps add-on. Therefore, they won’t be accessible as result of
pagerduty.getVendor
data source without the proper entitlements.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const datadog = pagerduty.getVendor({
name: "Datadog",
});
const exampleUser = new pagerduty.User("exampleUser", {
email: "125.greenholt.earline@graham.name",
teams: [pagerduty_team.example.id],
});
const foo = new pagerduty.EscalationPolicy("foo", {
numLoops: 2,
rules: [{
escalationDelayInMinutes: 10,
targets: [{
type: "user",
id: exampleUser.id,
}],
}],
});
const exampleService = new pagerduty.Service("exampleService", {
autoResolveTimeout: "14400",
acknowledgementTimeout: "600",
escalationPolicy: pagerduty_escalation_policy.example.id,
});
const exampleServiceIntegration = new pagerduty.ServiceIntegration("exampleServiceIntegration", {
vendor: datadog.then(datadog => datadog.id),
service: exampleService.id,
});
import pulumi
import pulumi_pagerduty as pagerduty
datadog = pagerduty.get_vendor(name="Datadog")
example_user = pagerduty.User("exampleUser",
email="125.greenholt.earline@graham.name",
teams=[pagerduty_team["example"]["id"]])
foo = pagerduty.EscalationPolicy("foo",
num_loops=2,
rules=[pagerduty.EscalationPolicyRuleArgs(
escalation_delay_in_minutes=10,
targets=[pagerduty.EscalationPolicyRuleTargetArgs(
type="user",
id=example_user.id,
)],
)])
example_service = pagerduty.Service("exampleService",
auto_resolve_timeout="14400",
acknowledgement_timeout="600",
escalation_policy=pagerduty_escalation_policy["example"]["id"])
example_service_integration = pagerduty.ServiceIntegration("exampleServiceIntegration",
vendor=datadog.id,
service=example_service.id)
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 {
datadog, err := pagerduty.GetVendor(ctx, &pagerduty.GetVendorArgs{
Name: "Datadog",
}, nil)
if err != nil {
return err
}
exampleUser, err := pagerduty.NewUser(ctx, "exampleUser", &pagerduty.UserArgs{
Email: pulumi.String("125.greenholt.earline@graham.name"),
Teams: pulumi.StringArray{
pagerduty_team.Example.Id,
},
})
if err != nil {
return err
}
_, err = pagerduty.NewEscalationPolicy(ctx, "foo", &pagerduty.EscalationPolicyArgs{
NumLoops: pulumi.Int(2),
Rules: pagerduty.EscalationPolicyRuleArray{
&pagerduty.EscalationPolicyRuleArgs{
EscalationDelayInMinutes: pulumi.Int(10),
Targets: pagerduty.EscalationPolicyRuleTargetArray{
&pagerduty.EscalationPolicyRuleTargetArgs{
Type: pulumi.String("user"),
Id: exampleUser.ID(),
},
},
},
},
})
if err != nil {
return err
}
exampleService, err := pagerduty.NewService(ctx, "exampleService", &pagerduty.ServiceArgs{
AutoResolveTimeout: pulumi.String("14400"),
AcknowledgementTimeout: pulumi.String("600"),
EscalationPolicy: pulumi.Any(pagerduty_escalation_policy.Example.Id),
})
if err != nil {
return err
}
_, err = pagerduty.NewServiceIntegration(ctx, "exampleServiceIntegration", &pagerduty.ServiceIntegrationArgs{
Vendor: pulumi.String(datadog.Id),
Service: exampleService.ID(),
})
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 datadog = Pagerduty.GetVendor.Invoke(new()
{
Name = "Datadog",
});
var exampleUser = new Pagerduty.User("exampleUser", new()
{
Email = "125.greenholt.earline@graham.name",
Teams = new[]
{
pagerduty_team.Example.Id,
},
});
var foo = new Pagerduty.EscalationPolicy("foo", new()
{
NumLoops = 2,
Rules = new[]
{
new Pagerduty.Inputs.EscalationPolicyRuleArgs
{
EscalationDelayInMinutes = 10,
Targets = new[]
{
new Pagerduty.Inputs.EscalationPolicyRuleTargetArgs
{
Type = "user",
Id = exampleUser.Id,
},
},
},
},
});
var exampleService = new Pagerduty.Service("exampleService", new()
{
AutoResolveTimeout = "14400",
AcknowledgementTimeout = "600",
EscalationPolicy = pagerduty_escalation_policy.Example.Id,
});
var exampleServiceIntegration = new Pagerduty.ServiceIntegration("exampleServiceIntegration", new()
{
Vendor = datadog.Apply(getVendorResult => getVendorResult.Id),
Service = exampleService.Id,
});
});
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.GetVendorArgs;
import com.pulumi.pagerduty.User;
import com.pulumi.pagerduty.UserArgs;
import com.pulumi.pagerduty.EscalationPolicy;
import com.pulumi.pagerduty.EscalationPolicyArgs;
import com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;
import com.pulumi.pagerduty.Service;
import com.pulumi.pagerduty.ServiceArgs;
import com.pulumi.pagerduty.ServiceIntegration;
import com.pulumi.pagerduty.ServiceIntegrationArgs;
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 datadog = PagerdutyFunctions.getVendor(GetVendorArgs.builder()
.name("Datadog")
.build());
var exampleUser = new User("exampleUser", UserArgs.builder()
.email("125.greenholt.earline@graham.name")
.teams(pagerduty_team.example().id())
.build());
var foo = new EscalationPolicy("foo", EscalationPolicyArgs.builder()
.numLoops(2)
.rules(EscalationPolicyRuleArgs.builder()
.escalationDelayInMinutes(10)
.targets(EscalationPolicyRuleTargetArgs.builder()
.type("user")
.id(exampleUser.id())
.build())
.build())
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.autoResolveTimeout(14400)
.acknowledgementTimeout(600)
.escalationPolicy(pagerduty_escalation_policy.example().id())
.build());
var exampleServiceIntegration = new ServiceIntegration("exampleServiceIntegration", ServiceIntegrationArgs.builder()
.vendor(datadog.applyValue(getVendorResult -> getVendorResult.id()))
.service(exampleService.id())
.build());
}
}
resources:
exampleUser:
type: pagerduty:User
properties:
email: 125.greenholt.earline@graham.name
teams:
- ${pagerduty_team.example.id}
foo:
type: pagerduty:EscalationPolicy
properties:
numLoops: 2
rules:
- escalationDelayInMinutes: 10
targets:
- type: user
id: ${exampleUser.id}
exampleService:
type: pagerduty:Service
properties:
autoResolveTimeout: 14400
acknowledgementTimeout: 600
escalationPolicy: ${pagerduty_escalation_policy.example.id}
exampleServiceIntegration:
type: pagerduty:ServiceIntegration
properties:
vendor: ${datadog.id}
service: ${exampleService.id}
variables:
datadog:
fn::invoke:
Function: pagerduty:getVendor
Arguments:
name: Datadog
Using getVendor
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 getVendor(args: GetVendorArgs, opts?: InvokeOptions): Promise<GetVendorResult>
function getVendorOutput(args: GetVendorOutputArgs, opts?: InvokeOptions): Output<GetVendorResult>
def get_vendor(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVendorResult
def get_vendor_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVendorResult]
func GetVendor(ctx *Context, args *GetVendorArgs, opts ...InvokeOption) (*GetVendorResult, error)
func GetVendorOutput(ctx *Context, args *GetVendorOutputArgs, opts ...InvokeOption) GetVendorResultOutput
> Note: This function is named GetVendor
in the Go SDK.
public static class GetVendor
{
public static Task<GetVendorResult> InvokeAsync(GetVendorArgs args, InvokeOptions? opts = null)
public static Output<GetVendorResult> Invoke(GetVendorInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVendorResult> getVendor(GetVendorArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: pagerduty:index/getVendor:getVendor
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The vendor name to use to find a vendor in the PagerDuty API.
- Name string
- The vendor name to use to find a vendor in the PagerDuty API.
- name String
- The vendor name to use to find a vendor in the PagerDuty API.
- name string
- The vendor name to use to find a vendor in the PagerDuty API.
- name str
- The vendor name to use to find a vendor in the PagerDuty API.
- name String
- The vendor name to use to find a vendor in the PagerDuty API.
getVendor Result
The following output properties are available:
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerduty
Terraform Provider.