Method: labels.disable
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
पब्लिश किए गए लेबल को बंद करें. ज़्यादा जानकारी के लिए, किसी लेबल को बंद करने, चालू करने, और मिटाने का तरीका जानें.
किसी लेबल को बंद करने पर, पब्लिश किया गया नया वर्शन बंद हो जाएगा. यह वर्शन, पब्लिश किए गए मौजूदा वर्शन पर आधारित होगा. अगर ड्राफ़्ट में कोई बदलाव किया गया है, तो ड्राफ़्ट में किए गए सबसे हालिया बदलाव के आधार पर, बदलाव किए गए ड्राफ़्ट का नया वर्शन बनाया जाएगा. हालांकि, यह वर्शन बंद रहेगा. ड्राफ़्ट में किए गए पुराने बदलाव मिटा दिए जाएंगे.
लेबल को बंद करने के बाद, labels.delete
का इस्तेमाल करके उसे मिटाया जा सकता है.
एचटीटीपी अनुरोध
POST https://drivelabels.googleapis.com/v2/{name=labels/*}:disable
यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
name |
string
ज़रूरी है. लेबल के संसाधन का नाम.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में, इस स्ट्रक्चर का डेटा शामिल होता है:
JSON के काेड में दिखाना |
{
"updateMask": string,
"useAdminAccess": boolean,
"writeControl": {
object (WriteControl )
},
"disabledPolicy": {
object (DisabledPolicy )
},
"languageCode": string
} |
फ़ील्ड |
updateMask |
string (FieldMask format)
वे फ़ील्ड जिन्हें अपडेट किया जाना चाहिए. कम से कम एक फ़ील्ड के बारे में बताना ज़रूरी है. रूट disabledPolicy का मतलब है कि इसे तय नहीं किया जाना चाहिए. हर फ़ील्ड को अपडेट करने के लिए, एक * का इस्तेमाल शॉर्ट-हैंड के तौर पर किया जा सकता है.
|
useAdminAccess |
boolean
उपयोगकर्ता के एडमिन क्रेडेंशियल का इस्तेमाल करने के लिए, इसे true पर सेट करें. सर्वर, उपयोगकर्ता को ऐक्सेस देने से पहले यह पुष्टि करेगा कि वह लेबल का एडमिन है.
|
writeControl |
object (WriteControl )
इस विकल्प से, यह कंट्रोल किया जा सकता है कि लिखने के अनुरोध कैसे पूरे किए जाएं. डिफ़ॉल्ट रूप से, इसे 'सेट नहीं है' पर सेट किया जाता है. इसका मतलब है कि आखिरी बार किया गया बदलाव लागू होगा.
|
disabledPolicy |
object (DisabledPolicy )
इस्तेमाल के लिए नीति बंद है.
|
languageCode |
string
स्थानीय भाषा में फ़ील्ड के लेबल का आकलन करने के लिए, BCP-47 भाषा कोड का इस्तेमाल करें. अगर भाषा की जानकारी नहीं दी जाती है, तो कॉन्फ़िगर की गई डिफ़ॉल्ट भाषा में मौजूद वैल्यू का इस्तेमाल किया जाएगा.
|
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में Label
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के स्कोप
इसके लिए, इनमें से किसी एक 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.disable\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\nDisable a published label. For more information, see [Disable, enable, and delete a label](https://developers.google.com/workspace/drive/labels/guides/disable-delete-label).\n\nDisabling a label will result in a new disabled published revision based on the current published revision. If there's a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted.\n\nOnce disabled, a label may be deleted with `labels.delete`.\n\n### HTTP request\n\n`POST https://drivelabels.googleapis.com/v2/{name=labels/*}:disable`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-----------------------------------------|\n| `name` | `string` Required. Label resource name. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"updateMask\": string, \"useAdminAccess\": boolean, \"writeControl\": { object (/workspace/drive/labels/reference/rest/v2/WriteControl) }, \"disabledPolicy\": { object (/workspace/drive/labels/reference/rest/v2/labels#DisabledPolicy) }, \"languageCode\": string } ``` |\n\n| Fields ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` The fields that should be updated. At least one field must be specified. The root `disabledPolicy` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field. |\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. |\n| `writeControl` | `object (`[WriteControl](/workspace/drive/labels/reference/rest/v2/WriteControl)`)` Provides control over how write requests are executed. Defaults to unset, which means the last write wins. |\n| `disabledPolicy` | `object (`[DisabledPolicy](/workspace/drive/labels/reference/rest/v2/labels#DisabledPolicy)`)` Disabled policy to use. |\n| `languageCode` | `string` The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Label](/workspace/drive/labels/reference/rest/v2/labels#Label).\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)."]]