Package software.amazon.awscdk
Interface IPolicyValidationPluginBeta1
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IPolicyValidationPluginBeta1.Jsii$Default
- All Known Implementing Classes:
IPolicyValidationPluginBeta1.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-27T17:01:55.922Z")
@Stability(Stable)
public interface IPolicyValidationPluginBeta1
extends software.amazon.jsii.JsiiSerializable
Represents a validation plugin that will be executed during synthesis.
Example:
public class MyPlugin implements IPolicyValidationPluginBeta1 { public final Object name; public PolicyValidationPluginReportBeta1 validate(IPolicyValidationContextBeta1 context) { // First read the templates using context.templatePaths... // ...then perform the validation, and then compose and return the report. // Using hard-coded values here for better clarity: return PolicyValidationPluginReportBeta1.builder() .success(false) .violations(List.of(PolicyViolationBeta1.builder() .ruleName("CKV_AWS_117") .description("Ensure that AWS Lambda function is configured inside a VPC") .fix("https://docs.bridgecrew.io/docs/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1") .violatingResources(List.of(PolicyViolatingResourceBeta1.builder() .resourceLogicalId("MyFunction3BAA72D1") .templatePath("/home/johndoe/myapp/cdk.out/MyService.template.json") .locations(List.of("Properties/VpcConfig")) .build())) .build())) .build(); } }
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Internal default implementation forIPolicyValidationPluginBeta1
.static final class
A proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
The name of the plugin that will be displayed in the validation report.The list of rule IDs that the plugin will evaluate.default String
The version of the plugin, following the Semantic Versioning specification (see https://semver.org/).validate
(IPolicyValidationContextBeta1 context) The method that will be called by the CDK framework to perform validations.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
The name of the plugin that will be displayed in the validation report. -
getRuleIds
The list of rule IDs that the plugin will evaluate.Used for analytics purposes.
Default: - No rule is reported
-
getVersion
The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as0.0.0
. -
validate
@Stability(Stable) @NotNull PolicyValidationPluginReportBeta1 validate(@NotNull IPolicyValidationContextBeta1 context) The method that will be called by the CDK framework to perform validations.This is where the plugin will evaluate the CloudFormation templates for compliance and report and violations
- Parameters:
context
- This parameter is required.
-