Event Notifications CLI リファレンス

コマンドラインインターフェイス(CLI)を使用して Event Notifications を操作するには、 IBM Cloud のプラグインリポジトリから Event Notifications CLIプラグインをインストールしてください。 このプラグインは、 IBM Cloud CLIが提供する機能を拡張するように設計されています。

前提条件

IBM Cloud CLI にログインした際、更新プログラムが利用可能な場合は通知が表示されます。 Event Notifications CLIプラグインで利用可能な新しいコマンドやフラグを確実に利用できるよう、CLIを常に最新の状態に保つようにしてください。

Event Notifications CLI のインストール

plugin install コマンドを使用して、 Event Notifications CLIプラグインをインストールします。

ibmcloud plugin install event-notifications

1.15.2 より前のバージョンのプラグインは非推奨となっています。

Event Notifications }} CLIコマンド

init コマンドは非推奨となっており、今後のリリースで削除される予定です。

ibmcloud event-notifications en-list

設定されたターゲット領域内のインスタンスを一覧表示する。 リストされたインスタンスからインスタンスGUIDを取得できます。

ibmcloud event-notifications en-list

例

ibmcloud event-notifications en-list

対象地域を設定する

ibmcloud target コマンドを使用して、作業したい領域を設定します。

ibmcloud target -r REGION

あるいは、次の例に示すように、変数 IBMCLOUD_EN_ENDPOINT を使用して地域ごとのエンドポイントをエクスポートすることもできます。

export IBMCLOUD_EN_ENDPOINT= https://au-syd.event-notifications.cloud.ibm.com/event-notifications

リージョナルエンドポイントを「パブリック」または「プライベート」に設定するには、以下のオプションを参照してください

  • 利用可能なパブリックエンドポイント:

    • ダラス: https://us-south.event-notifications.cloud.ibm.com/event-notifications
    • ロンドン: https://eu-gb.event-notifications.cloud.ibm.com/event-notifications
    • シドニー: https://au-syd.event-notifications.cloud.ibm.com/event-notifications
    • フランクフルト: https://eu-de.event-notifications.cloud.ibm.com/event-notifications
    • マドリード:https://eu-es.event-notifications.cloud.ibm.com/event-notifications
    • 大阪: https://jp-osa.event-notifications.cloud.ibm.com/event-notifications
    • 東京: https://jp-tok.event-notifications.cloud.ibm.com/event-notifications
    • トロント: https://ca-tor.event-notifications.cloud.ibm.com/event-notifications
    • サンパウロ https://br-sao.event-notifications.cloud.ibm.com/event-notifications
    • モントリオール https://ca-mon.event-notifications.cloud.ibm.com/event-notifications
    • Washington DC : https://us-east.event-notifications.cloud.ibm.com/event-notifications
    • チェンナイ https://in-che.event-notifications.cloud.ibm.com/event-notifications
    • ムンバイ https://in-mum.event-notifications.cloud.ibm.com/event-notifications
  • 利用可能なプライベートエンドポイント:

    • ダラス: https://private.us-south.event-notifications.cloud.ibm.com/event-notifications
    • ロンドン: https://private.eu-gb.event-notifications.cloud.ibm.com/event-notifications
    • シドニー: https://private.au-syd.event-notifications.cloud.ibm.com/event-notifications
    • フランクフルト: https://private.eu-de.event-notifications.cloud.ibm.com/event-notifications
    • マドリード:https://private.eu-es.event-notifications.cloud.ibm.com/event-notifications
    • 大阪: https://private.jp-osa.event-notifications.cloud.ibm.com/event-notifications
    • 東京: https://private.jp-tok.event-notifications.cloud.ibm.com/event-notifications
    • トロント: https://private.ca-tor.event-notifications.cloud.ibm.com/event-notifications
    • サンパウロ https://private.br-sao.event-notifications.cloud.ibm.com/event-notifications
    • モントリオール https://private.ca-mon.event-notifications.cloud.ibm.com/event-notifications
    • Washington DC : https://private.us-east.event-notifications.cloud.ibm.com/event-notifications
    • チェンナイ https://private.in-che.event-notifications.cloud.ibm.com/event-notifications
    • ムンバイ https://private.in-mum.event-notifications.cloud.ibm.com/event-notifications

また、 EVENT_NOTIFICATIONS_API_KEY 変数をエクスポートして、 Event Notifications インスタンスのAPIキーまたはサービス認証情報のAPIキーを設定することもできます。

ソース

IBM Cloud Event Notifications のソースで動作します。

ibmcloud event-notifications source-create

Event Notifications が消費できるイベントを生成するようにサービスを設定するソースを作成します。 ソースを設定する Event Notifications インスタンスのIDを指定する必要があります。 ソースの種類や、 Event Notifications への登録に関する詳細については、「 Event Notifications ソースの追加 」を参照してください。

CLIでは現在、APIソースの作成のみをサポートしています。

ibmcloud event-notifications source-create --instance-id INSTANCE-ID --name NAME [--description DESCRIPTION] --enabled ENABLED [--store-notifications STORE-NOTIFICATIONS]

source-create と sources-create の両方がサポートされています。 他のコマンドとの一貫性を保つため、 source-create を使用してください。

コマンド・オプション

--instance-id (文字列)

IBM Cloudのユニークな識別子 Event Notificationsのインスタンス。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--name NAME (文字列)

APIソースに指定する名前。 必須。

デフォルト値は です。 最大文字数は 255 文字です。 最小文字数は 1 文字です。 値は正規表現 /[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/ と一致しなければなりません。

--description (文字列)

APIソースの説明。

デフォルト値は「」です。最大長は 255 文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/と一致する必要があります。

--enabled (ブール値)

ソースを有効または無効にします。 必須。 ソースを有効にするには、 true に設定してください。

--store-notifications (ブール値)

通知を保存する。 トラブルシューティングのために受信イベントのペイロードを確認できるよう、通知を保存するには「 true 」に設定してください。

例

ibmcloud event-notifications source-create \
   --instance-id=exampleString \
   --name=exampleString \
   --description=exampleString \
   --enabled=true \
   --store-notifications=false

ibmcloud event-notifications source-update

ソースIDを使用して、ソースパラメータを更新します。 また、ソースが設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications source-update --instance-id INSTANCE-ID --id ID [--name NAME] [--description DESCRIPTION] [--enabled ENABLED] [--store-notifications STORE-NOTIFICATIONS]

コマンド・オプション

--instance-id (文字列)

IBM Cloudのユニークな識別子 Event Notificationsのインスタンス。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

ソースの一意の識別子。 必須。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

--name (文字列)

APIソースの更新後の名称。

デフォルト値は です。 最大文字数は 255 文字です。 最小文字数は 1 文字です。 値は正規表現 /[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/ と一致しなければなりません。

--description (文字列)

APIソースの更新された説明。

デフォルト値は「」です。最大長は 255 文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/と一致する必要があります。

--enabled (ブール値)

ソースを有効または無効にします。

値は、ソースを有効にする場合はtrueに、無効にする場合はfalseに設定します。

--store-notifications (ブール値)

通知を保存する。 トラブルシューティングのために、受信イベントのペイロードを確認することができます。

デフォルト値は falseです。

例

ibmcloud event-notifications source-update \
   --instance-id=exampleString \
   --id=exampleString \
   --name=exampleString \
   --description=exampleString \
   --enabled=true \
   --store-notifications=false

ibmcloud event-notifications sources

指定されたインスタンス内のすべてのソースを一覧表示します。

ibmcloud event-notifications sources --instance-id INSTANCE-ID [--limit LIMIT] [--offset OFFSET] [--search SEARCH] [--all-pages]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ制限。

最大値は 100 です。 最小値は 1です。

--offset (int64)

ページ番号付き結果のオフセット。

最小値は 0 です。

--search (文字列)

結果をフィルタリングするための検索ストリング。

最大長は100文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

ソースコレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications sources \
  --instance-id=exampleString \
  --limit=10 \
  --offset=0 \
  --search=exampleString

ibmcloud event-notifications source

特定のソースの詳細を取得します。

ibmcloud event-notifications source --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

ソースの固有識別子。 必須。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

例

ibmcloud event-notifications source \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications source-delete

ソースを削除します。

ibmcloud event-notifications source-delete  --instance-id INSTANCE-ID --id ID

コマンド・オプション

--id (文字列)

ソースの固有の識別子。 必須。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

--instance-id (文字列)

IBM Cloudのユニークな識別子 Event Notificationsのインスタンス。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--force

確認のプロンプトをスキップし、リソースの削除を強制します。

例

ibmcloud event-notifications source-delete \
  --instance-id=exampleString \
  --id=exampleString

宛先

IBM Cloud (日本語) Event Notifications (英語)に翻訳する。

ibmcloud event-notifications destination-create

通知の配信先となる宛先を作成します。 送信先は、人間のユーザーまたは自動化されたサービスに通知を配信するように設定できます。

ibmcloud event-notifications destination-create --instance-id INSTANCE-ID --name NAME --type TYPE [--description DESCRIPTION] [--collect-failed-events COLLECT-FAILED-EVENTS] [--config CONFIG] [--certificate CERTIFICATE] [--certificate-content-type CERTIFICATE-CONTENT-TYPE] [--icon16x16 ICON16X16] [--icon16x16-content-type ICON16X16-CONTENT-TYPE] [--icon16x162x ICON16X162X] [--icon16x162x-content-type ICON16X162X-CONTENT-TYPE] [--icon32x32 ICON32X32] [--icon32x32-content-type ICON32X32-CONTENT-TYPE] [--icon32x322x ICON32X322X] [--icon32x322x-content-type ICON32X322X-CONTENT-TYPE] [--icon128x128 ICON128X128] [--icon128x128-content-type ICON128X128-CONTENT-TYPE] [--icon128x1282x ICON128X1282X] [--icon128x1282x-content-type ICON128X1282X-CONTENT-TYPE]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--name (文字列)

宛先の名前。 必須。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--type (文字列)

宛先の型。 人間ユーザー向けの宛先: smtp_ibm、 sms_ibm、 smtp_custom、 sms_custom、 event_streams、 msteams、 pagerduty、 push_android、 push_chrome、 push_firefox、 push_huawei、 push_ios、 push_safari、 servicenow、 slack。サービス向けの宛先: ibmce、 ibmcos、 webhook。必須。

最小文字数は 1 文字です。

--description (文字列)

宛先の説明です。

デフォルト値は です。 最大文字数は 255 文字です。 最小文字数は 0 文字です。 値は正規表現 /[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/ と一致しなければなりません。

--collect-failed-events (ブール値)

true に設定すると、 Cloud Object Storage バケットに失敗したイベントが収集されます。 失敗したイベントを収集するには、このインスタンスで「 Cloud Object Storage 」連携を有効にしてください。 デフォルト値はfalseです。

--config (例 DestinationConfig )

宛先の設定。 --config を指定せずに宛先を作成した場合、宛先は作成されますが、設定を行うまでは機能しません。

--certificate (文字列)

APNs または iOS のプッシュ送信先用の証明書ファイルのパス。 p8 および p12 の証明書ファイルに対応しています。

--certificate-content-type (文字列)

iOS 宛先の証明書のコンテンツタイプ。 有効な値は、 p8 および p12 です。

--icon16x16 (文字列)

Safariアイコンのファイルパスは 16x16 です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon16x16-content-type (文字列)

Safariアイコンのコンテンツタイプ 16x16。

--icon16x162x (文字列)

Safariアイコンのファイルパスは 16x16@2x です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon16x162x-content-type (文字列)

Safariアイコンのコンテンツタイプ 16x16@2x。

--icon32x32 (文字列)

Safariアイコンのファイルパスは 32x32 です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon32x32-content-type (文字列)

Safariアイコンのコンテンツタイプ 32x32。

--icon32x322x (文字列)

Safariアイコンのファイルパスは 32x32@2x です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon32x322x-content-type (文字列)

Safariアイコンのコンテンツタイプ 32x32@2x。

--icon128x128 (文字列)

Safariアイコンのファイルパスは 128x128 です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon128x128-content-type (文字列)

Safariアイコンのコンテンツタイプ 128x128。

--icon128x1282x (文字列)

Safariアイコンのファイルパスは 128x128@2x です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon128x1282x-content-type (文字列)

Safariアイコンのコンテンツタイプ 128x128@2x。

Cloud Functions この宛先は、もはやサポートされていません。

例

ibmcloud event-notifications destination-create \
  --instance-id=exampleString \
  --name=exampleString \
  --type=webhook \
  --description=exampleString \
  --collect-failed-events=false \
  --config='{"params": {"domain": "exampleString", "dkim": {"public_key": "exampleString", "selector": "exampleString", "verification": "exampleString"}, "spf": {"txt_name": "exampleString", "txt_value": "exampleString", "verification": "exampleString"}}}' \
  --certificate=tempdir/test-file.txt \
  --certificate-content-type=exampleString \
  --icon16x16=tempdir/test-file.txt \
  --icon16x16-content-type=exampleString \
  --icon16x162x=tempdir/test-file.txt \
  --icon16x162x-content-type=exampleString \
  --icon32x32=tempdir/test-file.txt \
  --icon32x32-content-type=exampleString \
  --icon32x322x=tempdir/test-file.txt \
  --icon32x322x-content-type=exampleString \
  --icon128x128=tempdir/test-file.txt \
  --icon128x128-content-type=exampleString \
  --icon128x1282x=tempdir/test-file.txt \
  --icon128x1282x-content-type=exampleString
  • 以下の例は、 P8 証明書を使用した iOS 宛先(push_ios)向けの DestinationConfig オブジェクトの形式を示しています。 pre_prod のブーリアンパラメータをtrueに設定すると、デスティネーションをプレプロダクション用に構成できます。それ以外の場合は、値をfalse に設定します

    {
       "params" : {
          "cert_type" : "p8",
          "is_sandbox" : true,
          "key_id": "production",
          "team_id": "1234",
          "bundle_id": "test1",
          "pre_prod" : "true" // Set to true in case of configuring Destination as pre-prod Destination (pre_prod destination can only be configured for Standard plan)
       }
    }
    
  • 以下の例は、 P12 証明書を使用した iOS 宛先(push_ios)に対する DestinationConfig オブジェクトのフォーマットを示しています。 pre_prod のブーリアンパラメータをtrueに設定すると、デスティネーションをプレプロダクション用に構成できます。それ以外の場合は、値をfalse に設定します。

    {
       "params" : {
          "cert_type" : "p12",
          "is_sandbox" : true,
          "password": "apnspasswordvalue",
          "pre_prod" : "true" true // Set to true in case of configuring Destination as pre-prod Destination (pre_prod destination can only be configured for Standard plan)
       }
    }
    
  • 以下の例は、Chrome 宛先(push_chrome)用の DestinationConfig オブジェクトの形式を示しています。 pre_prod のブーリアンパラメータをtrueに設定すると、デスティネーションをプレプロダクション用に構成できます。それ以外の場合は、値をfalse に設定します。

    {
       "params" : {
          "api_key": "chromeapikey",
          "website_url" : "https://testwebsite.com",
          "pre_prod" : "true" true // Set to true in case of configuring Destination as pre-prod Destination (pre_prod destination can only be configured for Standard plan)
       }
    }
    
  • 以下の例は、 Firefox の宛先(push_firefox)に対する DestinationConfig オブジェクトの形式を示しています。 pre_prod のブーリアンパラメータをtrueに設定すると、デスティネーションをプレプロダクション用に構成できます。それ以外の場合は、値をfalse に設定します。

    {
       "params" : {
          "website_url" : "https://testwebsite.com",
          "pre_prod" : "true" // Set to true in case of configuring Destination as pre-prod Destination (pre_prod destination can only be configured for Standard plan)
       }
    }
    
  • 次の例は、Slackの宛先(slack)で、タイプがincoming_webhookの DestinationConfig オブジェクトのフォーマットを示しています。

    {
       "params" : {
          "type" : "incoming_webhook",
          "url" : "https://hooks.slack.com/services/G0gyhsush/TYodsjhs/GHTbfidsimkk"
       }
    }
    
  • 次の例は、Slack宛先(slack)の DestinationConfig オブジェクトのフォーマットで、タイプがdirect_messageの場合を示しています。

    {
       "params" : {
          "type" : "direct_message",
          "token" : "vhdwvecwefwefewivcweivcwiwiciwcvwicwec"
       }
    }
    
  • 以下の例は、Safari 宛先(push_safari)用の DestinationConfig オブジェクトの形式を示しています。 pre_prod のブーリアンパラメータをtrueに設定すると、デスティネーションをプレプロダクション用に構成できます。それ以外の場合は、値をfalse に設定します。

    {
       "params": {
          "cert_type":"p12",
          "certificate_name":"Users/Testuser/Documents/safari.p12",
          "password":"safarinew",
          "url_format_string":"https://test.com",
          "website_name":"testwebsite",
          "website_push_id":"test",
          "website_url":"https://test.com",
          "pre_prod" : "true" // Set to true in case of configuring Destination as pre-prod Destination (pre_prod destination can only be configured for Standard plan)
       }
    }
    
  • 以下の例は、MS Teams(msteams)を宛先とする DestinationConfig オブジェクトの形式を示しています。

    {
       "params" : {
          "url" : "https://xyz.webhook.office.com"
       }
    }
    
  • 以下の例は、 PagerDuty(pagerduty ) 宛先に対する DestinationConfig オブジェクトの形式を示しています。

    デスティネーションを作成する際は、Routingキーのみを使用することを推奨する。 APIキーは非推奨であり、今後使用することはできません。

    {
       "params" : {
          "routing_key" : "routingkeytoconnecttoPD",
          "api_key" : "cffunctionnamespaceserviceidapikey"
       }
    }
    
  • 以下の例は、Webhook(webhook)における DestinationConfig オブジェクトの形式を示しています。

    {
       "params" : {
          "url" : "exampleString",
          "verb" : "get",
          "custom_headers" : { },
          "sensitive_headers" : [ "exampleString" ]
       }
    }
    
  • 以下の例は、Android(push_android)宛先における DestinationConfig オブジェクトの形式を示しています。

    {
       "params" : {
          "project_id" : "6232305230320",
          "private_key" : "36e21epfweort823or8rt832pr8p2r832pr82pr382r8f",
          "client_email" : "testuser.123@gmail.com",
          "pre_prod" : true // Set to true in case of configuring Destination as pre-prod Destination (pre_prod destination can only be configured for Standard plan)
       }
    }
    
  • 次の例は、 ServiceNow(servicenow ) を宛先とする DestinationConfig オブジェクトの形式を示しています。

    {
       "params" : {
          "client_id" : "359705ceddd100eyfewyyw1f0f9e1c96",
          "client_secret": "testsecrets",
          "username": "testuser",
          "password": "user_password",
          "instance_name": "testinstancenje"
       }
    }
    
  • 以下の例は、 Code Engine (ibmce)宛ての DestinationConfig オブジェクトの形式を示しています。

    コードエンジン宛先タイプ:アプリケーション

    {
       "params" : {
          "type" : "application",
          "url" : "https://codeengine.test.com",
          "verb" : "get",
          "custom_headers" : { },
          "sensitive_headers" : [ "exampleString" ]
       }
    }
    

    コードエンジン宛先タイプ:ジョブ

    {
       "params" : {
          "type" : "job",
          "job_name" : "custom-job",
          "project_crn" : "crn:v1:bluemix:public:codeengine:us-south:a/e7e5820aeccb40efb78fd69a7858ef23:xxxxxxxxxxxxxx::"
       }
    }
    
  • 次の例は、 IBM Cloud Object Storage (ibmcos)宛先に対する DestinationConfig オブジェクトの形式を示しています。

    {
       "params" : {
          "bucket_name" : "cos-destination-en-bucket",
          "instance_id" : "42e13636e-0548-41a0-a178-e95be28464773",
          "endpoint" : "https://s3.us-west.cloud-object-storage.appdomain.cloud"
       }
    }
    
  • 以下の例は、Huawei(push_huawei)宛先の DestinationConfig オブジェクトのフォーマットを示しています。

    {
       "params" : {
          "client_id" : "359705ceddd100eyfew",
          "client_secret": "testsecrets",
          "pre_prod" : true // Set to true in case of configuring Destination as pre-prod Destination (pre_prod destination can only be configured for Standard plan)
       }
    }
    
  • 以下の例は、カスタムメール(smtp_custom)宛先用の DestinationConfig オブジェクトの形式を示しています。 カスタムメールサンドボックス(smtp_custom_sandbox)の宛先の場合、宛先設定パラメータは必要ありません。

    カスタムドメインの設定と確認を行う手順: https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-destinations-custom-email#en-destinations-custom-email-verify

    {
       "params" : {
          "domain": "mailx.com"
       }
    }
    
  • 以下の例は、 Event Streams (event_streams)宛先における DestinationConfig オブジェクトの形式を示しています。

    {
       "params" : {
          "crn": "crn:v1:bluemix:public:messagehub:us-south:a/9f007405a9fe4a5d9345fa8c13357373:a292db6e-af78-4c0b-b3db-7d6794b637g::",
          "endpoint": "https://n6627w6t7dgeh2cfgd.svc09.us-south.eventstreams.cloud.ibm.com",
          "topic": "demo_topic"
       }
    }
    
  • 次の例は、 App Configuration (app_configuration)宛先における DestinationConfig オブジェクトの形式を示しています。

    {
       "params" : {
          "type": "features",
          "crn": "crn:v1:bluemix:public:apprapp:us-south:a/4a74f2c31f554afc88156b73a1d577c6:dbxxxx93-0xxa-4xx5-axcf-c2faxxxd::",
          "environment_id": "stage",
          "feature_id": "test"
       }
    }
    

    DestinationConfig を使用せずにカスタム SMS 送信先を作成することは可能ですが、必要な個人用番号を明示的にリクエストして設定するまでは機能しません。 パーソナライズされた番号を申請するには、「 カスタムSMSのパーソナライズされた番号 」をご覧ください。

ibmcloud event-notifications destinations

Event Notifications インスタンスのすべての宛先を一覧表示します。

ibmcloud event-notifications destinations --instance-id INSTANCE-ID [--limit LIMIT] [--offset OFFSET] [--search SEARCH] [--all-pages]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ制限。

最大値は 100 です。 最小値は 1です。

--offset (int64)

ページ番号付き結果のオフセット。

最小値は 0 です。

--search (文字列)

結果をフィルタリングするための検索ストリング。

最大長は100文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

宛先コレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications destinations \
  --instance-id=exampleString \
  --limit=10 \
  --offset=0 \
  --search=exampleString

ibmcloud event-notifications destination

ID を使用して、目的地の詳細を取得します。

ibmcloud event-notifications destination --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

宛先の固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

例

ibmcloud event-notifications destination \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications destination-update

宛先 ID を使用して、宛先パラメータを更新します。

ibmcloud event-notifications destination-update --instance-id INSTANCE-ID --id ID [--name NAME] [--description DESCRIPTION] [--collect-failed-events COLLECT-FAILED-EVENTS] [--config CONFIG] [--certificate CERTIFICATE] [--certificate-content-type CERTIFICATE-CONTENT-TYPE] [--icon16x16 ICON16X16] [--icon16x16-content-type ICON16X16-CONTENT-TYPE] [--icon16x162x ICON16X162X] [--icon16x162x-content-type ICON16X162X-CONTENT-TYPE] [--icon32x32 ICON32X32] [--icon32x32-content-type ICON32X32-CONTENT-TYPE] [--icon32x322x ICON32X322X] [--icon32x322x-content-type ICON32X322X-CONTENT-TYPE] [--icon128x128 ICON128X128] [--icon128x128-content-type ICON128X128-CONTENT-TYPE] [--icon128x1282x ICON128X1282X] [--icon128x1282x-content-type ICON128X1282X-CONTENT-TYPE]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

宛先の固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--name (文字列)

宛先の更新後の名称。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--description (文字列)

目的地に関する最新の情報。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--collect-failed-events (ブール値)

true に設定すると、 Cloud Object Storage バケットに失敗したイベントが収集されます。 デフォルト値はfalseです。

--config (DestinationConfig)

宛先に関する更新後の設定。

JSON文字列オプションを提供するか、または @ で始まるファイルパスオプションを指定して、読み込むJSONファイルを指定します。例えば、 --config=@path/to/file.json。

--certificate (文字列)

APNs または iOS のプッシュ送信先用の証明書ファイルのパス。 p8 および p12 の証明書ファイルに対応しています。

最大長は5000文字です。 最小文字数は 1 文字です。

--certificate-content-type (文字列)

iOS 宛先の証明書のコンテンツタイプ。 有効な値は、 p8 および p12 です。

--icon16x16 (文字列)

Safariアイコンのファイルパスは 16x16 です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon16x16-content-type (文字列)

Safariアイコンのコンテンツタイプ 16x16。

--icon16x162x (文字列)

Safariアイコンのファイルパスは 16x16@2x です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon16x162x-content-type (文字列)

Safariアイコンのコンテンツタイプ 16x16@2x。

--icon32x32 (文字列)

Safariアイコンのファイルパスは 32x32 です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon32x32-content-type (文字列)

Safariアイコンのコンテンツタイプ 32x32。

--icon32x322x (文字列)

Safariアイコンのファイルパスは 32x32@2x です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon32x322x-content-type (文字列)

Safariアイコンのコンテンツタイプ 32x32@2x。

--icon128x128 (文字列)

Safariアイコンのファイルパスは 128x128 です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon128x128-content-type (文字列)

Safariアイコンのコンテンツタイプ 128x128。

--icon128x1282x (文字列)

Safariアイコンのファイルパスは 128x128@2x です。 push_safari の目的地について。

最大長は5000文字です。 最小文字数は 1 文字です。

--icon128x1282x-content-type (文字列)

Safariアイコンのコンテンツタイプ 128x128@2x。

例

ibmcloud event-notifications destination-update \
  --instance-id=exampleString \
  --id=exampleString \
  --name=exampleString \
  --description=exampleString \
  --collect-failed-events=false \
  --config='{"params": {"domain": "exampleString", "dkim": {"public_key": "exampleString", "selector": "exampleString", "verification": "exampleString"}, "spf": {"txt_name": "exampleString", "txt_value": "exampleString", "verification": "exampleString"}}}' \
  --certificate=tempdir/test-file.txt \
  --certificate-content-type=exampleString \
  --icon16x16=tempdir/test-file.txt \
  --icon16x16-content-type=exampleString \
  --icon16x162x=tempdir/test-file.txt \
  --icon16x162x-content-type=exampleString \
  --icon32x32=tempdir/test-file.txt \
  --icon32x32-content-type=exampleString \
  --icon32x322x=tempdir/test-file.txt \
  --icon32x322x-content-type=exampleString \
  --icon128x128=tempdir/test-file.txt \
  --icon128x128-content-type=exampleString \
  --icon128x1282x=tempdir/test-file.txt \
  --icon128x1282x-content-type=exampleString

ibmcloud event-notifications destination-delete

ID を使用して宛先を削除します。 また、宛先が設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications destination-delete --instance-id INSTANCE-ID --id ID [--force]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

宛先の固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--force (ブール値)

コマンドを強制的に実行する。

例

ibmcloud event-notifications destination-delete \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications enabled-countries

SMSの送信先IDを使用して、その国が対応している詳細情報を取得します。 また、宛先が設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications enabled-countries --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMSの送信先を識別するための一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

例

ibmcloud event-notifications enabled-countries \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications test-destination

ID を使用して、宛先設定をテストします。 また、宛先が設定されている Event Notifications インスタンスのIDも指定する必要があります。 対応している宛先のリストについては、「 宛先のテスト 」を参照してください。

ibmcloud event-notifications test-destination --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

宛先の固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

例

ibmcloud event-notifications test-destination \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications sandbox-destination-update

サンドボックスのメール送信先を、カスタムドメインを使用して本番環境にアップグレードします。

ibmcloud event-notifications sandbox-destination-update --instance-id INSTANCE-ID --id ID --domain DOMAIN

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

宛先の固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--domain (文字列)

メールのドメイン。 必須。

最大長は250文字です。 最小文字数は 1 文字です。 値は正規表現/.*/と一致する必要があります。

例

ibmcloud event-notifications sandbox-destination-update \
    --instance-id=exampleString \
    --id=exampleString \
    --domain=exampleString

ibmcloud event-notifications verify-destination-update

カスタムドメインのSPFおよびDKIMレコードを確認します。

ibmcloud event-notifications verify-destination-update --instance-id INSTANCE-ID --id ID --type TYPE

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

宛先の固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--type (文字列)

カスタムドメインのメール送信先に対する検証タイプ。 有効な値は、 spf および dkim です。 必須。

最大長は20文字です。 最小文字数は 1 文字です。 値は正規表現/[a-z]/と一致する必要があります。

例

ibmcloud event-notifications verify-destination-update \
  --instance-id=exampleString \
  --id=exampleString \
  --type=exampleString

トピック

IBM Cloud Event Notifications トピックを操作します。

ibmcloud event-notifications topic-create

ソースからのイベントを受信し、サブスクライブされた宛先に通知を配信するためのトピックを作成します。 トピックは複数のソースに接続できます。 トピックを作成するには、 Event Notifications インスタンスのIDを指定する必要があります。

詳細については、「 トピックの作成 」を参照してください。

ibmcloud event-notifications topic-create --instance-id INSTANCE-ID --name NAME [--description DESCRIPTION] [--sources SOURCES]

コマンド・オプション

--instance-id INSTANCE-ID (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--name NAME (文字列)

トピックの名前。 必須。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/と一致する必要があります。

--description DESCRIPTION (文字列)

トピックの説明。

デフォルト値は「」です。最大長は 255 文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/と一致する必要があります。

--sources SOURCES (TopicCreateSourcesItem[])

トピックに関連付けるソースおよびフィルターの設定。 ソース設定の例 をご覧ください。

例

ibmcloud event-notifications topic-create \
  --instance-id=exampleString \
  --name=exampleString \
  --description=exampleString \
  --sources='[{"id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [{"enabled": true, "event_type_filter": "$.notification_event_info.event_type == \'cert_manager\'", "notification_filter": "$.notification.findings[0].severity == \'MODERATE\'"}]}]'
  • 次の例は、周期的タイマーソースの TopicCreateSourcesItem[] オブジェクトのフォーマットを示しています。

    [
       {
          "id" : "exampleString",
          "rules" : [
             {
                "enabled" : true,
                "event_schedule_filter": {
                   "starts_at": "2024-12-23T12:00:00.000Z",
                   "ends_at": "2024-12-23T20:00:00.000Z",
                   "expression": "* * * * *"
                }
             }
          ]
       }
    ]
    
  • 次の例は、 TopicCreateSourcesItem[] オブジェクトのフォーマットを示しています。

    [
       {
          "id" : "exampleString",
          "rules" : [
             {
                "enabled" : true,
                "event_type_filter" : "$.*",
                "notification_filter" : "exampleString"
             }
          ]
       }
    ]
    
  • 次の例は、 TopicUpdateSourcesItem[] オブジェクトのフォーマットを示しています。

    [
       {
          "id" : "exampleString",
          "rules" : [
             {
                "enabled" : true,
                "event_type_filter": "$.notification_event_info.event_type == \'cert_manager\'",
                "notification_filter" : "$.notification.findings[0].severity == \'MODERATE\'",
                "rule_id" : "exampleString"
             }
          ]
       }
    ]
    

ibmcloud event-notifications topics

Event Notifications インスタンスに対して作成されたすべてのトピックを一覧表示します。 インスタンスのIDを指定する必要があります。

ibmcloud event-notifications topics --instance-id INSTANCE-ID [--limit LIMIT] [--offset OFFSET] [--search SEARCH] [--all-pages]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ制限。

最大値は 100 です。 最小値は 1です。

--offset (int64)

ページ番号付き結果のオフセット。

最小値は 0 です。

--search (文字列)

結果をフィルタリングするための検索ストリング。

最大長は100文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

トピックコレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications topics \
  --instance-id=exampleString \
  --limit=10 \
  --offset=0 \
  --search=exampleString

ibmcloud event-notifications topic

トピックのIDを使用して、そのトピックの詳細を取得します。 また、そのトピックが設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications topic --instance-id INSTANCE-ID --id ID [--include INCLUDE]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

そのトピックの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--include (文字列)

サブトピックを含めてください。

デフォルト値は「」です。最大長は 20 文字です。 最小長は0文字です。 値は正規表現/[a-z]/と一致する必要があります。

例

ibmcloud event-notifications topic \
  --instance-id=exampleString \
  --id=exampleString \
  --include=exampleString

ibmcloud event-notifications topic-update

トピックのIDを使用して、その詳細情報を更新します。 また、そのトピックが設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications topic-update --instance-id INSTANCE-ID --id ID [--name NAME] [--description DESCRIPTION] [--sources SOURCES]

topic-replace は、 topic-update のエイリアスとして使用できます。 topic-replace コマンドは非推奨となっており、今後のリリースで削除される予定です。

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

そのトピックの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--name (文字列)

トピックの新しい名称。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/と一致する必要があります。

--description (文字列)

このトピックに関する最新の情報です。

デフォルト値は「」です。最大長は 255 文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*()]*/と一致する必要があります。

--sources (TopicUpdateSourcesItem[])

更新されたソースの詳細とフィルタです。 ソース設定の例 をご覧ください。

このオプションでは、新しいソースのみが追加されます。 そのトピックにすでに添付されているソースは、置き換えたり更新したりすることはできません。 ソースフィルターを変更するには、トピックからそのソースを削除し、新しいフィルター設定を適用して再度追加してください。

例

ibmcloud event-notifications topic-update \
  --instance-id=exampleString \
  --id=exampleString \
  --name=exampleString \
  --description=exampleString \
  --sources='[{"id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [{"enabled": true, "event_type_filter": "$.notification_event_info.event_type == \'cert_manager\'", "notification_filter": "$.notification.findings[0].severity == \'MODERATE\'"}]}]'

ibmcloud event-notifications topic-delete

ID を使ってトピックを削除します。 また、そのトピックが設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications topic-delete --instance-id INSTANCE-ID --id ID [--force]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

そのトピックの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--force (ブール値)

コマンドを強制的に実行する。

例

ibmcloud event-notifications topic-delete \
  --instance-id=exampleString \
  --id=exampleString

サブスクリプション

IBM Cloud Event Notifications 購読で操作します。

ibmcloud event-notifications subscription-create

イベント配信のために、宛先とトピックを関連付けるサブスクリプションを作成します。 宛先はトピックを購読することができ、複数の宛先が同じトピックを購読することも可能です。 サブスクリプションを作成するには、 Event Notifications インスタンスのIDを指定する必要があります。

ibmcloud event-notifications subscription-create --instance-id INSTANCE-ID --name NAME --destination-id DESTINATION-ID --topic-id TOPIC-ID [--description DESCRIPTION] [--attributes ATTRIBUTES]

コマンド・オプション

--name (文字列)

サブスクリプションの名前。 必須。

最大長は50文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--description (文字列)

サブスクリプションの説明。

デフォルト値は「」です。最大長は 255 文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--destination-id (文字列)

トピックにリンクするための宛先ID。 必須。

最大長は150文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--topic-id (文字列)

サブスクリプションのトピックID。 必須。

最大長は150文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--attributes (SubscriptionCreateAttributes)

サブスクリプションを作成するために必要な属性。 属性の例を 参照してください。

例

ibmcloud event-notifications subscription-create \
  --instance-id=exampleString \
  --name=exampleString \
  --destination-id=exampleString \
  --topic-id=exampleString \
  --description=exampleString \
  --attributes='{"invited": ["exampleString"]}'
  • 以下の例は、Webhook用の SubscriptionCreateAttributes オブジェクトの形式を示しています。
{
   "signing_enabled" : true,
   "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724axx58b13"
}
  • 以下の例は、SMS用の SubscriptionCreateAttributes オブジェクトのフォーマットを示しています。
{
   "invited" :["+1xxxxxxxxxx", "+1xxxxxxxxxx"]
}
  • 以下の例は、 IBM メール用の SubscriptionCreateAttributes オブジェクトのフォーマットを示しています。
{
   "invited" :["entest@gmail.com"],
   "add_notification_payload": true,
   "reply_to_mail": "en@ibm.com",
   "reply_to_name": "EYS ORG",
   "from_name":"ABC ORG"
}
  • 以下の例は、Slack 宛先タイプにおいて、incoming_webhook として設定された SubscriptionCreateAttributes オブジェクトの形式を示しています。
{
   "attachment_color" : "#FF0000",
   "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724axx58b13",
}
  • 以下の例は、Slack 送信先タイプが direct_message の場合の、 SubscriptionCreateAttributes オブジェクトの形式を示しています。
{
"channels" : [{ "id": "GHIUIFJHGGH"},{"id": "TSFDIDFOFNF"}],
"template_id_notification": "a59f6e38-7a48-xxxx-b665-3724axx58b13",
}
  • 以下の例は、 ServiceNow における SubscriptionCreateAttributes オブジェクトの形式を示しています。
{
   "assigned_to" : "serviceuser@gmail.com",
   "assignment_group" : "incidentgroup"
}
  • 以下の例は、カスタムメール用の SubscriptionCreateAttributes オブジェクトの形式を示しています。

    {
       "invited" :["entest@gmail.com"],
       "add_notification_payload": true,
       "reply_to_mail": "en@ibm.com",
       "reply_to_name": "EYS ORG",
    }
    
  • 次の例は、Custom Email Sandboxの SubscriptionCreateAttributes オブジェクトのフォーマットを示しています。

    {
       "invited" :["entest@gmail.com"],
       "add_notification_payload": true,
       "reply_to_mail": "en@ibm.com",
       "reply_to_name": "EYS ORG",
       "from_name":"ABC ORG",
       "from_email":"Testuser@mailx.com",
       "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13",
       "template_id_invitation": "f1ef32fb-b7dd-4405-xxxx-7b6719cee8aa"
    }
    
  • 以下の例は、Pagerduty/ Event Streams における SubscriptionCreateAttributes オブジェクトの形式を示しています。

    {
       "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13",
    }
    
  • 以下の例は、 App Configuration における SubscriptionCreateAttributes オブジェクトの形式を示しています。 デスティネーションのサブスクリプションを作成または更新するとき App Configuration デスティネーションのサブスクリプションを作成または更新するとき、 attributes オブジェクトには特定のルールがあります:

    • 次のいずれかを含める必要があります feature_flag_enabledまたはtemplate_id_notification
    • 両方のプロパティを同時に含めることはできません

    これにより、サブスクリプションが正しいユースケース( 機能フラグの評価か 通知テンプレートの作成のいずれか)に対して作成されることが保証されます。ただし、両方が同時に作成されることはありません。

    {
       "template_id_notification": "e40843c8-xxxx-4717-xxxx-f923f2786a34",
    }
    
    {
       "feature_flag_enabled": false,
    }
    

ibmcloud event-notifications subscriptions

Event Notifications インスタンスに対して設定されているすべてのサブスクリプションを一覧表示します。 インスタンスのIDを指定する必要があります。

ibmcloud event-notifications subscriptions --instance-id INSTANCE-ID [--offset OFFSET] [--limit LIMIT] [--search SEARCH] [--all-pages]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--offset (int64)

ページ番号付き結果のオフセット。

最小値は 0 です。

--limit (int64)

ページ番号付き結果のページ制限。

最大値は 100 です。 最小値は 1です。

--search (文字列)

結果をフィルタリングするための検索ストリング。

最大長は100文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

サブスクリプション・コレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications subscriptions \
  --instance-id=exampleString \
  --offset=0 \
  --limit=10 \
  --search=exampleString

ibmcloud event-notifications subscription

サブスクリプションのIDを使用して、その詳細情報を取得します。 サブスクリプションが設定されている Event Notifications インスタンスのIDを指定する必要があります。

ibmcloud event-notifications subscription --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

サブスクリプションの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

例

ibmcloud event-notifications subscription \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications subscription-delete

ID を使用してサブスクリプションを削除します。 サブスクリプションが設定されている Event Notifications インスタンスのIDを指定する必要があります。

ibmcloud event-notifications subscription-delete --instance-id INSTANCE-ID --id ID [--force]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

サブスクリプションの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--force (ブール値)

コマンドを強制的に実行する。

例

ibmcloud event-notifications subscription-delete \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications subscription-update

サブスクリプションのIDを使用して、そのパラメータを更新します。 サブスクリプションが設定されている Event Notifications インスタンスのIDを指定する必要があります。

ibmcloud event-notifications subscription-update --instance-id INSTANCE-ID --id ID [--name NAME] [--description DESCRIPTION] [--attributes ATTRIBUTES]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

サブスクリプションの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--name (文字列)

サブスクリプションの更新後の名称。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

--description (文字列)

サブスクリプションに関する説明の更新内容。

デフォルト値は「」です。最大長は 100 文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

--attributes (SubscriptionUpdateAttributes)

更新された属性。 属性の例を 参照してください。

例

ibmcloud event-notifications subscription-update \
  --instance-id=exampleString \
  --id=exampleString \
  --name=exampleString \
  --description=exampleString \
  --attributes='{"invited": {"add": ["exampleString"], "remove": ["exampleString"]}, "subscribed": {"remove": ["exampleString"]}, "unsubscribed": {"remove": ["exampleString"]}}'
  • 以下の例は、Webhook用の SubscriptionUpdateAttributes オブジェクトの形式を示しています。

    {
       "signing_enabled": true
    }
    
  • 以下の例は、 IBM のSMSにおける SubscriptionUpdateAttributes オブジェクトの形式を示しています。

    {
       "invited": {
          "add": ["+8xxxxxxxxxx"],
          "remove": ["+1xxxxxxxxxx", "+91xxxxxxxxxx"]
       },
       "subscribed": {
          "remove": ["+1xxxxxxxxxx", "+91xxxxxxxxxx"]
       },
       "unsubscribed": {
          "remove": ["+1xxxxxxxxxx", "+91xxxxxxxxxx"]
       }
    }
    
  • 以下の例は、 IBM メール用の SubscriptionUpdateAttributes オブジェクトのフォーマットを示しています。

    {
       "invited": {
          "add": ["example1@gmail.com"],
          "remove": []
       },
       "subscribed": {
          "remove": ["example2@gmail.com"]
       },
       "unsubscribed": {
          "remove": ["example3@gmail.com"]
       },
       "reply_to_mail": "example@ibm.com",
       "reply_to_name": "USA news",
       "from_name": "IBM",
       "add_notification_payload": true
    }
    
  • 以下の例は、カスタムメール用の SubscriptionUpdateAttributes オブジェクトの形式を示しています。

    {
       "invited": {
          "add": ["example1@gmail.com"],
          "remove": []
       },
       "subscribed": {
          "remove": ["example2@gmail.com"]
       },
       "unsubscribed": {
          "remove": ["example3@gmail.com"]
       },
       "reply_to_mail": "example@ibm.com",
       "reply_to_name": "USA news",
       "from_name": "IBM",
       "from_email": "test@email.com",
       "add_notification_payload": true,
       "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13",
       "template_id_invitation": "f1ef32fb-b7dd-4405-xxxx-7b6719cee8aa"
    }
    
  • 次の例は、Custom Email Sandboxの SubscriptionUpdateAttributes オブジェクトのフォーマットを示しています。

    {
       "invited": {
          "add": ["example1@gmail.com"],
          "remove": []
       },
       "subscribed": {
          "remove": ["example2@gmail.com"]
       },
       "unsubscribed": {
          "remove": ["example3@gmail.com"]
       },
       "reply_to_mail": "example@ibm.com",
       "reply_to_name": "USA news",
       "add_notification_payload": true,
       "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13",
       "template_id_invitation": "f1ef32fb-b7dd-4405-xxxx-7b6719cee8aa"
    }
    
  • 次の例は、Slack用の SubscriptionUpdateAttributes オブジェクトのタイプが incoming_webhook の場合のフォーマットを示しています。

    {
       "attachment_color" : "#FF0000",
       "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724axx58b13",
    }
    
  • 次の例は、Slack用の SubscriptionUpdateAttributes オブジェクトのタイプが direct_message の場合のフォーマットを示しています。

    {
       "channels": [{"id": "D01CFDTYBH", "operation": "add"}, {"id": "D01GHUTYBH", "operation": "remove"}],
       "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724axx58b13",
    }
    
  • 以下の例は、Service Now用の SubscriptionUpdateAttributes オブジェクトのフォーマットを示しています。

    {
       "assigned_to" : "serviceuser@gmail.com",
       "assignment_group" : "incidentgroup"
    }
    
    • 以下の例は、Pagerduty/ Event Streams における SubscriptionUpdateAttributes オブジェクトの形式を示しています。
    {
       "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724axx58b13",
    }
    
    • 以下の例は、 App Configuration における SubscriptionCreateAttributes オブジェクトの形式を示しています。 デスティネーションのサブスクリプションを作成または更新するとき App Configuration デスティネーションのサブスクリプションを作成または更新するとき、 attributes オブジェクトには特定のルールがあります:

      • 次のいずれかを含める必要があります feature_flag_enabledまたはtemplate_id_notification
      • 両方のプロパティを同時に含めることはできません

      これにより、サブスクリプションが正しいユースケース( 機能フラグの評価か 通知テンプレートの作成のいずれか)に対して作成されることが保証されます。ただし、両方が同時に作成されることはありません。

    {
       "template_id_notification": "e40843c8-xxxx-4717-xxxx-f923f2786a34",
    }
    
    {
       "feature_flag_enabled": false,
    }
    

統合

IBM Cloud Event Notifications 統合で操作します。

ibmcloud event-notifications integration-create

Event Notifications と IBM Cloud Object Storage を連携させる統合を作成します。

ibmcloud event-notifications integration-create --instance-id INSTANCE-ID --type TYPE --metadata METADATA

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--type (文字列)

統合の種類。 サポートされている型は collect_failed_events です。 必須。

最大長は50文字です。 最小長は1文字です。 許容される値は collect_failed_events である。

--metadata (文字列)

統合を作成するために必要な統合メタデータ。 書式設定の参考には、 例 をご覧ください。 必須。

例

ibmcloud event-notifications integration-create \
  --instance-id=exampleString \
  --type=collect_failed_events \
  --metadata='{"endpoint": "exampleString", "crn": "exampleString", "bucket_name": "exampleString"}'

次の例は、 IntegrationCreateAttributes オブジェクトのフォーマットを示しています。

{
   "endpoint": "https://s3.us-west.cloud-object-storage.appdomain.cloud",
   "crn": "crn:v1:bluemix:public:cloud-object-storage:global:xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx::",
   "bucket_name": "cloud-object-storage"
}

ibmcloud event-notifications integration-update

ID を使用して、既存の連携を更新します。 また、統合が設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications integration-update --instance-id INSTANCE-ID --id ID --type TYPE --metadata METADATA

現時点では、 integration-replace を使用して連携機能を更新することも可能です。 ただし、 integration-replace コマンドは非推奨となっており、今後のリリースで削除される予定です。

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--type (文字列)

統合タイプ。 有効な値は、 kms、 hs-crypto、および collect_failed_events です。 必須。

最大長は50文字です。 最小長は1文字です。

--metadata (文字列)

統合を更新するために必要な統合メタデータ。 書式設定の参考には、 例 をご覧ください。 必須。

--id (文字列)

統合の固有識別子。 必須。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

例

ibmcloud event-notifications integration-update \
  --instance-id=exampleString \
  --id=exampleString \
  --type=exampleString \
  --metadata='{"endpoint": "exampleString", "crn": "exampleString", "root_key_id": "exampleString", "bucket_name": "exampleString"}'

以下の例は、 Key Protect における IntegrationReplaceAttributes オブジェクトの形式を示しています。

{
   "endpoint" : "https://qa.us-south.kms.cloud.ibm.com",
   "crn" : "crn of key protect",
   "root_key_id" : "root key id"
}

ibmcloud event-notifications integrations

Event Notifications インスタンスに対して作成された連携を一覧表示します。

ibmcloud event-notifications integrations --instance-id INSTANCE-ID [--offset OFFSET] [--limit LIMIT] [--search SEARCH] [--all-pages]

コマンド・オプション

--instance-id (文字列)

IBM CloudのインスタンスEvent Notificationsの固有の識別子。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ限界。

最大値は 100 です。 最小値は 1です。

--offset (int64)

ページ番号付き結果のオフセット。

最小値は 0 です。

--search (文字列)

フィルタリング結果の検索文字列。

最大長は100文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

統合コレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications integrations \
  --instance-id=exampleString \
  --offset=0 \
  --limit=10 \
  --search=exampleString

ibmcloud event-notifications integration

ID を使用して、連携の詳細を取得します。 また、統合が設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications integration --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

統合の固有識別子。 必須。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

例

ibmcloud event-notifications integration \
  --instance-id=exampleString \
  --id=exampleString

テンプレート

IBM Cloud Event Notifications テンプレート。

ibmcloud event-notifications template-create

招待状や通知用のテンプレートを作成してください。 また、テンプレートを設定する Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications template-create --instance-id INSTANCE-ID --name NAME --type TYPE --params PARAMS [--description DESCRIPTION]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は256文字です。 最小長は10文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--name (文字列)

テンプレートの名前。 必須。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--type (文字列)

テンプレートの種類。 サポートされているタイプは、 smtp_custom.invitation、 smtp_custom.notification、 webhook.notification、 slack.notification、 pagerduty.notification、および event_streams.notification です。 必須。

最大長は24文字です。 最小長は22文字です。 値は正規表現/^(smtp_custom.notification|smtp_custom.invitation)$/と一致する必要があります。

--params (TemplateConfig)

通知のテンプレートパラメータ。 必須。 テンプレートのパラメータを 参照してください。

このJSONオプションは、個々のフィールドを他のオプションで設定することで提供することもできます。 それらのオプションとは相互に排他的です。

JSON文字列オプションを提供するか、または @ で始まるファイルパスオプションを指定して、読み込むJSONファイルを指定します。例えば、 --params=@path/to/file.json。

--description (文字列)

テンプレートの説明。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--params-body (文字列)

テンプレート本文。 このオプションは、JSONオプション「params」のサブフィールドに値を提供します。 そのオプションとは両立しません。

最大長は20000文字です。 最小文字数は 1 文字です。 値は正規表現/.*/と一致する必要があります。

--params-subject (文字列)

テンプレートの件名。 このオプションは、JSONオプション「params」のサブフィールドに値を提供します。 そのオプションとは両立しません。

最大長は1000文字です。 最小文字数は 1 文字です。 値は正規表現/.*/と一致する必要があります。

例

  • 以下の例は、メール用の TemplateConfig オブジェクトの形式を示しています。 サポートされているタイプは、 smtp_custom.notification および smtp_custom.invitation です。
ibmcloud event-notifications template-create \
  --instance-id=exampleString \
  --name=exampleString \
  --type=exampleString \
  --params='{"body": "exampleString", "subject": "exampleString"}' \
  --description=exampleString
  • 以下の例は、Slack用の TemplateConfig オブジェクトの形式を示しています。 サポートされているタイプは slack.notification です。
ibmcloud event-notifications template-create \
    --instance-id exampleString \
    --name exampleString \
    --type slack.notification \
    --params '{"body": "ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0="}' \
    --description exampleString
  • 以下の例は、Webhook用の TemplateConfig オブジェクトの形式を示しています。 サポートされているタイプは、 webhook.notification
ibmcloud event-notifications template-create \
    --instance-id exampleString \
    --name exampleString \
    --type webhook.notification \
    --params '{"body": "ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0="}' \
    --description exampleString
  • 以下の例は、Pagerduty用の TemplateConfig オブジェクトの形式を示しています。 サポートされているタイプは、 pagerduty.notification
ibmcloud event-notifications template-create \
    --instance-id exampleString \
    --name exampleString \
    --type pagerduty.notification \
    --params '{"body": "ewogICJwYXlsb2FkIjogewogICAgInN1bW1hcnkiOiAie3sgZGF0YS5hbGVydF9kZWZpbml0aW9uLm5hbWV9fSIsCiAgICAidGltZXN0YW1wIjogInt7dGltZX19IiwKICAgICJzZXZlcml0eSI6ICJpbmZvIiwKICAgICJzb3VyY2UiOiAie3sgc291cmNlIH19IgogIH0sCiAgImRlZHVwX2tleSI6ICJ7eyBpZCB9fSIsCiAge3sjZXF1YWwgZGF0YS5zdGF0dXMgInRyaWdnZXJlZCJ9fQogICJldmVudF9hY3Rpb24iOiAidHJpZ2dlciIKICAge3svZXF1YWx9fQoKICB7eyNlcXVhbCBkYXRhLnN0YXR1cyAicmVzb2x2ZWQifX0KICAiZXZlbnRfYWN0aW9uIjogInJlc29sdmUiCiAge3svZXF1YWx9fQoKICAge3sjZXF1YWwgZGF0YS5zdGF0dXMgImFja25vd2xlZGdlZCJ9fQogICAiZXZlbnRfYWN0aW9uIjogImFja25vd2xlZGdlIgogICB7ey9lcXVhbH19Cn0="}' \
    --description exampleString
  • 以下の例は、 Event Streams の TemplateConfig オブジェクトの形式を示しています。 サポートされているタイプは、 event_streams.notification
ibmcloud event-notifications template-create \
    --instance-id exampleString \
    --name exampleString \
    --type event_streams.notification \
    --params '{"body": "eyJuYW1lIjoie3tkYXRhLm5hbWV9fSIifQ=="}' \
    --description exampleString
  • 次の例は、 Code Engine ジョブの TemplateConfig オブジェクトのフォーマットを示している。 サポートされているタイプは、 ibmcejob.notification
ibmcloud event-notifications template-create \
    --instance-id exampleString \
    --name exampleString \
    --type ibmcejob.notification\
    --params '{"body": "ewogInJ1bl9lbnZfdmFyaWFibGVzIjogWwogICB7ICJuYW1lIjogInJlZ2lvbiIsICJ2YWx1ZSI6ICJ7e2RhdGEucmVnaW9ufX0iLCJ0eXBlIjogImxpdGVyYWwifSwKeyJuYW1lIjoiVkFSMSIsInR5cGUiOiJsaXRlcmFsIiwidmFsdWUiOiJ7e2RhdGEudmFyMX19In0sCnsibmFtZSI6IlZBUjIiLCJ0eXBlIjoibGl0ZXJhbCIsInZhbHVlIjoie3tkYXRhLnZhcjJ9fSJ9Cl0KfQ=="}' \
    --description exampleString
  • 次の例は、 Code Engine アプリケーション/ファンクションの TemplateConfig オブジェクトのフォーマットを示しています。 サポートされているタイプは、 ibmceapp.notification
ibmcloud event-notifications template-create \
    --instance-id exampleString \
    --name exampleString \
    --type ibmceapp.notification\
    --params '{"body": "ewogICJ2YXIxIjogInt7ZGF0YS52YXIxfX0iLAogICJ2YXIyIjogInt7ZGF0YS52YXIyfX0iCn0="}' \
    --description exampleString
  • 以下の例は、 App Configuration における TemplateConfig オブジェクトの形式を示しています。 サポートされているタイプは、 app_configuration.notification
ibmcloud event-notifications template-create \
    --instance-id exampleString \
    --name exampleString \
    --type app_configuration.notification\
    --params '{"body": "eyJlbmFibGVkIjogZmFsc2V9Cg=="}' \
    --description exampleString

ibmcloud event-notifications templates

Event Notifications インスタンス用に作成されたすべてのユーザー定義テンプレートを一覧表示します。 インスタンスのIDを指定する必要があります。

--all-pages オプションを設定しない場合、このコマンドはコレクションから1ページ分のみを取得します。

ibmcloud event-notifications templates --instance-id INSTANCE-ID [--limit LIMIT] [--offset OFFSET] [--search SEARCH]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は256文字です。 最小長は10文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ制限。

デフォルト値は 10です。 最大値は 100 です。 最小値は 1 です。

--offset (int64)

ページ番号付き結果のオフセット。

デフォルト値は 0です。 最小値は 0です。

--search (文字列)

結果をフィルタリングするための検索ストリング。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

テンプレートコレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications templates \
  --instance-id=exampleString \
  --limit=10 \
  --offset=0 \
  --search=exampleString

ibmcloud event-notifications template

テンプレートのIDを使用して、その詳細を取得します。 また、テンプレートが設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications template --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--id (文字列)

テンプレートの固有識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

例

ibmcloud event-notifications template \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications template-update

Event Notifications インスタンスの下に作成された既存のテンプレートの詳細を更新します。

ibmcloud event-notifications template-update --instance-id INSTANCE-ID --id ID [--name NAME] [--description DESCRIPTION] [--params PARAMS]

template-replace の代わりに template-update を使用できます。 現在、両方のコマンドがサポートされていますが、 template-replace は今後のリリースで非推奨となる予定です。

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は256文字です。 最小長は10文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

テンプレートの固有識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--name (文字列)

更新されたテンプレート名。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--description (文字列)

更新されたテンプレートの説明。

最大長は255文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--params (TemplateConfig)

更新されたテンプレートのパラメータ。 テンプレートのパラメータを 参照してください。

このJSONオプションは、個々のフィールドを他のオプションで設定することで提供することもできます。 それらのオプションとは相互に排他的です。

JSON文字列オプションを提供するか、または @ で始まるファイルパスオプションを指定して、読み込むJSONファイルを指定します。例えば、 --params=@path/to/file.json。

例

ibmcloud event-notifications template-replace \
  --instance-id=exampleString \
  --id=exampleString \
  --name=exampleString \
  --description=exampleString \
  --params='{"body": "exampleString", "subject": "exampleString"}'

ibmcloud event-notifications template-delete

ID を使用してテンプレートを削除します。 また、テンプレートが設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications template-delete --instance-id INSTANCE-ID --id ID [--force]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は256文字です。 最小長は10文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

テンプレートの固有識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

-f, --force (ブール値)

コマンドを強制的に実行する。

例

ibmcloud event-notifications template-delete \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications pre-defined-templates

Event Notifications インスタンスの事前定義済みテンプレートを一覧表示します。

--all-pages オプションを設定しない場合、このコマンドはコレクションから1ページ分のみを取得します。

ibmcloud event-notifications pre-defined-templates --instance-id INSTANCE-ID [--source SOURCE] [--type TYPE] [--limit LIMIT] [--offset OFFSET] [--search SEARCH]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--source (文字列)

事前定義されたテンプレートのソースタイプ。 必須。

最大長は50文字です。 最小文字数は 1 文字です。 値は正規表現/.*/と一致する必要があります。

--type (文字列)

宛先に基づいて、事前定義されたテンプレートのテンプレートタイプ。 必須。

最大長は50文字です。 最小文字数は 1 文字です。 値は正規表現/.*/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ制限。

デフォルト値は 10です。 最大値は 100 です。 最小値は 1 です。

--offset (int64)

ページ番号付き結果のオフセット。

デフォルト値は 0です。 最小値は 0です。

--search (文字列)

結果をフィルタリングするための検索ストリング。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

事前定義済みテンプレートコレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications pre-defined-templates \
  --instance-id=exampleString \
  --source=exampleString \
  --type=exampleString \
  --limit=10 \
  --offset=0 \
  --search=exampleString

ibmcloud event-notifications pre-defined-template

ID を使用して、事前定義されたテンプレートの詳細を取得します。 また、事前定義されたテンプレートが設定されている Event Notifications インスタンスのIDも指定する必要があります。

ibmcloud event-notifications pre-defined-template --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)
IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。
--id (文字列)
事前定義されたテンプレートの固有の識別子。 必須。

例

ibmcloud event-notifications pre-defined-template \
  --instance-id=exampleString \
  --id=exampleString

SMTP構成

IBM Cloud Event Notifications SMTP 構成。

ibmcloud event-notifications smtp-configuration-create

メール配信用のSMTP設定を作成します。 詳細については、「 SMTPの設定 」を参照してください。

ibmcloud event-notifications smtp-configuration-create --instance-id INSTANCE-ID --name NAME --domain DOMAIN [--description DESCRIPTION]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--name (文字列)

SMTP設定の名前。 必須。

最大長は250文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--domain (文字列)

SMTP設定用のドメイン名。 必須。

最大長は512文字です。 最小文字数は 1 文字です。 値は正規表現/.*/と一致する必要があります。

--description (文字列)

SMTP設定の説明。

最大長は250文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

例

ibmcloud event-notifications smtp-configuration-create \
  --instance-id=exampleString \
  --name=exampleString \
  --domain=exampleString \
  --description=exampleString

ibmcloud event-notifications smtp-configurations

Event Notifications インスタンスのすべてのSMTP設定を一覧表示します。

--all-pages オプションを設定しない場合、このコマンドはコレクションから1ページ分のみを取得します。

ibmcloud event-notifications smtp-configurations --instance-id INSTANCE-ID [--limit LIMIT] [--offset OFFSET] [--search SEARCH] [--all-pages]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ制限。

デフォルト値は 10です。 最大値は 100 です。 最小値は 1 です。

--offset (int64)

ページ番号付き結果のオフセット。

デフォルト値は 0です。 最小値は 0です。

--search (文字列)

結果をフィルタリングするための検索ストリング。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

SMTP 構成コレクションのすべてのページを表示するには、複数のリクエストを実行してください。

例

ibmcloud event-notifications smtp-configurations \
  --instance-id=exampleString \
  --limit=10 \
  --offset=0 \
  --search=exampleString

ibmcloud event-notifications smtp-user-create

SMTP設定用のSMTPユーザーを作成します。 SMTP設定のIDと、 Event Notifications インスタンスのIDを指定する必要があります。

SMTPの認証情報は1回のみ表示されます。 これらは後で復元できないため、コピーして安全に保管してください。

ibmcloud event-notifications smtp-user-create --instance-id INSTANCE-ID --id ID [--description DESCRIPTION] [--username-to-clone USERNAME-TO-CLONE]

コマンド・オプション

--instance-id (文字列)

IBM Cloud Event Notifications インスタンスの一意の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP設定の固有の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--description (文字列)

SMTP ユーザーの説明。

最大長は250文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--username-to-clone (文字列)

クローンを作成するSMTPユーザーのユーザー名。

最大長は20文字です。 最小文字数は 1 文字です。 値は正規表現/^[a-z0-9]{18}\\d{2}$/と一致する必要があります。

例

ibmcloud event-notifications smtp-user-create \
  --instance-id=exampleString \
  --id=exampleString \
  --description=exampleString \
  --username-to-clone=exampleString

ibmcloud event-notifications smtp-users

特定のSMTP設定に属するすべてのSMTPユーザーを一覧表示します。

--all-pages オプションが設定されていない場合、このコマンドはコレクションから1ページ分のみを取得します。

ibmcloud event-notifications smtp-users --instance-id INSTANCE-ID --id ID [--limit LIMIT] [--offset OFFSET] [--search SEARCH]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ限界。

デフォルト値は 10です。 最大値は 100 です。 最小値は 1 です。

--offset (int64)

ページ番号付き結果のオフセット。

デフォルト値は 0です。 最小値は 0です。

--search (文字列)

フィルタリング結果の検索文字列。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--all-pages (ブール値)

smtp-users コレクションのすべてのページを表示するために、複数のリクエストを実行します。

例

ibmcloud event-notifications smtp-users \
  --instance-id=exampleString \
  --id=exampleString \
  --limit=10 \
  --offset=0 \
  --search=exampleString

ibmcloud event-notifications smtp-configuration

Event Notifications インスタンスのSMTP設定の詳細を取得します。

ibmcloud event-notifications smtp-configuration --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

例

ibmcloud event-notifications smtp-configuration \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications smtp-configuration-update

ID を使用して SMTP の設定を更新します。 また、SMTP 設定が行われている「 Event Notifications 」インスタンスの ID も指定する必要があります。

ibmcloud event-notifications smtp-configuration-update --instance-id INSTANCE-ID --id ID [--name NAME] [--description DESCRIPTION]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--name (文字列)

SMTP名。

最大長は250文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

--description (文字列)

SMTPの説明。

最大長は250文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

例

ibmcloud event-notifications smtp-configuration-update \
  --instance-id=exampleString \
  --id=exampleString \
  --name=exampleString \
  --description=exampleString

ibmcloud event-notifications smtp-configuration-delete

ID を使用して SMTP 設定を削除します。 また、SMTP 設定が行われている「 Event Notifications 」インスタンスの ID も指定する必要があります。

ibmcloud event-notifications smtp-configuration-delete --instance-id INSTANCE-ID --id ID [--force]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

例

ibmcloud event-notifications smtp-configuration-delete \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications smtp-user

ユーザーIDとSMTP設定IDを使用して、SMTPユーザーの詳細情報を取得します。

ibmcloud event-notifications smtp-user --instance-id INSTANCE-ID --id ID --user-id USER-ID

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--user-id (文字列)

UserID. 必須。

最大長は256文字です。 最小長は5文字です。 値は正規表現/.*/と一致する必要があります。

例

ibmcloud event-notifications smtp-user \
  --instance-id=exampleString \
  --id=exampleString \
  --user-id=exampleString

ibmcloud event-notifications smtp-user-update

ユーザーIDとSMTP設定IDを使用して、SMTPユーザーを更新します。

ibmcloud event-notifications smtp-user-update --instance-id INSTANCE-ID --id ID --user-id USER-ID [--description DESCRIPTION]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--user-id (文字列)

UserID. 必須。

最大長は256文字です。 最小長は5文字です。 値は正規表現/.*/と一致する必要があります。

--description (文字列)

SMTPユーザーの説明。

最大長は250文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z 0-9-_\/.?:'";,+=!#@$%^&*() ]*/と一致する必要があります。

例

ibmcloud event-notifications smtp-user-update \
  --instance-id=exampleString \
  --id=exampleString \
  --user-id=exampleString \
  --description=exampleString

ibmcloud event-notifications smtp-user-delete

ユーザー ID と SMTP 設定 ID を使用して、SMTP ユーザーを削除します。

ibmcloud event-notifications smtp-user-delete --instance-id INSTANCE-ID --id ID --user-id USER-ID [--force]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--user-id (文字列)

UserID. 必須。

最大長は256文字です。 最小長は5文字です。 値は正規表現/.*/と一致する必要があります。

例

ibmcloud event-notifications smtp-user-delete \
  --instance-id=exampleString \
  --id=exampleString \
  --user-id=exampleString

ibmcloud event-notifications smtp-allowed-ips

SMTP設定で許可されているすべてのIPアドレスを取得します。

ibmcloud event-notifications smtp-allowed-ips --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

例

ibmcloud event-notifications smtp-allowed-ips \
  --instance-id=exampleString \
  --id=exampleString

ibmcloud event-notifications smtp-allowed-ips-update

従来の許可リスト機能のサポートは非推奨となりました。 「許可リスト」機能が、「コンテキストに基づく制限」を通じて有効になりました。 詳細については、「 SMTPの設定 」を参照してください。

ibmcloud event-notifications verify-smtp-update

SPF、SKIM、および en_authorization に関する SMTP 設定ドメインを確認してください。

ibmcloud event-notifications verify-smtp-update --instance-id INSTANCE-ID --id ID --type TYPE

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--id (文字列)

SMTP用の一意の識別子。 必須。

最大長は32文字です。 最小長は32文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--type (文字列)

SMTP認証の種類。 有効な値は、 spf、 dkim、および en_authorization です。 必須。

最大長は20文字です。 最小文字数は 1 文字です。 値は正規表現/.*/と一致する必要があります。

例

ibmcloud event-notifications verify-smtp-update \
  --instance-id=exampleString \
  --id=exampleString \
  --type=exampleString

メトリック

ibmcloud event-notifications metrics

Event Notifications インスタンスのメトリクスを取得します。

ibmcloud event-notifications metrics --instance-id INSTANCE-ID --gte GTE --lte LTE [--smtp-config-id SMTP-CONFIG-ID] [--destination-type DESTINATION-TYPE] [--destination-id DESTINATION-ID] [--subscription-id SUBSCRIPTION-ID] [--source-id SOURCE-ID] [--email-to EMAIL-TO] [--notification-id NOTIFICATION-ID] [--subject SUBJECT]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--gte (文字列)

GTE(より大きい)、UTCでの開始タイムスタンプ。 必須。

最大長は28文字です。 最小文字数は 1 文字です。 値は正規表現/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/と一致する必要があります。

--lte (文字列)

LTE(less than equal)、UTCでのタイムスタンプの終了。 必須。

最大長は28文字です。 最小文字数は 1 文字です。 値は正規表現/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/と一致する必要があります。

--smtp-config-id (文字列)

SMTPの設定ID。 SMTP インターフェースの宛先に関するメトリクスを照会する際に必須です。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--destination-type (文字列)

メトリクスの取得が要求される宛先タイプ。 サポートされている値:smtp_custom。 カスタムメール送信先に関するメトリクスを照会する際に必須です。

使用できる値は、smtp_customです。

--destination-id (文字列)

宛先の固有の識別子。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--subscription-id (文字列)

サブスクリプションの固有の識別子。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--source-id (文字列)

ソースの固有の識別子。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

--email-to (文字列)

受信者のメールアドレス。

最大長は256文字です。 最小長は0文字です。 値は正規表現/[A-Za-z0-9\\._%+\\-]+@[A-Za-z0-9\\.\\-]+\\.[A-Za-z]{2,}/と一致する必要があります。

--notification-id (文字列)

通知ID。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--subject (文字列)

メールの件名。

最大長は256文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

例

ibmcloud event-notifications metrics \
  --instance-id=exampleString \
  --destination-type=smtp_custom \
  --gte=exampleString \
  --lte=exampleString \
  --destination-id=exampleString \
  --subscription-id=exampleString \
  --source-id=exampleString \
  --email-to=exampleString \
  --notification-id=exampleString \
  --subject=exampleString

ibmcloud event-notifications bounce-metrics

Event Notifications インスタンスのバウンス指標を取得します。

ibmcloud event-notifications bounce-metrics --instance-id INSTANCE-ID --gte GTE --lte LTE [--smtp-config-id SMTP-CONFIG-ID] [--destination-type DESTINATION-TYPE] [--destination-id DESTINATION-ID] [--subscription-id SUBSCRIPTION-ID] [--source-id SOURCE-ID] [--email-to EMAIL-TO] [--notification-id NOTIFICATION-ID] [--subject SUBJECT] [--limit LIMIT] [--offset OFFSET]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--gte (文字列)

UTC での開始タイムスタンプが、指定値以上(GTE)であること。 必須。

最大長は28文字です。 最小文字数は 1 文字です。 値は正規表現/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/と一致する必要があります。

--lte (文字列)

UTC での開始タイムスタンプが等しくない(LTE)。 必須。

最大長は28文字です。 最小文字数は 1 文字です。 値は正規表現/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/と一致する必要があります。

--smtp-config-id (文字列)

SMTPの設定ID。 SMTP インターフェースの宛先に関するメトリクスを照会する際に必須です。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--destination-type (文字列)

メトリクスの取得が要求される宛先タイプ。 サポートされている値:smtp_custom。 カスタムメール送信先に関するメトリクスを照会する際に必須です。

使用できる値は、smtp_customです。

--destination-id (文字列)

宛先の固有の識別子。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--subscription-id (文字列)

サブスクリプションの固有の識別子。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--source-id (文字列)

ソースの固有の識別子。

最大長は100文字です。 最小文字数は 1 文字です。 値は正規表現/[a-zA-Z0-9-:_]*/と一致する必要があります。

--email-to (文字列)

受信者のメールアドレス。

最大長は256文字です。 最小長は0文字です。 値は正規表現/[A-Za-z0-9\\._%+\\-]+@[A-Za-z0-9\\.\\-]+\\.[A-Za-z]{2,}/と一致する必要があります。

--notification-id (文字列)

通知ID。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--subject (文字列)

メールの件名。

最大長は256文字です。 最小長は0文字です。 値は正規表現/[a-zA-Z0-9]/と一致する必要があります。

--limit (int64)

ページ番号付き結果のページ限界。

デフォルト値は 10です。 最大値は 100 です。 最小値は 1 です。

--offset (int64)

ページ番号付き結果のオフセット。

デフォルト値は 0です。 最小値は 0です。

例

ibmcloud event-notifications bounce-metrics \
  --instance-id=exampleString \
  --destination-type=smtp_custom \
  --gte=exampleString \
  --lte=exampleString \
  --destination-id=exampleString \
  --subscription-id=exampleString \
  --source-id=exampleString \
  --email-to=exampleString \
  --notification-id=exampleString \
  --subject=exampleString \
  --limit=10 \
  --offset=0

通知ステータスの取得

ibmcloud event-notifications notifications-status

Webhook 送信先のテスト通知の通知ステータスを取得します。

ibmcloud event-notifications notifications-status --instance-id INSTANCE-ID --id ID

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

--id (文字列)

Webhookの送信先をテストした際に返される通知ID。 このIDは、Webhookの送信先へ送信されるテスト通知に固有のものです。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/と一致する必要があります。

例

ibmcloud event-notifications notifications-status \
  --instance-id=exampleString \
  --id=exampleString

通知の送信

API ソースを使用して、バックエンドアプリケーションからイベントを送信します。 Event Notifications は 2 つの CloudEvents コンテンツモードをサポートしています:

  • バイナリモード — イベントデータは HTTP のリクエストボディにそのまま格納され、 Content-Type ヘッダー内の datacontenttype 属性によってそのメディアタイプが指定されます。 その他のすべての属性は、 ce- というプレフィックスが付いた HTTP ヘッダーにマッピングされます。 必須の CloudEvents 属性(specversion、 id、 type、および source )がヘッダーとして渡された場合、リクエストはバイナリモードとして扱われます。
  • 構造化モード — イベントのメタデータとイベントデータは、 HTTP のリクエスト本文に格納されます。 Content-Type ヘッダーを application/cloudevents+json に設定します。 必須属性(specversion、 id、 type、および source )は、リクエスト本文に含まれている必要があります。 「 datacontenttype 」フィールドは必須であり、「 application/json 」に設定する必要があります。

ibmcloud event-notifications send-notifications

サービスのインスタンスから通知を送信します。 通知ペイロードの詳細については、 ドキュメントを 参照してください。

ibmcloud event-notifications send-notifications --instance-id INSTANCE-ID [--body BODY]

コマンド・オプション

--instance-id (文字列)

IBMクラウド・イベント通知インスタンスの固有の識別子。 必須。

最大長は36文字です。 最小長は36文字です。 値は正規表現/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/と一致する必要があります。

--body (NotificationCreate)

通知作成リクエストを説明するペイロード。

JSON文字列オプションを提供するか、または @ で始まるファイルパスオプションを指定して、読み込むJSONファイルを指定します。例えば、 --body=@path/to/file.json。

NotificationCreate

次の例は、 NotificationCreate オブジェクトの形式を示しています。

{
  "specversion" : "1.0",
  "time" : "2019-01-01T12:00:00.000Z",
  "id" : "exampleString",
  "source" : "exampleString",
  "type" : "exampleString",
  "ibmenseverity" : "exampleString",
  "ibmensourceid" : "exampleString",
  "ibmendefaultshort" : "exampleString",
  "ibmendefaultlong" : "exampleString",
  "ibmensubject" : "exampleString",
  "ibmentemplates" : "[\"886f8f4c-8605-47hb-85a1-8682b9377468483\"]",
  "ibmenmailto" : "exampleString",
  "ibmenslackto": "[\"sgjhgsjaS\",\"agjhgsjaS\"]",
  "ibmensmsto" : "exampleString",
  "ibmenmms": {"content": "VBORw0KGgoAAAANSUhEUgAAAFoAAAA4CAYAAAB9lO","content_type": "image/png"},
  "ibmenmarkdownn": "This is a *italic* message.\n- Item 1\n- Item 2\n**bold text** with more text data\n~~strike through~~\n1. order 1\n2. order 2\n```fenced code block```\n> block code\n`code`\n[Click here](https://example.com) for more info."
    "ibmenhtmlbody" : "exampleString",
    "subject" : "exampleString",
   "attachments": [
    {
      "content": "VGhpcyBpcyBhIHRlc3QgZG9jdW1lbnQK",
      "filename": "test.txt",
      "content_type": "text/plain",
      "disposition": "attachment"
    }
    ],
    "data" : {
    "anyKey" : "anyValue"
    },
    "datacontenttype" : "application/json",
    "ibmenpushto" : "{
    \"fcm_devices\" : [ \"exampleString\" ],
    \"apns_devices\" : [ \"exampleString\" ],
    \"huawei_devices\" : [ \"exampleString\" ],
    \"safari_devices\" : [ \"exampleString\" ],
    \"chrome_devices\" : [ \"exampleString\" ],
    \"firefox_devices\" : [ \"exampleString\" ],
    \"user_ids\" : [ \"exampleString\" ],
    \"tags\" : [ \"exampleString\" ],
    \"platforms\" : [ \"push_android\" ]
    }",
    "ibmenfcmbody" : "{ }",
    "ibmenapnsbody" : "{ }",
    "ibmenapnsheaders" : "{ }",
    "ibmenchromebody" : "{ }",
    "ibmenchromeheaders" : "{ }",
    "ibmenfirefoxbody" : "{ }",
    "ibmenfirefoxheaders" : "{ }",
    "ibmenhuaweibody" : "{ }",
    "ibmensafaribody" : "{ }"
}

例

必要なパラメータを指定して:

ibmcloud event-notifications send-notifications \
    --instance-id=exampleString \
    --body='{"specversion": "1.0", "time": "2019-01-01T12:00:00.000Z", "type": "*", "id": "exampleString", "source": "exampleString", "ibmensourceid": "exampleString", "ibmendefaultshort": "short message", "ibmendefaultlong": "long message", "data": {"name": "exampleString"}, "datacontenttype": "application/json"}'

すべてのパラメータを含む場合:

ibmcloud event-notifications send-notifications \
    --instance-id=exampleString \
    --body='{"specversion": "1.0", "time": "2019-01-01T12:00:00.000Z", "id": "exampleString", "source": "exampleString", "type": "exampleString", "ibmenseverity": "exampleString", "ibmensourceid": "exampleString", "ibmendefaultshort": "exampleString", "ibmendefaultlong": "exampleString", "ibmensubject": "exampleString", "ibmentemplates": [\"template-id\"], "ibmenmailto": "exampleString","ibmenslackto": "[\"sgjhgsjaS\",\"agjhgsjaS\"]", "ibmensmsto": "exampleString","ibmenmms": "{\"content\": \"VBORw0KGgoAAAANSUhEUgAAAFoAAAA4CAYAAAB9lO\",\"content_type\": \"image/png\"}", "ibmenhtmlbody": "exampleString", "subject": "exampleString", "data": {"anyKey": "anyValue"}, "datacontenttype": "application/json", "ibmenpushto": "{\"fcm_devices\": [\"exampleString\"], \"apns_devices\": [\"exampleString\"], \"huawei_devices\": [\"exampleString\"], \"safari_devices\": [\"exampleString\"], \"chrome_devices\": [\"exampleString\"], \"firefox_devices\": [\"exampleString\"], \"user_ids\": [\"exampleString\"], \"tags\": [\"exampleString\"], \"platforms\": [\"push_android\"]}", "ibmenfcmbody": "{}", "ibmenapnsbody": "{}", "ibmenapnsheaders": "{}", "ibmenchromebody": "{}", "ibmenchromeheaders": "{}", "ibmenfirefoxbody": "{}", "ibmenfirefoxheaders": "{}", "ibmenhuaweibody": "{}", "ibmensafaribody": "{}"}'

IOS 通知用に構成できるその他のプロパティー

iOS
プロパティー (Property) プロパティー・タイプ 説明
badge 整数 アプリケーション・アイコンのバッジとして表示する番号。
interactive_category ストリング 対話式プッシュ通知に使用されるカテゴリー ID。
ios_action_key ストリング アクション・キーのタイトル。
payload JSON オブジェクト 通知メッセージの一部として送信されるカスタム JSON ペイロード。
sound ストリング アプリケーション・バンドル内の音声ファイルの名前。 このファイルの音声がアラートとして再生されます。
title_loc_key ストリング 現在利用されているローカリゼーションに対応する Localizable.strings ファイルに含まれるタイトル・ストリングに対するキー。 キー・ストリングは、titleLocArgs 配列で指定された変数を取り込むために、%@ および %n$@ の指定子を使用してフォーマット設定できます。
loc_key ストリング (ユーザーの言語設定によって指定された) 現在利用されているローカリゼーションに対応する Localizabl.strings ファイルに含まれるアラート・メッセージ・ストリングに対するキー。 キー・ストリングは、locArgs 配列で指定された変数を取り込むために、%@ および %n$@ の指定子を使用してフォーマット設定できます。
launch_image ストリング アプリバンドル内の画像ファイルのファイル名。ファイル名の拡張子の有無は問わない。 このイメージは、ユーザーがアクション・ボタンをタップした時、またはアクション・スライダーを移動した時に起動イメージとして使用されます。
title_loc_args ストリング title-loc-key 内のフォーマット指定子の代わりに表示される変数ストリング値。
loc_args ストリング locKey 内のフォーマット指定子の代わりに表示される変数ストリング値。
title ストリング リッチ・プッシュ通知のタイトル (iOS 10 以上のみでサポートされます)。
subtitle ストリング リッチ通知のサブタイトル (iOS 10 以上でのみサポートされます)。
body ストリング iOS 通知用の本文。
attachment_url ストリング iOS 通知メディアへのリンク (ビデオ、オーディオ、GIF、イメージ - iOS 10 以上のみでサポートされます)。
type ストリング 許容値: DEFAULT、MIXED、SILENT。
apns_collapse_id ストリング 同じ縮小 ID を持つ複数の通知は、1 つの通知としてユーザーに表示されます。
apns_thread_id ストリング 関連する通知をグループ化するためのアプリ特有の ID。 この値は、UNNotificationContent オブジェクトの threadIdentifier プロパティーに対応します。
apns_group_summary_arg ストリング 通知によってカテゴリーのサマリー・フォーマット・ストリングに追加されるストリング。
apns_group_summary_arg_count 整数 通知によってカテゴリーのサマリー・フォーマット・ストリングに追加される項目数。

FCM 通知用に構成できる追加のプロパティー

Androidプラットフォームの設定
プロパティー (Property) プロパティー・タイプ 説明
icon ストリング 通知に対して表示されるアイコンの名前を指定します。 このアイコンが既にクライアント・アプリケーションと共にパッケージされていることを確認してください。
delay_while_idle ブール値 true に設定した場合、このパラメーターは、デバイスがアクティブになるまでメッセージを送信しないことを示します。
sync ブール値 デバイス・グループ・メッセージングは、グループ内のすべてのアプリ・インスタンスが最新メッセージング状態を反映することを可能にします。
visibility ストリング 非公開または公開 - この通知の表示設定。これにより、セキュリティロック画面上で通知がどのように、いつ表示されるかが決まります。
redact ストリング 可視性が「非公開」に設定されている場合、指定されたコンテンツは、デバイス上のセキュア・ロック画面に表示されます。
payload JSON オブジェクト 通知メッセージの一部として送信されるカスタム JSON ペイロード。
priority ストリング この通知の優先順位を示すストリング値。 許容値は、「max」、「high」、「default」、「low」、「min」です。 「sound」フィールドが設定されていて、優先順位が High/Max の通知は、Android 5.0 または higher.sampleval='low' での注意喚起通知に使用できます。
sound ストリング 通知がデバイスに到着したときに再生が試行される (デバイス上の) 音声ファイル。
time_to_live 整数 デバイスがオフラインの場合に GCM ストレージにメッセージを保持する期間 (秒単位) を指定します。
lights プッシュ通知の受信時に通知 LED の色を設定します。
ledArgb ストリング LED の色。 ハードウェアはできる限りの近似を行います。
ledOnMs 整数 LED が明滅している間にオンになる時間 (ミリ秒)。 ハードウェアはできる限りの近似を行います。
ledOffMs ストリング LED が明滅している間にオフになる時間 (ミリ秒)。 ハードウェアはできる限りの近似を行います。
android_title ストリング リッチ・プッシュ通知のタイトル。
group_id ストリング この通知が、同じキーを共有する通知グループに属するように設定します。 グループ化された通知は、その種のレンダリングをサポートするデバイスのクラスターまたはスタックに表示できます。
style Android の展開可能な通知に指定するオプション。 展開可能な通知のタイプは、picture_notification、bigtext_notification、inbox_notification です。
type ストリング 展開可能な通知のタイプを指定します。 指定できる値は、bigtext_notification、picture_notification、inbox_notification です。
title ストリング 通知のタイトルを指定します。 タイトルは通知が展開されると表示されます。 タイトルは、展開可能な 3 つの通知のすべてで指定される必要があります。
type ストリング 許可される値: DEFAULT、SILENT。
alert ストリング 通知のアラート値。

サンプル・スクリプト

開発の助けとして、以下のスクリプトを利用できます。

CLI を使用した Event Notifications プロビジョニングのサンプル・スクリプト

スクリプトは provision_event_notification.sh スクリプトは、 Event Notifications インスタンスのプロビジョニングと設定を自動化します。

CLIを使用したプラットフォーム通知統合のサンプルスクリプト

この en-platform-notification-src-and-email-dest.sh スクリプトは Platform Notifications を Event Notifications と統合し、 IBM Inbuilt Email または Custom Domain Sandbox に通知をルーティングします。

CLI を使用した IBM Cloud Logs 統合用サンプル・スクリプト

スクリプトは en-icl-src-and-email-dest.sh スクリプトは IBM Cloud Logs を Event Notifications と統合し、通知を IBM 内蔵メールまたはカスタムドメインサンドボックスに送ります。

このスクリプトは、 IBM Cloud Logs インスタンスと Event Notifications インスタンスが同じアカウントあることを前提としている。