New Relic

Pulumi Official
Package maintained by Pulumi
v4.15.0 published on Monday, May 16, 2022 by Pulumi

getAlertChannel

Use this data source to get information about a specific alert channel in New Relic that already exists.

Example Usage

Coming soon!

Coming soon!

package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var fooAlertChannel = Output.of(NewrelicFunctions.getAlertChannel(GetAlertChannelArgs.builder()
            .name("foo@example.com")
            .build()));

        var fooAlertPolicy = new AlertPolicy("fooAlertPolicy");

        var fooAlertPolicyChannel = new AlertPolicyChannel("fooAlertPolicyChannel", AlertPolicyChannelArgs.builder()        
            .policyId(fooAlertPolicy.getId())
            .channelId(fooAlertChannel.apply(getAlertChannelResult -> getAlertChannelResult.getId()))
            .build());

        }
}

Coming soon!

Coming soon!

resources:
  fooAlertPolicy:
    type: newrelic:AlertPolicy
  fooAlertPolicyChannel:
    type: newrelic:AlertPolicyChannel
    properties:
      policyId: ${fooAlertPolicy.id}
      channelId: ${fooAlertChannel.id}
variables:
  fooAlertChannel:
    Fn::Invoke:
      Function: newrelic:getAlertChannel
      Arguments:
        name: foo@example.com

Using getAlertChannel

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAlertChannel(args: GetAlertChannelArgs, opts?: InvokeOptions): Promise<GetAlertChannelResult>
function getAlertChannelOutput(args: GetAlertChannelOutputArgs, opts?: InvokeOptions): Output<GetAlertChannelResult>
def get_alert_channel(name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetAlertChannelResult
def get_alert_channel_output(name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetAlertChannelResult]
func LookupAlertChannel(ctx *Context, args *LookupAlertChannelArgs, opts ...InvokeOption) (*LookupAlertChannelResult, error)
func LookupAlertChannelOutput(ctx *Context, args *LookupAlertChannelOutputArgs, opts ...InvokeOption) LookupAlertChannelResultOutput

> Note: This function is named LookupAlertChannel in the Go SDK.

public static class GetAlertChannel 
{
    public static Task<GetAlertChannelResult> InvokeAsync(GetAlertChannelArgs args, InvokeOptions? opts = null)
    public static Output<GetAlertChannelResult> Invoke(GetAlertChannelInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlertChannelResult> getAlertChannel(GetAlertChannelArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: newrelic:index/getAlertChannel:getAlertChannel
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the alert channel in New Relic.

Name string

The name of the alert channel in New Relic.

name String

The name of the alert channel in New Relic.

name string

The name of the alert channel in New Relic.

name str

The name of the alert channel in New Relic.

name String

The name of the alert channel in New Relic.

getAlertChannel Result

The following output properties are available:

Config Pulumi.NewRelic.Outputs.GetAlertChannelConfig

Alert channel configuration.

Id string

The provider-assigned unique ID for this managed resource.

Name string
PolicyIds List<int>

A list of policy IDs associated with the alert channel.

Type string

Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.

Config GetAlertChannelConfig

Alert channel configuration.

Id string

The provider-assigned unique ID for this managed resource.

Name string
PolicyIds []int

A list of policy IDs associated with the alert channel.

Type string

Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.

config GetAlertChannelConfig

Alert channel configuration.

id String

The provider-assigned unique ID for this managed resource.

name String
policyIds List

A list of policy IDs associated with the alert channel.

type String

Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.

config GetAlertChannelConfig

Alert channel configuration.

id string

The provider-assigned unique ID for this managed resource.

name string
policyIds number[]

A list of policy IDs associated with the alert channel.

type string

Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.

config GetAlertChannelConfig

Alert channel configuration.

id str

The provider-assigned unique ID for this managed resource.

name str
policy_ids Sequence[int]

A list of policy IDs associated with the alert channel.

type str

Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.

config Property Map

Alert channel configuration.

id String

The provider-assigned unique ID for this managed resource.

name String
policyIds List

A list of policy IDs associated with the alert channel.

type String

Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.

Supporting Types

GetAlertChannelConfig

ApiKey string
AuthPassword string
AuthType string
AuthUsername string
BaseUrl string
Channel string
Headers Dictionary<string, string>
IncludeJsonAttachment string
Key string
Payload Dictionary<string, string>
PayloadString string
PayloadType string
Recipients string
Region string
RouteKey string
ServiceKey string
Tags string
Teams string
Url string
UserId string
ApiKey string
AuthPassword string
AuthType string
AuthUsername string
BaseUrl string
Channel string
Headers map[string]string
IncludeJsonAttachment string
Key string
Payload map[string]string
PayloadString string
PayloadType string
Recipients string
Region string
RouteKey string
ServiceKey string
Tags string
Teams string
Url string
UserId string
apiKey String
authPassword String
authType String
authUsername String
baseUrl String
channel String
headers Map
includeJsonAttachment String
key String
payload Map
payloadString String
payloadType String
recipients String
region String
routeKey String
serviceKey String
tags String
teams String
url String
userId String
apiKey string
authPassword string
authType string
authUsername string
baseUrl string
channel string
headers {[key: string]: string}
includeJsonAttachment string
key string
payload {[key: string]: string}
payloadString string
payloadType string
recipients string
region string
routeKey string
serviceKey string
tags string
teams string
url string
userId string
apiKey String
authPassword String
authType String
authUsername String
baseUrl String
channel String
headers Map
includeJsonAttachment String
key String
payload Map
payloadString String
payloadType String
recipients String
region String
routeKey String
serviceKey String
tags String
teams String
url String
userId String

Package Details

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

This Pulumi package is based on the newrelic Terraform Provider.