SubscriptionChannel
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
JSON 表示法 |
{
"id": string,
"token": string,
"expiration": string,
"type": string,
"address": string,
"payload": boolean,
"params": {
string: string,
...
},
"resourceId": string,
"resourceUri": string,
"kind": string
} |
欄位 |
id |
string
用於識別這個管道的 UUID 或類似的專屬字串。
|
token |
string
系統會將任意字串傳送至目標地址,並透過這個管道傳送每則通知。選填。
|
expiration |
string (int64 format)
通知管道到期日期和時間,以 Unix 時間戳記 (以毫秒為單位) 表示。選填。
|
type |
string
這個管道使用的放送機制類型。
|
address |
string
這個管道會將通知傳送至這個位址。
|
payload |
boolean
布林值,用於指出是否需要酬載。選填。
|
params |
map (key: string, value: string)
控制提交管道行為的其他參數。選用設定。舉例來說,params.ttl 會以秒為單位指定通知管道的存留時間,預設值為 2 小時,最大 TTL 為 2 天。 這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" } 。
|
resourceId |
string
這個不易解讀的 ID 可識別這個管道中正在監控的資源。在不同 API 版本中皆穩定運作。
|
resourceUri |
string
受監控資源的版本專屬 ID。
|
kind |
string
指出這是用於監控資源 (api#channel ) 變更的通知管道。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-24 (世界標準時間)。
[null,null,["上次更新時間:2025-07-24 (世界標準時間)。"],[],[],null,["# SubscriptionChannel\n\nAn notification channel used to watch for resource changes.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"token\": string, \"expiration\": string, \"type\": string, \"address\": string, \"payload\": boolean, \"params\": { string: string, ... }, \"resourceId\": string, \"resourceUri\": string, \"kind\": string } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` A UUID or similar unique string that identifies this channel. |\n| `token` | `string` An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |\n| `expiration` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |\n| `type` | `string` The type of delivery mechanism used for this channel. |\n| `address` | `string` The address where notifications are delivered for this channel. |\n| `payload` | `boolean` A Boolean value to indicate whether payload is wanted. Optional. |\n| `params` | `map (key: string, value: string)` Additional parameters controlling delivery channel behavior. Optional. For example, `params.ttl` specifies the time-to-live in seconds for the notification channel, where the default is 2 hours and the maximum TTL is 2 days. An object containing a list of `\"key\": value` pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`. |\n| `resourceId` | `string` An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |\n| `resourceUri` | `string` A version-specific identifier for the watched resource. |\n| `kind` | `string` Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`. |"]]