Class NagSuppressions

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

    @Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)",
               date="2024-07-09T00:12:56.252Z")
    @Stability(Stable)
    public class NagSuppressions
    extends software.amazon.jsii.JsiiObject
    Helper class with methods to add cdk-nag suppressions to cdk resources.
    • Constructor Detail

      • NagSuppressions

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

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

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

      • addResourceSuppressions

        @Stability(Stable)
        public static void addResourceSuppressions​(@NotNull
                                                   Object construct,
                                                   @NotNull
                                                   List<? extends NagPackSuppression> suppressions,
                                                   @Nullable
                                                   Boolean applyToChildren)
        Add cdk-nag suppressions to a CfnResource and optionally its children.

        Parameters:
        construct - The IConstruct(s) to apply the suppression to. This parameter is required.
        suppressions - A list of suppressions to apply to the resource. This parameter is required.
        applyToChildren - Apply the suppressions to children CfnResources (default:false).
      • addResourceSuppressions

        @Stability(Stable)
        public static void addResourceSuppressions​(@NotNull
                                                   Object construct,
                                                   @NotNull
                                                   List<? extends NagPackSuppression> suppressions)
        Add cdk-nag suppressions to a CfnResource and optionally its children.

        Parameters:
        construct - The IConstruct(s) to apply the suppression to. This parameter is required.
        suppressions - A list of suppressions to apply to the resource. This parameter is required.
      • addResourceSuppressionsByPath

        @Stability(Stable)
        public static void addResourceSuppressionsByPath​(@NotNull
                                                         software.amazon.awscdk.Stack stack,
                                                         @NotNull
                                                         Object path,
                                                         @NotNull
                                                         List<? extends NagPackSuppression> suppressions,
                                                         @Nullable
                                                         Boolean applyToChildren)
        Add cdk-nag suppressions to a CfnResource and optionally its children via its path.

        Parameters:
        stack - The Stack the construct belongs to. This parameter is required.
        path - The path(s) to the construct in the provided stack. This parameter is required.
        suppressions - A list of suppressions to apply to the resource. This parameter is required.
        applyToChildren - Apply the suppressions to children CfnResources (default:false).
      • addResourceSuppressionsByPath

        @Stability(Stable)
        public static void addResourceSuppressionsByPath​(@NotNull
                                                         software.amazon.awscdk.Stack stack,
                                                         @NotNull
                                                         Object path,
                                                         @NotNull
                                                         List<? extends NagPackSuppression> suppressions)
        Add cdk-nag suppressions to a CfnResource and optionally its children via its path.

        Parameters:
        stack - The Stack the construct belongs to. This parameter is required.
        path - The path(s) to the construct in the provided stack. This parameter is required.
        suppressions - A list of suppressions to apply to the resource. This parameter is required.
      • addStackSuppressions

        @Stability(Stable)
        public static void addStackSuppressions​(@NotNull
                                                software.amazon.awscdk.Stack stack,
                                                @NotNull
                                                List<? extends NagPackSuppression> suppressions,
                                                @Nullable
                                                Boolean applyToNestedStacks)
        Apply cdk-nag suppressions to a Stack and optionally nested stacks.

        Parameters:
        stack - The Stack to apply the suppression to. This parameter is required.
        suppressions - A list of suppressions to apply to the stack. This parameter is required.
        applyToNestedStacks - Apply the suppressions to children stacks (default:false).
      • addStackSuppressions

        @Stability(Stable)
        public static void addStackSuppressions​(@NotNull
                                                software.amazon.awscdk.Stack stack,
                                                @NotNull
                                                List<? extends NagPackSuppression> suppressions)
        Apply cdk-nag suppressions to a Stack and optionally nested stacks.

        Parameters:
        stack - The Stack to apply the suppression to. This parameter is required.
        suppressions - A list of suppressions to apply to the stack. This parameter is required.