Package software.amazon.awscdk
Class CloudFormationValidatePlugin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.CloudFormationValidatePlugin
- All Implemented Interfaces:
IPolicyValidationPlugin,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)",
date="2026-07-24T11:46:38.297Z")
@Stability(Stable)
public class CloudFormationValidatePlugin
extends software.amazon.jsii.JsiiObject
implements IPolicyValidationPlugin
Validation plugin that uses the CloudFormation validation engine to evaluate templates against built-in rules.
Example:
// Rules text, read from disk perhaps
String myRules;
App app = new App();
Validations.of(app).addPlugins(CloudFormationValidatePlugin.Builder.create()
.guardRules(List.of(ValidationRuleSource.builder()
.name("My rules")
.content(myRules)
.build()))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCloudFormationValidatePlugin.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.IPolicyValidationPlugin
IPolicyValidationPlugin.Jsii$Default, IPolicyValidationPlugin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCloudFormationValidatePlugin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCloudFormationValidatePlugin(software.amazon.jsii.JsiiObjectRef objRef) -
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.The version of the plugin, following the Semantic Versioning specification (see https://semver.org/).validate(IPolicyValidationContext context) The method that will be called by the CDK framework to perform validations.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PLUGIN_NAME
The default name of this plugin.
-
-
Constructor Details
-
CloudFormationValidatePlugin
protected CloudFormationValidatePlugin(software.amazon.jsii.JsiiObjectRef objRef) -
CloudFormationValidatePlugin
protected CloudFormationValidatePlugin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CloudFormationValidatePlugin
@Stability(Stable) public CloudFormationValidatePlugin(@Nullable CloudFormationValidatePluginProps props) - Parameters:
props-
-
CloudFormationValidatePlugin
@Stability(Stable) public CloudFormationValidatePlugin()
-
-
Method Details
-
validate
@Stability(Stable) @NotNull public PolicyValidationPluginReport validate(@NotNull IPolicyValidationContext 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
- Specified by:
validatein interfaceIPolicyValidationPlugin- Parameters:
context- This parameter is required.
-
getName
The name of the plugin that will be displayed in the validation report.- Specified by:
getNamein interfaceIPolicyValidationPlugin
-
getRuleIds
The list of rule IDs that the plugin will evaluate.Used for analytics purposes.
- Specified by:
getRuleIdsin interfaceIPolicyValidationPlugin
-
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.- Specified by:
getVersionin interfaceIPolicyValidationPlugin
-