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 จะระบุ TTL เป็นวินาทีสําหรับช่องทางการแจ้งเตือน โดยค่าเริ่มต้นคือ 2 ชั่วโมง และ TTL สูงสุดคือ 2 วัน ออบเจ็กต์ที่มีรายการคู่ "key": value ตัวอย่าง: { "name": "wrench", "mass": "1.3kg", "count": "3" }
|
resourceId |
string
รหัสทึบแสงที่ระบุทรัพยากรที่กำลังรับชมในช่องนี้ ทำงานได้อย่างเสถียรใน API เวอร์ชันต่างๆ
|
resourceUri |
string
ตัวระบุเฉพาะเวอร์ชันสำหรับทรัพยากรที่ดู
|
kind |
string
ระบุว่านี่คือช่องทางการแจ้งเตือนที่ใช้เพื่อคอยดูการเปลี่ยนแปลงในทรัพยากร ซึ่งก็คือ api#channel
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-24 UTC
[null,null,["อัปเดตล่าสุด 2025-07-24 UTC"],[],[],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`. |"]]