- [HTTP request](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#body.aspect_1)
- [AcknowledgeType](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1/organizations.locations.workloads.violations/acknowledge.md.txt#AcknowledgeType)

Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid business justification. Acknowledgement is a permanent operation and it cannot be reverted.

### HTTP request

`POST https://{endpoint}/v1/{name=organizations/*/locations/*/workloads/*/violations/*}:acknowledge`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/assured-workloads/docs/reference/rest.md.txt#rest_endpoints).

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the violation to acknowledge. Format: `organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "comment": string, "nonCompliantOrgPolicy": string, "acknowledgeType": enum (`AcknowledgeType`), "view": enum (`ViolationView`) } ``` |

| Fields ||
|---|---|
| `comment` | `string` Required. The business justification for acknowledging the violation. The comment can't be empty or contain only whitespace characters. |
| `nonCompliantOrgPolicy (deprecated)` | `string` Optional. Deprecated: This field is deprecated and will be removed in a future version of the API. The service identifies the violation to acknowledge by `name`, and ignores this field. Don't set this field. The name of the organization policy that was modified with a non-compliant change and resulted in this violation. Formats: - `projects/{project_number}/policies/{constraintName}` - `folders/{folderId}/policies/{constraintName}` - `organizations/{organizationId}/policies/{constraintName}` |
| `acknowledgeType` | ``enum (`AcknowledgeType`)`` Optional. The scope of the acknowledgement for the specified violation. If not specified, `SINGLE_VIOLATION` is used. |
| `view` | ``enum (`ViolationView`)`` Optional. The violation view (`VIOLATION_VIEW_ASSURED_WORKLOADS` or `VIOLATION_VIEW_DATA_BOUNDARY`) that the violation belongs to. If not specified, `VIOLATION_VIEW_ASSURED_WORKLOADS` is used. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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

### IAM Permissions

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

- `assuredworkloads.violations.update`

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

## AcknowledgeType

The scope of the acknowledgement.

| Enums ||
|---|---|
| `ACKNOWLEDGE_TYPE_UNSPECIFIED` | Default value. The acknowledge type isn't specified. |
| `SINGLE_VIOLATION` | Acknowledges only the specified violation. |
| `EXISTING_CHILD_RESOURCE_VIOLATIONS` | Acknowledges the specified organization policy violation and all of its existing associated resource violations. |