@pulumi/datadog 4.56.0-alpha.1757721086 → 4.56.0-alpha.1758166292

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,220 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * Provides a Datadog incident notification rule resource. This can be used to create and manage Datadog incident notification rules.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as datadog from "@pulumi/datadog";
12
+ *
13
+ * const example = new datadog.IncidentType("example", {
14
+ * name: "My Incident Type",
15
+ * description: "Incident type for critical production issues",
16
+ * });
17
+ * const exampleIncidentNotificationTemplate = new datadog.IncidentNotificationTemplate("example", {
18
+ * name: "My Notification Template",
19
+ * subject: "SEV-1 Incident: {{incident.title}}",
20
+ * content: `An incident has been declared.
21
+ *
22
+ * Title: {{incident.title}}
23
+ * Severity: {{incident.severity}}
24
+ * Status: {{incident.status}}
25
+ *
26
+ * Please join the incident channel for updates.
27
+ * `,
28
+ * category: "alert",
29
+ * incidentType: example.id,
30
+ * });
31
+ * const exampleIncidentNotificationRule = new datadog.IncidentNotificationRule("example", {
32
+ * enabled: true,
33
+ * trigger: "incident_created_trigger",
34
+ * visibility: "organization",
35
+ * handles: [
36
+ * "@team-email@company.com",
37
+ * "@slack-channel-alerts",
38
+ * "@pagerduty-service",
39
+ * ],
40
+ * conditions: [
41
+ * {
42
+ * field: "severity",
43
+ * values: [
44
+ * "SEV-1",
45
+ * "SEV-2",
46
+ * ],
47
+ * },
48
+ * {
49
+ * field: "services",
50
+ * values: [
51
+ * "web-service",
52
+ * "api-service",
53
+ * "database-service",
54
+ * ],
55
+ * },
56
+ * ],
57
+ * renotifyOns: [
58
+ * "status",
59
+ * "severity",
60
+ * ],
61
+ * incidentType: example.id,
62
+ * notificationTemplate: exampleIncidentNotificationTemplate.id,
63
+ * });
64
+ * ```
65
+ *
66
+ * ## Import
67
+ *
68
+ * The `pulumi import` command can be used, for example:
69
+ *
70
+ * ```sh
71
+ * $ pulumi import datadog:index/incidentNotificationRule:IncidentNotificationRule example "00000000-0000-0000-0000-000000000000"
72
+ * ```
73
+ */
74
+ export declare class IncidentNotificationRule extends pulumi.CustomResource {
75
+ /**
76
+ * Get an existing IncidentNotificationRule resource's state with the given name, ID, and optional extra
77
+ * properties used to qualify the lookup.
78
+ *
79
+ * @param name The _unique_ name of the resulting resource.
80
+ * @param id The _unique_ provider ID of the resource to lookup.
81
+ * @param state Any extra arguments used during the lookup.
82
+ * @param opts Optional settings to control the behavior of the CustomResource.
83
+ */
84
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IncidentNotificationRuleState, opts?: pulumi.CustomResourceOptions): IncidentNotificationRule;
85
+ /**
86
+ * Returns true if the given object is an instance of IncidentNotificationRule. This is designed to work even
87
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
88
+ */
89
+ static isInstance(obj: any): obj is IncidentNotificationRule;
90
+ /**
91
+ * The conditions that trigger this notification rule. At least one condition is required.
92
+ */
93
+ readonly conditions: pulumi.Output<outputs.IncidentNotificationRuleCondition[] | undefined>;
94
+ /**
95
+ * Timestamp when the notification rule was created.
96
+ */
97
+ readonly created: pulumi.Output<string>;
98
+ /**
99
+ * Whether the notification rule is enabled. Defaults to `false`.
100
+ */
101
+ readonly enabled: pulumi.Output<boolean>;
102
+ /**
103
+ * The notification handles (targets) for this rule. Examples: @team-email@company.com, @slack-channel.
104
+ */
105
+ readonly handles: pulumi.Output<string[]>;
106
+ /**
107
+ * The ID of the incident type this notification rule is associated with.
108
+ */
109
+ readonly incidentType: pulumi.Output<string>;
110
+ /**
111
+ * Timestamp when the notification rule was last modified.
112
+ */
113
+ readonly modified: pulumi.Output<string>;
114
+ /**
115
+ * The ID of the notification template to use for this rule.
116
+ */
117
+ readonly notificationTemplate: pulumi.Output<string | undefined>;
118
+ /**
119
+ * List of incident fields that trigger re-notification when changed. Valid values are: status, severity, customer*impact, title, description, detected, root*cause, services, state.
120
+ */
121
+ readonly renotifyOns: pulumi.Output<string[] | undefined>;
122
+ /**
123
+ * The trigger event for this notification rule. Valid values are: incident*created*trigger, incident*saved*trigger.
124
+ */
125
+ readonly trigger: pulumi.Output<string>;
126
+ /**
127
+ * The visibility of the notification rule. Valid values are: all, organization, private. Defaults to organization.
128
+ */
129
+ readonly visibility: pulumi.Output<string>;
130
+ /**
131
+ * Create a IncidentNotificationRule resource with the given unique name, arguments, and options.
132
+ *
133
+ * @param name The _unique_ name of the resource.
134
+ * @param args The arguments to use to populate this resource's properties.
135
+ * @param opts A bag of options that control this resource's behavior.
136
+ */
137
+ constructor(name: string, args: IncidentNotificationRuleArgs, opts?: pulumi.CustomResourceOptions);
138
+ }
139
+ /**
140
+ * Input properties used for looking up and filtering IncidentNotificationRule resources.
141
+ */
142
+ export interface IncidentNotificationRuleState {
143
+ /**
144
+ * The conditions that trigger this notification rule. At least one condition is required.
145
+ */
146
+ conditions?: pulumi.Input<pulumi.Input<inputs.IncidentNotificationRuleCondition>[]>;
147
+ /**
148
+ * Timestamp when the notification rule was created.
149
+ */
150
+ created?: pulumi.Input<string>;
151
+ /**
152
+ * Whether the notification rule is enabled. Defaults to `false`.
153
+ */
154
+ enabled?: pulumi.Input<boolean>;
155
+ /**
156
+ * The notification handles (targets) for this rule. Examples: @team-email@company.com, @slack-channel.
157
+ */
158
+ handles?: pulumi.Input<pulumi.Input<string>[]>;
159
+ /**
160
+ * The ID of the incident type this notification rule is associated with.
161
+ */
162
+ incidentType?: pulumi.Input<string>;
163
+ /**
164
+ * Timestamp when the notification rule was last modified.
165
+ */
166
+ modified?: pulumi.Input<string>;
167
+ /**
168
+ * The ID of the notification template to use for this rule.
169
+ */
170
+ notificationTemplate?: pulumi.Input<string>;
171
+ /**
172
+ * List of incident fields that trigger re-notification when changed. Valid values are: status, severity, customer*impact, title, description, detected, root*cause, services, state.
173
+ */
174
+ renotifyOns?: pulumi.Input<pulumi.Input<string>[]>;
175
+ /**
176
+ * The trigger event for this notification rule. Valid values are: incident*created*trigger, incident*saved*trigger.
177
+ */
178
+ trigger?: pulumi.Input<string>;
179
+ /**
180
+ * The visibility of the notification rule. Valid values are: all, organization, private. Defaults to organization.
181
+ */
182
+ visibility?: pulumi.Input<string>;
183
+ }
184
+ /**
185
+ * The set of arguments for constructing a IncidentNotificationRule resource.
186
+ */
187
+ export interface IncidentNotificationRuleArgs {
188
+ /**
189
+ * The conditions that trigger this notification rule. At least one condition is required.
190
+ */
191
+ conditions?: pulumi.Input<pulumi.Input<inputs.IncidentNotificationRuleCondition>[]>;
192
+ /**
193
+ * Whether the notification rule is enabled. Defaults to `false`.
194
+ */
195
+ enabled?: pulumi.Input<boolean>;
196
+ /**
197
+ * The notification handles (targets) for this rule. Examples: @team-email@company.com, @slack-channel.
198
+ */
199
+ handles: pulumi.Input<pulumi.Input<string>[]>;
200
+ /**
201
+ * The ID of the incident type this notification rule is associated with.
202
+ */
203
+ incidentType: pulumi.Input<string>;
204
+ /**
205
+ * The ID of the notification template to use for this rule.
206
+ */
207
+ notificationTemplate?: pulumi.Input<string>;
208
+ /**
209
+ * List of incident fields that trigger re-notification when changed. Valid values are: status, severity, customer*impact, title, description, detected, root*cause, services, state.
210
+ */
211
+ renotifyOns?: pulumi.Input<pulumi.Input<string>[]>;
212
+ /**
213
+ * The trigger event for this notification rule. Valid values are: incident*created*trigger, incident*saved*trigger.
214
+ */
215
+ trigger: pulumi.Input<string>;
216
+ /**
217
+ * The visibility of the notification rule. Valid values are: all, organization, private. Defaults to organization.
218
+ */
219
+ visibility?: pulumi.Input<string>;
220
+ }
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.IncidentNotificationRule = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Provides a Datadog incident notification rule resource. This can be used to create and manage Datadog incident notification rules.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as datadog from "@pulumi/datadog";
16
+ *
17
+ * const example = new datadog.IncidentType("example", {
18
+ * name: "My Incident Type",
19
+ * description: "Incident type for critical production issues",
20
+ * });
21
+ * const exampleIncidentNotificationTemplate = new datadog.IncidentNotificationTemplate("example", {
22
+ * name: "My Notification Template",
23
+ * subject: "SEV-1 Incident: {{incident.title}}",
24
+ * content: `An incident has been declared.
25
+ *
26
+ * Title: {{incident.title}}
27
+ * Severity: {{incident.severity}}
28
+ * Status: {{incident.status}}
29
+ *
30
+ * Please join the incident channel for updates.
31
+ * `,
32
+ * category: "alert",
33
+ * incidentType: example.id,
34
+ * });
35
+ * const exampleIncidentNotificationRule = new datadog.IncidentNotificationRule("example", {
36
+ * enabled: true,
37
+ * trigger: "incident_created_trigger",
38
+ * visibility: "organization",
39
+ * handles: [
40
+ * "@team-email@company.com",
41
+ * "@slack-channel-alerts",
42
+ * "@pagerduty-service",
43
+ * ],
44
+ * conditions: [
45
+ * {
46
+ * field: "severity",
47
+ * values: [
48
+ * "SEV-1",
49
+ * "SEV-2",
50
+ * ],
51
+ * },
52
+ * {
53
+ * field: "services",
54
+ * values: [
55
+ * "web-service",
56
+ * "api-service",
57
+ * "database-service",
58
+ * ],
59
+ * },
60
+ * ],
61
+ * renotifyOns: [
62
+ * "status",
63
+ * "severity",
64
+ * ],
65
+ * incidentType: example.id,
66
+ * notificationTemplate: exampleIncidentNotificationTemplate.id,
67
+ * });
68
+ * ```
69
+ *
70
+ * ## Import
71
+ *
72
+ * The `pulumi import` command can be used, for example:
73
+ *
74
+ * ```sh
75
+ * $ pulumi import datadog:index/incidentNotificationRule:IncidentNotificationRule example "00000000-0000-0000-0000-000000000000"
76
+ * ```
77
+ */
78
+ class IncidentNotificationRule extends pulumi.CustomResource {
79
+ /**
80
+ * Get an existing IncidentNotificationRule resource's state with the given name, ID, and optional extra
81
+ * properties used to qualify the lookup.
82
+ *
83
+ * @param name The _unique_ name of the resulting resource.
84
+ * @param id The _unique_ provider ID of the resource to lookup.
85
+ * @param state Any extra arguments used during the lookup.
86
+ * @param opts Optional settings to control the behavior of the CustomResource.
87
+ */
88
+ static get(name, id, state, opts) {
89
+ return new IncidentNotificationRule(name, state, { ...opts, id: id });
90
+ }
91
+ /**
92
+ * Returns true if the given object is an instance of IncidentNotificationRule. This is designed to work even
93
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
94
+ */
95
+ static isInstance(obj) {
96
+ if (obj === undefined || obj === null) {
97
+ return false;
98
+ }
99
+ return obj['__pulumiType'] === IncidentNotificationRule.__pulumiType;
100
+ }
101
+ constructor(name, argsOrState, opts) {
102
+ let resourceInputs = {};
103
+ opts = opts || {};
104
+ if (opts.id) {
105
+ const state = argsOrState;
106
+ resourceInputs["conditions"] = state?.conditions;
107
+ resourceInputs["created"] = state?.created;
108
+ resourceInputs["enabled"] = state?.enabled;
109
+ resourceInputs["handles"] = state?.handles;
110
+ resourceInputs["incidentType"] = state?.incidentType;
111
+ resourceInputs["modified"] = state?.modified;
112
+ resourceInputs["notificationTemplate"] = state?.notificationTemplate;
113
+ resourceInputs["renotifyOns"] = state?.renotifyOns;
114
+ resourceInputs["trigger"] = state?.trigger;
115
+ resourceInputs["visibility"] = state?.visibility;
116
+ }
117
+ else {
118
+ const args = argsOrState;
119
+ if (args?.handles === undefined && !opts.urn) {
120
+ throw new Error("Missing required property 'handles'");
121
+ }
122
+ if (args?.incidentType === undefined && !opts.urn) {
123
+ throw new Error("Missing required property 'incidentType'");
124
+ }
125
+ if (args?.trigger === undefined && !opts.urn) {
126
+ throw new Error("Missing required property 'trigger'");
127
+ }
128
+ resourceInputs["conditions"] = args?.conditions;
129
+ resourceInputs["enabled"] = args?.enabled;
130
+ resourceInputs["handles"] = args?.handles;
131
+ resourceInputs["incidentType"] = args?.incidentType;
132
+ resourceInputs["notificationTemplate"] = args?.notificationTemplate;
133
+ resourceInputs["renotifyOns"] = args?.renotifyOns;
134
+ resourceInputs["trigger"] = args?.trigger;
135
+ resourceInputs["visibility"] = args?.visibility;
136
+ resourceInputs["created"] = undefined /*out*/;
137
+ resourceInputs["modified"] = undefined /*out*/;
138
+ }
139
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
140
+ super(IncidentNotificationRule.__pulumiType, name, resourceInputs, opts);
141
+ }
142
+ }
143
+ exports.IncidentNotificationRule = IncidentNotificationRule;
144
+ /** @internal */
145
+ IncidentNotificationRule.__pulumiType = 'datadog:index/incidentNotificationRule:IncidentNotificationRule';
146
+ //# sourceMappingURL=incidentNotificationRule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incidentNotificationRule.js","sourceRoot":"","sources":["../incidentNotificationRule.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,MAAa,wBAAyB,SAAQ,MAAM,CAAC,cAAc;IAC/D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAqC,EAAE,IAAmC;QACnI,OAAO,IAAI,wBAAwB,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,wBAAwB,CAAC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AAE;gBAC1C,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;aAC1D;YACD,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;YAChD,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,cAAc,CAAC,GAAG,IAAI,EAAE,YAAY,CAAC;YACpD,cAAc,CAAC,sBAAsB,CAAC,GAAG,IAAI,EAAE,oBAAoB,CAAC;YACpE,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC;YAClD,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;YAChD,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9C,cAAc,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAClD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,wBAAwB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;;AApHL,4DAqHC;AAvGG,gBAAgB;AACO,qCAAY,GAAG,iEAAiE,CAAC"}
@@ -0,0 +1,169 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Provides a Datadog incident notification template resource. This can be used to create and manage Datadog incident notification templates.
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as datadog from "@pulumi/datadog";
10
+ *
11
+ * // Reference incident type
12
+ * const security = new datadog.IncidentType("security", {
13
+ * name: "Security Incident",
14
+ * description: "Security-related incidents requiring immediate attention",
15
+ * });
16
+ * // Create a notification template for incident alerts
17
+ * const securityIncident = new datadog.IncidentNotificationTemplate("security_incident", {
18
+ * name: "Security Incident Template",
19
+ * subject: "SEV-1 Security Incident: {{incident.title}}",
20
+ * content: `🚨 SECURITY INCIDENT DECLARED 🚨
21
+ *
22
+ * **Incident Details:**
23
+ * - Title: {{incident.title}}
24
+ * - Severity: {{incident.severity}}
25
+ * - Status: {{incident.status}}
26
+ * - Declared at: {{incident.created}}
27
+ *
28
+ * **Affected Services:**
29
+ * {{#each incident.services}}
30
+ * - {{name}}
31
+ * {{/each}}
32
+ *
33
+ * **Commander:** {{incident.commander}}
34
+ *
35
+ * **Next Steps:**
36
+ * 1. Join the incident Slack channel: #incident-{{incident.id}}
37
+ * 2. Review the incident details in Datadog
38
+ * 3. Await further instructions from the incident commander
39
+ *
40
+ * For more information: {{incident.url}}
41
+ * `,
42
+ * category: "alert",
43
+ * incidentType: security.id,
44
+ * });
45
+ * ```
46
+ *
47
+ * ## Import
48
+ *
49
+ * The `pulumi import` command can be used, for example:
50
+ *
51
+ * #!/bin/bash
52
+ *
53
+ * Import an existing incident notification template
54
+ *
55
+ * ```sh
56
+ * $ pulumi import datadog:index/incidentNotificationTemplate:IncidentNotificationTemplate security_incident 11111111-2222-3333-4444-555555555555
57
+ * ```
58
+ */
59
+ export declare class IncidentNotificationTemplate extends pulumi.CustomResource {
60
+ /**
61
+ * Get an existing IncidentNotificationTemplate resource's state with the given name, ID, and optional extra
62
+ * properties used to qualify the lookup.
63
+ *
64
+ * @param name The _unique_ name of the resulting resource.
65
+ * @param id The _unique_ provider ID of the resource to lookup.
66
+ * @param state Any extra arguments used during the lookup.
67
+ * @param opts Optional settings to control the behavior of the CustomResource.
68
+ */
69
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IncidentNotificationTemplateState, opts?: pulumi.CustomResourceOptions): IncidentNotificationTemplate;
70
+ /**
71
+ * Returns true if the given object is an instance of IncidentNotificationTemplate. This is designed to work even
72
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
73
+ */
74
+ static isInstance(obj: any): obj is IncidentNotificationTemplate;
75
+ /**
76
+ * The category of the notification template. Valid values are `alert`, `incident`, `recovery`.
77
+ */
78
+ readonly category: pulumi.Output<string>;
79
+ /**
80
+ * The content body of the notification template.
81
+ */
82
+ readonly content: pulumi.Output<string>;
83
+ /**
84
+ * Timestamp when the notification template was created.
85
+ */
86
+ readonly created: pulumi.Output<string>;
87
+ /**
88
+ * The ID of the incident type this notification template is associated with.
89
+ */
90
+ readonly incidentType: pulumi.Output<string>;
91
+ /**
92
+ * Timestamp when the notification template was last modified.
93
+ */
94
+ readonly modified: pulumi.Output<string>;
95
+ /**
96
+ * The name of the notification template.
97
+ */
98
+ readonly name: pulumi.Output<string>;
99
+ /**
100
+ * The subject line of the notification template.
101
+ */
102
+ readonly subject: pulumi.Output<string>;
103
+ /**
104
+ * Create a IncidentNotificationTemplate resource with the given unique name, arguments, and options.
105
+ *
106
+ * @param name The _unique_ name of the resource.
107
+ * @param args The arguments to use to populate this resource's properties.
108
+ * @param opts A bag of options that control this resource's behavior.
109
+ */
110
+ constructor(name: string, args: IncidentNotificationTemplateArgs, opts?: pulumi.CustomResourceOptions);
111
+ }
112
+ /**
113
+ * Input properties used for looking up and filtering IncidentNotificationTemplate resources.
114
+ */
115
+ export interface IncidentNotificationTemplateState {
116
+ /**
117
+ * The category of the notification template. Valid values are `alert`, `incident`, `recovery`.
118
+ */
119
+ category?: pulumi.Input<string>;
120
+ /**
121
+ * The content body of the notification template.
122
+ */
123
+ content?: pulumi.Input<string>;
124
+ /**
125
+ * Timestamp when the notification template was created.
126
+ */
127
+ created?: pulumi.Input<string>;
128
+ /**
129
+ * The ID of the incident type this notification template is associated with.
130
+ */
131
+ incidentType?: pulumi.Input<string>;
132
+ /**
133
+ * Timestamp when the notification template was last modified.
134
+ */
135
+ modified?: pulumi.Input<string>;
136
+ /**
137
+ * The name of the notification template.
138
+ */
139
+ name?: pulumi.Input<string>;
140
+ /**
141
+ * The subject line of the notification template.
142
+ */
143
+ subject?: pulumi.Input<string>;
144
+ }
145
+ /**
146
+ * The set of arguments for constructing a IncidentNotificationTemplate resource.
147
+ */
148
+ export interface IncidentNotificationTemplateArgs {
149
+ /**
150
+ * The category of the notification template. Valid values are `alert`, `incident`, `recovery`.
151
+ */
152
+ category: pulumi.Input<string>;
153
+ /**
154
+ * The content body of the notification template.
155
+ */
156
+ content: pulumi.Input<string>;
157
+ /**
158
+ * The ID of the incident type this notification template is associated with.
159
+ */
160
+ incidentType: pulumi.Input<string>;
161
+ /**
162
+ * The name of the notification template.
163
+ */
164
+ name: pulumi.Input<string>;
165
+ /**
166
+ * The subject line of the notification template.
167
+ */
168
+ subject: pulumi.Input<string>;
169
+ }
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.IncidentNotificationTemplate = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Provides a Datadog incident notification template resource. This can be used to create and manage Datadog incident notification templates.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as datadog from "@pulumi/datadog";
16
+ *
17
+ * // Reference incident type
18
+ * const security = new datadog.IncidentType("security", {
19
+ * name: "Security Incident",
20
+ * description: "Security-related incidents requiring immediate attention",
21
+ * });
22
+ * // Create a notification template for incident alerts
23
+ * const securityIncident = new datadog.IncidentNotificationTemplate("security_incident", {
24
+ * name: "Security Incident Template",
25
+ * subject: "SEV-1 Security Incident: {{incident.title}}",
26
+ * content: `🚨 SECURITY INCIDENT DECLARED 🚨
27
+ *
28
+ * **Incident Details:**
29
+ * - Title: {{incident.title}}
30
+ * - Severity: {{incident.severity}}
31
+ * - Status: {{incident.status}}
32
+ * - Declared at: {{incident.created}}
33
+ *
34
+ * **Affected Services:**
35
+ * {{#each incident.services}}
36
+ * - {{name}}
37
+ * {{/each}}
38
+ *
39
+ * **Commander:** {{incident.commander}}
40
+ *
41
+ * **Next Steps:**
42
+ * 1. Join the incident Slack channel: #incident-{{incident.id}}
43
+ * 2. Review the incident details in Datadog
44
+ * 3. Await further instructions from the incident commander
45
+ *
46
+ * For more information: {{incident.url}}
47
+ * `,
48
+ * category: "alert",
49
+ * incidentType: security.id,
50
+ * });
51
+ * ```
52
+ *
53
+ * ## Import
54
+ *
55
+ * The `pulumi import` command can be used, for example:
56
+ *
57
+ * #!/bin/bash
58
+ *
59
+ * Import an existing incident notification template
60
+ *
61
+ * ```sh
62
+ * $ pulumi import datadog:index/incidentNotificationTemplate:IncidentNotificationTemplate security_incident 11111111-2222-3333-4444-555555555555
63
+ * ```
64
+ */
65
+ class IncidentNotificationTemplate extends pulumi.CustomResource {
66
+ /**
67
+ * Get an existing IncidentNotificationTemplate resource's state with the given name, ID, and optional extra
68
+ * properties used to qualify the lookup.
69
+ *
70
+ * @param name The _unique_ name of the resulting resource.
71
+ * @param id The _unique_ provider ID of the resource to lookup.
72
+ * @param state Any extra arguments used during the lookup.
73
+ * @param opts Optional settings to control the behavior of the CustomResource.
74
+ */
75
+ static get(name, id, state, opts) {
76
+ return new IncidentNotificationTemplate(name, state, { ...opts, id: id });
77
+ }
78
+ /**
79
+ * Returns true if the given object is an instance of IncidentNotificationTemplate. This is designed to work even
80
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
81
+ */
82
+ static isInstance(obj) {
83
+ if (obj === undefined || obj === null) {
84
+ return false;
85
+ }
86
+ return obj['__pulumiType'] === IncidentNotificationTemplate.__pulumiType;
87
+ }
88
+ constructor(name, argsOrState, opts) {
89
+ let resourceInputs = {};
90
+ opts = opts || {};
91
+ if (opts.id) {
92
+ const state = argsOrState;
93
+ resourceInputs["category"] = state?.category;
94
+ resourceInputs["content"] = state?.content;
95
+ resourceInputs["created"] = state?.created;
96
+ resourceInputs["incidentType"] = state?.incidentType;
97
+ resourceInputs["modified"] = state?.modified;
98
+ resourceInputs["name"] = state?.name;
99
+ resourceInputs["subject"] = state?.subject;
100
+ }
101
+ else {
102
+ const args = argsOrState;
103
+ if (args?.category === undefined && !opts.urn) {
104
+ throw new Error("Missing required property 'category'");
105
+ }
106
+ if (args?.content === undefined && !opts.urn) {
107
+ throw new Error("Missing required property 'content'");
108
+ }
109
+ if (args?.incidentType === undefined && !opts.urn) {
110
+ throw new Error("Missing required property 'incidentType'");
111
+ }
112
+ if (args?.name === undefined && !opts.urn) {
113
+ throw new Error("Missing required property 'name'");
114
+ }
115
+ if (args?.subject === undefined && !opts.urn) {
116
+ throw new Error("Missing required property 'subject'");
117
+ }
118
+ resourceInputs["category"] = args?.category;
119
+ resourceInputs["content"] = args?.content;
120
+ resourceInputs["incidentType"] = args?.incidentType;
121
+ resourceInputs["name"] = args?.name;
122
+ resourceInputs["subject"] = args?.subject;
123
+ resourceInputs["created"] = undefined /*out*/;
124
+ resourceInputs["modified"] = undefined /*out*/;
125
+ }
126
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
127
+ super(IncidentNotificationTemplate.__pulumiType, name, resourceInputs, opts);
128
+ }
129
+ }
130
+ exports.IncidentNotificationTemplate = IncidentNotificationTemplate;
131
+ /** @internal */
132
+ IncidentNotificationTemplate.__pulumiType = 'datadog:index/incidentNotificationTemplate:IncidentNotificationTemplate';
133
+ //# sourceMappingURL=incidentNotificationTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incidentNotificationTemplate.js","sourceRoot":"","sources":["../incidentNotificationTemplate.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAa,4BAA6B,SAAQ,MAA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