Interface PolicyViolationJson
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
SuppressedViolationJson
- All Known Implementing Classes:
PolicyViolationJson.Jsii$Proxy,SuppressedViolationJson.Jsii$Proxy
@Generated(value="jsii-pacmak/1.133.0 (build 0f43e37)",
date="2026-07-02T13:32:49.626Z")
@Stability(Stable)
public interface PolicyViolationJson
extends software.amazon.jsii.JsiiSerializable
A single policy violation found by a validation plugin.
Example:
import software.amazon.awscdk.cloudassembly.schema.PolicyViolationJson;
PolicyViolationJson violation = PolicyViolationJson.builder()
.ruleName("no-public-access")
.description("S3 bucket should not allow public access")
.severity("error")
.violatingConstructs(List.of(ViolatingConstructJson.builder().constructPath("MyStack/MyBucket").build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forPolicyViolationJsonstatic final classAn implementation forPolicyViolationJson -
Method Summary
Modifier and TypeMethodDescriptionstatic PolicyViolationJson.Builderbuilder()default StringIf the plugin wants to report using a non-standard severity, put it here.A description of the violation.Additional rule-specific metadata.The name of the rule that was violated.The severity of the violation.default StringHow to fix the violation.Constructs that violated the rule.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDescription
A description of the violation. -
getRuleName
The name of the rule that was violated. -
getSeverity
The severity of the violation. -
getViolatingConstructs
Constructs that violated the rule. -
getCustomSeverity
If the plugin wants to report using a non-standard severity, put it here. -
getRuleMetadata
Additional rule-specific metadata.Default: - no metadata
-
getSuggestedFix
How to fix the violation.Default: - no fix provided
-
builder
- Returns:
- a
PolicyViolationJson.BuilderofPolicyViolationJson
-