مجوزهای Label را به روز می کند. اگر مجوزی برای اصل مشخص شده وجود نداشته باشد، یک مجوز برچسب جدید ایجاد می شود، در غیر این صورت مجوز موجود به روز می شود. مجوزها بر منبع Label به طور کلی تأثیر میگذارند، بازبینی نمیشوند و نیازی به انتشار ندارند.
درخواست HTTP
POST https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/permissions:batchUpdate
مورد نیاز. نام منبع برچسب والد که با همه مجوزها به اشتراک گذاشته شده است در حال به روز رسانی است. قالب: labels/{label} اگر این تنظیم شده باشد، فیلد والد در پیامهای UpdateLabelPermissionRequest یا باید خالی باشد یا با این قسمت مطابقت داشته باشد.
مورد نیاز. پیام درخواستی که منابعی برای به روز رسانی را مشخص می کند.
useAdminAccess
boolean
برای استفاده از اعتبارنامه مدیریت کاربر، روی true تنظیم کنید. سرور قبل از اجازه دسترسی، تأیید میکند که کاربر یک سرپرست برای Label است. اگر این تنظیم شده باشد، فیلد useAdminAccess در پیامهای UpdateLabelPermissionRequest باید یا خالی باشد یا با این فیلد مطابقت داشته باشد.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Method: labels.permissions.batchUpdate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.\n\n### HTTP request\n\n`POST https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/permissions:batchUpdate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------|\n| ``` { \"requests\": [ { object (`UpdateLabelPermissionRequest`) } ], \"useAdminAccess\": boolean } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (``UpdateLabelPermissionRequest``)` Required. The request message specifying the resources to update. |\n| `useAdminAccess` | `boolean` Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access. If this is set, the useAdminAccess field in the UpdateLabelPermissionRequest messages must either be empty or match this field. |\n\n### Response body\n\nIf successful, the response body contains an instance of [BatchUpdateLabelPermissionsResponse](/workspace/drive/labels/reference/rest/v2beta/BatchUpdateLabelPermissionsResponse).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive.labels`\n- `\n https://www.googleapis.com/auth/drive.admin.labels`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]