newrelic.AlertChannel
Explore with Pulumi AI
Use this resource to create and manage New Relic alert channels.
WARNING: The
newrelic.AlertChannel
resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, usenewrelic.NotificationChannel
.
Additional Examples
Slack
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
channel: "example-alerts-channel",
url: "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
},
type: "slack",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
channel="example-alerts-channel",
url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
),
type="slack")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
Channel = "example-alerts-channel",
Url = "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
},
Type = "slack",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
Channel: pulumi.String("example-alerts-channel"),
Url: pulumi.String("https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX"),
},
Type: pulumi.String("slack"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.channel("example-alerts-channel")
.url("https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX")
.build())
.type("slack")
.build());
}
}
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
channel: example-alerts-channel
url: https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX
type: slack
NOTE: For instructions on setting up Webhooks with Slack, please visit the article linked under the argument
slack
in the aforementioned configuration, or this article in New Relic’s docs for additional details on setting up theNew Relic Alerts
Slack application, and subsequently using the generated Webhook URL.
OpsGenie
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
apiKey: "abc123",
recipients: "user1@domain.com, user2@domain.com",
tags: "tag1, tag2",
teams: "team1, team2",
},
type: "opsgenie",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
api_key="abc123",
recipients="user1@domain.com, user2@domain.com",
tags="tag1, tag2",
teams="team1, team2",
),
type="opsgenie")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
ApiKey = "abc123",
Recipients = "user1@domain.com, user2@domain.com",
Tags = "tag1, tag2",
Teams = "team1, team2",
},
Type = "opsgenie",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
ApiKey: pulumi.String("abc123"),
Recipients: pulumi.String("user1@domain.com, user2@domain.com"),
Tags: pulumi.String("tag1, tag2"),
Teams: pulumi.String("team1, team2"),
},
Type: pulumi.String("opsgenie"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.apiKey("abc123")
.recipients("user1@domain.com, user2@domain.com")
.tags("tag1, tag2")
.teams("team1, team2")
.build())
.type("opsgenie")
.build());
}
}
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
apiKey: abc123
recipients: user1@domain.com, user2@domain.com
tags: tag1, tag2
teams: team1, team2
type: opsgenie
PagerDuty
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
serviceKey: "abc123",
},
type: "pagerduty",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
service_key="abc123",
),
type="pagerduty")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
ServiceKey = "abc123",
},
Type = "pagerduty",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
ServiceKey: pulumi.String("abc123"),
},
Type: pulumi.String("pagerduty"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.serviceKey("abc123")
.build())
.type("pagerduty")
.build());
}
}
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
serviceKey: abc123
type: pagerduty
VictorOps
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
key: "abc123",
routeKey: "/example",
},
type: "victorops",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
key="abc123",
route_key="/example",
),
type="victorops")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
Key = "abc123",
RouteKey = "/example",
},
Type = "victorops",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
Key: pulumi.String("abc123"),
RouteKey: pulumi.String("/example"),
},
Type: pulumi.String("victorops"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.key("abc123")
.routeKey("/example")
.build())
.type("victorops")
.build());
}
}
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
key: abc123
routeKey: /example
type: victorops
Webhook
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
type: "webhook",
config: {
baseUrl: "http://www.test.com",
payloadType: "application/json",
payload: {
condition_name: "$CONDITION_NAME",
policy_name: "$POLICY_NAME",
},
headers: {
header1: value1,
header2: value2,
},
},
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
type="webhook",
config=newrelic.AlertChannelConfigArgs(
base_url="http://www.test.com",
payload_type="application/json",
payload={
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME",
},
headers={
"header1": value1,
"header2": value2,
},
))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Type = "webhook",
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
BaseUrl = "http://www.test.com",
PayloadType = "application/json",
Payload =
{
{ "condition_name", "$CONDITION_NAME" },
{ "policy_name", "$POLICY_NAME" },
},
Headers =
{
{ "header1", value1 },
{ "header2", value2 },
},
},
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Type: pulumi.String("webhook"),
Config: &newrelic.AlertChannelConfigArgs{
BaseUrl: pulumi.String("http://www.test.com"),
PayloadType: pulumi.String("application/json"),
Payload: pulumi.StringMap{
"condition_name": pulumi.String("$CONDITION_NAME"),
"policy_name": pulumi.String("$POLICY_NAME"),
},
Headers: pulumi.StringMap{
"header1": pulumi.Any(value1),
"header2": pulumi.Any(value2),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.type("webhook")
.config(AlertChannelConfigArgs.builder()
.baseUrl("http://www.test.com")
.payloadType("application/json")
.payload(Map.ofEntries(
Map.entry("condition_name", "$CONDITION_NAME"),
Map.entry("policy_name", "$POLICY_NAME")
))
.headers(Map.ofEntries(
Map.entry("header1", value1),
Map.entry("header2", value2)
))
.build())
.build());
}
}
resources:
foo:
type: newrelic:AlertChannel
properties:
type: webhook
config:
baseUrl: http://www.test.com
payloadType: application/json
payload:
condition_name: $CONDITION_NAME
policy_name: $POLICY_NAME
headers:
header1: ${value1}
header2: ${value2}
Webhook with complex payload
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
baseUrl: "http://www.test.com",
payloadString: `{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
`,
payloadType: "application/json",
},
type: "webhook",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
base_url="http://www.test.com",
payload_string="""{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
""",
payload_type="application/json",
),
type="webhook")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
BaseUrl = "http://www.test.com",
PayloadString = @"{
""my_custom_values"": {
""condition_name"": ""$CONDITION_NAME"",
""policy_name"": ""$POLICY_NAME""
}
}
",
PayloadType = "application/json",
},
Type = "webhook",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
BaseUrl: pulumi.String("http://www.test.com"),
PayloadString: pulumi.String(`{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
`),
PayloadType: pulumi.String("application/json"),
},
Type: pulumi.String("webhook"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.baseUrl("http://www.test.com")
.payloadString("""
{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
""")
.payloadType("application/json")
.build())
.type("webhook")
.build());
}
}
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
baseUrl: http://www.test.com
payloadString: |+
{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
payloadType: application/json
type: webhook
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
IncludeJsonAttachment = "true",
Recipients = "foo@example.com",
},
Type = "email",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
IncludeJsonAttachment: pulumi.String("true"),
Recipients: pulumi.String("foo@example.com"),
},
Type: pulumi.String("email"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.includeJsonAttachment("true")
.recipients("foo@example.com")
.build())
.type("email")
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
include_json_attachment="true",
recipients="foo@example.com",
),
type="email")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
includeJsonAttachment: "true",
recipients: "foo@example.com",
},
type: "email",
});
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
includeJsonAttachment: 'true'
recipients: foo@example.com
type: email
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
Channel = "example-alerts-channel",
Url = "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
},
Type = "slack",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
Channel: pulumi.String("example-alerts-channel"),
Url: pulumi.String("https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX"),
},
Type: pulumi.String("slack"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.channel("example-alerts-channel")
.url("https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX")
.build())
.type("slack")
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
channel="example-alerts-channel",
url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
),
type="slack")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
channel: "example-alerts-channel",
url: "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
},
type: "slack",
});
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
channel: example-alerts-channel
url: https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX
type: slack
OpsGenie
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
ApiKey = "abc123",
Recipients = "user1@domain.com, user2@domain.com",
Tags = "tag1, tag2",
Teams = "team1, team2",
},
Type = "opsgenie",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
ApiKey: pulumi.String("abc123"),
Recipients: pulumi.String("user1@domain.com, user2@domain.com"),
Tags: pulumi.String("tag1, tag2"),
Teams: pulumi.String("team1, team2"),
},
Type: pulumi.String("opsgenie"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.apiKey("abc123")
.recipients("user1@domain.com, user2@domain.com")
.tags("tag1, tag2")
.teams("team1, team2")
.build())
.type("opsgenie")
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
api_key="abc123",
recipients="user1@domain.com, user2@domain.com",
tags="tag1, tag2",
teams="team1, team2",
),
type="opsgenie")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
apiKey: "abc123",
recipients: "user1@domain.com, user2@domain.com",
tags: "tag1, tag2",
teams: "team1, team2",
},
type: "opsgenie",
});
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
apiKey: abc123
recipients: user1@domain.com, user2@domain.com
tags: tag1, tag2
teams: team1, team2
type: opsgenie
PagerDuty
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
ServiceKey = "abc123",
},
Type = "pagerduty",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
ServiceKey: pulumi.String("abc123"),
},
Type: pulumi.String("pagerduty"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.serviceKey("abc123")
.build())
.type("pagerduty")
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
service_key="abc123",
),
type="pagerduty")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
serviceKey: "abc123",
},
type: "pagerduty",
});
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
serviceKey: abc123
type: pagerduty
VictorOps
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
Key = "abc123",
RouteKey = "/example",
},
Type = "victorops",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
Key: pulumi.String("abc123"),
RouteKey: pulumi.String("/example"),
},
Type: pulumi.String("victorops"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.key("abc123")
.routeKey("/example")
.build())
.type("victorops")
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
key="abc123",
route_key="/example",
),
type="victorops")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
key: "abc123",
routeKey: "/example",
},
type: "victorops",
});
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
key: abc123
routeKey: /example
type: victorops
Webhook
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Type = "webhook",
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
BaseUrl = "http://www.test.com",
PayloadType = "application/json",
Payload =
{
{ "condition_name", "$CONDITION_NAME" },
{ "policy_name", "$POLICY_NAME" },
},
Headers =
{
{ "header1", value1 },
{ "header2", value2 },
},
},
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Type: pulumi.String("webhook"),
Config: &newrelic.AlertChannelConfigArgs{
BaseUrl: pulumi.String("http://www.test.com"),
PayloadType: pulumi.String("application/json"),
Payload: pulumi.StringMap{
"condition_name": pulumi.String("$CONDITION_NAME"),
"policy_name": pulumi.String("$POLICY_NAME"),
},
Headers: pulumi.StringMap{
"header1": pulumi.Any(value1),
"header2": pulumi.Any(value2),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.type("webhook")
.config(AlertChannelConfigArgs.builder()
.baseUrl("http://www.test.com")
.payloadType("application/json")
.payload(Map.ofEntries(
Map.entry("condition_name", "$CONDITION_NAME"),
Map.entry("policy_name", "$POLICY_NAME")
))
.headers(Map.ofEntries(
Map.entry("header1", value1),
Map.entry("header2", value2)
))
.build())
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
type="webhook",
config=newrelic.AlertChannelConfigArgs(
base_url="http://www.test.com",
payload_type="application/json",
payload={
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME",
},
headers={
"header1": value1,
"header2": value2,
},
))
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
type: "webhook",
config: {
baseUrl: "http://www.test.com",
payloadType: "application/json",
payload: {
condition_name: "$CONDITION_NAME",
policy_name: "$POLICY_NAME",
},
headers: {
header1: value1,
header2: value2,
},
},
});
resources:
foo:
type: newrelic:AlertChannel
properties:
type: webhook
config:
baseUrl: http://www.test.com
payloadType: application/json
payload:
condition_name: $CONDITION_NAME
policy_name: $POLICY_NAME
headers:
header1: ${value1}
header2: ${value2}
Webhook with complex payload
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.AlertChannel("foo", new()
{
Config = new NewRelic.Inputs.AlertChannelConfigArgs
{
BaseUrl = "http://www.test.com",
PayloadString = @"{
""my_custom_values"": {
""condition_name"": ""$CONDITION_NAME"",
""policy_name"": ""$POLICY_NAME""
}
}
",
PayloadType = "application/json",
},
Type = "webhook",
});
});
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.NewAlertChannel(ctx, "foo", &newrelic.AlertChannelArgs{
Config: &newrelic.AlertChannelConfigArgs{
BaseUrl: pulumi.String("http://www.test.com"),
PayloadString: pulumi.String(`{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
`),
PayloadType: pulumi.String("application/json"),
},
Type: pulumi.String("webhook"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertChannel;
import com.pulumi.newrelic.AlertChannelArgs;
import com.pulumi.newrelic.inputs.AlertChannelConfigArgs;
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 AlertChannel("foo", AlertChannelArgs.builder()
.config(AlertChannelConfigArgs.builder()
.baseUrl("http://www.test.com")
.payloadString("""
{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
""")
.payloadType("application/json")
.build())
.type("webhook")
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertChannel("foo",
config=newrelic.AlertChannelConfigArgs(
base_url="http://www.test.com",
payload_string="""{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
""",
payload_type="application/json",
),
type="webhook")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
baseUrl: "http://www.test.com",
payloadString: `{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
`,
payloadType: "application/json",
},
type: "webhook",
});
resources:
foo:
type: newrelic:AlertChannel
properties:
config:
baseUrl: http://www.test.com
payloadString: |+
{
"my_custom_values": {
"condition_name": "$CONDITION_NAME",
"policy_name": "$POLICY_NAME"
}
}
payloadType: application/json
type: webhook
Create AlertChannel Resource
new AlertChannel(name: string, args: AlertChannelArgs, opts?: CustomResourceOptions);
@overload
def AlertChannel(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[int] = None,
config: Optional[AlertChannelConfigArgs] = None,
name: Optional[str] = None,
type: Optional[str] = None)
@overload
def AlertChannel(resource_name: str,
args: AlertChannelArgs,
opts: Optional[ResourceOptions] = None)
func NewAlertChannel(ctx *Context, name string, args AlertChannelArgs, opts ...ResourceOption) (*AlertChannel, error)
public AlertChannel(string name, AlertChannelArgs args, CustomResourceOptions? opts = null)
public AlertChannel(String name, AlertChannelArgs args)
public AlertChannel(String name, AlertChannelArgs args, CustomResourceOptions options)
type: newrelic:AlertChannel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertChannelArgs
- 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 AlertChannelArgs
- 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 AlertChannelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertChannelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertChannelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AlertChannel 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 AlertChannel resource accepts the following input properties:
- Type string
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.- Account
Id int Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- Config
Pulumi.
New Relic. Inputs. Alert Channel Config A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- Name string
The name of the channel.
- Type string
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.- Account
Id int Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- Config
Alert
Channel Config Args A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- Name string
The name of the channel.
- type String
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.- account
Id Integer Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config
Alert
Channel Config A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name String
The name of the channel.
- type string
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.- account
Id number Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config
Alert
Channel Config A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name string
The name of the channel.
- type str
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.- account_
id int Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config
Alert
Channel Config Args A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name str
The name of the channel.
- type String
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.- account
Id Number Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config Property Map
A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name String
The name of the channel.
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertChannel resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing AlertChannel Resource
Get an existing AlertChannel 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?: AlertChannelState, opts?: CustomResourceOptions): AlertChannel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[int] = None,
config: Optional[AlertChannelConfigArgs] = None,
name: Optional[str] = None,
type: Optional[str] = None) -> AlertChannel
func GetAlertChannel(ctx *Context, name string, id IDInput, state *AlertChannelState, opts ...ResourceOption) (*AlertChannel, error)
public static AlertChannel Get(string name, Input<string> id, AlertChannelState? state, CustomResourceOptions? opts = null)
public static AlertChannel get(String name, Output<String> id, AlertChannelState 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 int Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- Config
Pulumi.
New Relic. Inputs. Alert Channel Config A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- Name string
The name of the channel.
- Type string
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.
- Account
Id int Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- Config
Alert
Channel Config Args A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- Name string
The name of the channel.
- Type string
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.
- account
Id Integer Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config
Alert
Channel Config A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name String
The name of the channel.
- type String
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.
- account
Id number Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config
Alert
Channel Config A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name string
The name of the channel.
- type string
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.
- account_
id int Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config
Alert
Channel Config Args A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name str
The name of the channel.
- type str
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.
- account
Id Number Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
- config Property Map
A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
- name String
The name of the channel.
- type String
The type of channel. One of:
email
,slack
,opsgenie
,pagerduty
,victorops
, orwebhook
.
Supporting Types
AlertChannelConfig, AlertChannelConfigArgs
- Api
Key string The API key for integrating with OpsGenie.
- Auth
Password string Specifies an authentication password for use with a channel. Supported by the
webhook
channel type.- Auth
Type string Specifies an authentication method for use with a channel. Supported by the
webhook
channel type. Only HTTP basic authentication is currently supported via the valueBASIC
.- Auth
Username string Specifies an authentication username for use with a channel. Supported by the
webhook
channel type.- Base
Url string The base URL of the webhook destination.
- Channel string
The Slack channel to send notifications to.
- Headers Dictionary<string, string>
A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.
- Headers
String string Use instead of
headers
if the desired payload is more complex than a list of key/value pairs (e.g. a set of headers that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withheaders
.- Include
Json stringAttachment true
orfalse
. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.- Key string
The key for integrating with VictorOps.
- Payload Dictionary<string, string>
A map of key/value pairs that represents the webhook payload. Must provide
payload_type
if setting this argument.- Payload
String string Use instead of
payload
if the desired payload is more complex than a list of key/value pairs (e.g. a payload that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withpayload
.- Payload
Type string Can either be
application/json
orapplication/x-www-form-urlencoded
. Thepayload_type
argument is required ifpayload
is set.- Recipients string
Comma delimited list of email addresses.
- Region string
The data center region to store your data. Valid values are
US
andEU
. Default isUS
.- Route
Key string The route key for integrating with VictorOps.
- Service
Key string Specifies the service key for integrating with Pagerduty.
- string
A set of tags for targeting notifications. Multiple values are comma separated.
- Teams string
A set of teams for targeting notifications. Multiple values are comma separated.
- Url string
- User
Id string
- Api
Key string The API key for integrating with OpsGenie.
- Auth
Password string Specifies an authentication password for use with a channel. Supported by the
webhook
channel type.- Auth
Type string Specifies an authentication method for use with a channel. Supported by the
webhook
channel type. Only HTTP basic authentication is currently supported via the valueBASIC
.- Auth
Username string Specifies an authentication username for use with a channel. Supported by the
webhook
channel type.- Base
Url string The base URL of the webhook destination.
- Channel string
The Slack channel to send notifications to.
- Headers map[string]string
A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.
- Headers
String string Use instead of
headers
if the desired payload is more complex than a list of key/value pairs (e.g. a set of headers that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withheaders
.- Include
Json stringAttachment true
orfalse
. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.- Key string
The key for integrating with VictorOps.
- Payload map[string]string
A map of key/value pairs that represents the webhook payload. Must provide
payload_type
if setting this argument.- Payload
String string Use instead of
payload
if the desired payload is more complex than a list of key/value pairs (e.g. a payload that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withpayload
.- Payload
Type string Can either be
application/json
orapplication/x-www-form-urlencoded
. Thepayload_type
argument is required ifpayload
is set.- Recipients string
Comma delimited list of email addresses.
- Region string
The data center region to store your data. Valid values are
US
andEU
. Default isUS
.- Route
Key string The route key for integrating with VictorOps.
- Service
Key string Specifies the service key for integrating with Pagerduty.
- string
A set of tags for targeting notifications. Multiple values are comma separated.
- Teams string
A set of teams for targeting notifications. Multiple values are comma separated.
- Url string
- User
Id string
- api
Key String The API key for integrating with OpsGenie.
- auth
Password String Specifies an authentication password for use with a channel. Supported by the
webhook
channel type.- auth
Type String Specifies an authentication method for use with a channel. Supported by the
webhook
channel type. Only HTTP basic authentication is currently supported via the valueBASIC
.- auth
Username String Specifies an authentication username for use with a channel. Supported by the
webhook
channel type.- base
Url String The base URL of the webhook destination.
- channel String
The Slack channel to send notifications to.
- headers Map<String,String>
A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.
- headers
String String Use instead of
headers
if the desired payload is more complex than a list of key/value pairs (e.g. a set of headers that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withheaders
.- include
Json StringAttachment true
orfalse
. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.- key String
The key for integrating with VictorOps.
- payload Map<String,String>
A map of key/value pairs that represents the webhook payload. Must provide
payload_type
if setting this argument.- payload
String String Use instead of
payload
if the desired payload is more complex than a list of key/value pairs (e.g. a payload that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withpayload
.- payload
Type String Can either be
application/json
orapplication/x-www-form-urlencoded
. Thepayload_type
argument is required ifpayload
is set.- recipients String
Comma delimited list of email addresses.
- region String
The data center region to store your data. Valid values are
US
andEU
. Default isUS
.- route
Key String The route key for integrating with VictorOps.
- service
Key String Specifies the service key for integrating with Pagerduty.
- String
A set of tags for targeting notifications. Multiple values are comma separated.
- teams String
A set of teams for targeting notifications. Multiple values are comma separated.
- url String
- user
Id String
- api
Key string The API key for integrating with OpsGenie.
- auth
Password string Specifies an authentication password for use with a channel. Supported by the
webhook
channel type.- auth
Type string Specifies an authentication method for use with a channel. Supported by the
webhook
channel type. Only HTTP basic authentication is currently supported via the valueBASIC
.- auth
Username string Specifies an authentication username for use with a channel. Supported by the
webhook
channel type.- base
Url string The base URL of the webhook destination.
- channel string
The Slack channel to send notifications to.
- headers {[key: string]: string}
A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.
- headers
String string Use instead of
headers
if the desired payload is more complex than a list of key/value pairs (e.g. a set of headers that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withheaders
.- include
Json stringAttachment true
orfalse
. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.- key string
The key for integrating with VictorOps.
- payload {[key: string]: string}
A map of key/value pairs that represents the webhook payload. Must provide
payload_type
if setting this argument.- payload
String string Use instead of
payload
if the desired payload is more complex than a list of key/value pairs (e.g. a payload that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withpayload
.- payload
Type string Can either be
application/json
orapplication/x-www-form-urlencoded
. Thepayload_type
argument is required ifpayload
is set.- recipients string
Comma delimited list of email addresses.
- region string
The data center region to store your data. Valid values are
US
andEU
. Default isUS
.- route
Key string The route key for integrating with VictorOps.
- service
Key string Specifies the service key for integrating with Pagerduty.
- string
A set of tags for targeting notifications. Multiple values are comma separated.
- teams string
A set of teams for targeting notifications. Multiple values are comma separated.
- url string
- user
Id string
- api_
key str The API key for integrating with OpsGenie.
- auth_
password str Specifies an authentication password for use with a channel. Supported by the
webhook
channel type.- auth_
type str Specifies an authentication method for use with a channel. Supported by the
webhook
channel type. Only HTTP basic authentication is currently supported via the valueBASIC
.- auth_
username str Specifies an authentication username for use with a channel. Supported by the
webhook
channel type.- base_
url str The base URL of the webhook destination.
- channel str
The Slack channel to send notifications to.
- headers Mapping[str, str]
A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.
- headers_
string str Use instead of
headers
if the desired payload is more complex than a list of key/value pairs (e.g. a set of headers that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withheaders
.- include_
json_ strattachment true
orfalse
. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.- key str
The key for integrating with VictorOps.
- payload Mapping[str, str]
A map of key/value pairs that represents the webhook payload. Must provide
payload_type
if setting this argument.- payload_
string str Use instead of
payload
if the desired payload is more complex than a list of key/value pairs (e.g. a payload that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withpayload
.- payload_
type str Can either be
application/json
orapplication/x-www-form-urlencoded
. Thepayload_type
argument is required ifpayload
is set.- recipients str
Comma delimited list of email addresses.
- region str
The data center region to store your data. Valid values are
US
andEU
. Default isUS
.- route_
key str The route key for integrating with VictorOps.
- service_
key str Specifies the service key for integrating with Pagerduty.
- str
A set of tags for targeting notifications. Multiple values are comma separated.
- teams str
A set of teams for targeting notifications. Multiple values are comma separated.
- url str
- user_
id str
- api
Key String The API key for integrating with OpsGenie.
- auth
Password String Specifies an authentication password for use with a channel. Supported by the
webhook
channel type.- auth
Type String Specifies an authentication method for use with a channel. Supported by the
webhook
channel type. Only HTTP basic authentication is currently supported via the valueBASIC
.- auth
Username String Specifies an authentication username for use with a channel. Supported by the
webhook
channel type.- base
Url String The base URL of the webhook destination.
- channel String
The Slack channel to send notifications to.
- headers Map<String>
A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.
- headers
String String Use instead of
headers
if the desired payload is more complex than a list of key/value pairs (e.g. a set of headers that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withheaders
.- include
Json StringAttachment true
orfalse
. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.- key String
The key for integrating with VictorOps.
- payload Map<String>
A map of key/value pairs that represents the webhook payload. Must provide
payload_type
if setting this argument.- payload
String String Use instead of
payload
if the desired payload is more complex than a list of key/value pairs (e.g. a payload that makes use of nested objects). The value provided should be a valid JSON string with escaped double quotes. Conflicts withpayload
.- payload
Type String Can either be
application/json
orapplication/x-www-form-urlencoded
. Thepayload_type
argument is required ifpayload
is set.- recipients String
Comma delimited list of email addresses.
- region String
The data center region to store your data. Valid values are
US
andEU
. Default isUS
.- route
Key String The route key for integrating with VictorOps.
- service
Key String Specifies the service key for integrating with Pagerduty.
- String
A set of tags for targeting notifications. Multiple values are comma separated.
- teams String
A set of teams for targeting notifications. Multiple values are comma separated.
- url String
- user
Id String
Import
Alert channels can be imported using the id
, e.g. bash
$ pulumi import newrelic:index/alertChannel:AlertChannel main <id>
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
newrelic
Terraform Provider.