# Method: organizations.locations.postures.patch

- [HTTP request](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#body.aspect_1)

Updates a revision of an existing `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures#Posture`.

If the posture revision that you update is currently deployed, then a new revision of the posture is created.

To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture:

1. Call `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/get#google.cloud.securityposture.v1.SecurityPosture.GetPosture` to get the current version of the posture.
2. Update the fields in the posture as needed.
3. Call `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#google.cloud.securityposture.v1.SecurityPosture.UpdatePosture` to update the posture. Ensure that your request includes the `etag` value from the `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/get#google.cloud.securityposture.v1.SecurityPosture.GetPosture` response.

**Important:** If you omit the `etag` when you call `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/patch#google.cloud.securityposture.v1.SecurityPosture.UpdatePosture`, then the updated posture unconditionally overwrites the existing posture.

### HTTP request

`PATCH https://securityposture.googleapis.com/v1/{posture.name=organizations/*/locations/*/postures/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `posture.name` | `string` Required. Identifier. The name of the posture, in the format `organizations/{organization}/locations/global/postures/{postureId}`. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. The fields in the `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures#Posture` to update. You can update only the following fields: - `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures#Posture.FIELDS.description` - `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures#Posture.FIELDS.policy_sets` - `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures#Posture.FIELDS.state` This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| `revisionId` | `string` Required. The revision ID of the posture to update. If the posture revision that you update is currently deployed, then a new revision of the posture is created. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures#Posture`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `securityposture.postures.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).