Class PDKNagAppProps.Builder
- java.lang.Object
-
- software.aws.awsprototypingsdk.pdknag.PDKNagAppProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PDKNagAppProps>
- Enclosing interface:
- PDKNagAppProps
@Stability(Stable) public static final class PDKNagAppProps.Builder extends Object implements software.amazon.jsii.Builder<PDKNagAppProps>
A builder forPDKNagAppProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDKNagAppProps.BuilderanalyticsReporting(Boolean analyticsReporting)Sets the value ofAppProps.getAnalyticsReporting()PDKNagAppProps.BuilderautoSynth(Boolean autoSynth)Sets the value ofAppProps.getAutoSynth()PDKNagAppPropsbuild()Builds the configured instance.PDKNagAppProps.Buildercontext(Map<String,? extends Object> context)Sets the value ofAppProps.getContext()PDKNagAppProps.BuilderfailOnError(Boolean failOnError)Sets the value ofPDKNagAppProps.getFailOnError()PDKNagAppProps.BuilderfailOnWarning(Boolean failOnWarning)Sets the value ofPDKNagAppProps.getFailOnWarning()PDKNagAppProps.BuildernagPacks(List<? extends io.github.cdklabs.cdknag.NagPack> nagPacks)Sets the value ofPDKNagAppProps.getNagPacks()PDKNagAppProps.Builderoutdir(String outdir)Sets the value ofAppProps.getOutdir()PDKNagAppProps.BuilderpostCliContext(Map<String,? extends Object> postCliContext)Sets the value ofAppProps.getPostCliContext()PDKNagAppProps.BuilderstackTraces(Boolean stackTraces)Sets the value ofAppProps.getStackTraces()PDKNagAppProps.BuildertreeMetadata(Boolean treeMetadata)Sets the value ofAppProps.getTreeMetadata()
-
-
-
Method Detail
-
failOnError
@Stability(Stable) public PDKNagAppProps.Builder failOnError(Boolean failOnError)
Sets the value ofPDKNagAppProps.getFailOnError()- Parameters:
failOnError- Determines whether any errors encountered should trigger a test failure.- Returns:
this
-
failOnWarning
@Stability(Stable) public PDKNagAppProps.Builder failOnWarning(Boolean failOnWarning)
Sets the value ofPDKNagAppProps.getFailOnWarning()- Parameters:
failOnWarning- Determines whether any warnings encountered should trigger a test failure.- Returns:
this
-
nagPacks
@Stability(Stable) public PDKNagAppProps.Builder nagPacks(List<? extends io.github.cdklabs.cdknag.NagPack> nagPacks)
Sets the value ofPDKNagAppProps.getNagPacks()- Parameters:
nagPacks- Custom nag packs to execute.- Returns:
this
-
analyticsReporting
@Stability(Stable) public PDKNagAppProps.Builder analyticsReporting(Boolean analyticsReporting)
Sets the value ofAppProps.getAnalyticsReporting()- Parameters:
analyticsReporting- Include runtime versioning information in the Stacks of this app.- Returns:
this
-
autoSynth
@Stability(Stable) public PDKNagAppProps.Builder autoSynth(Boolean autoSynth)
Sets the value ofAppProps.getAutoSynth()- Parameters:
autoSynth- Automatically call `synth()` before the program exits. If you set this, you don't have to callsynth()explicitly. Note that this feature is only available for certain programming languages, and callingsynth()is still recommended.- Returns:
this
-
context
@Stability(Stable) public PDKNagAppProps.Builder context(Map<String,? extends Object> context)
Sets the value ofAppProps.getContext()- Parameters:
context- Additional context values for the application. Context set by the CLI or thecontextkey incdk.jsonhas precedence.Context can be read from any construct using
node.getContext(key).- Returns:
this
-
outdir
@Stability(Stable) public PDKNagAppProps.Builder outdir(String outdir)
Sets the value ofAppProps.getOutdir()- Parameters:
outdir- The output directory into which to emit synthesized artifacts. You should never need to set this value. By default, the value you pass to the CLI's--outputflag will be used, and if you change it to a different directory the CLI will fail to pick up the generated Cloud Assembly.This property is intended for internal and testing use.
- Returns:
this
-
postCliContext
@Stability(Stable) public PDKNagAppProps.Builder postCliContext(Map<String,? extends Object> postCliContext)
Sets the value ofAppProps.getPostCliContext()- Parameters:
postCliContext- Additional context values for the application. Context provided here has precedence over context set by:- The CLI via --context
- The
contextkey incdk.json - The {@link AppProps.context} property
This property is recommended over the {@link AppProps.context} property since you can make final decision over which context value to take in your app.
Context can be read from any construct using
node.getContext(key).- Returns:
this
-
stackTraces
@Stability(Stable) public PDKNagAppProps.Builder stackTraces(Boolean stackTraces)
Sets the value ofAppProps.getStackTraces()- Parameters:
stackTraces- Include construct creation stack trace in the `aws:cdk:trace` metadata key of all constructs.- Returns:
this
-
treeMetadata
@Stability(Stable) public PDKNagAppProps.Builder treeMetadata(Boolean treeMetadata)
Sets the value ofAppProps.getTreeMetadata()- Parameters:
treeMetadata- Include construct tree metadata as part of the Cloud Assembly.- Returns:
this
-
build
@Stability(Stable) public PDKNagAppProps build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PDKNagAppProps>- Returns:
- a new instance of
PDKNagAppProps - Throws:
NullPointerException- if any required attribute was not provided
-
-