• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Update an alert policy

|View as Markdown

The action identifier is newrelic.alerts.updatePolicy.

Updates an existing alert policy. You can change the policy name, incident preference, or both. Omitting a field leaves it unchanged.

The following table describes all available input fields for this action.

Input

Type

Description

Example

accountId

Int

Required. The New Relic account that owns the policy.

123456

id

String

Required. The ID of the policy to update.

"2000002"

name

String

Optional. New name for the policy. Omit to leave unchanged.

"Production Services - Updated"

incidentPreference

String

Optional. New incident preference. Omit to leave unchanged. One of PER_CONDITION, PER_CONDITION_AND_TARGET, or PER_POLICY.

"PER_POLICY"

selectors

List

Optional. JQ selectors to extract values from the response.

selectors:
- name: policyId
expression: ".data.alertsPolicyUpdate.id"

The following table describes all output fields returned by this action.

Output

Type

Description

success

Boolean

true when the step executed without error.

errorMessage

String

Error message on failure. null on success.

data

Map

NerdGraph response. Use selectors to extract id, name, incidentPreference, accountId, or entityGuid from data.

{
"data": {
"alertsPolicyUpdate": {
"id": "2000002",
"name": "Production Services - Updated",
"incidentPreference": "PER_POLICY",
"accountId": 123456,
"entityGuid": "MTIzNDU2fEFJT1BTfE9QVFxfUE9MSUNZfDc4OTA="
}
}
}

The following example renames an alert policy.

Workflow example

name: update_alert_policy
description: Rename an alert policy
steps:
- name: updatePolicy
type: action
action: newrelic.alerts.updatePolicy
version: 1
inputs:
accountId: ${{ .workflowInputs.accountId }}
id: ${{ .workflowInputs.policyId }}
name: "Production Services - Updated"
next: end
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.