Opsgenie

Pulumi Official
Package maintained by Pulumi
v1.1.5 published on Friday, Feb 18, 2022 by Pulumi

IncidentTemplate

Manages an Incident Template within Opsgenie.

Example Usage

using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

class MyStack : Stack
{
    public MyStack()
    {
        var testTeam = new Opsgenie.Team("testTeam", new Opsgenie.TeamArgs
        {
            Description = "This team deals with all the things",
        });
        var testService = new Opsgenie.Service("testService", new Opsgenie.ServiceArgs
        {
            TeamId = testTeam.Id,
        });
        var testIncidentTemplate = new Opsgenie.IncidentTemplate("testIncidentTemplate", new Opsgenie.IncidentTemplateArgs
        {
            Message = "Incident Message",
            Priority = "P2",
            StakeholderProperties = 
            {
                new Opsgenie.Inputs.IncidentTemplateStakeholderPropertyArgs
                {
                    Enable = true,
                    Message = "Stakeholder Message",
                    Description = "Stakeholder Description",
                },
            },
            Tags = 
            {
                "tag1",
                "tag2",
            },
            Description = "Incident Description",
            Details = 
            {
                { "key1", "value1" },
                { "key2", "value2" },
            },
            ImpactedServices = 
            {
                testService.Id,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testTeam, err := opsgenie.NewTeam(ctx, "testTeam", &opsgenie.TeamArgs{
			Description: pulumi.String("This team deals with all the things"),
		})
		if err != nil {
			return err
		}
		testService, err := opsgenie.NewService(ctx, "testService", &opsgenie.ServiceArgs{
			TeamId: testTeam.ID(),
		})
		if err != nil {
			return err
		}
		_, err = opsgenie.NewIncidentTemplate(ctx, "testIncidentTemplate", &opsgenie.IncidentTemplateArgs{
			Message:  pulumi.String("Incident Message"),
			Priority: pulumi.String("P2"),
			StakeholderProperties: IncidentTemplateStakeholderPropertyArray{
				&IncidentTemplateStakeholderPropertyArgs{
					Enable:      pulumi.Bool(true),
					Message:     pulumi.String("Stakeholder Message"),
					Description: pulumi.String("Stakeholder Description"),
				},
			},
			Tags: pulumi.StringArray{
				pulumi.String("tag1"),
				pulumi.String("tag2"),
			},
			Description: pulumi.String("Incident Description"),
			Details: pulumi.StringMap{
				"key1": pulumi.String("value1"),
				"key2": pulumi.String("value2"),
			},
			ImpactedServices: pulumi.StringArray{
				testService.ID(),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_opsgenie as opsgenie

test_team = opsgenie.Team("testTeam", description="This team deals with all the things")
test_service = opsgenie.Service("testService", team_id=test_team.id)
test_incident_template = opsgenie.IncidentTemplate("testIncidentTemplate",
    message="Incident Message",
    priority="P2",
    stakeholder_properties=[opsgenie.IncidentTemplateStakeholderPropertyArgs(
        enable=True,
        message="Stakeholder Message",
        description="Stakeholder Description",
    )],
    tags=[
        "tag1",
        "tag2",
    ],
    description="Incident Description",
    details={
        "key1": "value1",
        "key2": "value2",
    },
    impacted_services=[test_service.id])
import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";

const testTeam = new opsgenie.Team("testTeam", {description: "This team deals with all the things"});
const testService = new opsgenie.Service("testService", {teamId: testTeam.id});
const testIncidentTemplate = new opsgenie.IncidentTemplate("testIncidentTemplate", {
    message: "Incident Message",
    priority: "P2",
    stakeholderProperties: [{
        enable: true,
        message: "Stakeholder Message",
        description: "Stakeholder Description",
    }],
    tags: [
        "tag1",
        "tag2",
    ],
    description: "Incident Description",
    details: {
        key1: "value1",
        key2: "value2",
    },
    impactedServices: [testService.id],
});

Coming soon!

Create a IncidentTemplate Resource

new IncidentTemplate(name: string, args: IncidentTemplateArgs, opts?: CustomResourceOptions);
@overload
def IncidentTemplate(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     description: Optional[str] = None,
                     details: Optional[Mapping[str, str]] = None,
                     impacted_services: Optional[Sequence[str]] = None,
                     message: Optional[str] = None,
                     name: Optional[str] = None,
                     priority: Optional[str] = None,
                     stakeholder_properties: Optional[Sequence[IncidentTemplateStakeholderPropertyArgs]] = None,
                     tags: Optional[Sequence[str]] = None)
@overload
def IncidentTemplate(resource_name: str,
                     args: IncidentTemplateArgs,
                     opts: Optional[ResourceOptions] = None)
func NewIncidentTemplate(ctx *Context, name string, args IncidentTemplateArgs, opts ...ResourceOption) (*IncidentTemplate, error)
public IncidentTemplate(string name, IncidentTemplateArgs args, CustomResourceOptions? opts = null)
public IncidentTemplate(String name, IncidentTemplateArgs args)
public IncidentTemplate(String name, IncidentTemplateArgs args, CustomResourceOptions options)
type: opsgenie:IncidentTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args IncidentTemplateArgs
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 IncidentTemplateArgs
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 IncidentTemplateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IncidentTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args IncidentTemplateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

IncidentTemplate Resource Properties

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

Inputs

The IncidentTemplate resource accepts the following input properties:

Message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

Priority string

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

StakeholderProperties List<IncidentTemplateStakeholderPropertyArgs>
Description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

Details Dictionary<string, string>

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

ImpactedServices List<string>
Name string

Name of the incident template.

Tags List<string>

Tags of the incident template.

Message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

Priority string

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

StakeholderProperties []IncidentTemplateStakeholderPropertyArgs
Description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

Details map[string]string

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

ImpactedServices []string
Name string

Name of the incident template.

Tags []string

Tags of the incident template.

message String

Message that is to be passed to audience that is generally used to provide a content information about the alert.

priority String

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholderProperties ListTemplateStakeholderPropertyArgs>
description String

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details Map

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impactedServices List
name String

Name of the incident template.

tags List

Tags of the incident template.

message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

priority string

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholderProperties IncidentTemplateStakeholderPropertyArgs[]
description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details {[key: string]: string}

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impactedServices string[]
name string

Name of the incident template.

tags string[]

Tags of the incident template.

message str

Message that is to be passed to audience that is generally used to provide a content information about the alert.

priority str

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholder_properties Sequence[IncidentTemplateStakeholderPropertyArgs]
description str

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details Mapping[str, str]

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impacted_services Sequence[str]
name str

Name of the incident template.

tags Sequence[str]

Tags of the incident template.

message String

Message that is to be passed to audience that is generally used to provide a content information about the alert.

priority String

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholderProperties List
description String

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details Map

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impactedServices List
name String

Name of the incident template.

tags List

Tags of the incident template.

Outputs

All input properties are implicitly available as output properties. Additionally, the IncidentTemplate 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 an Existing IncidentTemplate Resource

Get an existing IncidentTemplate 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?: IncidentTemplateState, opts?: CustomResourceOptions): IncidentTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        details: Optional[Mapping[str, str]] = None,
        impacted_services: Optional[Sequence[str]] = None,
        message: Optional[str] = None,
        name: Optional[str] = None,
        priority: Optional[str] = None,
        stakeholder_properties: Optional[Sequence[IncidentTemplateStakeholderPropertyArgs]] = None,
        tags: Optional[Sequence[str]] = None) -> IncidentTemplate
func GetIncidentTemplate(ctx *Context, name string, id IDInput, state *IncidentTemplateState, opts ...ResourceOption) (*IncidentTemplate, error)
public static IncidentTemplate Get(string name, Input<string> id, IncidentTemplateState? state, CustomResourceOptions? opts = null)
public static IncidentTemplate get(String name, Output<String> id, IncidentTemplateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
Description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

Details Dictionary<string, string>

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

ImpactedServices List<string>
Message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

Name string

Name of the incident template.

Priority string

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

StakeholderProperties List<IncidentTemplateStakeholderPropertyArgs>
Tags List<string>

Tags of the incident template.

Description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

Details map[string]string

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

ImpactedServices []string
Message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

Name string

Name of the incident template.

Priority string

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

StakeholderProperties []IncidentTemplateStakeholderPropertyArgs
Tags []string

Tags of the incident template.

description String

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details Map

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impactedServices List
message String

Message that is to be passed to audience that is generally used to provide a content information about the alert.

name String

Name of the incident template.

priority String

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholderProperties ListTemplateStakeholderPropertyArgs>
tags List

Tags of the incident template.

description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details {[key: string]: string}

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impactedServices string[]
message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

name string

Name of the incident template.

priority string

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholderProperties IncidentTemplateStakeholderPropertyArgs[]
tags string[]

Tags of the incident template.

description str

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details Mapping[str, str]

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impacted_services Sequence[str]
message str

Message that is to be passed to audience that is generally used to provide a content information about the alert.

name str

Name of the incident template.

priority str

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholder_properties Sequence[IncidentTemplateStakeholderPropertyArgs]
tags Sequence[str]

Tags of the incident template.

description String

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

details Map

Map of key-value pairs to use as custom properties of the incident template. This field must not be longer than 8000 characters.

impactedServices List
message String

Message that is to be passed to audience that is generally used to provide a content information about the alert.

name String

Name of the incident template.

priority String

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5.

stakeholderProperties List
tags List

Tags of the incident template.

Supporting Types

IncidentTemplateStakeholderProperty

Message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

Description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

Enable bool

Option to enable stakeholder notifications.Default value is true.

Message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

Description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

Enable bool

Option to enable stakeholder notifications.Default value is true.

message String

Message that is to be passed to audience that is generally used to provide a content information about the alert.

description String

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

enable Boolean

Option to enable stakeholder notifications.Default value is true.

message string

Message that is to be passed to audience that is generally used to provide a content information about the alert.

description string

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

enable boolean

Option to enable stakeholder notifications.Default value is true.

message str

Message that is to be passed to audience that is generally used to provide a content information about the alert.

description str

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

enable bool

Option to enable stakeholder notifications.Default value is true.

message String

Message that is to be passed to audience that is generally used to provide a content information about the alert.

description String

Description that is generally used to provide a detailed information about the alert. This field must not be longer than 15000 characters.

enable Boolean

Option to enable stakeholder notifications.Default value is true.

Import

Service can be imported using the template_id, e.g.

 $ pulumi import opsgenie:index/incidentTemplate:IncidentTemplate test template_id`

Package Details

Repository
https://github.com/pulumi/pulumi-opsgenie
License
Apache-2.0
Notes

This Pulumi package is based on the opsgenie Terraform Provider.