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 LookupSchedule in the Go SDK.

public static class GetSchedule {
    public static Task<GetScheduleResult> InvokeAsync(GetScheduleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name to use to find a schedule in the PagerDuty API.

Name string

The name to use to find a schedule in the PagerDuty API.

name string

The name to use to find a schedule in the PagerDuty API.

name str

The name to use to find a schedule in the PagerDuty API.

GetSchedule Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string

The short name of the found schedule.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The short name of the found schedule.

id string

The provider-assigned unique ID for this managed resource.

name string

The short name of the found schedule.

id str

The provider-assigned unique ID for this managed resource.

name str

The short name of the found schedule.

Package Details

Repository
https://github.com/pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.