イベント プロバイダの一覧表示

Eventarc プロバイダは、Google Cloud に直接イベントを発行し、プロジェクトに転送できるサービスまたはエンティティです。

ファーストパーティ プロバイダは Google Cloud のソース(Cloud Storage など)です。サードパーティ プロバイダは、Eventarc ソースを提供する Google Cloud 以外のエンティティです。

すべてのプロバイダを一覧表示し、サポートされているイベントタイプなどの詳細を取得するには、必須およびオプションのフラグを指定して gcloud コマンドを実行します。

前提条件

gcloud コマンドを実行する前に、次のことを確認してください。

  1. Google Cloud プロジェクト ID を設定します。

    gcloud config set project PROJECT_ID
    

    PROJECT_ID は、実際の Google Cloud プロジェクト ID に置き換えます。

    プロジェクト ID は、Google Cloud コンソールの [ようこそ] ページで確認できます。

  2. Eventarc API を有効にします。

    gcloud services enable eventarc.googleapis.com
    

特定のロケーションのプロバイダを一覧表示する

特定のロケーションのプロバイダを一覧表示するには:

gcloud eventarc providers list \
    --location=LOCATION

LOCATION は、サポートされている Eventarc リージョンに置き換えます。

例: gcloud eventarc providers list --location=us-central1

出力は次のようになります。

NAME                       LOCATION
bigquery.googleapis.com    us-central1
cloudbuild.googleapis.com  us-central1
storage.googleapis.com     us-central1
workflows.googleapis.com   us-central1
[...]

すべてのロケーションのプロバイダを一覧表示する

すべてのロケーションのプロバイダを一覧表示するには:

gcloud eventarc providers list

出力は次のようになります。

NAME                       LOCATION
workflows.googleapis.com   asia-northeast3
pubsub.googleapis.com      europe-west3
storage.googleapis.com     nam4
bigquery.googleapis.com    us-central1
cloudbuild.googleapis.com  us-central1
storage.googleapis.com     us-central1
workflows.googleapis.com   us-central1
storage.googleapis.com     us-east1
[...]

任意のロケーションの特定のプロバイダを一覧表示する

任意のロケーションの特定のプロバイダを一覧表示するには:

gcloud eventarc providers list \
    --name=PROVIDER

PROVIDER は、プロバイダの名前に置き換えます。

次に例を示します。 gcloud eventarc providers list --name=storage.googleapis.com

出力は次のようになります。

NAME                    LOCATION
storage.googleapis.com  nam4
storage.googleapis.com  us-central1
storage.googleapis.com  us-east1

任意のロケーションのすべてのサードパーティ プロバイダを一覧表示する

任意のロケーションのサードパーティ プロバイダを一覧表示するには:

gcloud eventarc providers list --filter='eventTypes.type!~^google*'

すべてのサードパーティ プロバイダのリストが出力されます。

特定のプロバイダとサポートされるイベントタイプを確認する

特定のプロバイダとサポートされるイベントタイプを確認するには:

  gcloud eventarc providers describe PROVIDER \
      --location=LOCATION

次のように置き換えます。

  • PROVIDER: 特定のプロバイダの名前。
  • LOCATION: Eventarc でサポートされているリージョン

次に例を示します。gcloud eventarc providers describe storage.googleapis.com --location=us-central1

出力は次のようになります。

displayName: Cloud Storage
eventTypes:
- description: 'The live version of an object has become a noncurrent version, either
    because it was explicitly made noncurrent or because it was replaced by the upload
    of an object of the same name. Only sent when a bucket has enabled object versioning. '
  filteringAttributes:
  - attribute: bucket
    description: The bucket name being watched.
    required: true
  - attribute: type
    required: true
  type: google.cloud.storage.object.v1.archived
[...]

Eventarc トリガーの作成時に使用するイベントタイプをメモしておきます。