GetExtensionSchema
Use this data source to get information about a specific extension vendor that you can use for a service (e.g: Slack, Generic Webhook, ServiceNow).
Example Usage
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
class MyStack : Stack
{
public MyStack()
{
var webhook = Output.Create(Pagerduty.GetExtensionSchema.InvokeAsync(new Pagerduty.GetExtensionSchemaArgs
{
Name = "Generic V2 Webhook",
}));
var exampleUser = new Pagerduty.User("exampleUser", new Pagerduty.UserArgs
{
Email = "howard.james@example.domain",
Teams =
{
pagerduty_team.Example.Id,
},
});
var foo = new Pagerduty.EscalationPolicy("foo", new Pagerduty.EscalationPolicyArgs
{
NumLoops = 2,
Rules =
{
new Pagerduty.Inputs.EscalationPolicyRuleArgs
{
EscalationDelayInMinutes = 10,
Target =
{
{
{ "id", exampleUser.Id },
{ "type", "user" },
},
},
},
},
});
var exampleService = new Pagerduty.Service("exampleService", new Pagerduty.ServiceArgs
{
AcknowledgementTimeout = 600,
AutoResolveTimeout = 14400,
EscalationPolicy = pagerduty_escalation_policy.Example.Id,
});
var slack = new Pagerduty.Extension("slack", new Pagerduty.ExtensionArgs
{
EndpointUrl = "https://generic_webhook_url/XXXXXX/BBBBBB",
ExtensionObjects =
{
exampleService.Id,
},
ExtensionSchema = webhook.Apply(webhook => webhook.Id),
});
}
}
Coming soon!
import pulumi
import pulumi_pagerduty as pagerduty
webhook = pagerduty.get_extension_schema(name="Generic V2 Webhook")
example_user = pagerduty.User("exampleUser",
email="howard.james@example.domain",
teams=[pagerduty_team["example"]["id"]])
foo = pagerduty.EscalationPolicy("foo",
num_loops=2,
rules=[{
"escalationDelayInMinutes": 10,
"target": [{
"id": example_user.id,
"type": "user",
}],
}])
example_service = pagerduty.Service("exampleService",
acknowledgement_timeout=600,
auto_resolve_timeout=14400,
escalation_policy=pagerduty_escalation_policy["example"]["id"])
slack = pagerduty.Extension("slack",
endpoint_url="https://generic_webhook_url/XXXXXX/BBBBBB",
extension_objects=[example_service.id],
extension_schema=webhook.id)import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const webhook = pulumi.output(pagerduty.getExtensionSchema({
name: "Generic V2 Webhook",
}, { async: true }));
const exampleUser = new pagerduty.User("example", {
email: "howard.james@example.domain",
teams: [pagerduty_team_example.id],
});
const foo = new pagerduty.EscalationPolicy("foo", {
numLoops: 2,
rules: [{
escalationDelayInMinutes: 10,
targets: [{
id: exampleUser.id,
type: "user",
}],
}],
});
const exampleService = new pagerduty.Service("example", {
acknowledgementTimeout: "600",
autoResolveTimeout: "14400",
escalationPolicy: pagerduty_escalation_policy_example.id,
});
const slack = new pagerduty.Extension("slack", {
endpointUrl: "https://generic_webhook_url/XXXXXX/BBBBBB",
extensionObjects: [exampleService.id],
extensionSchema: webhook.id,
});Using GetExtensionSchema
function getExtensionSchema(args: GetExtensionSchemaArgs, opts?: InvokeOptions): Promise<GetExtensionSchemaResult>function get_extension_schema(name=None, opts=None)func GetExtensionSchema(ctx *Context, args *GetExtensionSchemaArgs, opts ...InvokeOption) (*GetExtensionSchemaResult, error)public static class GetExtensionSchema {
public static Task<GetExtensionSchemaResult> InvokeAsync(GetExtensionSchemaArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetExtensionSchema Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerdutyTerraform Provider.