gammarers.aws-rds-database-running-schedule-stack 1.2.2__tar.gz → 2.0.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.

Files changed (17) hide show
  1. {gammarers_aws_rds_database_running_schedule_stack-1.2.2/src/gammarers.aws_rds_database_running_schedule_stack.egg-info → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/PKG-INFO +43 -28
  2. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/README.md +41 -26
  3. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/setup.py +7 -7
  4. {gammarers_aws_rds_database_running_schedule_stack-1.2.2/src/gammarers/aws_rds_database_running_scheduler → gammarers_aws_rds_database_running_schedule_stack-2.0.1/src/gammarers/aws_rds_database_running_schedule_stack}/__init__.py +158 -103
  5. {gammarers_aws_rds_database_running_schedule_stack-1.2.2/src/gammarers/aws_rds_database_running_scheduler → gammarers_aws_rds_database_running_schedule_stack-2.0.1/src/gammarers/aws_rds_database_running_schedule_stack}/_jsii/__init__.py +2 -2
  6. gammarers_aws_rds_database_running_schedule_stack-2.0.1/src/gammarers/aws_rds_database_running_schedule_stack/_jsii/aws-rds-database-running-schedule-stack@2.0.1.jsii.tgz +0 -0
  7. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1/src/gammarers.aws_rds_database_running_schedule_stack.egg-info}/PKG-INFO +43 -28
  8. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/src/gammarers.aws_rds_database_running_schedule_stack.egg-info/SOURCES.txt +4 -4
  9. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/src/gammarers.aws_rds_database_running_schedule_stack.egg-info/requires.txt +1 -1
  10. gammarers_aws_rds_database_running_schedule_stack-1.2.2/src/gammarers/aws_rds_database_running_scheduler/_jsii/aws-rds-database-running-schedule-stack@1.2.2.jsii.tgz +0 -0
  11. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/LICENSE +0 -0
  12. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/MANIFEST.in +0 -0
  13. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/pyproject.toml +0 -0
  14. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/setup.cfg +0 -0
  15. {gammarers_aws_rds_database_running_schedule_stack-1.2.2/src/gammarers/aws_rds_database_running_scheduler → gammarers_aws_rds_database_running_schedule_stack-2.0.1/src/gammarers/aws_rds_database_running_schedule_stack}/py.typed +0 -0
  16. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.1}/src/gammarers.aws_rds_database_running_schedule_stack.egg-info/dependency_links.txt +0 -0
  17. {gammarers_aws_rds_database_running_schedule_stack-1.2.2 → gammarers_aws_rds_database_running_schedule_stack-2.0.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: 1.2.2
3
+ Version: 2.0.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>
@@ -20,12 +20,14 @@ Classifier: License :: OSI Approved
20
20
  Requires-Python: ~=3.8
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: aws-cdk-lib<3.0.0,>=2.80.0
23
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.120.0
24
24
  Requires-Dist: constructs<11.0.0,>=10.0.5
25
25
  Requires-Dist: jsii<2.0.0,>=1.102.0
26
26
  Requires-Dist: publication>=0.0.3
27
27
  Requires-Dist: typeguard~=2.13.3
28
28
 
29
+ # AWS RDS Database Running Schedule
30
+
29
31
  [![GitHub](https://img.shields.io/github/license/gammarers/aws-rds-database-running-schedule-stack?style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/blob/main/LICENSE)
30
32
  [![npm (scoped)](https://img.shields.io/npm/v/@gammarer/aws-rds-database-running-schedule-stack?style=flat-square)](https://www.npmjs.com/package/@gammarer/aws-rds-database-running-schedule-stack)
31
33
  [![PyPI](https://img.shields.io/pypi/v/gammarer.aws-rds-database-running-schedule-stack?style=flat-square)](https://pypi.org/project/gammarer.aws-rds-database-running-schedule-stack/)
@@ -33,9 +35,7 @@ Requires-Dist: typeguard~=2.13.3
33
35
  [![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-rds-database-running-schedule-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/actions/workflows/release.yml)
34
36
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-rds-database-running-schedule-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/releases)
35
37
 
36
- # AWS RDS Database Running Scheduler
37
-
38
- This is an AWS CDK Construct to make RDS Database running schedule (only running while working hours(start/stop)).
38
+ 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.
39
39
 
40
40
  ## Fixed
41
41
 
@@ -48,17 +48,37 @@ This construct creating resource list.
48
48
 
49
49
  * EventBridge Scheduler execution role
50
50
  * EventBridge Scheduler
51
+ * StepFunctions StateMahcine (star or stop controle)
52
+ * StepFunctions StateMahcine execution role
51
53
 
52
54
  ## Install
53
55
 
54
56
  ### TypeScript
55
57
 
58
+ #### install by npm
59
+
56
60
  ```shell
57
61
  npm install @gammarers/aws-rds-database-running-schedule-stack
58
- # or
62
+ ```
63
+
64
+ #### install by yarn
65
+
66
+ ```shell
59
67
  yarn add @gammarers/aws-rds-database-running-schedule-stack
60
68
  ```
61
69
 
70
+ #### install by pnpm
71
+
72
+ ```shell
73
+ pnpm add @gammarers/aws-rds-database-running-schedule-stack
74
+ ```
75
+
76
+ #### install by bun
77
+
78
+ ```shell
79
+ bun add @gammarers/aws-rds-database-running-schedule-stack
80
+ ```
81
+
62
82
  ### Python
63
83
 
64
84
  ```shell
@@ -77,28 +97,23 @@ dotnet add package Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack
77
97
  import { RdsDatabaseRunningScheduler, DatabaseType } from '@gammarer/aws-rds-database-running-schedule-stack';
78
98
 
79
99
  new RdsDatabaseRunningScheduleStack(stack, 'RdsDatabaseRunningScheduleStack', {
80
- targets: [
81
- {
82
- type: DatabaseType.CLUSTER,
83
- identifiers: ['db-cluster-1a'],
84
- startSchedule: {
85
- timezone: 'UTC',
86
- },
87
- stopSchedule: {
88
- timezone: 'UTC',
89
- },
90
- },
91
- {
92
- type: DatabaseType.INSTANCE,
93
- identifiers: ['db-instance-1a'],
94
- startSchedule: {
95
- timezone: 'UTC',
96
- },
97
- stopSchedule: {
98
- timezone: 'UTC',
99
- },
100
- },
101
- ],
100
+ targetResource: {
101
+ tagKey: 'WorkHoursRunning', // already tagging to rds instance or cluster
102
+ tagValues: ['YES'], // already tagging to rds instance or cluster
103
+ },
104
+ enableScheduling: true,
105
+ startSchedule: {
106
+ timezone: 'Asia/Tokyo',
107
+ minute: '55',
108
+ hour: '8',
109
+ week: 'MON-FRI',
110
+ },
111
+ stopSchedule: {
112
+ timezone: 'Asia/Tokyo',
113
+ minute: '5',
114
+ hour: '19',
115
+ week: 'MON-FRI',
116
+ },
102
117
  });
103
118
  ```
104
119
 
@@ -1,3 +1,5 @@
1
+ # AWS RDS Database Running Schedule
2
+
1
3
  [![GitHub](https://img.shields.io/github/license/gammarers/aws-rds-database-running-schedule-stack?style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/blob/main/LICENSE)
2
4
  [![npm (scoped)](https://img.shields.io/npm/v/@gammarer/aws-rds-database-running-schedule-stack?style=flat-square)](https://www.npmjs.com/package/@gammarer/aws-rds-database-running-schedule-stack)
3
5
  [![PyPI](https://img.shields.io/pypi/v/gammarer.aws-rds-database-running-schedule-stack?style=flat-square)](https://pypi.org/project/gammarer.aws-rds-database-running-schedule-stack/)
@@ -5,9 +7,7 @@
5
7
  [![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-rds-database-running-schedule-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/actions/workflows/release.yml)
6
8
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-rds-database-running-schedule-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/releases)
7
9
 
8
- # AWS RDS Database Running Scheduler
9
-
10
- This is an AWS CDK Construct to make RDS Database running schedule (only running while working hours(start/stop)).
10
+ 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.
11
11
 
12
12
  ## Fixed
13
13
 
@@ -20,17 +20,37 @@ This construct creating resource list.
20
20
 
21
21
  * EventBridge Scheduler execution role
22
22
  * EventBridge Scheduler
23
+ * StepFunctions StateMahcine (star or stop controle)
24
+ * StepFunctions StateMahcine execution role
23
25
 
24
26
  ## Install
25
27
 
26
28
  ### TypeScript
27
29
 
30
+ #### install by npm
31
+
28
32
  ```shell
29
33
  npm install @gammarers/aws-rds-database-running-schedule-stack
30
- # or
34
+ ```
35
+
36
+ #### install by yarn
37
+
38
+ ```shell
31
39
  yarn add @gammarers/aws-rds-database-running-schedule-stack
32
40
  ```
33
41
 
42
+ #### install by pnpm
43
+
44
+ ```shell
45
+ pnpm add @gammarers/aws-rds-database-running-schedule-stack
46
+ ```
47
+
48
+ #### install by bun
49
+
50
+ ```shell
51
+ bun add @gammarers/aws-rds-database-running-schedule-stack
52
+ ```
53
+
34
54
  ### Python
35
55
 
36
56
  ```shell
@@ -49,28 +69,23 @@ dotnet add package Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack
49
69
  import { RdsDatabaseRunningScheduler, DatabaseType } from '@gammarer/aws-rds-database-running-schedule-stack';
50
70
 
51
71
  new RdsDatabaseRunningScheduleStack(stack, 'RdsDatabaseRunningScheduleStack', {
52
- targets: [
53
- {
54
- type: DatabaseType.CLUSTER,
55
- identifiers: ['db-cluster-1a'],
56
- startSchedule: {
57
- timezone: 'UTC',
58
- },
59
- stopSchedule: {
60
- timezone: 'UTC',
61
- },
62
- },
63
- {
64
- type: DatabaseType.INSTANCE,
65
- identifiers: ['db-instance-1a'],
66
- startSchedule: {
67
- timezone: 'UTC',
68
- },
69
- stopSchedule: {
70
- timezone: 'UTC',
71
- },
72
- },
73
- ],
72
+ targetResource: {
73
+ tagKey: 'WorkHoursRunning', // already tagging to rds instance or cluster
74
+ tagValues: ['YES'], // already tagging to rds instance or cluster
75
+ },
76
+ enableScheduling: true,
77
+ startSchedule: {
78
+ timezone: 'Asia/Tokyo',
79
+ minute: '55',
80
+ hour: '8',
81
+ week: 'MON-FRI',
82
+ },
83
+ stopSchedule: {
84
+ timezone: 'Asia/Tokyo',
85
+ minute: '5',
86
+ hour: '19',
87
+ week: 'MON-FRI',
88
+ },
74
89
  });
75
90
  ```
76
91
 
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "gammarers.aws-rds-database-running-schedule-stack",
8
- "version": "1.2.2",
8
+ "version": "2.0.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",
@@ -21,20 +21,20 @@ kwargs = json.loads(
21
21
  "": "src"
22
22
  },
23
23
  "packages": [
24
- "gammarers.aws_rds_database_running_scheduler",
25
- "gammarers.aws_rds_database_running_scheduler._jsii"
24
+ "gammarers.aws_rds_database_running_schedule_stack",
25
+ "gammarers.aws_rds_database_running_schedule_stack._jsii"
26
26
  ],
27
27
  "package_data": {
28
- "gammarers.aws_rds_database_running_scheduler._jsii": [
29
- "aws-rds-database-running-schedule-stack@1.2.2.jsii.tgz"
28
+ "gammarers.aws_rds_database_running_schedule_stack._jsii": [
29
+ "aws-rds-database-running-schedule-stack@2.0.1.jsii.tgz"
30
30
  ],
31
- "gammarers.aws_rds_database_running_scheduler": [
31
+ "gammarers.aws_rds_database_running_schedule_stack": [
32
32
  "py.typed"
33
33
  ]
34
34
  },
35
35
  "python_requires": "~=3.8",
36
36
  "install_requires": [
37
- "aws-cdk-lib>=2.80.0, <3.0.0",
37
+ "aws-cdk-lib>=2.120.0, <3.0.0",
38
38
  "constructs>=10.0.5, <11.0.0",
39
39
  "jsii>=1.102.0, <2.0.0",
40
40
  "publication>=0.0.3",
@@ -1,4 +1,6 @@
1
1
  r'''
2
+ # AWS RDS Database Running Schedule
3
+
2
4
  [![GitHub](https://img.shields.io/github/license/gammarers/aws-rds-database-running-schedule-stack?style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/blob/main/LICENSE)
3
5
  [![npm (scoped)](https://img.shields.io/npm/v/@gammarer/aws-rds-database-running-schedule-stack?style=flat-square)](https://www.npmjs.com/package/@gammarer/aws-rds-database-running-schedule-stack)
4
6
  [![PyPI](https://img.shields.io/pypi/v/gammarer.aws-rds-database-running-schedule-stack?style=flat-square)](https://pypi.org/project/gammarer.aws-rds-database-running-schedule-stack/)
@@ -6,9 +8,7 @@ r'''
6
8
  [![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-rds-database-running-schedule-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/actions/workflows/release.yml)
7
9
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-rds-database-running-schedule-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/releases)
8
10
 
9
- # AWS RDS Database Running Scheduler
10
-
11
- This is an AWS CDK Construct to make RDS Database running schedule (only running while working hours(start/stop)).
11
+ 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.
12
12
 
13
13
  ## Fixed
14
14
 
@@ -21,17 +21,37 @@ This construct creating resource list.
21
21
 
22
22
  * EventBridge Scheduler execution role
23
23
  * EventBridge Scheduler
24
+ * StepFunctions StateMahcine (star or stop controle)
25
+ * StepFunctions StateMahcine execution role
24
26
 
25
27
  ## Install
26
28
 
27
29
  ### TypeScript
28
30
 
31
+ #### install by npm
32
+
29
33
  ```shell
30
34
  npm install @gammarers/aws-rds-database-running-schedule-stack
31
- # or
35
+ ```
36
+
37
+ #### install by yarn
38
+
39
+ ```shell
32
40
  yarn add @gammarers/aws-rds-database-running-schedule-stack
33
41
  ```
34
42
 
43
+ #### install by pnpm
44
+
45
+ ```shell
46
+ pnpm add @gammarers/aws-rds-database-running-schedule-stack
47
+ ```
48
+
49
+ #### install by bun
50
+
51
+ ```shell
52
+ bun add @gammarers/aws-rds-database-running-schedule-stack
53
+ ```
54
+
35
55
  ### Python
36
56
 
37
57
  ```shell
@@ -50,28 +70,23 @@ dotnet add package Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack
50
70
  import { RdsDatabaseRunningScheduler, DatabaseType } from '@gammarer/aws-rds-database-running-schedule-stack';
51
71
 
52
72
  new RdsDatabaseRunningScheduleStack(stack, 'RdsDatabaseRunningScheduleStack', {
53
- targets: [
54
- {
55
- type: DatabaseType.CLUSTER,
56
- identifiers: ['db-cluster-1a'],
57
- startSchedule: {
58
- timezone: 'UTC',
59
- },
60
- stopSchedule: {
61
- timezone: 'UTC',
62
- },
63
- },
64
- {
65
- type: DatabaseType.INSTANCE,
66
- identifiers: ['db-instance-1a'],
67
- startSchedule: {
68
- timezone: 'UTC',
69
- },
70
- stopSchedule: {
71
- timezone: 'UTC',
72
- },
73
- },
74
- ],
73
+ targetResource: {
74
+ tagKey: 'WorkHoursRunning', // already tagging to rds instance or cluster
75
+ tagValues: ['YES'], // already tagging to rds instance or cluster
76
+ },
77
+ enableScheduling: true,
78
+ startSchedule: {
79
+ timezone: 'Asia/Tokyo',
80
+ minute: '55',
81
+ hour: '8',
82
+ week: 'MON-FRI',
83
+ },
84
+ stopSchedule: {
85
+ timezone: 'Asia/Tokyo',
86
+ minute: '5',
87
+ hour: '19',
88
+ week: 'MON-FRI',
89
+ },
75
90
  });
76
91
  ```
77
92
 
@@ -100,12 +115,6 @@ import aws_cdk as _aws_cdk_ceddda9d
100
115
  import constructs as _constructs_77d1e7e8
101
116
 
102
117
 
103
- @jsii.enum(jsii_type="@gammarers/aws-rds-database-running-schedule-stack.DatabaseType")
104
- class DatabaseType(enum.Enum):
105
- CLUSTER = "CLUSTER"
106
- INSTANCE = "INSTANCE"
107
-
108
-
109
118
  class RdsDatabaseRunningScheduleStack(
110
119
  _aws_cdk_ceddda9d.Stack,
111
120
  metaclass=jsii.JSIIMeta,
@@ -116,13 +125,17 @@ class RdsDatabaseRunningScheduleStack(
116
125
  scope: _constructs_77d1e7e8.Construct,
117
126
  id: builtins.str,
118
127
  *,
119
- targets: typing.Sequence[typing.Union["TargetProperty", typing.Dict[builtins.str, typing.Any]]],
128
+ target_resource: typing.Union["TargetResourceProperty", typing.Dict[builtins.str, typing.Any]],
129
+ enable_scheduling: typing.Optional[builtins.bool] = None,
130
+ start_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
131
+ stop_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
120
132
  analytics_reporting: typing.Optional[builtins.bool] = None,
121
133
  cross_region_references: typing.Optional[builtins.bool] = None,
122
134
  description: typing.Optional[builtins.str] = None,
123
135
  env: typing.Optional[typing.Union[_aws_cdk_ceddda9d.Environment, typing.Dict[builtins.str, typing.Any]]] = None,
124
136
  permissions_boundary: typing.Optional[_aws_cdk_ceddda9d.PermissionsBoundary] = None,
125
137
  stack_name: typing.Optional[builtins.str] = None,
138
+ suppress_template_indentation: typing.Optional[builtins.bool] = None,
126
139
  synthesizer: typing.Optional[_aws_cdk_ceddda9d.IStackSynthesizer] = None,
127
140
  tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
128
141
  termination_protection: typing.Optional[builtins.bool] = None,
@@ -130,13 +143,17 @@ class RdsDatabaseRunningScheduleStack(
130
143
  '''
131
144
  :param scope: -
132
145
  :param id: -
133
- :param targets:
146
+ :param target_resource:
147
+ :param enable_scheduling:
148
+ :param start_schedule:
149
+ :param stop_schedule:
134
150
  :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
135
151
  :param cross_region_references: Enable this flag to allow native cross region stack references. Enabling this will create a CloudFormation custom resource in both the producing stack and consuming stack in order to perform the export/import This feature is currently experimental Default: false
136
152
  :param description: A description of the stack. Default: - No description.
137
153
  :param env: The AWS environment (account/region) where this stack will be deployed. Set the ``region``/``account`` fields of ``env`` to either a concrete value to select the indicated environment (recommended for production stacks), or to the values of environment variables ``CDK_DEFAULT_REGION``/``CDK_DEFAULT_ACCOUNT`` to let the target environment depend on the AWS credentials/configuration that the CDK CLI is executed under (recommended for development stacks). If the ``Stack`` is instantiated inside a ``Stage``, any undefined ``region``/``account`` fields from ``env`` will default to the same field on the encompassing ``Stage``, if configured there. If either ``region`` or ``account`` are not set nor inherited from ``Stage``, the Stack will be considered "*environment-agnostic*"". Environment-agnostic stacks can be deployed to any environment but may not be able to take advantage of all features of the CDK. For example, they will not be able to use environmental context lookups such as ``ec2.Vpc.fromLookup`` and will not automatically translate Service Principals to the right format based on the environment's AWS partition, and other such enhancements. Default: - The environment of the containing ``Stage`` if available, otherwise create the stack will be environment-agnostic.
138
154
  :param permissions_boundary: Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. Default: - no permissions boundary is applied
139
155
  :param stack_name: Name to deploy the stack with. Default: - Derived from construct path.
156
+ :param suppress_template_indentation: Enable this flag to suppress indentation in generated CloudFormation templates. If not specified, the value of the ``@aws-cdk/core:suppressTemplateIndentation`` context key will be used. If that is not specified, then the default value ``false`` will be used. Default: - the value of ``@aws-cdk/core:suppressTemplateIndentation``, or ``false`` if that is not set.
140
157
  :param synthesizer: Synthesis method to use while deploying this stack. The Stack Synthesizer controls aspects of synthesis and deployment, like how assets are referenced and what IAM roles to use. For more information, see the README of the main CDK package. If not specified, the ``defaultStackSynthesizer`` from ``App`` will be used. If that is not specified, ``DefaultStackSynthesizer`` is used if ``@aws-cdk/core:newStyleStackSynthesis`` is set to ``true`` or the CDK major version is v2. In CDK v1 ``LegacyStackSynthesizer`` is the default if no other synthesizer is specified. Default: - The synthesizer specified on ``App``, or ``DefaultStackSynthesizer`` otherwise.
141
158
  :param tags: Stack tags that will be applied to all the taggable resources and the stack itself. Default: {}
142
159
  :param termination_protection: Whether to enable termination protection for this stack. Default: false
@@ -146,13 +163,17 @@ class RdsDatabaseRunningScheduleStack(
146
163
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
147
164
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
148
165
  props = RdsDatabaseRunningScheduleStackProps(
149
- targets=targets,
166
+ target_resource=target_resource,
167
+ enable_scheduling=enable_scheduling,
168
+ start_schedule=start_schedule,
169
+ stop_schedule=stop_schedule,
150
170
  analytics_reporting=analytics_reporting,
151
171
  cross_region_references=cross_region_references,
152
172
  description=description,
153
173
  env=env,
154
174
  permissions_boundary=permissions_boundary,
155
175
  stack_name=stack_name,
176
+ suppress_template_indentation=suppress_template_indentation,
156
177
  synthesizer=synthesizer,
157
178
  tags=tags,
158
179
  termination_protection=termination_protection,
@@ -171,10 +192,14 @@ class RdsDatabaseRunningScheduleStack(
171
192
  "env": "env",
172
193
  "permissions_boundary": "permissionsBoundary",
173
194
  "stack_name": "stackName",
195
+ "suppress_template_indentation": "suppressTemplateIndentation",
174
196
  "synthesizer": "synthesizer",
175
197
  "tags": "tags",
176
198
  "termination_protection": "terminationProtection",
177
- "targets": "targets",
199
+ "target_resource": "targetResource",
200
+ "enable_scheduling": "enableScheduling",
201
+ "start_schedule": "startSchedule",
202
+ "stop_schedule": "stopSchedule",
178
203
  },
179
204
  )
180
205
  class RdsDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
@@ -187,10 +212,14 @@ class RdsDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
187
212
  env: typing.Optional[typing.Union[_aws_cdk_ceddda9d.Environment, typing.Dict[builtins.str, typing.Any]]] = None,
188
213
  permissions_boundary: typing.Optional[_aws_cdk_ceddda9d.PermissionsBoundary] = None,
189
214
  stack_name: typing.Optional[builtins.str] = None,
215
+ suppress_template_indentation: typing.Optional[builtins.bool] = None,
190
216
  synthesizer: typing.Optional[_aws_cdk_ceddda9d.IStackSynthesizer] = None,
191
217
  tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
192
218
  termination_protection: typing.Optional[builtins.bool] = None,
193
- targets: typing.Sequence[typing.Union["TargetProperty", typing.Dict[builtins.str, typing.Any]]],
219
+ target_resource: typing.Union["TargetResourceProperty", typing.Dict[builtins.str, typing.Any]],
220
+ enable_scheduling: typing.Optional[builtins.bool] = None,
221
+ start_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
222
+ stop_schedule: typing.Optional[typing.Union["ScheduleProperty", typing.Dict[builtins.str, typing.Any]]] = None,
194
223
  ) -> None:
195
224
  '''
196
225
  :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
@@ -199,13 +228,23 @@ class RdsDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
199
228
  :param env: The AWS environment (account/region) where this stack will be deployed. Set the ``region``/``account`` fields of ``env`` to either a concrete value to select the indicated environment (recommended for production stacks), or to the values of environment variables ``CDK_DEFAULT_REGION``/``CDK_DEFAULT_ACCOUNT`` to let the target environment depend on the AWS credentials/configuration that the CDK CLI is executed under (recommended for development stacks). If the ``Stack`` is instantiated inside a ``Stage``, any undefined ``region``/``account`` fields from ``env`` will default to the same field on the encompassing ``Stage``, if configured there. If either ``region`` or ``account`` are not set nor inherited from ``Stage``, the Stack will be considered "*environment-agnostic*"". Environment-agnostic stacks can be deployed to any environment but may not be able to take advantage of all features of the CDK. For example, they will not be able to use environmental context lookups such as ``ec2.Vpc.fromLookup`` and will not automatically translate Service Principals to the right format based on the environment's AWS partition, and other such enhancements. Default: - The environment of the containing ``Stage`` if available, otherwise create the stack will be environment-agnostic.
200
229
  :param permissions_boundary: Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. Default: - no permissions boundary is applied
201
230
  :param stack_name: Name to deploy the stack with. Default: - Derived from construct path.
231
+ :param suppress_template_indentation: Enable this flag to suppress indentation in generated CloudFormation templates. If not specified, the value of the ``@aws-cdk/core:suppressTemplateIndentation`` context key will be used. If that is not specified, then the default value ``false`` will be used. Default: - the value of ``@aws-cdk/core:suppressTemplateIndentation``, or ``false`` if that is not set.
202
232
  :param synthesizer: Synthesis method to use while deploying this stack. The Stack Synthesizer controls aspects of synthesis and deployment, like how assets are referenced and what IAM roles to use. For more information, see the README of the main CDK package. If not specified, the ``defaultStackSynthesizer`` from ``App`` will be used. If that is not specified, ``DefaultStackSynthesizer`` is used if ``@aws-cdk/core:newStyleStackSynthesis`` is set to ``true`` or the CDK major version is v2. In CDK v1 ``LegacyStackSynthesizer`` is the default if no other synthesizer is specified. Default: - The synthesizer specified on ``App``, or ``DefaultStackSynthesizer`` otherwise.
203
233
  :param tags: Stack tags that will be applied to all the taggable resources and the stack itself. Default: {}
204
234
  :param termination_protection: Whether to enable termination protection for this stack. Default: false
205
- :param targets:
235
+ :param target_resource:
236
+ :param enable_scheduling:
237
+ :param start_schedule:
238
+ :param stop_schedule:
206
239
  '''
207
240
  if isinstance(env, dict):
208
241
  env = _aws_cdk_ceddda9d.Environment(**env)
242
+ if isinstance(target_resource, dict):
243
+ target_resource = TargetResourceProperty(**target_resource)
244
+ if isinstance(start_schedule, dict):
245
+ start_schedule = ScheduleProperty(**start_schedule)
246
+ if isinstance(stop_schedule, dict):
247
+ stop_schedule = ScheduleProperty(**stop_schedule)
209
248
  if __debug__:
210
249
  type_hints = typing.get_type_hints(_typecheckingstub__8f71acba171212e7096d4e05bc27262d7d2c04637e38863513660ca9289e5599)
211
250
  check_type(argname="argument analytics_reporting", value=analytics_reporting, expected_type=type_hints["analytics_reporting"])
@@ -214,12 +253,16 @@ class RdsDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
214
253
  check_type(argname="argument env", value=env, expected_type=type_hints["env"])
215
254
  check_type(argname="argument permissions_boundary", value=permissions_boundary, expected_type=type_hints["permissions_boundary"])
216
255
  check_type(argname="argument stack_name", value=stack_name, expected_type=type_hints["stack_name"])
256
+ check_type(argname="argument suppress_template_indentation", value=suppress_template_indentation, expected_type=type_hints["suppress_template_indentation"])
217
257
  check_type(argname="argument synthesizer", value=synthesizer, expected_type=type_hints["synthesizer"])
218
258
  check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
219
259
  check_type(argname="argument termination_protection", value=termination_protection, expected_type=type_hints["termination_protection"])
220
- check_type(argname="argument targets", value=targets, expected_type=type_hints["targets"])
260
+ check_type(argname="argument target_resource", value=target_resource, expected_type=type_hints["target_resource"])
261
+ check_type(argname="argument enable_scheduling", value=enable_scheduling, expected_type=type_hints["enable_scheduling"])
262
+ check_type(argname="argument start_schedule", value=start_schedule, expected_type=type_hints["start_schedule"])
263
+ check_type(argname="argument stop_schedule", value=stop_schedule, expected_type=type_hints["stop_schedule"])
221
264
  self._values: typing.Dict[builtins.str, typing.Any] = {
222
- "targets": targets,
265
+ "target_resource": target_resource,
223
266
  }
224
267
  if analytics_reporting is not None:
225
268
  self._values["analytics_reporting"] = analytics_reporting
@@ -233,12 +276,20 @@ class RdsDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
233
276
  self._values["permissions_boundary"] = permissions_boundary
234
277
  if stack_name is not None:
235
278
  self._values["stack_name"] = stack_name
279
+ if suppress_template_indentation is not None:
280
+ self._values["suppress_template_indentation"] = suppress_template_indentation
236
281
  if synthesizer is not None:
237
282
  self._values["synthesizer"] = synthesizer
238
283
  if tags is not None:
239
284
  self._values["tags"] = tags
240
285
  if termination_protection is not None:
241
286
  self._values["termination_protection"] = termination_protection
287
+ if enable_scheduling is not None:
288
+ self._values["enable_scheduling"] = enable_scheduling
289
+ if start_schedule is not None:
290
+ self._values["start_schedule"] = start_schedule
291
+ if stop_schedule is not None:
292
+ self._values["stop_schedule"] = stop_schedule
242
293
 
243
294
  @builtins.property
244
295
  def analytics_reporting(self) -> typing.Optional[builtins.bool]:
@@ -365,6 +416,19 @@ class RdsDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
365
416
  result = self._values.get("stack_name")
366
417
  return typing.cast(typing.Optional[builtins.str], result)
367
418
 
419
+ @builtins.property
420
+ def suppress_template_indentation(self) -> typing.Optional[builtins.bool]:
421
+ '''Enable this flag to suppress indentation in generated CloudFormation templates.
422
+
423
+ If not specified, the value of the ``@aws-cdk/core:suppressTemplateIndentation``
424
+ context key will be used. If that is not specified, then the
425
+ default value ``false`` will be used.
426
+
427
+ :default: - the value of ``@aws-cdk/core:suppressTemplateIndentation``, or ``false`` if that is not set.
428
+ '''
429
+ result = self._values.get("suppress_template_indentation")
430
+ return typing.cast(typing.Optional[builtins.bool], result)
431
+
368
432
  @builtins.property
369
433
  def synthesizer(self) -> typing.Optional[_aws_cdk_ceddda9d.IStackSynthesizer]:
370
434
  '''Synthesis method to use while deploying this stack.
@@ -403,10 +467,25 @@ class RdsDatabaseRunningScheduleStackProps(_aws_cdk_ceddda9d.StackProps):
403
467
  return typing.cast(typing.Optional[builtins.bool], result)
404
468
 
405
469
  @builtins.property
406
- def targets(self) -> typing.List["TargetProperty"]:
407
- result = self._values.get("targets")
408
- assert result is not None, "Required property 'targets' is missing"
409
- return typing.cast(typing.List["TargetProperty"], result)
470
+ def target_resource(self) -> "TargetResourceProperty":
471
+ result = self._values.get("target_resource")
472
+ assert result is not None, "Required property 'target_resource' is missing"
473
+ return typing.cast("TargetResourceProperty", result)
474
+
475
+ @builtins.property
476
+ def enable_scheduling(self) -> typing.Optional[builtins.bool]:
477
+ result = self._values.get("enable_scheduling")
478
+ return typing.cast(typing.Optional[builtins.bool], result)
479
+
480
+ @builtins.property
481
+ def start_schedule(self) -> typing.Optional["ScheduleProperty"]:
482
+ result = self._values.get("start_schedule")
483
+ return typing.cast(typing.Optional["ScheduleProperty"], result)
484
+
485
+ @builtins.property
486
+ def stop_schedule(self) -> typing.Optional["ScheduleProperty"]:
487
+ result = self._values.get("stop_schedule")
488
+ return typing.cast(typing.Optional["ScheduleProperty"], result)
410
489
 
411
490
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
412
491
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -495,70 +574,41 @@ class ScheduleProperty:
495
574
 
496
575
 
497
576
  @jsii.data_type(
498
- jsii_type="@gammarers/aws-rds-database-running-schedule-stack.TargetProperty",
577
+ jsii_type="@gammarers/aws-rds-database-running-schedule-stack.TargetResourceProperty",
499
578
  jsii_struct_bases=[],
500
- name_mapping={
501
- "identifiers": "identifiers",
502
- "start_schedule": "startSchedule",
503
- "stop_schedule": "stopSchedule",
504
- "type": "type",
505
- },
579
+ name_mapping={"tag_key": "tagKey", "tag_values": "tagValues"},
506
580
  )
507
- class TargetProperty:
581
+ class TargetResourceProperty:
508
582
  def __init__(
509
583
  self,
510
584
  *,
511
- identifiers: typing.Sequence[builtins.str],
512
- start_schedule: typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]],
513
- stop_schedule: typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]],
514
- type: DatabaseType,
585
+ tag_key: builtins.str,
586
+ tag_values: typing.Sequence[builtins.str],
515
587
  ) -> None:
516
588
  '''
517
- :param identifiers:
518
- :param start_schedule:
519
- :param stop_schedule:
520
- :param type:
589
+ :param tag_key:
590
+ :param tag_values:
521
591
  '''
522
- if isinstance(start_schedule, dict):
523
- start_schedule = ScheduleProperty(**start_schedule)
524
- if isinstance(stop_schedule, dict):
525
- stop_schedule = ScheduleProperty(**stop_schedule)
526
592
  if __debug__:
527
- type_hints = typing.get_type_hints(_typecheckingstub__5cc55631b35a38a71d11cd70266d4b21b303a65a2b27449fa603a94b5e117dcd)
528
- check_type(argname="argument identifiers", value=identifiers, expected_type=type_hints["identifiers"])
529
- check_type(argname="argument start_schedule", value=start_schedule, expected_type=type_hints["start_schedule"])
530
- check_type(argname="argument stop_schedule", value=stop_schedule, expected_type=type_hints["stop_schedule"])
531
- check_type(argname="argument type", value=type, expected_type=type_hints["type"])
593
+ type_hints = typing.get_type_hints(_typecheckingstub__8591c95e42de5a4e537e0f91a2110f72b09d18b72008139e5e23a0d230607030)
594
+ check_type(argname="argument tag_key", value=tag_key, expected_type=type_hints["tag_key"])
595
+ check_type(argname="argument tag_values", value=tag_values, expected_type=type_hints["tag_values"])
532
596
  self._values: typing.Dict[builtins.str, typing.Any] = {
533
- "identifiers": identifiers,
534
- "start_schedule": start_schedule,
535
- "stop_schedule": stop_schedule,
536
- "type": type,
597
+ "tag_key": tag_key,
598
+ "tag_values": tag_values,
537
599
  }
538
600
 
539
601
  @builtins.property
540
- def identifiers(self) -> typing.List[builtins.str]:
541
- result = self._values.get("identifiers")
542
- assert result is not None, "Required property 'identifiers' is missing"
543
- return typing.cast(typing.List[builtins.str], result)
544
-
545
- @builtins.property
546
- def start_schedule(self) -> ScheduleProperty:
547
- result = self._values.get("start_schedule")
548
- assert result is not None, "Required property 'start_schedule' is missing"
549
- return typing.cast(ScheduleProperty, result)
550
-
551
- @builtins.property
552
- def stop_schedule(self) -> ScheduleProperty:
553
- result = self._values.get("stop_schedule")
554
- assert result is not None, "Required property 'stop_schedule' is missing"
555
- return typing.cast(ScheduleProperty, result)
602
+ def tag_key(self) -> builtins.str:
603
+ result = self._values.get("tag_key")
604
+ assert result is not None, "Required property 'tag_key' is missing"
605
+ return typing.cast(builtins.str, result)
556
606
 
557
607
  @builtins.property
558
- def type(self) -> DatabaseType:
559
- result = self._values.get("type")
560
- assert result is not None, "Required property 'type' is missing"
561
- return typing.cast(DatabaseType, result)
608
+ def tag_values(self) -> typing.List[builtins.str]:
609
+ result = self._values.get("tag_values")
610
+ assert result is not None, "Required property 'tag_values' is missing"
611
+ return typing.cast(typing.List[builtins.str], result)
562
612
 
563
613
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
564
614
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -567,17 +617,16 @@ class TargetProperty:
567
617
  return not (rhs == self)
568
618
 
569
619
  def __repr__(self) -> str:
570
- return "TargetProperty(%s)" % ", ".join(
620
+ return "TargetResourceProperty(%s)" % ", ".join(
571
621
  k + "=" + repr(v) for k, v in self._values.items()
572
622
  )
573
623
 
574
624
 
575
625
  __all__ = [
576
- "DatabaseType",
577
626
  "RdsDatabaseRunningScheduleStack",
578
627
  "RdsDatabaseRunningScheduleStackProps",
579
628
  "ScheduleProperty",
580
- "TargetProperty",
629
+ "TargetResourceProperty",
581
630
  ]
582
631
 
583
632
  publication.publish()
@@ -586,13 +635,17 @@ def _typecheckingstub__6fffbb5d99d9dae64eeda4fe6ceb7a65d991f000e6cc360aa27fa2514
586
635
  scope: _constructs_77d1e7e8.Construct,
587
636
  id: builtins.str,
588
637
  *,
589
- targets: typing.Sequence[typing.Union[TargetProperty, typing.Dict[builtins.str, typing.Any]]],
638
+ target_resource: typing.Union[TargetResourceProperty, typing.Dict[builtins.str, typing.Any]],
639
+ enable_scheduling: typing.Optional[builtins.bool] = None,
640
+ start_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
641
+ stop_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
590
642
  analytics_reporting: typing.Optional[builtins.bool] = None,
591
643
  cross_region_references: typing.Optional[builtins.bool] = None,
592
644
  description: typing.Optional[builtins.str] = None,
593
645
  env: typing.Optional[typing.Union[_aws_cdk_ceddda9d.Environment, typing.Dict[builtins.str, typing.Any]]] = None,
594
646
  permissions_boundary: typing.Optional[_aws_cdk_ceddda9d.PermissionsBoundary] = None,
595
647
  stack_name: typing.Optional[builtins.str] = None,
648
+ suppress_template_indentation: typing.Optional[builtins.bool] = None,
596
649
  synthesizer: typing.Optional[_aws_cdk_ceddda9d.IStackSynthesizer] = None,
597
650
  tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
598
651
  termination_protection: typing.Optional[builtins.bool] = None,
@@ -608,10 +661,14 @@ def _typecheckingstub__8f71acba171212e7096d4e05bc27262d7d2c04637e38863513660ca92
608
661
  env: typing.Optional[typing.Union[_aws_cdk_ceddda9d.Environment, typing.Dict[builtins.str, typing.Any]]] = None,
609
662
  permissions_boundary: typing.Optional[_aws_cdk_ceddda9d.PermissionsBoundary] = None,
610
663
  stack_name: typing.Optional[builtins.str] = None,
664
+ suppress_template_indentation: typing.Optional[builtins.bool] = None,
611
665
  synthesizer: typing.Optional[_aws_cdk_ceddda9d.IStackSynthesizer] = None,
612
666
  tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
613
667
  termination_protection: typing.Optional[builtins.bool] = None,
614
- targets: typing.Sequence[typing.Union[TargetProperty, typing.Dict[builtins.str, typing.Any]]],
668
+ target_resource: typing.Union[TargetResourceProperty, typing.Dict[builtins.str, typing.Any]],
669
+ enable_scheduling: typing.Optional[builtins.bool] = None,
670
+ start_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
671
+ stop_schedule: typing.Optional[typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]]] = None,
615
672
  ) -> None:
616
673
  """Type checking stubs"""
617
674
  pass
@@ -626,12 +683,10 @@ def _typecheckingstub__698ada8cebb0f29cf7aa1b64e0b10a701ff87508b556665b4c2bae69b
626
683
  """Type checking stubs"""
627
684
  pass
628
685
 
629
- def _typecheckingstub__5cc55631b35a38a71d11cd70266d4b21b303a65a2b27449fa603a94b5e117dcd(
686
+ def _typecheckingstub__8591c95e42de5a4e537e0f91a2110f72b09d18b72008139e5e23a0d230607030(
630
687
  *,
631
- identifiers: typing.Sequence[builtins.str],
632
- start_schedule: typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]],
633
- stop_schedule: typing.Union[ScheduleProperty, typing.Dict[builtins.str, typing.Any]],
634
- type: DatabaseType,
688
+ tag_key: builtins.str,
689
+ tag_values: typing.Sequence[builtins.str],
635
690
  ) -> None:
636
691
  """Type checking stubs"""
637
692
  pass
@@ -18,9 +18,9 @@ import constructs._jsii
18
18
 
19
19
  __jsii_assembly__ = jsii.JSIIAssembly.load(
20
20
  "@gammarers/aws-rds-database-running-schedule-stack",
21
- "1.2.2",
21
+ "2.0.1",
22
22
  __name__[0:-6],
23
- "aws-rds-database-running-schedule-stack@1.2.2.jsii.tgz",
23
+ "aws-rds-database-running-schedule-stack@2.0.1.jsii.tgz",
24
24
  )
25
25
 
26
26
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gammarers.aws-rds-database-running-schedule-stack
3
- Version: 1.2.2
3
+ Version: 2.0.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>
@@ -20,12 +20,14 @@ Classifier: License :: OSI Approved
20
20
  Requires-Python: ~=3.8
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: aws-cdk-lib<3.0.0,>=2.80.0
23
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.120.0
24
24
  Requires-Dist: constructs<11.0.0,>=10.0.5
25
25
  Requires-Dist: jsii<2.0.0,>=1.102.0
26
26
  Requires-Dist: publication>=0.0.3
27
27
  Requires-Dist: typeguard~=2.13.3
28
28
 
29
+ # AWS RDS Database Running Schedule
30
+
29
31
  [![GitHub](https://img.shields.io/github/license/gammarers/aws-rds-database-running-schedule-stack?style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/blob/main/LICENSE)
30
32
  [![npm (scoped)](https://img.shields.io/npm/v/@gammarer/aws-rds-database-running-schedule-stack?style=flat-square)](https://www.npmjs.com/package/@gammarer/aws-rds-database-running-schedule-stack)
31
33
  [![PyPI](https://img.shields.io/pypi/v/gammarer.aws-rds-database-running-schedule-stack?style=flat-square)](https://pypi.org/project/gammarer.aws-rds-database-running-schedule-stack/)
@@ -33,9 +35,7 @@ Requires-Dist: typeguard~=2.13.3
33
35
  [![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-rds-database-running-schedule-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/actions/workflows/release.yml)
34
36
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-rds-database-running-schedule-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-rds-database-running-schedule-stack/releases)
35
37
 
36
- # AWS RDS Database Running Scheduler
37
-
38
- This is an AWS CDK Construct to make RDS Database running schedule (only running while working hours(start/stop)).
38
+ 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.
39
39
 
40
40
  ## Fixed
41
41
 
@@ -48,17 +48,37 @@ This construct creating resource list.
48
48
 
49
49
  * EventBridge Scheduler execution role
50
50
  * EventBridge Scheduler
51
+ * StepFunctions StateMahcine (star or stop controle)
52
+ * StepFunctions StateMahcine execution role
51
53
 
52
54
  ## Install
53
55
 
54
56
  ### TypeScript
55
57
 
58
+ #### install by npm
59
+
56
60
  ```shell
57
61
  npm install @gammarers/aws-rds-database-running-schedule-stack
58
- # or
62
+ ```
63
+
64
+ #### install by yarn
65
+
66
+ ```shell
59
67
  yarn add @gammarers/aws-rds-database-running-schedule-stack
60
68
  ```
61
69
 
70
+ #### install by pnpm
71
+
72
+ ```shell
73
+ pnpm add @gammarers/aws-rds-database-running-schedule-stack
74
+ ```
75
+
76
+ #### install by bun
77
+
78
+ ```shell
79
+ bun add @gammarers/aws-rds-database-running-schedule-stack
80
+ ```
81
+
62
82
  ### Python
63
83
 
64
84
  ```shell
@@ -77,28 +97,23 @@ dotnet add package Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack
77
97
  import { RdsDatabaseRunningScheduler, DatabaseType } from '@gammarer/aws-rds-database-running-schedule-stack';
78
98
 
79
99
  new RdsDatabaseRunningScheduleStack(stack, 'RdsDatabaseRunningScheduleStack', {
80
- targets: [
81
- {
82
- type: DatabaseType.CLUSTER,
83
- identifiers: ['db-cluster-1a'],
84
- startSchedule: {
85
- timezone: 'UTC',
86
- },
87
- stopSchedule: {
88
- timezone: 'UTC',
89
- },
90
- },
91
- {
92
- type: DatabaseType.INSTANCE,
93
- identifiers: ['db-instance-1a'],
94
- startSchedule: {
95
- timezone: 'UTC',
96
- },
97
- stopSchedule: {
98
- timezone: 'UTC',
99
- },
100
- },
101
- ],
100
+ targetResource: {
101
+ tagKey: 'WorkHoursRunning', // already tagging to rds instance or cluster
102
+ tagValues: ['YES'], // already tagging to rds instance or cluster
103
+ },
104
+ enableScheduling: true,
105
+ startSchedule: {
106
+ timezone: 'Asia/Tokyo',
107
+ minute: '55',
108
+ hour: '8',
109
+ week: 'MON-FRI',
110
+ },
111
+ stopSchedule: {
112
+ timezone: 'Asia/Tokyo',
113
+ minute: '5',
114
+ hour: '19',
115
+ week: 'MON-FRI',
116
+ },
102
117
  });
103
118
  ```
104
119
 
@@ -8,7 +8,7 @@ src/gammarers.aws_rds_database_running_schedule_stack.egg-info/SOURCES.txt
8
8
  src/gammarers.aws_rds_database_running_schedule_stack.egg-info/dependency_links.txt
9
9
  src/gammarers.aws_rds_database_running_schedule_stack.egg-info/requires.txt
10
10
  src/gammarers.aws_rds_database_running_schedule_stack.egg-info/top_level.txt
11
- src/gammarers/aws_rds_database_running_scheduler/__init__.py
12
- src/gammarers/aws_rds_database_running_scheduler/py.typed
13
- src/gammarers/aws_rds_database_running_scheduler/_jsii/__init__.py
14
- src/gammarers/aws_rds_database_running_scheduler/_jsii/aws-rds-database-running-schedule-stack@1.2.2.jsii.tgz
11
+ src/gammarers/aws_rds_database_running_schedule_stack/__init__.py
12
+ src/gammarers/aws_rds_database_running_schedule_stack/py.typed
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.0.1.jsii.tgz
@@ -1,4 +1,4 @@
1
- aws-cdk-lib<3.0.0,>=2.80.0
1
+ aws-cdk-lib<3.0.0,>=2.120.0
2
2
  constructs<11.0.0,>=10.0.5
3
3
  jsii<2.0.0,>=1.102.0
4
4
  publication>=0.0.3