1. Packages
  2. Packages
  3. Rootly
  4. API Docs
  5. CommunicationsTemplate
Viewing docs for Rootly v3.3.0
published on Thursday, May 7, 2026 by rootlyhq
rootly logo
Viewing docs for Rootly v3.3.0
published on Thursday, May 7, 2026 by rootlyhq

    Example Usage

    resource "rootly_communications_template" "status_update" {
      name = "Incident Status Update"
      body = "**Incident:** {{ incident.title }}\n**Status:** {{ incident.status }}\n**Summary:** {{ incident.summary }}"
    }
    

    Create CommunicationsTemplate Resource

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

    Constructor syntax

    new CommunicationsTemplate(name: string, args: CommunicationsTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def CommunicationsTemplate(resource_name: str,
                               args: CommunicationsTemplateArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def CommunicationsTemplate(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               communication_type_id: Optional[str] = None,
                               communication_template_stages: Optional[Sequence[CommunicationsTemplateCommunicationTemplateStageArgs]] = None,
                               communication_type: Optional[CommunicationsTemplateCommunicationTypeArgs] = None,
                               description: Optional[str] = None,
                               name: Optional[str] = None,
                               position: Optional[int] = None,
                               slug: Optional[str] = None)
    func NewCommunicationsTemplate(ctx *Context, name string, args CommunicationsTemplateArgs, opts ...ResourceOption) (*CommunicationsTemplate, error)
    public CommunicationsTemplate(string name, CommunicationsTemplateArgs args, CustomResourceOptions? opts = null)
    public CommunicationsTemplate(String name, CommunicationsTemplateArgs args)
    public CommunicationsTemplate(String name, CommunicationsTemplateArgs args, CustomResourceOptions options)
    
    type: rootly:CommunicationsTemplate
    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 CommunicationsTemplateArgs
    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 CommunicationsTemplateArgs
    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 CommunicationsTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CommunicationsTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CommunicationsTemplateArgs
    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 communicationsTemplateResource = new Rootly.CommunicationsTemplate("communicationsTemplateResource", new()
    {
        CommunicationTypeId = "string",
        CommunicationTemplateStages = new[]
        {
            new Rootly.Inputs.CommunicationsTemplateCommunicationTemplateStageArgs
            {
                CommunicationStageId = "string",
                EmailBody = "string",
                EmailSubject = "string",
                Id = "string",
                SlackContent = "string",
                SmsContent = "string",
            },
        },
        CommunicationType = new Rootly.Inputs.CommunicationsTemplateCommunicationTypeArgs
        {
            Id = "string",
            Name = "string",
        },
        Description = "string",
        Name = "string",
        Position = 0,
        Slug = "string",
    });
    
    example, err := rootly.NewCommunicationsTemplate(ctx, "communicationsTemplateResource", &rootly.CommunicationsTemplateArgs{
    	CommunicationTypeId: pulumi.String("string"),
    	CommunicationTemplateStages: rootly.CommunicationsTemplateCommunicationTemplateStageArray{
    		&rootly.CommunicationsTemplateCommunicationTemplateStageArgs{
    			CommunicationStageId: pulumi.String("string"),
    			EmailBody:            pulumi.String("string"),
    			EmailSubject:         pulumi.String("string"),
    			Id:                   pulumi.String("string"),
    			SlackContent:         pulumi.String("string"),
    			SmsContent:           pulumi.String("string"),
    		},
    	},
    	CommunicationType: &rootly.CommunicationsTemplateCommunicationTypeArgs{
    		Id:   pulumi.String("string"),
    		Name: pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Position:    pulumi.Int(0),
    	Slug:        pulumi.String("string"),
    })
    
    var communicationsTemplateResource = new CommunicationsTemplate("communicationsTemplateResource", CommunicationsTemplateArgs.builder()
        .communicationTypeId("string")
        .communicationTemplateStages(CommunicationsTemplateCommunicationTemplateStageArgs.builder()
            .communicationStageId("string")
            .emailBody("string")
            .emailSubject("string")
            .id("string")
            .slackContent("string")
            .smsContent("string")
            .build())
        .communicationType(CommunicationsTemplateCommunicationTypeArgs.builder()
            .id("string")
            .name("string")
            .build())
        .description("string")
        .name("string")
        .position(0)
        .slug("string")
        .build());
    
    communications_template_resource = rootly.CommunicationsTemplate("communicationsTemplateResource",
        communication_type_id="string",
        communication_template_stages=[{
            "communication_stage_id": "string",
            "email_body": "string",
            "email_subject": "string",
            "id": "string",
            "slack_content": "string",
            "sms_content": "string",
        }],
        communication_type={
            "id": "string",
            "name": "string",
        },
        description="string",
        name="string",
        position=0,
        slug="string")
    
    const communicationsTemplateResource = new rootly.CommunicationsTemplate("communicationsTemplateResource", {
        communicationTypeId: "string",
        communicationTemplateStages: [{
            communicationStageId: "string",
            emailBody: "string",
            emailSubject: "string",
            id: "string",
            slackContent: "string",
            smsContent: "string",
        }],
        communicationType: {
            id: "string",
            name: "string",
        },
        description: "string",
        name: "string",
        position: 0,
        slug: "string",
    });
    
    type: rootly:CommunicationsTemplate
    properties:
        communicationTemplateStages:
            - communicationStageId: string
              emailBody: string
              emailSubject: string
              id: string
              slackContent: string
              smsContent: string
        communicationType:
            id: string
            name: string
        communicationTypeId: string
        description: string
        name: string
        position: 0
        slug: string
    

    CommunicationsTemplate 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 CommunicationsTemplate resource accepts the following input properties:

    CommunicationTypeId string
    The communication type ID
    CommunicationTemplateStages List<CommunicationsTemplateCommunicationTemplateStage>
    Communication template stages
    CommunicationType CommunicationsTemplateCommunicationType
    Map must contain two fields, id and name.
    Description string
    The description of the communications template
    Name string
    The name of the communications template
    Position int
    Position of the communications template
    Slug string
    The slug of the communications template
    CommunicationTypeId string
    The communication type ID
    CommunicationTemplateStages []CommunicationsTemplateCommunicationTemplateStageArgs
    Communication template stages
    CommunicationType CommunicationsTemplateCommunicationTypeArgs
    Map must contain two fields, id and name.
    Description string
    The description of the communications template
    Name string
    The name of the communications template
    Position int
    Position of the communications template
    Slug string
    The slug of the communications template
    communicationTypeId String
    The communication type ID
    communicationTemplateStages List<CommunicationsTemplateCommunicationTemplateStage>
    Communication template stages
    communicationType CommunicationsTemplateCommunicationType
    Map must contain two fields, id and name.
    description String
    The description of the communications template
    name String
    The name of the communications template
    position Integer
    Position of the communications template
    slug String
    The slug of the communications template
    communicationTypeId string
    The communication type ID
    communicationTemplateStages CommunicationsTemplateCommunicationTemplateStage[]
    Communication template stages
    communicationType CommunicationsTemplateCommunicationType
    Map must contain two fields, id and name.
    description string
    The description of the communications template
    name string
    The name of the communications template
    position number
    Position of the communications template
    slug string
    The slug of the communications template
    communication_type_id str
    The communication type ID
    communication_template_stages Sequence[CommunicationsTemplateCommunicationTemplateStageArgs]
    Communication template stages
    communication_type CommunicationsTemplateCommunicationTypeArgs
    Map must contain two fields, id and name.
    description str
    The description of the communications template
    name str
    The name of the communications template
    position int
    Position of the communications template
    slug str
    The slug of the communications template
    communicationTypeId String
    The communication type ID
    communicationTemplateStages List<Property Map>
    Communication template stages
    communicationType Property Map
    Map must contain two fields, id and name.
    description String
    The description of the communications template
    name String
    The name of the communications template
    position Number
    Position of the communications template
    slug String
    The slug of the communications template

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CommunicationsTemplate Resource

    Get an existing CommunicationsTemplate 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?: CommunicationsTemplateState, opts?: CustomResourceOptions): CommunicationsTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            communication_template_stages: Optional[Sequence[CommunicationsTemplateCommunicationTemplateStageArgs]] = None,
            communication_type: Optional[CommunicationsTemplateCommunicationTypeArgs] = None,
            communication_type_id: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            position: Optional[int] = None,
            slug: Optional[str] = None) -> CommunicationsTemplate
    func GetCommunicationsTemplate(ctx *Context, name string, id IDInput, state *CommunicationsTemplateState, opts ...ResourceOption) (*CommunicationsTemplate, error)
    public static CommunicationsTemplate Get(string name, Input<string> id, CommunicationsTemplateState? state, CustomResourceOptions? opts = null)
    public static CommunicationsTemplate get(String name, Output<String> id, CommunicationsTemplateState state, CustomResourceOptions options)
    resources:  _:    type: rootly:CommunicationsTemplate    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:
    CommunicationTemplateStages List<CommunicationsTemplateCommunicationTemplateStage>
    Communication template stages
    CommunicationType CommunicationsTemplateCommunicationType
    Map must contain two fields, id and name.
    CommunicationTypeId string
    The communication type ID
    Description string
    The description of the communications template
    Name string
    The name of the communications template
    Position int
    Position of the communications template
    Slug string
    The slug of the communications template
    CommunicationTemplateStages []CommunicationsTemplateCommunicationTemplateStageArgs
    Communication template stages
    CommunicationType CommunicationsTemplateCommunicationTypeArgs
    Map must contain two fields, id and name.
    CommunicationTypeId string
    The communication type ID
    Description string
    The description of the communications template
    Name string
    The name of the communications template
    Position int
    Position of the communications template
    Slug string
    The slug of the communications template
    communicationTemplateStages List<CommunicationsTemplateCommunicationTemplateStage>
    Communication template stages
    communicationType CommunicationsTemplateCommunicationType
    Map must contain two fields, id and name.
    communicationTypeId String
    The communication type ID
    description String
    The description of the communications template
    name String
    The name of the communications template
    position Integer
    Position of the communications template
    slug String
    The slug of the communications template
    communicationTemplateStages CommunicationsTemplateCommunicationTemplateStage[]
    Communication template stages
    communicationType CommunicationsTemplateCommunicationType
    Map must contain two fields, id and name.
    communicationTypeId string
    The communication type ID
    description string
    The description of the communications template
    name string
    The name of the communications template
    position number
    Position of the communications template
    slug string
    The slug of the communications template
    communication_template_stages Sequence[CommunicationsTemplateCommunicationTemplateStageArgs]
    Communication template stages
    communication_type CommunicationsTemplateCommunicationTypeArgs
    Map must contain two fields, id and name.
    communication_type_id str
    The communication type ID
    description str
    The description of the communications template
    name str
    The name of the communications template
    position int
    Position of the communications template
    slug str
    The slug of the communications template
    communicationTemplateStages List<Property Map>
    Communication template stages
    communicationType Property Map
    Map must contain two fields, id and name.
    communicationTypeId String
    The communication type ID
    description String
    The description of the communications template
    name String
    The name of the communications template
    position Number
    Position of the communications template
    slug String
    The slug of the communications template

    Supporting Types

    CommunicationsTemplateCommunicationTemplateStage, CommunicationsTemplateCommunicationTemplateStageArgs

    CommunicationStageId string
    The communication stage ID
    EmailBody string
    Email body for the stage
    EmailSubject string
    Email subject for the stage
    Id string
    ID of the communication template stage
    SlackContent string
    Slack content for the stage
    SmsContent string
    SMS content for the stage
    CommunicationStageId string
    The communication stage ID
    EmailBody string
    Email body for the stage
    EmailSubject string
    Email subject for the stage
    Id string
    ID of the communication template stage
    SlackContent string
    Slack content for the stage
    SmsContent string
    SMS content for the stage
    communicationStageId String
    The communication stage ID
    emailBody String
    Email body for the stage
    emailSubject String
    Email subject for the stage
    id String
    ID of the communication template stage
    slackContent String
    Slack content for the stage
    smsContent String
    SMS content for the stage
    communicationStageId string
    The communication stage ID
    emailBody string
    Email body for the stage
    emailSubject string
    Email subject for the stage
    id string
    ID of the communication template stage
    slackContent string
    Slack content for the stage
    smsContent string
    SMS content for the stage
    communication_stage_id str
    The communication stage ID
    email_body str
    Email body for the stage
    email_subject str
    Email subject for the stage
    id str
    ID of the communication template stage
    slack_content str
    Slack content for the stage
    sms_content str
    SMS content for the stage
    communicationStageId String
    The communication stage ID
    emailBody String
    Email body for the stage
    emailSubject String
    Email subject for the stage
    id String
    ID of the communication template stage
    slackContent String
    Slack content for the stage
    smsContent String
    SMS content for the stage

    CommunicationsTemplateCommunicationType, CommunicationsTemplateCommunicationTypeArgs

    Id string
    ID of the communication type
    Name string
    Name of the communication type
    Id string
    ID of the communication type
    Name string
    Name of the communication type
    id String
    ID of the communication type
    name String
    Name of the communication type
    id string
    ID of the communication type
    name string
    Name of the communication type
    id str
    ID of the communication type
    name str
    Name of the communication type
    id String
    ID of the communication type
    name String
    Name of the communication type

    Import

    rootly.CommunicationsTemplate can be imported using the import command.

    $ pulumi import rootly:index/communicationsTemplate:CommunicationsTemplate primary a816421c-6ceb-481a-87c4-585e47451f24
    

    Or using an import block.

    Locate the resource id in the web app, or retrieve it by listing resources through the API if it’s not visible in the web app.

    HCL can be generated from the import block using the -generate-config-out flag.

    pulumi preview -generate-config-out=generated.tf
    

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

    Package Details

    Repository
    rootly rootlyhq/pulumi-rootly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rootly Terraform Provider.
    rootly logo
    Viewing docs for Rootly v3.3.0
    published on Thursday, May 7, 2026 by rootlyhq
      Try Pulumi Cloud free. Your team will thank you.