• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

英語版と翻訳版に矛盾がある場合は、英語版が優先されます。詳細については、このページを参照してください。

問題を作成する

通知ステータスを待機します

|View as Markdown (English)

アクション識別子はnewrelic.notification.waitForStatusです。

前のnewrelic.notification.sendステップで送信された通知の配信結果をポーリングします。sessionIdを指定すると、このアクションは、通知が最終ステータス(SUCCESSまたはFAIL)に達するか、指定されたtimeoutが経過するまでNrNotificationsEventをポーリングします。Slackの宛先の場合、通知によって作成されたスレッドに返信するために必要なthread_tsの値も返します。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

セッションID

弦

必須。前の newrelic.notification.send ステップで返された sessionId。

"${{ .steps.sendNotification.outputs.sessionId }}"

アカウントID

整数

オプション。通知イベントをクエリするためのNew RelicアカウントIDです。省略された場合、デフォルトでワークフロー自身のアカウントが使用されます。

12345678

タイムアウト

整数

オプション。TIMEOUT ステータスを返すまでに待機する秒数です。デフォルト:15。最小:5、最大:30。

15

selectors

リスト

オプション。出力から特定のフィールドを抽出するJQセレクターです。たとえば、Slackスレッドのタイムスタンプをキャプチャするには.notificationStatus.threadTsを使用します。

[{"name": "threadTs", "expression": ".notificationStatus.threadTs"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true すべての最終結果(SUCCESS、FAIL、TIMEOUT)に対して。アクション自体でエラーが発生した場合にのみfalse。

errorMessage

弦

successがfalseの場合にのみ存在します。アクションレベルの失敗理由を含みます。

notificationStatus

オブジェクト

{
"status": "SUCCESS",
"errorMessage": "Delivery failed: channel not found",
"threadTs": "1234567890.123456"
}

status SUCCESS、FAIL、または TIMEOUT のいずれかです。errorMessage は、status が FAIL の場合にのみ存在します。threadTs は宛先が Slack の場合にのみ存在し、通知スレッドへの返信に必要な Slack スレッドのタイムスタンプが含まれます。

ワークフローの例:Slack通知を送信し、配信確認を待機します

name: notify_and_wait
description: Send a Slack notification then wait for its delivery status
steps:
- name: sendNotification
type: action
action: newrelic.notification.send
version: 1
inputs:
type: slack
destinationId: "your-destination-id"
parameters:
channel: "your-slack-channel"
text: "Deployment finished"
selectors:
- name: sessionId
expression: ".response.sessionId"
next: waitForStatus
- name: waitForStatus
type: action
action: newrelic.notification.waitForStatus
version: 1
inputs:
sessionId: ${{ .steps.sendNotification.outputs.sessionId }}
timeout: 15
selectors:
- name: deliveryStatus
expression: ".notificationStatus.status"
- name: threadTs
expression: ".notificationStatus.threadTs"
next: end
Copyright © 2026 New Relic株式会社。

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