datamasque-python 1.2.4__py3-none-any.whl → 1.2.5__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.
@@ -289,6 +289,22 @@ class SnowflakeConnectionConfig(ConnectionConfig):
289
289
  return data
290
290
 
291
291
 
292
+ # Engines that can sit behind an Amazon RDS, Aurora or Redshift endpoint, and so can carry a role
293
+ # for DataMasque to assume when tagging the resource. Aurora needs no entry of its own: it uses
294
+ # these same engines with a cluster endpoint.
295
+ _AWS_TAGGABLE_DATABASE_TYPES = frozenset(
296
+ {
297
+ DatabaseType.postgres,
298
+ DatabaseType.mysql,
299
+ DatabaseType.mariadb,
300
+ DatabaseType.oracle,
301
+ DatabaseType.mssql,
302
+ DatabaseType.db2_luw,
303
+ DatabaseType.redshift,
304
+ }
305
+ )
306
+
307
+
292
308
  class DatabaseConnectionConfig(ConnectionConfig):
293
309
  """
294
310
  Connection configuration for a SQL database.
@@ -309,6 +325,11 @@ class DatabaseConnectionConfig(ConnectionConfig):
309
325
  is_read_only: bool = False
310
326
  s3_bucket_name: Optional[str] = None
311
327
  s3_redshift_iam_role: Optional[str] = None
328
+ # An IAM role for DataMasque to assume when tagging this database's AWS resource after a run.
329
+ # Only the engines in `_AWS_TAGGABLE_DATABASE_TYPES` can be an RDS instance, Aurora cluster or
330
+ # Redshift cluster, so it is pruned for the rest. Distinct from `s3_redshift_iam_role`, which is
331
+ # the role the Redshift cluster itself uses to reach S3.
332
+ iam_role_arn: Optional[str] = None
312
333
 
313
334
  @model_validator(mode="after")
314
335
  def _reject_special_engines(self) -> "DatabaseConnectionConfig":
@@ -348,6 +369,8 @@ class DatabaseConnectionConfig(ConnectionConfig):
348
369
  if db_type is not DatabaseType.redshift:
349
370
  d.pop("s3_bucket_name", None)
350
371
  d.pop("s3_redshift_iam_role", None)
372
+ if db_type not in _AWS_TAGGABLE_DATABASE_TYPES:
373
+ d.pop("iam_role_arn", None)
351
374
  if not d.get("engine_options"):
352
375
  d.pop("engine_options", None)
353
376
  return d
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: datamasque-python
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Official Python client for the DataMasque data-masking API.
5
5
  Project-URL: Homepage, https://datamasque.com/
6
6
  Project-URL: Documentation, https://datamasque-python.readthedocs.io/
@@ -19,7 +19,7 @@ datamasque/client/spcs.py,sha256=geHrBQ6WLWsMGpSMV8hmK5SFAwftrOU0DXkrR2orOmo,753
19
19
  datamasque/client/table_references.py,sha256=dPyB59Sz4iLuF1lc7xffgf9qeNTFA5srT55E8TnFLvk,6092
20
20
  datamasque/client/users.py,sha256=VCUo2CJyOw4-aO_3mp_w_0BcSoa6-h1HcReMcAMyumw,3701
21
21
  datamasque/client/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- datamasque/client/models/connection.py,sha256=loLy4RCiIfY9kvBFspSqJSRhHqhcJxm_mQzXwMRS4VU,17529
22
+ datamasque/client/models/connection.py,sha256=w4-mAja3nSnKkmCs_99RkDLIKvwPzgbB_bnfWEJv-wc,18528
23
23
  datamasque/client/models/data_selection.py,sha256=9hRpkQQIQlKGFYDYQCrreggsv96dh6DelppCpCE4S2U,2725
24
24
  datamasque/client/models/discovery.py,sha256=J_cAXuIpoQTzHh_-1zvBwXsFnbKI2hRywALb5Yfc5vI,17955
25
25
  datamasque/client/models/discovery_config.py,sha256=8sqs9x_X0H_hR1fJDEFmOdJyGRDwgbdb3eddEAe98WE,2420
@@ -38,7 +38,7 @@ datamasque/client/models/safe_data_preview.py,sha256=BiI9d13KdQrTin2JfbjiRiODjns
38
38
  datamasque/client/models/status.py,sha256=DXcucL_jRsOQ0vaV0t8CJt6crvCIOLBn07KuwpwW-4A,3247
39
39
  datamasque/client/models/table_reference.py,sha256=55fKdHjC2TQnUmbp0XiWqfeFGXqcq4wXjbWgMaN3p3c,3835
40
40
  datamasque/client/models/user.py,sha256=UGAUzgJkf78m24_zFXXoA99zdut48BXkX_ivV8yq1Vc,2043
41
- datamasque_python-1.2.4.dist-info/METADATA,sha256=JfLuGmshJx1zHMoPocIbxfuO3H3jMKAJEa5hPTnKPNM,4497
42
- datamasque_python-1.2.4.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
43
- datamasque_python-1.2.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
- datamasque_python-1.2.4.dist-info/RECORD,,
41
+ datamasque_python-1.2.5.dist-info/METADATA,sha256=kfyTtmM4E4_WDXVh_8vrzyIzMOyn21gvvGaJGqSfqLw,4497
42
+ datamasque_python-1.2.5.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
43
+ datamasque_python-1.2.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
+ datamasque_python-1.2.5.dist-info/RECORD,,