Method: labels.revisions.permissions.create
مجوزهای یک برچسب را به روز می کند. اگر مجوزی برای اصل مشخص شده وجود نداشته باشد، یک مجوز برچسب جدید ایجاد می شود، در غیر این صورت مجوز موجود به روز می شود. مجوزها بر منبع Label به طور کلی تأثیر میگذارند، بازبینی نمیشوند و نیازی به انتشار ندارند.
درخواست HTTP
POST https://drivelabels.googleapis.com/v2/{parent=labels/*/revisions/*}/permissions
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
مولفه های |
---|
parent | string ضروری. نام منبع Label والد در مجوز Label ایجاد شده است. قالب: labels/{label} |
پارامترهای پرس و جو
مولفه های |
---|
useAdminAccess | boolean برای استفاده از اعتبارنامه مدیریت کاربر، روی true تنظیم کنید. سرور قبل از اجازه دسترسی، تأیید میکند که کاربر یک سرپرست برای Label است. |
درخواست بدن
بدنه درخواست شامل یک نمونه از LabelPermission
است.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی یک نمونه جدید از LabelPermission
است.
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/drive.labels
-
https://www.googleapis.com/auth/drive.admin.labels
برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["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"]]