Acl: patch
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
อัปเดตกฎการควบคุมการเข้าถึง วิธีนี้รองรับความหมายของแพตช์ โปรดทราบว่าคําขอแพตช์แต่ละรายการจะใช้โควต้า 3 หน่วย เราขอแนะนำให้ใช้ get
ตามด้วย update
ค่าในช่องที่คุณระบุจะแทนที่ค่าที่มีอยู่ ช่องที่คุณไม่ได้ระบุในคำขอจะไม่มีการเปลี่ยนแปลง ช่องอาร์เรย์ (หากระบุ) จะเขียนทับอาร์เรย์ที่มีอยู่ ซึ่งจะเป็นการทิ้งองค์ประกอบอาร์เรย์ก่อนหน้า
ลองใช้เลย
ส่งคำขอ
คำขอ HTTP
PATCH https://www.googleapis.com/calendar/v3/calendars/calendarId/acl/ruleId
พารามิเตอร์
ชื่อพารามิเตอร์ |
ค่า |
คำอธิบาย |
พารามิเตอร์เส้นทาง |
calendarId |
string |
ตัวระบุปฏิทิน หากต้องการเรียกข้อมูลรหัสปฏิทิน ให้เรียกใช้เมธอด calendarList.list หากต้องการเข้าถึงปฏิทินหลักของผู้ใช้ที่เข้าสู่ระบบอยู่ในปัจจุบัน ให้ใช้คีย์เวิร์ด "primary "
|
ruleId |
string |
ตัวระบุกฎ ACL
|
พารามิเตอร์การค้นหาที่ไม่บังคับ |
sendNotifications |
boolean |
ตัวเลือกว่าจะส่งการแจ้งเตือนเกี่ยวกับการเปลี่ยนแปลงการแชร์ปฏิทินหรือไม่ โปรดทราบว่าไม่มีการแจ้งเตือนเกี่ยวกับการนำสิทธิ์เข้าถึงออก ไม่บังคับ ค่าเริ่มต้นคือ True
|
การให้สิทธิ์
คำขอนี้ต้องมีการให้สิทธิ์ด้วยขอบเขตต่อไปนี้อย่างน้อย 1 รายการ
ขอบเขต |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.acls |
ดูข้อมูลเพิ่มเติมได้ที่หน้าการตรวจสอบสิทธิ์และการให้สิทธิ์
เนื้อหาของคำขอ
ในเนื้อหาของคำขอ ให้ระบุส่วนที่เกี่ยวข้องของทรัพยากร Acl ตามกฎของความหมายของแพตช์
คำตอบ
หากดำเนินการสำเร็จ วิธีการนี้จะแสดงผล Acl resource ในเนื้อหาการตอบกลับ
ลองใช้งาน
ใช้โปรแกรมสำรวจ API ด้านล่างเพื่อเรียกใช้เมธอดนี้กับข้อมูลจริงและดูการตอบกลับ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# Acl: patch\n\n| **Note:** Requires [authorization](#auth).\n\nUpdates an access control rule. This method supports patch semantics. Note that each patch request consumes three quota units; prefer using a `get` followed by an `update`. The field values you specify replace the existing values. Fields that you don't specify in the request remain unchanged. Array fields, if specified, overwrite the existing arrays; this discards any previous array elements.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nPATCH https://www.googleapis.com/calendar/v3/calendars/calendarId/acl/ruleId\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|---------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `calendarId` | `string` | Calendar identifier. To retrieve calendar IDs call the [calendarList.list](/workspace/calendar/api/v3/reference/calendarList/list) method. If you want to access the primary calendar of the currently logged in user, use the \"`primary`\" keyword. |\n| `ruleId` | `string` | ACL rule identifier. |\n| **Optional query parameters** |||\n| `sendNotifications` | `boolean` | Whether to send notifications about the calendar sharing change. Note that there are no notifications on access removal. Optional. The default is True. |\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes:\n\n| Scope |\n|-------------------------------------------------|\n| `https://www.googleapis.com/auth/calendar` |\n| `https://www.googleapis.com/auth/calendar.acls` |\n\nFor more information, see the [authentication and authorization](/workspace/guides/configure-oauth-consent) page.\n\n### Request body\n\nIn the request body, supply the relevant portions of an [Acl resource](/workspace/calendar/api/v3/reference/acl#resource), according to the rules of patch semantics.\n\nResponse\n--------\n\nIf successful, this method returns an [Acl resource](/workspace/calendar/api/v3/reference/acl#resource) in the response body.\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]