Skip to content
v2.274.0

PolicyValidationPluginReport Struct ​

The report emitted by the plugin after evaluation.

Example ​

ts
// 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 policyValidationPluginReport: cdk.PolicyValidationPluginReport = {
  success: false,
  violations: [{
    description: 'description',
    ruleName: 'ruleName',
    violatingResources: [{
      locations: ['locations'],

      // the properties below are optional
      constructPath: 'constructPath',
      resourceLogicalId: 'resourceLogicalId',
      templatePath: 'templatePath',
    }],

    // the properties below are optional
    fix: 'fix',
    ruleMetadata: {
      ruleMetadataKey: 'ruleMetadata',
    },
    severity: 'severity',
  }],

  // the properties below are optional
  metadata: {
    metadataKey: 'metadata',
  },
  pluginVersion: 'pluginVersion',
};

Properties ​

metadataoptional{ [key: string]: string }metadataoptionaltyping.Mapping[str, str]metadataoptionalMap<String, String>MetadataoptionalIDictionary<string, string>Metadataoptional*map[string]*string#
Arbitrary information about the report.

Default: no metadata

pluginVersionoptionalstringplugin_versionoptionalstrpluginVersionoptionalStringPluginVersionoptionalstringPluginVersionoptional*string#
The version of the plugin that created the report.

Default: no version

successbooleansuccessboolsuccessBooleanSuccessboolSuccess*boolrequired#
Whether or not the report was successful.
violationsPolicyViolation[]violationstyping.List[PolicyViolation]violationsList<PolicyViolation>ViolationsPolicyViolation[]Violations*[]PolicyViolationrequired#
List of violations in the report.