aws-ec2-instance-running-scheduler 3.0.1

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,1684 @@
1
+ # API Reference <a name="API Reference" id="api-reference"></a>
2
+
3
+ ## Constructs <a name="Constructs" id="Constructs"></a>
4
+
5
+ ### EC2InstanceRunningScheduler <a name="EC2InstanceRunningScheduler" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler"></a>
6
+
7
+ Construct that schedules EC2 instance start/stop via EventBridge Scheduler and a Durable Lambda.
8
+
9
+ #### Initializers <a name="Initializers" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.Initializer"></a>
10
+
11
+ ```typescript
12
+ import { EC2InstanceRunningScheduler } from 'aws-ec2-instance-running-scheduler'
13
+
14
+ new EC2InstanceRunningScheduler(scope: Construct, id: string, props: EC2InstanceRunningSchedulerProps)
15
+ ```
16
+
17
+ | **Name** | **Type** | **Description** |
18
+ | --- | --- | --- |
19
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | - Parent construct. |
20
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.Initializer.parameter.id">id</a></code> | <code>string</code> | - Construct id. |
21
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.Initializer.parameter.props">props</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps">EC2InstanceRunningSchedulerProps</a></code> | - Scheduler configuration (target resource, schedules, secrets). |
22
+
23
+ ---
24
+
25
+ ##### `scope`<sup>Required</sup> <a name="scope" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.Initializer.parameter.scope"></a>
26
+
27
+ - *Type:* constructs.Construct
28
+
29
+ Parent construct.
30
+
31
+ ---
32
+
33
+ ##### `id`<sup>Required</sup> <a name="id" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.Initializer.parameter.id"></a>
34
+
35
+ - *Type:* string
36
+
37
+ Construct id.
38
+
39
+ ---
40
+
41
+ ##### `props`<sup>Required</sup> <a name="props" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.Initializer.parameter.props"></a>
42
+
43
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps">EC2InstanceRunningSchedulerProps</a>
44
+
45
+ Scheduler configuration (target resource, schedules, secrets).
46
+
47
+ ---
48
+
49
+ #### Methods <a name="Methods" id="Methods"></a>
50
+
51
+ | **Name** | **Description** |
52
+ | --- | --- |
53
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.toString">toString</a></code> | Returns a string representation of this construct. |
54
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.with">with</a></code> | Applies one or more mixins to this construct. |
55
+
56
+ ---
57
+
58
+ ##### `toString` <a name="toString" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.toString"></a>
59
+
60
+ ```typescript
61
+ public toString(): string
62
+ ```
63
+
64
+ Returns a string representation of this construct.
65
+
66
+ ##### `with` <a name="with" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.with"></a>
67
+
68
+ ```typescript
69
+ public with(mixins: ...IMixin[]): IConstruct
70
+ ```
71
+
72
+ Applies one or more mixins to this construct.
73
+
74
+ Mixins are applied in order. The list of constructs is captured at the
75
+ start of the call, so constructs added by a mixin will not be visited.
76
+ Use multiple `with()` calls if subsequent mixins should apply to added
77
+ constructs.
78
+
79
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.with.parameter.mixins"></a>
80
+
81
+ - *Type:* ...constructs.IMixin[]
82
+
83
+ The mixins to apply.
84
+
85
+ ---
86
+
87
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
88
+
89
+ | **Name** | **Description** |
90
+ | --- | --- |
91
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
92
+
93
+ ---
94
+
95
+ ##### `isConstruct` <a name="isConstruct" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.isConstruct"></a>
96
+
97
+ ```typescript
98
+ import { EC2InstanceRunningScheduler } from 'aws-ec2-instance-running-scheduler'
99
+
100
+ EC2InstanceRunningScheduler.isConstruct(x: any)
101
+ ```
102
+
103
+ Checks if `x` is a construct.
104
+
105
+ Use this method instead of `instanceof` to properly detect `Construct`
106
+ instances, even when the construct library is symlinked.
107
+
108
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
109
+ disk are seen as independent, completely different libraries. As a
110
+ consequence, the class `Construct` in each copy of the `constructs` library
111
+ is seen as a different class, and an instance of one class will not test as
112
+ `instanceof` the other class. `npm install` will not create installations
113
+ like this, but users may manually symlink construct libraries together or
114
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
115
+ library can be accidentally installed, and `instanceof` will behave
116
+ unpredictably. It is safest to avoid using `instanceof`, and using
117
+ this type-testing method instead.
118
+
119
+ ###### `x`<sup>Required</sup> <a name="x" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.isConstruct.parameter.x"></a>
120
+
121
+ - *Type:* any
122
+
123
+ Any object.
124
+
125
+ ---
126
+
127
+ #### Properties <a name="Properties" id="Properties"></a>
128
+
129
+ | **Name** | **Type** | **Description** |
130
+ | --- | --- | --- |
131
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
132
+
133
+ ---
134
+
135
+ ##### `node`<sup>Required</sup> <a name="node" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduler.property.node"></a>
136
+
137
+ ```typescript
138
+ public readonly node: Node;
139
+ ```
140
+
141
+ - *Type:* constructs.Node
142
+
143
+ The tree node.
144
+
145
+ ---
146
+
147
+
148
+ ### EC2InstanceRunningScheduleStack <a name="EC2InstanceRunningScheduleStack" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack"></a>
149
+
150
+ CDK Stack that deploys the EC2 instance running scheduler (EventBridge Scheduler + Durable Lambda).
151
+
152
+ #### Initializers <a name="Initializers" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.Initializer"></a>
153
+
154
+ ```typescript
155
+ import { EC2InstanceRunningScheduleStack } from 'aws-ec2-instance-running-scheduler'
156
+
157
+ new EC2InstanceRunningScheduleStack(scope: Construct, id: string, props: EC2InstanceRunningScheduleStackProps)
158
+ ```
159
+
160
+ | **Name** | **Type** | **Description** |
161
+ | --- | --- | --- |
162
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | - Parent construct. |
163
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.Initializer.parameter.id">id</a></code> | <code>string</code> | - Stack id. |
164
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.Initializer.parameter.props">props</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps">EC2InstanceRunningScheduleStackProps</a></code> | - Stack props (target resource, schedules, secrets). |
165
+
166
+ ---
167
+
168
+ ##### `scope`<sup>Required</sup> <a name="scope" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.Initializer.parameter.scope"></a>
169
+
170
+ - *Type:* constructs.Construct
171
+
172
+ Parent construct.
173
+
174
+ ---
175
+
176
+ ##### `id`<sup>Required</sup> <a name="id" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.Initializer.parameter.id"></a>
177
+
178
+ - *Type:* string
179
+
180
+ Stack id.
181
+
182
+ ---
183
+
184
+ ##### `props`<sup>Required</sup> <a name="props" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.Initializer.parameter.props"></a>
185
+
186
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps">EC2InstanceRunningScheduleStackProps</a>
187
+
188
+ Stack props (target resource, schedules, secrets).
189
+
190
+ ---
191
+
192
+ #### Methods <a name="Methods" id="Methods"></a>
193
+
194
+ | **Name** | **Description** |
195
+ | --- | --- |
196
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toString">toString</a></code> | Returns a string representation of this construct. |
197
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.with">with</a></code> | Applies one or more mixins to this construct. |
198
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addDependency">addDependency</a></code> | Add a dependency between this stack and another stack. |
199
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addMetadata">addMetadata</a></code> | Adds an arbitrary key-value pair, with information you want to record about the stack. |
200
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addStackTag">addStackTag</a></code> | Configure a stack tag. |
201
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addTransform">addTransform</a></code> | Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template. |
202
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportStringListValue">exportStringListValue</a></code> | Create a CloudFormation Export for a string list value. |
203
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportValue">exportValue</a></code> | Create a CloudFormation Export for a string value. |
204
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.formatArn">formatArn</a></code> | Creates an ARN from components. |
205
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.getLogicalId">getLogicalId</a></code> | Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource. |
206
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.regionalFact">regionalFact</a></code> | Look up a fact value for the given fact for the region of this stack. |
207
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.removeStackTag">removeStackTag</a></code> | Remove a stack tag. |
208
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.renameLogicalId">renameLogicalId</a></code> | Rename a generated logical identities. |
209
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.reportMissingContextKey">reportMissingContextKey</a></code> | Indicate that a context key was expected. |
210
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.resolve">resolve</a></code> | Resolve a tokenized value in the context of the current stack. |
211
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.splitArn">splitArn</a></code> | Splits the provided ARN into its components. |
212
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toJsonString">toJsonString</a></code> | Convert an object, potentially containing tokens, to a JSON string. |
213
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toYamlString">toYamlString</a></code> | Convert an object, potentially containing tokens, to a YAML string. |
214
+
215
+ ---
216
+
217
+ ##### `toString` <a name="toString" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toString"></a>
218
+
219
+ ```typescript
220
+ public toString(): string
221
+ ```
222
+
223
+ Returns a string representation of this construct.
224
+
225
+ ##### `with` <a name="with" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.with"></a>
226
+
227
+ ```typescript
228
+ public with(mixins: ...IMixin[]): IConstruct
229
+ ```
230
+
231
+ Applies one or more mixins to this construct.
232
+
233
+ Mixins are applied in order. The list of constructs is captured at the
234
+ start of the call, so constructs added by a mixin will not be visited.
235
+ Use multiple `with()` calls if subsequent mixins should apply to added
236
+ constructs.
237
+
238
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.with.parameter.mixins"></a>
239
+
240
+ - *Type:* ...constructs.IMixin[]
241
+
242
+ The mixins to apply.
243
+
244
+ ---
245
+
246
+ ##### `addDependency` <a name="addDependency" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addDependency"></a>
247
+
248
+ ```typescript
249
+ public addDependency(target: Stack, reason?: string): void
250
+ ```
251
+
252
+ Add a dependency between this stack and another stack.
253
+
254
+ This can be used to define dependencies between any two stacks within an
255
+ app, and also supports nested stacks.
256
+
257
+ ###### `target`<sup>Required</sup> <a name="target" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addDependency.parameter.target"></a>
258
+
259
+ - *Type:* aws-cdk-lib.Stack
260
+
261
+ ---
262
+
263
+ ###### `reason`<sup>Optional</sup> <a name="reason" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addDependency.parameter.reason"></a>
264
+
265
+ - *Type:* string
266
+
267
+ ---
268
+
269
+ ##### `addMetadata` <a name="addMetadata" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addMetadata"></a>
270
+
271
+ ```typescript
272
+ public addMetadata(key: string, value: any): void
273
+ ```
274
+
275
+ Adds an arbitrary key-value pair, with information you want to record about the stack.
276
+
277
+ These get translated to the Metadata section of the generated template.
278
+
279
+ > [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html)
280
+
281
+ ###### `key`<sup>Required</sup> <a name="key" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addMetadata.parameter.key"></a>
282
+
283
+ - *Type:* string
284
+
285
+ ---
286
+
287
+ ###### `value`<sup>Required</sup> <a name="value" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addMetadata.parameter.value"></a>
288
+
289
+ - *Type:* any
290
+
291
+ ---
292
+
293
+ ##### `addStackTag` <a name="addStackTag" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addStackTag"></a>
294
+
295
+ ```typescript
296
+ public addStackTag(tagName: string, tagValue: string): void
297
+ ```
298
+
299
+ Configure a stack tag.
300
+
301
+ At deploy time, CloudFormation will automatically apply all stack tags to all resources in the stack.
302
+
303
+ ###### `tagName`<sup>Required</sup> <a name="tagName" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addStackTag.parameter.tagName"></a>
304
+
305
+ - *Type:* string
306
+
307
+ ---
308
+
309
+ ###### `tagValue`<sup>Required</sup> <a name="tagValue" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addStackTag.parameter.tagValue"></a>
310
+
311
+ - *Type:* string
312
+
313
+ ---
314
+
315
+ ##### `addTransform` <a name="addTransform" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addTransform"></a>
316
+
317
+ ```typescript
318
+ public addTransform(transform: string): void
319
+ ```
320
+
321
+ Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template.
322
+
323
+ Duplicate values are removed when stack is synthesized.
324
+
325
+ > [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html)
326
+
327
+ *Example*
328
+
329
+ ```typescript
330
+ declare const stack: Stack;
331
+
332
+ stack.addTransform('AWS::Serverless-2016-10-31')
333
+ ```
334
+
335
+
336
+ ###### `transform`<sup>Required</sup> <a name="transform" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.addTransform.parameter.transform"></a>
337
+
338
+ - *Type:* string
339
+
340
+ The transform to add.
341
+
342
+ ---
343
+
344
+ ##### `exportStringListValue` <a name="exportStringListValue" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportStringListValue"></a>
345
+
346
+ ```typescript
347
+ public exportStringListValue(exportedValue: any, options?: ExportValueOptions): string[]
348
+ ```
349
+
350
+ Create a CloudFormation Export for a string list value.
351
+
352
+ Returns a string list representing the corresponding `Fn.importValue()`
353
+ expression for this Export. The export expression is automatically wrapped with an
354
+ `Fn::Join` and the import value with an `Fn::Split`, since CloudFormation can only
355
+ export strings. You can control the name for the export by passing the `name` option.
356
+
357
+ If you don't supply a value for `name`, the value you're exporting must be
358
+ a Resource attribute (for example: `bucket.bucketName`) and it will be
359
+ given the same name as the automatic cross-stack reference that would be created
360
+ if you used the attribute in another Stack.
361
+
362
+ One of the uses for this method is to *remove* the relationship between
363
+ two Stacks established by automatic cross-stack references. It will
364
+ temporarily ensure that the CloudFormation Export still exists while you
365
+ remove the reference from the consuming stack. After that, you can remove
366
+ the resource and the manual export.
367
+
368
+ See `exportValue` for an example of this process.
369
+
370
+ ###### `exportedValue`<sup>Required</sup> <a name="exportedValue" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportStringListValue.parameter.exportedValue"></a>
371
+
372
+ - *Type:* any
373
+
374
+ ---
375
+
376
+ ###### `options`<sup>Optional</sup> <a name="options" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportStringListValue.parameter.options"></a>
377
+
378
+ - *Type:* aws-cdk-lib.ExportValueOptions
379
+
380
+ ---
381
+
382
+ ##### `exportValue` <a name="exportValue" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportValue"></a>
383
+
384
+ ```typescript
385
+ public exportValue(exportedValue: any, options?: ExportValueOptions): string
386
+ ```
387
+
388
+ Create a CloudFormation Export for a string value.
389
+
390
+ Returns a string representing the corresponding `Fn.importValue()`
391
+ expression for this Export. You can control the name for the export by
392
+ passing the `name` option.
393
+
394
+ If you don't supply a value for `name`, the value you're exporting must be
395
+ a Resource attribute (for example: `bucket.bucketName`) and it will be
396
+ given the same name as the automatic cross-stack reference that would be created
397
+ if you used the attribute in another Stack.
398
+
399
+ One of the uses for this method is to *remove* the relationship between
400
+ two Stacks established by automatic cross-stack references. It will
401
+ temporarily ensure that the CloudFormation Export still exists while you
402
+ remove the reference from the consuming stack. After that, you can remove
403
+ the resource and the manual export.
404
+
405
+ Here is how the process works. Let's say there are two stacks,
406
+ `producerStack` and `consumerStack`, and `producerStack` has a bucket
407
+ called `bucket`, which is referenced by `consumerStack` (perhaps because
408
+ an AWS Lambda Function writes into it, or something like that).
409
+
410
+ It is not safe to remove `producerStack.bucket` because as the bucket is being
411
+ deleted, `consumerStack` might still be using it.
412
+
413
+ Instead, the process takes two deployments:
414
+
415
+ **Deployment 1: break the relationship**:
416
+
417
+ - Make sure `consumerStack` no longer references `bucket.bucketName` (maybe the consumer
418
+ stack now uses its own bucket, or it writes to an AWS DynamoDB table, or maybe you just
419
+ remove the Lambda Function altogether).
420
+ - In the `ProducerStack` class, call `this.exportValue(this.bucket.bucketName)`. This
421
+ will make sure the CloudFormation Export continues to exist while the relationship
422
+ between the two stacks is being broken.
423
+ - Deploy (this will effectively only change the `consumerStack`, but it's safe to deploy both).
424
+
425
+ **Deployment 2: remove the bucket resource**:
426
+
427
+ - You are now free to remove the `bucket` resource from `producerStack`.
428
+ - Don't forget to remove the `exportValue()` call as well.
429
+ - Deploy again (this time only the `producerStack` will be changed -- the bucket will be deleted).
430
+
431
+ ###### `exportedValue`<sup>Required</sup> <a name="exportedValue" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportValue.parameter.exportedValue"></a>
432
+
433
+ - *Type:* any
434
+
435
+ ---
436
+
437
+ ###### `options`<sup>Optional</sup> <a name="options" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.exportValue.parameter.options"></a>
438
+
439
+ - *Type:* aws-cdk-lib.ExportValueOptions
440
+
441
+ ---
442
+
443
+ ##### `formatArn` <a name="formatArn" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.formatArn"></a>
444
+
445
+ ```typescript
446
+ public formatArn(components: ArnComponents): string
447
+ ```
448
+
449
+ Creates an ARN from components.
450
+
451
+ If `partition`, `region` or `account` are not specified, the stack's
452
+ partition, region and account will be used.
453
+
454
+ If any component is the empty string, an empty string will be inserted
455
+ into the generated ARN at the location that component corresponds to.
456
+
457
+ The ARN will be formatted as follows:
458
+
459
+ arn:{partition}:{service}:{region}:{account}:{resource}{sep}{resource-name}
460
+
461
+ The required ARN pieces that are omitted will be taken from the stack that
462
+ the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope
463
+ can be 'undefined'.
464
+
465
+ ###### `components`<sup>Required</sup> <a name="components" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.formatArn.parameter.components"></a>
466
+
467
+ - *Type:* aws-cdk-lib.ArnComponents
468
+
469
+ ---
470
+
471
+ ##### `getLogicalId` <a name="getLogicalId" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.getLogicalId"></a>
472
+
473
+ ```typescript
474
+ public getLogicalId(element: CfnElement): string
475
+ ```
476
+
477
+ Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource.
478
+
479
+ This method is called when a `CfnElement` is created and used to render the
480
+ initial logical identity of resources. Logical ID renames are applied at
481
+ this stage.
482
+
483
+ This method uses the protected method `allocateLogicalId` to render the
484
+ logical ID for an element. To modify the naming scheme, extend the `Stack`
485
+ class and override this method.
486
+
487
+ ###### `element`<sup>Required</sup> <a name="element" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.getLogicalId.parameter.element"></a>
488
+
489
+ - *Type:* aws-cdk-lib.CfnElement
490
+
491
+ The CloudFormation element for which a logical identity is needed.
492
+
493
+ ---
494
+
495
+ ##### `regionalFact` <a name="regionalFact" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.regionalFact"></a>
496
+
497
+ ```typescript
498
+ public regionalFact(factName: string, defaultValue?: string): string
499
+ ```
500
+
501
+ Look up a fact value for the given fact for the region of this stack.
502
+
503
+ Will return a definite value only if the region of the current stack is resolved.
504
+ If not, a lookup map will be added to the stack and the lookup will be done at
505
+ CDK deployment time.
506
+
507
+ What regions will be included in the lookup map is controlled by the
508
+ `@aws-cdk/core:target-partitions` context value: it must be set to a list
509
+ of partitions, and only regions from the given partitions will be included.
510
+ If no such context key is set, all regions will be included.
511
+
512
+ This function is intended to be used by construct library authors. Application
513
+ builders can rely on the abstractions offered by construct libraries and do
514
+ not have to worry about regional facts.
515
+
516
+ If `defaultValue` is not given, it is an error if the fact is unknown for
517
+ the given region.
518
+
519
+ ###### `factName`<sup>Required</sup> <a name="factName" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.regionalFact.parameter.factName"></a>
520
+
521
+ - *Type:* string
522
+
523
+ ---
524
+
525
+ ###### `defaultValue`<sup>Optional</sup> <a name="defaultValue" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.regionalFact.parameter.defaultValue"></a>
526
+
527
+ - *Type:* string
528
+
529
+ ---
530
+
531
+ ##### `removeStackTag` <a name="removeStackTag" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.removeStackTag"></a>
532
+
533
+ ```typescript
534
+ public removeStackTag(tagName: string): void
535
+ ```
536
+
537
+ Remove a stack tag.
538
+
539
+ At deploy time, CloudFormation will automatically apply all stack tags to all resources in the stack.
540
+
541
+ ###### `tagName`<sup>Required</sup> <a name="tagName" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.removeStackTag.parameter.tagName"></a>
542
+
543
+ - *Type:* string
544
+
545
+ ---
546
+
547
+ ##### `renameLogicalId` <a name="renameLogicalId" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.renameLogicalId"></a>
548
+
549
+ ```typescript
550
+ public renameLogicalId(oldId: string, newId: string): void
551
+ ```
552
+
553
+ Rename a generated logical identities.
554
+
555
+ To modify the naming scheme strategy, extend the `Stack` class and
556
+ override the `allocateLogicalId` method.
557
+
558
+ ###### `oldId`<sup>Required</sup> <a name="oldId" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.renameLogicalId.parameter.oldId"></a>
559
+
560
+ - *Type:* string
561
+
562
+ ---
563
+
564
+ ###### `newId`<sup>Required</sup> <a name="newId" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.renameLogicalId.parameter.newId"></a>
565
+
566
+ - *Type:* string
567
+
568
+ ---
569
+
570
+ ##### `reportMissingContextKey` <a name="reportMissingContextKey" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.reportMissingContextKey"></a>
571
+
572
+ ```typescript
573
+ public reportMissingContextKey(report: MissingContext): void
574
+ ```
575
+
576
+ Indicate that a context key was expected.
577
+
578
+ Contains instructions which will be emitted into the cloud assembly on how
579
+ the key should be supplied.
580
+
581
+ ###### `report`<sup>Required</sup> <a name="report" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.reportMissingContextKey.parameter.report"></a>
582
+
583
+ - *Type:* aws-cdk-lib.cloud_assembly_schema.MissingContext
584
+
585
+ The set of parameters needed to obtain the context.
586
+
587
+ ---
588
+
589
+ ##### `resolve` <a name="resolve" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.resolve"></a>
590
+
591
+ ```typescript
592
+ public resolve(obj: any): any
593
+ ```
594
+
595
+ Resolve a tokenized value in the context of the current stack.
596
+
597
+ ###### `obj`<sup>Required</sup> <a name="obj" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.resolve.parameter.obj"></a>
598
+
599
+ - *Type:* any
600
+
601
+ ---
602
+
603
+ ##### `splitArn` <a name="splitArn" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.splitArn"></a>
604
+
605
+ ```typescript
606
+ public splitArn(arn: string, arnFormat: ArnFormat): ArnComponents
607
+ ```
608
+
609
+ Splits the provided ARN into its components.
610
+
611
+ Works both if 'arn' is a string like 'arn:aws:s3:::bucket',
612
+ and a Token representing a dynamic CloudFormation expression
613
+ (in which case the returned components will also be dynamic CloudFormation expressions,
614
+ encoded as Tokens).
615
+
616
+ ###### `arn`<sup>Required</sup> <a name="arn" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.splitArn.parameter.arn"></a>
617
+
618
+ - *Type:* string
619
+
620
+ the ARN to split into its components.
621
+
622
+ ---
623
+
624
+ ###### `arnFormat`<sup>Required</sup> <a name="arnFormat" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.splitArn.parameter.arnFormat"></a>
625
+
626
+ - *Type:* aws-cdk-lib.ArnFormat
627
+
628
+ the expected format of 'arn' - depends on what format the service 'arn' represents uses.
629
+
630
+ ---
631
+
632
+ ##### `toJsonString` <a name="toJsonString" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toJsonString"></a>
633
+
634
+ ```typescript
635
+ public toJsonString(obj: any, space?: number): string
636
+ ```
637
+
638
+ Convert an object, potentially containing tokens, to a JSON string.
639
+
640
+ ###### `obj`<sup>Required</sup> <a name="obj" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toJsonString.parameter.obj"></a>
641
+
642
+ - *Type:* any
643
+
644
+ ---
645
+
646
+ ###### `space`<sup>Optional</sup> <a name="space" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toJsonString.parameter.space"></a>
647
+
648
+ - *Type:* number
649
+
650
+ ---
651
+
652
+ ##### `toYamlString` <a name="toYamlString" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toYamlString"></a>
653
+
654
+ ```typescript
655
+ public toYamlString(obj: any): string
656
+ ```
657
+
658
+ Convert an object, potentially containing tokens, to a YAML string.
659
+
660
+ ###### `obj`<sup>Required</sup> <a name="obj" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.toYamlString.parameter.obj"></a>
661
+
662
+ - *Type:* any
663
+
664
+ ---
665
+
666
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
667
+
668
+ | **Name** | **Description** |
669
+ | --- | --- |
670
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
671
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.isStack">isStack</a></code> | Return whether the given object is a Stack. |
672
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.of">of</a></code> | Looks up the first stack scope in which `construct` is defined. |
673
+
674
+ ---
675
+
676
+ ##### `isConstruct` <a name="isConstruct" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.isConstruct"></a>
677
+
678
+ ```typescript
679
+ import { EC2InstanceRunningScheduleStack } from 'aws-ec2-instance-running-scheduler'
680
+
681
+ EC2InstanceRunningScheduleStack.isConstruct(x: any)
682
+ ```
683
+
684
+ Checks if `x` is a construct.
685
+
686
+ Use this method instead of `instanceof` to properly detect `Construct`
687
+ instances, even when the construct library is symlinked.
688
+
689
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
690
+ disk are seen as independent, completely different libraries. As a
691
+ consequence, the class `Construct` in each copy of the `constructs` library
692
+ is seen as a different class, and an instance of one class will not test as
693
+ `instanceof` the other class. `npm install` will not create installations
694
+ like this, but users may manually symlink construct libraries together or
695
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
696
+ library can be accidentally installed, and `instanceof` will behave
697
+ unpredictably. It is safest to avoid using `instanceof`, and using
698
+ this type-testing method instead.
699
+
700
+ ###### `x`<sup>Required</sup> <a name="x" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.isConstruct.parameter.x"></a>
701
+
702
+ - *Type:* any
703
+
704
+ Any object.
705
+
706
+ ---
707
+
708
+ ##### `isStack` <a name="isStack" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.isStack"></a>
709
+
710
+ ```typescript
711
+ import { EC2InstanceRunningScheduleStack } from 'aws-ec2-instance-running-scheduler'
712
+
713
+ EC2InstanceRunningScheduleStack.isStack(x: any)
714
+ ```
715
+
716
+ Return whether the given object is a Stack.
717
+
718
+ We do attribute detection since we can't reliably use 'instanceof'.
719
+
720
+ ###### `x`<sup>Required</sup> <a name="x" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.isStack.parameter.x"></a>
721
+
722
+ - *Type:* any
723
+
724
+ ---
725
+
726
+ ##### `of` <a name="of" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.of"></a>
727
+
728
+ ```typescript
729
+ import { EC2InstanceRunningScheduleStack } from 'aws-ec2-instance-running-scheduler'
730
+
731
+ EC2InstanceRunningScheduleStack.of(construct: IConstruct)
732
+ ```
733
+
734
+ Looks up the first stack scope in which `construct` is defined.
735
+
736
+ Fails if there is no stack up the tree.
737
+
738
+ ###### `construct`<sup>Required</sup> <a name="construct" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.of.parameter.construct"></a>
739
+
740
+ - *Type:* constructs.IConstruct
741
+
742
+ The construct to start the search from.
743
+
744
+ ---
745
+
746
+ #### Properties <a name="Properties" id="Properties"></a>
747
+
748
+ | **Name** | **Type** | **Description** |
749
+ | --- | --- | --- |
750
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
751
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.account">account</a></code> | <code>string</code> | The AWS account into which this stack will be deployed. |
752
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.artifactId">artifactId</a></code> | <code>string</code> | The ID of the cloud assembly artifact for this stack. |
753
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.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. |
754
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.bundlingRequired">bundlingRequired</a></code> | <code>boolean</code> | Indicates whether the stack requires bundling or not. |
755
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.dependencies">dependencies</a></code> | <code>aws-cdk-lib.Stack[]</code> | Return the stacks this stack depends on. |
756
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.environment">environment</a></code> | <code>string</code> | The environment coordinates in which this stack is deployed. |
757
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.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. |
758
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.notificationArns">notificationArns</a></code> | <code>string[]</code> | Returns the list of notification Amazon Resource Names (ARNs) for the current stack. |
759
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.partition">partition</a></code> | <code>string</code> | The partition in which this stack is defined. |
760
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.region">region</a></code> | <code>string</code> | The AWS region into which this stack will be deployed (e.g. `us-west-2`). |
761
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.stackId">stackId</a></code> | <code>string</code> | The ID of the stack. |
762
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.stackName">stackName</a></code> | <code>string</code> | The concrete CloudFormation physical stack name. |
763
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.synthesizer">synthesizer</a></code> | <code>aws-cdk-lib.IStackSynthesizer</code> | Synthesis method for this stack. |
764
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.tags">tags</a></code> | <code>aws-cdk-lib.TagManager</code> | Tags to be applied to the stack. |
765
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.templateFile">templateFile</a></code> | <code>string</code> | The name of the CloudFormation template file emitted to the output directory during synthesis. |
766
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.templateOptions">templateOptions</a></code> | <code>aws-cdk-lib.ITemplateOptions</code> | Options for CloudFormation template (like version, transform, description). |
767
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.urlSuffix">urlSuffix</a></code> | <code>string</code> | The Amazon domain suffix for the region in which this stack is defined. |
768
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.nestedStackParent">nestedStackParent</a></code> | <code>aws-cdk-lib.Stack</code> | If this is a nested stack, returns it's parent stack. |
769
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.nestedStackResource">nestedStackResource</a></code> | <code>aws-cdk-lib.CfnResource</code> | If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource. |
770
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.terminationProtection">terminationProtection</a></code> | <code>boolean</code> | Whether termination protection is enabled for this stack. |
771
+
772
+ ---
773
+
774
+ ##### `node`<sup>Required</sup> <a name="node" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.node"></a>
775
+
776
+ ```typescript
777
+ public readonly node: Node;
778
+ ```
779
+
780
+ - *Type:* constructs.Node
781
+
782
+ The tree node.
783
+
784
+ ---
785
+
786
+ ##### `account`<sup>Required</sup> <a name="account" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.account"></a>
787
+
788
+ ```typescript
789
+ public readonly account: string;
790
+ ```
791
+
792
+ - *Type:* string
793
+
794
+ The AWS account into which this stack will be deployed.
795
+
796
+ This value is resolved according to the following rules:
797
+
798
+ 1. The value provided to `env.account` when the stack is defined. This can
799
+ either be a concrete account (e.g. `585695031111`) or the
800
+ `Aws.ACCOUNT_ID` token.
801
+ 3. `Aws.ACCOUNT_ID`, which represents the CloudFormation intrinsic reference
802
+ `{ "Ref": "AWS::AccountId" }` encoded as a string token.
803
+
804
+ Preferably, you should use the return value as an opaque string and not
805
+ attempt to parse it to implement your logic. If you do, you must first
806
+ check that it is a concrete value an not an unresolved token. If this
807
+ value is an unresolved token (`Token.isUnresolved(stack.account)` returns
808
+ `true`), this implies that the user wishes that this stack will synthesize
809
+ into an **account-agnostic template**. In this case, your code should either
810
+ fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
811
+ implement some other account-agnostic behavior.
812
+
813
+ ---
814
+
815
+ ##### `artifactId`<sup>Required</sup> <a name="artifactId" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.artifactId"></a>
816
+
817
+ ```typescript
818
+ public readonly artifactId: string;
819
+ ```
820
+
821
+ - *Type:* string
822
+
823
+ The ID of the cloud assembly artifact for this stack.
824
+
825
+ ---
826
+
827
+ ##### `availabilityZones`<sup>Required</sup> <a name="availabilityZones" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.availabilityZones"></a>
828
+
829
+ ```typescript
830
+ public readonly availabilityZones: string[];
831
+ ```
832
+
833
+ - *Type:* string[]
834
+
835
+ Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack.
836
+
837
+ If the stack is environment-agnostic (either account and/or region are
838
+ tokens), this property will return an array with 2 tokens that will resolve
839
+ at deploy-time to the first two availability zones returned from CloudFormation's
840
+ `Fn::GetAZs` intrinsic function.
841
+
842
+ If they are not available in the context, returns a set of dummy values and
843
+ reports them as missing, and let the CLI resolve them by calling EC2
844
+ `DescribeAvailabilityZones` on the target environment.
845
+
846
+ To specify a different strategy for selecting availability zones override this method.
847
+
848
+ ---
849
+
850
+ ##### `bundlingRequired`<sup>Required</sup> <a name="bundlingRequired" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.bundlingRequired"></a>
851
+
852
+ ```typescript
853
+ public readonly bundlingRequired: boolean;
854
+ ```
855
+
856
+ - *Type:* boolean
857
+
858
+ Indicates whether the stack requires bundling or not.
859
+
860
+ ---
861
+
862
+ ##### `dependencies`<sup>Required</sup> <a name="dependencies" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.dependencies"></a>
863
+
864
+ ```typescript
865
+ public readonly dependencies: Stack[];
866
+ ```
867
+
868
+ - *Type:* aws-cdk-lib.Stack[]
869
+
870
+ Return the stacks this stack depends on.
871
+
872
+ ---
873
+
874
+ ##### `environment`<sup>Required</sup> <a name="environment" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.environment"></a>
875
+
876
+ ```typescript
877
+ public readonly environment: string;
878
+ ```
879
+
880
+ - *Type:* string
881
+
882
+ The environment coordinates in which this stack is deployed.
883
+
884
+ In the form
885
+ `aws://account/region`. Use `stack.account` and `stack.region` to obtain
886
+ the specific values, no need to parse.
887
+
888
+ You can use this value to determine if two stacks are targeting the same
889
+ environment.
890
+
891
+ If either `stack.account` or `stack.region` are not concrete values (e.g.
892
+ `Aws.ACCOUNT_ID` or `Aws.REGION`) the special strings `unknown-account` and/or
893
+ `unknown-region` will be used respectively to indicate this stack is
894
+ region/account-agnostic.
895
+
896
+ ---
897
+
898
+ ##### `nested`<sup>Required</sup> <a name="nested" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.nested"></a>
899
+
900
+ ```typescript
901
+ public readonly nested: boolean;
902
+ ```
903
+
904
+ - *Type:* boolean
905
+
906
+ Indicates if this is a nested stack, in which case `parentStack` will include a reference to it's parent.
907
+
908
+ ---
909
+
910
+ ##### `notificationArns`<sup>Required</sup> <a name="notificationArns" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.notificationArns"></a>
911
+
912
+ ```typescript
913
+ public readonly notificationArns: string[];
914
+ ```
915
+
916
+ - *Type:* string[]
917
+
918
+ Returns the list of notification Amazon Resource Names (ARNs) for the current stack.
919
+
920
+ ---
921
+
922
+ ##### `partition`<sup>Required</sup> <a name="partition" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.partition"></a>
923
+
924
+ ```typescript
925
+ public readonly partition: string;
926
+ ```
927
+
928
+ - *Type:* string
929
+
930
+ The partition in which this stack is defined.
931
+
932
+ ---
933
+
934
+ ##### `region`<sup>Required</sup> <a name="region" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.region"></a>
935
+
936
+ ```typescript
937
+ public readonly region: string;
938
+ ```
939
+
940
+ - *Type:* string
941
+
942
+ The AWS region into which this stack will be deployed (e.g. `us-west-2`).
943
+
944
+ This value is resolved according to the following rules:
945
+
946
+ 1. The value provided to `env.region` when the stack is defined. This can
947
+ either be a concrete region (e.g. `us-west-2`) or the `Aws.REGION`
948
+ token.
949
+ 3. `Aws.REGION`, which is represents the CloudFormation intrinsic reference
950
+ `{ "Ref": "AWS::Region" }` encoded as a string token.
951
+
952
+ Preferably, you should use the return value as an opaque string and not
953
+ attempt to parse it to implement your logic. If you do, you must first
954
+ check that it is a concrete value an not an unresolved token. If this
955
+ value is an unresolved token (`Token.isUnresolved(stack.region)` returns
956
+ `true`), this implies that the user wishes that this stack will synthesize
957
+ into a **region-agnostic template**. In this case, your code should either
958
+ fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
959
+ implement some other region-agnostic behavior.
960
+
961
+ ---
962
+
963
+ ##### `stackId`<sup>Required</sup> <a name="stackId" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.stackId"></a>
964
+
965
+ ```typescript
966
+ public readonly stackId: string;
967
+ ```
968
+
969
+ - *Type:* string
970
+
971
+ The ID of the stack.
972
+
973
+ ---
974
+
975
+ *Example*
976
+
977
+ ```typescript
978
+ // After resolving, looks like
979
+ 'arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123'
980
+ ```
981
+
982
+
983
+ ##### `stackName`<sup>Required</sup> <a name="stackName" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.stackName"></a>
984
+
985
+ ```typescript
986
+ public readonly stackName: string;
987
+ ```
988
+
989
+ - *Type:* string
990
+
991
+ The concrete CloudFormation physical stack name.
992
+
993
+ This is either the name defined explicitly in the `stackName` prop or
994
+ allocated based on the stack's location in the construct tree. Stacks that
995
+ are directly defined under the app use their construct `id` as their stack
996
+ name. Stacks that are defined deeper within the tree will use a hashed naming
997
+ scheme based on the construct path to ensure uniqueness.
998
+
999
+ If you wish to obtain the deploy-time AWS::StackName intrinsic,
1000
+ you can use `Aws.STACK_NAME` directly.
1001
+
1002
+ ---
1003
+
1004
+ ##### `synthesizer`<sup>Required</sup> <a name="synthesizer" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.synthesizer"></a>
1005
+
1006
+ ```typescript
1007
+ public readonly synthesizer: IStackSynthesizer;
1008
+ ```
1009
+
1010
+ - *Type:* aws-cdk-lib.IStackSynthesizer
1011
+
1012
+ Synthesis method for this stack.
1013
+
1014
+ ---
1015
+
1016
+ ##### `tags`<sup>Required</sup> <a name="tags" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.tags"></a>
1017
+
1018
+ ```typescript
1019
+ public readonly tags: TagManager;
1020
+ ```
1021
+
1022
+ - *Type:* aws-cdk-lib.TagManager
1023
+
1024
+ Tags to be applied to the stack.
1025
+
1026
+ ---
1027
+
1028
+ ##### `templateFile`<sup>Required</sup> <a name="templateFile" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.templateFile"></a>
1029
+
1030
+ ```typescript
1031
+ public readonly templateFile: string;
1032
+ ```
1033
+
1034
+ - *Type:* string
1035
+
1036
+ The name of the CloudFormation template file emitted to the output directory during synthesis.
1037
+
1038
+ Example value: `MyStack.template.json`
1039
+
1040
+ ---
1041
+
1042
+ ##### `templateOptions`<sup>Required</sup> <a name="templateOptions" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.templateOptions"></a>
1043
+
1044
+ ```typescript
1045
+ public readonly templateOptions: ITemplateOptions;
1046
+ ```
1047
+
1048
+ - *Type:* aws-cdk-lib.ITemplateOptions
1049
+
1050
+ Options for CloudFormation template (like version, transform, description).
1051
+
1052
+ ---
1053
+
1054
+ ##### `urlSuffix`<sup>Required</sup> <a name="urlSuffix" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.urlSuffix"></a>
1055
+
1056
+ ```typescript
1057
+ public readonly urlSuffix: string;
1058
+ ```
1059
+
1060
+ - *Type:* string
1061
+
1062
+ The Amazon domain suffix for the region in which this stack is defined.
1063
+
1064
+ ---
1065
+
1066
+ ##### `nestedStackParent`<sup>Optional</sup> <a name="nestedStackParent" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.nestedStackParent"></a>
1067
+
1068
+ ```typescript
1069
+ public readonly nestedStackParent: Stack;
1070
+ ```
1071
+
1072
+ - *Type:* aws-cdk-lib.Stack
1073
+
1074
+ If this is a nested stack, returns it's parent stack.
1075
+
1076
+ ---
1077
+
1078
+ ##### `nestedStackResource`<sup>Optional</sup> <a name="nestedStackResource" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.nestedStackResource"></a>
1079
+
1080
+ ```typescript
1081
+ public readonly nestedStackResource: CfnResource;
1082
+ ```
1083
+
1084
+ - *Type:* aws-cdk-lib.CfnResource
1085
+
1086
+ If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource.
1087
+
1088
+ `undefined` for top-level (non-nested) stacks.
1089
+
1090
+ ---
1091
+
1092
+ ##### `terminationProtection`<sup>Required</sup> <a name="terminationProtection" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStack.property.terminationProtection"></a>
1093
+
1094
+ ```typescript
1095
+ public readonly terminationProtection: boolean;
1096
+ ```
1097
+
1098
+ - *Type:* boolean
1099
+
1100
+ Whether termination protection is enabled for this stack.
1101
+
1102
+ ---
1103
+
1104
+
1105
+ ## Structs <a name="Structs" id="Structs"></a>
1106
+
1107
+ ### EC2InstanceRunningSchedulerProps <a name="EC2InstanceRunningSchedulerProps" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps"></a>
1108
+
1109
+ Properties for creating an EC2 instance running scheduler.
1110
+
1111
+ #### Initializer <a name="Initializer" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.Initializer"></a>
1112
+
1113
+ ```typescript
1114
+ import { EC2InstanceRunningSchedulerProps } from 'aws-ec2-instance-running-scheduler'
1115
+
1116
+ const eC2InstanceRunningSchedulerProps: EC2InstanceRunningSchedulerProps = { ... }
1117
+ ```
1118
+
1119
+ #### Properties <a name="Properties" id="Properties"></a>
1120
+
1121
+ | **Name** | **Type** | **Description** |
1122
+ | --- | --- | --- |
1123
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.secrets">secrets</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.Secrets">Secrets</a></code> | Secrets (e.g. Slack) used for notifications. |
1124
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.targetResource">targetResource</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.TargetResource">TargetResource</a></code> | Tag-based targeting for EC2 instances to start/stop. |
1125
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.enableScheduling">enableScheduling</a></code> | <code>boolean</code> | Whether EventBridge Scheduler rules are enabled. |
1126
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.startSchedule">startSchedule</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a></code> | Cron schedule for starting instances. |
1127
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.stopSchedule">stopSchedule</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a></code> | Cron schedule for stopping instances. |
1128
+
1129
+ ---
1130
+
1131
+ ##### `secrets`<sup>Required</sup> <a name="secrets" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.secrets"></a>
1132
+
1133
+ ```typescript
1134
+ public readonly secrets: Secrets;
1135
+ ```
1136
+
1137
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.Secrets">Secrets</a>
1138
+
1139
+ Secrets (e.g. Slack) used for notifications.
1140
+
1141
+ ---
1142
+
1143
+ ##### `targetResource`<sup>Required</sup> <a name="targetResource" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.targetResource"></a>
1144
+
1145
+ ```typescript
1146
+ public readonly targetResource: TargetResource;
1147
+ ```
1148
+
1149
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.TargetResource">TargetResource</a>
1150
+
1151
+ Tag-based targeting for EC2 instances to start/stop.
1152
+
1153
+ ---
1154
+
1155
+ ##### `enableScheduling`<sup>Optional</sup> <a name="enableScheduling" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.enableScheduling"></a>
1156
+
1157
+ ```typescript
1158
+ public readonly enableScheduling: boolean;
1159
+ ```
1160
+
1161
+ - *Type:* boolean
1162
+
1163
+ Whether EventBridge Scheduler rules are enabled.
1164
+
1165
+ Defaults to true if omitted.
1166
+
1167
+ ---
1168
+
1169
+ ##### `startSchedule`<sup>Optional</sup> <a name="startSchedule" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.startSchedule"></a>
1170
+
1171
+ ```typescript
1172
+ public readonly startSchedule: Schedule;
1173
+ ```
1174
+
1175
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a>
1176
+
1177
+ Cron schedule for starting instances.
1178
+
1179
+ ---
1180
+
1181
+ ##### `stopSchedule`<sup>Optional</sup> <a name="stopSchedule" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps.property.stopSchedule"></a>
1182
+
1183
+ ```typescript
1184
+ public readonly stopSchedule: Schedule;
1185
+ ```
1186
+
1187
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a>
1188
+
1189
+ Cron schedule for stopping instances.
1190
+
1191
+ ---
1192
+
1193
+ ### EC2InstanceRunningScheduleStackProps <a name="EC2InstanceRunningScheduleStackProps" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps"></a>
1194
+
1195
+ Props for the EC2 instance running schedule CDK stack.
1196
+
1197
+ #### Initializer <a name="Initializer" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.Initializer"></a>
1198
+
1199
+ ```typescript
1200
+ import { EC2InstanceRunningScheduleStackProps } from 'aws-ec2-instance-running-scheduler'
1201
+
1202
+ const eC2InstanceRunningScheduleStackProps: EC2InstanceRunningScheduleStackProps = { ... }
1203
+ ```
1204
+
1205
+ #### Properties <a name="Properties" id="Properties"></a>
1206
+
1207
+ | **Name** | **Type** | **Description** |
1208
+ | --- | --- | --- |
1209
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.analyticsReporting">analyticsReporting</a></code> | <code>boolean</code> | Include runtime versioning information in this Stack. |
1210
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.crossRegionReferences">crossRegionReferences</a></code> | <code>boolean</code> | Enable this flag to allow native cross region stack references. |
1211
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.description">description</a></code> | <code>string</code> | A description of the stack. |
1212
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.env">env</a></code> | <code>aws-cdk-lib.Environment</code> | The AWS environment (account/region) where this stack will be deployed. |
1213
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.notificationArns">notificationArns</a></code> | <code>string[]</code> | SNS Topic ARNs that will receive stack events. |
1214
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.permissionsBoundary">permissionsBoundary</a></code> | <code>aws-cdk-lib.PermissionsBoundary</code> | Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. |
1215
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.propertyInjectors">propertyInjectors</a></code> | <code>aws-cdk-lib.IPropertyInjector[]</code> | A list of IPropertyInjector attached to this Stack. |
1216
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.stackName">stackName</a></code> | <code>string</code> | Name to deploy the stack with. |
1217
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.suppressTemplateIndentation">suppressTemplateIndentation</a></code> | <code>boolean</code> | Enable this flag to suppress indentation in generated CloudFormation templates. |
1218
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.synthesizer">synthesizer</a></code> | <code>aws-cdk-lib.IStackSynthesizer</code> | Synthesis method to use while deploying this stack. |
1219
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.tags">tags</a></code> | <code>{[ key: string ]: string}</code> | Tags that will be applied to the Stack. |
1220
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.terminationProtection">terminationProtection</a></code> | <code>boolean</code> | Whether to enable termination protection for this stack. |
1221
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.secrets">secrets</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.Secrets">Secrets</a></code> | Secrets (e.g. Slack) for the scheduler. |
1222
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.targetResource">targetResource</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.TargetResource">TargetResource</a></code> | Tag-based target resource for EC2 instances to start/stop. |
1223
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.enableScheduling">enableScheduling</a></code> | <code>boolean</code> | Whether scheduling is enabled. |
1224
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.startSchedule">startSchedule</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a></code> | Cron schedule for starting instances. |
1225
+ | <code><a href="#aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.stopSchedule">stopSchedule</a></code> | <code><a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a></code> | Cron schedule for stopping instances. |
1226
+
1227
+ ---
1228
+
1229
+ ##### `analyticsReporting`<sup>Optional</sup> <a name="analyticsReporting" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.analyticsReporting"></a>
1230
+
1231
+ ```typescript
1232
+ public readonly analyticsReporting: boolean;
1233
+ ```
1234
+
1235
+ - *Type:* boolean
1236
+ - *Default:* `analyticsReporting` setting of containing `App`, or value of 'aws:cdk:version-reporting' context key
1237
+
1238
+ Include runtime versioning information in this Stack.
1239
+
1240
+ ---
1241
+
1242
+ ##### `crossRegionReferences`<sup>Optional</sup> <a name="crossRegionReferences" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.crossRegionReferences"></a>
1243
+
1244
+ ```typescript
1245
+ public readonly crossRegionReferences: boolean;
1246
+ ```
1247
+
1248
+ - *Type:* boolean
1249
+ - *Default:* false
1250
+
1251
+ Enable this flag to allow native cross region stack references.
1252
+
1253
+ Enabling this will create a CloudFormation custom resource
1254
+ in both the producing stack and consuming stack in order to perform the export/import
1255
+
1256
+ This feature is currently experimental
1257
+
1258
+ ---
1259
+
1260
+ ##### `description`<sup>Optional</sup> <a name="description" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.description"></a>
1261
+
1262
+ ```typescript
1263
+ public readonly description: string;
1264
+ ```
1265
+
1266
+ - *Type:* string
1267
+ - *Default:* No description.
1268
+
1269
+ A description of the stack.
1270
+
1271
+ ---
1272
+
1273
+ ##### `env`<sup>Optional</sup> <a name="env" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.env"></a>
1274
+
1275
+ ```typescript
1276
+ public readonly env: Environment;
1277
+ ```
1278
+
1279
+ - *Type:* aws-cdk-lib.Environment
1280
+ - *Default:* The environment of the containing `Stage` if available, otherwise create the stack will be environment-agnostic.
1281
+
1282
+ The AWS environment (account/region) where this stack will be deployed.
1283
+
1284
+ Set the `region`/`account` fields of `env` to either a concrete value to
1285
+ select the indicated environment (recommended for production stacks), or to
1286
+ the values of environment variables
1287
+ `CDK_DEFAULT_REGION`/`CDK_DEFAULT_ACCOUNT` to let the target environment
1288
+ depend on the AWS credentials/configuration that the CDK CLI is executed
1289
+ under (recommended for development stacks).
1290
+
1291
+ If the `Stack` is instantiated inside a `Stage`, any undefined
1292
+ `region`/`account` fields from `env` will default to the same field on the
1293
+ encompassing `Stage`, if configured there.
1294
+
1295
+ If either `region` or `account` are not set nor inherited from `Stage`, the
1296
+ Stack will be considered "*environment-agnostic*"". Environment-agnostic
1297
+ stacks can be deployed to any environment but may not be able to take
1298
+ advantage of all features of the CDK. For example, they will not be able to
1299
+ use environmental context lookups such as `ec2.Vpc.fromLookup` and will not
1300
+ automatically translate Service Principals to the right format based on the
1301
+ environment's AWS partition, and other such enhancements.
1302
+
1303
+ ---
1304
+
1305
+ *Example*
1306
+
1307
+ ```typescript
1308
+ // Use a concrete account and region to deploy this stack to:
1309
+ // `.account` and `.region` will simply return these values.
1310
+ new Stack(app, 'Stack1', {
1311
+ env: {
1312
+ account: '123456789012',
1313
+ region: 'us-east-1'
1314
+ },
1315
+ });
1316
+
1317
+ // Use the CLI's current credentials to determine the target environment:
1318
+ // `.account` and `.region` will reflect the account+region the CLI
1319
+ // is configured to use (based on the user CLI credentials)
1320
+ new Stack(app, 'Stack2', {
1321
+ env: {
1322
+ account: process.env.CDK_DEFAULT_ACCOUNT,
1323
+ region: process.env.CDK_DEFAULT_REGION
1324
+ },
1325
+ });
1326
+
1327
+ // Define multiple stacks stage associated with an environment
1328
+ const myStage = new Stage(app, 'MyStage', {
1329
+ env: {
1330
+ account: '123456789012',
1331
+ region: 'us-east-1'
1332
+ }
1333
+ });
1334
+
1335
+ // both of these stacks will use the stage's account/region:
1336
+ // `.account` and `.region` will resolve to the concrete values as above
1337
+ new MyStack(myStage, 'Stack1');
1338
+ new YourStack(myStage, 'Stack2');
1339
+
1340
+ // Define an environment-agnostic stack:
1341
+ // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
1342
+ // which will only resolve to actual values by CloudFormation during deployment.
1343
+ new MyStack(app, 'Stack1');
1344
+ ```
1345
+
1346
+
1347
+ ##### `notificationArns`<sup>Optional</sup> <a name="notificationArns" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.notificationArns"></a>
1348
+
1349
+ ```typescript
1350
+ public readonly notificationArns: string[];
1351
+ ```
1352
+
1353
+ - *Type:* string[]
1354
+ - *Default:* no notification arns.
1355
+
1356
+ SNS Topic ARNs that will receive stack events.
1357
+
1358
+ ---
1359
+
1360
+ ##### `permissionsBoundary`<sup>Optional</sup> <a name="permissionsBoundary" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.permissionsBoundary"></a>
1361
+
1362
+ ```typescript
1363
+ public readonly permissionsBoundary: PermissionsBoundary;
1364
+ ```
1365
+
1366
+ - *Type:* aws-cdk-lib.PermissionsBoundary
1367
+ - *Default:* no permissions boundary is applied
1368
+
1369
+ Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
1370
+
1371
+ ---
1372
+
1373
+ ##### `propertyInjectors`<sup>Optional</sup> <a name="propertyInjectors" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.propertyInjectors"></a>
1374
+
1375
+ ```typescript
1376
+ public readonly propertyInjectors: IPropertyInjector[];
1377
+ ```
1378
+
1379
+ - *Type:* aws-cdk-lib.IPropertyInjector[]
1380
+ - *Default:* no PropertyInjectors
1381
+
1382
+ A list of IPropertyInjector attached to this Stack.
1383
+
1384
+ ---
1385
+
1386
+ ##### `stackName`<sup>Optional</sup> <a name="stackName" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.stackName"></a>
1387
+
1388
+ ```typescript
1389
+ public readonly stackName: string;
1390
+ ```
1391
+
1392
+ - *Type:* string
1393
+ - *Default:* Derived from construct path.
1394
+
1395
+ Name to deploy the stack with.
1396
+
1397
+ ---
1398
+
1399
+ ##### `suppressTemplateIndentation`<sup>Optional</sup> <a name="suppressTemplateIndentation" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.suppressTemplateIndentation"></a>
1400
+
1401
+ ```typescript
1402
+ public readonly suppressTemplateIndentation: boolean;
1403
+ ```
1404
+
1405
+ - *Type:* boolean
1406
+ - *Default:* the value of `@aws-cdk/core:suppressTemplateIndentation`, or `false` if that is not set.
1407
+
1408
+ Enable this flag to suppress indentation in generated CloudFormation templates.
1409
+
1410
+ If not specified, the value of the `@aws-cdk/core:suppressTemplateIndentation`
1411
+ context key will be used. If that is not specified, then the
1412
+ default value `false` will be used.
1413
+
1414
+ ---
1415
+
1416
+ ##### `synthesizer`<sup>Optional</sup> <a name="synthesizer" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.synthesizer"></a>
1417
+
1418
+ ```typescript
1419
+ public readonly synthesizer: IStackSynthesizer;
1420
+ ```
1421
+
1422
+ - *Type:* aws-cdk-lib.IStackSynthesizer
1423
+ - *Default:* The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise.
1424
+
1425
+ Synthesis method to use while deploying this stack.
1426
+
1427
+ The Stack Synthesizer controls aspects of synthesis and deployment,
1428
+ like how assets are referenced and what IAM roles to use. For more
1429
+ information, see the README of the main CDK package.
1430
+
1431
+ If not specified, the `defaultStackSynthesizer` from `App` will be used.
1432
+ If that is not specified, `DefaultStackSynthesizer` is used if
1433
+ `@aws-cdk/core:newStyleStackSynthesis` is set to `true` or the CDK major
1434
+ version is v2. In CDK v1 `LegacyStackSynthesizer` is the default if no
1435
+ other synthesizer is specified.
1436
+
1437
+ ---
1438
+
1439
+ ##### `tags`<sup>Optional</sup> <a name="tags" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.tags"></a>
1440
+
1441
+ ```typescript
1442
+ public readonly tags: {[ key: string ]: string};
1443
+ ```
1444
+
1445
+ - *Type:* {[ key: string ]: string}
1446
+ - *Default:* {}
1447
+
1448
+ Tags that will be applied to the Stack.
1449
+
1450
+ These tags are applied to the CloudFormation Stack itself. They will not
1451
+ appear in the CloudFormation template.
1452
+
1453
+ However, at deployment time, CloudFormation will apply these tags to all
1454
+ resources in the stack that support tagging. You will not be able to exempt
1455
+ resources from tagging (using the `excludeResourceTypes` property of
1456
+ `Tags.of(...).add()`) for tags applied in this way.
1457
+
1458
+ ---
1459
+
1460
+ ##### `terminationProtection`<sup>Optional</sup> <a name="terminationProtection" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.terminationProtection"></a>
1461
+
1462
+ ```typescript
1463
+ public readonly terminationProtection: boolean;
1464
+ ```
1465
+
1466
+ - *Type:* boolean
1467
+ - *Default:* false
1468
+
1469
+ Whether to enable termination protection for this stack.
1470
+
1471
+ ---
1472
+
1473
+ ##### `secrets`<sup>Required</sup> <a name="secrets" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.secrets"></a>
1474
+
1475
+ ```typescript
1476
+ public readonly secrets: Secrets;
1477
+ ```
1478
+
1479
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.Secrets">Secrets</a>
1480
+
1481
+ Secrets (e.g. Slack) for the scheduler.
1482
+
1483
+ ---
1484
+
1485
+ ##### `targetResource`<sup>Required</sup> <a name="targetResource" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.targetResource"></a>
1486
+
1487
+ ```typescript
1488
+ public readonly targetResource: TargetResource;
1489
+ ```
1490
+
1491
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.TargetResource">TargetResource</a>
1492
+
1493
+ Tag-based target resource for EC2 instances to start/stop.
1494
+
1495
+ ---
1496
+
1497
+ ##### `enableScheduling`<sup>Optional</sup> <a name="enableScheduling" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.enableScheduling"></a>
1498
+
1499
+ ```typescript
1500
+ public readonly enableScheduling: boolean;
1501
+ ```
1502
+
1503
+ - *Type:* boolean
1504
+
1505
+ Whether scheduling is enabled.
1506
+
1507
+ Defaults to true if omitted.
1508
+
1509
+ ---
1510
+
1511
+ ##### `startSchedule`<sup>Optional</sup> <a name="startSchedule" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.startSchedule"></a>
1512
+
1513
+ ```typescript
1514
+ public readonly startSchedule: Schedule;
1515
+ ```
1516
+
1517
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a>
1518
+
1519
+ Cron schedule for starting instances.
1520
+
1521
+ ---
1522
+
1523
+ ##### `stopSchedule`<sup>Optional</sup> <a name="stopSchedule" id="aws-ec2-instance-running-scheduler.EC2InstanceRunningScheduleStackProps.property.stopSchedule"></a>
1524
+
1525
+ ```typescript
1526
+ public readonly stopSchedule: Schedule;
1527
+ ```
1528
+
1529
+ - *Type:* <a href="#aws-ec2-instance-running-scheduler.Schedule">Schedule</a>
1530
+
1531
+ Cron schedule for stopping instances.
1532
+
1533
+ ---
1534
+
1535
+ ### Schedule <a name="Schedule" id="aws-ec2-instance-running-scheduler.Schedule"></a>
1536
+
1537
+ Cron-style schedule configuration for start/stop actions.
1538
+
1539
+ #### Initializer <a name="Initializer" id="aws-ec2-instance-running-scheduler.Schedule.Initializer"></a>
1540
+
1541
+ ```typescript
1542
+ import { Schedule } from 'aws-ec2-instance-running-scheduler'
1543
+
1544
+ const schedule: Schedule = { ... }
1545
+ ```
1546
+
1547
+ #### Properties <a name="Properties" id="Properties"></a>
1548
+
1549
+ | **Name** | **Type** | **Description** |
1550
+ | --- | --- | --- |
1551
+ | <code><a href="#aws-ec2-instance-running-scheduler.Schedule.property.timezone">timezone</a></code> | <code>aws-cdk-lib.TimeZone</code> | Time zone for the schedule (e.g. ETC_UTC). |
1552
+ | <code><a href="#aws-ec2-instance-running-scheduler.Schedule.property.hour">hour</a></code> | <code>string</code> | Cron hour (0–23). |
1553
+ | <code><a href="#aws-ec2-instance-running-scheduler.Schedule.property.minute">minute</a></code> | <code>string</code> | Cron minute (0–59). |
1554
+ | <code><a href="#aws-ec2-instance-running-scheduler.Schedule.property.week">week</a></code> | <code>string</code> | Cron day of week (e.g. MON-FRI). |
1555
+
1556
+ ---
1557
+
1558
+ ##### `timezone`<sup>Required</sup> <a name="timezone" id="aws-ec2-instance-running-scheduler.Schedule.property.timezone"></a>
1559
+
1560
+ ```typescript
1561
+ public readonly timezone: TimeZone;
1562
+ ```
1563
+
1564
+ - *Type:* aws-cdk-lib.TimeZone
1565
+
1566
+ Time zone for the schedule (e.g. ETC_UTC).
1567
+
1568
+ ---
1569
+
1570
+ ##### `hour`<sup>Optional</sup> <a name="hour" id="aws-ec2-instance-running-scheduler.Schedule.property.hour"></a>
1571
+
1572
+ ```typescript
1573
+ public readonly hour: string;
1574
+ ```
1575
+
1576
+ - *Type:* string
1577
+
1578
+ Cron hour (0–23).
1579
+
1580
+ ---
1581
+
1582
+ ##### `minute`<sup>Optional</sup> <a name="minute" id="aws-ec2-instance-running-scheduler.Schedule.property.minute"></a>
1583
+
1584
+ ```typescript
1585
+ public readonly minute: string;
1586
+ ```
1587
+
1588
+ - *Type:* string
1589
+
1590
+ Cron minute (0–59).
1591
+
1592
+ ---
1593
+
1594
+ ##### `week`<sup>Optional</sup> <a name="week" id="aws-ec2-instance-running-scheduler.Schedule.property.week"></a>
1595
+
1596
+ ```typescript
1597
+ public readonly week: string;
1598
+ ```
1599
+
1600
+ - *Type:* string
1601
+
1602
+ Cron day of week (e.g. MON-FRI).
1603
+
1604
+ ---
1605
+
1606
+ ### Secrets <a name="Secrets" id="aws-ec2-instance-running-scheduler.Secrets"></a>
1607
+
1608
+ Secret identifiers required by the scheduler (e.g. Slack).
1609
+
1610
+ #### Initializer <a name="Initializer" id="aws-ec2-instance-running-scheduler.Secrets.Initializer"></a>
1611
+
1612
+ ```typescript
1613
+ import { Secrets } from 'aws-ec2-instance-running-scheduler'
1614
+
1615
+ const secrets: Secrets = { ... }
1616
+ ```
1617
+
1618
+ #### Properties <a name="Properties" id="Properties"></a>
1619
+
1620
+ | **Name** | **Type** | **Description** |
1621
+ | --- | --- | --- |
1622
+ | <code><a href="#aws-ec2-instance-running-scheduler.Secrets.property.slackSecretName">slackSecretName</a></code> | <code>string</code> | Name of the Secrets Manager secret containing Slack token and channel. |
1623
+
1624
+ ---
1625
+
1626
+ ##### `slackSecretName`<sup>Required</sup> <a name="slackSecretName" id="aws-ec2-instance-running-scheduler.Secrets.property.slackSecretName"></a>
1627
+
1628
+ ```typescript
1629
+ public readonly slackSecretName: string;
1630
+ ```
1631
+
1632
+ - *Type:* string
1633
+
1634
+ Name of the Secrets Manager secret containing Slack token and channel.
1635
+
1636
+ ---
1637
+
1638
+ ### TargetResource <a name="TargetResource" id="aws-ec2-instance-running-scheduler.TargetResource"></a>
1639
+
1640
+ Defines which EC2 instances are targeted by tag key and values.
1641
+
1642
+ #### Initializer <a name="Initializer" id="aws-ec2-instance-running-scheduler.TargetResource.Initializer"></a>
1643
+
1644
+ ```typescript
1645
+ import { TargetResource } from 'aws-ec2-instance-running-scheduler'
1646
+
1647
+ const targetResource: TargetResource = { ... }
1648
+ ```
1649
+
1650
+ #### Properties <a name="Properties" id="Properties"></a>
1651
+
1652
+ | **Name** | **Type** | **Description** |
1653
+ | --- | --- | --- |
1654
+ | <code><a href="#aws-ec2-instance-running-scheduler.TargetResource.property.tagKey">tagKey</a></code> | <code>string</code> | Tag key used to select instances (e.g. Schedule). |
1655
+ | <code><a href="#aws-ec2-instance-running-scheduler.TargetResource.property.tagValues">tagValues</a></code> | <code>string[]</code> | Tag values that match instances to include. |
1656
+
1657
+ ---
1658
+
1659
+ ##### `tagKey`<sup>Required</sup> <a name="tagKey" id="aws-ec2-instance-running-scheduler.TargetResource.property.tagKey"></a>
1660
+
1661
+ ```typescript
1662
+ public readonly tagKey: string;
1663
+ ```
1664
+
1665
+ - *Type:* string
1666
+
1667
+ Tag key used to select instances (e.g. Schedule).
1668
+
1669
+ ---
1670
+
1671
+ ##### `tagValues`<sup>Required</sup> <a name="tagValues" id="aws-ec2-instance-running-scheduler.TargetResource.property.tagValues"></a>
1672
+
1673
+ ```typescript
1674
+ public readonly tagValues: string[];
1675
+ ```
1676
+
1677
+ - *Type:* string[]
1678
+
1679
+ Tag values that match instances to include.
1680
+
1681
+ ---
1682
+
1683
+
1684
+