interface PolicyViolationBeta1
Language | Type name |
---|---|
![]() | Amazon.CDK.PolicyViolationBeta1 |
![]() | github.com/aws/aws-cdk-go/awscdk/v2#PolicyViolationBeta1 |
![]() | software.amazon.awscdk.PolicyViolationBeta1 |
![]() | aws_cdk.PolicyViolationBeta1 |
![]() | aws-cdk-lib » PolicyViolationBeta1 |
Violation produced by the validation plugin.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const policyViolationBeta1: cdk.PolicyViolationBeta1 = {
description: 'description',
ruleName: 'ruleName',
violatingResources: [{
locations: ['locations'],
resourceLogicalId: 'resourceLogicalId',
templatePath: 'templatePath',
}],
// the properties below are optional
fix: 'fix',
ruleMetadata: {
ruleMetadataKey: 'ruleMetadata',
},
severity: 'severity',
};
Properties
Name | Type | Description |
---|---|---|
description | string | The description of the violation. |
rule | string | The name of the rule. |
violating | Policy [] | The resources violating this rule. |
fix? | string | How to fix the violation. |
rule | { [string]: string } | Additional metadata to include with the rule results. |
severity? | string | The severity of the violation, only used for reporting purposes. |
description
Type:
string
The description of the violation.
ruleName
Type:
string
The name of the rule.
violatingResources
Type:
Policy
[]
The resources violating this rule.
fix?
Type:
string
(optional, default: no fix is provided)
How to fix the violation.
ruleMetadata?
Type:
{ [string]: string }
(optional, default: no rule metadata)
Additional metadata to include with the rule results.
This can be used to provide additional information that is plugin specific. The data provided here will be rendered as is.
severity?
Type:
string
(optional, default: no severity)
The severity of the violation, only used for reporting purposes.
This is useful for helping the user discriminate between warnings, errors, information, etc.