Method: enterprises.policies.patch
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
עדכון או יצירה של מדיניות.
בקשת HTTP
PATCH https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}
כתובת ה-URL משתמשת בתחביר של Transcoding של 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 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 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)."]]