@pulumi/opsgenie
Version:
A Pulumi package for creating and managing opsgenie cloud resources.
205 lines (204 loc) • 8.36 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages a Notification Policy within Opsgenie.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as opsgenie from "@pulumi/opsgenie";
*
* const test = new opsgenie.Team("test", {
* name: "example team",
* description: "This team deals with all the things",
* });
* const testNotificationPolicy = new opsgenie.NotificationPolicy("test", {
* filters: [{}],
* name: "example policy",
* teamId: test.id,
* policyDescription: "This policy has a delay action",
* delayActions: [{
* delayOption: "next-time",
* untilMinute: 1,
* untilHour: 9,
* }],
* });
* ```
*
* ## Import
*
* Notification policies can be imported using the `team_id` and `notification_policy_id`, e.g.
*
* ```sh
* $ pulumi import opsgenie:index/notificationPolicy:NotificationPolicy test team_id/notification_policy_id`
* ```
*/
export declare class NotificationPolicy extends pulumi.CustomResource {
/**
* Get an existing NotificationPolicy 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?: NotificationPolicyState, opts?: pulumi.CustomResourceOptions): NotificationPolicy;
/**
* Returns true if the given object is an instance of NotificationPolicy. 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 NotificationPolicy;
/**
* Auto Restart Action of the policy. This is a block, structure is documented below.
*/
readonly autoCloseActions: pulumi.Output<outputs.NotificationPolicyAutoCloseAction[] | undefined>;
/**
* Auto Restart Action of the policy. This is a block, structure is documented below.
*/
readonly autoRestartActions: pulumi.Output<outputs.NotificationPolicyAutoRestartAction[] | undefined>;
/**
* Deduplication Action of the policy. This is a block, structure is documented below.
*/
readonly deDuplicationActions: pulumi.Output<outputs.NotificationPolicyDeDuplicationAction[] | undefined>;
/**
* Delay notifications. This is a block, structure is documented below.
*/
readonly delayActions: pulumi.Output<outputs.NotificationPolicyDelayAction[] | undefined>;
/**
* If policy should be enabled. Default: `true`
*/
readonly enabled: pulumi.Output<boolean | undefined>;
/**
* A notification filter which will be applied. This filter can be empty: `filter {}` - this means `match-all`. This is a block, structure is documented below.
*/
readonly filters: pulumi.Output<outputs.NotificationPolicyFilter[]>;
/**
* Name of the notification policy
*/
readonly name: pulumi.Output<string>;
/**
* Description of the policy. This can be max 512 characters.
*/
readonly policyDescription: pulumi.Output<string | undefined>;
/**
* Suppress value of the policy. Values are: `true`, `false`. Default: `false`
*/
readonly suppress: pulumi.Output<boolean | undefined>;
/**
* Id of team that this policy belons to.
*/
readonly teamId: pulumi.Output<string>;
/**
* Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
*/
readonly timeRestrictions: pulumi.Output<outputs.NotificationPolicyTimeRestriction[] | undefined>;
/**
* Create a NotificationPolicy 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: NotificationPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering NotificationPolicy resources.
*/
export interface NotificationPolicyState {
/**
* Auto Restart Action of the policy. This is a block, structure is documented below.
*/
autoCloseActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyAutoCloseAction>[]>;
/**
* Auto Restart Action of the policy. This is a block, structure is documented below.
*/
autoRestartActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyAutoRestartAction>[]>;
/**
* Deduplication Action of the policy. This is a block, structure is documented below.
*/
deDuplicationActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyDeDuplicationAction>[]>;
/**
* Delay notifications. This is a block, structure is documented below.
*/
delayActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyDelayAction>[]>;
/**
* If policy should be enabled. Default: `true`
*/
enabled?: pulumi.Input<boolean>;
/**
* A notification filter which will be applied. This filter can be empty: `filter {}` - this means `match-all`. This is a block, structure is documented below.
*/
filters?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyFilter>[]>;
/**
* Name of the notification policy
*/
name?: pulumi.Input<string>;
/**
* Description of the policy. This can be max 512 characters.
*/
policyDescription?: pulumi.Input<string>;
/**
* Suppress value of the policy. Values are: `true`, `false`. Default: `false`
*/
suppress?: pulumi.Input<boolean>;
/**
* Id of team that this policy belons to.
*/
teamId?: pulumi.Input<string>;
/**
* Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
*/
timeRestrictions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyTimeRestriction>[]>;
}
/**
* The set of arguments for constructing a NotificationPolicy resource.
*/
export interface NotificationPolicyArgs {
/**
* Auto Restart Action of the policy. This is a block, structure is documented below.
*/
autoCloseActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyAutoCloseAction>[]>;
/**
* Auto Restart Action of the policy. This is a block, structure is documented below.
*/
autoRestartActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyAutoRestartAction>[]>;
/**
* Deduplication Action of the policy. This is a block, structure is documented below.
*/
deDuplicationActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyDeDuplicationAction>[]>;
/**
* Delay notifications. This is a block, structure is documented below.
*/
delayActions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyDelayAction>[]>;
/**
* If policy should be enabled. Default: `true`
*/
enabled?: pulumi.Input<boolean>;
/**
* A notification filter which will be applied. This filter can be empty: `filter {}` - this means `match-all`. This is a block, structure is documented below.
*/
filters: pulumi.Input<pulumi.Input<inputs.NotificationPolicyFilter>[]>;
/**
* Name of the notification policy
*/
name?: pulumi.Input<string>;
/**
* Description of the policy. This can be max 512 characters.
*/
policyDescription?: pulumi.Input<string>;
/**
* Suppress value of the policy. Values are: `true`, `false`. Default: `false`
*/
suppress?: pulumi.Input<boolean>;
/**
* Id of team that this policy belons to.
*/
teamId: pulumi.Input<string>;
/**
* Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
*/
timeRestrictions?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyTimeRestriction>[]>;
}