Class: AWSCDK::CloudAssemblySchema::DestroyOptions

Inherits:
DefaultCDKOptions
  • Object
show all
Defined in:
cloud_assembly_schema/destroy_options.rb

Overview

Options to use with cdk destroy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(all: nil, app: nil, asset_metadata: nil, ca_bundle_path: nil, color: nil, context: nil, debug: nil, ec2_creds: nil, ignore_errors: nil, json: nil, lookups: nil, notices: nil, output: nil, path_metadata: nil, profile: nil, proxy: nil, role_arn: nil, stacks: nil, staging: nil, strict: nil, trace: nil, verbose: nil, version_reporting: nil, exclusively: nil, force: nil) ⇒ DestroyOptions

Returns a new instance of DestroyOptions.

Parameters:

  • all (Boolean, nil) (defaults to: nil)

    Deploy all stacks.

  • app (String, nil) (defaults to: nil)

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

  • asset_metadata (Boolean, nil) (defaults to: nil)

    Include "aws:asset:*" CloudFormation metadata for resources that use assets.

  • ca_bundle_path (String, nil) (defaults to: nil)

    Path to CA certificate to use when validating HTTPS requests.

  • color (Boolean, nil) (defaults to: nil)

    Show colors and other style from console output.

  • context (Hash{String => String}, nil) (defaults to: nil)

    Additional context.

  • debug (Boolean, nil) (defaults to: nil)

    enable emission of additional debugging information, such as creation stack traces of tokens.

  • ec2_creds (Boolean, nil) (defaults to: nil)

    Force trying to fetch EC2 instance credentials.

  • ignore_errors (Boolean, nil) (defaults to: nil)

    Ignores synthesis errors, which will likely produce an invalid output.

  • json (Boolean, nil) (defaults to: nil)

    Use JSON output instead of YAML when templates are printed to STDOUT.

  • lookups (Boolean, nil) (defaults to: nil)

    Perform context lookups.

  • notices (Boolean, nil) (defaults to: nil)

    Show relevant notices.

  • output (String, nil) (defaults to: nil)

    Emits the synthesized cloud assembly into a directory.

  • path_metadata (Boolean, nil) (defaults to: nil)

    Include "aws:cdk:path" CloudFormation metadata for each resource.

  • profile (String, nil) (defaults to: nil)

    Use the indicated AWS profile as the default environment.

  • proxy (String, nil) (defaults to: nil)

    Use the indicated proxy.

  • role_arn (String, nil) (defaults to: nil)

    Role to pass to CloudFormation for deployment.

  • stacks (Array<String>, nil) (defaults to: nil)

    List of stacks to deploy.

  • staging (Boolean, nil) (defaults to: nil)

    Copy assets to the output directory.

  • strict (Boolean, nil) (defaults to: nil)

    Do not construct stacks with warnings.

  • trace (Boolean, nil) (defaults to: nil)

    Print trace for stack warnings.

  • verbose (Boolean, nil) (defaults to: nil)

    show debug logs.

  • version_reporting (Boolean, nil) (defaults to: nil)

    Include "AWS::CDK::Metadata" resource in synthesized templates.

  • exclusively (Boolean, nil) (defaults to: nil)

    Only destroy the given stack.

  • force (Boolean, nil) (defaults to: nil)

    Do not ask for permission before destroying stacks.



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'cloud_assembly_schema/destroy_options.rb', line 32

def initialize(all: nil, app: nil, asset_metadata: nil, ca_bundle_path: nil, color: nil, context: nil, debug: nil, ec2_creds: nil, ignore_errors: nil, json: nil, lookups: nil, notices: nil, output: nil, path_metadata: nil, profile: nil, proxy: nil, role_arn: nil, stacks: nil, staging: nil, strict: nil, trace: nil, verbose: nil, version_reporting: nil, exclusively: nil, force: nil)
  @all = all
  Jsii::Type.check_type(@all, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "all") unless @all.nil?
  @app = app
  Jsii::Type.check_type(@app, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "app") unless @app.nil?
  @asset_metadata = 
  Jsii::Type.check_type(@asset_metadata, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "assetMetadata") unless @asset_metadata.nil?
  @ca_bundle_path = ca_bundle_path
  Jsii::Type.check_type(@ca_bundle_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "caBundlePath") unless @ca_bundle_path.nil?
  @color = color
  Jsii::Type.check_type(@color, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "color") unless @color.nil?
  @context = context
  Jsii::Type.check_type(@context, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "context") unless @context.nil?
  @debug = debug
  Jsii::Type.check_type(@debug, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "debug") unless @debug.nil?
  @ec2_creds = ec2_creds
  Jsii::Type.check_type(@ec2_creds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ec2Creds") unless @ec2_creds.nil?
  @ignore_errors = ignore_errors
  Jsii::Type.check_type(@ignore_errors, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ignoreErrors") unless @ignore_errors.nil?
  @json = json
  Jsii::Type.check_type(@json, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "json") unless @json.nil?
  @lookups = lookups
  Jsii::Type.check_type(@lookups, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "lookups") unless @lookups.nil?
  @notices = notices
  Jsii::Type.check_type(@notices, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "notices") unless @notices.nil?
  @output = output
  Jsii::Type.check_type(@output, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "output") unless @output.nil?
  @path_metadata = 
  Jsii::Type.check_type(@path_metadata, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "pathMetadata") unless @path_metadata.nil?
  @profile = profile
  Jsii::Type.check_type(@profile, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "profile") unless @profile.nil?
  @proxy = proxy
  Jsii::Type.check_type(@proxy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "proxy") unless @proxy.nil?
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") unless @role_arn.nil?
  @stacks = stacks
  Jsii::Type.check_type(@stacks, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "stacks") unless @stacks.nil?
  @staging = staging
  Jsii::Type.check_type(@staging, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "staging") unless @staging.nil?
  @strict = strict
  Jsii::Type.check_type(@strict, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "strict") unless @strict.nil?
  @trace = trace
  Jsii::Type.check_type(@trace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "trace") unless @trace.nil?
  @verbose = verbose
  Jsii::Type.check_type(@verbose, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "verbose") unless @verbose.nil?
  @version_reporting = version_reporting
  Jsii::Type.check_type(@version_reporting, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "versionReporting") unless @version_reporting.nil?
  @exclusively = exclusively
  Jsii::Type.check_type(@exclusively, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "exclusively") unless @exclusively.nil?
  @force = force
  Jsii::Type.check_type(@force, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "force") unless @force.nil?
end

Instance Attribute Details

#allBoolean? (readonly)

Note:

Default: - false

Deploy all stacks.

Requried if stacks is not set

Returns:

  • (Boolean, nil)


91
92
93
# File 'cloud_assembly_schema/destroy_options.rb', line 91

def all
  @all
end

#appString? (readonly)

Note:

Default: - read from cdk.json

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

Returns:

  • (String, nil)


96
97
98
# File 'cloud_assembly_schema/destroy_options.rb', line 96

def app
  @app
end

#asset_metadataBoolean? (readonly)

Note:

Default: true

Include "aws:asset:*" CloudFormation metadata for resources that use assets.

Returns:

  • (Boolean, nil)


101
102
103
# File 'cloud_assembly_schema/destroy_options.rb', line 101

def 
  @asset_metadata
end

#ca_bundle_pathString? (readonly)

Note:

Default: - read from AWS_CA_BUNDLE environment variable

Path to CA certificate to use when validating HTTPS requests.

Returns:

  • (String, nil)


106
107
108
# File 'cloud_assembly_schema/destroy_options.rb', line 106

def ca_bundle_path
  @ca_bundle_path
end

#colorBoolean? (readonly)

Note:

Default: true

Show colors and other style from console output.

Returns:

  • (Boolean, nil)


111
112
113
# File 'cloud_assembly_schema/destroy_options.rb', line 111

def color
  @color
end

#contextHash{String => String}? (readonly)

Note:

Default: - no additional context

Additional context.

Returns:

  • (Hash{String => String}, nil)


116
117
118
# File 'cloud_assembly_schema/destroy_options.rb', line 116

def context
  @context
end

#debugBoolean? (readonly)

Note:

Default: false

enable emission of additional debugging information, such as creation stack traces of tokens.

Returns:

  • (Boolean, nil)


121
122
123
# File 'cloud_assembly_schema/destroy_options.rb', line 121

def debug
  @debug
end

#ec2_credsBoolean? (readonly)

Note:

Default: - guess EC2 instance status

Force trying to fetch EC2 instance credentials.

Returns:

  • (Boolean, nil)


126
127
128
# File 'cloud_assembly_schema/destroy_options.rb', line 126

def ec2_creds
  @ec2_creds
end

#exclusivelyBoolean? (readonly)

Note:

Default: false

Only destroy the given stack.

Returns:

  • (Boolean, nil)


216
217
218
# File 'cloud_assembly_schema/destroy_options.rb', line 216

def exclusively
  @exclusively
end

#forceBoolean? (readonly)

Note:

Default: false

Do not ask for permission before destroying stacks.

Returns:

  • (Boolean, nil)


221
222
223
# File 'cloud_assembly_schema/destroy_options.rb', line 221

def force
  @force
end

#ignore_errorsBoolean? (readonly)

Note:

Default: false

Ignores synthesis errors, which will likely produce an invalid output.

Returns:

  • (Boolean, nil)


131
132
133
# File 'cloud_assembly_schema/destroy_options.rb', line 131

def ignore_errors
  @ignore_errors
end

#jsonBoolean? (readonly)

Note:

Default: false

Use JSON output instead of YAML when templates are printed to STDOUT.

Returns:

  • (Boolean, nil)


136
137
138
# File 'cloud_assembly_schema/destroy_options.rb', line 136

def json
  @json
end

#lookupsBoolean? (readonly)

Note:

Default: true

Perform context lookups.

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

Returns:

  • (Boolean, nil)


144
145
146
# File 'cloud_assembly_schema/destroy_options.rb', line 144

def lookups
  @lookups
end

#noticesBoolean? (readonly)

Note:

Default: true

Show relevant notices.

Returns:

  • (Boolean, nil)


149
150
151
# File 'cloud_assembly_schema/destroy_options.rb', line 149

def notices
  @notices
end

#outputString? (readonly)

Note:

Default: cdk.out

Emits the synthesized cloud assembly into a directory.

Returns:

  • (String, nil)


154
155
156
# File 'cloud_assembly_schema/destroy_options.rb', line 154

def output
  @output
end

#path_metadataBoolean? (readonly)

Note:

Default: true

Include "aws:cdk:path" CloudFormation metadata for each resource.

Returns:

  • (Boolean, nil)


159
160
161
# File 'cloud_assembly_schema/destroy_options.rb', line 159

def 
  @path_metadata
end

#profileString? (readonly)

Note:

Default: - no profile is used

Use the indicated AWS profile as the default environment.

Returns:

  • (String, nil)


164
165
166
# File 'cloud_assembly_schema/destroy_options.rb', line 164

def profile
  @profile
end

#proxyString? (readonly)

Note:

Default: - no proxy

Use the indicated proxy.

Will read from HTTPS_PROXY environment if specified

Returns:

  • (String, nil)


172
173
174
# File 'cloud_assembly_schema/destroy_options.rb', line 172

def proxy
  @proxy
end

#role_arnString? (readonly)

Note:

Default: - use the bootstrap cfn-exec role

Role to pass to CloudFormation for deployment.

Returns:

  • (String, nil)


177
178
179
# File 'cloud_assembly_schema/destroy_options.rb', line 177

def role_arn
  @role_arn
end

#stacksArray<String>? (readonly)

Note:

Default: - []

List of stacks to deploy.

Requried if all is not set

Returns:

  • (Array<String>, nil)


184
185
186
# File 'cloud_assembly_schema/destroy_options.rb', line 184

def stacks
  @stacks
end

#stagingBoolean? (readonly)

Note:

Default: false

Copy assets to the output directory.

Needed for local debugging the source files with SAM CLI

Returns:

  • (Boolean, nil)


191
192
193
# File 'cloud_assembly_schema/destroy_options.rb', line 191

def staging
  @staging
end

#strictBoolean? (readonly)

Note:

Default: false

Do not construct stacks with warnings.

Returns:

  • (Boolean, nil)


196
197
198
# File 'cloud_assembly_schema/destroy_options.rb', line 196

def strict
  @strict
end

#traceBoolean? (readonly)

Note:

Default: false

Print trace for stack warnings.

Returns:

  • (Boolean, nil)


201
202
203
# File 'cloud_assembly_schema/destroy_options.rb', line 201

def trace
  @trace
end

#verboseBoolean? (readonly)

Note:

Default: false

show debug logs.

Returns:

  • (Boolean, nil)


206
207
208
# File 'cloud_assembly_schema/destroy_options.rb', line 206

def verbose
  @verbose
end

#version_reportingBoolean? (readonly)

Note:

Default: true

Include "AWS::CDK::Metadata" resource in synthesized templates.

Returns:

  • (Boolean, nil)


211
212
213
# File 'cloud_assembly_schema/destroy_options.rb', line 211

def version_reporting
  @version_reporting
end

Class Method Details

.jsii_propertiesObject



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'cloud_assembly_schema/destroy_options.rb', line 223

def self.jsii_properties
  {
    :all => "all",
    :app => "app",
    :asset_metadata => "assetMetadata",
    :ca_bundle_path => "caBundlePath",
    :color => "color",
    :context => "context",
    :debug => "debug",
    :ec2_creds => "ec2Creds",
    :ignore_errors => "ignoreErrors",
    :json => "json",
    :lookups => "lookups",
    :notices => "notices",
    :output => "output",
    :path_metadata => "pathMetadata",
    :profile => "profile",
    :proxy => "proxy",
    :role_arn => "roleArn",
    :stacks => "stacks",
    :staging => "staging",
    :strict => "strict",
    :trace => "trace",
    :verbose => "verbose",
    :version_reporting => "versionReporting",
    :exclusively => "exclusively",
    :force => "force",
  }
end

Instance Method Details

#to_jsiiObject



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'cloud_assembly_schema/destroy_options.rb', line 253

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "all" => @all,
    "app" => @app,
    "assetMetadata" => @asset_metadata,
    "caBundlePath" => @ca_bundle_path,
    "color" => @color,
    "context" => @context,
    "debug" => @debug,
    "ec2Creds" => @ec2_creds,
    "ignoreErrors" => @ignore_errors,
    "json" => @json,
    "lookups" => @lookups,
    "notices" => @notices,
    "output" => @output,
    "pathMetadata" => @path_metadata,
    "profile" => @profile,
    "proxy" => @proxy,
    "roleArn" => @role_arn,
    "stacks" => @stacks,
    "staging" => @staging,
    "strict" => @strict,
    "trace" => @trace,
    "verbose" => @verbose,
    "versionReporting" => @version_reporting,
    "exclusively" => @exclusively,
    "force" => @force,
  })
  result.compact
end