Method: enterprises.policies.modifyPolicyApplications
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
อัปเดตหรือสร้างแอปพลิเคชันในนโยบาย
คำขอ HTTP
POST https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}:modifyPolicyApplications
URL ใช้ไวยากรณ์การแปลงรหัส gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
name |
string
ต้องระบุ ชื่อของ Policy ที่มีออบเจ็กต์ ApplicationPolicy ที่จะอัปเดตในรูปแบบ enterprises/{enterpriseId}/policies/{policyId}
|
เนื้อความของคำขอ
เนื้อหาของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
changes[] |
object (ApplicationPolicyChange )
ต้องระบุ การเปลี่ยนแปลงที่จะเกิดขึ้นกับออบเจ็กต์ ApplicationPolicy ต้องมี ApplicationPolicyChange อย่างน้อย 1 รายการ
|
เนื้อหาการตอบกลับ
การตอบกลับคำขออัปเดตหรือสร้างออบเจ็กต์ ApplicationPolicy ในนโยบายที่ระบุ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"policy": {
object (Policy )
}
} |
ช่อง |
policy |
object (Policy )
นโยบายฉบับปรับปรุง
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/androidmanagement
ดูข้อมูลเพิ่มเติมได้ที่OAuth 2.0 Overview
ApplicationPolicyChange
การเปลี่ยนแปลงที่จะทำกับออบเจ็กต์ ApplicationPolicy รายการเดียว
ช่อง |
application |
object (ApplicationPolicy )
หาก ApplicationPolicy.packageName ตรงกับออบเจ็กต์ ApplicationPolicy ที่มีอยู่ภายใน Policy ที่กำลังแก้ไข ระบบจะอัปเดตออบเจ็กต์นั้น ไม่เช่นนั้น ระบบจะเพิ่มลงในส่วนท้ายของ Policy.applications
|
updateMask |
string (FieldMask format)
ฟิลด์มาสก์ที่ระบุช่องที่จะอัปเดต หากไม่ระบุ ระบบจะอัปเดตฟิลด์ที่แก้ไขได้ทั้งหมด ซึ่งเป็นรายการชื่อฟิลด์แบบสมบูรณ์ในตัวเองที่คั่นด้วยคอมมา ตัวอย่าง: "user.displayName,photo"
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# Method: enterprises.policies.modifyPolicyApplications\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 - [JSON representation](#body.ModifyPolicyApplicationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [ApplicationPolicyChange](#ApplicationPolicyChange)\n - [JSON representation](#ApplicationPolicyChange.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nUpdates or creates applications in a policy.\n\n### HTTP request\n\n`POST https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}:modifyPolicyApplications`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The name of the [`Policy`](/android/management/reference/rest/v1/enterprises.policies#Policy) containing the [`ApplicationPolicy`](/android/management/reference/rest/v1/enterprises.policies#ApplicationPolicy) objects to be updated, in the form `enterprises/{enterpriseId}/policies/{policyId}`. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"changes\": [ { object (/android/management/reference/rest/v1/enterprises.policies/modifyPolicyApplications#ApplicationPolicyChange) } ] } ``` |\n\n| Fields ||\n|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `changes[]` | `object (`[ApplicationPolicyChange](/android/management/reference/rest/v1/enterprises.policies/modifyPolicyApplications#ApplicationPolicyChange)`)` Required. The changes to be made to the ApplicationPolicy objects. There must be at least one `ApplicationPolicyChange`. |\n\n### Response body\n\nResponse to a request to update or create ApplicationPolicy objects in the given policy.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------|\n| ``` { \"policy\": { object (/android/management/reference/rest/v1/enterprises.policies#Policy) } } ``` |\n\n| Fields ||\n|----------|--------------------------------------------------------------------------------------------------------------|\n| `policy` | `object (`[Policy](/android/management/reference/rest/v1/enterprises.policies#Policy)`)` The updated policy. |\n\n### Authorization 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).\n\nApplicationPolicyChange\n-----------------------\n\nA change to be made to a single ApplicationPolicy object.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"application\": { object (/android/management/reference/rest/v1/enterprises.policies#ApplicationPolicy) }, \"updateMask\": string } ``` |\n\n| Fields ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `application` | `object (`[ApplicationPolicy](/android/management/reference/rest/v1/enterprises.policies#ApplicationPolicy)`)` If [`ApplicationPolicy.packageName`](/android/management/reference/rest/v1/enterprises.policies#ApplicationPolicy.FIELDS.package_name) matches an existing ApplicationPolicy object within the [`Policy`](/android/management/reference/rest/v1/enterprises.policies#Policy) being modified, then that object will be updated. Otherwise, it will be added to the end of the [`Policy.applications`](/android/management/reference/rest/v1/enterprises.policies#Policy.FIELDS.applications). |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` The field mask indicating the fields to update. If omitted, all modifiable fields are updated. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |"]]