New Relic

v5.1.0 published on Tuesday, Oct 4, 2022 by Pulumi

AlertChannel

Use this resource to create and manage New Relic alert channels.

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 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: &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

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 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: &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 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: &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 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: &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 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 (
	"fmt"

	"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: &AlertChannelConfigArgs{
				BaseUrl:     pulumi.String("http://www.test.com"),
				PayloadType: pulumi.String("application/json"),
				Payload: pulumi.StringMap{
					"condition_name": pulumi.String(fmt.Sprintf("$CONDITION_NAME")),
					"policy_name":    pulumi.String(fmt.Sprintf("$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 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 (
	"fmt"

	"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: &AlertChannelConfigArgs{
				BaseUrl: pulumi.String("http://www.test.com"),
				PayloadString: pulumi.String(fmt.Sprintf(`{
  "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

Email

using System.Collections.Generic;
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: &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 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: &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 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: &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 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: &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 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: &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 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 (
	"fmt"

	"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: &AlertChannelConfigArgs{
				BaseUrl:     pulumi.String("http://www.test.com"),
				PayloadType: pulumi.String("application/json"),
				Payload: pulumi.StringMap{
					"condition_name": pulumi.String(fmt.Sprintf("$CONDITION_NAME")),
					"policy_name":    pulumi.String(fmt.Sprintf("$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 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 (
	"fmt"

	"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: &AlertChannelConfigArgs{
				BaseUrl: pulumi.String("http://www.test.com"),
				PayloadString: pulumi.String(fmt.Sprintf(`{
  "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, or webhook.

AccountId 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.NewRelic.Inputs.AlertChannelConfigArgs

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, or webhook.

AccountId int

Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.

Config AlertChannelConfigArgs

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, or webhook.

accountId Integer

Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.

config AlertChannelConfigArgs

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, or webhook.

accountId number

Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.

config AlertChannelConfigArgs

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, or webhook.

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 AlertChannelConfigArgs

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, or webhook.

accountId 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.
The following state arguments are supported:
AccountId 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.NewRelic.Inputs.AlertChannelConfigArgs

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, or webhook.

AccountId int

Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.

Config AlertChannelConfigArgs

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, or webhook.

accountId Integer

Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.

config AlertChannelConfigArgs

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, or webhook.

accountId number

Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.

config AlertChannelConfigArgs

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, or webhook.

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 AlertChannelConfigArgs

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, or webhook.

accountId 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, or webhook.

Supporting Types

AlertChannelConfig

ApiKey string

The API key for integrating with OpsGenie.

AuthPassword string

Specifies an authentication password for use with a channel. Supported by the webhook channel type.

AuthType 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 value BASIC.

AuthUsername string

Specifies an authentication username for use with a channel. Supported by the webhook channel type.

BaseUrl string

The base URL of the webhook destination.

Channel string

The Slack channel to send notifications to.

  • opsgenie
Headers Dictionary<string, string>

A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.

HeadersString 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 with headers.

IncludeJsonAttachment string

true or false. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.

  • webhook
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.

PayloadString 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 with payload.

PayloadType string

Can either be application/json or application/x-www-form-urlencoded. The payload_type argument is required if payload is set.

  • pagerduty
Recipients string

A set of recipients for targeting notifications. Multiple values are comma separated.

Region string

The data center region to store your data. Valid values are US and EU. Default is US.

RouteKey string

The route key for integrating with VictorOps.

  • slack
ServiceKey string

Specifies the service key for integrating with Pagerduty.

  • victorops
Tags 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

Slack Webhook URL.

UserId string
ApiKey string

The API key for integrating with OpsGenie.

AuthPassword string

Specifies an authentication password for use with a channel. Supported by the webhook channel type.

AuthType 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 value BASIC.

AuthUsername string

Specifies an authentication username for use with a channel. Supported by the webhook channel type.

BaseUrl string

The base URL of the webhook destination.

Channel string

The Slack channel to send notifications to.

  • opsgenie
Headers map[string]string

A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.

HeadersString 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 with headers.

IncludeJsonAttachment string

true or false. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.

  • webhook
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.

PayloadString 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 with payload.

PayloadType string

Can either be application/json or application/x-www-form-urlencoded. The payload_type argument is required if payload is set.

  • pagerduty
Recipients string

A set of recipients for targeting notifications. Multiple values are comma separated.

Region string

The data center region to store your data. Valid values are US and EU. Default is US.

RouteKey string

The route key for integrating with VictorOps.

  • slack
ServiceKey string

Specifies the service key for integrating with Pagerduty.

  • victorops
Tags 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

Slack Webhook URL.

UserId string
apiKey String

The API key for integrating with OpsGenie.

authPassword String

Specifies an authentication password for use with a channel. Supported by the webhook channel type.

authType 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 value BASIC.

authUsername String

Specifies an authentication username for use with a channel. Supported by the webhook channel type.

baseUrl String

The base URL of the webhook destination.

channel String

The Slack channel to send notifications to.

  • opsgenie
headers Map<String,String>

A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.

headersString 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 with headers.

includeJsonAttachment String

true or false. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.

  • webhook
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.

payloadString 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 with payload.

payloadType String

Can either be application/json or application/x-www-form-urlencoded. The payload_type argument is required if payload is set.

  • pagerduty
recipients String

A set of recipients for targeting notifications. Multiple values are comma separated.

region String

The data center region to store your data. Valid values are US and EU. Default is US.

routeKey String

The route key for integrating with VictorOps.

  • slack
serviceKey String

Specifies the service key for integrating with Pagerduty.

  • victorops
tags 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

Slack Webhook URL.

userId String
apiKey string

The API key for integrating with OpsGenie.

authPassword string

Specifies an authentication password for use with a channel. Supported by the webhook channel type.

authType 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 value BASIC.

authUsername string

Specifies an authentication username for use with a channel. Supported by the webhook channel type.

baseUrl string

The base URL of the webhook destination.

channel string

The Slack channel to send notifications to.

  • opsgenie
headers {[key: string]: string}

A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.

headersString 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 with headers.

includeJsonAttachment string

true or false. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.

  • webhook
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.

payloadString 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 with payload.

payloadType string

Can either be application/json or application/x-www-form-urlencoded. The payload_type argument is required if payload is set.

  • pagerduty
recipients string

A set of recipients for targeting notifications. Multiple values are comma separated.

region string

The data center region to store your data. Valid values are US and EU. Default is US.

routeKey string

The route key for integrating with VictorOps.

  • slack
serviceKey string

Specifies the service key for integrating with Pagerduty.

  • victorops
tags 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

Slack Webhook URL.

userId 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 value BASIC.

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.

  • opsgenie
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 with headers.

include_json_attachment str

true or false. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.

  • webhook
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 with payload.

payload_type str

Can either be application/json or application/x-www-form-urlencoded. The payload_type argument is required if payload is set.

  • pagerduty
recipients str

A set of recipients for targeting notifications. Multiple values are comma separated.

region str

The data center region to store your data. Valid values are US and EU. Default is US.

route_key str

The route key for integrating with VictorOps.

  • slack
service_key str

Specifies the service key for integrating with Pagerduty.

  • victorops
tags 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

Slack Webhook URL.

user_id str
apiKey String

The API key for integrating with OpsGenie.

authPassword String

Specifies an authentication password for use with a channel. Supported by the webhook channel type.

authType 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 value BASIC.

authUsername String

Specifies an authentication username for use with a channel. Supported by the webhook channel type.

baseUrl String

The base URL of the webhook destination.

channel String

The Slack channel to send notifications to.

  • opsgenie
headers Map<String>

A map of key/value pairs that represents extra HTTP headers to be sent along with the webhook payload.

headersString 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 with headers.

includeJsonAttachment String

true or false. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients.

  • webhook
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.

payloadString 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 with payload.

payloadType String

Can either be application/json or application/x-www-form-urlencoded. The payload_type argument is required if payload is set.

  • pagerduty
recipients String

A set of recipients for targeting notifications. Multiple values are comma separated.

region String

The data center region to store your data. Valid values are US and EU. Default is US.

routeKey String

The route key for integrating with VictorOps.

  • slack
serviceKey String

Specifies the service key for integrating with Pagerduty.

  • victorops
tags 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

Slack Webhook URL.

userId String

Import

Alert channels can be imported using the id, e.g. bash

 $ pulumi import newrelic:index/alertChannel:AlertChannel main <id>

Package Details

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

This Pulumi package is based on the newrelic Terraform Provider.