New Relic v5.36.2 published on Tuesday, Dec 3, 2024 by Pulumi
newrelic.getAlertPolicy
Explore with Pulumi AI
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!
Coming soon!
Coming soon!
resources:
fooAlertPolicyChannel:
type: newrelic:AlertPolicyChannel
name: foo
properties:
policyId: ${fooGetAlertPolicy.id}
channelId: ${foo.id}
variables:
foo:
fn::invoke:
Function: newrelic:getAlertChannel
Arguments:
name: foo@example.com
fooGetAlertPolicy:
fn::invoke:
Function: newrelic:getAlertPolicy
Arguments:
name: foo policy
Using getAlertPolicy
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 getAlertPolicy(args: GetAlertPolicyArgs, opts?: InvokeOptions): Promise<GetAlertPolicyResult>
function getAlertPolicyOutput(args: GetAlertPolicyOutputArgs, opts?: InvokeOptions): Output<GetAlertPolicyResult>
def get_alert_policy(account_id: Optional[str] = None,
incident_preference: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAlertPolicyResult
def get_alert_policy_output(account_id: Optional[pulumi.Input[str]] = None,
incident_preference: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAlertPolicyResult]
func LookupAlertPolicy(ctx *Context, args *LookupAlertPolicyArgs, opts ...InvokeOption) (*LookupAlertPolicyResult, error)
func LookupAlertPolicyOutput(ctx *Context, args *LookupAlertPolicyOutputArgs, opts ...InvokeOption) LookupAlertPolicyResultOutput
> Note: This function is named LookupAlertPolicy
in the Go SDK.
public static class GetAlertPolicy
{
public static Task<GetAlertPolicyResult> InvokeAsync(GetAlertPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetAlertPolicyResult> Invoke(GetAlertPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlertPolicyResult> getAlertPolicy(GetAlertPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: newrelic:index/getAlertPolicy:getAlertPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the alert policy in New Relic.
- Account
Id string - The New Relic account ID to operate on. This allows you to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - Incident
Preference string - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- Name string
- The name of the alert policy in New Relic.
- Account
Id string - The New Relic account ID to operate on. This allows you to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - Incident
Preference string - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- name String
- The name of the alert policy in New Relic.
- account
Id String - The New Relic account ID to operate on. This allows you to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - incident
Preference String - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- name string
- The name of the alert policy in New Relic.
- account
Id string - The New Relic account ID to operate on. This allows you to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - incident
Preference string - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- name str
- The name of the alert policy in New Relic.
- account_
id str - The New Relic account ID to operate on. This allows you to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - incident_
preference str - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- name String
- The name of the alert policy in New Relic.
- account
Id String - The New Relic account ID to operate on. This allows you to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - incident
Preference String - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
getAlertPolicy Result
The following output properties are available:
- Account
Id string - Created
At string - The time the policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Updated
At string - The time the policy was last updated.
- Incident
Preference string - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- Account
Id string - Created
At string - The time the policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Updated
At string - The time the policy was last updated.
- Incident
Preference string - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- account
Id String - created
At String - The time the policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- updated
At String - The time the policy was last updated.
- incident
Preference String - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- account
Id string - created
At string - The time the policy was created.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- updated
At string - The time the policy was last updated.
- incident
Preference string - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- account_
id str - 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, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
- account
Id String - created
At String - The time the policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- updated
At String - The time the policy was last updated.
- incident
Preference String - The rollup strategy for the policy, which can have one of the following values:
PER_POLICY
- Represents the incident grouping preference One issue per policy. Refer to this page for more details on this incident grouping preference.PER_CONDITION
- Represents the incident grouping preference One issue per condition. Refer to this page for more details on this incident grouping preference.PER_CONDITION_AND_TARGET
- Represents the incident grouping preference One issue per condition and signal. Refer to this page for more details on this incident grouping preference.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelic
Terraform Provider.