Class DeployOptions
Options to use with cdk deploy.
Inheritance
Namespace: Amazon.CDK.CloudAssembly.Schema
Assembly: Amazon.CDK.CloudAssembly.Schema.dll
Syntax (csharp)
public class DeployOptions : Object, IDeployOptions, IDefaultCdkOptions
Syntax (vb)
Public Class DeployOptions
Inherits Object
Implements IDeployOptions, IDefaultCdkOptions
Remarks
ExampleMetadata: infused
Examples
var app = new App();
var stackUnderTest = new Stack(app, "StackUnderTest");
var stack = new Stack(app, "stack");
var testCase = new IntegTest(app, "CustomizedDeploymentWorkflow", new IntegTestProps {
TestCases = new [] { stackUnderTest },
DiffAssets = true,
StackUpdateWorkflow = true,
CdkCommandOptions = new CdkCommands {
Deploy = new DeployCommand {
Args = new DeployOptions {
RequireApproval = RequireApproval.NEVER,
Json = true
}
},
Destroy = new DestroyCommand {
Args = new DestroyOptions {
Force = true
}
}
}
});
Synopsis
Constructors
DeployOptions() |
Properties
All | Deploy all stacks. |
App | command-line for executing your app or a cloud assembly directory e.g. "node bin/my-app.js" or "cdk.out". |
AssetMetadata | Include "aws:asset:*" CloudFormation metadata for resources that use assets. |
CaBundlePath | Path to CA certificate to use when validating HTTPS requests. |
ChangeSetName | Optional name to use for the CloudFormation change set. |
Ci | Whether we are on a CI system. |
Color | Show colors and other style from console output. |
Context | Additional context. |
Debug | enable emission of additional debugging information, such as creation stack traces of tokens. |
Ec2Creds | Force trying to fetch EC2 instance credentials. |
Exclusively | Only perform action on the given stack. |
Execute | Whether to execute the ChangeSet Not providing |
Force | Always deploy, even if templates are identical. |
IgnoreErrors | Ignores synthesis errors, which will likely produce an invalid output. |
Json | Use JSON output instead of YAML when templates are printed to STDOUT. |
Lookups | Perform context lookups. |
Notices | Show relevant notices. |
NotificationArns | ARNs of SNS topics that CloudFormation will notify with stack related events. |
Output | Emits the synthesized cloud assembly into a directory. |
OutputsFile | Path to file where stack outputs will be written after a successful deploy as JSON. |
Parameters | Additional parameters for CloudFormation at deploy time. |
PathMetadata | Include "aws:cdk:path" CloudFormation metadata for each resource. |
Profile | Use the indicated AWS profile as the default environment. |
Proxy | Use the indicated proxy. |
RequireApproval | What kind of security changes require approval. |
ReuseAssets | Reuse the assets with the given asset IDs. |
RoleArn | Role to pass to CloudFormation for deployment. |
Rollback | Rollback failed deployments. |
Stacks | List of stacks to deploy. |
Staging | Copy assets to the output directory. |
Strict | Do not construct stacks with warnings. |
ToolkitStackName | Name of the toolkit stack to use/deploy. |
Trace | Print trace for stack warnings. |
UsePreviousParameters | Use previous values for unspecified parameters. |
Verbose | show debug logs. |
VersionReporting | Include "AWS::CDK::Metadata" resource in synthesized templates. |
Constructors
DeployOptions()
public DeployOptions()
Properties
All
Deploy all stacks.
public Nullable<bool> All { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Requried if stacks
is not set
Default: - false
App
command-line for executing your app or a cloud assembly directory e.g. "node bin/my-app.js" or "cdk.out".
public string App { get; set; }
Property Value
System.String
Remarks
Default: - read from cdk.json
AssetMetadata
Include "aws:asset:*" CloudFormation metadata for resources that use assets.
public Nullable<bool> AssetMetadata { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
CaBundlePath
Path to CA certificate to use when validating HTTPS requests.
public string CaBundlePath { get; set; }
Property Value
System.String
Remarks
Default: - read from AWS_CA_BUNDLE environment variable
ChangeSetName
Optional name to use for the CloudFormation change set.
public string ChangeSetName { get; set; }
Property Value
System.String
Remarks
If not provided, a name will be generated automatically.
Default: - auto generate a name
Ci
Whether we are on a CI system.
public Nullable<bool> Ci { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Color
Show colors and other style from console output.
public Nullable<bool> Color { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
Context
Additional context.
public IDictionary<string, string> Context { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - no additional context
Debug
enable emission of additional debugging information, such as creation stack traces of tokens.
public Nullable<bool> Debug { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Ec2Creds
Force trying to fetch EC2 instance credentials.
public Nullable<bool> Ec2Creds { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - guess EC2 instance status
Exclusively
Only perform action on the given stack.
public Nullable<bool> Exclusively { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Execute
Whether to execute the ChangeSet Not providing execute
parameter will result in execution of ChangeSet.
public Nullable<bool> Execute { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
Force
Always deploy, even if templates are identical.
public Nullable<bool> Force { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
IgnoreErrors
Ignores synthesis errors, which will likely produce an invalid output.
public Nullable<bool> IgnoreErrors { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Json
Use JSON output instead of YAML when templates are printed to STDOUT.
public Nullable<bool> Json { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Lookups
Perform context lookups.
public Nullable<bool> Lookups { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Synthesis fails if this is disabled and context lookups need to be performed
Default: true
Notices
Show relevant notices.
public Nullable<bool> Notices { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
NotificationArns
ARNs of SNS topics that CloudFormation will notify with stack related events.
public string[] NotificationArns { get; set; }
Property Value
System.String[]
Remarks
Default: - no notifications
Output
Emits the synthesized cloud assembly into a directory.
public string Output { get; set; }
Property Value
System.String
Remarks
Default: cdk.out
OutputsFile
Path to file where stack outputs will be written after a successful deploy as JSON.
public string OutputsFile { get; set; }
Property Value
System.String
Remarks
Default: - Outputs are not written to any file
Parameters
Additional parameters for CloudFormation at deploy time.
public IDictionary<string, string> Parameters { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: {}
PathMetadata
Include "aws:cdk:path" CloudFormation metadata for each resource.
public Nullable<bool> PathMetadata { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
Profile
Use the indicated AWS profile as the default environment.
public string Profile { get; set; }
Property Value
System.String
Remarks
Default: - no profile is used
Proxy
Use the indicated proxy.
public string Proxy { get; set; }
Property Value
System.String
Remarks
Will read from HTTPS_PROXY environment if specified
Default: - no proxy
RequireApproval
What kind of security changes require approval.
public Nullable<RequireApproval> RequireApproval { get; set; }
Property Value
System.Nullable<RequireApproval>
Remarks
Default: RequireApproval.Never
ReuseAssets
Reuse the assets with the given asset IDs.
public string[] ReuseAssets { get; set; }
Property Value
System.String[]
Remarks
Default: - do not reuse assets
RoleArn
Role to pass to CloudFormation for deployment.
public string RoleArn { get; set; }
Property Value
System.String
Remarks
Default: - use the bootstrap cfn-exec role
Rollback
Rollback failed deployments.
public Nullable<bool> Rollback { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
Stacks
List of stacks to deploy.
public string[] Stacks { get; set; }
Property Value
System.String[]
Remarks
Requried if all
is not set
Default: - []
Staging
Copy assets to the output directory.
public Nullable<bool> Staging { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Needed for local debugging the source files with SAM CLI
Default: false
Strict
Do not construct stacks with warnings.
public Nullable<bool> Strict { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
ToolkitStackName
Name of the toolkit stack to use/deploy.
public string ToolkitStackName { get; set; }
Property Value
System.String
Remarks
Default: CDKToolkit
Trace
Print trace for stack warnings.
public Nullable<bool> Trace { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
UsePreviousParameters
Use previous values for unspecified parameters.
public Nullable<bool> UsePreviousParameters { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
If not set, all parameters must be specified for every deployment.
Default: true
Verbose
show debug logs.
public Nullable<bool> Verbose { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
VersionReporting
Include "AWS::CDK::Metadata" resource in synthesized templates.
public Nullable<bool> VersionReporting { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true