Optional. Field mask that controls which fields of the assignment should be updated.
This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".
allowMissing
boolean
Optional. If set to true, and the OS policy assignment is not found, a new OS policy assignment will be created. In this situation, updateMask is ignored.
requestId
string
Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a requestId is provided.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eThis webpage details how to update an existing OS policy assignment, which triggers the creation of a new revision of that assignment.\u003c/p\u003e\n"],["\u003cp\u003eThe update process uses a \u003ccode\u003ePATCH\u003c/code\u003e HTTP request targeting a specific OS policy assignment by its resource name, using gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eQuery parameters, such as \u003ccode\u003eupdateMask\u003c/code\u003e, \u003ccode\u003eallowMissing\u003c/code\u003e, and \u003ccode\u003erequestId\u003c/code\u003e, provide optional customization for the update, including the ability to create a new assignment if one isn't found and to ensure idempotent behavior.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include an instance of \u003ccode\u003eOSPolicyAssignment\u003c/code\u003e, while a successful response will contain an instance of \u003ccode\u003eOperation\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUpdating an OS policy assignment requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003eosconfig.osPolicyAssignments.update\u003c/code\u003e on the target resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.osPolicyAssignments.patch\n\n- [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- [IAM Permissions](#body.aspect_1)\n- [Try it!](#try-it)\n\nUpdate an existing OS policy assignment.\n\nThis method creates a new revision of the OS policy assignment.\n\nThis method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.\n\nFor more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).\n\n### HTTP request\n\n`PATCH https://osconfig.googleapis.com/v1/{osPolicyAssignment.name=projects/*/locations/*/osPolicyAssignments/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [OSPolicyAssignment](/compute/docs/osconfig/rest/Shared.Types/OSPolicyAssignment).\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/compute/docs/osconfig/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `osconfig.osPolicyAssignments.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]