Method: labels.revisions.permissions.create
עדכון הרשאות של תווית. אם לא קיימת הרשאה לחשבון המשתמש שצוין, נוצרת הרשאה חדשה לתווית, אחרת ההרשאה הקיימת מתעדכנת. ההרשאות משפיעות על המשאב 'תווית' בכללותו, הן לא משתנות ולא דורשות פרסום.
בקשת HTTP
POST https://drivelabels.googleapis.com/v2/{parent=labels/*/revisions/*}/permissions
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של gRPC.
פרמטרים של נתיב
פרמטרים |
parent |
string
חובה. נוצר שם משאב ההורה 'תווית' בהרשאה 'תווית'. פורמט: תוויות/{label}
|
פרמטרים של שאילתה
פרמטרים |
useAdminAccess |
boolean
כדי להשתמש בפרטי הכניסה של האדמין של המשתמש צריך להגדיר את הערך true . השרת יאמת שהמשתמש הוא מנהל המערכת של התווית לפני שיתיר גישה.
|
גוף הבקשה
גוף הבקשה מכיל מופע של LabelPermission
.
גוף התשובה
אם הפעולה בוצעה בהצלחה, גוף התגובה מכיל מופע חדש של LabelPermission
שנוצר.
היקפי הרשאות
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
למידע נוסף, עיינו במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-03 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-03 (שעון UTC)."],[[["This operation updates a Label's permissions, creating new permissions or updating existing ones for the specified principal."],["Permissions apply to the entire Label resource, are not version-controlled, and do not need publishing."],["The request requires specifying the parent Label resource name and can use admin credentials with `useAdminAccess`."],["A successful request returns the updated or newly created LabelPermission resource."],["Authorization requires specific OAuth scopes related to Drive Labels."]]],["This document outlines the process for updating a Label's permissions. It uses a `POST` request to the specified URL, including the parent Label's resource name within the path. The request requires a `LabelPermission` instance in the body. Optional `useAdminAccess` query parameter allows the use of admin credentials. Successful execution returns a newly created `LabelPermission` instance. Authorization mandates either the `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` OAuth scope.\n"]]