newrelic.NotificationChannel
Explore with Pulumi AI
Use this resource to create and manage New Relic notification channels. Details regarding supported products and permissions can be found here.
A channel is an entity that is used to configure notifications. It is also called a message template. It is a separate entity from workflows, but a channel is required in order to create a workflow.
Example Usage
Webhook
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "webhook-example",
type: "WEBHOOK",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
properties: [{
key: "payload",
value: "name: {{ foo }}",
label: "Payload Template",
}],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="webhook-example",
type="WEBHOOK",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT",
properties=[{
"key": "payload",
"value": "name: {{ foo }}",
"label": "Payload Template",
}])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("webhook-example"),
Type: pulumi.String("WEBHOOK"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("payload"),
Value: pulumi.String("name: {{ foo }}"),
Label: pulumi.String("Payload Template"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "webhook-example",
Type = "WEBHOOK",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "payload",
Value = "name: {{ foo }}",
Label = "Payload Template",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("webhook-example")
.type("WEBHOOK")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.properties(NotificationChannelPropertyArgs.builder()
.key("payload")
.value("name: {{ foo }}")
.label("Payload Template")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: webhook-example
type: WEBHOOK
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
properties:
- key: payload
value: 'name: {{ foo }}'
label: Payload Template
See additional examples.
Additional Examples
NOTE: We support all properties. The mentioned properties are just an example.
ServiceNow
To see the properties’ keys for your account, check ServiceNow incidents table.
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "servicenow-incident-example",
type: "SERVICENOW_INCIDENTS",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
properties: [
{
key: "description",
value: "General description",
},
{
key: "short_description",
value: "Short description",
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="servicenow-incident-example",
type="SERVICENOW_INCIDENTS",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT",
properties=[
{
"key": "description",
"value": "General description",
},
{
"key": "short_description",
"value": "Short description",
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("servicenow-incident-example"),
Type: pulumi.String("SERVICENOW_INCIDENTS"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("description"),
Value: pulumi.String("General description"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("short_description"),
Value: pulumi.String("Short description"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "servicenow-incident-example",
Type = "SERVICENOW_INCIDENTS",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "description",
Value = "General description",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "short_description",
Value = "Short description",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("servicenow-incident-example")
.type("SERVICENOW_INCIDENTS")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.properties(
NotificationChannelPropertyArgs.builder()
.key("description")
.value("General description")
.build(),
NotificationChannelPropertyArgs.builder()
.key("short_description")
.value("Short description")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: servicenow-incident-example
type: SERVICENOW_INCIDENTS
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
properties:
- key: description
value: General description
- key: short_description
value: Short description
ServiceNowApp
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "servicenow-app-example",
type: "SERVICE_NOW_APP",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="servicenow-app-example",
type="SERVICE_NOW_APP",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT")
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("servicenow-app-example"),
Type: pulumi.String("SERVICE_NOW_APP"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "servicenow-app-example",
Type = "SERVICE_NOW_APP",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("servicenow-app-example")
.type("SERVICE_NOW_APP")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: servicenow-app-example
type: SERVICE_NOW_APP
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "email-example",
type: "EMAIL",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
properties: [
{
key: "subject",
value: "New Subject Title",
},
{
key: "customDetailsEmail",
value: "issue id - {{issueId}}",
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="email-example",
type="EMAIL",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT",
properties=[
{
"key": "subject",
"value": "New Subject Title",
},
{
"key": "customDetailsEmail",
"value": "issue id - {{issueId}}",
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("email-example"),
Type: pulumi.String("EMAIL"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("subject"),
Value: pulumi.String("New Subject Title"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("customDetailsEmail"),
Value: pulumi.String("issue id - {{issueId}}"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "email-example",
Type = "EMAIL",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "subject",
Value = "New Subject Title",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "customDetailsEmail",
Value = "issue id - {{issueId}}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("email-example")
.type("EMAIL")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.properties(
NotificationChannelPropertyArgs.builder()
.key("subject")
.value("New Subject Title")
.build(),
NotificationChannelPropertyArgs.builder()
.key("customDetailsEmail")
.value("issue id - {{issueId}}")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: email-example
type: EMAIL
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
properties:
- key: subject
value: New Subject Title
- key: customDetailsEmail
value: issue id - {{issueId}}
Jira Classic
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "jira-example",
type: "JIRA_CLASSIC",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "ERROR_TRACKING",
properties: [
{
key: "project",
value: "10000",
label: "Project-Name",
},
{
key: "issuetype",
value: "10004",
label: "Bug",
},
{
key: "description",
value: "Issue ID: {{ issueId }}",
},
{
key: "summary",
value: "{{ annotations.title.[0] }}",
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="jira-example",
type="JIRA_CLASSIC",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="ERROR_TRACKING",
properties=[
{
"key": "project",
"value": "10000",
"label": "Project-Name",
},
{
"key": "issuetype",
"value": "10004",
"label": "Bug",
},
{
"key": "description",
"value": "Issue ID: {{ issueId }}",
},
{
"key": "summary",
"value": "{{ annotations.title.[0] }}",
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("jira-example"),
Type: pulumi.String("JIRA_CLASSIC"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("ERROR_TRACKING"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("project"),
Value: pulumi.String("10000"),
Label: pulumi.String("Project-Name"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("issuetype"),
Value: pulumi.String("10004"),
Label: pulumi.String("Bug"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("description"),
Value: pulumi.String("Issue ID: {{ issueId }}"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("summary"),
Value: pulumi.String("{{ annotations.title.[0] }}"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "jira-example",
Type = "JIRA_CLASSIC",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "ERROR_TRACKING",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "project",
Value = "10000",
Label = "Project-Name",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "issuetype",
Value = "10004",
Label = "Bug",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "description",
Value = "Issue ID: {{ issueId }}",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "summary",
Value = "{{ annotations.title.[0] }}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("jira-example")
.type("JIRA_CLASSIC")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("ERROR_TRACKING")
.properties(
NotificationChannelPropertyArgs.builder()
.key("project")
.value("10000")
.label("Project-Name")
.build(),
NotificationChannelPropertyArgs.builder()
.key("issuetype")
.value("10004")
.label("Bug")
.build(),
NotificationChannelPropertyArgs.builder()
.key("description")
.value("Issue ID: {{ issueId }}")
.build(),
NotificationChannelPropertyArgs.builder()
.key("summary")
.value("{{ annotations.title.[0] }}")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: jira-example
type: JIRA_CLASSIC
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: ERROR_TRACKING
properties:
- key: project
value: '10000'
label: Project-Name
- key: issuetype
value: '10004'
label: Bug
- key: description
value: 'Issue ID: {{ issueId }}'
- key: summary
value: '{{ annotations.title.[0] }}'
PagerDuty with account integration
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "pagerduty-account-example",
type: "PAGERDUTY_ACCOUNT_INTEGRATION",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
properties: [
{
key: "summary",
value: "General summary",
},
{
key: "service",
label: "Service Name",
value: "PTQK3FM",
},
{
key: "email",
value: "example@email.com",
},
{
key: "customDetails",
value: `{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
`,
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="pagerduty-account-example",
type="PAGERDUTY_ACCOUNT_INTEGRATION",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT",
properties=[
{
"key": "summary",
"value": "General summary",
},
{
"key": "service",
"label": "Service Name",
"value": "PTQK3FM",
},
{
"key": "email",
"value": "example@email.com",
},
{
"key": "customDetails",
"value": """{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
""",
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("pagerduty-account-example"),
Type: pulumi.String("PAGERDUTY_ACCOUNT_INTEGRATION"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("summary"),
Value: pulumi.String("General summary"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("service"),
Label: pulumi.String("Service Name"),
Value: pulumi.String("PTQK3FM"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("email"),
Value: pulumi.String("example@email.com"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("customDetails"),
Value: pulumi.String(`{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
`),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "pagerduty-account-example",
Type = "PAGERDUTY_ACCOUNT_INTEGRATION",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "summary",
Value = "General summary",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "service",
Label = "Service Name",
Value = "PTQK3FM",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "email",
Value = "example@email.com",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "customDetails",
Value = @"{
""id"":{{json issueId}},
""IssueURL"":{{json issuePageUrl}},
""NewRelic priority"":{{json priority}},
""Total Incidents"":{{json totalIncidents}},
""Impacted Entities"":""{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Runbook"":""{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Description"":""{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""isCorrelated"":{{json isCorrelated}},
""Alert Policy Names"":""{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Alert Condition Names"":""{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Workflow Name"":{{json workflowName}}
}
",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("pagerduty-account-example")
.type("PAGERDUTY_ACCOUNT_INTEGRATION")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.properties(
NotificationChannelPropertyArgs.builder()
.key("summary")
.value("General summary")
.build(),
NotificationChannelPropertyArgs.builder()
.key("service")
.label("Service Name")
.value("PTQK3FM")
.build(),
NotificationChannelPropertyArgs.builder()
.key("email")
.value("example@email.com")
.build(),
NotificationChannelPropertyArgs.builder()
.key("customDetails")
.value("""
{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
""")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: pagerduty-account-example
type: PAGERDUTY_ACCOUNT_INTEGRATION
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
properties:
- key: summary
value: General summary
- key: service
label: Service Name
value: PTQK3FM
- key: email
value: example@email.com
- key: customDetails
value: |
{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
PagerDuty with service integration
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "pagerduty-account-example",
type: "PAGERDUTY_SERVICE_INTEGRATION",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
properties: [
{
key: "summary",
value: "General summary",
},
{
key: "customDetails",
value: `{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
`,
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="pagerduty-account-example",
type="PAGERDUTY_SERVICE_INTEGRATION",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT",
properties=[
{
"key": "summary",
"value": "General summary",
},
{
"key": "customDetails",
"value": """{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
""",
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("pagerduty-account-example"),
Type: pulumi.String("PAGERDUTY_SERVICE_INTEGRATION"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("summary"),
Value: pulumi.String("General summary"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("customDetails"),
Value: pulumi.String(`{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
`),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "pagerduty-account-example",
Type = "PAGERDUTY_SERVICE_INTEGRATION",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "summary",
Value = "General summary",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "customDetails",
Value = @"{
""id"":{{json issueId}},
""IssueURL"":{{json issuePageUrl}},
""NewRelic priority"":{{json priority}},
""Total Incidents"":{{json totalIncidents}},
""Impacted Entities"":""{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Runbook"":""{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Description"":""{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""isCorrelated"":{{json isCorrelated}},
""Alert Policy Names"":""{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Alert Condition Names"":""{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"",
""Workflow Name"":{{json workflowName}}
}
",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("pagerduty-account-example")
.type("PAGERDUTY_SERVICE_INTEGRATION")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.properties(
NotificationChannelPropertyArgs.builder()
.key("summary")
.value("General summary")
.build(),
NotificationChannelPropertyArgs.builder()
.key("customDetails")
.value("""
{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
""")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: pagerduty-account-example
type: PAGERDUTY_SERVICE_INTEGRATION
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
properties:
- key: summary
value: General summary
- key: customDetails
value: |
{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
Mobile Push
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "mobile-push-example",
type: "MOBILE_PUSH",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="mobile-push-example",
type="MOBILE_PUSH",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT")
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("mobile-push-example"),
Type: pulumi.String("MOBILE_PUSH"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "mobile-push-example",
Type = "MOBILE_PUSH",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("mobile-push-example")
.type("MOBILE_PUSH")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: mobile-push-example
type: MOBILE_PUSH
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
AWS Event Bridge
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "event-bridge-example",
type: "EVENT_BRIDGE",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
properties: [
{
key: "eventSource",
value: "aws.partner/mydomain/myaccountid/name",
},
{
key: "eventContent",
value: "{ id: {{ json issueId }} }",
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="event-bridge-example",
type="EVENT_BRIDGE",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT",
properties=[
{
"key": "eventSource",
"value": "aws.partner/mydomain/myaccountid/name",
},
{
"key": "eventContent",
"value": "{ id: {{ json issueId }} }",
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("event-bridge-example"),
Type: pulumi.String("EVENT_BRIDGE"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("eventSource"),
Value: pulumi.String("aws.partner/mydomain/myaccountid/name"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("eventContent"),
Value: pulumi.String("{ id: {{ json issueId }} }"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "event-bridge-example",
Type = "EVENT_BRIDGE",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "eventSource",
Value = "aws.partner/mydomain/myaccountid/name",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "eventContent",
Value = "{ id: {{ json issueId }} }",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("event-bridge-example")
.type("EVENT_BRIDGE")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.properties(
NotificationChannelPropertyArgs.builder()
.key("eventSource")
.value("aws.partner/mydomain/myaccountid/name")
.build(),
NotificationChannelPropertyArgs.builder()
.key("eventContent")
.value("{ id: {{ json issueId }} }")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: event-bridge-example
type: EVENT_BRIDGE
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
properties:
- key: eventSource
value: aws.partner/mydomain/myaccountid/name
- key: eventContent
value: '{ id: {{ json issueId }} }'
SLACK
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationChannel("foo", {
accountId: "12345678",
name: "slack-example",
type: "SLACK",
destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product: "IINT",
properties: [
{
key: "channelId",
value: "123456",
},
{
key: "customDetailsSlack",
value: "issue id - {{issueId}}",
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationChannel("foo",
account_id="12345678",
name="slack-example",
type="SLACK",
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
product="IINT",
properties=[
{
"key": "channelId",
"value": "123456",
},
{
"key": "customDetailsSlack",
"value": "issue id - {{issueId}}",
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "foo", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("slack-example"),
Type: pulumi.String("SLACK"),
DestinationId: pulumi.String("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8"),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("channelId"),
Value: pulumi.String("123456"),
},
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("customDetailsSlack"),
Value: pulumi.String("issue id - {{issueId}}"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationChannel("foo", new()
{
AccountId = "12345678",
Name = "slack-example",
Type = "SLACK",
DestinationId = "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "channelId",
Value = "123456",
},
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "customDetailsSlack",
Value = "issue id - {{issueId}}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var foo = new NotificationChannel("foo", NotificationChannelArgs.builder()
.accountId(12345678)
.name("slack-example")
.type("SLACK")
.destinationId("00b6bd1d-ac06-4d3d-bd72-49551e70f7a8")
.product("IINT")
.properties(
NotificationChannelPropertyArgs.builder()
.key("channelId")
.value("123456")
.build(),
NotificationChannelPropertyArgs.builder()
.key("customDetailsSlack")
.value("issue id - {{issueId}}")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: slack-example
type: SLACK
destinationId: 00b6bd1d-ac06-4d3d-bd72-49551e70f7a8
product: IINT
properties:
- key: channelId
value: '123456'
- key: customDetailsSlack
value: issue id - {{issueId}}
NOTE: Sensitive data such as channel API keys, service keys, etc are not returned from the underlying API for security reasons and may not be set in state when importing.
Full Scenario Example
Create a destination resource and reference that destination to the channel resource:
Create a destination
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const webhook_destination = new newrelic.NotificationDestination("webhook-destination", {
accountId: "12345678",
name: "destination-webhook",
type: "WEBHOOK",
properties: [{
key: "url",
value: "https://webhook.mywebhook.com",
}],
authBasic: {
user: "username",
password: "password",
},
});
import pulumi
import pulumi_newrelic as newrelic
webhook_destination = newrelic.NotificationDestination("webhook-destination",
account_id="12345678",
name="destination-webhook",
type="WEBHOOK",
properties=[{
"key": "url",
"value": "https://webhook.mywebhook.com",
}],
auth_basic={
"user": "username",
"password": "password",
})
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationDestination(ctx, "webhook-destination", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("destination-webhook"),
Type: pulumi.String("WEBHOOK"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("url"),
Value: pulumi.String("https://webhook.mywebhook.com"),
},
},
AuthBasic: &newrelic.NotificationDestinationAuthBasicArgs{
User: pulumi.String("username"),
Password: pulumi.String("password"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var webhook_destination = new NewRelic.NotificationDestination("webhook-destination", new()
{
AccountId = "12345678",
Name = "destination-webhook",
Type = "WEBHOOK",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "url",
Value = "https://webhook.mywebhook.com",
},
},
AuthBasic = new NewRelic.Inputs.NotificationDestinationAuthBasicArgs
{
User = "username",
Password = "password",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthBasicArgs;
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) {
var webhook_destination = new NotificationDestination("webhook-destination", NotificationDestinationArgs.builder()
.accountId(12345678)
.name("destination-webhook")
.type("WEBHOOK")
.properties(NotificationDestinationPropertyArgs.builder()
.key("url")
.value("https://webhook.mywebhook.com")
.build())
.authBasic(NotificationDestinationAuthBasicArgs.builder()
.user("username")
.password("password")
.build())
.build());
}
}
resources:
webhook-destination:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: destination-webhook
type: WEBHOOK
properties:
- key: url
value: https://webhook.mywebhook.com
authBasic:
user: username
password: password
Create a channel
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const webhook_channel = new newrelic.NotificationChannel("webhook-channel", {
accountId: "12345678",
name: "channel-webhook",
type: "WEBHOOK",
destinationId: webhook_destination.id,
product: "IINT",
properties: [{
key: "payload",
value: "{name: foo}",
label: "Payload Template",
}],
});
import pulumi
import pulumi_newrelic as newrelic
webhook_channel = newrelic.NotificationChannel("webhook-channel",
account_id="12345678",
name="channel-webhook",
type="WEBHOOK",
destination_id=webhook_destination["id"],
product="IINT",
properties=[{
"key": "payload",
"value": "{name: foo}",
"label": "Payload Template",
}])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNotificationChannel(ctx, "webhook-channel", &newrelic.NotificationChannelArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("channel-webhook"),
Type: pulumi.String("WEBHOOK"),
DestinationId: pulumi.Any(webhook_destination.Id),
Product: pulumi.String("IINT"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("payload"),
Value: pulumi.String("{name: foo}"),
Label: pulumi.String("Payload Template"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var webhook_channel = new NewRelic.NotificationChannel("webhook-channel", new()
{
AccountId = "12345678",
Name = "channel-webhook",
Type = "WEBHOOK",
DestinationId = webhook_destination.Id,
Product = "IINT",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "payload",
Value = "{name: foo}",
Label = "Payload Template",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
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) {
var webhook_channel = new NotificationChannel("webhook-channel", NotificationChannelArgs.builder()
.accountId(12345678)
.name("channel-webhook")
.type("WEBHOOK")
.destinationId(webhook_destination.id())
.product("IINT")
.properties(NotificationChannelPropertyArgs.builder()
.key("payload")
.value("{name: foo}")
.label("Payload Template")
.build())
.build());
}
}
resources:
webhook-channel:
type: newrelic:NotificationChannel
properties:
accountId: 1.2345678e+07
name: channel-webhook
type: WEBHOOK
destinationId: ${["webhook-destination"].id}
product: IINT
properties:
- key: payload
value: '{name: foo}'
label: Payload Template
Additional Information
More details about the channels API can be found here.
Moving from Legacy Alert Channels to Notification Channels
As described in the documentation of this resource, channels can be created and managed using newrelic.NotificationDestination
and newrelic.NotificationChannel
. A combination of these resources is an alternative to the legacy resource newrelic.AlertChannel
, which is deprecated and will be removed in a future major release, as stated in the documentation of the resource.
If you’re currently using newrelic.AlertChannel
to manage channels, we strongly recommend migrating to these notifications-based resources at the earliest.
Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
Create NotificationChannel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationChannel(name: string, args: NotificationChannelArgs, opts?: CustomResourceOptions);
@overload
def NotificationChannel(resource_name: str,
args: NotificationChannelArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationChannel(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_id: Optional[str] = None,
product: Optional[str] = None,
properties: Optional[Sequence[NotificationChannelPropertyArgs]] = None,
type: Optional[str] = None,
account_id: Optional[str] = None,
active: Optional[bool] = None,
name: Optional[str] = None)
func NewNotificationChannel(ctx *Context, name string, args NotificationChannelArgs, opts ...ResourceOption) (*NotificationChannel, error)
public NotificationChannel(string name, NotificationChannelArgs args, CustomResourceOptions? opts = null)
public NotificationChannel(String name, NotificationChannelArgs args)
public NotificationChannel(String name, NotificationChannelArgs args, CustomResourceOptions options)
type: newrelic:NotificationChannel
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 NotificationChannelArgs
- 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 NotificationChannelArgs
- 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 NotificationChannelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationChannelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationChannelArgs
- 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 notificationChannelResource = new NewRelic.NotificationChannel("notificationChannelResource", new()
{
DestinationId = "string",
Product = "string",
Properties = new[]
{
new NewRelic.Inputs.NotificationChannelPropertyArgs
{
Key = "string",
Value = "string",
DisplayValue = "string",
Label = "string",
},
},
Type = "string",
AccountId = "string",
Active = false,
Name = "string",
});
example, err := newrelic.NewNotificationChannel(ctx, "notificationChannelResource", &newrelic.NotificationChannelArgs{
DestinationId: pulumi.String("string"),
Product: pulumi.String("string"),
Properties: newrelic.NotificationChannelPropertyArray{
&newrelic.NotificationChannelPropertyArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
DisplayValue: pulumi.String("string"),
Label: pulumi.String("string"),
},
},
Type: pulumi.String("string"),
AccountId: pulumi.String("string"),
Active: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var notificationChannelResource = new NotificationChannel("notificationChannelResource", NotificationChannelArgs.builder()
.destinationId("string")
.product("string")
.properties(NotificationChannelPropertyArgs.builder()
.key("string")
.value("string")
.displayValue("string")
.label("string")
.build())
.type("string")
.accountId("string")
.active(false)
.name("string")
.build());
notification_channel_resource = newrelic.NotificationChannel("notificationChannelResource",
destination_id="string",
product="string",
properties=[{
"key": "string",
"value": "string",
"display_value": "string",
"label": "string",
}],
type="string",
account_id="string",
active=False,
name="string")
const notificationChannelResource = new newrelic.NotificationChannel("notificationChannelResource", {
destinationId: "string",
product: "string",
properties: [{
key: "string",
value: "string",
displayValue: "string",
label: "string",
}],
type: "string",
accountId: "string",
active: false,
name: "string",
});
type: newrelic:NotificationChannel
properties:
accountId: string
active: false
destinationId: string
name: string
product: string
properties:
- displayValue: string
key: string
label: string
value: string
type: string
NotificationChannel 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 NotificationChannel resource accepts the following input properties:
- Destination
Id string - The id of the destination.
- Product string
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - Properties
List<Pulumi.
New Relic. Inputs. Notification Channel Property> - A nested block that describes a notification channel property. See Nested property blocks below for details.
- Type string
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
. - Account
Id string - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the channel is active.
- Name string
- The name of the channel.
- Destination
Id string - The id of the destination.
- Product string
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - Properties
[]Notification
Channel Property Args - A nested block that describes a notification channel property. See Nested property blocks below for details.
- Type string
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
. - Account
Id string - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the channel is active.
- Name string
- The name of the channel.
- destination
Id String - The id of the destination.
- product String
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties
List<Notification
Channel Property> - A nested block that describes a notification channel property. See Nested property blocks below for details.
- type String
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
. - account
Id String - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the channel is active.
- name String
- The name of the channel.
- destination
Id string - The id of the destination.
- product string
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties
Notification
Channel Property[] - A nested block that describes a notification channel property. See Nested property blocks below for details.
- type string
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
. - account
Id string - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active boolean
- Indicates whether the channel is active.
- name string
- The name of the channel.
- destination_
id str - The id of the destination.
- product str
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties
Sequence[Notification
Channel Property Args] - A nested block that describes a notification channel property. See Nested property blocks below for details.
- type str
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
. - account_
id str - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active bool
- Indicates whether the channel is active.
- name str
- The name of the channel.
- destination
Id String - The id of the destination.
- product String
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties List<Property Map>
- A nested block that describes a notification channel property. See Nested property blocks below for details.
- type String
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
. - account
Id String - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the channel is active.
- name String
- The name of the channel.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationChannel resource produces the following output properties:
Look up Existing NotificationChannel Resource
Get an existing NotificationChannel 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?: NotificationChannelState, opts?: CustomResourceOptions): NotificationChannel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
active: Optional[bool] = None,
destination_id: Optional[str] = None,
name: Optional[str] = None,
product: Optional[str] = None,
properties: Optional[Sequence[NotificationChannelPropertyArgs]] = None,
status: Optional[str] = None,
type: Optional[str] = None) -> NotificationChannel
func GetNotificationChannel(ctx *Context, name string, id IDInput, state *NotificationChannelState, opts ...ResourceOption) (*NotificationChannel, error)
public static NotificationChannel Get(string name, Input<string> id, NotificationChannelState? state, CustomResourceOptions? opts = null)
public static NotificationChannel get(String name, Output<String> id, NotificationChannelState 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.
- Account
Id string - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the channel is active.
- Destination
Id string - The id of the destination.
- Name string
- The name of the channel.
- Product string
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - Properties
List<Pulumi.
New Relic. Inputs. Notification Channel Property> - A nested block that describes a notification channel property. See Nested property blocks below for details.
- Status string
- The status of the channel.
- Type string
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
.
- Account
Id string - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the channel is active.
- Destination
Id string - The id of the destination.
- Name string
- The name of the channel.
- Product string
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - Properties
[]Notification
Channel Property Args - A nested block that describes a notification channel property. See Nested property blocks below for details.
- Status string
- The status of the channel.
- Type string
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
.
- account
Id String - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the channel is active.
- destination
Id String - The id of the destination.
- name String
- The name of the channel.
- product String
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties
List<Notification
Channel Property> - A nested block that describes a notification channel property. See Nested property blocks below for details.
- status String
- The status of the channel.
- type String
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
.
- account
Id string - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active boolean
- Indicates whether the channel is active.
- destination
Id string - The id of the destination.
- name string
- The name of the channel.
- product string
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties
Notification
Channel Property[] - A nested block that describes a notification channel property. See Nested property blocks below for details.
- status string
- The status of the channel.
- type string
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
.
- account_
id str - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active bool
- Indicates whether the channel is active.
- destination_
id str - The id of the destination.
- name str
- The name of the channel.
- product str
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties
Sequence[Notification
Channel Property Args] - A nested block that describes a notification channel property. See Nested property blocks below for details.
- status str
- The status of the channel.
- type str
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
.
- account
Id String - Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the channel is active.
- destination
Id String - The id of the destination.
- name String
- The name of the channel.
- product String
- The type of product. One of:
DISCUSSIONS
,ERROR_TRACKING
orIINT
(workflows). - properties List<Property Map>
- A nested block that describes a notification channel property. See Nested property blocks below for details.
- status String
- The status of the channel.
- type String
- The type of channel. One of:
EMAIL
,SERVICENOW_INCIDENTS
,SERVICE_NOW_APP
,WEBHOOK
,JIRA_CLASSIC
,MOBILE_PUSH
,EVENT_BRIDGE
,SLACK
andSLACK_COLLABORATION
,PAGERDUTY_ACCOUNT_INTEGRATION
orPAGERDUTY_SERVICE_INTEGRATION
.
Supporting Types
NotificationChannelProperty, NotificationChannelPropertyArgs
- Key string
- Notification property key.
- Value string
- Notification property value.
- Display
Value string - Notification property display key.
- Label string
- Notification property label.
- Key string
- Notification property key.
- Value string
- Notification property value.
- Display
Value string - Notification property display key.
- Label string
- Notification property label.
- key String
- Notification property key.
- value String
- Notification property value.
- display
Value String - Notification property display key.
- label String
- Notification property label.
- key string
- Notification property key.
- value string
- Notification property value.
- display
Value string - Notification property display key.
- label string
- Notification property label.
- key str
- Notification property key.
- value str
- Notification property value.
- display_
value str - Notification property display key.
- label str
- Notification property label.
- key String
- Notification property key.
- value String
- Notification property value.
- display
Value String - Notification property display key.
- label String
- Notification property label.
Import
Channels can only be used by a single workflow, therefore importing them is not particularly useful, because in the UI channels are created upon workflow creation.
Additionally, the channel id isn’t available via the UI, and you’d need to look it up with the channels
query in the NerdGraph API.
That being said, importing is possible using -
$ pulumi import newrelic:index/notificationChannel:NotificationChannel foo <destination_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelic
Terraform Provider.