# Acknowledgment

An acknowledgment of a validation rule, used to suppress it from output.

- Source: [`core/lib/validation/validations.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/core/lib/validation/validations.ts#L13)
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
Annotations.of(this).acknowledgeWarning('IAM:Group:MaxPoliciesExceeded', 'Account has quota increased to 20');

// Because Annotations ultimately become Validations, you can also acknowledge the Validation
Validations.of(this).acknowledge({
  id: 'Construct-Annotations::IAM:Group:MaxPoliciesExceeded',
  reason: 'Account has quota increased to 20',
});
```

Python:

```python
Annotations.of(self).acknowledge_warning("IAM:Group:MaxPoliciesExceeded", "Account has quota increased to 20")

# Because Annotations ultimately become Validations, you can also acknowledge the Validation
Validations.of(self).acknowledge(
    id="Construct-Annotations::IAM:Group:MaxPoliciesExceeded",
    reason="Account has quota increased to 20"
)
```

Java:

```java
Annotations.of(this).acknowledgeWarning("IAM:Group:MaxPoliciesExceeded", "Account has quota increased to 20");

// Because Annotations ultimately become Validations, you can also acknowledge the Validation
Validations.of(this).acknowledge(Acknowledgment.builder()
        .id("Construct-Annotations::IAM:Group:MaxPoliciesExceeded")
        .reason("Account has quota increased to 20")
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Annotations.Of(this).AcknowledgeWarning("IAM:Group:MaxPoliciesExceeded", "Account has quota increased to 20");

// Because Annotations ultimately become Validations, you can also acknowledge the Validation
Validations.Of(this).Acknowledge(new Acknowledgment {
    Id = "Construct-Annotations::IAM:Group:MaxPoliciesExceeded",
    Reason = "Account has quota increased to 20"
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
awscdk.Annotations_Of(this).AcknowledgeWarning(jsii.String("IAM:Group:MaxPoliciesExceeded"), jsii.String("Account has quota increased to 20"))

// Because Annotations ultimately become Validations, you can also acknowledge the Validation
awscdk.Validations_Of(this).Acknowledge(&Acknowledgment{
	Id: jsii.String("Construct-Annotations::IAM:Group:MaxPoliciesExceeded"),
	Reason: jsii.String("Account has quota increased to 20"),
})
```

## Properties

- `id`: string (required) — The rule ID to acknowledge.

- `reason`: string (required) — The reason for acknowledging this rule.

- `where`: { [key: string]: any } — Optionally narrow the acknowledgement to only the warning occurrences whose call-site context matches this filter.

  **Default:** acknowledges all occurrences of the rule id

  The object is treated as an **`objectLike` partial match** against the
  context attached to each occurrence (the same semantics as
  `template.hasResourceProperties`): every key you specify must be present
  with a matching value, and any key you do not mention is left unconstrained.
  A warning emitted without any context is never matched by a non-empty
  filter, so a specific filter cannot accidentally silence an undetailed
  warning.

  A value is matched for equality (including non-string values such as
  numbers, booleans, or arrays). Because the value type is `any`, richer
  per-key matching can be introduced later without a breaking change — a
  future release may accept a matcher as a value (e.g. a glob/regex) in
  addition to a literal, leaving existing literal callers untouched.

  When omitted, all occurrences of the rule id are acknowledged
  (backwards-compatible behavior).
