All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.aws.awsprototypingsdk.pdknag.PDKNagApp Maven / Gradle / Ivy

The newest version!
package software.aws.awsprototypingsdk.pdknag;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.74.0 (build 6d08790)", date = "2023-02-28T00:38:33.055Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.$Module.class, fqn = "aws-prototyping-sdk.pdk_nag.PDKNagApp")
public class PDKNagApp extends software.amazon.awscdk.App {

    protected PDKNagApp(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected PDKNagApp(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param props
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public PDKNagApp(final @org.jetbrains.annotations.Nullable software.aws.awsprototypingsdk.pdknag.PDKNagAppProps props) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { props });
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public PDKNagApp() {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
    }

    /**
     * @param result This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public void addNagResult(final @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.pdknag.NagResult result) {
        software.amazon.jsii.Kernel.call(this, "addNagResult", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(result, "result is required") });
    }

    /**
     * Returns a list of NagResult.
     * 

* Note: app.synth() must be called before this to retrieve results. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List nagResults() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "nagResults", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.pdknag.NagResult.class)))); } /** * Synthesize this stage into a cloud assembly. *

* Once an assembly has been synthesized, it cannot be modified. Subsequent * calls will return the same assembly. *

* @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.cxapi.CloudAssembly synth(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.StageSynthesisOptions options) { return software.amazon.jsii.Kernel.call(this, "synth", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.cxapi.CloudAssembly.class), new Object[] { options }); } /** * Synthesize this stage into a cloud assembly. *

* Once an assembly has been synthesized, it cannot be modified. Subsequent * calls will return the same assembly. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.cxapi.CloudAssembly synth() { return software.amazon.jsii.Kernel.call(this, "synth", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.cxapi.CloudAssembly.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getNagPacks() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "nagPacks", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdknag.NagPack.class)))); } /** * A fluent builder for {@link software.aws.awsprototypingsdk.pdknag.PDKNagApp}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create() { return new Builder(); } private software.aws.awsprototypingsdk.pdknag.PDKNagAppProps.Builder props; private Builder() { } /** * Include runtime versioning information in the Stacks of this app. *

* Default: Value of 'aws:cdk:version-reporting' context key *

* @return {@code this} * @param analyticsReporting Include runtime versioning information in the Stacks of this app. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder analyticsReporting(final java.lang.Boolean analyticsReporting) { this.props().analyticsReporting(analyticsReporting); return this; } /** * Automatically call `synth()` before the program exits. *

* If you set this, you don't have to call synth() explicitly. Note that * this feature is only available for certain programming languages, and * calling synth() is still recommended. *

* Default: true if running via CDK CLI (`CDK_OUTDIR` is set), `false` * otherwise *

* @return {@code this} * @param autoSynth Automatically call `synth()` before the program exits. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder autoSynth(final java.lang.Boolean autoSynth) { this.props().autoSynth(autoSynth); return this; } /** * Additional context values for the application. *

* Context set by the CLI or the context key in cdk.json has precedence. *

* Context can be read from any construct using node.getContext(key). *

* Default: - no additional context *

* @return {@code this} * @param context Additional context values for the application. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder context(final java.util.Map context) { this.props().context(context); return this; } /** * The stack synthesizer to use by default for all Stacks in the App. *

* The Stack Synthesizer controls aspects of synthesis and deployment, * like how assets are referenced and what IAM roles to use. For more * information, see the README of the main CDK package. *

* Default: - A `DefaultStackSynthesizer` with default settings *

* @return {@code this} * @param defaultStackSynthesizer The stack synthesizer to use by default for all Stacks in the App. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder defaultStackSynthesizer(final software.amazon.awscdk.IReusableStackSynthesizer defaultStackSynthesizer) { this.props().defaultStackSynthesizer(defaultStackSynthesizer); return this; } /** * 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 --output flag 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. *

* Default: - If this value is _not_ set, considers the environment variable `CDK_OUTDIR`. * If `CDK_OUTDIR` is not defined, uses a temp directory. *

* @return {@code this} * @param outdir The output directory into which to emit synthesized artifacts. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder outdir(final java.lang.String outdir) { this.props().outdir(outdir); return this; } /** * Additional context values for the application. *

* Context provided here has precedence over context set by: *

*

    *
  • The CLI via --context
  • *
  • The context key in cdk.json
  • *
  • The AppProps.context property
  • *
*

* This property is recommended over the 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). *

* Default: - no additional context *

* Example: *

*

         * // context from the CLI and from `cdk.json` are stored in the
         * // CDK_CONTEXT env variable
         * const cliContext = JSON.parse(process.env.CDK_CONTEXT!);
         * // determine whether to take the context passed in the CLI or not
         * const determineValue = process.env.PROD ? cliContext.SOMEKEY : 'my-prod-value';
         * new App({
         *   postCliContext: {
         *     SOMEKEY: determineValue,
         *   },
         * });
         * 
*

* @return {@code this} * @param postCliContext Additional context values for the application. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder postCliContext(final java.util.Map postCliContext) { this.props().postCliContext(postCliContext); return this; } /** * Include construct creation stack trace in the `aws:cdk:trace` metadata key of all constructs. *

* Default: true stack traces are included unless `aws:cdk:disable-stack-trace` is set in the context. *

* @return {@code this} * @param stackTraces Include construct creation stack trace in the `aws:cdk:trace` metadata key of all constructs. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder stackTraces(final java.lang.Boolean stackTraces) { this.props().stackTraces(stackTraces); return this; } /** * Include construct tree metadata as part of the Cloud Assembly. *

* Default: true *

* @return {@code this} * @param treeMetadata Include construct tree metadata as part of the Cloud Assembly. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder treeMetadata(final java.lang.Boolean treeMetadata) { this.props().treeMetadata(treeMetadata); return this; } /** * Determines whether any errors encountered should trigger a test failure. *

* Default: false *

* @return {@code this} * @param failOnError Determines whether any errors encountered should trigger a test failure. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder failOnError(final java.lang.Boolean failOnError) { this.props().failOnError(failOnError); return this; } /** * Determines whether any warnings encountered should trigger a test failure. *

* Default: false *

* @return {@code this} * @param failOnWarning Determines whether any warnings encountered should trigger a test failure. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder failOnWarning(final java.lang.Boolean failOnWarning) { this.props().failOnWarning(failOnWarning); return this; } /** * Custom nag packs to execute. *

* Default: DEFAULT_NAG_PACKS *

* @return {@code this} * @param nagPacks Custom nag packs to execute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder nagPacks(final java.util.List nagPacks) { this.props().nagPacks(nagPacks); return this; } /** * @returns a newly built instance of {@link software.aws.awsprototypingsdk.pdknag.PDKNagApp}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.aws.awsprototypingsdk.pdknag.PDKNagApp build() { return new software.aws.awsprototypingsdk.pdknag.PDKNagApp( this.props != null ? this.props.build() : null ); } private software.aws.awsprototypingsdk.pdknag.PDKNagAppProps.Builder props() { if (this.props == null) { this.props = new software.aws.awsprototypingsdk.pdknag.PDKNagAppProps.Builder(); } return this.props; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy