gammarers.aws-rds-database-running-schedule-stack 2.2.12__tar.gz → 2.3.1__tar.gz
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.
Potentially problematic release.
This version of gammarers.aws-rds-database-running-schedule-stack might be problematic. Click here for more details.
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12/src/gammarers.aws_rds_database_running_schedule_stack.egg-info → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/PKG-INFO +23 -1
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/README.md +21 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/setup.py +3 -2
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/src/gammarers/aws_rds_database_running_schedule_stack/__init__.py +173 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/src/gammarers/aws_rds_database_running_schedule_stack/_jsii/__init__.py +3 -2
- gammarers_aws_rds_database_running_schedule_stack-2.3.1/src/gammarers/aws_rds_database_running_schedule_stack/_jsii/aws-rds-database-running-schedule-stack@2.3.1.jsii.tgz +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1/src/gammarers.aws_rds_database_running_schedule_stack.egg-info}/PKG-INFO +23 -1
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/src/gammarers.aws_rds_database_running_schedule_stack.egg-info/SOURCES.txt +1 -1
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/src/gammarers.aws_rds_database_running_schedule_stack.egg-info/requires.txt +1 -0
- gammarers_aws_rds_database_running_schedule_stack-2.2.12/src/gammarers/aws_rds_database_running_schedule_stack/_jsii/aws-rds-database-running-schedule-stack@2.2.12.jsii.tgz +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/LICENSE +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/MANIFEST.in +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/pyproject.toml +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/setup.cfg +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/src/gammarers/aws_rds_database_running_schedule_stack/py.typed +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/src/gammarers.aws_rds_database_running_schedule_stack.egg-info/dependency_links.txt +0 -0
- {gammarers_aws_rds_database_running_schedule_stack-2.2.12 → gammarers_aws_rds_database_running_schedule_stack-2.3.1}/src/gammarers.aws_rds_database_running_schedule_stack.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gammarers.aws-rds-database-running-schedule-stack
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: AWS RDS Database Running Scheduler
|
|
5
5
|
Home-page: https://github.com/gammarers/aws-rds-database-running-schedule-stack.git
|
|
6
6
|
Author: yicr<yicr@users.noreply.github.com>
|
|
@@ -22,6 +22,7 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: aws-cdk-lib<3.0.0,>=2.120.0
|
|
24
24
|
Requires-Dist: constructs<11.0.0,>=10.0.5
|
|
25
|
+
Requires-Dist: gammarers.aws-resource-naming<0.9.0,>=0.8.2
|
|
25
26
|
Requires-Dist: jsii<2.0.0,>=1.105.0
|
|
26
27
|
Requires-Dist: publication>=0.0.3
|
|
27
28
|
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
@@ -39,6 +40,24 @@ Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
|
39
40
|
|
|
40
41
|
This AWS CDK Construct Stack controls the starting and stopping of RDS DB instances and clusters based on specified tags, ensuring they only run during working hours. It uses EventBridge Scheduler to trigger a StepFunctions State Machine at the start and end of the working hours(default 07:50(UTC) - 21:10(UTC)), which then starts or stops the databases depending on the mode.
|
|
41
42
|
|
|
43
|
+
> [!WARNING]
|
|
44
|
+
> v2.3.0:
|
|
45
|
+
> Stack props add option resourceNamingOption
|
|
46
|
+
> default ResourceNamingType.DEFAULT is cdk generated name
|
|
47
|
+
> f you want to maintain compatibility with versions below `v2.3.0`, please include the following settings (ResourceNamingType.AUTO).
|
|
48
|
+
>
|
|
49
|
+
> ```python
|
|
50
|
+
> new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
51
|
+
> targetResource: {
|
|
52
|
+
> tagKey: 'WorkHoursRunning',
|
|
53
|
+
> tagValues: ['YES'],
|
|
54
|
+
> },
|
|
55
|
+
> resourceNamingOption: {
|
|
56
|
+
> type: ResourceNamingType.AUTO, // HERE
|
|
57
|
+
> },
|
|
58
|
+
> });
|
|
59
|
+
> ```
|
|
60
|
+
|
|
42
61
|
## Fixed
|
|
43
62
|
|
|
44
63
|
* RDS Aurora Cluster
|
|
@@ -116,6 +135,9 @@ new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
|
116
135
|
hour: '19',
|
|
117
136
|
week: 'MON-FRI',
|
|
118
137
|
},
|
|
138
|
+
resourceNamingOption: {
|
|
139
|
+
type: ResourceNamingType.AUTO, // DEFAULT or AUTO or CUSTOM
|
|
140
|
+
},
|
|
119
141
|
});
|
|
120
142
|
```
|
|
121
143
|
|
|
@@ -11,6 +11,24 @@
|
|
|
11
11
|
|
|
12
12
|
This AWS CDK Construct Stack controls the starting and stopping of RDS DB instances and clusters based on specified tags, ensuring they only run during working hours. It uses EventBridge Scheduler to trigger a StepFunctions State Machine at the start and end of the working hours(default 07:50(UTC) - 21:10(UTC)), which then starts or stops the databases depending on the mode.
|
|
13
13
|
|
|
14
|
+
> [!WARNING]
|
|
15
|
+
> v2.3.0:
|
|
16
|
+
> Stack props add option resourceNamingOption
|
|
17
|
+
> default ResourceNamingType.DEFAULT is cdk generated name
|
|
18
|
+
> f you want to maintain compatibility with versions below `v2.3.0`, please include the following settings (ResourceNamingType.AUTO).
|
|
19
|
+
>
|
|
20
|
+
> ```python
|
|
21
|
+
> new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
22
|
+
> targetResource: {
|
|
23
|
+
> tagKey: 'WorkHoursRunning',
|
|
24
|
+
> tagValues: ['YES'],
|
|
25
|
+
> },
|
|
26
|
+
> resourceNamingOption: {
|
|
27
|
+
> type: ResourceNamingType.AUTO, // HERE
|
|
28
|
+
> },
|
|
29
|
+
> });
|
|
30
|
+
> ```
|
|
31
|
+
|
|
14
32
|
## Fixed
|
|
15
33
|
|
|
16
34
|
* RDS Aurora Cluster
|
|
@@ -88,6 +106,9 @@ new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
|
88
106
|
hour: '19',
|
|
89
107
|
week: 'MON-FRI',
|
|
90
108
|
},
|
|
109
|
+
resourceNamingOption: {
|
|
110
|
+
type: ResourceNamingType.AUTO, // DEFAULT or AUTO or CUSTOM
|
|
111
|
+
},
|
|
91
112
|
});
|
|
92
113
|
```
|
|
93
114
|
|
|
@@ -5,7 +5,7 @@ kwargs = json.loads(
|
|
|
5
5
|
"""
|
|
6
6
|
{
|
|
7
7
|
"name": "gammarers.aws-rds-database-running-schedule-stack",
|
|
8
|
-
"version": "2.
|
|
8
|
+
"version": "2.3.1",
|
|
9
9
|
"description": "AWS RDS Database Running Scheduler",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"url": "https://github.com/gammarers/aws-rds-database-running-schedule-stack.git",
|
|
@@ -26,7 +26,7 @@ kwargs = json.loads(
|
|
|
26
26
|
],
|
|
27
27
|
"package_data": {
|
|
28
28
|
"gammarers.aws_rds_database_running_schedule_stack._jsii": [
|
|
29
|
-
"aws-rds-database-running-schedule-stack@2.
|
|
29
|
+
"aws-rds-database-running-schedule-stack@2.3.1.jsii.tgz"
|
|
30
30
|
],
|
|
31
31
|
"gammarers.aws_rds_database_running_schedule_stack": [
|
|
32
32
|
"py.typed"
|
|
@@ -36,6 +36,7 @@ kwargs = json.loads(
|
|
|
36
36
|
"install_requires": [
|
|
37
37
|
"aws-cdk-lib>=2.120.0, <3.0.0",
|
|
38
38
|
"constructs>=10.0.5, <11.0.0",
|
|
39
|
+
"gammarers.aws-resource-naming>=0.8.2, <0.9.0",
|
|
39
40
|
"jsii>=1.105.0, <2.0.0",
|
|
40
41
|
"publication>=0.0.3",
|
|
41
42
|
"typeguard>=2.13.3,<4.3.0"
|
|
@@ -12,6 +12,24 @@ r'''
|
|
|
12
12
|
|
|
13
13
|
This AWS CDK Construct Stack controls the starting and stopping of RDS DB instances and clusters based on specified tags, ensuring they only run during working hours. It uses EventBridge Scheduler to trigger a StepFunctions State Machine at the start and end of the working hours(default 07:50(UTC) - 21:10(UTC)), which then starts or stops the databases depending on the mode.
|
|
14
14
|
|
|
15
|
+
> [!WARNING]
|
|
16
|
+
> v2.3.0:
|
|
17
|
+
> Stack props add option resourceNamingOption
|
|
18
|
+
> default ResourceNamingType.DEFAULT is cdk generated name
|
|
19
|
+
> f you want to maintain compatibility with versions below `v2.3.0`, please include the following settings (ResourceNamingType.AUTO).
|
|
20
|
+
>
|
|
21
|
+
> ```python
|
|
22
|
+
> new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
23
|
+
> targetResource: {
|
|
24
|
+
> tagKey: 'WorkHoursRunning',
|
|
25
|
+
> tagValues: ['YES'],
|
|
26
|
+
> },
|
|
27
|
+
> resourceNamingOption: {
|
|
28
|
+
> type: ResourceNamingType.AUTO, // HERE
|
|
29
|
+
> },
|
|
30
|
+
> });
|
|
31
|
+
> ```
|
|
32
|
+
|
|
15
33
|
## Fixed
|
|
16
34
|
|
|
17
35
|
* RDS Aurora Cluster
|
|
@@ -89,6 +107,9 @@ new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
|
89
107
|
hour: '19',
|
|
90
108
|
week: 'MON-FRI',
|
|
91
109
|
},
|
|
110
|
+
resourceNamingOption: {
|
|
111
|
+
type: ResourceNamingType.AUTO, // DEFAULT or AUTO or CUSTOM
|
|
112
|
+
},
|
|
92
113
|
});
|
|
93
114
|
```
|
|
94
115
|
|
|
@@ -130,6 +151,125 @@ from ._jsii import *
|
|
|
130
151
|
|
|
131
152
|
import aws_cdk as _aws_cdk_ceddda9d
|
|
132
153
|
import constructs as _constructs_77d1e7e8
|
|
154
|
+
import gammarers.aws_resource_naming as _gammarers_aws_resource_naming_22f917da
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
@jsii.data_type(
|
|
158
|
+
jsii_type="@gammarers/aws-rds-database-running-schedule-stack.CustomNaming",
|
|
159
|
+
jsii_struct_bases=[],
|
|
160
|
+
name_mapping={
|
|
161
|
+
"notification_topic_display_name": "notificationTopicDisplayName",
|
|
162
|
+
"notification_topic_name": "notificationTopicName",
|
|
163
|
+
"scheduler_role_name": "schedulerRoleName",
|
|
164
|
+
"start_schedule_name": "startScheduleName",
|
|
165
|
+
"state_machine_name": "stateMachineName",
|
|
166
|
+
"state_machine_role_name": "stateMachineRoleName",
|
|
167
|
+
"stop_schedule_name": "stopScheduleName",
|
|
168
|
+
"type": "type",
|
|
169
|
+
},
|
|
170
|
+
)
|
|
171
|
+
class CustomNaming:
|
|
172
|
+
def __init__(
|
|
173
|
+
self,
|
|
174
|
+
*,
|
|
175
|
+
notification_topic_display_name: builtins.str,
|
|
176
|
+
notification_topic_name: builtins.str,
|
|
177
|
+
scheduler_role_name: builtins.str,
|
|
178
|
+
start_schedule_name: builtins.str,
|
|
179
|
+
state_machine_name: builtins.str,
|
|
180
|
+
state_machine_role_name: builtins.str,
|
|
181
|
+
stop_schedule_name: builtins.str,
|
|
182
|
+
type: _gammarers_aws_resource_naming_22f917da.ResourceNamingType,
|
|
183
|
+
) -> None:
|
|
184
|
+
'''
|
|
185
|
+
:param notification_topic_display_name:
|
|
186
|
+
:param notification_topic_name:
|
|
187
|
+
:param scheduler_role_name:
|
|
188
|
+
:param start_schedule_name:
|
|
189
|
+
:param state_machine_name:
|
|
190
|
+
:param state_machine_role_name:
|
|
191
|
+
:param stop_schedule_name:
|
|
192
|
+
:param type:
|
|
193
|
+
'''
|
|
194
|
+
if __debug__:
|
|
195
|
+
type_hints = typing.get_type_hints(_typecheckingstub__bc6db5a15616ecf5d03a994e1e18a8dc960a3e7c1b808221a2f79d29d1f2c27c)
|
|
196
|
+
check_type(argname="argument notification_topic_display_name", value=notification_topic_display_name, expected_type=type_hints["notification_topic_display_name"])
|
|
197
|
+
check_type(argname="argument notification_topic_name", value=notification_topic_name, expected_type=type_hints["notification_topic_name"])
|
|
198
|
+
check_type(argname="argument scheduler_role_name", value=scheduler_role_name, expected_type=type_hints["scheduler_role_name"])
|
|
199
|
+
check_type(argname="argument start_schedule_name", value=start_schedule_name, expected_type=type_hints["start_schedule_name"])
|
|
200
|
+
check_type(argname="argument state_machine_name", value=state_machine_name, expected_type=type_hints["state_machine_name"])
|
|
201
|
+
check_type(argname="argument state_machine_role_name", value=state_machine_role_name, expected_type=type_hints["state_machine_role_name"])
|
|
202
|
+
check_type(argname="argument stop_schedule_name", value=stop_schedule_name, expected_type=type_hints["stop_schedule_name"])
|
|
203
|
+
check_type(argname="argument type", value=type, expected_type=type_hints["type"])
|
|
204
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
205
|
+
"notification_topic_display_name": notification_topic_display_name,
|
|
206
|
+
"notification_topic_name": notification_topic_name,
|
|
207
|
+
"scheduler_role_name": scheduler_role_name,
|
|
208
|
+
"start_schedule_name": start_schedule_name,
|
|
209
|
+
"state_machine_name": state_machine_name,
|
|
210
|
+
"state_machine_role_name": state_machine_role_name,
|
|
211
|
+
"stop_schedule_name": stop_schedule_name,
|
|
212
|
+
"type": type,
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@builtins.property
|
|
216
|
+
def notification_topic_display_name(self) -> builtins.str:
|
|
217
|
+
result = self._values.get("notification_topic_display_name")
|
|
218
|
+
assert result is not None, "Required property 'notification_topic_display_name' is missing"
|
|
219
|
+
return typing.cast(builtins.str, result)
|
|
220
|
+
|
|
221
|
+
@builtins.property
|
|
222
|
+
def notification_topic_name(self) -> builtins.str:
|
|
223
|
+
result = self._values.get("notification_topic_name")
|
|
224
|
+
assert result is not None, "Required property 'notification_topic_name' is missing"
|
|
225
|
+
return typing.cast(builtins.str, result)
|
|
226
|
+
|
|
227
|
+
@builtins.property
|
|
228
|
+
def scheduler_role_name(self) -> builtins.str:
|
|
229
|
+
result = self._values.get("scheduler_role_name")
|
|
230
|
+
assert result is not None, "Required property 'scheduler_role_name' is missing"
|
|
231
|
+
return typing.cast(builtins.str, result)
|
|
232
|
+
|
|
233
|
+
@builtins.property
|
|
234
|
+
def start_schedule_name(self) -> builtins.str:
|
|
235
|
+
result = self._values.get("start_schedule_name")
|
|
236
|
+
assert result is not None, "Required property 'start_schedule_name' is missing"
|
|
237
|
+
return typing.cast(builtins.str, result)
|
|
238
|
+
|
|
239
|
+
@builtins.property
|
|
240
|
+
def state_machine_name(self) -> builtins.str:
|
|
241
|
+
result = self._values.get("state_machine_name")
|
|
242
|
+
assert result is not None, "Required property 'state_machine_name' is missing"
|
|
243
|
+
return typing.cast(builtins.str, result)
|
|
244
|
+
|
|
245
|
+
@builtins.property
|
|
246
|
+
def state_machine_role_name(self) -> builtins.str:
|
|
247
|
+
result = self._values.get("state_machine_role_name")
|
|
248
|
+
assert result is not None, "Required property 'state_machine_role_name' is missing"
|
|
249
|
+
return typing.cast(builtins.str, result)
|
|
250
|
+
|
|
251
|
+
@builtins.property
|
|
252
|
+
def stop_schedule_name(self) -> builtins.str:
|
|
253
|
+
result = self._values.get("stop_schedule_name")
|
|
254
|
+
assert result is not None, "Required property 'stop_schedule_name' is missing"
|
|
255
|
+
return typing.cast(builtins.str, result)
|
|
256
|
+
|
|
257
|
+
@builtins.property
|
|
258
|
+
def type(self) -> _gammarers_aws_resource_naming_22f917da.ResourceNamingType:
|
|
259
|
+
result = self._values.get("type")
|
|
260
|
+
assert result is not None, "Required property 'type' is missing"
|
|
261
|
+
return typing.cast(_gammarers_aws_resource_naming_22f917da.ResourceNamingType, result)
|
|
262
|
+
|
|
263
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
264
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
265
|
+
|
|
266
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
267
|
+
return not (rhs == self)
|
|
268
|
+
|
|
269
|
+
def __repr__(self) -> str:
|
|
270
|
+
return "CustomNaming(%s)" % ", ".join(
|
|
271
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
272
|
+
)
|
|
133
273
|
|
|
134
274
|
|
|
135
275
|
@jsii.data_type(
|
|
@@ -183,6 +323,7 @@ class RDSDatabaseRunningScheduleStack(
|
|
|
183
323
|
target_resource: typing.Union["TargetResourceProperty", typing.Dict[builtins.str, typing.Any]],
|
|
184
324
|
enable_scheduling: typing.Optional[builtins.bool] = None,
|
|
185
325
|
notifications: typing.Optional[typing.Union[NotificationsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
326
|
+
resource_naming_option: typing.Optional[typing.Union[typing.Union[CustomNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceDefaultNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceAutoNaming, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
186
327
|
start_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
187
328
|
stop_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
188
329
|
analytics_reporting: typing.Optional[builtins.bool] = None,
|
|
@@ -202,6 +343,7 @@ class RDSDatabaseRunningScheduleStack(
|
|
|
202
343
|
:param target_resource:
|
|
203
344
|
:param enable_scheduling:
|
|
204
345
|
:param notifications:
|
|
346
|
+
:param resource_naming_option:
|
|
205
347
|
:param start_schedule:
|
|
206
348
|
:param stop_schedule:
|
|
207
349
|
:param analytics_reporting: Include runtime versioning information in this Stack. Default: ``analyticsReporting`` setting of containing ``App``, or value of 'aws:cdk:version-reporting' context key
|
|
@@ -223,6 +365,7 @@ class RDSDatabaseRunningScheduleStack(
|
|
|
223
365
|
target_resource=target_resource,
|
|
224
366
|
enable_scheduling=enable_scheduling,
|
|
225
367
|
notifications=notifications,
|
|
368
|
+
resource_naming_option=resource_naming_option,
|
|
226
369
|
start_schedule=start_schedule,
|
|
227
370
|
stop_schedule=stop_schedule,
|
|
228
371
|
analytics_reporting=analytics_reporting,
|
|
@@ -257,6 +400,7 @@ class RDSDatabaseRunningScheduleStack(
|
|
|
257
400
|
"target_resource": "targetResource",
|
|
258
401
|
"enable_scheduling": "enableScheduling",
|
|
259
402
|
"notifications": "notifications",
|
|
403
|
+
"resource_naming_option": "resourceNamingOption",
|
|
260
404
|
"start_schedule": "startSchedule",
|
|
261
405
|
"stop_schedule": "stopSchedule",
|
|
262
406
|
},
|
|
@@ -278,6 +422,7 @@ class RDSDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
|
|
|
278
422
|
target_resource: typing.Union["TargetResourceProperty", typing.Dict[builtins.str, typing.Any]],
|
|
279
423
|
enable_scheduling: typing.Optional[builtins.bool] = None,
|
|
280
424
|
notifications: typing.Optional[typing.Union[NotificationsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
425
|
+
resource_naming_option: typing.Optional[typing.Union[typing.Union[CustomNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceDefaultNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceAutoNaming, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
281
426
|
start_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
282
427
|
stop_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
283
428
|
) -> None:
|
|
@@ -295,6 +440,7 @@ class RDSDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
|
|
|
295
440
|
:param target_resource:
|
|
296
441
|
:param enable_scheduling:
|
|
297
442
|
:param notifications:
|
|
443
|
+
:param resource_naming_option:
|
|
298
444
|
:param start_schedule:
|
|
299
445
|
:param stop_schedule:
|
|
300
446
|
'''
|
|
@@ -323,6 +469,7 @@ class RDSDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
|
|
|
323
469
|
check_type(argname="argument target_resource", value=target_resource, expected_type=type_hints["target_resource"])
|
|
324
470
|
check_type(argname="argument enable_scheduling", value=enable_scheduling, expected_type=type_hints["enable_scheduling"])
|
|
325
471
|
check_type(argname="argument notifications", value=notifications, expected_type=type_hints["notifications"])
|
|
472
|
+
check_type(argname="argument resource_naming_option", value=resource_naming_option, expected_type=type_hints["resource_naming_option"])
|
|
326
473
|
check_type(argname="argument start_schedule", value=start_schedule, expected_type=type_hints["start_schedule"])
|
|
327
474
|
check_type(argname="argument stop_schedule", value=stop_schedule, expected_type=type_hints["stop_schedule"])
|
|
328
475
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
@@ -352,6 +499,8 @@ class RDSDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
|
|
|
352
499
|
self._values["enable_scheduling"] = enable_scheduling
|
|
353
500
|
if notifications is not None:
|
|
354
501
|
self._values["notifications"] = notifications
|
|
502
|
+
if resource_naming_option is not None:
|
|
503
|
+
self._values["resource_naming_option"] = resource_naming_option
|
|
355
504
|
if start_schedule is not None:
|
|
356
505
|
self._values["start_schedule"] = start_schedule
|
|
357
506
|
if stop_schedule is not None:
|
|
@@ -548,6 +697,13 @@ class RDSDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
|
|
|
548
697
|
result = self._values.get("notifications")
|
|
549
698
|
return typing.cast(typing.Optional[NotificationsProperty], result)
|
|
550
699
|
|
|
700
|
+
@builtins.property
|
|
701
|
+
def resource_naming_option(
|
|
702
|
+
self,
|
|
703
|
+
) -> typing.Optional[typing.Union[CustomNaming, _gammarers_aws_resource_naming_22f917da.ResourceDefaultNaming, _gammarers_aws_resource_naming_22f917da.ResourceAutoNaming]]:
|
|
704
|
+
result = self._values.get("resource_naming_option")
|
|
705
|
+
return typing.cast(typing.Optional[typing.Union[CustomNaming, _gammarers_aws_resource_naming_22f917da.ResourceDefaultNaming, _gammarers_aws_resource_naming_22f917da.ResourceAutoNaming]], result)
|
|
706
|
+
|
|
551
707
|
@builtins.property
|
|
552
708
|
def start_schedule(self) -> typing.Optional["ScheduleProperty"]:
|
|
553
709
|
result = self._values.get("start_schedule")
|
|
@@ -694,6 +850,7 @@ class TargetResourceProperty:
|
|
|
694
850
|
|
|
695
851
|
|
|
696
852
|
__all__ = [
|
|
853
|
+
"CustomNaming",
|
|
697
854
|
"NotificationsProperty",
|
|
698
855
|
"RDSDatabaseRunningScheduleStack",
|
|
699
856
|
"RDSDatabaseRunningScheduleStackProps",
|
|
@@ -703,6 +860,20 @@ __all__ = [
|
|
|
703
860
|
|
|
704
861
|
publication.publish()
|
|
705
862
|
|
|
863
|
+
def _typecheckingstub__bc6db5a15616ecf5d03a994e1e18a8dc960a3e7c1b808221a2f79d29d1f2c27c(
|
|
864
|
+
*,
|
|
865
|
+
notification_topic_display_name: builtins.str,
|
|
866
|
+
notification_topic_name: builtins.str,
|
|
867
|
+
scheduler_role_name: builtins.str,
|
|
868
|
+
start_schedule_name: builtins.str,
|
|
869
|
+
state_machine_name: builtins.str,
|
|
870
|
+
state_machine_role_name: builtins.str,
|
|
871
|
+
stop_schedule_name: builtins.str,
|
|
872
|
+
type: _gammarers_aws_resource_naming_22f917da.ResourceNamingType,
|
|
873
|
+
) -> None:
|
|
874
|
+
"""Type checking stubs"""
|
|
875
|
+
pass
|
|
876
|
+
|
|
706
877
|
def _typecheckingstub__251a05c825e7beb6ddfd9ceb6b6c38129822252bd8cdfdc0c3fe1e576d3a4326(
|
|
707
878
|
*,
|
|
708
879
|
emails: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
@@ -717,6 +888,7 @@ def _typecheckingstub__c1280dc248fa00837f0fd9aade32e57cf0658d41b8f0e88b4b0468581
|
|
|
717
888
|
target_resource: typing.Union[TargetResourceProperty, typing.Dict[builtins.str, typing.Any]],
|
|
718
889
|
enable_scheduling: typing.Optional[builtins.bool] = None,
|
|
719
890
|
notifications: typing.Optional[typing.Union[NotificationsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
891
|
+
resource_naming_option: typing.Optional[typing.Union[typing.Union[CustomNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceDefaultNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceAutoNaming, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
720
892
|
start_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
721
893
|
stop_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
722
894
|
analytics_reporting: typing.Optional[builtins.bool] = None,
|
|
@@ -748,6 +920,7 @@ def _typecheckingstub__e3a02c77b05b4403ac204e4b21fbecf9f310b2adf40ef9f6754f8cde0
|
|
|
748
920
|
target_resource: typing.Union[TargetResourceProperty, typing.Dict[builtins.str, typing.Any]],
|
|
749
921
|
enable_scheduling: typing.Optional[builtins.bool] = None,
|
|
750
922
|
notifications: typing.Optional[typing.Union[NotificationsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
923
|
+
resource_naming_option: typing.Optional[typing.Union[typing.Union[CustomNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceDefaultNaming, typing.Dict[builtins.str, typing.Any]], typing.Union[_gammarers_aws_resource_naming_22f917da.ResourceAutoNaming, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
751
924
|
start_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
752
925
|
stop_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
753
926
|
) -> None:
|
|
@@ -30,12 +30,13 @@ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing
|
|
|
30
30
|
|
|
31
31
|
import aws_cdk._jsii
|
|
32
32
|
import constructs._jsii
|
|
33
|
+
import gammarers.aws_resource_naming._jsii
|
|
33
34
|
|
|
34
35
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
35
36
|
"@gammarers/aws-rds-database-running-schedule-stack",
|
|
36
|
-
"2.
|
|
37
|
+
"2.3.1",
|
|
37
38
|
__name__[0:-6],
|
|
38
|
-
"aws-rds-database-running-schedule-stack@2.
|
|
39
|
+
"aws-rds-database-running-schedule-stack@2.3.1.jsii.tgz",
|
|
39
40
|
)
|
|
40
41
|
|
|
41
42
|
__all__ = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gammarers.aws-rds-database-running-schedule-stack
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: AWS RDS Database Running Scheduler
|
|
5
5
|
Home-page: https://github.com/gammarers/aws-rds-database-running-schedule-stack.git
|
|
6
6
|
Author: yicr<yicr@users.noreply.github.com>
|
|
@@ -22,6 +22,7 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: aws-cdk-lib<3.0.0,>=2.120.0
|
|
24
24
|
Requires-Dist: constructs<11.0.0,>=10.0.5
|
|
25
|
+
Requires-Dist: gammarers.aws-resource-naming<0.9.0,>=0.8.2
|
|
25
26
|
Requires-Dist: jsii<2.0.0,>=1.105.0
|
|
26
27
|
Requires-Dist: publication>=0.0.3
|
|
27
28
|
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
@@ -39,6 +40,24 @@ Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
|
39
40
|
|
|
40
41
|
This AWS CDK Construct Stack controls the starting and stopping of RDS DB instances and clusters based on specified tags, ensuring they only run during working hours. It uses EventBridge Scheduler to trigger a StepFunctions State Machine at the start and end of the working hours(default 07:50(UTC) - 21:10(UTC)), which then starts or stops the databases depending on the mode.
|
|
41
42
|
|
|
43
|
+
> [!WARNING]
|
|
44
|
+
> v2.3.0:
|
|
45
|
+
> Stack props add option resourceNamingOption
|
|
46
|
+
> default ResourceNamingType.DEFAULT is cdk generated name
|
|
47
|
+
> f you want to maintain compatibility with versions below `v2.3.0`, please include the following settings (ResourceNamingType.AUTO).
|
|
48
|
+
>
|
|
49
|
+
> ```python
|
|
50
|
+
> new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
51
|
+
> targetResource: {
|
|
52
|
+
> tagKey: 'WorkHoursRunning',
|
|
53
|
+
> tagValues: ['YES'],
|
|
54
|
+
> },
|
|
55
|
+
> resourceNamingOption: {
|
|
56
|
+
> type: ResourceNamingType.AUTO, // HERE
|
|
57
|
+
> },
|
|
58
|
+
> });
|
|
59
|
+
> ```
|
|
60
|
+
|
|
42
61
|
## Fixed
|
|
43
62
|
|
|
44
63
|
* RDS Aurora Cluster
|
|
@@ -116,6 +135,9 @@ new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
|
|
|
116
135
|
hour: '19',
|
|
117
136
|
week: 'MON-FRI',
|
|
118
137
|
},
|
|
138
|
+
resourceNamingOption: {
|
|
139
|
+
type: ResourceNamingType.AUTO, // DEFAULT or AUTO or CUSTOM
|
|
140
|
+
},
|
|
119
141
|
});
|
|
120
142
|
```
|
|
121
143
|
|
|
@@ -11,4 +11,4 @@ src/gammarers.aws_rds_database_running_schedule_stack.egg-info/top_level.txt
|
|
|
11
11
|
src/gammarers/aws_rds_database_running_schedule_stack/__init__.py
|
|
12
12
|
src/gammarers/aws_rds_database_running_schedule_stack/py.typed
|
|
13
13
|
src/gammarers/aws_rds_database_running_schedule_stack/_jsii/__init__.py
|
|
14
|
-
src/gammarers/aws_rds_database_running_schedule_stack/_jsii/aws-rds-database-running-schedule-stack@2.
|
|
14
|
+
src/gammarers/aws_rds_database_running_schedule_stack/_jsii/aws-rds-database-running-schedule-stack@2.3.1.jsii.tgz
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|