UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

160 lines (159 loc) 6.88 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * A [schedule](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE4Mg-create-a-schedule) determines the time periods that users are on call. Only on-call users are eligible to receive notifications from incidents. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = new pagerduty.User("example", { * name: "Earline Greenholt", * email: "125.greenholt.earline@graham.name", * }); * const exampleTeam = new pagerduty.Team("example", {name: "A Team"}); * const foo = new pagerduty.Schedule("foo", { * name: "Daily Engineering Rotation", * timeZone: "America/New_York", * layers: [{ * name: "Night Shift", * start: "2015-11-06T20:00:00-05:00", * rotationVirtualStart: "2015-11-06T20:00:00-05:00", * rotationTurnLengthSeconds: 86400, * users: [example.id], * restrictions: [{ * type: "daily_restriction", * startTimeOfDay: "08:00:00", * durationSeconds: 32400, * }], * }], * teams: [exampleTeam.id], * }); * ``` * * ## Import * * Schedules can be imported using the `id`, e.g. * * ```sh * $ pulumi import pagerduty:index/schedule:Schedule main PLBP09X * ``` */ export declare class Schedule extends pulumi.CustomResource { /** * Get an existing Schedule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ScheduleState, opts?: pulumi.CustomResourceOptions): Schedule; /** * Returns true if the given object is an instance of Schedule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Schedule; /** * The description of the schedule. */ readonly description: pulumi.Output<string>; readonly finalSchedules: pulumi.Output<outputs.ScheduleFinalSchedule[]>; /** * A schedule layer block. Schedule layers documented below. */ readonly layers: pulumi.Output<outputs.ScheduleLayer[]>; /** * The name of the schedule. */ readonly name: pulumi.Output<string>; /** * Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter `overflow` is passed. For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from `2011-06-01T10:00:00Z` to `2011-06-01T14:00:00Z`: * If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of `2011-06-01T10:00:00Z` and end of `2011-06-01T14:00:00Z`. * If you do pass the `overflow` parameter, you will get one schedule entry returned with a start of `2011-06-01T00:00:00Z` and end of `2011-06-02T00:00:00Z`. */ readonly overflow: pulumi.Output<boolean | undefined>; /** * Teams associated with the schedule. */ readonly teams: pulumi.Output<string[] | undefined>; /** * The time zone of the schedule (e.g. `Europe/Berlin`). */ readonly timeZone: pulumi.Output<string>; /** * Create a Schedule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ScheduleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Schedule resources. */ export interface ScheduleState { /** * The description of the schedule. */ description?: pulumi.Input<string>; finalSchedules?: pulumi.Input<pulumi.Input<inputs.ScheduleFinalSchedule>[]>; /** * A schedule layer block. Schedule layers documented below. */ layers?: pulumi.Input<pulumi.Input<inputs.ScheduleLayer>[]>; /** * The name of the schedule. */ name?: pulumi.Input<string>; /** * Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter `overflow` is passed. For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from `2011-06-01T10:00:00Z` to `2011-06-01T14:00:00Z`: * If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of `2011-06-01T10:00:00Z` and end of `2011-06-01T14:00:00Z`. * If you do pass the `overflow` parameter, you will get one schedule entry returned with a start of `2011-06-01T00:00:00Z` and end of `2011-06-02T00:00:00Z`. */ overflow?: pulumi.Input<boolean>; /** * Teams associated with the schedule. */ teams?: pulumi.Input<pulumi.Input<string>[]>; /** * The time zone of the schedule (e.g. `Europe/Berlin`). */ timeZone?: pulumi.Input<string>; } /** * The set of arguments for constructing a Schedule resource. */ export interface ScheduleArgs { /** * The description of the schedule. */ description?: pulumi.Input<string>; /** * A schedule layer block. Schedule layers documented below. */ layers: pulumi.Input<pulumi.Input<inputs.ScheduleLayer>[]>; /** * The name of the schedule. */ name?: pulumi.Input<string>; /** * Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter `overflow` is passed. For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from `2011-06-01T10:00:00Z` to `2011-06-01T14:00:00Z`: * If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of `2011-06-01T10:00:00Z` and end of `2011-06-01T14:00:00Z`. * If you do pass the `overflow` parameter, you will get one schedule entry returned with a start of `2011-06-01T00:00:00Z` and end of `2011-06-02T00:00:00Z`. */ overflow?: pulumi.Input<boolean>; /** * Teams associated with the schedule. */ teams?: pulumi.Input<pulumi.Input<string>[]>; /** * The time zone of the schedule (e.g. `Europe/Berlin`). */ timeZone: pulumi.Input<string>; }