Class DestroyOptions
Options to use with cdk destroy.
Inheritance
Namespace: Amazon.CDK.CloudAssembly.Schema
Assembly: Amazon.CDK.CloudAssembly.Schema.dll
Syntax (csharp)
public class DestroyOptions : Object, IDestroyOptions, IDefaultCdkOptions
Syntax (vb)
Public Class DestroyOptions
Inherits Object
Implements IDestroyOptions, 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
DestroyOptions() |
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. |
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 destroy the given stack. |
Force | Do not ask for permission before destroying stacks. |
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. |
Output | Emits the synthesized cloud assembly into a directory. |
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. |
RoleArn | Role to pass to CloudFormation for deployment. |
Stacks | List of stacks to deploy. |
Staging | Copy assets to the output directory. |
Strict | Do not construct stacks with warnings. |
Trace | Print trace for stack warnings. |
Verbose | show debug logs. |
VersionReporting | Include "AWS::CDK::Metadata" resource in synthesized templates. |
Constructors
DestroyOptions()
public DestroyOptions()
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
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 destroy the given stack.
public Nullable<bool> Exclusively { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Force
Do not ask for permission before destroying stacks.
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
Output
Emits the synthesized cloud assembly into a directory.
public string Output { get; set; }
Property Value
System.String
Remarks
Default: cdk.out
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
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
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
Trace
Print trace for stack warnings.
public Nullable<bool> Trace { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
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