low-cost-ecs 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/API.md ADDED
@@ -0,0 +1,1184 @@
1
+ # API Reference <a name="API Reference" id="api-reference"></a>
2
+
3
+ ## Constructs <a name="Constructs" id="Constructs"></a>
4
+
5
+ ### LowCostECS <a name="LowCostECS" id="low-cost-ecs.LowCostECS"></a>
6
+
7
+ #### Initializers <a name="Initializers" id="low-cost-ecs.LowCostECS.Initializer"></a>
8
+
9
+ ```typescript
10
+ import { LowCostECS } from 'low-cost-ecs'
11
+
12
+ new LowCostECS(scope: Construct, id: string, props: LowCostECSProps)
13
+ ```
14
+
15
+ | **Name** | **Type** | **Description** |
16
+ | --- | --- | --- |
17
+ | <code><a href="#low-cost-ecs.LowCostECS.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
18
+ | <code><a href="#low-cost-ecs.LowCostECS.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
19
+ | <code><a href="#low-cost-ecs.LowCostECS.Initializer.parameter.props">props</a></code> | <code><a href="#low-cost-ecs.LowCostECSProps">LowCostECSProps</a></code> | *No description.* |
20
+
21
+ ---
22
+
23
+ ##### `scope`<sup>Required</sup> <a name="scope" id="low-cost-ecs.LowCostECS.Initializer.parameter.scope"></a>
24
+
25
+ - *Type:* constructs.Construct
26
+
27
+ ---
28
+
29
+ ##### `id`<sup>Required</sup> <a name="id" id="low-cost-ecs.LowCostECS.Initializer.parameter.id"></a>
30
+
31
+ - *Type:* string
32
+
33
+ ---
34
+
35
+ ##### `props`<sup>Required</sup> <a name="props" id="low-cost-ecs.LowCostECS.Initializer.parameter.props"></a>
36
+
37
+ - *Type:* <a href="#low-cost-ecs.LowCostECSProps">LowCostECSProps</a>
38
+
39
+ ---
40
+
41
+ #### Methods <a name="Methods" id="Methods"></a>
42
+
43
+ | **Name** | **Description** |
44
+ | --- | --- |
45
+ | <code><a href="#low-cost-ecs.LowCostECS.toString">toString</a></code> | Returns a string representation of this construct. |
46
+ | <code><a href="#low-cost-ecs.LowCostECS.addDependency">addDependency</a></code> | Add a dependency between this stack and another stack. |
47
+ | <code><a href="#low-cost-ecs.LowCostECS.addTransform">addTransform</a></code> | Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template. |
48
+ | <code><a href="#low-cost-ecs.LowCostECS.exportValue">exportValue</a></code> | Create a CloudFormation Export for a value. |
49
+ | <code><a href="#low-cost-ecs.LowCostECS.formatArn">formatArn</a></code> | Creates an ARN from components. |
50
+ | <code><a href="#low-cost-ecs.LowCostECS.getLogicalId">getLogicalId</a></code> | Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource. |
51
+ | <code><a href="#low-cost-ecs.LowCostECS.regionalFact">regionalFact</a></code> | Look up a fact value for the given fact for the region of this stack. |
52
+ | <code><a href="#low-cost-ecs.LowCostECS.renameLogicalId">renameLogicalId</a></code> | Rename a generated logical identities. |
53
+ | <code><a href="#low-cost-ecs.LowCostECS.reportMissingContextKey">reportMissingContextKey</a></code> | Indicate that a context key was expected. |
54
+ | <code><a href="#low-cost-ecs.LowCostECS.resolve">resolve</a></code> | Resolve a tokenized value in the context of the current stack. |
55
+ | <code><a href="#low-cost-ecs.LowCostECS.splitArn">splitArn</a></code> | Splits the provided ARN into its components. |
56
+ | <code><a href="#low-cost-ecs.LowCostECS.toJsonString">toJsonString</a></code> | Convert an object, potentially containing tokens, to a JSON string. |
57
+
58
+ ---
59
+
60
+ ##### `toString` <a name="toString" id="low-cost-ecs.LowCostECS.toString"></a>
61
+
62
+ ```typescript
63
+ public toString(): string
64
+ ```
65
+
66
+ Returns a string representation of this construct.
67
+
68
+ ##### `addDependency` <a name="addDependency" id="low-cost-ecs.LowCostECS.addDependency"></a>
69
+
70
+ ```typescript
71
+ public addDependency(target: Stack, reason?: string): void
72
+ ```
73
+
74
+ Add a dependency between this stack and another stack.
75
+
76
+ This can be used to define dependencies between any two stacks within an
77
+ app, and also supports nested stacks.
78
+
79
+ ###### `target`<sup>Required</sup> <a name="target" id="low-cost-ecs.LowCostECS.addDependency.parameter.target"></a>
80
+
81
+ - *Type:* aws-cdk-lib.Stack
82
+
83
+ ---
84
+
85
+ ###### `reason`<sup>Optional</sup> <a name="reason" id="low-cost-ecs.LowCostECS.addDependency.parameter.reason"></a>
86
+
87
+ - *Type:* string
88
+
89
+ ---
90
+
91
+ ##### `addTransform` <a name="addTransform" id="low-cost-ecs.LowCostECS.addTransform"></a>
92
+
93
+ ```typescript
94
+ public addTransform(transform: string): void
95
+ ```
96
+
97
+ Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template.
98
+
99
+ Duplicate values are removed when stack is synthesized.
100
+
101
+ > [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html)
102
+
103
+ *Example*
104
+
105
+ ```typescript
106
+ declare const stack: Stack;
107
+
108
+ stack.addTransform('AWS::Serverless-2016-10-31')
109
+ ```
110
+
111
+
112
+ ###### `transform`<sup>Required</sup> <a name="transform" id="low-cost-ecs.LowCostECS.addTransform.parameter.transform"></a>
113
+
114
+ - *Type:* string
115
+
116
+ The transform to add.
117
+
118
+ ---
119
+
120
+ ##### `exportValue` <a name="exportValue" id="low-cost-ecs.LowCostECS.exportValue"></a>
121
+
122
+ ```typescript
123
+ public exportValue(exportedValue: any, options?: ExportValueOptions): string
124
+ ```
125
+
126
+ Create a CloudFormation Export for a value.
127
+
128
+ Returns a string representing the corresponding `Fn.importValue()`
129
+ expression for this Export. You can control the name for the export by
130
+ passing the `name` option.
131
+
132
+ If you don't supply a value for `name`, the value you're exporting must be
133
+ a Resource attribute (for example: `bucket.bucketName`) and it will be
134
+ given the same name as the automatic cross-stack reference that would be created
135
+ if you used the attribute in another Stack.
136
+
137
+ One of the uses for this method is to *remove* the relationship between
138
+ two Stacks established by automatic cross-stack references. It will
139
+ temporarily ensure that the CloudFormation Export still exists while you
140
+ remove the reference from the consuming stack. After that, you can remove
141
+ the resource and the manual export.
142
+
143
+ ## Example
144
+
145
+ Here is how the process works. Let's say there are two stacks,
146
+ `producerStack` and `consumerStack`, and `producerStack` has a bucket
147
+ called `bucket`, which is referenced by `consumerStack` (perhaps because
148
+ an AWS Lambda Function writes into it, or something like that).
149
+
150
+ It is not safe to remove `producerStack.bucket` because as the bucket is being
151
+ deleted, `consumerStack` might still be using it.
152
+
153
+ Instead, the process takes two deployments:
154
+
155
+ ### Deployment 1: break the relationship
156
+
157
+ - Make sure `consumerStack` no longer references `bucket.bucketName` (maybe the consumer
158
+ stack now uses its own bucket, or it writes to an AWS DynamoDB table, or maybe you just
159
+ remove the Lambda Function altogether).
160
+ - In the `ProducerStack` class, call `this.exportValue(this.bucket.bucketName)`. This
161
+ will make sure the CloudFormation Export continues to exist while the relationship
162
+ between the two stacks is being broken.
163
+ - Deploy (this will effectively only change the `consumerStack`, but it's safe to deploy both).
164
+
165
+ ### Deployment 2: remove the bucket resource
166
+
167
+ - You are now free to remove the `bucket` resource from `producerStack`.
168
+ - Don't forget to remove the `exportValue()` call as well.
169
+ - Deploy again (this time only the `producerStack` will be changed -- the bucket will be deleted).
170
+
171
+ ###### `exportedValue`<sup>Required</sup> <a name="exportedValue" id="low-cost-ecs.LowCostECS.exportValue.parameter.exportedValue"></a>
172
+
173
+ - *Type:* any
174
+
175
+ ---
176
+
177
+ ###### `options`<sup>Optional</sup> <a name="options" id="low-cost-ecs.LowCostECS.exportValue.parameter.options"></a>
178
+
179
+ - *Type:* aws-cdk-lib.ExportValueOptions
180
+
181
+ ---
182
+
183
+ ##### `formatArn` <a name="formatArn" id="low-cost-ecs.LowCostECS.formatArn"></a>
184
+
185
+ ```typescript
186
+ public formatArn(components: ArnComponents): string
187
+ ```
188
+
189
+ Creates an ARN from components.
190
+
191
+ If `partition`, `region` or `account` are not specified, the stack's
192
+ partition, region and account will be used.
193
+
194
+ If any component is the empty string, an empty string will be inserted
195
+ into the generated ARN at the location that component corresponds to.
196
+
197
+ The ARN will be formatted as follows:
198
+
199
+ arn:{partition}:{service}:{region}:{account}:{resource}{sep}{resource-name}
200
+
201
+ The required ARN pieces that are omitted will be taken from the stack that
202
+ the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope
203
+ can be 'undefined'.
204
+
205
+ ###### `components`<sup>Required</sup> <a name="components" id="low-cost-ecs.LowCostECS.formatArn.parameter.components"></a>
206
+
207
+ - *Type:* aws-cdk-lib.ArnComponents
208
+
209
+ ---
210
+
211
+ ##### `getLogicalId` <a name="getLogicalId" id="low-cost-ecs.LowCostECS.getLogicalId"></a>
212
+
213
+ ```typescript
214
+ public getLogicalId(element: CfnElement): string
215
+ ```
216
+
217
+ Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource.
218
+
219
+ This method is called when a `CfnElement` is created and used to render the
220
+ initial logical identity of resources. Logical ID renames are applied at
221
+ this stage.
222
+
223
+ This method uses the protected method `allocateLogicalId` to render the
224
+ logical ID for an element. To modify the naming scheme, extend the `Stack`
225
+ class and override this method.
226
+
227
+ ###### `element`<sup>Required</sup> <a name="element" id="low-cost-ecs.LowCostECS.getLogicalId.parameter.element"></a>
228
+
229
+ - *Type:* aws-cdk-lib.CfnElement
230
+
231
+ The CloudFormation element for which a logical identity is needed.
232
+
233
+ ---
234
+
235
+ ##### `regionalFact` <a name="regionalFact" id="low-cost-ecs.LowCostECS.regionalFact"></a>
236
+
237
+ ```typescript
238
+ public regionalFact(factName: string, defaultValue?: string): string
239
+ ```
240
+
241
+ Look up a fact value for the given fact for the region of this stack.
242
+
243
+ Will return a definite value only if the region of the current stack is resolved.
244
+ If not, a lookup map will be added to the stack and the lookup will be done at
245
+ CDK deployment time.
246
+
247
+ What regions will be included in the lookup map is controlled by the
248
+ `@aws-cdk/core:target-partitions` context value: it must be set to a list
249
+ of partitions, and only regions from the given partitions will be included.
250
+ If no such context key is set, all regions will be included.
251
+
252
+ This function is intended to be used by construct library authors. Application
253
+ builders can rely on the abstractions offered by construct libraries and do
254
+ not have to worry about regional facts.
255
+
256
+ If `defaultValue` is not given, it is an error if the fact is unknown for
257
+ the given region.
258
+
259
+ ###### `factName`<sup>Required</sup> <a name="factName" id="low-cost-ecs.LowCostECS.regionalFact.parameter.factName"></a>
260
+
261
+ - *Type:* string
262
+
263
+ ---
264
+
265
+ ###### `defaultValue`<sup>Optional</sup> <a name="defaultValue" id="low-cost-ecs.LowCostECS.regionalFact.parameter.defaultValue"></a>
266
+
267
+ - *Type:* string
268
+
269
+ ---
270
+
271
+ ##### `renameLogicalId` <a name="renameLogicalId" id="low-cost-ecs.LowCostECS.renameLogicalId"></a>
272
+
273
+ ```typescript
274
+ public renameLogicalId(oldId: string, newId: string): void
275
+ ```
276
+
277
+ Rename a generated logical identities.
278
+
279
+ To modify the naming scheme strategy, extend the `Stack` class and
280
+ override the `allocateLogicalId` method.
281
+
282
+ ###### `oldId`<sup>Required</sup> <a name="oldId" id="low-cost-ecs.LowCostECS.renameLogicalId.parameter.oldId"></a>
283
+
284
+ - *Type:* string
285
+
286
+ ---
287
+
288
+ ###### `newId`<sup>Required</sup> <a name="newId" id="low-cost-ecs.LowCostECS.renameLogicalId.parameter.newId"></a>
289
+
290
+ - *Type:* string
291
+
292
+ ---
293
+
294
+ ##### `reportMissingContextKey` <a name="reportMissingContextKey" id="low-cost-ecs.LowCostECS.reportMissingContextKey"></a>
295
+
296
+ ```typescript
297
+ public reportMissingContextKey(report: MissingContext): void
298
+ ```
299
+
300
+ Indicate that a context key was expected.
301
+
302
+ Contains instructions which will be emitted into the cloud assembly on how
303
+ the key should be supplied.
304
+
305
+ ###### `report`<sup>Required</sup> <a name="report" id="low-cost-ecs.LowCostECS.reportMissingContextKey.parameter.report"></a>
306
+
307
+ - *Type:* aws-cdk-lib.cloud_assembly_schema.MissingContext
308
+
309
+ The set of parameters needed to obtain the context.
310
+
311
+ ---
312
+
313
+ ##### `resolve` <a name="resolve" id="low-cost-ecs.LowCostECS.resolve"></a>
314
+
315
+ ```typescript
316
+ public resolve(obj: any): any
317
+ ```
318
+
319
+ Resolve a tokenized value in the context of the current stack.
320
+
321
+ ###### `obj`<sup>Required</sup> <a name="obj" id="low-cost-ecs.LowCostECS.resolve.parameter.obj"></a>
322
+
323
+ - *Type:* any
324
+
325
+ ---
326
+
327
+ ##### `splitArn` <a name="splitArn" id="low-cost-ecs.LowCostECS.splitArn"></a>
328
+
329
+ ```typescript
330
+ public splitArn(arn: string, arnFormat: ArnFormat): ArnComponents
331
+ ```
332
+
333
+ Splits the provided ARN into its components.
334
+
335
+ Works both if 'arn' is a string like 'arn:aws:s3:::bucket',
336
+ and a Token representing a dynamic CloudFormation expression
337
+ (in which case the returned components will also be dynamic CloudFormation expressions,
338
+ encoded as Tokens).
339
+
340
+ ###### `arn`<sup>Required</sup> <a name="arn" id="low-cost-ecs.LowCostECS.splitArn.parameter.arn"></a>
341
+
342
+ - *Type:* string
343
+
344
+ the ARN to split into its components.
345
+
346
+ ---
347
+
348
+ ###### `arnFormat`<sup>Required</sup> <a name="arnFormat" id="low-cost-ecs.LowCostECS.splitArn.parameter.arnFormat"></a>
349
+
350
+ - *Type:* aws-cdk-lib.ArnFormat
351
+
352
+ the expected format of 'arn' - depends on what format the service 'arn' represents uses.
353
+
354
+ ---
355
+
356
+ ##### `toJsonString` <a name="toJsonString" id="low-cost-ecs.LowCostECS.toJsonString"></a>
357
+
358
+ ```typescript
359
+ public toJsonString(obj: any, space?: number): string
360
+ ```
361
+
362
+ Convert an object, potentially containing tokens, to a JSON string.
363
+
364
+ ###### `obj`<sup>Required</sup> <a name="obj" id="low-cost-ecs.LowCostECS.toJsonString.parameter.obj"></a>
365
+
366
+ - *Type:* any
367
+
368
+ ---
369
+
370
+ ###### `space`<sup>Optional</sup> <a name="space" id="low-cost-ecs.LowCostECS.toJsonString.parameter.space"></a>
371
+
372
+ - *Type:* number
373
+
374
+ ---
375
+
376
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
377
+
378
+ | **Name** | **Description** |
379
+ | --- | --- |
380
+ | <code><a href="#low-cost-ecs.LowCostECS.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
381
+ | <code><a href="#low-cost-ecs.LowCostECS.isStack">isStack</a></code> | Return whether the given object is a Stack. |
382
+ | <code><a href="#low-cost-ecs.LowCostECS.of">of</a></code> | Looks up the first stack scope in which `construct` is defined. |
383
+
384
+ ---
385
+
386
+ ##### ~~`isConstruct`~~ <a name="isConstruct" id="low-cost-ecs.LowCostECS.isConstruct"></a>
387
+
388
+ ```typescript
389
+ import { LowCostECS } from 'low-cost-ecs'
390
+
391
+ LowCostECS.isConstruct(x: any)
392
+ ```
393
+
394
+ Checks if `x` is a construct.
395
+
396
+ ###### `x`<sup>Required</sup> <a name="x" id="low-cost-ecs.LowCostECS.isConstruct.parameter.x"></a>
397
+
398
+ - *Type:* any
399
+
400
+ Any object.
401
+
402
+ ---
403
+
404
+ ##### `isStack` <a name="isStack" id="low-cost-ecs.LowCostECS.isStack"></a>
405
+
406
+ ```typescript
407
+ import { LowCostECS } from 'low-cost-ecs'
408
+
409
+ LowCostECS.isStack(x: any)
410
+ ```
411
+
412
+ Return whether the given object is a Stack.
413
+
414
+ We do attribute detection since we can't reliably use 'instanceof'.
415
+
416
+ ###### `x`<sup>Required</sup> <a name="x" id="low-cost-ecs.LowCostECS.isStack.parameter.x"></a>
417
+
418
+ - *Type:* any
419
+
420
+ ---
421
+
422
+ ##### `of` <a name="of" id="low-cost-ecs.LowCostECS.of"></a>
423
+
424
+ ```typescript
425
+ import { LowCostECS } from 'low-cost-ecs'
426
+
427
+ LowCostECS.of(construct: IConstruct)
428
+ ```
429
+
430
+ Looks up the first stack scope in which `construct` is defined.
431
+
432
+ Fails if there is no stack up the tree.
433
+
434
+ ###### `construct`<sup>Required</sup> <a name="construct" id="low-cost-ecs.LowCostECS.of.parameter.construct"></a>
435
+
436
+ - *Type:* constructs.IConstruct
437
+
438
+ The construct to start the search from.
439
+
440
+ ---
441
+
442
+ #### Properties <a name="Properties" id="Properties"></a>
443
+
444
+ | **Name** | **Type** | **Description** |
445
+ | --- | --- | --- |
446
+ | <code><a href="#low-cost-ecs.LowCostECS.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
447
+ | <code><a href="#low-cost-ecs.LowCostECS.property.account">account</a></code> | <code>string</code> | The AWS account into which this stack will be deployed. |
448
+ | <code><a href="#low-cost-ecs.LowCostECS.property.artifactId">artifactId</a></code> | <code>string</code> | The ID of the cloud assembly artifact for this stack. |
449
+ | <code><a href="#low-cost-ecs.LowCostECS.property.availabilityZones">availabilityZones</a></code> | <code>string[]</code> | Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack. |
450
+ | <code><a href="#low-cost-ecs.LowCostECS.property.bundlingRequired">bundlingRequired</a></code> | <code>boolean</code> | Indicates whether the stack requires bundling or not. |
451
+ | <code><a href="#low-cost-ecs.LowCostECS.property.dependencies">dependencies</a></code> | <code>aws-cdk-lib.Stack[]</code> | Return the stacks this stack depends on. |
452
+ | <code><a href="#low-cost-ecs.LowCostECS.property.environment">environment</a></code> | <code>string</code> | The environment coordinates in which this stack is deployed. |
453
+ | <code><a href="#low-cost-ecs.LowCostECS.property.nested">nested</a></code> | <code>boolean</code> | Indicates if this is a nested stack, in which case `parentStack` will include a reference to it's parent. |
454
+ | <code><a href="#low-cost-ecs.LowCostECS.property.notificationArns">notificationArns</a></code> | <code>string[]</code> | Returns the list of notification Amazon Resource Names (ARNs) for the current stack. |
455
+ | <code><a href="#low-cost-ecs.LowCostECS.property.partition">partition</a></code> | <code>string</code> | The partition in which this stack is defined. |
456
+ | <code><a href="#low-cost-ecs.LowCostECS.property.region">region</a></code> | <code>string</code> | The AWS region into which this stack will be deployed (e.g. `us-west-2`). |
457
+ | <code><a href="#low-cost-ecs.LowCostECS.property.stackId">stackId</a></code> | <code>string</code> | The ID of the stack. |
458
+ | <code><a href="#low-cost-ecs.LowCostECS.property.stackName">stackName</a></code> | <code>string</code> | The concrete CloudFormation physical stack name. |
459
+ | <code><a href="#low-cost-ecs.LowCostECS.property.synthesizer">synthesizer</a></code> | <code>aws-cdk-lib.IStackSynthesizer</code> | Synthesis method for this stack. |
460
+ | <code><a href="#low-cost-ecs.LowCostECS.property.tags">tags</a></code> | <code>aws-cdk-lib.TagManager</code> | Tags to be applied to the stack. |
461
+ | <code><a href="#low-cost-ecs.LowCostECS.property.templateFile">templateFile</a></code> | <code>string</code> | The name of the CloudFormation template file emitted to the output directory during synthesis. |
462
+ | <code><a href="#low-cost-ecs.LowCostECS.property.templateOptions">templateOptions</a></code> | <code>aws-cdk-lib.ITemplateOptions</code> | Options for CloudFormation template (like version, transform, description). |
463
+ | <code><a href="#low-cost-ecs.LowCostECS.property.urlSuffix">urlSuffix</a></code> | <code>string</code> | The Amazon domain suffix for the region in which this stack is defined. |
464
+ | <code><a href="#low-cost-ecs.LowCostECS.property.nestedStackParent">nestedStackParent</a></code> | <code>aws-cdk-lib.Stack</code> | If this is a nested stack, returns it's parent stack. |
465
+ | <code><a href="#low-cost-ecs.LowCostECS.property.nestedStackResource">nestedStackResource</a></code> | <code>aws-cdk-lib.CfnResource</code> | If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource. |
466
+ | <code><a href="#low-cost-ecs.LowCostECS.property.terminationProtection">terminationProtection</a></code> | <code>boolean</code> | Whether termination protection is enabled for this stack. |
467
+
468
+ ---
469
+
470
+ ##### `node`<sup>Required</sup> <a name="node" id="low-cost-ecs.LowCostECS.property.node"></a>
471
+
472
+ ```typescript
473
+ public readonly node: Node;
474
+ ```
475
+
476
+ - *Type:* constructs.Node
477
+
478
+ The tree node.
479
+
480
+ ---
481
+
482
+ ##### `account`<sup>Required</sup> <a name="account" id="low-cost-ecs.LowCostECS.property.account"></a>
483
+
484
+ ```typescript
485
+ public readonly account: string;
486
+ ```
487
+
488
+ - *Type:* string
489
+
490
+ The AWS account into which this stack will be deployed.
491
+
492
+ This value is resolved according to the following rules:
493
+
494
+ 1. The value provided to `env.account` when the stack is defined. This can
495
+ either be a concrete account (e.g. `585695031111`) or the
496
+ `Aws.ACCOUNT_ID` token.
497
+ 3. `Aws.ACCOUNT_ID`, which represents the CloudFormation intrinsic reference
498
+ `{ "Ref": "AWS::AccountId" }` encoded as a string token.
499
+
500
+ Preferably, you should use the return value as an opaque string and not
501
+ attempt to parse it to implement your logic. If you do, you must first
502
+ check that it is a concerete value an not an unresolved token. If this
503
+ value is an unresolved token (`Token.isUnresolved(stack.account)` returns
504
+ `true`), this implies that the user wishes that this stack will synthesize
505
+ into a **account-agnostic template**. In this case, your code should either
506
+ fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
507
+ implement some other region-agnostic behavior.
508
+
509
+ ---
510
+
511
+ ##### `artifactId`<sup>Required</sup> <a name="artifactId" id="low-cost-ecs.LowCostECS.property.artifactId"></a>
512
+
513
+ ```typescript
514
+ public readonly artifactId: string;
515
+ ```
516
+
517
+ - *Type:* string
518
+
519
+ The ID of the cloud assembly artifact for this stack.
520
+
521
+ ---
522
+
523
+ ##### `availabilityZones`<sup>Required</sup> <a name="availabilityZones" id="low-cost-ecs.LowCostECS.property.availabilityZones"></a>
524
+
525
+ ```typescript
526
+ public readonly availabilityZones: string[];
527
+ ```
528
+
529
+ - *Type:* string[]
530
+
531
+ Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack.
532
+
533
+ If the stack is environment-agnostic (either account and/or region are
534
+ tokens), this property will return an array with 2 tokens that will resolve
535
+ at deploy-time to the first two availability zones returned from CloudFormation's
536
+ `Fn::GetAZs` intrinsic function.
537
+
538
+ If they are not available in the context, returns a set of dummy values and
539
+ reports them as missing, and let the CLI resolve them by calling EC2
540
+ `DescribeAvailabilityZones` on the target environment.
541
+
542
+ To specify a different strategy for selecting availability zones override this method.
543
+
544
+ ---
545
+
546
+ ##### `bundlingRequired`<sup>Required</sup> <a name="bundlingRequired" id="low-cost-ecs.LowCostECS.property.bundlingRequired"></a>
547
+
548
+ ```typescript
549
+ public readonly bundlingRequired: boolean;
550
+ ```
551
+
552
+ - *Type:* boolean
553
+
554
+ Indicates whether the stack requires bundling or not.
555
+
556
+ ---
557
+
558
+ ##### `dependencies`<sup>Required</sup> <a name="dependencies" id="low-cost-ecs.LowCostECS.property.dependencies"></a>
559
+
560
+ ```typescript
561
+ public readonly dependencies: Stack[];
562
+ ```
563
+
564
+ - *Type:* aws-cdk-lib.Stack[]
565
+
566
+ Return the stacks this stack depends on.
567
+
568
+ ---
569
+
570
+ ##### `environment`<sup>Required</sup> <a name="environment" id="low-cost-ecs.LowCostECS.property.environment"></a>
571
+
572
+ ```typescript
573
+ public readonly environment: string;
574
+ ```
575
+
576
+ - *Type:* string
577
+
578
+ The environment coordinates in which this stack is deployed.
579
+
580
+ In the form
581
+ `aws://account/region`. Use `stack.account` and `stack.region` to obtain
582
+ the specific values, no need to parse.
583
+
584
+ You can use this value to determine if two stacks are targeting the same
585
+ environment.
586
+
587
+ If either `stack.account` or `stack.region` are not concrete values (e.g.
588
+ `Aws.ACCOUNT_ID` or `Aws.REGION`) the special strings `unknown-account` and/or
589
+ `unknown-region` will be used respectively to indicate this stack is
590
+ region/account-agnostic.
591
+
592
+ ---
593
+
594
+ ##### `nested`<sup>Required</sup> <a name="nested" id="low-cost-ecs.LowCostECS.property.nested"></a>
595
+
596
+ ```typescript
597
+ public readonly nested: boolean;
598
+ ```
599
+
600
+ - *Type:* boolean
601
+
602
+ Indicates if this is a nested stack, in which case `parentStack` will include a reference to it's parent.
603
+
604
+ ---
605
+
606
+ ##### `notificationArns`<sup>Required</sup> <a name="notificationArns" id="low-cost-ecs.LowCostECS.property.notificationArns"></a>
607
+
608
+ ```typescript
609
+ public readonly notificationArns: string[];
610
+ ```
611
+
612
+ - *Type:* string[]
613
+
614
+ Returns the list of notification Amazon Resource Names (ARNs) for the current stack.
615
+
616
+ ---
617
+
618
+ ##### `partition`<sup>Required</sup> <a name="partition" id="low-cost-ecs.LowCostECS.property.partition"></a>
619
+
620
+ ```typescript
621
+ public readonly partition: string;
622
+ ```
623
+
624
+ - *Type:* string
625
+
626
+ The partition in which this stack is defined.
627
+
628
+ ---
629
+
630
+ ##### `region`<sup>Required</sup> <a name="region" id="low-cost-ecs.LowCostECS.property.region"></a>
631
+
632
+ ```typescript
633
+ public readonly region: string;
634
+ ```
635
+
636
+ - *Type:* string
637
+
638
+ The AWS region into which this stack will be deployed (e.g. `us-west-2`).
639
+
640
+ This value is resolved according to the following rules:
641
+
642
+ 1. The value provided to `env.region` when the stack is defined. This can
643
+ either be a concerete region (e.g. `us-west-2`) or the `Aws.REGION`
644
+ token.
645
+ 3. `Aws.REGION`, which is represents the CloudFormation intrinsic reference
646
+ `{ "Ref": "AWS::Region" }` encoded as a string token.
647
+
648
+ Preferably, you should use the return value as an opaque string and not
649
+ attempt to parse it to implement your logic. If you do, you must first
650
+ check that it is a concerete value an not an unresolved token. If this
651
+ value is an unresolved token (`Token.isUnresolved(stack.region)` returns
652
+ `true`), this implies that the user wishes that this stack will synthesize
653
+ into a **region-agnostic template**. In this case, your code should either
654
+ fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
655
+ implement some other region-agnostic behavior.
656
+
657
+ ---
658
+
659
+ ##### `stackId`<sup>Required</sup> <a name="stackId" id="low-cost-ecs.LowCostECS.property.stackId"></a>
660
+
661
+ ```typescript
662
+ public readonly stackId: string;
663
+ ```
664
+
665
+ - *Type:* string
666
+
667
+ The ID of the stack.
668
+
669
+ ---
670
+
671
+ *Example*
672
+
673
+ ```typescript
674
+ // After resolving, looks like
675
+ 'arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123'
676
+ ```
677
+
678
+
679
+ ##### `stackName`<sup>Required</sup> <a name="stackName" id="low-cost-ecs.LowCostECS.property.stackName"></a>
680
+
681
+ ```typescript
682
+ public readonly stackName: string;
683
+ ```
684
+
685
+ - *Type:* string
686
+
687
+ The concrete CloudFormation physical stack name.
688
+
689
+ This is either the name defined explicitly in the `stackName` prop or
690
+ allocated based on the stack's location in the construct tree. Stacks that
691
+ are directly defined under the app use their construct `id` as their stack
692
+ name. Stacks that are defined deeper within the tree will use a hashed naming
693
+ scheme based on the construct path to ensure uniqueness.
694
+
695
+ If you wish to obtain the deploy-time AWS::StackName intrinsic,
696
+ you can use `Aws.STACK_NAME` directly.
697
+
698
+ ---
699
+
700
+ ##### `synthesizer`<sup>Required</sup> <a name="synthesizer" id="low-cost-ecs.LowCostECS.property.synthesizer"></a>
701
+
702
+ ```typescript
703
+ public readonly synthesizer: IStackSynthesizer;
704
+ ```
705
+
706
+ - *Type:* aws-cdk-lib.IStackSynthesizer
707
+
708
+ Synthesis method for this stack.
709
+
710
+ ---
711
+
712
+ ##### `tags`<sup>Required</sup> <a name="tags" id="low-cost-ecs.LowCostECS.property.tags"></a>
713
+
714
+ ```typescript
715
+ public readonly tags: TagManager;
716
+ ```
717
+
718
+ - *Type:* aws-cdk-lib.TagManager
719
+
720
+ Tags to be applied to the stack.
721
+
722
+ ---
723
+
724
+ ##### `templateFile`<sup>Required</sup> <a name="templateFile" id="low-cost-ecs.LowCostECS.property.templateFile"></a>
725
+
726
+ ```typescript
727
+ public readonly templateFile: string;
728
+ ```
729
+
730
+ - *Type:* string
731
+
732
+ The name of the CloudFormation template file emitted to the output directory during synthesis.
733
+
734
+ Example value: `MyStack.template.json`
735
+
736
+ ---
737
+
738
+ ##### `templateOptions`<sup>Required</sup> <a name="templateOptions" id="low-cost-ecs.LowCostECS.property.templateOptions"></a>
739
+
740
+ ```typescript
741
+ public readonly templateOptions: ITemplateOptions;
742
+ ```
743
+
744
+ - *Type:* aws-cdk-lib.ITemplateOptions
745
+
746
+ Options for CloudFormation template (like version, transform, description).
747
+
748
+ ---
749
+
750
+ ##### `urlSuffix`<sup>Required</sup> <a name="urlSuffix" id="low-cost-ecs.LowCostECS.property.urlSuffix"></a>
751
+
752
+ ```typescript
753
+ public readonly urlSuffix: string;
754
+ ```
755
+
756
+ - *Type:* string
757
+
758
+ The Amazon domain suffix for the region in which this stack is defined.
759
+
760
+ ---
761
+
762
+ ##### `nestedStackParent`<sup>Optional</sup> <a name="nestedStackParent" id="low-cost-ecs.LowCostECS.property.nestedStackParent"></a>
763
+
764
+ ```typescript
765
+ public readonly nestedStackParent: Stack;
766
+ ```
767
+
768
+ - *Type:* aws-cdk-lib.Stack
769
+
770
+ If this is a nested stack, returns it's parent stack.
771
+
772
+ ---
773
+
774
+ ##### `nestedStackResource`<sup>Optional</sup> <a name="nestedStackResource" id="low-cost-ecs.LowCostECS.property.nestedStackResource"></a>
775
+
776
+ ```typescript
777
+ public readonly nestedStackResource: CfnResource;
778
+ ```
779
+
780
+ - *Type:* aws-cdk-lib.CfnResource
781
+
782
+ If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource.
783
+
784
+ `undefined` for top-level (non-nested) stacks.
785
+
786
+ ---
787
+
788
+ ##### `terminationProtection`<sup>Optional</sup> <a name="terminationProtection" id="low-cost-ecs.LowCostECS.property.terminationProtection"></a>
789
+
790
+ ```typescript
791
+ public readonly terminationProtection: boolean;
792
+ ```
793
+
794
+ - *Type:* boolean
795
+
796
+ Whether termination protection is enabled for this stack.
797
+
798
+ ---
799
+
800
+
801
+ ## Structs <a name="Structs" id="Structs"></a>
802
+
803
+ ### LowCostECSProps <a name="LowCostECSProps" id="low-cost-ecs.LowCostECSProps"></a>
804
+
805
+ #### Initializer <a name="Initializer" id="low-cost-ecs.LowCostECSProps.Initializer"></a>
806
+
807
+ ```typescript
808
+ import { LowCostECSProps } from 'low-cost-ecs'
809
+
810
+ const lowCostECSProps: LowCostECSProps = { ... }
811
+ ```
812
+
813
+ #### Properties <a name="Properties" id="Properties"></a>
814
+
815
+ | **Name** | **Type** | **Description** |
816
+ | --- | --- | --- |
817
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.analyticsReporting">analyticsReporting</a></code> | <code>boolean</code> | Include runtime versioning information in this Stack. |
818
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.description">description</a></code> | <code>string</code> | A description of the stack. |
819
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.env">env</a></code> | <code>aws-cdk-lib.Environment</code> | The AWS environment (account/region) where this stack will be deployed. |
820
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.stackName">stackName</a></code> | <code>string</code> | Name to deploy the stack with. |
821
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.synthesizer">synthesizer</a></code> | <code>aws-cdk-lib.IStackSynthesizer</code> | Synthesis method to use while deploying this stack. |
822
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.tags">tags</a></code> | <code>{[ key: string ]: string}</code> | Stack tags that will be applied to all the taggable resources and the stack itself. |
823
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.terminationProtection">terminationProtection</a></code> | <code>boolean</code> | Whether to enable termination protection for this stack. |
824
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.email">email</a></code> | <code>string</code> | Email for expiration emails to register to your let's encrypt account. |
825
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.hostedZoneDomain">hostedZoneDomain</a></code> | <code>string</code> | Domain name of the hosted zone. |
826
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.awsCliDockerTag">awsCliDockerTag</a></code> | <code>string</code> | Docker image tag of amazon/aws-cli. |
827
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.certbotDockerTag">certbotDockerTag</a></code> | <code>string</code> | Docker image tag of certbot/dns-route53 to create certificates. |
828
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.certbotScheduleInterval">certbotScheduleInterval</a></code> | <code>number</code> | Certbot task schedule interval in days to renew the certificate. |
829
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.containerInsights">containerInsights</a></code> | <code>boolean</code> | Enable container insights or not. |
830
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.hostInstanceSpotPrice">hostInstanceSpotPrice</a></code> | <code>string</code> | The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request. |
831
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.hostInstanceType">hostInstanceType</a></code> | <code>string</code> | Instance type of the ECS host instance. |
832
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.logGroup">logGroup</a></code> | <code>aws-cdk-lib.aws_logs.ILogGroup</code> | Log group of the certbot task and the aws-cli task. |
833
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.recordDomainNames">recordDomainNames</a></code> | <code>string[]</code> | Domain names for A records to elastic ip of ECS host instance. |
834
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.removalPolicy">removalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | Removal policy for the file system and log group (if using default). |
835
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.SecurityGroup</code> | Security group of the ECS host instance. |
836
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.serverTaskDefinition">serverTaskDefinition</a></code> | <code>aws-cdk-lib.aws_ecs.Ec2TaskDefinition</code> | Task definition for the server ecs task. |
837
+ | <code><a href="#low-cost-ecs.LowCostECSProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | Vpc of the ECS host instance and cluster. |
838
+
839
+ ---
840
+
841
+ ##### `analyticsReporting`<sup>Optional</sup> <a name="analyticsReporting" id="low-cost-ecs.LowCostECSProps.property.analyticsReporting"></a>
842
+
843
+ ```typescript
844
+ public readonly analyticsReporting: boolean;
845
+ ```
846
+
847
+ - *Type:* boolean
848
+ - *Default:* `analyticsReporting` setting of containing `App`, or value of 'aws:cdk:version-reporting' context key
849
+
850
+ Include runtime versioning information in this Stack.
851
+
852
+ ---
853
+
854
+ ##### `description`<sup>Optional</sup> <a name="description" id="low-cost-ecs.LowCostECSProps.property.description"></a>
855
+
856
+ ```typescript
857
+ public readonly description: string;
858
+ ```
859
+
860
+ - *Type:* string
861
+ - *Default:* No description.
862
+
863
+ A description of the stack.
864
+
865
+ ---
866
+
867
+ ##### `env`<sup>Optional</sup> <a name="env" id="low-cost-ecs.LowCostECSProps.property.env"></a>
868
+
869
+ ```typescript
870
+ public readonly env: Environment;
871
+ ```
872
+
873
+ - *Type:* aws-cdk-lib.Environment
874
+ - *Default:* The environment of the containing `Stage` if available, otherwise create the stack will be environment-agnostic.
875
+
876
+ The AWS environment (account/region) where this stack will be deployed.
877
+
878
+ Set the `region`/`account` fields of `env` to either a concrete value to
879
+ select the indicated environment (recommended for production stacks), or to
880
+ the values of environment variables
881
+ `CDK_DEFAULT_REGION`/`CDK_DEFAULT_ACCOUNT` to let the target environment
882
+ depend on the AWS credentials/configuration that the CDK CLI is executed
883
+ under (recommended for development stacks).
884
+
885
+ If the `Stack` is instantiated inside a `Stage`, any undefined
886
+ `region`/`account` fields from `env` will default to the same field on the
887
+ encompassing `Stage`, if configured there.
888
+
889
+ If either `region` or `account` are not set nor inherited from `Stage`, the
890
+ Stack will be considered "*environment-agnostic*"". Environment-agnostic
891
+ stacks can be deployed to any environment but may not be able to take
892
+ advantage of all features of the CDK. For example, they will not be able to
893
+ use environmental context lookups such as `ec2.Vpc.fromLookup` and will not
894
+ automatically translate Service Principals to the right format based on the
895
+ environment's AWS partition, and other such enhancements.
896
+
897
+ ---
898
+
899
+ *Example*
900
+
901
+ ```typescript
902
+ // Use a concrete account and region to deploy this stack to:
903
+ // `.account` and `.region` will simply return these values.
904
+ new Stack(app, 'Stack1', {
905
+ env: {
906
+ account: '123456789012',
907
+ region: 'us-east-1'
908
+ },
909
+ });
910
+
911
+ // Use the CLI's current credentials to determine the target environment:
912
+ // `.account` and `.region` will reflect the account+region the CLI
913
+ // is configured to use (based on the user CLI credentials)
914
+ new Stack(app, 'Stack2', {
915
+ env: {
916
+ account: process.env.CDK_DEFAULT_ACCOUNT,
917
+ region: process.env.CDK_DEFAULT_REGION
918
+ },
919
+ });
920
+
921
+ // Define multiple stacks stage associated with an environment
922
+ const myStage = new Stage(app, 'MyStage', {
923
+ env: {
924
+ account: '123456789012',
925
+ region: 'us-east-1'
926
+ }
927
+ });
928
+
929
+ // both of these stacks will use the stage's account/region:
930
+ // `.account` and `.region` will resolve to the concrete values as above
931
+ new MyStack(myStage, 'Stack1');
932
+ new YourStack(myStage, 'Stack2');
933
+
934
+ // Define an environment-agnostic stack:
935
+ // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
936
+ // which will only resolve to actual values by CloudFormation during deployment.
937
+ new MyStack(app, 'Stack1');
938
+ ```
939
+
940
+
941
+ ##### `stackName`<sup>Optional</sup> <a name="stackName" id="low-cost-ecs.LowCostECSProps.property.stackName"></a>
942
+
943
+ ```typescript
944
+ public readonly stackName: string;
945
+ ```
946
+
947
+ - *Type:* string
948
+ - *Default:* Derived from construct path.
949
+
950
+ Name to deploy the stack with.
951
+
952
+ ---
953
+
954
+ ##### `synthesizer`<sup>Optional</sup> <a name="synthesizer" id="low-cost-ecs.LowCostECSProps.property.synthesizer"></a>
955
+
956
+ ```typescript
957
+ public readonly synthesizer: IStackSynthesizer;
958
+ ```
959
+
960
+ - *Type:* aws-cdk-lib.IStackSynthesizer
961
+ - *Default:* `DefaultStackSynthesizer` if the `@aws-cdk/core:newStyleStackSynthesis` feature flag is set, `LegacyStackSynthesizer` otherwise.
962
+
963
+ Synthesis method to use while deploying this stack.
964
+
965
+ ---
966
+
967
+ ##### `tags`<sup>Optional</sup> <a name="tags" id="low-cost-ecs.LowCostECSProps.property.tags"></a>
968
+
969
+ ```typescript
970
+ public readonly tags: {[ key: string ]: string};
971
+ ```
972
+
973
+ - *Type:* {[ key: string ]: string}
974
+ - *Default:* {}
975
+
976
+ Stack tags that will be applied to all the taggable resources and the stack itself.
977
+
978
+ ---
979
+
980
+ ##### `terminationProtection`<sup>Optional</sup> <a name="terminationProtection" id="low-cost-ecs.LowCostECSProps.property.terminationProtection"></a>
981
+
982
+ ```typescript
983
+ public readonly terminationProtection: boolean;
984
+ ```
985
+
986
+ - *Type:* boolean
987
+ - *Default:* false
988
+
989
+ Whether to enable termination protection for this stack.
990
+
991
+ ---
992
+
993
+ ##### `email`<sup>Required</sup> <a name="email" id="low-cost-ecs.LowCostECSProps.property.email"></a>
994
+
995
+ ```typescript
996
+ public readonly email: string;
997
+ ```
998
+
999
+ - *Type:* string
1000
+
1001
+ Email for expiration emails to register to your let's encrypt account.
1002
+
1003
+ > [https://docs.aws.amazon.com/sns/latest/dg/sns-email-notifications.html](https://docs.aws.amazon.com/sns/latest/dg/sns-email-notifications.html)
1004
+
1005
+ ---
1006
+
1007
+ ##### `hostedZoneDomain`<sup>Required</sup> <a name="hostedZoneDomain" id="low-cost-ecs.LowCostECSProps.property.hostedZoneDomain"></a>
1008
+
1009
+ ```typescript
1010
+ public readonly hostedZoneDomain: string;
1011
+ ```
1012
+
1013
+ - *Type:* string
1014
+
1015
+ Domain name of the hosted zone.
1016
+
1017
+ ---
1018
+
1019
+ ##### `awsCliDockerTag`<sup>Optional</sup> <a name="awsCliDockerTag" id="low-cost-ecs.LowCostECSProps.property.awsCliDockerTag"></a>
1020
+
1021
+ ```typescript
1022
+ public readonly awsCliDockerTag: string;
1023
+ ```
1024
+
1025
+ - *Type:* string
1026
+ - *Default:* latest
1027
+
1028
+ Docker image tag of amazon/aws-cli.
1029
+
1030
+ This image is used to associate elastic ip on host instance startup, and run certbot cfn on ecs container startup.
1031
+
1032
+ ---
1033
+
1034
+ ##### `certbotDockerTag`<sup>Optional</sup> <a name="certbotDockerTag" id="low-cost-ecs.LowCostECSProps.property.certbotDockerTag"></a>
1035
+
1036
+ ```typescript
1037
+ public readonly certbotDockerTag: string;
1038
+ ```
1039
+
1040
+ - *Type:* string
1041
+ - *Default:* v1.29.0
1042
+
1043
+ Docker image tag of certbot/dns-route53 to create certificates.
1044
+
1045
+ > [https://hub.docker.com/r/certbot/dns-route53/tags](https://hub.docker.com/r/certbot/dns-route53/tags)
1046
+
1047
+ ---
1048
+
1049
+ ##### `certbotScheduleInterval`<sup>Optional</sup> <a name="certbotScheduleInterval" id="low-cost-ecs.LowCostECSProps.property.certbotScheduleInterval"></a>
1050
+
1051
+ ```typescript
1052
+ public readonly certbotScheduleInterval: number;
1053
+ ```
1054
+
1055
+ - *Type:* number
1056
+ - *Default:* 60
1057
+
1058
+ Certbot task schedule interval in days to renew the certificate.
1059
+
1060
+ ---
1061
+
1062
+ ##### `containerInsights`<sup>Optional</sup> <a name="containerInsights" id="low-cost-ecs.LowCostECSProps.property.containerInsights"></a>
1063
+
1064
+ ```typescript
1065
+ public readonly containerInsights: boolean;
1066
+ ```
1067
+
1068
+ - *Type:* boolean
1069
+ - *Default:* undefined (container insights disabled)
1070
+
1071
+ Enable container insights or not.
1072
+
1073
+ ---
1074
+
1075
+ ##### `hostInstanceSpotPrice`<sup>Optional</sup> <a name="hostInstanceSpotPrice" id="low-cost-ecs.LowCostECSProps.property.hostInstanceSpotPrice"></a>
1076
+
1077
+ ```typescript
1078
+ public readonly hostInstanceSpotPrice: string;
1079
+ ```
1080
+
1081
+ - *Type:* string
1082
+ - *Default:* undefined
1083
+
1084
+ The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request.
1085
+
1086
+ Host instance asg would use spot instances if hostInstanceSpotPrice is set.
1087
+
1088
+ > [https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.AddCapacityOptions.html#spotprice](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.AddCapacityOptions.html#spotprice)
1089
+
1090
+ ---
1091
+
1092
+ ##### `hostInstanceType`<sup>Optional</sup> <a name="hostInstanceType" id="low-cost-ecs.LowCostECSProps.property.hostInstanceType"></a>
1093
+
1094
+ ```typescript
1095
+ public readonly hostInstanceType: string;
1096
+ ```
1097
+
1098
+ - *Type:* string
1099
+ - *Default:* t2.micro
1100
+
1101
+ Instance type of the ECS host instance.
1102
+
1103
+ ---
1104
+
1105
+ ##### `logGroup`<sup>Optional</sup> <a name="logGroup" id="low-cost-ecs.LowCostECSProps.property.logGroup"></a>
1106
+
1107
+ ```typescript
1108
+ public readonly logGroup: ILogGroup;
1109
+ ```
1110
+
1111
+ - *Type:* aws-cdk-lib.aws_logs.ILogGroup
1112
+ - *Default:* Creates default cdk log group
1113
+
1114
+ Log group of the certbot task and the aws-cli task.
1115
+
1116
+ ---
1117
+
1118
+ ##### `recordDomainNames`<sup>Optional</sup> <a name="recordDomainNames" id="low-cost-ecs.LowCostECSProps.property.recordDomainNames"></a>
1119
+
1120
+ ```typescript
1121
+ public readonly recordDomainNames: string[];
1122
+ ```
1123
+
1124
+ - *Type:* string[]
1125
+ - *Default:* [ props.hostedZone.zoneName ]
1126
+
1127
+ Domain names for A records to elastic ip of ECS host instance.
1128
+
1129
+ ---
1130
+
1131
+ ##### `removalPolicy`<sup>Optional</sup> <a name="removalPolicy" id="low-cost-ecs.LowCostECSProps.property.removalPolicy"></a>
1132
+
1133
+ ```typescript
1134
+ public readonly removalPolicy: RemovalPolicy;
1135
+ ```
1136
+
1137
+ - *Type:* aws-cdk-lib.RemovalPolicy
1138
+ - *Default:* RemovalPolicy.DESTROY
1139
+
1140
+ Removal policy for the file system and log group (if using default).
1141
+
1142
+ ---
1143
+
1144
+ ##### `securityGroup`<sup>Optional</sup> <a name="securityGroup" id="low-cost-ecs.LowCostECSProps.property.securityGroup"></a>
1145
+
1146
+ ```typescript
1147
+ public readonly securityGroup: SecurityGroup;
1148
+ ```
1149
+
1150
+ - *Type:* aws-cdk-lib.aws_ec2.SecurityGroup
1151
+ - *Default:* Creates security group with allowAllOutbound and ingress rule (ipv4, ipv6) => (tcp 80, 443).
1152
+
1153
+ Security group of the ECS host instance.
1154
+
1155
+ ---
1156
+
1157
+ ##### `serverTaskDefinition`<sup>Optional</sup> <a name="serverTaskDefinition" id="low-cost-ecs.LowCostECSProps.property.serverTaskDefinition"></a>
1158
+
1159
+ ```typescript
1160
+ public readonly serverTaskDefinition: Ec2TaskDefinition;
1161
+ ```
1162
+
1163
+ - *Type:* aws-cdk-lib.aws_ecs.Ec2TaskDefinition
1164
+ - *Default:* Nginx server task definition defined in sampleServerTask()
1165
+
1166
+ Task definition for the server ecs task.
1167
+
1168
+ ---
1169
+
1170
+ ##### `vpc`<sup>Optional</sup> <a name="vpc" id="low-cost-ecs.LowCostECSProps.property.vpc"></a>
1171
+
1172
+ ```typescript
1173
+ public readonly vpc: IVpc;
1174
+ ```
1175
+
1176
+ - *Type:* aws-cdk-lib.aws_ec2.IVpc
1177
+ - *Default:* Creates vpc with only public subnets and no NAT gateways.
1178
+
1179
+ Vpc of the ECS host instance and cluster.
1180
+
1181
+ ---
1182
+
1183
+
1184
+