cloudsnorkel.cdk-rds-sanitized-snapshots 0.0.3__py3-none-any.whl → 0.1.6__py3-none-any.whl

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.
@@ -1,4 +1,4 @@
1
- '''
1
+ r'''
2
2
  # CDK Construct for RDS Sanitized Snapshots
3
3
 
4
4
  [![NPM](https://img.shields.io/npm/v/@cloudsnorkel/cdk-rds-sanitized-snapshots?label=npm&logo=npm)](https://www.npmjs.com/package/@cloudsnorkel/cdk-rds-sanitized-snapshots)
@@ -109,6 +109,9 @@ on giving other accounts access to the key.
109
109
  npm run bundle && npm run integ:default:deploy
110
110
  ```
111
111
  '''
112
+ from pkgutil import extend_path
113
+ __path__ = extend_path(__path__, __name__)
114
+
112
115
  import abc
113
116
  import builtins
114
117
  import datetime
@@ -119,15 +122,32 @@ import jsii
119
122
  import publication
120
123
  import typing_extensions
121
124
 
125
+ import typeguard
126
+ from importlib.metadata import version as _metadata_package_version
127
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
128
+
129
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
130
+ if TYPEGUARD_MAJOR_VERSION <= 2:
131
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
132
+ else:
133
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
134
+ pass
135
+ else:
136
+ if TYPEGUARD_MAJOR_VERSION == 3:
137
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
138
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
139
+ else:
140
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
141
+
122
142
  from ._jsii import *
123
143
 
124
- import aws_cdk.aws_ec2
125
- import aws_cdk.aws_ecs
126
- import aws_cdk.aws_events
127
- import aws_cdk.aws_kms
128
- import aws_cdk.aws_rds
129
- import aws_cdk.aws_stepfunctions
130
- import constructs
144
+ import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
145
+ import aws_cdk.aws_ecs as _aws_cdk_aws_ecs_ceddda9d
146
+ import aws_cdk.aws_events as _aws_cdk_aws_events_ceddda9d
147
+ import aws_cdk.aws_kms as _aws_cdk_aws_kms_ceddda9d
148
+ import aws_cdk.aws_rds as _aws_cdk_aws_rds_ceddda9d
149
+ import aws_cdk.aws_stepfunctions as _aws_cdk_aws_stepfunctions_ceddda9d
150
+ import constructs as _constructs_77d1e7e8
131
151
 
132
152
 
133
153
  @jsii.interface(
@@ -138,7 +158,7 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
138
158
  :stability: experimental
139
159
  '''
140
160
 
141
- @builtins.property # type: ignore[misc]
161
+ @builtins.property
142
162
  @jsii.member(jsii_name="script")
143
163
  def script(self) -> builtins.str:
144
164
  '''(experimental) SQL script used to sanitize the database. It will be executed against the temporary database.
@@ -149,18 +169,20 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
149
169
  '''
150
170
  ...
151
171
 
152
- @builtins.property # type: ignore[misc]
172
+ @builtins.property
153
173
  @jsii.member(jsii_name="vpc")
154
- def vpc(self) -> aws_cdk.aws_ec2.IVpc:
174
+ def vpc(self) -> "_aws_cdk_aws_ec2_ceddda9d.IVpc":
155
175
  '''(experimental) VPC where temporary database and sanitizing task will be created.
156
176
 
157
177
  :stability: experimental
158
178
  '''
159
179
  ...
160
180
 
161
- @builtins.property # type: ignore[misc]
181
+ @builtins.property
162
182
  @jsii.member(jsii_name="databaseCluster")
163
- def database_cluster(self) -> typing.Optional[aws_cdk.aws_rds.IDatabaseCluster]:
183
+ def database_cluster(
184
+ self,
185
+ ) -> typing.Optional["_aws_cdk_aws_rds_ceddda9d.IDatabaseCluster"]:
164
186
  '''(experimental) Database cluster to snapshot and sanitize.
165
187
 
166
188
  Only one of ``databaseCluster`` and ``databaseInstance`` can be specified.
@@ -169,9 +191,11 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
169
191
  '''
170
192
  ...
171
193
 
172
- @builtins.property # type: ignore[misc]
194
+ @builtins.property
173
195
  @jsii.member(jsii_name="databaseInstance")
174
- def database_instance(self) -> typing.Optional[aws_cdk.aws_rds.IDatabaseInstance]:
196
+ def database_instance(
197
+ self,
198
+ ) -> typing.Optional["_aws_cdk_aws_rds_ceddda9d.IDatabaseInstance"]:
175
199
  '''(experimental) Database instance to snapshot and sanitize.
176
200
 
177
201
  Only one of ``databaseCluster`` and ``databaseInstance`` can be specified.
@@ -180,16 +204,16 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
180
204
  '''
181
205
  ...
182
206
 
183
- @builtins.property # type: ignore[misc]
207
+ @builtins.property
184
208
  @jsii.member(jsii_name="databaseKey")
185
- def database_key(self) -> typing.Optional[aws_cdk.aws_kms.IKey]:
209
+ def database_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
186
210
  '''(experimental) KMS key used to encrypt original database, if any.
187
211
 
188
212
  :stability: experimental
189
213
  '''
190
214
  ...
191
215
 
192
- @builtins.property # type: ignore[misc]
216
+ @builtins.property
193
217
  @jsii.member(jsii_name="databaseName")
194
218
  def database_name(self) -> typing.Optional[builtins.str]:
195
219
  '''(experimental) Name of database to connect to inside the RDS cluster or instance.
@@ -202,9 +226,11 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
202
226
  '''
203
227
  ...
204
228
 
205
- @builtins.property # type: ignore[misc]
229
+ @builtins.property
206
230
  @jsii.member(jsii_name="dbSubnets")
207
- def db_subnets(self) -> typing.Optional[aws_cdk.aws_ec2.SubnetSelection]:
231
+ def db_subnets(
232
+ self,
233
+ ) -> typing.Optional["_aws_cdk_aws_ec2_ceddda9d.SubnetSelection"]:
208
234
  '''(experimental) VPC subnets to use for temporary databases.
209
235
 
210
236
  :default: ec2.SubnetType.PRIVATE_ISOLATED
@@ -213,9 +239,9 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
213
239
  '''
214
240
  ...
215
241
 
216
- @builtins.property # type: ignore[misc]
242
+ @builtins.property
217
243
  @jsii.member(jsii_name="fargateCluster")
218
- def fargate_cluster(self) -> typing.Optional[aws_cdk.aws_ecs.ICluster]:
244
+ def fargate_cluster(self) -> typing.Optional["_aws_cdk_aws_ecs_ceddda9d.ICluster"]:
219
245
  '''(experimental) Cluster where sanitization task will be executed.
220
246
 
221
247
  :default: a new cluster running on given VPC
@@ -224,27 +250,29 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
224
250
  '''
225
251
  ...
226
252
 
227
- @builtins.property # type: ignore[misc]
253
+ @builtins.property
228
254
  @jsii.member(jsii_name="sanitizeSubnets")
229
- def sanitize_subnets(self) -> typing.Optional[aws_cdk.aws_ec2.SubnetSelection]:
255
+ def sanitize_subnets(
256
+ self,
257
+ ) -> typing.Optional["_aws_cdk_aws_ec2_ceddda9d.SubnetSelection"]:
230
258
  '''(experimental) VPC subnets to use for sanitization task.
231
259
 
232
- :default: ec2.SubnetType.PRIVATE_WITH_NAT
260
+ :default: ec2.SubnetType.PRIVATE_WITH_EGRESS
233
261
 
234
262
  :stability: experimental
235
263
  '''
236
264
  ...
237
265
 
238
- @builtins.property # type: ignore[misc]
266
+ @builtins.property
239
267
  @jsii.member(jsii_name="schedule")
240
- def schedule(self) -> typing.Optional[aws_cdk.aws_events.Schedule]:
268
+ def schedule(self) -> typing.Optional["_aws_cdk_aws_events_ceddda9d.Schedule"]:
241
269
  '''(experimental) The schedule or rate (frequency) that determines when the sanitized snapshot runs automatically.
242
270
 
243
271
  :stability: experimental
244
272
  '''
245
273
  ...
246
274
 
247
- @builtins.property # type: ignore[misc]
275
+ @builtins.property
248
276
  @jsii.member(jsii_name="shareAccounts")
249
277
  def share_accounts(self) -> typing.Optional[typing.List[builtins.str]]:
250
278
  '''(experimental) List of accounts the sanitized snapshot should be shared with.
@@ -253,7 +281,7 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
253
281
  '''
254
282
  ...
255
283
 
256
- @builtins.property # type: ignore[misc]
284
+ @builtins.property
257
285
  @jsii.member(jsii_name="snapshotHistoryLimit")
258
286
  def snapshot_history_limit(self) -> typing.Optional[jsii.Number]:
259
287
  '''(experimental) Limit the number of snapshot history.
@@ -264,16 +292,16 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
264
292
  '''
265
293
  ...
266
294
 
267
- @builtins.property # type: ignore[misc]
295
+ @builtins.property
268
296
  @jsii.member(jsii_name="snapshotKey")
269
- def snapshot_key(self) -> typing.Optional[aws_cdk.aws_kms.IKey]:
297
+ def snapshot_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
270
298
  '''(experimental) Optional KMS key to encrypt target snapshot.
271
299
 
272
300
  :stability: experimental
273
301
  '''
274
302
  ...
275
303
 
276
- @builtins.property # type: ignore[misc]
304
+ @builtins.property
277
305
  @jsii.member(jsii_name="snapshotPrefix")
278
306
  def snapshot_prefix(self) -> typing.Optional[builtins.str]:
279
307
  '''(experimental) Prefix for sanitized snapshot name.
@@ -286,7 +314,7 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
286
314
  '''
287
315
  ...
288
316
 
289
- @builtins.property # type: ignore[misc]
317
+ @builtins.property
290
318
  @jsii.member(jsii_name="tempPrefix")
291
319
  def temp_prefix(self) -> typing.Optional[builtins.str]:
292
320
  '''(experimental) Prefix for all temporary snapshots and databases.
@@ -299,6 +327,21 @@ class IRdsSanitizedSnapshotter(typing_extensions.Protocol):
299
327
  '''
300
328
  ...
301
329
 
330
+ @builtins.property
331
+ @jsii.member(jsii_name="useExistingSnapshot")
332
+ def use_existing_snapshot(self) -> typing.Optional[builtins.bool]:
333
+ '''(experimental) Use the latest available snapshot instead of taking a new one.
334
+
335
+ This can be used to shorten the process at the cost of using a possibly older snapshot.
336
+
337
+ This will use the latest snapshot whether it's an automatic system snapshot or a manual snapshot.
338
+
339
+ :default: false
340
+
341
+ :stability: experimental
342
+ '''
343
+ ...
344
+
302
345
 
303
346
  class _IRdsSanitizedSnapshotterProxy:
304
347
  '''
@@ -307,7 +350,7 @@ class _IRdsSanitizedSnapshotterProxy:
307
350
 
308
351
  __jsii_type__: typing.ClassVar[str] = "@cloudsnorkel/cdk-rds-sanitized-snapshots.IRdsSanitizedSnapshotter"
309
352
 
310
- @builtins.property # type: ignore[misc]
353
+ @builtins.property
311
354
  @jsii.member(jsii_name="script")
312
355
  def script(self) -> builtins.str:
313
356
  '''(experimental) SQL script used to sanitize the database. It will be executed against the temporary database.
@@ -318,47 +361,51 @@ class _IRdsSanitizedSnapshotterProxy:
318
361
  '''
319
362
  return typing.cast(builtins.str, jsii.get(self, "script"))
320
363
 
321
- @builtins.property # type: ignore[misc]
364
+ @builtins.property
322
365
  @jsii.member(jsii_name="vpc")
323
- def vpc(self) -> aws_cdk.aws_ec2.IVpc:
366
+ def vpc(self) -> "_aws_cdk_aws_ec2_ceddda9d.IVpc":
324
367
  '''(experimental) VPC where temporary database and sanitizing task will be created.
325
368
 
326
369
  :stability: experimental
327
370
  '''
328
- return typing.cast(aws_cdk.aws_ec2.IVpc, jsii.get(self, "vpc"))
371
+ return typing.cast("_aws_cdk_aws_ec2_ceddda9d.IVpc", jsii.get(self, "vpc"))
329
372
 
330
- @builtins.property # type: ignore[misc]
373
+ @builtins.property
331
374
  @jsii.member(jsii_name="databaseCluster")
332
- def database_cluster(self) -> typing.Optional[aws_cdk.aws_rds.IDatabaseCluster]:
375
+ def database_cluster(
376
+ self,
377
+ ) -> typing.Optional["_aws_cdk_aws_rds_ceddda9d.IDatabaseCluster"]:
333
378
  '''(experimental) Database cluster to snapshot and sanitize.
334
379
 
335
380
  Only one of ``databaseCluster`` and ``databaseInstance`` can be specified.
336
381
 
337
382
  :stability: experimental
338
383
  '''
339
- return typing.cast(typing.Optional[aws_cdk.aws_rds.IDatabaseCluster], jsii.get(self, "databaseCluster"))
384
+ return typing.cast(typing.Optional["_aws_cdk_aws_rds_ceddda9d.IDatabaseCluster"], jsii.get(self, "databaseCluster"))
340
385
 
341
- @builtins.property # type: ignore[misc]
386
+ @builtins.property
342
387
  @jsii.member(jsii_name="databaseInstance")
343
- def database_instance(self) -> typing.Optional[aws_cdk.aws_rds.IDatabaseInstance]:
388
+ def database_instance(
389
+ self,
390
+ ) -> typing.Optional["_aws_cdk_aws_rds_ceddda9d.IDatabaseInstance"]:
344
391
  '''(experimental) Database instance to snapshot and sanitize.
345
392
 
346
393
  Only one of ``databaseCluster`` and ``databaseInstance`` can be specified.
347
394
 
348
395
  :stability: experimental
349
396
  '''
350
- return typing.cast(typing.Optional[aws_cdk.aws_rds.IDatabaseInstance], jsii.get(self, "databaseInstance"))
397
+ return typing.cast(typing.Optional["_aws_cdk_aws_rds_ceddda9d.IDatabaseInstance"], jsii.get(self, "databaseInstance"))
351
398
 
352
- @builtins.property # type: ignore[misc]
399
+ @builtins.property
353
400
  @jsii.member(jsii_name="databaseKey")
354
- def database_key(self) -> typing.Optional[aws_cdk.aws_kms.IKey]:
401
+ def database_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
355
402
  '''(experimental) KMS key used to encrypt original database, if any.
356
403
 
357
404
  :stability: experimental
358
405
  '''
359
- return typing.cast(typing.Optional[aws_cdk.aws_kms.IKey], jsii.get(self, "databaseKey"))
406
+ return typing.cast(typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"], jsii.get(self, "databaseKey"))
360
407
 
361
- @builtins.property # type: ignore[misc]
408
+ @builtins.property
362
409
  @jsii.member(jsii_name="databaseName")
363
410
  def database_name(self) -> typing.Optional[builtins.str]:
364
411
  '''(experimental) Name of database to connect to inside the RDS cluster or instance.
@@ -371,49 +418,53 @@ class _IRdsSanitizedSnapshotterProxy:
371
418
  '''
372
419
  return typing.cast(typing.Optional[builtins.str], jsii.get(self, "databaseName"))
373
420
 
374
- @builtins.property # type: ignore[misc]
421
+ @builtins.property
375
422
  @jsii.member(jsii_name="dbSubnets")
376
- def db_subnets(self) -> typing.Optional[aws_cdk.aws_ec2.SubnetSelection]:
423
+ def db_subnets(
424
+ self,
425
+ ) -> typing.Optional["_aws_cdk_aws_ec2_ceddda9d.SubnetSelection"]:
377
426
  '''(experimental) VPC subnets to use for temporary databases.
378
427
 
379
428
  :default: ec2.SubnetType.PRIVATE_ISOLATED
380
429
 
381
430
  :stability: experimental
382
431
  '''
383
- return typing.cast(typing.Optional[aws_cdk.aws_ec2.SubnetSelection], jsii.get(self, "dbSubnets"))
432
+ return typing.cast(typing.Optional["_aws_cdk_aws_ec2_ceddda9d.SubnetSelection"], jsii.get(self, "dbSubnets"))
384
433
 
385
- @builtins.property # type: ignore[misc]
434
+ @builtins.property
386
435
  @jsii.member(jsii_name="fargateCluster")
387
- def fargate_cluster(self) -> typing.Optional[aws_cdk.aws_ecs.ICluster]:
436
+ def fargate_cluster(self) -> typing.Optional["_aws_cdk_aws_ecs_ceddda9d.ICluster"]:
388
437
  '''(experimental) Cluster where sanitization task will be executed.
389
438
 
390
439
  :default: a new cluster running on given VPC
391
440
 
392
441
  :stability: experimental
393
442
  '''
394
- return typing.cast(typing.Optional[aws_cdk.aws_ecs.ICluster], jsii.get(self, "fargateCluster"))
443
+ return typing.cast(typing.Optional["_aws_cdk_aws_ecs_ceddda9d.ICluster"], jsii.get(self, "fargateCluster"))
395
444
 
396
- @builtins.property # type: ignore[misc]
445
+ @builtins.property
397
446
  @jsii.member(jsii_name="sanitizeSubnets")
398
- def sanitize_subnets(self) -> typing.Optional[aws_cdk.aws_ec2.SubnetSelection]:
447
+ def sanitize_subnets(
448
+ self,
449
+ ) -> typing.Optional["_aws_cdk_aws_ec2_ceddda9d.SubnetSelection"]:
399
450
  '''(experimental) VPC subnets to use for sanitization task.
400
451
 
401
- :default: ec2.SubnetType.PRIVATE_WITH_NAT
452
+ :default: ec2.SubnetType.PRIVATE_WITH_EGRESS
402
453
 
403
454
  :stability: experimental
404
455
  '''
405
- return typing.cast(typing.Optional[aws_cdk.aws_ec2.SubnetSelection], jsii.get(self, "sanitizeSubnets"))
456
+ return typing.cast(typing.Optional["_aws_cdk_aws_ec2_ceddda9d.SubnetSelection"], jsii.get(self, "sanitizeSubnets"))
406
457
 
407
- @builtins.property # type: ignore[misc]
458
+ @builtins.property
408
459
  @jsii.member(jsii_name="schedule")
409
- def schedule(self) -> typing.Optional[aws_cdk.aws_events.Schedule]:
460
+ def schedule(self) -> typing.Optional["_aws_cdk_aws_events_ceddda9d.Schedule"]:
410
461
  '''(experimental) The schedule or rate (frequency) that determines when the sanitized snapshot runs automatically.
411
462
 
412
463
  :stability: experimental
413
464
  '''
414
- return typing.cast(typing.Optional[aws_cdk.aws_events.Schedule], jsii.get(self, "schedule"))
465
+ return typing.cast(typing.Optional["_aws_cdk_aws_events_ceddda9d.Schedule"], jsii.get(self, "schedule"))
415
466
 
416
- @builtins.property # type: ignore[misc]
467
+ @builtins.property
417
468
  @jsii.member(jsii_name="shareAccounts")
418
469
  def share_accounts(self) -> typing.Optional[typing.List[builtins.str]]:
419
470
  '''(experimental) List of accounts the sanitized snapshot should be shared with.
@@ -422,7 +473,7 @@ class _IRdsSanitizedSnapshotterProxy:
422
473
  '''
423
474
  return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "shareAccounts"))
424
475
 
425
- @builtins.property # type: ignore[misc]
476
+ @builtins.property
426
477
  @jsii.member(jsii_name="snapshotHistoryLimit")
427
478
  def snapshot_history_limit(self) -> typing.Optional[jsii.Number]:
428
479
  '''(experimental) Limit the number of snapshot history.
@@ -433,16 +484,16 @@ class _IRdsSanitizedSnapshotterProxy:
433
484
  '''
434
485
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "snapshotHistoryLimit"))
435
486
 
436
- @builtins.property # type: ignore[misc]
487
+ @builtins.property
437
488
  @jsii.member(jsii_name="snapshotKey")
438
- def snapshot_key(self) -> typing.Optional[aws_cdk.aws_kms.IKey]:
489
+ def snapshot_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
439
490
  '''(experimental) Optional KMS key to encrypt target snapshot.
440
491
 
441
492
  :stability: experimental
442
493
  '''
443
- return typing.cast(typing.Optional[aws_cdk.aws_kms.IKey], jsii.get(self, "snapshotKey"))
494
+ return typing.cast(typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"], jsii.get(self, "snapshotKey"))
444
495
 
445
- @builtins.property # type: ignore[misc]
496
+ @builtins.property
446
497
  @jsii.member(jsii_name="snapshotPrefix")
447
498
  def snapshot_prefix(self) -> typing.Optional[builtins.str]:
448
499
  '''(experimental) Prefix for sanitized snapshot name.
@@ -455,7 +506,7 @@ class _IRdsSanitizedSnapshotterProxy:
455
506
  '''
456
507
  return typing.cast(typing.Optional[builtins.str], jsii.get(self, "snapshotPrefix"))
457
508
 
458
- @builtins.property # type: ignore[misc]
509
+ @builtins.property
459
510
  @jsii.member(jsii_name="tempPrefix")
460
511
  def temp_prefix(self) -> typing.Optional[builtins.str]:
461
512
  '''(experimental) Prefix for all temporary snapshots and databases.
@@ -468,12 +519,27 @@ class _IRdsSanitizedSnapshotterProxy:
468
519
  '''
469
520
  return typing.cast(typing.Optional[builtins.str], jsii.get(self, "tempPrefix"))
470
521
 
522
+ @builtins.property
523
+ @jsii.member(jsii_name="useExistingSnapshot")
524
+ def use_existing_snapshot(self) -> typing.Optional[builtins.bool]:
525
+ '''(experimental) Use the latest available snapshot instead of taking a new one.
526
+
527
+ This can be used to shorten the process at the cost of using a possibly older snapshot.
528
+
529
+ This will use the latest snapshot whether it's an automatic system snapshot or a manual snapshot.
530
+
531
+ :default: false
532
+
533
+ :stability: experimental
534
+ '''
535
+ return typing.cast(typing.Optional[builtins.bool], jsii.get(self, "useExistingSnapshot"))
536
+
471
537
  # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
472
538
  typing.cast(typing.Any, IRdsSanitizedSnapshotter).__jsii_proxy_class__ = lambda : _IRdsSanitizedSnapshotterProxy
473
539
 
474
540
 
475
541
  class RdsSanitizedSnapshotter(
476
- constructs.Construct,
542
+ _constructs_77d1e7e8.Construct,
477
543
  metaclass=jsii.JSIIMeta,
478
544
  jsii_type="@cloudsnorkel/cdk-rds-sanitized-snapshots.RdsSanitizedSnapshotter",
479
545
  ):
@@ -493,9 +559,9 @@ class RdsSanitizedSnapshotter(
493
559
 
494
560
  def __init__(
495
561
  self,
496
- scope: constructs.Construct,
562
+ scope: "_constructs_77d1e7e8.Construct",
497
563
  id: builtins.str,
498
- props: IRdsSanitizedSnapshotter,
564
+ props: "IRdsSanitizedSnapshotter",
499
565
  ) -> None:
500
566
  '''
501
567
  :param scope: -
@@ -504,30 +570,41 @@ class RdsSanitizedSnapshotter(
504
570
 
505
571
  :stability: experimental
506
572
  '''
573
+ if __debug__:
574
+ type_hints = typing.get_type_hints(_typecheckingstub__1e15c41233acb14f8259c09345be1563a5d61c80585cf7e3c29c90b00f3e5879)
575
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
576
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
577
+ check_type(argname="argument props", value=props, expected_type=type_hints["props"])
507
578
  jsii.create(self.__class__, self, [scope, id, props])
508
579
 
509
- @builtins.property # type: ignore[misc]
580
+ @builtins.property
510
581
  @jsii.member(jsii_name="props")
511
- def props(self) -> IRdsSanitizedSnapshotter:
582
+ def props(self) -> "IRdsSanitizedSnapshotter":
512
583
  '''
513
584
  :stability: experimental
514
585
  '''
515
- return typing.cast(IRdsSanitizedSnapshotter, jsii.get(self, "props"))
586
+ return typing.cast("IRdsSanitizedSnapshotter", jsii.get(self, "props"))
516
587
 
517
- @builtins.property # type: ignore[misc]
588
+ @builtins.property
518
589
  @jsii.member(jsii_name="snapshotter")
519
- def snapshotter(self) -> aws_cdk.aws_stepfunctions.StateMachine:
590
+ def snapshotter(self) -> "_aws_cdk_aws_stepfunctions_ceddda9d.StateMachine":
520
591
  '''(experimental) Step function in charge of the entire process including snapshotting, sanitizing, and cleanup.
521
592
 
522
593
  Trigger this step function to get a new snapshot.
523
594
 
524
595
  :stability: experimental
525
596
  '''
526
- return typing.cast(aws_cdk.aws_stepfunctions.StateMachine, jsii.get(self, "snapshotter"))
597
+ return typing.cast("_aws_cdk_aws_stepfunctions_ceddda9d.StateMachine", jsii.get(self, "snapshotter"))
527
598
 
528
599
  @snapshotter.setter
529
- def snapshotter(self, value: aws_cdk.aws_stepfunctions.StateMachine) -> None:
530
- jsii.set(self, "snapshotter", value)
600
+ def snapshotter(
601
+ self,
602
+ value: "_aws_cdk_aws_stepfunctions_ceddda9d.StateMachine",
603
+ ) -> None:
604
+ if __debug__:
605
+ type_hints = typing.get_type_hints(_typecheckingstub__df51411713b297623720935bb6779afc65503804a74afed6b48f5754baba7f14)
606
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
607
+ jsii.set(self, "snapshotter", value) # pyright: ignore[reportArgumentType]
531
608
 
532
609
 
533
610
  __all__ = [
@@ -536,3 +613,20 @@ __all__ = [
536
613
  ]
537
614
 
538
615
  publication.publish()
616
+
617
+ def _typecheckingstub__1e15c41233acb14f8259c09345be1563a5d61c80585cf7e3c29c90b00f3e5879(
618
+ scope: _constructs_77d1e7e8.Construct,
619
+ id: builtins.str,
620
+ props: IRdsSanitizedSnapshotter,
621
+ ) -> None:
622
+ """Type checking stubs"""
623
+ pass
624
+
625
+ def _typecheckingstub__df51411713b297623720935bb6779afc65503804a74afed6b48f5754baba7f14(
626
+ value: _aws_cdk_aws_stepfunctions_ceddda9d.StateMachine,
627
+ ) -> None:
628
+ """Type checking stubs"""
629
+ pass
630
+
631
+ for cls in [IRdsSanitizedSnapshotter]:
632
+ typing.cast(typing.Any, cls).__protocol_attrs__ = typing.cast(typing.Any, cls).__protocol_attrs__ - set(['__jsii_proxy_class__', '__jsii_type__'])
@@ -1,3 +1,6 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
3
+
1
4
  import abc
2
5
  import builtins
3
6
  import datetime
@@ -8,14 +11,31 @@ import jsii
8
11
  import publication
9
12
  import typing_extensions
10
13
 
14
+ import typeguard
15
+ from importlib.metadata import version as _metadata_package_version
16
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
17
+
18
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
19
+ if TYPEGUARD_MAJOR_VERSION <= 2:
20
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
21
+ else:
22
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
23
+ pass
24
+ else:
25
+ if TYPEGUARD_MAJOR_VERSION == 3:
26
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
27
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
28
+ else:
29
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
30
+
11
31
  import aws_cdk._jsii
12
32
  import constructs._jsii
13
33
 
14
34
  __jsii_assembly__ = jsii.JSIIAssembly.load(
15
35
  "@cloudsnorkel/cdk-rds-sanitized-snapshots",
16
- "0.0.3",
36
+ "0.1.6",
17
37
  __name__[0:-6],
18
- "cdk-rds-sanitized-snapshots@0.0.3.jsii.tgz",
38
+ "cdk-rds-sanitized-snapshots@0.1.6.jsii.tgz",
19
39
  )
20
40
 
21
41
  __all__ = [
@@ -1,30 +1,29 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudsnorkel.cdk-rds-sanitized-snapshots
3
- Version: 0.0.3
3
+ Version: 0.1.6
4
4
  Summary: CDK construct to periodically take snapshots of RDS databases, sanitize them, and share with selected accounts.
5
5
  Home-page: https://github.com/CloudSnorkel/cdk-rds-sanitized-snapshots.git
6
6
  Author: Amir Szekely<amir@cloudsnorkel.com>
7
7
  License: Apache-2.0
8
8
  Project-URL: Source, https://github.com/CloudSnorkel/cdk-rds-sanitized-snapshots.git
9
- Platform: UNKNOWN
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: Operating System :: OS Independent
12
11
  Classifier: Programming Language :: JavaScript
13
12
  Classifier: Programming Language :: Python :: 3 :: Only
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
13
  Classifier: Programming Language :: Python :: 3.9
17
14
  Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
18
16
  Classifier: Typing :: Typed
19
17
  Classifier: Development Status :: 4 - Beta
20
18
  Classifier: License :: OSI Approved
21
- Requires-Python: ~=3.7
19
+ Requires-Python: ~=3.9
22
20
  Description-Content-Type: text/markdown
23
21
  License-File: LICENSE
24
- Requires-Dist: aws-cdk-lib (<3.0.0,>=2.0.0)
25
- Requires-Dist: constructs (<11.0.0,>=10.0.5)
26
- Requires-Dist: jsii (<2.0.0,>=1.62.0)
27
- Requires-Dist: publication (>=0.0.3)
22
+ Requires-Dist: aws-cdk-lib <3.0.0,>=2.146.0
23
+ Requires-Dist: constructs <11.0.0,>=10.0.5
24
+ Requires-Dist: jsii <2.0.0,>=1.126.0
25
+ Requires-Dist: publication >=0.0.3
26
+ Requires-Dist: typeguard ==2.13.3
28
27
 
29
28
  # CDK Construct for RDS Sanitized Snapshots
30
29
 
@@ -135,5 +134,3 @@ on giving other accounts access to the key.
135
134
  ```
136
135
  npm run bundle && npm run integ:default:deploy
137
136
  ```
138
-
139
-
@@ -0,0 +1,9 @@
1
+ cloudsnorkel/cdk_rds_sanitized_snapshots/__init__.py,sha256=tCWwZlMfeCwsruMGSTnWjr4bUXTzq4ay-mxilSU3mxs,23793
2
+ cloudsnorkel/cdk_rds_sanitized_snapshots/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ cloudsnorkel/cdk_rds_sanitized_snapshots/_jsii/__init__.py,sha256=zXWY1ALvWAeJRTF66SX9CubTFVZToWyrUL71jSmVeFc,1492
4
+ cloudsnorkel/cdk_rds_sanitized_snapshots/_jsii/cdk-rds-sanitized-snapshots@0.1.6.jsii.tgz,sha256=2prnZyB6wxSmIe-WnwAHTAUN5ny7hSwfc2sPx1Kd_jM,81023
5
+ cloudsnorkel_cdk_rds_sanitized_snapshots-0.1.6.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ cloudsnorkel_cdk_rds_sanitized_snapshots-0.1.6.dist-info/METADATA,sha256=PtzOv2BTAdt6gkN-4bx1ZfT7lQn-xfVS2iAOx1SVq-Y,6442
7
+ cloudsnorkel_cdk_rds_sanitized_snapshots-0.1.6.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
8
+ cloudsnorkel_cdk_rds_sanitized_snapshots-0.1.6.dist-info/top_level.txt,sha256=6vUrT-dcGOiRMT4Q6gEQPznoyS7nHOJ269MHpo4DEd8,13
9
+ cloudsnorkel_cdk_rds_sanitized_snapshots-0.1.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: setuptools (75.3.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,9 +0,0 @@
1
- cloudsnorkel/cdk_rds_sanitized_snapshots/__init__.py,sha256=KZeAu7q69syXElfkq5wvoVBq5Z0TG4gs_uwKjpdK5N0,20151
2
- cloudsnorkel/cdk_rds_sanitized_snapshots/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- cloudsnorkel/cdk_rds_sanitized_snapshots/_jsii/__init__.py,sha256=PbYkAPYawnr9NpqoRGdDMQbFGZhwVw458yHPLROZw38,414
4
- cloudsnorkel/cdk_rds_sanitized_snapshots/_jsii/cdk-rds-sanitized-snapshots@0.0.3.jsii.tgz,sha256=OtNMoZtUUA_1PlkILXljaNUeTJpI6dI0115y_Zstd-8,72564
5
- cloudsnorkel.cdk_rds_sanitized_snapshots-0.0.3.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
- cloudsnorkel.cdk_rds_sanitized_snapshots-0.0.3.dist-info/METADATA,sha256=Lm0TkLUKksxGJxsM_DLR7We4leyumB9MjOe8_8z1LHE,6482
7
- cloudsnorkel.cdk_rds_sanitized_snapshots-0.0.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
8
- cloudsnorkel.cdk_rds_sanitized_snapshots-0.0.3.dist-info/top_level.txt,sha256=6vUrT-dcGOiRMT4Q6gEQPznoyS7nHOJ269MHpo4DEd8,13
9
- cloudsnorkel.cdk_rds_sanitized_snapshots-0.0.3.dist-info/RECORD,,