Method: customers.policies.orgunits.batchModify
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Modifica varios valores de políticas que se aplican a una unidad organizativa específica. Todos los destinos deben tener el mismo formato de destino. Es decir, deben apuntar al mismo recurso de destino y tener las mismas claves especificadas en additionalTargetKeyNames
, aunque los valores de esas claves pueden ser diferentes. En caso de error, la solicitud devolverá los detalles del error como parte de google.rpc.Status.
Solicitud HTTP
POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/orgunits:batchModify
La URL usa la sintaxis de la transcodificación gRPC.
Parámetros de ruta de acceso
Parámetros |
customer |
string
ID de la cuenta de G Suite o literal de "my_customer" para el cliente asociado a la solicitud.
|
Cuerpo de la solicitud
El cuerpo de la solicitud contiene datos con la siguiente estructura:
Campos |
requests[] |
object (ModifyOrgUnitPolicyRequest )
Lista de políticas que se deben modificar según se define en requests . Todas las solicitudes de la lista deben seguir estas restricciones:
- Todos los esquemas de la lista deben tener el mismo espacio de nombres raíz.
- Todos los valores `policyTargetKey.targetResource` deben apuntar a una unidad organizativa
recurso.
- Todos los valores `policyTargetKey` deben tener los mismos nombres de clave en la
` additionalTargetKeys`. Esto también significa que si uno de
los objetivos tienen un mapa `additionalTargetKeys` vacío, todas las
los destinos deben tener un mapa `additionalTargetKeys` vacío.
- No hay dos solicitudes de modificación que puedan hacer referencia al mismo `policySchema` +
par `policyTargetKey`.
|
Cuerpo de la respuesta
Si se ejecuta correctamente, el cuerpo de la respuesta está vacío.
Alcances de autorización
Requiere el siguiente alcance de OAuth:
https://www.googleapis.com/auth/chrome.management.policy
ModifyOrgUnitPolicyRequest
Solicita parámetros para modificar el valor de una política para un destino específico de una unidad organizativa.
Representación JSON |
{
"policyTargetKey": {
object (PolicyTargetKey )
},
"policyValue": {
object (PolicyValue )
},
"updateMask": string
} |
Campos |
policyTargetKey |
object (PolicyTargetKey )
Obligatorio. La clave del destino para el que queremos modificar una política. El recurso de destino debe apuntar a una unidad organizativa.
|
policyValue |
object (PolicyValue )
El nuevo valor de la política.
|
updateMask |
string (FieldMask format)
Obligatorio. Campos de la política que se actualizarán. Solo se actualizarán los campos de esta máscara. se ignorarán otros campos en policyValue (incluso si tienen valores). Si un campo está en esta lista, debe tener un valor en “policyValue”. Esta es una lista separada por comas de los nombres de campos totalmente calificados. Ejemplo: "user.displayName,photo" .
|
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[null,null,["Última actualización: 2025-07-25 (UTC)"],[[["\u003cp\u003eModify multiple policies applied to a specific organizational unit using the \u003ccode\u003ebatchModify\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eAll policy modification requests within a single batch operation must adhere to specific schema, target resource, and key restrictions.\u003c/p\u003e\n"],["\u003cp\u003eThe request body structure includes a list of \u003ccode\u003eModifyOrgUnitPolicyRequest\u003c/code\u003e objects, each defining the policy target, desired value, and fields to update.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests result in an empty response body, while failures return error details in the \u003ccode\u003egoogle.rpc.Status\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/chrome.management.policy\u003c/code\u003e scope.\u003c/p\u003e\n"]]],[],null,["# Method: customers.policies.orgunits.batchModify\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- [Authorization scopes](#body.aspect)\n- [ModifyOrgUnitPolicyRequest](#ModifyOrgUnitPolicyRequest)\n - [JSON representation](#ModifyOrgUnitPolicyRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nModify multiple policy values that are applied to a specific org unit. All targets must have the same target format. That is to say that they must point to the same target resource and must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different. On failure the request will return the error details as part of the google.rpc.Status.\n\n### HTTP request\n\n`POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/orgunits:batchModify`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------------------------------------|\n| `customer` | `string` ID of the G Suite account or literal \"my_customer\" for the customer associated to the request. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requests\": [ { object (/chrome/policy/reference/rest/v1/customers.policies.orgunits/batchModify#ModifyOrgUnitPolicyRequest) } ] } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[ModifyOrgUnitPolicyRequest](/chrome/policy/reference/rest/v1/customers.policies.orgunits/batchModify#ModifyOrgUnitPolicyRequest)`)` List of policies to modify as defined by the `requests`. All requests in the list must follow these restrictions: 1. All schemas in the list must have the same root namespace. 2. All \\`policyTargetKey.targetResource\\` values must point to an org unit resource. 3. All \\`policyTargetKey\\` values must have the same key names in the \\` additionalTargetKeys\\`. This also means if one of the targets has an empty \\`additionalTargetKeys\\` map, all of the targets must have an empty \\`additionalTargetKeys\\` map. 4. No two modification requests can reference the same \\`policySchema\\` + \\` policyTargetKey\\` pair. |\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/chrome.management.policy`\n\nModifyOrgUnitPolicyRequest\n--------------------------\n\nRequest parameters for modifying a policy value for a specific org unit target.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"policyTargetKey\": { object (/chrome/policy/reference/rest/v1/PolicyTargetKey) }, \"policyValue\": { object (/chrome/policy/reference/rest/v1/PolicyValue) }, \"updateMask\": string } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `policyTargetKey` | `object (`[PolicyTargetKey](/chrome/policy/reference/rest/v1/PolicyTargetKey)`)` Required. The key of the target for which we want to modify a policy. The target resource must point to an Org Unit. |\n| `policyValue` | `object (`[PolicyValue](/chrome/policy/reference/rest/v1/PolicyValue)`)` The new value for the policy. |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. Policy fields to update. Only fields in this mask will be updated; other fields in `policyValue` will be ignored (even if they have values). If a field is in this list it must have a value in 'policyValue'. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |"]]