interface PolicyViolationJson
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CloudAssembly.Schema.PolicyViolationJson |
Java | software.amazon.awscdk.cloudassembly.schema.PolicyViolationJson |
Python | aws_cdk.cloud_assembly_schema.PolicyViolationJson |
TypeScript | @aws-cdk/cloud-assembly-schema » PolicyViolationJson |
A single policy violation found by a validation plugin.
Example
import { PolicyViolationJson } from '@aws-cdk/cloud-assembly-schema';
const violation: PolicyViolationJson = {
ruleName: 'no-public-access',
description: 'S3 bucket should not allow public access',
severity: 'error',
violatingConstructs: [{ constructPath: 'MyStack/MyBucket' }],
};
Properties
| Name | Type | Description |
|---|---|---|
| description | string | A description of the violation. |
| rule | string | The name of the rule that was violated. |
| severity | string | The severity of the violation. |
| violating | Violating[] | Constructs that violated the rule. |
| custom | string | If the plugin wants to report using a non-standard severity, put it here. |
| rule | { [string]: string } | Additional rule-specific metadata. |
| suggested | string | How to fix the violation. |
description
Type:
string
A description of the violation.
ruleName
Type:
string
The name of the rule that was violated.
severity
Type:
string
The severity of the violation.
violatingConstructs
Type:
Violating[]
Constructs that violated the rule.
customSeverity?
Type:
string
(optional)
If the plugin wants to report using a non-standard severity, put it here.
ruleMetadata?
Type:
{ [string]: string }
(optional, default: no metadata)
Additional rule-specific metadata.
suggestedFix?
Type:
string
(optional, default: no fix provided)
How to fix the violation.

.NET
Java
Python
TypeScript