Class: AWSCDK::CloudAssemblySchema::DefaultCDKOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_assembly_schema/default_cdk_options.rb

Overview

Default CDK CLI options that apply to all commands.

Direct Known Subclasses

DeployOptions, DestroyOptions

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) ⇒ DefaultCDKOptions

Returns a new instance of DefaultCDKOptions.

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.



30
31
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
# File 'cloud_assembly_schema/default_cdk_options.rb', line 30

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)
  @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?
end

Instance Attribute Details

#allBoolean? (readonly)

Note:

Default: - false

Deploy all stacks.

Requried if stacks is not set

Returns:

  • (Boolean, nil)


85
86
87
# File 'cloud_assembly_schema/default_cdk_options.rb', line 85

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)


90
91
92
# File 'cloud_assembly_schema/default_cdk_options.rb', line 90

def app
  @app
end

#asset_metadataBoolean? (readonly)

Note:

Default: true

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

Returns:

  • (Boolean, nil)


95
96
97
# File 'cloud_assembly_schema/default_cdk_options.rb', line 95

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)


100
101
102
# File 'cloud_assembly_schema/default_cdk_options.rb', line 100

def ca_bundle_path
  @ca_bundle_path
end

#colorBoolean? (readonly)

Note:

Default: true

Show colors and other style from console output.

Returns:

  • (Boolean, nil)


105
106
107
# File 'cloud_assembly_schema/default_cdk_options.rb', line 105

def color
  @color
end

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

Note:

Default: - no additional context

Additional context.

Returns:

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


110
111
112
# File 'cloud_assembly_schema/default_cdk_options.rb', line 110

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)


115
116
117
# File 'cloud_assembly_schema/default_cdk_options.rb', line 115

def debug
  @debug
end

#ec2_credsBoolean? (readonly)

Note:

Default: - guess EC2 instance status

Force trying to fetch EC2 instance credentials.

Returns:

  • (Boolean, nil)


120
121
122
# File 'cloud_assembly_schema/default_cdk_options.rb', line 120

def ec2_creds
  @ec2_creds
end

#ignore_errorsBoolean? (readonly)

Note:

Default: false

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

Returns:

  • (Boolean, nil)


125
126
127
# File 'cloud_assembly_schema/default_cdk_options.rb', line 125

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)


130
131
132
# File 'cloud_assembly_schema/default_cdk_options.rb', line 130

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)


138
139
140
# File 'cloud_assembly_schema/default_cdk_options.rb', line 138

def lookups
  @lookups
end

#noticesBoolean? (readonly)

Note:

Default: true

Show relevant notices.

Returns:

  • (Boolean, nil)


143
144
145
# File 'cloud_assembly_schema/default_cdk_options.rb', line 143

def notices
  @notices
end

#outputString? (readonly)

Note:

Default: cdk.out

Emits the synthesized cloud assembly into a directory.

Returns:

  • (String, nil)


148
149
150
# File 'cloud_assembly_schema/default_cdk_options.rb', line 148

def output
  @output
end

#path_metadataBoolean? (readonly)

Note:

Default: true

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

Returns:

  • (Boolean, nil)


153
154
155
# File 'cloud_assembly_schema/default_cdk_options.rb', line 153

def 
  @path_metadata
end

#profileString? (readonly)

Note:

Default: - no profile is used

Use the indicated AWS profile as the default environment.

Returns:

  • (String, nil)


158
159
160
# File 'cloud_assembly_schema/default_cdk_options.rb', line 158

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)


166
167
168
# File 'cloud_assembly_schema/default_cdk_options.rb', line 166

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)


171
172
173
# File 'cloud_assembly_schema/default_cdk_options.rb', line 171

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)


178
179
180
# File 'cloud_assembly_schema/default_cdk_options.rb', line 178

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)


185
186
187
# File 'cloud_assembly_schema/default_cdk_options.rb', line 185

def staging
  @staging
end

#strictBoolean? (readonly)

Note:

Default: false

Do not construct stacks with warnings.

Returns:

  • (Boolean, nil)


190
191
192
# File 'cloud_assembly_schema/default_cdk_options.rb', line 190

def strict
  @strict
end

#traceBoolean? (readonly)

Note:

Default: false

Print trace for stack warnings.

Returns:

  • (Boolean, nil)


195
196
197
# File 'cloud_assembly_schema/default_cdk_options.rb', line 195

def trace
  @trace
end

#verboseBoolean? (readonly)

Note:

Default: false

show debug logs.

Returns:

  • (Boolean, nil)


200
201
202
# File 'cloud_assembly_schema/default_cdk_options.rb', line 200

def verbose
  @verbose
end

#version_reportingBoolean? (readonly)

Note:

Default: true

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

Returns:

  • (Boolean, nil)


205
206
207
# File 'cloud_assembly_schema/default_cdk_options.rb', line 205

def version_reporting
  @version_reporting
end

Class Method Details

.jsii_propertiesObject



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'cloud_assembly_schema/default_cdk_options.rb', line 207

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",
  }
end

Instance Method Details

#to_jsiiObject



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'cloud_assembly_schema/default_cdk_options.rb', line 235

def to_jsii
  result = {}
  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,
  })
  result.compact
end