การแจ้งเตือน
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คุณสามารถกำหนดค่าศูนย์แจ้งเตือนให้ส่งการแจ้งเตือนเมื่อมีการอัปเดตได้
หากต้องการกำหนดค่าศูนย์แจ้งเตือนให้ส่งการแจ้งเตือน คุณต้องกำหนดค่าการตั้งค่าด้วยการตั้งค่าการแจ้งเตือนที่ต้องการ
การแจ้งเตือน Google Cloud Pub/Sub
ศูนย์แจ้งเตือนจะเผยแพร่การแจ้งเตือนไปยังหัวข้อ Google Pub/Sub ได้
หลังจากสร้างหัวข้อและมอบalerts-api-push-notifications@system.gserviceaccount.com
สิทธิ์เผยแพร่ให้กับหัวข้อแล้ว ให้ใช้ update settings API ของศูนย์แจ้งเตือนเพื่อกำหนดหัวข้อนั้นให้เป็นปลายทางของการแจ้งเตือน เมื่อกําหนดค่าแล้ว ศูนย์การแจ้งเตือนจะเผยแพร่ข้อความไปยังหัวข้อนั้นสําหรับการอัปเดตแต่ละรายการ (เช่น เมื่อมีการแจ้งเตือนใหม่)
แอตทริบิวต์ข้อความ Pub/Sub
แอตทริบิวต์ทั่วไป
alertcenter_resource_type
- ประเภทของทรัพยากร ค่าที่รองรับในปัจจุบันคือ "ALERT"
alertcenter_resource_status
- สถานะของทรัพยากร ค่าที่รองรับในปัจจุบันคือ "CREATED", "DELETED", "UNDELETED", "MODIFIED"
alertcenter_payload_format
- รูปแบบของเพย์โหลด (ตามการตั้งค่าการแจ้งเตือน)
ค่าที่รองรับในปัจจุบันคือ "JSON"
แอตทริบิวต์การแจ้งเตือน
alertcenter_start_time
- เวลาที่กิจกรรมที่ทําให้การแจ้งเตือนนี้เริ่มต้นหรือตรวจพบ
alertcenter_end_time
- เวลาที่กิจกรรมที่ทําให้การแจ้งเตือนนี้หยุดทำงาน
alertcenter_type
- ประเภทการแจ้งเตือน ดูรายการประเภทการแจ้งเตือนที่ใช้ได้ได้ที่หัวข้อประเภทการแจ้งเตือนของ Google Workspace
alertcenter_source
- ตัวระบุที่ไม่ซ้ำกันสำหรับระบบที่รายงานการแจ้งเตือน
alertcenter_create_time
- เวลาที่สร้างการแจ้งเตือนนี้
alertcenter_update_time
- ครั้งล่าสุดที่มีการอัปเดตการแจ้งเตือนนี้
เพย์โหลดข้อความ
เพย์โหลดของข้อความขึ้นอยู่กับ alertcenter_resource_type
เมื่อประเภททรัพยากรคือ "ALERT"
เพย์โหลดจะเป็นหนึ่งในประเภทการแจ้งเตือนของศูนย์แจ้งเตือน
รูปแบบของเพย์โหลดจะขึ้นอยู่กับ alertcenter_payload_format
เมื่อรูปแบบเป็น "JSON"
เพย์โหลดจะเป็น JSON ที่เข้ารหัส Base64
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-03-25 UTC
[null,null,["อัปเดตล่าสุด 2025-03-25 UTC"],[],[],null,["# Notifications\n\nAlert Center can be configured to send notification upon updates.\nTo configure Alert Center to send notifications you need to configure your\nsettings with the desired notification settings.\n\nGoogle Cloud Pub/Sub notification\n---------------------------------\n\nAlert Center can publish notifications to a Google Pub/Sub topic.\nAfter creating a topic and granting `alerts-api-push-notifications@system.gserviceaccount.com`\npublish permission to it use the Alert Center [update settings API](/workspace/admin/alertcenter/reference/rest/v1beta1/TopLevel/updateSettings)\nto set that topic as a notification destination. Once configured, Alert Center\nwill publish a message to that topic for each update (e.g. when a new alert arrives).\n\n### Pub/Sub message attributes\n\n#### Common attributes\n\n- `alertcenter_resource_type` - The type of the resource. Currently supported value is `\"ALERT\"`.\n- `alertcenter_resource_status` - The status of the resource. Currently supported value is `\"CREATED\", \"DELETED\", \"UNDELETED\", \"MODIFIED\"`.\n- `alertcenter_payload_format` - The format of the payload (per notification settings). Currently supported value is `\"JSON\"`.\n\n#### Alert attributes\n\n- `alertcenter_start_time` - The time the event that caused this alert was started or detected.\n- `alertcenter_end_time` - The time the event that caused this alert ceased being active.\n- `alertcenter_type` - The type of the alert. For a list of available alert types see [Google Workspace Alert types](/workspace/admin/alertcenter/reference/alert-types).\n- `alertcenter_source` - A unique identifier for the system that reported the alert.\n- `alertcenter_create_time` - The time this alert was created.\n- `alertcenter_update_time` - The last time this alert was updated.\n\n### The message payload\n\nThe payload of the message depends on `alertcenter_resource_type`. When resource type is `\"ALERT\"`\nthe payload will be one of the Alert Center [alert types](/workspace/admin/alertcenter/reference/alert-types).\nThe format of the payload depends on `alertcenter_payload_format`. When the format is `\"JSON\"` the\npayload would be [base64-encoded](https://en.wikipedia.org/wiki/Base64)\n[JSON](https://en.wikipedia.org/wiki/JSON)."]]