# DefaultCdkOptions

Default CDK CLI options that apply to all commands.

- Source: [`lib/integ-tests/commands/common.ts`](https://github.com/aws/aws-cdk-cli/blob/HEAD/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/common.ts)
- Type last changed: v2.20.0 · 7 Apr 2022

## Example

TypeScript:

```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 defaultCdkOptions: cloud_assembly_schema.DefaultCdkOptions = {
  all: false,
  app: 'app',
  assetMetadata: false,
  caBundlePath: 'caBundlePath',
  color: false,
  context: {
    contextKey: 'context',
  },
  debug: false,
  ec2Creds: 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,
};
```

Python:

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

default_cdk_options = DefaultCdkOptions(
    all=False,
    app="app",
    asset_metadata=False,
    ca_bundle_path="caBundlePath",
    color=False,
    context={
        "context_key": "context"
    },
    debug=False,
    ec2_creds=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
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloud_assembly_schema.*;

DefaultCdkOptions defaultCdkOptions = DefaultCdkOptions.builder()
        .all(false)
        .app("app")
        .assetMetadata(false)
        .caBundlePath("caBundlePath")
        .color(false)
        .context(Map.of(
                "contextKey", "context"))
        .debug(false)
        .ec2Creds(false)
        .ignoreErrors(false)
        .json(false)
        .lookups(false)
        .notices(false)
        .output("output")
        .pathMetadata(false)
        .profile("profile")
        .proxy("proxy")
        .roleArn("roleArn")
        .stacks(List.of("stacks"))
        .staging(false)
        .strict(false)
        .trace(false)
        .verbose(false)
        .versionReporting(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Cloud_assembly_schema;

var defaultCdkOptions = new DefaultCdkOptions {
    All = false,
    App = "app",
    AssetMetadata = false,
    CaBundlePath = "caBundlePath",
    Color = false,
    Context = new Dictionary<string, string> {
        { "contextKey", "context" }
    },
    Debug = false,
    Ec2Creds = false,
    IgnoreErrors = false,
    Json = false,
    Lookups = false,
    Notices = false,
    Output = "output",
    PathMetadata = false,
    Profile = "profile",
    Proxy = "proxy",
    RoleArn = "roleArn",
    Stacks = new [] { "stacks" },
    Staging = false,
    Strict = false,
    Trace = false,
    Verbose = false,
    VersionReporting = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

defaultCdkOptions := &DefaultCdkOptions{
	All: jsii.Boolean(false),
	App: jsii.String("app"),
	AssetMetadata: jsii.Boolean(false),
	CaBundlePath: jsii.String("caBundlePath"),
	Color: jsii.Boolean(false),
	Context: map[string]*string{
		"contextKey": jsii.String("context"),
	},
	Debug: jsii.Boolean(false),
	Ec2Creds: jsii.Boolean(false),
	IgnoreErrors: jsii.Boolean(false),
	Json: jsii.Boolean(false),
	Lookups: jsii.Boolean(false),
	Notices: jsii.Boolean(false),
	Output: jsii.String("output"),
	PathMetadata: jsii.Boolean(false),
	Profile: jsii.String("profile"),
	Proxy: jsii.String("proxy"),
	RoleArn: jsii.String("roleArn"),
	Stacks: []*string{
		jsii.String("stacks"),
	},
	Staging: jsii.Boolean(false),
	Strict: jsii.Boolean(false),
	Trace: jsii.Boolean(false),
	Verbose: jsii.Boolean(false),
	VersionReporting: jsii.Boolean(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

- `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.
