New Relic
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.
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 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
- include
Json StringAttachment - key String
- payload
Map
- 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
- include
Json StringAttachment - key String
- payload
Map
- 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
- https://github.com/pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
newrelic
Terraform Provider.