Class NagReportLogger

  • All Implemented Interfaces:
    INagLogger, software.amazon.jsii.JsiiSerializable

    @Generated(value="jsii-pacmak/1.93.0 (build 1706ca5)",
               date="2023-12-13T00:20:27.692Z")
    @Stability(Stable)
    public class NagReportLogger
    extends software.amazon.jsii.JsiiObject
    implements INagLogger
    A NagLogger that creates compliance reports.
    • 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:
        onCompliance in interface INagLogger
        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:
        onError in interface INagLogger
        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:
        onNonCompliance in interface INagLogger
        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:
        onNotApplicable in interface INagLogger
        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:
        onSuppressed in interface INagLogger
        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:
        onSuppressedError in interface INagLogger
        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.