Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to get information about a specific alert channel in New Relic that already exists.
Example Usage
Example coming soon!
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NewrelicFunctions;
import com.pulumi.newrelic.inputs.GetAlertChannelArgs;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.AlertPolicyChannel;
import com.pulumi.newrelic.AlertPolicyChannelArgs;
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) {
final var fooAlertChannel = NewrelicFunctions.getAlertChannel(GetAlertChannelArgs.builder()
.name("foo@example.com")
.build());
var fooAlertPolicy = new AlertPolicy("fooAlertPolicy");
var fooAlertPolicyChannel = new AlertPolicyChannel("fooAlertPolicyChannel", AlertPolicyChannelArgs.builder()
.policyId(fooAlertPolicy.id())
.channelId(fooAlertChannel.applyValue(getAlertChannelResult -> getAlertChannelResult.id()))
.build());
}
}
Example coming soon!
Example coming soon!
resources:
# Resource
fooAlertPolicy:
type: newrelic:AlertPolicy
# Using the data source and resource together
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)
public static Output<GetAlertChannelResult> getAlertChannel(GetAlertChannelArgs args, InvokeOptions options)
fn::invoke:
function: newrelic:index/getAlertChannel:getAlertChannel
arguments:
# arguments dictionaryThe 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.
New Relic. Outputs. Get Alert Channel Config - Alert channel configuration.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Policy
Ids List<int> - A list of policy IDs associated with the alert channel.
- Type string
- Alert channel type, either:
email,opsgenie,pagerduty,slack,victorops, orwebhook.
- Config
Get
Alert Channel Config - Alert channel configuration.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Policy
Ids []int - A list of policy IDs associated with the alert channel.
- Type string
- Alert channel type, either:
email,opsgenie,pagerduty,slack,victorops, orwebhook.
- config
Get
Alert Channel Config - Alert channel configuration.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- policy
Ids List<Integer> - A list of policy IDs associated with the alert channel.
- type String
- Alert channel type, either:
email,opsgenie,pagerduty,slack,victorops, orwebhook.
- config
Get
Alert Channel Config - Alert channel configuration.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- policy
Ids number[] - A list of policy IDs associated with the alert channel.
- type string
- Alert channel type, either:
email,opsgenie,pagerduty,slack,victorops, orwebhook.
- config
Get
Alert Channel Config - 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, orwebhook.
Supporting Types
GetAlertChannelConfig
- Api
Key string - Auth
Password string - Auth
Type string - Auth
Username string - Base
Url string - Channel string
- Headers Dictionary<string, string>
- Include
Json stringAttachment - Key string
- Payload Dictionary<string, string>
- Payload
String string - Payload
Type string - Recipients string
- Region string
- Route
Key string - Service
Key string - string
- Teams string
- Url string
- User
Id string
- Api
Key string - Auth
Password string - Auth
Type string - Auth
Username string - Base
Url string - Channel string
- Headers map[string]string
- Include
Json stringAttachment - Key string
- Payload map[string]string
- Payload
String string - Payload
Type string - Recipients string
- Region string
- Route
Key string - Service
Key string - string
- Teams string
- Url string
- User
Id string
- api
Key String - auth
Password String - auth
Type String - auth
Username String - base
Url String - channel String
- headers Map<String,String>
- include
Json StringAttachment - key String
- payload Map<String,String>
- payload
String String - payload
Type String - recipients String
- region String
- route
Key String - service
Key String - String
- teams String
- url String
- user
Id String
- api
Key string - auth
Password string - auth
Type string - auth
Username string - base
Url string - channel string
- headers {[key: string]: string}
- include
Json stringAttachment - key string
- payload {[key: string]: string}
- payload
String string - payload
Type string - recipients string
- region string
- route
Key string - service
Key string - string
- teams string
- url string
- user
Id string
- api_
key str - auth_
password str - auth_
type str - auth_
username str - base_
url str - channel str
- headers Mapping[str, str]
- include_
json_ strattachment - key str
- payload Mapping[str, str]
- payload_
string str - payload_
type str - recipients str
- region str
- route_
key str - service_
key str - str
- teams str
- url str
- user_
id str
- api
Key String - auth
Password String - auth
Type String - auth
Username String - base
Url String - channel String
- headers Map<String>
- include
Json StringAttachment - key String
- payload Map<String>
- payload
String String - payload
Type String - recipients String
- region String
- route
Key String - service
Key String - String
- teams String
- url String
- user
Id String
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
