@pulumi/opsgenie
Version:
A Pulumi package for creating and managing opsgenie cloud resources.
180 lines (179 loc) • 5.83 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages an Escalation within Opsgenie.
*
* ## Example Usage
*
* An escalation with a single rule
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as opsgenie from "@pulumi/opsgenie";
*
* const _default = new opsgenie.Escalation("default", {
* name: "genieescalation",
* rules: [{
* condition: "if-not-acked",
* notifyType: "default",
* delay: 1,
* recipients: [{
* type: "user",
* id: test.id,
* }],
* }],
* });
* ```
*
* An escalation with a multiple rules
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as opsgenie from "@pulumi/opsgenie";
*
* const _default = new opsgenie.Escalation("default", {
* name: "genieescalation",
* description: "test",
* ownerTeamId: testOpsgenieTeam.id,
* rules: [
* {
* condition: "if-not-acked",
* notifyType: "default",
* delay: 1,
* recipients: [{
* type: "user",
* id: test.id,
* }],
* },
* {
* condition: "if-not-acked",
* notifyType: "default",
* delay: 1,
* recipients: [{
* type: "team",
* id: testOpsgenieTeam.id,
* }],
* },
* {
* condition: "if-not-acked",
* notifyType: "default",
* delay: 1,
* recipients: [{
* type: "schedule",
* id: testOpsgenieSchedule.id,
* }],
* },
* ],
* repeats: [{
* waitInterval: 10,
* count: 1,
* resetRecipientStates: true,
* closeAlertAfterAll: false,
* }],
* });
* ```
*
* ## Import
*
* Escalations can be imported using the `escalation_id`, e.g.
*
* ```sh
* $ pulumi import opsgenie:index/escalation:Escalation test escalation_id`
* ```
*/
export declare class Escalation extends pulumi.CustomResource {
/**
* Get an existing Escalation 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?: EscalationState, opts?: pulumi.CustomResourceOptions): Escalation;
/**
* Returns true if the given object is an instance of Escalation. 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 Escalation;
/**
* Description of the escalation.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Name of the escalation.
*/
readonly name: pulumi.Output<string>;
/**
* Owner team id of the escalation.
*/
readonly ownerTeamId: pulumi.Output<string | undefined>;
/**
* Repeat preferences of the escalation including repeat interval, count, reverting acknowledge and seen states back and closing an alert automatically as soon as repeats are completed
*/
readonly repeats: pulumi.Output<outputs.EscalationRepeat[] | undefined>;
/**
* List of the escalation rules. See below for how rules are defined.
*/
readonly rules: pulumi.Output<outputs.EscalationRule[]>;
/**
* Create a Escalation 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: EscalationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Escalation resources.
*/
export interface EscalationState {
/**
* Description of the escalation.
*/
description?: pulumi.Input<string>;
/**
* Name of the escalation.
*/
name?: pulumi.Input<string>;
/**
* Owner team id of the escalation.
*/
ownerTeamId?: pulumi.Input<string>;
/**
* Repeat preferences of the escalation including repeat interval, count, reverting acknowledge and seen states back and closing an alert automatically as soon as repeats are completed
*/
repeats?: pulumi.Input<pulumi.Input<inputs.EscalationRepeat>[]>;
/**
* List of the escalation rules. See below for how rules are defined.
*/
rules?: pulumi.Input<pulumi.Input<inputs.EscalationRule>[]>;
}
/**
* The set of arguments for constructing a Escalation resource.
*/
export interface EscalationArgs {
/**
* Description of the escalation.
*/
description?: pulumi.Input<string>;
/**
* Name of the escalation.
*/
name?: pulumi.Input<string>;
/**
* Owner team id of the escalation.
*/
ownerTeamId?: pulumi.Input<string>;
/**
* Repeat preferences of the escalation including repeat interval, count, reverting acknowledge and seen states back and closing an alert automatically as soon as repeats are completed
*/
repeats?: pulumi.Input<pulumi.Input<inputs.EscalationRepeat>[]>;
/**
* List of the escalation rules. See below for how rules are defined.
*/
rules: pulumi.Input<pulumi.Input<inputs.EscalationRule>[]>;
}