Class PDKNag

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

    @Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
               date="2023-02-01T23:43:16.031Z")
    @Stability(Stable)
    public class PDKNag
    extends software.amazon.jsii.JsiiObject
    Helper for create a Nag Enabled App.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        PDKNag()  
      protected PDKNag​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected PDKNag​(software.amazon.jsii.JsiiObjectRef objRef)  
    • Constructor Detail

      • PDKNag

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

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

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

      • addResourceSuppressionsByPathNoThrow

        @Stability(Stable)
        public static void addResourceSuppressionsByPathNoThrow​(@NotNull
                                                                software.amazon.awscdk.Stack stack,
                                                                @NotNull
                                                                String path,
                                                                @NotNull
                                                                List<? extends io.github.cdklabs.cdknag.NagPackSuppression> suppressions,
                                                                @Nullable
                                                                Boolean applyToChildren)
        Wrapper around NagSuppressions which does not throw.

        Parameters:
        stack - stack instance. This parameter is required.
        path - resource path. This parameter is required.
        suppressions - list of suppressions to apply. This parameter is required.
        applyToChildren - whether to apply to children.
      • addResourceSuppressionsByPathNoThrow

        @Stability(Stable)
        public static void addResourceSuppressionsByPathNoThrow​(@NotNull
                                                                software.amazon.awscdk.Stack stack,
                                                                @NotNull
                                                                String path,
                                                                @NotNull
                                                                List<? extends io.github.cdklabs.cdknag.NagPackSuppression> suppressions)
        Wrapper around NagSuppressions which does not throw.

        Parameters:
        stack - stack instance. This parameter is required.
        path - resource path. This parameter is required.
        suppressions - list of suppressions to apply. This parameter is required.
      • app

        @Stability(Stable)
        @NotNull
        public static PDKNagApp app​(@Nullable
                                    PDKNagAppProps props)
        Returns an instance of an App with Nag enabled.

        Parameters:
        props - props to initialize the app with.
      • app

        @Stability(Stable)
        @NotNull
        public static PDKNagApp app()
        Returns an instance of an App with Nag enabled.
      • getStackAccountRegex

        @Stability(Stable)
        @NotNull
        public static String getStackAccountRegex​(@NotNull
                                                  software.amazon.awscdk.Stack stack)
        Returns a stack account regex.

        Parameters:
        stack - stack instance. This parameter is required.
      • getStackPartitionRegex

        @Stability(Stable)
        @NotNull
        public static String getStackPartitionRegex​(@NotNull
                                                    software.amazon.awscdk.Stack stack)
        Returns a stack partition regex.

        Parameters:
        stack - stack instance. This parameter is required.
      • getStackPrefix

        @Stability(Stable)
        @NotNull
        public static String getStackPrefix​(@NotNull
                                            software.amazon.awscdk.Stack stack)
        Returns a prefix comprising of a delimited set of Stack Ids.

        For example: StackA/NestedStackB/

        Parameters:
        stack - stack instance. This parameter is required.
      • getStackRegionRegex

        @Stability(Stable)
        @NotNull
        public static String getStackRegionRegex​(@NotNull
                                                 software.amazon.awscdk.Stack stack)
        Returns a stack region regex.

        Parameters:
        stack - stack instance. This parameter is required.