Class AnnotationLogger

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

    @Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)",
               date="2024-07-09T00:12:56.142Z")
    @Stability(Stable)
    public class AnnotationLogger
    extends software.amazon.jsii.JsiiObject
    implements INagLogger
    A NagLogger that outputs to the CDK Annotations system.
    • Constructor Detail

      • AnnotationLogger

        protected AnnotationLogger​(software.amazon.jsii.JsiiObjectRef objRef)
      • AnnotationLogger

        protected AnnotationLogger​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • AnnotationLogger

        @Stability(Stable)
        public AnnotationLogger​(@Nullable
                                AnnotationLoggerProps props)
        Parameters:
        props -
      • AnnotationLogger

        @Stability(Stable)
        public AnnotationLogger()
    • Method Detail

      • createMessage

        @Stability(Stable)
        @NotNull
        protected String createMessage​(@NotNull
                                       String ruleId,
                                       @NotNull
                                       String findingId,
                                       @NotNull
                                       String ruleInfo,
                                       @NotNull
                                       String ruleExplanation,
                                       @NotNull
                                       Boolean verbose)
        Parameters:
        ruleId - This parameter is required.
        findingId - This parameter is required.
        ruleInfo - This parameter is required.
        ruleExplanation - This parameter is required.
        verbose - 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.
      • getLogIgnores

        @Stability(Stable)
        @NotNull
        public Boolean getLogIgnores()
      • getVerbose

        @Stability(Stable)
        @NotNull
        public Boolean getVerbose()
      • getSuppressionId

        @Stability(Stable)
        @NotNull
        public String getSuppressionId()
      • setSuppressionId

        @Stability(Stable)
        public void setSuppressionId​(@NotNull
                                     String value)