1. Packages
  2. Datadog Provider
  3. API Docs
  4. IncidentNotificationTemplate
Datadog v4.56.0 published on Thursday, Sep 18, 2025 by Pulumi

datadog.IncidentNotificationTemplate

Explore with Pulumi AI

datadog logo
Datadog v4.56.0 published on Thursday, Sep 18, 2025 by Pulumi

    Provides a Datadog incident notification template resource. This can be used to create and manage Datadog incident notification templates.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Reference incident type
    const security = new datadog.IncidentType("security", {
        name: "Security Incident",
        description: "Security-related incidents requiring immediate attention",
    });
    // Create a notification template for incident alerts
    const securityIncident = new datadog.IncidentNotificationTemplate("security_incident", {
        name: "Security Incident Template",
        subject: "SEV-1 Security Incident: {{incident.title}}",
        content: `🚨 SECURITY INCIDENT DECLARED 🚨
    
    **Incident Details:**
    - Title: {{incident.title}}
    - Severity: {{incident.severity}}
    - Status: {{incident.status}}
    - Declared at: {{incident.created}}
    
    **Affected Services:**
    {{#each incident.services}}
    - {{name}}
    {{/each}}
    
    **Commander:** {{incident.commander}}
    
    **Next Steps:**
    1. Join the incident Slack channel: #incident-{{incident.id}}
    2. Review the incident details in Datadog
    3. Await further instructions from the incident commander
    
    For more information: {{incident.url}}
    `,
        category: "alert",
        incidentType: security.id,
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Reference incident type
    security = datadog.IncidentType("security",
        name="Security Incident",
        description="Security-related incidents requiring immediate attention")
    # Create a notification template for incident alerts
    security_incident = datadog.IncidentNotificationTemplate("security_incident",
        name="Security Incident Template",
        subject="SEV-1 Security Incident: {{incident.title}}",
        content="""🚨 SECURITY INCIDENT DECLARED 🚨
    
    **Incident Details:**
    - Title: {{incident.title}}
    - Severity: {{incident.severity}}
    - Status: {{incident.status}}
    - Declared at: {{incident.created}}
    
    **Affected Services:**
    {{#each incident.services}}
    - {{name}}
    {{/each}}
    
    **Commander:** {{incident.commander}}
    
    **Next Steps:**
    1. Join the incident Slack channel: #incident-{{incident.id}}
    2. Review the incident details in Datadog
    3. Await further instructions from the incident commander
    
    For more information: {{incident.url}}
    """,
        category="alert",
        incident_type=security.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Reference incident type
    		security, err := datadog.NewIncidentType(ctx, "security", &datadog.IncidentTypeArgs{
    			Name:        pulumi.String("Security Incident"),
    			Description: pulumi.String("Security-related incidents requiring immediate attention"),
    		})
    		if err != nil {
    			return err
    		}
    		// Create a notification template for incident alerts
    		_, err = datadog.NewIncidentNotificationTemplate(ctx, "security_incident", &datadog.IncidentNotificationTemplateArgs{
    			Name:    pulumi.String("Security Incident Template"),
    			Subject: pulumi.String("SEV-1 Security Incident: {{incident.title}}"),
    			Content: pulumi.String(`🚨 SECURITY INCIDENT DECLARED 🚨
    
    **Incident Details:**
    - Title: {{incident.title}}
    - Severity: {{incident.severity}}
    - Status: {{incident.status}}
    - Declared at: {{incident.created}}
    
    **Affected Services:**
    {{#each incident.services}}
    - {{name}}
    {{/each}}
    
    **Commander:** {{incident.commander}}
    
    **Next Steps:**
    1. Join the incident Slack channel: #incident-{{incident.id}}
    2. Review the incident details in Datadog
    3. Await further instructions from the incident commander
    
    For more information: {{incident.url}}
    `),
    			Category:     pulumi.String("alert"),
    			IncidentType: security.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Reference incident type
        var security = new Datadog.IncidentType("security", new()
        {
            Name = "Security Incident",
            Description = "Security-related incidents requiring immediate attention",
        });
    
        // Create a notification template for incident alerts
        var securityIncident = new Datadog.IncidentNotificationTemplate("security_incident", new()
        {
            Name = "Security Incident Template",
            Subject = "SEV-1 Security Incident: {{incident.title}}",
            Content = @"🚨 SECURITY INCIDENT DECLARED 🚨
    
    **Incident Details:**
    - Title: {{incident.title}}
    - Severity: {{incident.severity}}
    - Status: {{incident.status}}
    - Declared at: {{incident.created}}
    
    **Affected Services:**
    {{#each incident.services}}
    - {{name}}
    {{/each}}
    
    **Commander:** {{incident.commander}}
    
    **Next Steps:**
    1. Join the incident Slack channel: #incident-{{incident.id}}
    2. Review the incident details in Datadog
    3. Await further instructions from the incident commander
    
    For more information: {{incident.url}}
    ",
            Category = "alert",
            IncidentType = security.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.IncidentType;
    import com.pulumi.datadog.IncidentTypeArgs;
    import com.pulumi.datadog.IncidentNotificationTemplate;
    import com.pulumi.datadog.IncidentNotificationTemplateArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Reference incident type
            var security = new IncidentType("security", IncidentTypeArgs.builder()
                .name("Security Incident")
                .description("Security-related incidents requiring immediate attention")
                .build());
    
            // Create a notification template for incident alerts
            var securityIncident = new IncidentNotificationTemplate("securityIncident", IncidentNotificationTemplateArgs.builder()
                .name("Security Incident Template")
                .subject("SEV-1 Security Incident: {{incident.title}}")
                .content("""
    🚨 SECURITY INCIDENT DECLARED 🚨
    
    **Incident Details:**
    - Title: {{incident.title}}
    - Severity: {{incident.severity}}
    - Status: {{incident.status}}
    - Declared at: {{incident.created}}
    
    **Affected Services:**
    {{#each incident.services}}
    - {{name}}
    {{/each}}
    
    **Commander:** {{incident.commander}}
    
    **Next Steps:**
    1. Join the incident Slack channel: #incident-{{incident.id}}
    2. Review the incident details in Datadog
    3. Await further instructions from the incident commander
    
    For more information: {{incident.url}}
                """)
                .category("alert")
                .incidentType(security.id())
                .build());
    
        }
    }
    
    resources:
      # Create a notification template for incident alerts
      securityIncident:
        type: datadog:IncidentNotificationTemplate
        name: security_incident
        properties:
          name: Security Incident Template
          subject: 'SEV-1 Security Incident: {{incident.title}}'
          content: "\U0001F6A8 SECURITY INCIDENT DECLARED \U0001F6A8\n\n**Incident Details:**\n- Title: {{incident.title}}\n- Severity: {{incident.severity}}\n- Status: {{incident.status}}\n- Declared at: {{incident.created}}\n\n**Affected Services:**\n{{#each incident.services}}\n- {{name}}\n{{/each}}\n\n**Commander:** {{incident.commander}}\n\n**Next Steps:**\n1. Join the incident Slack channel: #incident-{{incident.id}}\n2. Review the incident details in Datadog\n3. Await further instructions from the incident commander\n\nFor more information: {{incident.url}}\n"
          category: alert
          incidentType: ${security.id}
      # Reference incident type
      security:
        type: datadog:IncidentType
        properties:
          name: Security Incident
          description: Security-related incidents requiring immediate attention
    

    Create IncidentNotificationTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IncidentNotificationTemplate(name: string, args: IncidentNotificationTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def IncidentNotificationTemplate(resource_name: str,
                                     args: IncidentNotificationTemplateArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def IncidentNotificationTemplate(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     category: Optional[str] = None,
                                     content: Optional[str] = None,
                                     incident_type: Optional[str] = None,
                                     name: Optional[str] = None,
                                     subject: Optional[str] = None)
    func NewIncidentNotificationTemplate(ctx *Context, name string, args IncidentNotificationTemplateArgs, opts ...ResourceOption) (*IncidentNotificationTemplate, error)
    public IncidentNotificationTemplate(string name, IncidentNotificationTemplateArgs args, CustomResourceOptions? opts = null)
    public IncidentNotificationTemplate(String name, IncidentNotificationTemplateArgs args)
    public IncidentNotificationTemplate(String name, IncidentNotificationTemplateArgs args, CustomResourceOptions options)
    
    type: datadog:IncidentNotificationTemplate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IncidentNotificationTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IncidentNotificationTemplateArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IncidentNotificationTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IncidentNotificationTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IncidentNotificationTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var incidentNotificationTemplateResource = new Datadog.IncidentNotificationTemplate("incidentNotificationTemplateResource", new()
    {
        Category = "string",
        Content = "string",
        IncidentType = "string",
        Name = "string",
        Subject = "string",
    });
    
    example, err := datadog.NewIncidentNotificationTemplate(ctx, "incidentNotificationTemplateResource", &datadog.IncidentNotificationTemplateArgs{
    	Category:     pulumi.String("string"),
    	Content:      pulumi.String("string"),
    	IncidentType: pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	Subject:      pulumi.String("string"),
    })
    
    var incidentNotificationTemplateResource = new IncidentNotificationTemplate("incidentNotificationTemplateResource", IncidentNotificationTemplateArgs.builder()
        .category("string")
        .content("string")
        .incidentType("string")
        .name("string")
        .subject("string")
        .build());
    
    incident_notification_template_resource = datadog.IncidentNotificationTemplate("incidentNotificationTemplateResource",
        category="string",
        content="string",
        incident_type="string",
        name="string",
        subject="string")
    
    const incidentNotificationTemplateResource = new datadog.IncidentNotificationTemplate("incidentNotificationTemplateResource", {
        category: "string",
        content: "string",
        incidentType: "string",
        name: "string",
        subject: "string",
    });
    
    type: datadog:IncidentNotificationTemplate
    properties:
        category: string
        content: string
        incidentType: string
        name: string
        subject: string
    

    IncidentNotificationTemplate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The IncidentNotificationTemplate resource accepts the following input properties:

    Category string
    The category of the notification template. Valid values are alert, incident, recovery.
    Content string
    The content body of the notification template.
    IncidentType string
    The ID of the incident type this notification template is associated with.
    Name string
    The name of the notification template.
    Subject string
    The subject line of the notification template.
    Category string
    The category of the notification template. Valid values are alert, incident, recovery.
    Content string
    The content body of the notification template.
    IncidentType string
    The ID of the incident type this notification template is associated with.
    Name string
    The name of the notification template.
    Subject string
    The subject line of the notification template.
    category String
    The category of the notification template. Valid values are alert, incident, recovery.
    content String
    The content body of the notification template.
    incidentType String
    The ID of the incident type this notification template is associated with.
    name String
    The name of the notification template.
    subject String
    The subject line of the notification template.
    category string
    The category of the notification template. Valid values are alert, incident, recovery.
    content string
    The content body of the notification template.
    incidentType string
    The ID of the incident type this notification template is associated with.
    name string
    The name of the notification template.
    subject string
    The subject line of the notification template.
    category str
    The category of the notification template. Valid values are alert, incident, recovery.
    content str
    The content body of the notification template.
    incident_type str
    The ID of the incident type this notification template is associated with.
    name str
    The name of the notification template.
    subject str
    The subject line of the notification template.
    category String
    The category of the notification template. Valid values are alert, incident, recovery.
    content String
    The content body of the notification template.
    incidentType String
    The ID of the incident type this notification template is associated with.
    name String
    The name of the notification template.
    subject String
    The subject line of the notification template.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IncidentNotificationTemplate resource produces the following output properties:

    Created string
    Timestamp when the notification template was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Modified string
    Timestamp when the notification template was last modified.
    Created string
    Timestamp when the notification template was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Modified string
    Timestamp when the notification template was last modified.
    created String
    Timestamp when the notification template was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modified String
    Timestamp when the notification template was last modified.
    created string
    Timestamp when the notification template was created.
    id string
    The provider-assigned unique ID for this managed resource.
    modified string
    Timestamp when the notification template was last modified.
    created str
    Timestamp when the notification template was created.
    id str
    The provider-assigned unique ID for this managed resource.
    modified str
    Timestamp when the notification template was last modified.
    created String
    Timestamp when the notification template was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modified String
    Timestamp when the notification template was last modified.

    Look up Existing IncidentNotificationTemplate Resource

    Get an existing IncidentNotificationTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IncidentNotificationTemplateState, opts?: CustomResourceOptions): IncidentNotificationTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            category: Optional[str] = None,
            content: Optional[str] = None,
            created: Optional[str] = None,
            incident_type: Optional[str] = None,
            modified: Optional[str] = None,
            name: Optional[str] = None,
            subject: Optional[str] = None) -> IncidentNotificationTemplate
    func GetIncidentNotificationTemplate(ctx *Context, name string, id IDInput, state *IncidentNotificationTemplateState, opts ...ResourceOption) (*IncidentNotificationTemplate, error)
    public static IncidentNotificationTemplate Get(string name, Input<string> id, IncidentNotificationTemplateState? state, CustomResourceOptions? opts = null)
    public static IncidentNotificationTemplate get(String name, Output<String> id, IncidentNotificationTemplateState state, CustomResourceOptions options)
    resources:  _:    type: datadog:IncidentNotificationTemplate    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Category string
    The category of the notification template. Valid values are alert, incident, recovery.
    Content string
    The content body of the notification template.
    Created string
    Timestamp when the notification template was created.
    IncidentType string
    The ID of the incident type this notification template is associated with.
    Modified string
    Timestamp when the notification template was last modified.
    Name string
    The name of the notification template.
    Subject string
    The subject line of the notification template.
    Category string
    The category of the notification template. Valid values are alert, incident, recovery.
    Content string
    The content body of the notification template.
    Created string
    Timestamp when the notification template was created.
    IncidentType string
    The ID of the incident type this notification template is associated with.
    Modified string
    Timestamp when the notification template was last modified.
    Name string
    The name of the notification template.
    Subject string
    The subject line of the notification template.
    category String
    The category of the notification template. Valid values are alert, incident, recovery.
    content String
    The content body of the notification template.
    created String
    Timestamp when the notification template was created.
    incidentType String
    The ID of the incident type this notification template is associated with.
    modified String
    Timestamp when the notification template was last modified.
    name String
    The name of the notification template.
    subject String
    The subject line of the notification template.
    category string
    The category of the notification template. Valid values are alert, incident, recovery.
    content string
    The content body of the notification template.
    created string
    Timestamp when the notification template was created.
    incidentType string
    The ID of the incident type this notification template is associated with.
    modified string
    Timestamp when the notification template was last modified.
    name string
    The name of the notification template.
    subject string
    The subject line of the notification template.
    category str
    The category of the notification template. Valid values are alert, incident, recovery.
    content str
    The content body of the notification template.
    created str
    Timestamp when the notification template was created.
    incident_type str
    The ID of the incident type this notification template is associated with.
    modified str
    Timestamp when the notification template was last modified.
    name str
    The name of the notification template.
    subject str
    The subject line of the notification template.
    category String
    The category of the notification template. Valid values are alert, incident, recovery.
    content String
    The content body of the notification template.
    created String
    Timestamp when the notification template was created.
    incidentType String
    The ID of the incident type this notification template is associated with.
    modified String
    Timestamp when the notification template was last modified.
    name String
    The name of the notification template.
    subject String
    The subject line of the notification template.

    Import

    The pulumi import command can be used, for example:

    #!/bin/bash

    Import an existing incident notification template

    $ pulumi import datadog:index/incidentNotificationTemplate:IncidentNotificationTemplate security_incident 11111111-2222-3333-4444-555555555555
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.56.0 published on Thursday, Sep 18, 2025 by Pulumi