DestroyCommand

class aws_cdk.cloud_assembly_schema.DestroyCommand(*, enabled=None, expected_message=None, expect_error=None, args=None)

Bases: CdkCommand

Represents a cdk destroy command.

Parameters:
  • enabled (Optional[bool]) – Whether or not to run this command as part of the workflow This can be used if you only want to test some of the workflow for example enable synth and disable deploy & destroy in order to limit the test to synthesis. Default: true

  • expected_message (Optional[str]) – This can be used in combination with expectedError to validate that a specific message is returned. Default: - do not validate message

  • expect_error (Optional[bool]) – If the runner should expect this command to fail. Default: false

  • args (Union[DestroyOptions, Dict[str, Any], None]) – Additional arguments to pass to the command This can be used to test specific CLI functionality. Default: - only default args are used

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.cloud_assembly_schema as cloud_assembly_schema

destroy_command = cloud_assembly_schema.DestroyCommand(
    args=cloud_assembly_schema.DestroyOptions(
        all=False,
        app="app",
        asset_metadata=False,
        ca_bundle_path="caBundlePath",
        color=False,
        context={
            "context_key": "context"
        },
        debug=False,
        ec2_creds=False,
        exclusively=False,
        force=False,
        ignore_errors=False,
        json=False,
        lookups=False,
        notices=False,
        output="output",
        path_metadata=False,
        profile="profile",
        proxy="proxy",
        role_arn="roleArn",
        stacks=["stacks"],
        staging=False,
        strict=False,
        trace=False,
        verbose=False,
        version_reporting=False
    ),
    enabled=False,
    expected_message="expectedMessage",
    expect_error=False
)

Attributes

args

Additional arguments to pass to the command This can be used to test specific CLI functionality.

Default:
  • only default args are used

enabled

Whether or not to run this command as part of the workflow This can be used if you only want to test some of the workflow for example enable synth and disable deploy & destroy in order to limit the test to synthesis.

Default:

true

expect_error

If the runner should expect this command to fail.

Default:

false

expected_message

This can be used in combination with expectedError to validate that a specific message is returned.

Default:
  • do not validate message