Method: labels.revisions.permissions.create
लेबल की अनुमतियों को अपडेट करता है. अगर दिखाई गई मुख्य अनुमति के लिए कोई अनुमति मौजूद नहीं है, तो एक नया लेबल की अनुमति बनाई जाती है. ऐसा न होने पर, मौजूदा अनुमति अपडेट कर दी जाती है. अनुमतियों की मदद से, लेबल के रिसॉर्स पर पूरा असर पड़ता है. इनमें बदलाव नहीं किया जाता और न ही इन्हें पब्लिश करने की ज़रूरत होती है.
एचटीटीपी अनुरोध
POST https://drivelabels.googleapis.com/v2/{parent=labels/*/revisions/*}/permissions
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ के पैरामीटर
पैरामीटर |
parent |
string
ज़रूरी है. लेबल की अनुमति पर पैरंट लेबल का संसाधन नाम बनाया गया. फ़ॉर्मैट: labels/{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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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"]]