Method: subscriptions.patch

Google Workspace サブスクリプションを更新または更新します。このメソッドの使用方法については、Google Workspace サブスクリプションを更新または更新するをご覧ください。

Chat ターゲット リソースのサブスクリプションの場合、サブスクリプションは次のように更新できます。

HTTP リクエスト

PATCH https://workspaceevents.googleapis.com/v1beta/{subscription.name=subscriptions/*}

この URL は gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
subscription.name

string

ID。サブスクリプションのリソース名。

形式: subscriptions/{subscription}

クエリ パラメータ

パラメータ
updateMask

string (FieldMask format)

省略可。更新するフィールド。省略すると、リクエストに含まれるすべてのフィールドが更新されます。

サブスクリプションでは、次のいずれかのフィールドを更新できます。

  • expireTime: サブスクリプションの有効期限が切れるタイムスタンプ。
  • ttl: サブスクリプションの有効期間(TTL)。
  • eventTypes: ターゲット リソースに関するイベントタイプの一覧。

* ワイルドカード(PUT と同等)を使用すると、省略されたフィールドは空の値に設定され、無効な場合は拒否されます。

validateOnly

boolean

省略可。true に設定すると、リクエストが検証およびプレビューされますが、サブスクリプションは更新されません。

リクエストの本文

リクエストの本文には Subscription のインスタンスが含まれます。

レスポンスの本文

成功した場合、レスポンスの本文には Operation のインスタンスが含まれます。

  • metadata フィールドには空の配列が含まれます。
  • response フィールドには、更新された Subscription のインスタンスが含まれます。

認可スコープ

次の OAuth スコープのいずれかが必要です。

  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.app.spaces.readonly
  • https://www.googleapis.com/auth/meetings.space.created
  • https://www.googleapis.com/auth/meetings.space.readonly
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

詳細については、認可ガイドをご覧ください。