@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
188 lines (187 loc) • 6.68 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@lbrlabs/pulumi-grafana";
* import * as grafana from "@pulumi/grafana";
*
* const exampleSlackChannel = grafana.getOnCallSlackChannel({
* name: "example_slack_channel",
* });
* const exampleUserGroup = grafana.getOncallUserGroup({
* slackHandle: "example_slack_handle",
* });
* // ICal based schedule
* const exampleScheduleOncallSchedule = new grafana.OncallSchedule("exampleScheduleOncallSchedule", {
* type: "ical",
* icalUrlPrimary: "https://example.com/example_ical.ics",
* icalUrlOverrides: "https://example.com/example_overrides_ical.ics",
* slack: {
* channelId: exampleSlackChannel.then(exampleSlackChannel => exampleSlackChannel.slackId),
* userGroupId: exampleUserGroup.then(exampleUserGroup => exampleUserGroup.slackId),
* },
* });
* // Shift based schedule
* const exampleScheduleIndex_oncallScheduleOncallSchedule = new grafana.OncallSchedule("exampleScheduleIndex/oncallScheduleOncallSchedule", {
* type: "calendar",
* timeZone: "America/New_York",
* shifts: [],
* icalUrlOverrides: "https://example.com/example_overrides_ical.ics",
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:index/oncallSchedule:OncallSchedule schedule_name {{schedule_id}}
* ```
*/
export declare class OncallSchedule extends pulumi.CustomResource {
/**
* Get an existing OncallSchedule 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?: OncallScheduleState, opts?: pulumi.CustomResourceOptions): OncallSchedule;
/**
* Returns true if the given object is an instance of OncallSchedule. 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 OncallSchedule;
/**
* Enable overrides via web UI (it will ignore ical*url*overrides).
*/
readonly enableWebOverrides: pulumi.Output<boolean | undefined>;
/**
* The URL of external iCal calendar which override primary events.
*/
readonly icalUrlOverrides: pulumi.Output<string | undefined>;
/**
* The URL of the external calendar iCal file.
*/
readonly icalUrlPrimary: pulumi.Output<string | undefined>;
/**
* The schedule's name.
*/
readonly name: pulumi.Output<string>;
/**
* The list of ID's of on-call shifts.
*/
readonly shifts: pulumi.Output<string[] | undefined>;
/**
* The Slack-specific settings for a schedule.
*/
readonly slack: pulumi.Output<outputs.OncallScheduleSlack | undefined>;
/**
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.getOncallTeam` datasource.
*/
readonly teamId: pulumi.Output<string | undefined>;
/**
* The schedule's time zone.
*/
readonly timeZone: pulumi.Output<string | undefined>;
/**
* The schedule's type.
*/
readonly type: pulumi.Output<string>;
/**
* Create a OncallSchedule 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: OncallScheduleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OncallSchedule resources.
*/
export interface OncallScheduleState {
/**
* Enable overrides via web UI (it will ignore ical*url*overrides).
*/
enableWebOverrides?: pulumi.Input<boolean>;
/**
* The URL of external iCal calendar which override primary events.
*/
icalUrlOverrides?: pulumi.Input<string>;
/**
* The URL of the external calendar iCal file.
*/
icalUrlPrimary?: pulumi.Input<string>;
/**
* The schedule's name.
*/
name?: pulumi.Input<string>;
/**
* The list of ID's of on-call shifts.
*/
shifts?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The Slack-specific settings for a schedule.
*/
slack?: pulumi.Input<inputs.OncallScheduleSlack>;
/**
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.getOncallTeam` datasource.
*/
teamId?: pulumi.Input<string>;
/**
* The schedule's time zone.
*/
timeZone?: pulumi.Input<string>;
/**
* The schedule's type.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a OncallSchedule resource.
*/
export interface OncallScheduleArgs {
/**
* Enable overrides via web UI (it will ignore ical*url*overrides).
*/
enableWebOverrides?: pulumi.Input<boolean>;
/**
* The URL of external iCal calendar which override primary events.
*/
icalUrlOverrides?: pulumi.Input<string>;
/**
* The URL of the external calendar iCal file.
*/
icalUrlPrimary?: pulumi.Input<string>;
/**
* The schedule's name.
*/
name?: pulumi.Input<string>;
/**
* The list of ID's of on-call shifts.
*/
shifts?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The Slack-specific settings for a schedule.
*/
slack?: pulumi.Input<inputs.OncallScheduleSlack>;
/**
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.getOncallTeam` datasource.
*/
teamId?: pulumi.Input<string>;
/**
* The schedule's time zone.
*/
timeZone?: pulumi.Input<string>;
/**
* The schedule's type.
*/
type: pulumi.Input<string>;
}