Acl: patch
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
更新存取權控管規則。這個方法支援 patch 語意。請注意,每個修補要求都會消耗三個配額單位;建議使用 get
後接 update
。您指定的欄位值會取代現有值。您在要求中未指定的欄位會維持不變。如果指定陣列欄位,系統會覆寫現有的陣列,並捨棄任何先前的陣列元素。立即試用。
要求
HTTP 要求
PATCH https://www.googleapis.com/calendar/v3/calendars/calendarId/acl/ruleId
參數
參數名稱 |
值 |
說明 |
路徑參數 |
calendarId |
string |
日曆 ID。如要擷取日曆 ID,請呼叫 calendarList.list 方法。如果您想存取目前登入使用者的主日曆,請使用「primary 」關鍵字。
|
ruleId |
string |
ACL 規則 ID。 |
選用查詢參數 |
sendNotifications |
boolean |
是否要傳送日曆共用變更通知。請注意,系統不會發出存取權移除通知。選用設定。預設值為 True。
|
授權
這項要求需要至少具備下列其中一個範圍的授權:
範圍 |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.acls |
詳情請參閱「驗證和授權」頁面。
要求主體
在要求主體中,根據修補語義規則提供 Acl 資源的相關部分。
回應
如果成功的話,這個方法會在回應內文中傳回 Acl 資源。
試試看!
您可以使用下方的 API Explorer,針對即時資料呼叫這個方法,然後查看回應。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],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."]]