Package io.github.cdklabs.cdknag
Class NagReportLogger
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- io.github.cdklabs.cdknag.NagReportLogger
-
- All Implemented Interfaces:
INagLogger,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-02-11T00:12:48.875Z") @Stability(Stable) public class NagReportLogger extends software.amazon.jsii.JsiiObject implements INagLogger
A NagLogger that creates compliance reports.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNagReportLogger.BuilderA fluent builder forNagReportLogger.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface io.github.cdklabs.cdknag.INagLogger
INagLogger.Jsii$Default, INagLogger.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description NagReportLogger(NagReportLoggerProps props)protectedNagReportLogger(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedNagReportLogger(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<NagReportFormat>getFormats()List<String>getFormatStacks(NagReportFormat format)protected voidinitializeStackReport(NagLoggerBaseData data)Initialize the report for the rule pack's compliance report for the resource's Stack if it doesn't exist.voidonCompliance(NagLoggerComplianceData data)Called when a CfnResource passes the compliance check for a given rule.voidonError(NagLoggerErrorData data)Called when a rule throws an error during while validating a CfnResource for compliance.voidonNonCompliance(NagLoggerNonComplianceData data)Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.voidonNotApplicable(NagLoggerNotApplicableData data)Called when a rule does not apply to the given CfnResource.voidonSuppressed(NagLoggerSuppressedData data)Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.voidonSuppressedError(NagLoggerSuppressedErrorData data)Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.protected voidwriteToStackComplianceReport(NagLoggerBaseData data, Object compliance)-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
NagReportLogger
protected NagReportLogger(software.amazon.jsii.JsiiObjectRef objRef)
-
NagReportLogger
protected NagReportLogger(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
NagReportLogger
@Stability(Stable) public NagReportLogger(@NotNull NagReportLoggerProps props)- Parameters:
props- This parameter is required.
-
-
Method Detail
-
getFormatStacks
@Stability(Stable) @NotNull public List<String> getFormatStacks(@NotNull NagReportFormat format)
- Parameters:
format- This parameter is required.
-
initializeStackReport
@Stability(Stable) protected void initializeStackReport(@NotNull NagLoggerBaseData data)Initialize the report for the rule pack's compliance report for the resource's Stack if it doesn't exist.- Parameters:
data- This parameter is required.
-
onCompliance
@Stability(Stable) public void onCompliance(@NotNull NagLoggerComplianceData data)Called when a CfnResource passes the compliance check for a given rule.- Specified by:
onCompliancein interfaceINagLogger- Parameters:
data- This parameter is required.
-
onError
@Stability(Stable) public void onError(@NotNull NagLoggerErrorData data)Called when a rule throws an error during while validating a CfnResource for compliance.- Specified by:
onErrorin interfaceINagLogger- Parameters:
data- This parameter is required.
-
onNonCompliance
@Stability(Stable) public void onNonCompliance(@NotNull NagLoggerNonComplianceData data)Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.- Specified by:
onNonCompliancein interfaceINagLogger- Parameters:
data- This parameter is required.
-
onNotApplicable
@Stability(Stable) public void onNotApplicable(@NotNull NagLoggerNotApplicableData data)Called when a rule does not apply to the given CfnResource.- Specified by:
onNotApplicablein interfaceINagLogger- Parameters:
data- This parameter is required.
-
onSuppressed
@Stability(Stable) public void onSuppressed(@NotNull NagLoggerSuppressedData data)Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.- Specified by:
onSuppressedin interfaceINagLogger- Parameters:
data- This parameter is required.
-
onSuppressedError
@Stability(Stable) public void onSuppressedError(@NotNull NagLoggerSuppressedErrorData data)Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.- Specified by:
onSuppressedErrorin interfaceINagLogger- Parameters:
data- This parameter is required.
-
writeToStackComplianceReport
@Stability(Stable) protected void writeToStackComplianceReport(@NotNull NagLoggerBaseData data, @NotNull Object compliance)- Parameters:
data- This parameter is required.compliance- This parameter is required.
-
getFormats
@Stability(Stable) @NotNull public List<NagReportFormat> getFormats()
-
-