@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
228 lines (227 loc) • 8.96 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* * [Official documentation](https://grafana.com/docs/oncall/latest/escalation-chains-and-routes/)
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_policies/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@lbrlabs/pulumi-grafana";
* import * as grafana from "@pulumi/grafana";
*
* const _default = new grafana.OncallEscalationChain("default", {}, {
* provider: grafana.oncall,
* });
* const alex = grafana.getOncallUser({
* username: "alex",
* });
* // Notify step
* const exampleNotifyStepOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepOncallEscalation", {
* escalationChainId: _default.id,
* type: "notify_persons",
* personsToNotifies: [alex.then(alex => alex.id)],
* position: 0,
* });
* // Wait step
* const exampleNotifyStepIndex_oncallEscalationOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepIndex/oncallEscalationOncallEscalation", {
* escalationChainId: _default.id,
* type: "wait",
* duration: 300,
* position: 1,
* });
* // Important step
* const exampleNotifyStepGrafanaIndex_oncallEscalationOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepGrafanaIndex/oncallEscalationOncallEscalation", {
* escalationChainId: _default.id,
* type: "notify_persons",
* important: true,
* personsToNotifies: [alex.then(alex => alex.id)],
* position: 0,
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:index/oncallEscalation:OncallEscalation escalation_name {{escalation_id}}
* ```
*/
export declare class OncallEscalation extends pulumi.CustomResource {
/**
* Get an existing OncallEscalation 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?: OncallEscalationState, opts?: pulumi.CustomResourceOptions): OncallEscalation;
/**
* Returns true if the given object is an instance of OncallEscalation. 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 OncallEscalation;
/**
* The ID of an Action for triggerAction type step.
*/
readonly actionToTrigger: pulumi.Output<string | undefined>;
/**
* The duration of delay for wait type step.
*/
readonly duration: pulumi.Output<number | undefined>;
/**
* The ID of the escalation chain.
*/
readonly escalationChainId: pulumi.Output<string>;
/**
* The ID of a User Group for notify*user*group type step.
*/
readonly groupToNotify: pulumi.Output<string | undefined>;
/**
* Will activate "important" personal notification rules. Actual for steps: notify*persons, notify*on*call*from*schedule and notify*user_group
*/
readonly important: pulumi.Output<boolean | undefined>;
/**
* The beginning of the time interval for notify*if*time*from*to type step in UTC (for example 08:00:00Z).
*/
readonly notifyIfTimeFrom: pulumi.Output<string | undefined>;
/**
* The end of the time interval for notify*if*time*from*to type step in UTC (for example 18:00:00Z).
*/
readonly notifyIfTimeTo: pulumi.Output<string | undefined>;
/**
* ID of a Schedule for notify*on*call*from*schedule type step.
*/
readonly notifyOnCallFromSchedule: pulumi.Output<string | undefined>;
/**
* The list of ID's of users for notifyPersons type step.
*/
readonly personsToNotifies: pulumi.Output<string[] | undefined>;
/**
* The list of ID's of users for notify*person*next*each*time type step.
*/
readonly personsToNotifyNextEachTimes: pulumi.Output<string[] | undefined>;
/**
* The position of the escalation step (starts from 0).
*/
readonly position: pulumi.Output<number>;
/**
* The type of escalation policy. Can be wait, notify*persons, notify*person*next*each*time, notify*on*call*from*schedule, trigger*action, notify*user*group, resolve, notify*whole*channel, notify*if*time*from*to, repeat_escalation
*/
readonly type: pulumi.Output<string | undefined>;
/**
* Create a OncallEscalation 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: OncallEscalationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OncallEscalation resources.
*/
export interface OncallEscalationState {
/**
* The ID of an Action for triggerAction type step.
*/
actionToTrigger?: pulumi.Input<string>;
/**
* The duration of delay for wait type step.
*/
duration?: pulumi.Input<number>;
/**
* The ID of the escalation chain.
*/
escalationChainId?: pulumi.Input<string>;
/**
* The ID of a User Group for notify*user*group type step.
*/
groupToNotify?: pulumi.Input<string>;
/**
* Will activate "important" personal notification rules. Actual for steps: notify*persons, notify*on*call*from*schedule and notify*user_group
*/
important?: pulumi.Input<boolean>;
/**
* The beginning of the time interval for notify*if*time*from*to type step in UTC (for example 08:00:00Z).
*/
notifyIfTimeFrom?: pulumi.Input<string>;
/**
* The end of the time interval for notify*if*time*from*to type step in UTC (for example 18:00:00Z).
*/
notifyIfTimeTo?: pulumi.Input<string>;
/**
* ID of a Schedule for notify*on*call*from*schedule type step.
*/
notifyOnCallFromSchedule?: pulumi.Input<string>;
/**
* The list of ID's of users for notifyPersons type step.
*/
personsToNotifies?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The list of ID's of users for notify*person*next*each*time type step.
*/
personsToNotifyNextEachTimes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The position of the escalation step (starts from 0).
*/
position?: pulumi.Input<number>;
/**
* The type of escalation policy. Can be wait, notify*persons, notify*person*next*each*time, notify*on*call*from*schedule, trigger*action, notify*user*group, resolve, notify*whole*channel, notify*if*time*from*to, repeat_escalation
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a OncallEscalation resource.
*/
export interface OncallEscalationArgs {
/**
* The ID of an Action for triggerAction type step.
*/
actionToTrigger?: pulumi.Input<string>;
/**
* The duration of delay for wait type step.
*/
duration?: pulumi.Input<number>;
/**
* The ID of the escalation chain.
*/
escalationChainId: pulumi.Input<string>;
/**
* The ID of a User Group for notify*user*group type step.
*/
groupToNotify?: pulumi.Input<string>;
/**
* Will activate "important" personal notification rules. Actual for steps: notify*persons, notify*on*call*from*schedule and notify*user_group
*/
important?: pulumi.Input<boolean>;
/**
* The beginning of the time interval for notify*if*time*from*to type step in UTC (for example 08:00:00Z).
*/
notifyIfTimeFrom?: pulumi.Input<string>;
/**
* The end of the time interval for notify*if*time*from*to type step in UTC (for example 18:00:00Z).
*/
notifyIfTimeTo?: pulumi.Input<string>;
/**
* ID of a Schedule for notify*on*call*from*schedule type step.
*/
notifyOnCallFromSchedule?: pulumi.Input<string>;
/**
* The list of ID's of users for notifyPersons type step.
*/
personsToNotifies?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The list of ID's of users for notify*person*next*each*time type step.
*/
personsToNotifyNextEachTimes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The position of the escalation step (starts from 0).
*/
position: pulumi.Input<number>;
/**
* The type of escalation policy. Can be wait, notify*persons, notify*person*next*each*time, notify*on*call*from*schedule, trigger*action, notify*user*group, resolve, notify*whole*channel, notify*if*time*from*to, repeat_escalation
*/
type?: pulumi.Input<string>;
}