Method: labels.permissions.batchUpdate
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह लेबल की अनुमतियों को अपडेट करता है. अगर बताए गए प्रिंसिपल के लिए कोई अनुमति मौजूद नहीं है, तो लेबल से जुड़ी अनुमति बनाई जाती है. अगर अनुमति पहले से मौजूद है, तो उसे अपडेट किया जाता है. अनुमतियों का असर पूरे लेबल संसाधन पर पड़ता है. इन्हें बदला नहीं जा सकता और इन्हें पब्लिश करने की ज़रूरत नहीं होती.
एचटीटीपी अनुरोध
POST https://drivelabels.googleapis.com/v2/{parent=labels/*}/permissions:batchUpdate
यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
parent |
string
ज़रूरी है. पैरंट लेबल के संसाधन का नाम, जिसे अपडेट की जा रही सभी अनुमतियों के साथ शेयर किया गया है. फ़ॉर्मैट: labels/{label} . अगर यह फ़ील्ड सेट है, तो UpdateLabelPermissionRequest मैसेज में मौजूद पैरंट फ़ील्ड की वैल्यू खाली होनी चाहिए या इस फ़ील्ड से मेल खानी चाहिए.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में, इस स्ट्रक्चर का डेटा शामिल होता है:
JSON के काेड में दिखाना |
{
"requests": [
{
object (UpdateLabelPermissionRequest )
}
],
"useAdminAccess": boolean
} |
फ़ील्ड |
requests[] |
object (UpdateLabelPermissionRequest )
ज़रूरी है. अनुरोध का वह मैसेज जिसमें अपडेट किए जाने वाले संसाधनों के बारे में बताया गया हो.
|
useAdminAccess |
boolean
उपयोगकर्ता के एडमिन क्रेडेंशियल का इस्तेमाल करने के लिए, इसे true पर सेट करें. सर्वर, उपयोगकर्ता को ऐक्सेस देने से पहले यह पुष्टि करेगा कि वह लेबल का एडमिन है. अगर यह सेट है, तो UpdateLabelPermissionRequest मैसेज में मौजूद useAdminAccess फ़ील्ड या तो खाली होना चाहिए या इस फ़ील्ड से मेल खाना चाहिए.
|
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में BatchUpdateLabelPermissionsResponse
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के स्कोप
इसके लिए, इनमें से किसी एक 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 और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-05 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-05 (UTC) को अपडेट किया गया."],[],[],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 label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.\n\n### HTTP request\n\n`POST https://drivelabels.googleapis.com/v2/{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/v2/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)."]]