GetSchedule
Use this data source to get information about a specific schedule that you can use for other PagerDuty resources.
Example Usage
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Pagerduty.GetSchedule.InvokeAsync(new Pagerduty.GetScheduleArgs
{
Name = "Daily Engineering Rotation",
}));
var foo = new Pagerduty.EscalationPolicy("foo", new Pagerduty.EscalationPolicyArgs
{
NumLoops = 2,
Rules =
{
new Pagerduty.Inputs.EscalationPolicyRuleArgs
{
EscalationDelayInMinutes = 10,
Target =
{
{
{ "id", test.Apply(test => test.Id) },
{ "type", "schedule" },
},
},
},
},
});
}
}
Coming soon!
import pulumi
import pulumi_pagerduty as pagerduty
test = pagerduty.get_schedule(name="Daily Engineering Rotation")
foo = pagerduty.EscalationPolicy("foo",
num_loops=2,
rules=[{
"escalationDelayInMinutes": 10,
"target": [{
"id": test.id,
"type": "schedule",
}],
}])import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const test = pulumi.output(pagerduty.getSchedule({
name: "Daily Engineering Rotation",
}, { async: true }));
const foo = new pagerduty.EscalationPolicy("foo", {
numLoops: 2,
rules: [{
escalationDelayInMinutes: 10,
targets: [{
id: test.id,
type: "schedule",
}],
}],
});Using GetSchedule
function getSchedule(args: GetScheduleArgs, opts?: InvokeOptions): Promise<GetScheduleResult>function get_schedule(name=None, opts=None)func LookupSchedule(ctx *Context, args *LookupScheduleArgs, opts ...InvokeOption) (*LookupScheduleResult, error)Note: This function is named
LookupSchedulein the Go SDK.
public static class GetSchedule {
public static Task<GetScheduleResult> InvokeAsync(GetScheduleArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetSchedule 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.