Method: enterprises.policies.modifyPolicyApplications
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}:modifyPolicyApplications
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。包含待更新的 ApplicationPolicy 对象的 Policy 的名称,格式为 enterprises/{enterpriseId}/policies/{policyId} 。
|
请求正文
请求正文中包含结构如下的数据:
字段 |
changes[] |
object (ApplicationPolicyChange )
必需。要对 ApplicationPolicy 对象做出的更改。必须至少有一个 ApplicationPolicyChange 。
|
响应正文
对在给定政策中更新或创建 ApplicationPolicy 对象的请求做出的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"policy": {
object (Policy )
}
} |
字段 |
policy |
object (Policy )
更新后的政策。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidmanagement
如需了解详情,请参阅 OAuth 2.0 Overview。
ApplicationPolicyChange
要对单个 ApplicationPolicy 对象进行的更改。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],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\"`. |"]]