aws-cdk-lib.PolicyViolationBeta1

interface PolicyViolationBeta1

LanguageType name
.NETAmazon.CDK.PolicyViolationBeta1
Gogithub.com/aws/aws-cdk-go/awscdk/v2#PolicyViolationBeta1
Javasoftware.amazon.awscdk.PolicyViolationBeta1
Pythonaws_cdk.PolicyViolationBeta1
TypeScript (source)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

NameTypeDescription
descriptionstringThe description of the violation.
ruleNamestringThe name of the rule.
violatingResourcesPolicyViolatingResourceBeta1[]The resources violating this rule.
fix?stringHow to fix the violation.
ruleMetadata?{ [string]: string }Additional metadata to include with the rule results.
severity?stringThe 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: PolicyViolatingResourceBeta1[]

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.