pulumi-databricks 1.77.0a1760375482__py3-none-any.whl → 1.79.0a1762839813__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.
Files changed (176) hide show
  1. pulumi_databricks/__init__.py +54 -46
  2. pulumi_databricks/_inputs.py +26079 -32918
  3. pulumi_databricks/account_federation_policy.py +44 -16
  4. pulumi_databricks/account_network_policy.py +56 -2
  5. pulumi_databricks/account_setting_v2.py +46 -83
  6. pulumi_databricks/alert_v2.py +168 -134
  7. pulumi_databricks/app.py +153 -0
  8. pulumi_databricks/apps_settings_custom_template.py +75 -52
  9. pulumi_databricks/budget_policy.py +6 -2
  10. pulumi_databricks/catalog.py +65 -23
  11. pulumi_databricks/cluster.py +47 -168
  12. pulumi_databricks/cluster_policy.py +120 -0
  13. pulumi_databricks/config/__init__.pyi +4 -0
  14. pulumi_databricks/config/vars.py +8 -0
  15. pulumi_databricks/data_quality_monitor.py +453 -0
  16. pulumi_databricks/data_quality_refresh.py +492 -0
  17. pulumi_databricks/database_database_catalog.py +9 -52
  18. pulumi_databricks/database_instance.py +271 -120
  19. pulumi_databricks/database_synced_database_table.py +239 -52
  20. pulumi_databricks/entitlements.py +21 -21
  21. pulumi_databricks/entity_tag_assignment.py +83 -52
  22. pulumi_databricks/external_location.py +131 -7
  23. pulumi_databricks/external_metadata.py +16 -59
  24. pulumi_databricks/feature_engineering_feature.py +480 -0
  25. pulumi_databricks/feature_engineering_materialized_feature.py +397 -0
  26. pulumi_databricks/file.py +2 -2
  27. pulumi_databricks/get_account_federation_policies.py +22 -3
  28. pulumi_databricks/get_account_federation_policy.py +12 -27
  29. pulumi_databricks/get_account_network_policies.py +4 -0
  30. pulumi_databricks/get_account_network_policy.py +9 -18
  31. pulumi_databricks/get_account_setting_v2.py +36 -141
  32. pulumi_databricks/get_alert_v2.py +41 -107
  33. pulumi_databricks/get_alerts_v2.py +29 -31
  34. pulumi_databricks/get_app.py +21 -5
  35. pulumi_databricks/get_apps.py +22 -6
  36. pulumi_databricks/get_apps_settings_custom_template.py +11 -55
  37. pulumi_databricks/get_apps_settings_custom_templates.py +25 -21
  38. pulumi_databricks/get_aws_assume_role_policy.py +14 -14
  39. pulumi_databricks/get_aws_bucket_policy.py +10 -10
  40. pulumi_databricks/get_aws_unity_catalog_assume_role_policy.py +10 -10
  41. pulumi_databricks/get_aws_unity_catalog_policy.py +10 -10
  42. pulumi_databricks/get_budget_policies.py +70 -6
  43. pulumi_databricks/get_budget_policy.py +9 -32
  44. pulumi_databricks/get_catalog.py +21 -4
  45. pulumi_databricks/get_catalogs.py +23 -4
  46. pulumi_databricks/get_cluster.py +75 -4
  47. pulumi_databricks/get_cluster_policy.py +23 -4
  48. pulumi_databricks/get_clusters.py +21 -4
  49. pulumi_databricks/get_current_config.py +4 -4
  50. pulumi_databricks/get_current_metastore.py +21 -4
  51. pulumi_databricks/get_dashboards.py +20 -4
  52. pulumi_databricks/get_data_quality_monitor.py +210 -0
  53. pulumi_databricks/get_data_quality_monitors.py +143 -0
  54. pulumi_databricks/get_data_quality_refresh.py +270 -0
  55. pulumi_databricks/get_data_quality_refreshes.py +207 -0
  56. pulumi_databricks/get_database_database_catalog.py +10 -41
  57. pulumi_databricks/get_database_database_catalogs.py +37 -18
  58. pulumi_databricks/get_database_instance.py +93 -99
  59. pulumi_databricks/get_database_instances.py +20 -16
  60. pulumi_databricks/get_database_synced_database_table.py +11 -49
  61. pulumi_databricks/get_database_synced_database_tables.py +42 -23
  62. pulumi_databricks/get_directory.py +20 -1
  63. pulumi_databricks/get_entity_tag_assignment.py +63 -30
  64. pulumi_databricks/get_entity_tag_assignments.py +69 -23
  65. pulumi_databricks/get_external_location.py +21 -4
  66. pulumi_databricks/get_external_locations.py +23 -4
  67. pulumi_databricks/get_external_metadata.py +18 -73
  68. pulumi_databricks/get_external_metadatas.py +22 -16
  69. pulumi_databricks/get_feature_engineering_feature.py +179 -0
  70. pulumi_databricks/get_feature_engineering_features.py +103 -0
  71. pulumi_databricks/get_feature_engineering_materialized_feature.py +180 -0
  72. pulumi_databricks/get_feature_engineering_materialized_features.py +123 -0
  73. pulumi_databricks/get_functions.py +16 -1
  74. pulumi_databricks/get_instance_profiles.py +21 -4
  75. pulumi_databricks/get_jobs.py +23 -4
  76. pulumi_databricks/get_materialized_features_feature_tag.py +7 -32
  77. pulumi_databricks/get_materialized_features_feature_tags.py +50 -18
  78. pulumi_databricks/get_metastore.py +6 -6
  79. pulumi_databricks/get_mlflow_experiment.py +18 -1
  80. pulumi_databricks/get_mlflow_model.py +18 -1
  81. pulumi_databricks/get_mlflow_models.py +23 -4
  82. pulumi_databricks/get_node_type.py +42 -5
  83. pulumi_databricks/get_notebook.py +20 -1
  84. pulumi_databricks/get_notification_destinations.py +17 -1
  85. pulumi_databricks/get_online_store.py +11 -38
  86. pulumi_databricks/get_online_stores.py +20 -18
  87. pulumi_databricks/get_pipelines.py +23 -4
  88. pulumi_databricks/get_policy_info.py +21 -109
  89. pulumi_databricks/get_policy_infos.py +50 -25
  90. pulumi_databricks/get_quality_monitor_v2.py +8 -21
  91. pulumi_databricks/get_quality_monitors_v2.py +23 -25
  92. pulumi_databricks/get_registered_model.py +19 -4
  93. pulumi_databricks/get_registered_model_versions.py +19 -4
  94. pulumi_databricks/get_rfa_access_request_destinations.py +126 -0
  95. pulumi_databricks/get_schema.py +18 -1
  96. pulumi_databricks/get_schemas.py +23 -4
  97. pulumi_databricks/get_service_principal_federation_policies.py +23 -4
  98. pulumi_databricks/get_service_principal_federation_policy.py +15 -24
  99. pulumi_databricks/get_service_principals.py +64 -0
  100. pulumi_databricks/get_serving_endpoints.py +19 -4
  101. pulumi_databricks/get_share.py +117 -18
  102. pulumi_databricks/get_shares.py +22 -3
  103. pulumi_databricks/get_spark_version.py +20 -1
  104. pulumi_databricks/get_sql_warehouse.py +16 -1
  105. pulumi_databricks/get_sql_warehouses.py +20 -1
  106. pulumi_databricks/get_storage_credential.py +18 -1
  107. pulumi_databricks/get_storage_credentials.py +23 -4
  108. pulumi_databricks/get_table.py +18 -1
  109. pulumi_databricks/get_tables.py +20 -1
  110. pulumi_databricks/get_tag_policies.py +55 -23
  111. pulumi_databricks/get_tag_policy.py +60 -40
  112. pulumi_databricks/get_views.py +20 -1
  113. pulumi_databricks/get_volume.py +18 -1
  114. pulumi_databricks/get_volumes.py +20 -1
  115. pulumi_databricks/get_workspace_network_option.py +8 -16
  116. pulumi_databricks/get_workspace_setting_v2.py +41 -163
  117. pulumi_databricks/get_zones.py +20 -1
  118. pulumi_databricks/git_credential.py +54 -7
  119. pulumi_databricks/group.py +21 -21
  120. pulumi_databricks/instance_profile.py +0 -182
  121. pulumi_databricks/job.py +47 -0
  122. pulumi_databricks/library.py +165 -0
  123. pulumi_databricks/materialized_features_feature_tag.py +9 -52
  124. pulumi_databricks/metastore.py +81 -7
  125. pulumi_databricks/metastore_data_access.py +48 -0
  126. pulumi_databricks/mlflow_webhook.py +4 -4
  127. pulumi_databricks/mws_credentials.py +10 -10
  128. pulumi_databricks/mws_customer_managed_keys.py +0 -288
  129. pulumi_databricks/mws_log_delivery.py +146 -0
  130. pulumi_databricks/mws_storage_configurations.py +16 -16
  131. pulumi_databricks/mws_vpc_endpoint.py +56 -56
  132. pulumi_databricks/mws_workspaces.py +146 -65
  133. pulumi_databricks/notebook.py +49 -0
  134. pulumi_databricks/online_store.py +9 -52
  135. pulumi_databricks/outputs.py +11885 -13474
  136. pulumi_databricks/permission_assignment.py +299 -8
  137. pulumi_databricks/permissions.py +6 -6
  138. pulumi_databricks/pipeline.py +37 -3
  139. pulumi_databricks/policy_info.py +9 -52
  140. pulumi_databricks/provider.py +36 -1
  141. pulumi_databricks/pulumi-plugin.json +1 -1
  142. pulumi_databricks/quality_monitor.py +47 -0
  143. pulumi_databricks/quality_monitor_v2.py +9 -52
  144. pulumi_databricks/recipient.py +74 -0
  145. pulumi_databricks/registered_model.py +308 -36
  146. pulumi_databricks/rfa_access_request_destinations.py +286 -0
  147. pulumi_databricks/schema.py +7 -7
  148. pulumi_databricks/service_principal_federation_policy.py +48 -16
  149. pulumi_databricks/share.py +71 -84
  150. pulumi_databricks/sql_table.py +42 -14
  151. pulumi_databricks/storage_credential.py +15 -2
  152. pulumi_databricks/tag_policy.py +111 -54
  153. pulumi_databricks/user.py +21 -21
  154. pulumi_databricks/volume.py +7 -7
  155. pulumi_databricks/workspace_binding.py +0 -48
  156. pulumi_databricks/workspace_network_option.py +6 -2
  157. pulumi_databricks/workspace_setting_v2.py +49 -133
  158. {pulumi_databricks-1.77.0a1760375482.dist-info → pulumi_databricks-1.79.0a1762839813.dist-info}/METADATA +1 -1
  159. pulumi_databricks-1.79.0a1762839813.dist-info/RECORD +250 -0
  160. pulumi_databricks/clean_room_asset.py +0 -938
  161. pulumi_databricks/clean_room_auto_approval_rule.py +0 -473
  162. pulumi_databricks/clean_rooms_clean_room.py +0 -569
  163. pulumi_databricks/get_clean_room_asset.py +0 -416
  164. pulumi_databricks/get_clean_room_asset_revisions_clean_room_asset.py +0 -392
  165. pulumi_databricks/get_clean_room_asset_revisions_clean_room_assets.py +0 -121
  166. pulumi_databricks/get_clean_room_assets.py +0 -146
  167. pulumi_databricks/get_clean_room_auto_approval_rule.py +0 -217
  168. pulumi_databricks/get_clean_room_auto_approval_rules.py +0 -101
  169. pulumi_databricks/get_clean_rooms_clean_room.py +0 -289
  170. pulumi_databricks/get_clean_rooms_clean_rooms.py +0 -125
  171. pulumi_databricks/get_recipient_federation_policies.py +0 -101
  172. pulumi_databricks/get_recipient_federation_policy.py +0 -182
  173. pulumi_databricks/recipient_federation_policy.py +0 -393
  174. pulumi_databricks-1.77.0a1760375482.dist-info/RECORD +0 -250
  175. {pulumi_databricks-1.77.0a1760375482.dist-info → pulumi_databricks-1.79.0a1762839813.dist-info}/WHEEL +0 -0
  176. {pulumi_databricks-1.77.0a1760375482.dist-info → pulumi_databricks-1.79.0a1762839813.dist-info}/top_level.txt +0 -0
@@ -254,56 +254,6 @@ class MwsCustomerManagedKeys(pulumi.CustomResource):
254
254
 
255
255
  You must configure this during workspace creation
256
256
 
257
- ### For AWS
258
-
259
- ```python
260
- import pulumi
261
- import pulumi_aws as aws
262
- import pulumi_databricks as databricks
263
-
264
- config = pulumi.Config()
265
- # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
266
- databricks_account_id = config.require_object("databricksAccountId")
267
- current = aws.get_caller_identity()
268
- databricks_managed_services_cmk = aws.iam.get_policy_document(version="2012-10-17",
269
- statements=[
270
- {
271
- "sid": "Enable IAM User Permissions",
272
- "effect": "Allow",
273
- "principals": [{
274
- "type": "AWS",
275
- "identifiers": [current.account_id],
276
- }],
277
- "actions": ["kms:*"],
278
- "resources": ["*"],
279
- },
280
- {
281
- "sid": "Allow Databricks to use KMS key for control plane managed services",
282
- "effect": "Allow",
283
- "principals": [{
284
- "type": "AWS",
285
- "identifiers": ["arn:aws:iam::414351767826:root"],
286
- }],
287
- "actions": [
288
- "kms:Encrypt",
289
- "kms:Decrypt",
290
- ],
291
- "resources": ["*"],
292
- },
293
- ])
294
- managed_services_customer_managed_key = aws.kms.Key("managed_services_customer_managed_key", policy=databricks_managed_services_cmk.json)
295
- managed_services_customer_managed_key_alias = aws.kms.Alias("managed_services_customer_managed_key_alias",
296
- name="alias/managed-services-customer-managed-key-alias",
297
- target_key_id=managed_services_customer_managed_key.key_id)
298
- managed_services = databricks.MwsCustomerManagedKeys("managed_services",
299
- account_id=databricks_account_id,
300
- aws_key_info={
301
- "key_arn": managed_services_customer_managed_key.arn,
302
- "key_alias": managed_services_customer_managed_key_alias.name,
303
- },
304
- use_cases=["MANAGED_SERVICES"])
305
- ```
306
-
307
257
  ### For GCP
308
258
 
309
259
  ```python
@@ -325,100 +275,6 @@ class MwsCustomerManagedKeys(pulumi.CustomResource):
325
275
 
326
276
  ### Customer-managed key for workspace storage
327
277
 
328
- ### For AWS
329
-
330
- ```python
331
- import pulumi
332
- import pulumi_aws as aws
333
- import pulumi_databricks as databricks
334
-
335
- config = pulumi.Config()
336
- # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
337
- databricks_account_id = config.require_object("databricksAccountId")
338
- # AWS ARN for the Databricks cross account role
339
- databricks_cross_account_role = config.require_object("databricksCrossAccountRole")
340
- current = aws.get_caller_identity()
341
- databricks_storage_cmk = aws.iam.get_policy_document(version="2012-10-17",
342
- statements=[
343
- {
344
- "sid": "Enable IAM User Permissions",
345
- "effect": "Allow",
346
- "principals": [{
347
- "type": "AWS",
348
- "identifiers": [current.account_id],
349
- }],
350
- "actions": ["kms:*"],
351
- "resources": ["*"],
352
- },
353
- {
354
- "sid": "Allow Databricks to use KMS key for DBFS",
355
- "effect": "Allow",
356
- "principals": [{
357
- "type": "AWS",
358
- "identifiers": ["arn:aws:iam::414351767826:root"],
359
- }],
360
- "actions": [
361
- "kms:Encrypt",
362
- "kms:Decrypt",
363
- "kms:ReEncrypt*",
364
- "kms:GenerateDataKey*",
365
- "kms:DescribeKey",
366
- ],
367
- "resources": ["*"],
368
- },
369
- {
370
- "sid": "Allow Databricks to use KMS key for DBFS (Grants)",
371
- "effect": "Allow",
372
- "principals": [{
373
- "type": "AWS",
374
- "identifiers": ["arn:aws:iam::414351767826:root"],
375
- }],
376
- "actions": [
377
- "kms:CreateGrant",
378
- "kms:ListGrants",
379
- "kms:RevokeGrant",
380
- ],
381
- "resources": ["*"],
382
- "conditions": [{
383
- "test": "Bool",
384
- "variable": "kms:GrantIsForAWSResource",
385
- "values": ["true"],
386
- }],
387
- },
388
- {
389
- "sid": "Allow Databricks to use KMS key for EBS",
390
- "effect": "Allow",
391
- "principals": [{
392
- "type": "AWS",
393
- "identifiers": [databricks_cross_account_role],
394
- }],
395
- "actions": [
396
- "kms:Decrypt",
397
- "kms:GenerateDataKey*",
398
- "kms:CreateGrant",
399
- "kms:DescribeKey",
400
- ],
401
- "resources": ["*"],
402
- "conditions": [{
403
- "test": "ForAnyValue:StringLike",
404
- "variable": "kms:ViaService",
405
- "values": ["ec2.*.amazonaws.com"],
406
- }],
407
- },
408
- ])
409
- storage_customer_managed_key = aws.kms.Key("storage_customer_managed_key", policy=databricks_storage_cmk.json)
410
- storage_customer_managed_key_alias = aws.kms.Alias("storage_customer_managed_key_alias",
411
- name="alias/storage-customer-managed-key-alias",
412
- target_key_id=storage_customer_managed_key.key_id)
413
- storage = databricks.MwsCustomerManagedKeys("storage",
414
- account_id=databricks_account_id,
415
- aws_key_info={
416
- "key_arn": storage_customer_managed_key.arn,
417
- "key_alias": storage_customer_managed_key_alias.name,
418
- },
419
- use_cases=["STORAGE"])
420
- ```
421
-
422
278
  ### For GCP
423
279
 
424
280
  ```python
@@ -501,56 +357,6 @@ class MwsCustomerManagedKeys(pulumi.CustomResource):
501
357
 
502
358
  You must configure this during workspace creation
503
359
 
504
- ### For AWS
505
-
506
- ```python
507
- import pulumi
508
- import pulumi_aws as aws
509
- import pulumi_databricks as databricks
510
-
511
- config = pulumi.Config()
512
- # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
513
- databricks_account_id = config.require_object("databricksAccountId")
514
- current = aws.get_caller_identity()
515
- databricks_managed_services_cmk = aws.iam.get_policy_document(version="2012-10-17",
516
- statements=[
517
- {
518
- "sid": "Enable IAM User Permissions",
519
- "effect": "Allow",
520
- "principals": [{
521
- "type": "AWS",
522
- "identifiers": [current.account_id],
523
- }],
524
- "actions": ["kms:*"],
525
- "resources": ["*"],
526
- },
527
- {
528
- "sid": "Allow Databricks to use KMS key for control plane managed services",
529
- "effect": "Allow",
530
- "principals": [{
531
- "type": "AWS",
532
- "identifiers": ["arn:aws:iam::414351767826:root"],
533
- }],
534
- "actions": [
535
- "kms:Encrypt",
536
- "kms:Decrypt",
537
- ],
538
- "resources": ["*"],
539
- },
540
- ])
541
- managed_services_customer_managed_key = aws.kms.Key("managed_services_customer_managed_key", policy=databricks_managed_services_cmk.json)
542
- managed_services_customer_managed_key_alias = aws.kms.Alias("managed_services_customer_managed_key_alias",
543
- name="alias/managed-services-customer-managed-key-alias",
544
- target_key_id=managed_services_customer_managed_key.key_id)
545
- managed_services = databricks.MwsCustomerManagedKeys("managed_services",
546
- account_id=databricks_account_id,
547
- aws_key_info={
548
- "key_arn": managed_services_customer_managed_key.arn,
549
- "key_alias": managed_services_customer_managed_key_alias.name,
550
- },
551
- use_cases=["MANAGED_SERVICES"])
552
- ```
553
-
554
360
  ### For GCP
555
361
 
556
362
  ```python
@@ -572,100 +378,6 @@ class MwsCustomerManagedKeys(pulumi.CustomResource):
572
378
 
573
379
  ### Customer-managed key for workspace storage
574
380
 
575
- ### For AWS
576
-
577
- ```python
578
- import pulumi
579
- import pulumi_aws as aws
580
- import pulumi_databricks as databricks
581
-
582
- config = pulumi.Config()
583
- # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
584
- databricks_account_id = config.require_object("databricksAccountId")
585
- # AWS ARN for the Databricks cross account role
586
- databricks_cross_account_role = config.require_object("databricksCrossAccountRole")
587
- current = aws.get_caller_identity()
588
- databricks_storage_cmk = aws.iam.get_policy_document(version="2012-10-17",
589
- statements=[
590
- {
591
- "sid": "Enable IAM User Permissions",
592
- "effect": "Allow",
593
- "principals": [{
594
- "type": "AWS",
595
- "identifiers": [current.account_id],
596
- }],
597
- "actions": ["kms:*"],
598
- "resources": ["*"],
599
- },
600
- {
601
- "sid": "Allow Databricks to use KMS key for DBFS",
602
- "effect": "Allow",
603
- "principals": [{
604
- "type": "AWS",
605
- "identifiers": ["arn:aws:iam::414351767826:root"],
606
- }],
607
- "actions": [
608
- "kms:Encrypt",
609
- "kms:Decrypt",
610
- "kms:ReEncrypt*",
611
- "kms:GenerateDataKey*",
612
- "kms:DescribeKey",
613
- ],
614
- "resources": ["*"],
615
- },
616
- {
617
- "sid": "Allow Databricks to use KMS key for DBFS (Grants)",
618
- "effect": "Allow",
619
- "principals": [{
620
- "type": "AWS",
621
- "identifiers": ["arn:aws:iam::414351767826:root"],
622
- }],
623
- "actions": [
624
- "kms:CreateGrant",
625
- "kms:ListGrants",
626
- "kms:RevokeGrant",
627
- ],
628
- "resources": ["*"],
629
- "conditions": [{
630
- "test": "Bool",
631
- "variable": "kms:GrantIsForAWSResource",
632
- "values": ["true"],
633
- }],
634
- },
635
- {
636
- "sid": "Allow Databricks to use KMS key for EBS",
637
- "effect": "Allow",
638
- "principals": [{
639
- "type": "AWS",
640
- "identifiers": [databricks_cross_account_role],
641
- }],
642
- "actions": [
643
- "kms:Decrypt",
644
- "kms:GenerateDataKey*",
645
- "kms:CreateGrant",
646
- "kms:DescribeKey",
647
- ],
648
- "resources": ["*"],
649
- "conditions": [{
650
- "test": "ForAnyValue:StringLike",
651
- "variable": "kms:ViaService",
652
- "values": ["ec2.*.amazonaws.com"],
653
- }],
654
- },
655
- ])
656
- storage_customer_managed_key = aws.kms.Key("storage_customer_managed_key", policy=databricks_storage_cmk.json)
657
- storage_customer_managed_key_alias = aws.kms.Alias("storage_customer_managed_key_alias",
658
- name="alias/storage-customer-managed-key-alias",
659
- target_key_id=storage_customer_managed_key.key_id)
660
- storage = databricks.MwsCustomerManagedKeys("storage",
661
- account_id=databricks_account_id,
662
- aws_key_info={
663
- "key_arn": storage_customer_managed_key.arn,
664
- "key_alias": storage_customer_managed_key_alias.name,
665
- },
666
- use_cases=["STORAGE"])
667
- ```
668
-
669
381
  ### For GCP
670
382
 
671
383
  ```python
@@ -404,6 +404,79 @@ class MwsLogDelivery(pulumi.CustomResource):
404
404
 
405
405
  You cannot delete a log delivery configuration, but you can disable it when you no longer need it. This fact is important because there is a limit to the number of enabled log delivery configurations that you can create for an account. You can create a maximum of two enabled configurations that use the account level (no workspace filter) and two enabled configurations for every specific workspace (a workspaceId can occur in the workspace filter for two configurations). You can re-enable a disabled configuration, but the request fails if it violates the limits previously described.
406
406
 
407
+ ## Example Usage
408
+
409
+ End-to-end example of usage and audit log delivery:
410
+
411
+ ```python
412
+ import pulumi
413
+ import pulumi_aws as aws
414
+ import pulumi_databricks as databricks
415
+ import pulumi_std as std
416
+ import pulumiverse_time as time
417
+
418
+ config = pulumi.Config()
419
+ # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
420
+ databricks_account_id = config.require_object("databricksAccountId")
421
+ logdelivery_s3_bucket = aws.index.S3Bucket("logdelivery",
422
+ bucket=f{prefix}-logdelivery,
423
+ acl=private,
424
+ force_destroy=True,
425
+ tags=std.merge(input=[
426
+ tags,
427
+ {
428
+ name: f{prefix}-logdelivery,
429
+ },
430
+ ]).result)
431
+ logdelivery_s3_bucket_public_access_block = aws.index.S3BucketPublicAccessBlock("logdelivery",
432
+ bucket=logdelivery_s3_bucket.id,
433
+ ignore_public_acls=True)
434
+ logdelivery = databricks.get_aws_assume_role_policy(external_id=databricks_account_id,
435
+ for_log_delivery=True)
436
+ logdelivery_versioning = aws.index.S3BucketVersioning("logdelivery_versioning",
437
+ bucket=logdelivery_s3_bucket.id,
438
+ versioning_configuration=[{
439
+ status: Disabled,
440
+ }])
441
+ logdelivery_iam_role = aws.index.IamRole("logdelivery",
442
+ name=f{prefix}-logdelivery,
443
+ description=f({prefix}) UsageDelivery role,
444
+ assume_role_policy=logdelivery.json,
445
+ tags=tags)
446
+ logdelivery_get_aws_bucket_policy = databricks.get_aws_bucket_policy(full_access_role=logdelivery_iam_role["arn"],
447
+ bucket=logdelivery_s3_bucket["bucket"])
448
+ logdelivery_s3_bucket_policy = aws.index.S3BucketPolicy("logdelivery",
449
+ bucket=logdelivery_s3_bucket.id,
450
+ policy=logdelivery_get_aws_bucket_policy.json)
451
+ wait = time.Sleep("wait", create_duration="10s",
452
+ opts = pulumi.ResourceOptions(depends_on=[logdelivery_iam_role]))
453
+ log_writer = databricks.MwsCredentials("log_writer",
454
+ account_id=databricks_account_id,
455
+ credentials_name="Usage Delivery",
456
+ role_arn=logdelivery_iam_role["arn"],
457
+ opts = pulumi.ResourceOptions(depends_on=[wait]))
458
+ log_bucket = databricks.MwsStorageConfigurations("log_bucket",
459
+ account_id=databricks_account_id,
460
+ storage_configuration_name="Usage Logs",
461
+ bucket_name=logdelivery_s3_bucket["bucket"])
462
+ usage_logs = databricks.MwsLogDelivery("usage_logs",
463
+ account_id=databricks_account_id,
464
+ credentials_id=log_writer.credentials_id,
465
+ storage_configuration_id=log_bucket.storage_configuration_id,
466
+ delivery_path_prefix="billable-usage",
467
+ config_name="Usage Logs",
468
+ log_type="BILLABLE_USAGE",
469
+ output_format="CSV")
470
+ audit_logs = databricks.MwsLogDelivery("audit_logs",
471
+ account_id=databricks_account_id,
472
+ credentials_id=log_writer.credentials_id,
473
+ storage_configuration_id=log_bucket.storage_configuration_id,
474
+ delivery_path_prefix="audit-logs",
475
+ config_name="Audit Logs",
476
+ log_type="AUDIT_LOGS",
477
+ output_format="JSON")
478
+ ```
479
+
407
480
  ## Billable Usage
408
481
 
409
482
  CSV files are delivered to `<delivery_path_prefix>/billable-usage/csv/` and are named `workspaceId=<workspace-id>-usageMonth=<month>.csv`, which are delivered daily by overwriting the month's CSV file for each workspace. Format of CSV file, as well as some usage examples, can be found [here](https://docs.databricks.com/administration-guide/account-settings/usage.html#download-usage-as-a-csv-file).
@@ -484,6 +557,79 @@ class MwsLogDelivery(pulumi.CustomResource):
484
557
 
485
558
  You cannot delete a log delivery configuration, but you can disable it when you no longer need it. This fact is important because there is a limit to the number of enabled log delivery configurations that you can create for an account. You can create a maximum of two enabled configurations that use the account level (no workspace filter) and two enabled configurations for every specific workspace (a workspaceId can occur in the workspace filter for two configurations). You can re-enable a disabled configuration, but the request fails if it violates the limits previously described.
486
559
 
560
+ ## Example Usage
561
+
562
+ End-to-end example of usage and audit log delivery:
563
+
564
+ ```python
565
+ import pulumi
566
+ import pulumi_aws as aws
567
+ import pulumi_databricks as databricks
568
+ import pulumi_std as std
569
+ import pulumiverse_time as time
570
+
571
+ config = pulumi.Config()
572
+ # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
573
+ databricks_account_id = config.require_object("databricksAccountId")
574
+ logdelivery_s3_bucket = aws.index.S3Bucket("logdelivery",
575
+ bucket=f{prefix}-logdelivery,
576
+ acl=private,
577
+ force_destroy=True,
578
+ tags=std.merge(input=[
579
+ tags,
580
+ {
581
+ name: f{prefix}-logdelivery,
582
+ },
583
+ ]).result)
584
+ logdelivery_s3_bucket_public_access_block = aws.index.S3BucketPublicAccessBlock("logdelivery",
585
+ bucket=logdelivery_s3_bucket.id,
586
+ ignore_public_acls=True)
587
+ logdelivery = databricks.get_aws_assume_role_policy(external_id=databricks_account_id,
588
+ for_log_delivery=True)
589
+ logdelivery_versioning = aws.index.S3BucketVersioning("logdelivery_versioning",
590
+ bucket=logdelivery_s3_bucket.id,
591
+ versioning_configuration=[{
592
+ status: Disabled,
593
+ }])
594
+ logdelivery_iam_role = aws.index.IamRole("logdelivery",
595
+ name=f{prefix}-logdelivery,
596
+ description=f({prefix}) UsageDelivery role,
597
+ assume_role_policy=logdelivery.json,
598
+ tags=tags)
599
+ logdelivery_get_aws_bucket_policy = databricks.get_aws_bucket_policy(full_access_role=logdelivery_iam_role["arn"],
600
+ bucket=logdelivery_s3_bucket["bucket"])
601
+ logdelivery_s3_bucket_policy = aws.index.S3BucketPolicy("logdelivery",
602
+ bucket=logdelivery_s3_bucket.id,
603
+ policy=logdelivery_get_aws_bucket_policy.json)
604
+ wait = time.Sleep("wait", create_duration="10s",
605
+ opts = pulumi.ResourceOptions(depends_on=[logdelivery_iam_role]))
606
+ log_writer = databricks.MwsCredentials("log_writer",
607
+ account_id=databricks_account_id,
608
+ credentials_name="Usage Delivery",
609
+ role_arn=logdelivery_iam_role["arn"],
610
+ opts = pulumi.ResourceOptions(depends_on=[wait]))
611
+ log_bucket = databricks.MwsStorageConfigurations("log_bucket",
612
+ account_id=databricks_account_id,
613
+ storage_configuration_name="Usage Logs",
614
+ bucket_name=logdelivery_s3_bucket["bucket"])
615
+ usage_logs = databricks.MwsLogDelivery("usage_logs",
616
+ account_id=databricks_account_id,
617
+ credentials_id=log_writer.credentials_id,
618
+ storage_configuration_id=log_bucket.storage_configuration_id,
619
+ delivery_path_prefix="billable-usage",
620
+ config_name="Usage Logs",
621
+ log_type="BILLABLE_USAGE",
622
+ output_format="CSV")
623
+ audit_logs = databricks.MwsLogDelivery("audit_logs",
624
+ account_id=databricks_account_id,
625
+ credentials_id=log_writer.credentials_id,
626
+ storage_configuration_id=log_bucket.storage_configuration_id,
627
+ delivery_path_prefix="audit-logs",
628
+ config_name="Audit Logs",
629
+ log_type="AUDIT_LOGS",
630
+ output_format="JSON")
631
+ ```
632
+
487
633
  ## Billable Usage
488
634
 
489
635
  CSV files are delivered to `<delivery_path_prefix>/billable-usage/csv/` and are named `workspaceId=<workspace-id>-usageMonth=<month>.csv`, which are delivered daily by overwriting the month's CSV file for each workspace. Format of CSV file, as well as some usage examples, can be found [here](https://docs.databricks.com/administration-guide/account-settings/usage.html#download-usage-as-a-csv-file).
@@ -174,18 +174,18 @@ class MwsStorageConfigurations(pulumi.CustomResource):
174
174
  config = pulumi.Config()
175
175
  # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
176
176
  databricks_account_id = config.require_object("databricksAccountId")
177
- root_storage_bucket = aws.s3.BucketV2("root_storage_bucket",
178
- bucket=f"{prefix}-rootbucket",
179
- acl="private")
180
- root_versioning = aws.s3.BucketVersioningV2("root_versioning",
177
+ root_storage_bucket = aws.index.S3Bucket("root_storage_bucket",
178
+ bucket=f{prefix}-rootbucket,
179
+ acl=private)
180
+ root_versioning = aws.index.S3BucketVersioning("root_versioning",
181
181
  bucket=root_storage_bucket.id,
182
- versioning_configuration={
183
- "status": "Disabled",
184
- })
182
+ versioning_configuration=[{
183
+ status: Disabled,
184
+ }])
185
185
  this = databricks.MwsStorageConfigurations("this",
186
186
  account_id=databricks_account_id,
187
187
  storage_configuration_name=f"{prefix}-storage",
188
- bucket_name=root_storage_bucket.bucket)
188
+ bucket_name=root_storage_bucket["bucket"])
189
189
  ```
190
190
 
191
191
  ## Related Resources
@@ -251,18 +251,18 @@ class MwsStorageConfigurations(pulumi.CustomResource):
251
251
  config = pulumi.Config()
252
252
  # Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
253
253
  databricks_account_id = config.require_object("databricksAccountId")
254
- root_storage_bucket = aws.s3.BucketV2("root_storage_bucket",
255
- bucket=f"{prefix}-rootbucket",
256
- acl="private")
257
- root_versioning = aws.s3.BucketVersioningV2("root_versioning",
254
+ root_storage_bucket = aws.index.S3Bucket("root_storage_bucket",
255
+ bucket=f{prefix}-rootbucket,
256
+ acl=private)
257
+ root_versioning = aws.index.S3BucketVersioning("root_versioning",
258
258
  bucket=root_storage_bucket.id,
259
- versioning_configuration={
260
- "status": "Disabled",
261
- })
259
+ versioning_configuration=[{
260
+ status: Disabled,
261
+ }])
262
262
  this = databricks.MwsStorageConfigurations("this",
263
263
  account_id=databricks_account_id,
264
264
  storage_configuration_name=f"{prefix}-storage",
265
- bucket_name=root_storage_bucket.bucket)
265
+ bucket_name=root_storage_bucket["bucket"])
266
266
  ```
267
267
 
268
268
  ## Related Resources