# DestroyCommand

Represents a cdk destroy command.

Extends: DestroyCommand
Extends: CdkCommand

- Source: [`node_modules/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.d.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.d.ts#L169)
- Type last changed: v2.20.0 · 7 Apr 2022

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const destroyCommand: cloud_assembly_schema.DestroyCommand = {
  args: {
    all: false,
    app: 'app',
    assetMetadata: false,
    caBundlePath: 'caBundlePath',
    color: false,
    context: {
      contextKey: 'context',
    },
    debug: false,
    ec2Creds: false,
    exclusively: false,
    force: false,
    ignoreErrors: false,
    json: false,
    lookups: false,
    notices: false,
    output: 'output',
    pathMetadata: false,
    profile: 'profile',
    proxy: 'proxy',
    roleArn: 'roleArn',
    stacks: ['stacks'],
    staging: false,
    strict: false,
    trace: false,
    verbose: false,
    versionReporting: false,
  },
  enabled: false,
  expectedMessage: 'expectedMessage',
  expectError: false,
};
```

## Properties

- `args`: [DestroyOptions](/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DestroyOptions.html) — Additional arguments to pass to the command This can be used to test specific CLI functionality.

  **Default:** only default args are used

- `enabled`: boolean = true — 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.

- `expectedMessage`: string — This can be used in combination with `expectedError` to validate that a specific message is returned.

  **Default:** do not validate message

- `expectError`: boolean = false — If the runner should expect this command to fail.
