Package io.github.cdklabs.cdknag
Class NagPack
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- io.github.cdklabs.cdknag.NagPack
-
- All Implemented Interfaces:
software.amazon.awscdk.IAspect,software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
AwsSolutionsChecks,HIPAASecurityChecks,NIST80053R4Checks,NIST80053R5Checks,PCIDSS321Checks
@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-02-29T00:11:40.966Z") @Stability(Stable) public abstract class NagPack extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.IAspect
Base class for all rule packs.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNagPack()protectedNagPack(NagPackProps props)protectedNagPack(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedNagPack(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidapplyRule(IApplyRule params)Create a rule to be used in the NagPack.protected List<INagLogger>getLoggers()protected INagSuppressionIgnoregetPackGlobalSuppressionIgnore()protected StringgetPackName()StringgetReadPackName()protected INagSuppressionIgnoregetUserGlobalSuppressionIgnore()protected StringignoreRule(List<NagPackSuppression> suppressions, String ruleId, String findingId, software.amazon.awscdk.CfnResource resource, NagMessageLevel level)Check whether a specific rule should be ignored.protected StringignoreRule(List<NagPackSuppression> suppressions, String ruleId, String findingId, software.amazon.awscdk.CfnResource resource, NagMessageLevel level, INagSuppressionIgnore ignoreSuppressionCondition)Check whether a specific rule should be ignored.protected voidsetLoggers(List<INagLogger> value)protected voidsetPackGlobalSuppressionIgnore(INagSuppressionIgnore value)protected voidsetPackName(String value)protected voidsetUserGlobalSuppressionIgnore(INagSuppressionIgnore value)abstract voidvisit(software.constructs.IConstruct node)All aspects can visit an IConstruct.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
NagPack
protected NagPack(software.amazon.jsii.JsiiObjectRef objRef)
-
NagPack
protected NagPack(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
NagPack
@Stability(Stable) protected NagPack(@Nullable NagPackProps props)- Parameters:
props-
-
NagPack
@Stability(Stable) protected NagPack()
-
-
Method Detail
-
applyRule
@Stability(Stable) protected void applyRule(@NotNull IApplyRule params)Create a rule to be used in the NagPack.- Parameters:
params- The. This parameter is required.
-
ignoreRule
@Stability(Stable) @NotNull protected String ignoreRule(@NotNull List<NagPackSuppression> suppressions, @NotNull String ruleId, @NotNull String findingId, @NotNull software.amazon.awscdk.CfnResource resource, @NotNull NagMessageLevel level, @Nullable INagSuppressionIgnore ignoreSuppressionCondition)
Check whether a specific rule should be ignored.- Parameters:
suppressions- The suppressions listed in the cdk-nag metadata. This parameter is required.ruleId- The id of the rule to ignore. This parameter is required.findingId- The id of the finding that is being checked. This parameter is required.resource- The resource being evaluated. This parameter is required.level- This parameter is required.ignoreSuppressionCondition-- Returns:
- The reason the rule was ignored, or an empty string.
-
ignoreRule
@Stability(Stable) @NotNull protected String ignoreRule(@NotNull List<NagPackSuppression> suppressions, @NotNull String ruleId, @NotNull String findingId, @NotNull software.amazon.awscdk.CfnResource resource, @NotNull NagMessageLevel level)
Check whether a specific rule should be ignored.- Parameters:
suppressions- The suppressions listed in the cdk-nag metadata. This parameter is required.ruleId- The id of the rule to ignore. This parameter is required.findingId- The id of the finding that is being checked. This parameter is required.resource- The resource being evaluated. This parameter is required.level- This parameter is required.- Returns:
- The reason the rule was ignored, or an empty string.
-
visit
@Stability(Stable) public abstract void visit(@NotNull software.constructs.IConstruct node)All aspects can visit an IConstruct.- Specified by:
visitin interfacesoftware.amazon.awscdk.IAspect- Parameters:
node- This parameter is required.
-
getReadPackName
@Stability(Stable) @NotNull public String getReadPackName()
-
getLoggers
@Stability(Stable) @NotNull protected List<INagLogger> getLoggers()
-
setLoggers
@Stability(Stable) protected void setLoggers(@NotNull List<INagLogger> value)
-
getPackName
@Stability(Stable) @NotNull protected String getPackName()
-
setPackName
@Stability(Stable) protected void setPackName(@NotNull String value)
-
getPackGlobalSuppressionIgnore
@Stability(Stable) @Nullable protected INagSuppressionIgnore getPackGlobalSuppressionIgnore()
-
setPackGlobalSuppressionIgnore
@Stability(Stable) protected void setPackGlobalSuppressionIgnore(@Nullable INagSuppressionIgnore value)
-
getUserGlobalSuppressionIgnore
@Stability(Stable) @Nullable protected INagSuppressionIgnore getUserGlobalSuppressionIgnore()
-
setUserGlobalSuppressionIgnore
@Stability(Stable) protected void setUserGlobalSuppressionIgnore(@Nullable INagSuppressionIgnore value)
-
-