# DestroyOptions

Options to use with cdk destroy.

Extends: DestroyOptions
Extends: DefaultCdkOptions

- Source: [`node_modules/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/destroy.d.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/destroy.d.ts#L5)
- 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 destroyOptions: cloud_assembly_schema.DestroyOptions = {
  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,
};
```

## Properties

- `all`: boolean = false — Deploy all stacks.

  Requried if `stacks` is not set

- `app`: string — command-line for executing your app or a cloud assembly directory e.g. "node bin/my-app.js" or "cdk.out".

  **Default:** read from cdk.json

- `assetMetadata`: boolean = true — Include "aws:asset:*" CloudFormation metadata for resources that use assets.

- `caBundlePath`: string — Path to CA certificate to use when validating HTTPS requests.

  **Default:** read from AWS_CA_BUNDLE environment variable

- `color`: boolean = true — Show colors and other style from console output.

- `context`: { [key: string]: string } — Additional context.

  **Default:** no additional context

- `debug`: boolean = false — enable emission of additional debugging information, such as creation stack traces of tokens.

- `ec2Creds`: boolean — Force trying to fetch EC2 instance credentials.

  **Default:** guess EC2 instance status

- `exclusively`: boolean = false — Only destroy the given stack.

- `force`: boolean = false — Do not ask for permission before destroying stacks.

- `ignoreErrors`: boolean = false — Ignores synthesis errors, which will likely produce an invalid output.

- `json`: boolean = false — Use JSON output instead of YAML when templates are printed to STDOUT.

- `lookups`: boolean = true — Perform context lookups.

  Synthesis fails if this is disabled and context lookups need
  to be performed

- `notices`: boolean = true — Show relevant notices.

- `output`: string = cdk.out — Emits the synthesized cloud assembly into a directory.

- `pathMetadata`: boolean = true — Include "aws:cdk:path" CloudFormation metadata for each resource.

- `profile`: string — Use the indicated AWS profile as the default environment.

  **Default:** no profile is used

- `proxy`: string — Use the indicated proxy.

  **Default:** no proxy

  Will read from
  HTTPS_PROXY environment if specified

- `roleArn`: string — Role to pass to CloudFormation for deployment.

  **Default:** use the bootstrap cfn-exec role

- `stacks`: string[] = [] — List of stacks to deploy.

  Requried if `all` is not set

- `staging`: boolean = false — Copy assets to the output directory.

  Needed for local debugging the source files with SAM CLI

- `strict`: boolean = false — Do not construct stacks with warnings.

- `trace`: boolean = false — Print trace for stack warnings.

- `verbose`: boolean = false — show debug logs.

- `versionReporting`: boolean = true — Include "AWS::CDK::Metadata" resource in synthesized templates.
