Acknowledgment Struct
An acknowledgment of a validation rule, used to suppress it from output.
| Source | core/lib/validation/validations.ts |
|---|---|
| Type last changed |
Example
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',
});
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"
)
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());
// 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"
});
// 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
whereoptional{ [key: string]: any }whereoptionaltyping.Mapping[str, Any]whereoptionalMap<String, Object>WhereoptionalIDictionary<string, object>Whereoptional*map[string]interface{} #Default: acknowledges all occurrences of the rule id
notes
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).