Method: enterprises.policies.patch
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
به روز رسانی یا ایجاد یک خط مشی.
درخواست HTTP
PATCH https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
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 و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]