Class TestOptions.Builder
- java.lang.Object
-
- software.amazon.awscdk.cloudassembly.schema.TestOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TestOptions>
- Enclosing interface:
- TestOptions
@Stability(Stable) public static final class TestOptions.Builder extends Object implements software.amazon.jsii.Builder<TestOptions>
A builder forTestOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestOptions.BuilderallowDestroy(List<String> allowDestroy)Sets the value ofTestOptions.getAllowDestroy()TestOptionsbuild()Builds the configured instance.TestOptions.BuildercdkCommandOptions(CdkCommands cdkCommandOptions)Sets the value ofTestOptions.getCdkCommandOptions()TestOptions.BuilderdiffAssets(Boolean diffAssets)Sets the value ofTestOptions.getDiffAssets()TestOptions.Builderhooks(Hooks hooks)Sets the value ofTestOptions.getHooks()TestOptions.Builderregions(List<String> regions)Sets the value ofTestOptions.getRegions()TestOptions.BuilderstackUpdateWorkflow(Boolean stackUpdateWorkflow)Sets the value ofTestOptions.getStackUpdateWorkflow()
-
-
-
Method Detail
-
allowDestroy
@Stability(Stable) public TestOptions.Builder allowDestroy(List<String> allowDestroy)
Sets the value ofTestOptions.getAllowDestroy()- Parameters:
allowDestroy- List of CloudFormation resource types in this stack that can be destroyed as part of an update without failing the test. This list should only include resources that for this specific integration test we are sure will not cause errors or an outage if destroyed. For example, maybe we know that a new resource will be created first before the old resource is destroyed which prevents any outage.e.g. ['AWS::IAM::Role']
- Returns:
this
-
cdkCommandOptions
@Stability(Stable) public TestOptions.Builder cdkCommandOptions(CdkCommands cdkCommandOptions)
Sets the value ofTestOptions.getCdkCommandOptions()- Parameters:
cdkCommandOptions- Additional options to use for each CDK command.- Returns:
this
-
diffAssets
@Stability(Stable) public TestOptions.Builder diffAssets(Boolean diffAssets)
Sets the value ofTestOptions.getDiffAssets()- Parameters:
diffAssets- Whether or not to include asset hashes in the diff Asset hashes can introduces a lot of unneccessary noise into tests, but there are some cases where asset hashes should be included. For example any tests involving custom resources or bundling- Returns:
this
-
hooks
@Stability(Stable) public TestOptions.Builder hooks(Hooks hooks)
Sets the value ofTestOptions.getHooks()- Parameters:
hooks- Additional commands to run at predefined points in the test workflow. e.g. { postDeploy: ['yarn', 'test'] }- Returns:
this
-
regions
@Stability(Stable) public TestOptions.Builder regions(List<String> regions)
Sets the value ofTestOptions.getRegions()- Parameters:
regions- Limit deployment to these regions.- Returns:
this
-
stackUpdateWorkflow
@Stability(Stable) public TestOptions.Builder stackUpdateWorkflow(Boolean stackUpdateWorkflow)
Sets the value ofTestOptions.getStackUpdateWorkflow()- Parameters:
stackUpdateWorkflow- Run update workflow on this test case This should only be set to false to test scenarios that are not possible to test as part of the update workflow.- Returns:
this
-
build
@Stability(Stable) public TestOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TestOptions>- Returns:
- a new instance of
TestOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-