getAlertPolicy

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

Example Usage

Coming soon!

Coming soon!

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const fooAlertChannel = newrelic.getAlertChannel({
    name: "foo@example.com",
});
const fooAlertPolicy = newrelic.getAlertPolicy({
    name: "foo policy",
});
const fooAlertPolicyChannel = new newrelic.AlertPolicyChannel("fooAlertPolicyChannel", {
    policyId: fooAlertPolicy.then(fooAlertPolicy => fooAlertPolicy.id),
    channelId: fooAlertChannel.then(fooAlertChannel => fooAlertChannel.id),
});

Using getAlertPolicy

function getAlertPolicy(args: GetAlertPolicyArgs, opts?: InvokeOptions): Promise<GetAlertPolicyResult>
def get_alert_policy(account_id: Optional[int] = None,
                     incident_preference: Optional[str] = None,
                     name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetAlertPolicyResult
func LookupAlertPolicy(ctx *Context, args *LookupAlertPolicyArgs, opts ...InvokeOption) (*LookupAlertPolicyResult, error)

Note: This function is named LookupAlertPolicy in the Go SDK.

public static class GetAlertPolicy {
    public static Task<GetAlertPolicyResult> InvokeAsync(GetAlertPolicyArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string
The name of the alert policy in New Relic.
AccountId int
IncidentPreference string
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
Name string
The name of the alert policy in New Relic.
AccountId int
IncidentPreference string
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
name string
The name of the alert policy in New Relic.
accountId number
incidentPreference string
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
name str
The name of the alert policy in New Relic.
account_id int
incident_preference str
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.

getAlertPolicy Result

The following output properties are available:

AccountId int
CreatedAt string
The time the policy was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
UpdatedAt string
The time the policy was last updated.
IncidentPreference string
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
AccountId int
CreatedAt string
The time the policy was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
UpdatedAt string
The time the policy was last updated.
IncidentPreference string
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
accountId number
createdAt string
The time the policy was created.
id string
The provider-assigned unique ID for this managed resource.
name string
updatedAt string
The time the policy was last updated.
incidentPreference string
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
account_id int
created_at str
The time the policy was created.
id str
The provider-assigned unique ID for this managed resource.
name str
updated_at str
The time the policy was last updated.
incident_preference str
The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.

Package Details

Repository
https://github.com/pulumi/pulumi-newrelic
License
Apache-2.0
Notes
This Pulumi package is based on the newrelic Terraform Provider.