Method: enterprises.policies.patch
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
नीति को अपडेट करता है या बनाता है.
एचटीटीपी अनुरोध
PATCH https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
name |
string
enterprises/{enterpriseId}/policies/{policyId} फ़ॉर्मैट में नीति का नाम.
|
क्वेरी पैरामीटर
पैरामीटर |
updateMask |
string (FieldMask format)
फ़ील्ड मास्क, अपडेट किए जाने वाले फ़ील्ड के बारे में बताता है. अगर यह सेट नहीं है, तो बदलाव किए जा सकने वाले सभी फ़ील्ड में बदलाव हो जाएगा. यह फ़ील्ड के पूरी तरह से क्वालिफ़ाइड नामों की सूची है. इसमें नामों को कॉमा लगाकर अलग किया गया है. उदाहरण: "user.displayName,photo" .
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Policy
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में Policy
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/androidmanagement
ज़्यादा जानकारी के लिए, OAuth 2.0 Overview देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThis operation updates or creates an enterprise policy using a PATCH request to the specified URL.\u003c/p\u003e\n"],["\u003cp\u003eThe request must include path and query parameters to identify the target policy and specify fields to update.\u003c/p\u003e\n"],["\u003cp\u003eBoth request and response bodies utilize the \u003ccode\u003ePolicy\u003c/code\u003e object for data transfer.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidmanagement\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This describes how to update or create a policy using a PATCH HTTP request to a specific URL. The URL path, including the enterprise and policy IDs, is defined by `name`. Optional `updateMask` query parameter specifies which policy fields to modify. The request and response bodies both utilize the `Policy` data structure. Authorization requires the `https://www.googleapis.com/auth/androidmanagement` OAuth scope. The provided document details the URL structure, required parameters, and body content.\n"],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates or creates a policy.\n\nHTTP request\n\n`PATCH https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------|\n| `name` | `string` The name of the policy in the form `enterprises/{enterpriseId}/policies/{policyId}`. |\n\nQuery parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` The field mask indicating the fields to update. If not set, all modifiable fields will be modified. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\nRequest body\n\nThe request body contains an instance of [Policy](/android/management/reference/rest/v1/enterprises.policies#Policy).\n\nResponse body\n\nIf successful, the response body contains an instance of [Policy](/android/management/reference/rest/v1/enterprises.policies#Policy).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidmanagement`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]