# DeployOptions

Options to use with cdk deploy.

Extends: [DefaultCdkOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DefaultCdkOptions.html)

- Source: [`lib/integ-tests/commands/deploy.ts`](https://github.com/aws/aws-cdk-cli/blob/HEAD/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts)
- Type last changed: v2.184.0 · 13 Mar 2025

## 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 deployOptions: cloud_assembly_schema.DeployOptions = {
  all: false,
  app: 'app',
  assetMetadata: false,
  caBundlePath: 'caBundlePath',
  changeSetName: 'changeSetName',
  ci: false,
  color: false,
  concurrency: 123,
  context: {
    contextKey: 'context',
  },
  debug: false,
  ec2Creds: false,
  exclusively: false,
  execute: false,
  force: false,
  ignoreErrors: false,
  json: false,
  lookups: false,
  notices: false,
  notificationArns: ['notificationArns'],
  output: 'output',
  outputsFile: 'outputsFile',
  parameters: {
    parametersKey: 'parameters',
  },
  pathMetadata: false,
  profile: 'profile',
  proxy: 'proxy',
  requireApproval: cloud_assembly_schema.RequireApproval.NEVER,
  reuseAssets: ['reuseAssets'],
  roleArn: 'roleArn',
  rollback: false,
  stacks: ['stacks'],
  staging: false,
  strict: false,
  toolkitStackName: 'toolkitStackName',
  trace: false,
  usePreviousParameters: false,
  verbose: false,
  versionReporting: false,
};
```

Python:

```python
from aws_cdk.cloud_assembly_schema import DeployOptions
# 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

deploy_options = DeployOptions(
    all=False,
    app="app",
    asset_metadata=False,
    ca_bundle_path="caBundlePath",
    change_set_name="changeSetName",
    ci=False,
    color=False,
    concurrency=123,
    context={
        "context_key": "context"
    },
    debug=False,
    ec2_creds=False,
    exclusively=False,
    execute=False,
    force=False,
    ignore_errors=False,
    json=False,
    lookups=False,
    notices=False,
    notification_arns=["notificationArns"],
    output="output",
    outputs_file="outputsFile",
    parameters={
        "parameters_key": "parameters"
    },
    path_metadata=False,
    profile="profile",
    proxy="proxy",
    require_approval=cloud_assembly_schema.RequireApproval.NEVER,
    reuse_assets=["reuseAssets"],
    role_arn="roleArn",
    rollback=False,
    stacks=["stacks"],
    staging=False,
    strict=False,
    toolkit_stack_name="toolkitStackName",
    trace=False,
    use_previous_parameters=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.*;

DeployOptions deployOptions = DeployOptions.builder()
        .all(false)
        .app("app")
        .assetMetadata(false)
        .caBundlePath("caBundlePath")
        .changeSetName("changeSetName")
        .ci(false)
        .color(false)
        .concurrency(123)
        .context(Map.of(
                "contextKey", "context"))
        .debug(false)
        .ec2Creds(false)
        .exclusively(false)
        .execute(false)
        .force(false)
        .ignoreErrors(false)
        .json(false)
        .lookups(false)
        .notices(false)
        .notificationArns(List.of("notificationArns"))
        .output("output")
        .outputsFile("outputsFile")
        .parameters(Map.of(
                "parametersKey", "parameters"))
        .pathMetadata(false)
        .profile("profile")
        .proxy("proxy")
        .requireApproval(RequireApproval.NEVER)
        .reuseAssets(List.of("reuseAssets"))
        .roleArn("roleArn")
        .rollback(false)
        .stacks(List.of("stacks"))
        .staging(false)
        .strict(false)
        .toolkitStackName("toolkitStackName")
        .trace(false)
        .usePreviousParameters(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 deployOptions = new DeployOptions {
    All = false,
    App = "app",
    AssetMetadata = false,
    CaBundlePath = "caBundlePath",
    ChangeSetName = "changeSetName",
    Ci = false,
    Color = false,
    Concurrency = 123,
    Context = new Dictionary<string, string> {
        { "contextKey", "context" }
    },
    Debug = false,
    Ec2Creds = false,
    Exclusively = false,
    Execute = false,
    Force = false,
    IgnoreErrors = false,
    Json = false,
    Lookups = false,
    Notices = false,
    NotificationArns = new [] { "notificationArns" },
    Output = "output",
    OutputsFile = "outputsFile",
    Parameters = new Dictionary<string, string> {
        { "parametersKey", "parameters" }
    },
    PathMetadata = false,
    Profile = "profile",
    Proxy = "proxy",
    RequireApproval = RequireApproval.NEVER,
    ReuseAssets = new [] { "reuseAssets" },
    RoleArn = "roleArn",
    Rollback = false,
    Stacks = new [] { "stacks" },
    Staging = false,
    Strict = false,
    ToolkitStackName = "toolkitStackName",
    Trace = false,
    UsePreviousParameters = 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"

deployOptions := &DeployOptions{
	All: jsii.Boolean(false),
	App: jsii.String("app"),
	AssetMetadata: jsii.Boolean(false),
	CaBundlePath: jsii.String("caBundlePath"),
	ChangeSetName: jsii.String("changeSetName"),
	Ci: jsii.Boolean(false),
	Color: jsii.Boolean(false),
	Concurrency: jsii.Number(123),
	Context: map[string]*string{
		"contextKey": jsii.String("context"),
	},
	Debug: jsii.Boolean(false),
	Ec2Creds: jsii.Boolean(false),
	Exclusively: jsii.Boolean(false),
	Execute: jsii.Boolean(false),
	Force: jsii.Boolean(false),
	IgnoreErrors: jsii.Boolean(false),
	Json: jsii.Boolean(false),
	Lookups: jsii.Boolean(false),
	Notices: jsii.Boolean(false),
	NotificationArns: []*string{
		jsii.String("notificationArns"),
	},
	Output: jsii.String("output"),
	OutputsFile: jsii.String("outputsFile"),
	Parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	PathMetadata: jsii.Boolean(false),
	Profile: jsii.String("profile"),
	Proxy: jsii.String("proxy"),
	RequireApproval: awscdk.Cloud_assembly_schema.RequireApproval_NEVER,
	ReuseAssets: []*string{
		jsii.String("reuseAssets"),
	},
	RoleArn: jsii.String("roleArn"),
	Rollback: jsii.Boolean(false),
	Stacks: []*string{
		jsii.String("stacks"),
	},
	Staging: jsii.Boolean(false),
	Strict: jsii.Boolean(false),
	ToolkitStackName: jsii.String("toolkitStackName"),
	Trace: jsii.Boolean(false),
	UsePreviousParameters: 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

- `changeSetName`: string — Optional name to use for the CloudFormation change set.

  **Default:** auto generate a name

  If not provided, a name will be generated automatically.

- `ci`: boolean = false — Whether we are on a CI system.

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

- `concurrency`: number = 1 — Deploy multiple stacks in parallel.

- `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 perform action on the given stack.

- `execute`: boolean = true — Whether to execute the ChangeSet Not providing `execute` parameter will result in execution of ChangeSet.

- `force`: boolean = false — Always deploy, even if templates are identical.

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

- `notificationArns`: string[] — ARNs of SNS topics that CloudFormation will notify with stack related events.

  **Default:** no notifications

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

- `outputsFile`: string — Path to file where stack outputs will be written after a successful deploy as JSON.

  **Default:** Outputs are not written to any file

- `parameters`: { [key: string]: string } = {} — Additional parameters for CloudFormation at deploy time.

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

- `requireApproval`: [RequireApproval](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.RequireApproval.html) = RequireApproval.NEVER — What kind of security changes require approval.

- `reuseAssets`: string[] — Reuse the assets with the given asset IDs.

  **Default:** do not reuse assets

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

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

- `rollback`: boolean = true — Rollback failed deployments.

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

- `toolkitStackName`: string = CDKToolkit — Name of the toolkit stack to use/deploy.

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

- `usePreviousParameters`: boolean = true — Use previous values for unspecified parameters.

  If not set, all parameters must be specified for every deployment.

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

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