databricks-sdk 0.56.0__py3-none-any.whl → 0.57.0__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.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

Files changed (31) hide show
  1. databricks/sdk/__init__.py +15 -9
  2. databricks/sdk/service/aibuilder.py +157 -16
  3. databricks/sdk/service/apps.py +14 -42
  4. databricks/sdk/service/billing.py +17 -51
  5. databricks/sdk/service/catalog.py +198 -399
  6. databricks/sdk/service/cleanrooms.py +11 -33
  7. databricks/sdk/service/compute.py +63 -189
  8. databricks/sdk/service/dashboards.py +21 -63
  9. databricks/sdk/service/database.py +45 -30
  10. databricks/sdk/service/files.py +18 -54
  11. databricks/sdk/service/iam.py +55 -165
  12. databricks/sdk/service/jobs.py +232 -85
  13. databricks/sdk/service/marketplace.py +46 -146
  14. databricks/sdk/service/ml.py +455 -216
  15. databricks/sdk/service/oauth2.py +17 -45
  16. databricks/sdk/service/pipelines.py +81 -40
  17. databricks/sdk/service/provisioning.py +30 -90
  18. databricks/sdk/service/qualitymonitorv2.py +5 -15
  19. databricks/sdk/service/serving.py +30 -42
  20. databricks/sdk/service/settings.py +103 -314
  21. databricks/sdk/service/sharing.py +30 -86
  22. databricks/sdk/service/sql.py +74 -184
  23. databricks/sdk/service/vectorsearch.py +13 -43
  24. databricks/sdk/service/workspace.py +35 -105
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/METADATA +1 -1
  27. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/RECORD +31 -31
  28. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/WHEEL +0 -0
  29. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/LICENSE +0 -0
  30. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/NOTICE +0 -0
  31. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/top_level.txt +0 -0
@@ -1399,7 +1399,8 @@ class DashboardTaskOutput:
1399
1399
 
1400
1400
  @dataclass
1401
1401
  class DbtCloudJobRunStep:
1402
- """Format of response retrieved from dbt Cloud, for inclusion in output"""
1402
+ """Format of response retrieved from dbt Cloud, for inclusion in output Deprecated in favor of
1403
+ DbtPlatformJobRunStep"""
1403
1404
 
1404
1405
  index: Optional[int] = None
1405
1406
  """Orders the steps in the job"""
@@ -1410,7 +1411,7 @@ class DbtCloudJobRunStep:
1410
1411
  name: Optional[str] = None
1411
1412
  """Name of the step in the job"""
1412
1413
 
1413
- status: Optional[DbtCloudRunStatus] = None
1414
+ status: Optional[DbtPlatformRunStatus] = None
1414
1415
  """State of the step"""
1415
1416
 
1416
1417
  def as_dict(self) -> dict:
@@ -1446,23 +1447,14 @@ class DbtCloudJobRunStep:
1446
1447
  index=d.get("index", None),
1447
1448
  logs=d.get("logs", None),
1448
1449
  name=d.get("name", None),
1449
- status=_enum(d, "status", DbtCloudRunStatus),
1450
+ status=_enum(d, "status", DbtPlatformRunStatus),
1450
1451
  )
1451
1452
 
1452
1453
 
1453
- class DbtCloudRunStatus(Enum):
1454
- """Response enumeration from calling the dbt Cloud API, for inclusion in output"""
1455
-
1456
- CANCELLED = "CANCELLED"
1457
- ERROR = "ERROR"
1458
- QUEUED = "QUEUED"
1459
- RUNNING = "RUNNING"
1460
- STARTING = "STARTING"
1461
- SUCCESS = "SUCCESS"
1462
-
1463
-
1464
1454
  @dataclass
1465
1455
  class DbtCloudTask:
1456
+ """Deprecated in favor of DbtPlatformTask"""
1457
+
1466
1458
  connection_resource_name: Optional[str] = None
1467
1459
  """The resource name of the UC connection that authenticates the dbt Cloud for this task"""
1468
1460
 
@@ -1498,6 +1490,8 @@ class DbtCloudTask:
1498
1490
 
1499
1491
  @dataclass
1500
1492
  class DbtCloudTaskOutput:
1493
+ """Deprecated in favor of DbtPlatformTaskOutput"""
1494
+
1501
1495
  dbt_cloud_job_run_id: Optional[int] = None
1502
1496
  """Id of the job run in dbt Cloud"""
1503
1497
 
@@ -1572,6 +1566,176 @@ class DbtOutput:
1572
1566
  return cls(artifacts_headers=d.get("artifacts_headers", None), artifacts_link=d.get("artifacts_link", None))
1573
1567
 
1574
1568
 
1569
+ @dataclass
1570
+ class DbtPlatformJobRunStep:
1571
+ """Format of response retrieved from dbt platform, for inclusion in output"""
1572
+
1573
+ index: Optional[int] = None
1574
+ """Orders the steps in the job"""
1575
+
1576
+ logs: Optional[str] = None
1577
+ """Output of the step"""
1578
+
1579
+ logs_truncated: Optional[bool] = None
1580
+ """Whether the logs of this step have been truncated. If true, the logs has been truncated to 10000
1581
+ characters."""
1582
+
1583
+ name: Optional[str] = None
1584
+ """Name of the step in the job"""
1585
+
1586
+ name_truncated: Optional[bool] = None
1587
+ """Whether the name of the job has been truncated. If true, the name has been truncated to 100
1588
+ characters."""
1589
+
1590
+ status: Optional[DbtPlatformRunStatus] = None
1591
+ """State of the step"""
1592
+
1593
+ def as_dict(self) -> dict:
1594
+ """Serializes the DbtPlatformJobRunStep into a dictionary suitable for use as a JSON request body."""
1595
+ body = {}
1596
+ if self.index is not None:
1597
+ body["index"] = self.index
1598
+ if self.logs is not None:
1599
+ body["logs"] = self.logs
1600
+ if self.logs_truncated is not None:
1601
+ body["logs_truncated"] = self.logs_truncated
1602
+ if self.name is not None:
1603
+ body["name"] = self.name
1604
+ if self.name_truncated is not None:
1605
+ body["name_truncated"] = self.name_truncated
1606
+ if self.status is not None:
1607
+ body["status"] = self.status.value
1608
+ return body
1609
+
1610
+ def as_shallow_dict(self) -> dict:
1611
+ """Serializes the DbtPlatformJobRunStep into a shallow dictionary of its immediate attributes."""
1612
+ body = {}
1613
+ if self.index is not None:
1614
+ body["index"] = self.index
1615
+ if self.logs is not None:
1616
+ body["logs"] = self.logs
1617
+ if self.logs_truncated is not None:
1618
+ body["logs_truncated"] = self.logs_truncated
1619
+ if self.name is not None:
1620
+ body["name"] = self.name
1621
+ if self.name_truncated is not None:
1622
+ body["name_truncated"] = self.name_truncated
1623
+ if self.status is not None:
1624
+ body["status"] = self.status
1625
+ return body
1626
+
1627
+ @classmethod
1628
+ def from_dict(cls, d: Dict[str, Any]) -> DbtPlatformJobRunStep:
1629
+ """Deserializes the DbtPlatformJobRunStep from a dictionary."""
1630
+ return cls(
1631
+ index=d.get("index", None),
1632
+ logs=d.get("logs", None),
1633
+ logs_truncated=d.get("logs_truncated", None),
1634
+ name=d.get("name", None),
1635
+ name_truncated=d.get("name_truncated", None),
1636
+ status=_enum(d, "status", DbtPlatformRunStatus),
1637
+ )
1638
+
1639
+
1640
+ class DbtPlatformRunStatus(Enum):
1641
+ """Response enumeration from calling the dbt platform API, for inclusion in output"""
1642
+
1643
+ CANCELLED = "CANCELLED"
1644
+ ERROR = "ERROR"
1645
+ QUEUED = "QUEUED"
1646
+ RUNNING = "RUNNING"
1647
+ STARTING = "STARTING"
1648
+ SUCCESS = "SUCCESS"
1649
+
1650
+
1651
+ @dataclass
1652
+ class DbtPlatformTask:
1653
+ connection_resource_name: Optional[str] = None
1654
+ """The resource name of the UC connection that authenticates the dbt platform for this task"""
1655
+
1656
+ dbt_platform_job_id: Optional[str] = None
1657
+ """Id of the dbt platform job to be triggered. Specified as a string for maximum compatibility with
1658
+ clients."""
1659
+
1660
+ def as_dict(self) -> dict:
1661
+ """Serializes the DbtPlatformTask into a dictionary suitable for use as a JSON request body."""
1662
+ body = {}
1663
+ if self.connection_resource_name is not None:
1664
+ body["connection_resource_name"] = self.connection_resource_name
1665
+ if self.dbt_platform_job_id is not None:
1666
+ body["dbt_platform_job_id"] = self.dbt_platform_job_id
1667
+ return body
1668
+
1669
+ def as_shallow_dict(self) -> dict:
1670
+ """Serializes the DbtPlatformTask into a shallow dictionary of its immediate attributes."""
1671
+ body = {}
1672
+ if self.connection_resource_name is not None:
1673
+ body["connection_resource_name"] = self.connection_resource_name
1674
+ if self.dbt_platform_job_id is not None:
1675
+ body["dbt_platform_job_id"] = self.dbt_platform_job_id
1676
+ return body
1677
+
1678
+ @classmethod
1679
+ def from_dict(cls, d: Dict[str, Any]) -> DbtPlatformTask:
1680
+ """Deserializes the DbtPlatformTask from a dictionary."""
1681
+ return cls(
1682
+ connection_resource_name=d.get("connection_resource_name", None),
1683
+ dbt_platform_job_id=d.get("dbt_platform_job_id", None),
1684
+ )
1685
+
1686
+
1687
+ @dataclass
1688
+ class DbtPlatformTaskOutput:
1689
+ dbt_platform_job_run_id: Optional[str] = None
1690
+ """Id of the job run in dbt platform. Specified as a string for maximum compatibility with clients."""
1691
+
1692
+ dbt_platform_job_run_output: Optional[List[DbtPlatformJobRunStep]] = None
1693
+ """Steps of the job run as received from dbt platform"""
1694
+
1695
+ dbt_platform_job_run_url: Optional[str] = None
1696
+ """Url where full run details can be viewed"""
1697
+
1698
+ steps_truncated: Optional[bool] = None
1699
+ """Whether the number of steps in the output has been truncated. If true, the output will contain
1700
+ the first 20 steps of the output."""
1701
+
1702
+ def as_dict(self) -> dict:
1703
+ """Serializes the DbtPlatformTaskOutput into a dictionary suitable for use as a JSON request body."""
1704
+ body = {}
1705
+ if self.dbt_platform_job_run_id is not None:
1706
+ body["dbt_platform_job_run_id"] = self.dbt_platform_job_run_id
1707
+ if self.dbt_platform_job_run_output:
1708
+ body["dbt_platform_job_run_output"] = [v.as_dict() for v in self.dbt_platform_job_run_output]
1709
+ if self.dbt_platform_job_run_url is not None:
1710
+ body["dbt_platform_job_run_url"] = self.dbt_platform_job_run_url
1711
+ if self.steps_truncated is not None:
1712
+ body["steps_truncated"] = self.steps_truncated
1713
+ return body
1714
+
1715
+ def as_shallow_dict(self) -> dict:
1716
+ """Serializes the DbtPlatformTaskOutput into a shallow dictionary of its immediate attributes."""
1717
+ body = {}
1718
+ if self.dbt_platform_job_run_id is not None:
1719
+ body["dbt_platform_job_run_id"] = self.dbt_platform_job_run_id
1720
+ if self.dbt_platform_job_run_output:
1721
+ body["dbt_platform_job_run_output"] = self.dbt_platform_job_run_output
1722
+ if self.dbt_platform_job_run_url is not None:
1723
+ body["dbt_platform_job_run_url"] = self.dbt_platform_job_run_url
1724
+ if self.steps_truncated is not None:
1725
+ body["steps_truncated"] = self.steps_truncated
1726
+ return body
1727
+
1728
+ @classmethod
1729
+ def from_dict(cls, d: Dict[str, Any]) -> DbtPlatformTaskOutput:
1730
+ """Deserializes the DbtPlatformTaskOutput from a dictionary."""
1731
+ return cls(
1732
+ dbt_platform_job_run_id=d.get("dbt_platform_job_run_id", None),
1733
+ dbt_platform_job_run_output=_repeated_dict(d, "dbt_platform_job_run_output", DbtPlatformJobRunStep),
1734
+ dbt_platform_job_run_url=d.get("dbt_platform_job_run_url", None),
1735
+ steps_truncated=d.get("steps_truncated", None),
1736
+ )
1737
+
1738
+
1575
1739
  @dataclass
1576
1740
  class DbtTask:
1577
1741
  commands: List[str]
@@ -5955,10 +6119,13 @@ class RunOutput:
5955
6119
  """The output of a dashboard task, if available"""
5956
6120
 
5957
6121
  dbt_cloud_output: Optional[DbtCloudTaskOutput] = None
6122
+ """Deprecated in favor of the new dbt_platform_output"""
5958
6123
 
5959
6124
  dbt_output: Optional[DbtOutput] = None
5960
6125
  """The output of a dbt task, if available."""
5961
6126
 
6127
+ dbt_platform_output: Optional[DbtPlatformTaskOutput] = None
6128
+
5962
6129
  error: Optional[str] = None
5963
6130
  """An error message indicating why a task failed or why output is not available. The message is
5964
6131
  unstructured, and its exact format is subject to change."""
@@ -6008,6 +6175,8 @@ class RunOutput:
6008
6175
  body["dbt_cloud_output"] = self.dbt_cloud_output.as_dict()
6009
6176
  if self.dbt_output:
6010
6177
  body["dbt_output"] = self.dbt_output.as_dict()
6178
+ if self.dbt_platform_output:
6179
+ body["dbt_platform_output"] = self.dbt_platform_output.as_dict()
6011
6180
  if self.error is not None:
6012
6181
  body["error"] = self.error
6013
6182
  if self.error_trace is not None:
@@ -6039,6 +6208,8 @@ class RunOutput:
6039
6208
  body["dbt_cloud_output"] = self.dbt_cloud_output
6040
6209
  if self.dbt_output:
6041
6210
  body["dbt_output"] = self.dbt_output
6211
+ if self.dbt_platform_output:
6212
+ body["dbt_platform_output"] = self.dbt_platform_output
6042
6213
  if self.error is not None:
6043
6214
  body["error"] = self.error
6044
6215
  if self.error_trace is not None:
@@ -6069,6 +6240,7 @@ class RunOutput:
6069
6240
  dashboard_output=_from_dict(d, "dashboard_output", DashboardTaskOutput),
6070
6241
  dbt_cloud_output=_from_dict(d, "dbt_cloud_output", DbtCloudTaskOutput),
6071
6242
  dbt_output=_from_dict(d, "dbt_output", DbtOutput),
6243
+ dbt_platform_output=_from_dict(d, "dbt_platform_output", DbtPlatformTaskOutput),
6072
6244
  error=d.get("error", None),
6073
6245
  error_trace=d.get("error_trace", None),
6074
6246
  info=d.get("info", None),
@@ -6388,7 +6560,9 @@ class RunTask:
6388
6560
  """The task refreshes a dashboard and sends a snapshot to subscribers."""
6389
6561
 
6390
6562
  dbt_cloud_task: Optional[DbtCloudTask] = None
6391
- """Task type for dbt cloud"""
6563
+ """Task type for dbt cloud, deprecated in favor of the new name dbt_platform_task"""
6564
+
6565
+ dbt_platform_task: Optional[DbtPlatformTask] = None
6392
6566
 
6393
6567
  dbt_task: Optional[DbtTask] = None
6394
6568
  """The task runs one or more dbt commands when the `dbt_task` field is present. The dbt task
@@ -6572,6 +6746,8 @@ class RunTask:
6572
6746
  body["dashboard_task"] = self.dashboard_task.as_dict()
6573
6747
  if self.dbt_cloud_task:
6574
6748
  body["dbt_cloud_task"] = self.dbt_cloud_task.as_dict()
6749
+ if self.dbt_platform_task:
6750
+ body["dbt_platform_task"] = self.dbt_platform_task.as_dict()
6575
6751
  if self.dbt_task:
6576
6752
  body["dbt_task"] = self.dbt_task.as_dict()
6577
6753
  if self.depends_on:
@@ -6669,6 +6845,8 @@ class RunTask:
6669
6845
  body["dashboard_task"] = self.dashboard_task
6670
6846
  if self.dbt_cloud_task:
6671
6847
  body["dbt_cloud_task"] = self.dbt_cloud_task
6848
+ if self.dbt_platform_task:
6849
+ body["dbt_platform_task"] = self.dbt_platform_task
6672
6850
  if self.dbt_task:
6673
6851
  body["dbt_task"] = self.dbt_task
6674
6852
  if self.depends_on:
@@ -6760,6 +6938,7 @@ class RunTask:
6760
6938
  condition_task=_from_dict(d, "condition_task", RunConditionTask),
6761
6939
  dashboard_task=_from_dict(d, "dashboard_task", DashboardTask),
6762
6940
  dbt_cloud_task=_from_dict(d, "dbt_cloud_task", DbtCloudTask),
6941
+ dbt_platform_task=_from_dict(d, "dbt_platform_task", DbtPlatformTask),
6763
6942
  dbt_task=_from_dict(d, "dbt_task", DbtTask),
6764
6943
  depends_on=_repeated_dict(d, "depends_on", TaskDependency),
6765
6944
  description=d.get("description", None),
@@ -7784,7 +7963,9 @@ class SubmitTask:
7784
7963
  """The task refreshes a dashboard and sends a snapshot to subscribers."""
7785
7964
 
7786
7965
  dbt_cloud_task: Optional[DbtCloudTask] = None
7787
- """Task type for dbt cloud"""
7966
+ """Task type for dbt cloud, deprecated in favor of the new name dbt_platform_task"""
7967
+
7968
+ dbt_platform_task: Optional[DbtPlatformTask] = None
7788
7969
 
7789
7970
  dbt_task: Optional[DbtTask] = None
7790
7971
  """The task runs one or more dbt commands when the `dbt_task` field is present. The dbt task
@@ -7898,6 +8079,8 @@ class SubmitTask:
7898
8079
  body["dashboard_task"] = self.dashboard_task.as_dict()
7899
8080
  if self.dbt_cloud_task:
7900
8081
  body["dbt_cloud_task"] = self.dbt_cloud_task.as_dict()
8082
+ if self.dbt_platform_task:
8083
+ body["dbt_platform_task"] = self.dbt_platform_task.as_dict()
7901
8084
  if self.dbt_task:
7902
8085
  body["dbt_task"] = self.dbt_task.as_dict()
7903
8086
  if self.depends_on:
@@ -7961,6 +8144,8 @@ class SubmitTask:
7961
8144
  body["dashboard_task"] = self.dashboard_task
7962
8145
  if self.dbt_cloud_task:
7963
8146
  body["dbt_cloud_task"] = self.dbt_cloud_task
8147
+ if self.dbt_platform_task:
8148
+ body["dbt_platform_task"] = self.dbt_platform_task
7964
8149
  if self.dbt_task:
7965
8150
  body["dbt_task"] = self.dbt_task
7966
8151
  if self.depends_on:
@@ -8021,6 +8206,7 @@ class SubmitTask:
8021
8206
  condition_task=_from_dict(d, "condition_task", ConditionTask),
8022
8207
  dashboard_task=_from_dict(d, "dashboard_task", DashboardTask),
8023
8208
  dbt_cloud_task=_from_dict(d, "dbt_cloud_task", DbtCloudTask),
8209
+ dbt_platform_task=_from_dict(d, "dbt_platform_task", DbtPlatformTask),
8024
8210
  dbt_task=_from_dict(d, "dbt_task", DbtTask),
8025
8211
  depends_on=_repeated_dict(d, "depends_on", TaskDependency),
8026
8212
  description=d.get("description", None),
@@ -8202,7 +8388,9 @@ class Task:
8202
8388
  """The task refreshes a dashboard and sends a snapshot to subscribers."""
8203
8389
 
8204
8390
  dbt_cloud_task: Optional[DbtCloudTask] = None
8205
- """Task type for dbt cloud"""
8391
+ """Task type for dbt cloud, deprecated in favor of the new name dbt_platform_task"""
8392
+
8393
+ dbt_platform_task: Optional[DbtPlatformTask] = None
8206
8394
 
8207
8395
  dbt_task: Optional[DbtTask] = None
8208
8396
  """The task runs one or more dbt commands when the `dbt_task` field is present. The dbt task
@@ -8341,6 +8529,8 @@ class Task:
8341
8529
  body["dashboard_task"] = self.dashboard_task.as_dict()
8342
8530
  if self.dbt_cloud_task:
8343
8531
  body["dbt_cloud_task"] = self.dbt_cloud_task.as_dict()
8532
+ if self.dbt_platform_task:
8533
+ body["dbt_platform_task"] = self.dbt_platform_task.as_dict()
8344
8534
  if self.dbt_task:
8345
8535
  body["dbt_task"] = self.dbt_task.as_dict()
8346
8536
  if self.depends_on:
@@ -8414,6 +8604,8 @@ class Task:
8414
8604
  body["dashboard_task"] = self.dashboard_task
8415
8605
  if self.dbt_cloud_task:
8416
8606
  body["dbt_cloud_task"] = self.dbt_cloud_task
8607
+ if self.dbt_platform_task:
8608
+ body["dbt_platform_task"] = self.dbt_platform_task
8417
8609
  if self.dbt_task:
8418
8610
  body["dbt_task"] = self.dbt_task
8419
8611
  if self.depends_on:
@@ -8484,6 +8676,7 @@ class Task:
8484
8676
  condition_task=_from_dict(d, "condition_task", ConditionTask),
8485
8677
  dashboard_task=_from_dict(d, "dashboard_task", DashboardTask),
8486
8678
  dbt_cloud_task=_from_dict(d, "dbt_cloud_task", DbtCloudTask),
8679
+ dbt_platform_task=_from_dict(d, "dbt_platform_task", DbtPlatformTask),
8487
8680
  dbt_task=_from_dict(d, "dbt_task", DbtTask),
8488
8681
  depends_on=_repeated_dict(d, "depends_on", TaskDependency),
8489
8682
  description=d.get("description", None),
@@ -9274,9 +9467,7 @@ class JobsAPI:
9274
9467
  raise TimeoutError(f"timed out after {timeout}: {status_message}")
9275
9468
 
9276
9469
  def cancel_all_runs(self, *, all_queued_runs: Optional[bool] = None, job_id: Optional[int] = None):
9277
- """Cancel all runs of a job.
9278
-
9279
- Cancels all active runs of a job. The runs are canceled asynchronously, so it doesn't prevent new runs
9470
+ """Cancels all active runs of a job. The runs are canceled asynchronously, so it doesn't prevent new runs
9280
9471
  from being started.
9281
9472
 
9282
9473
  :param all_queued_runs: bool (optional)
@@ -9299,9 +9490,7 @@ class JobsAPI:
9299
9490
  self._api.do("POST", "/api/2.2/jobs/runs/cancel-all", body=body, headers=headers)
9300
9491
 
9301
9492
  def cancel_run(self, run_id: int) -> Wait[Run]:
9302
- """Cancel a run.
9303
-
9304
- Cancels a job run or a task run. The run is canceled asynchronously, so it may still be running when
9493
+ """Cancels a job run or a task run. The run is canceled asynchronously, so it may still be running when
9305
9494
  this request completes.
9306
9495
 
9307
9496
  :param run_id: int
@@ -9359,8 +9548,6 @@ class JobsAPI:
9359
9548
  ) -> CreateResponse:
9360
9549
  """Create a new job.
9361
9550
 
9362
- Create a new job.
9363
-
9364
9551
  :param access_control_list: List[:class:`JobAccessControlRequest`] (optional)
9365
9552
  List of permissions to set on the job.
9366
9553
  :param budget_policy_id: str (optional)
@@ -9518,9 +9705,7 @@ class JobsAPI:
9518
9705
  return CreateResponse.from_dict(res)
9519
9706
 
9520
9707
  def delete(self, job_id: int):
9521
- """Delete a job.
9522
-
9523
- Deletes a job.
9708
+ """Deletes a job.
9524
9709
 
9525
9710
  :param job_id: int
9526
9711
  The canonical identifier of the job to delete. This field is required.
@@ -9537,9 +9722,7 @@ class JobsAPI:
9537
9722
  self._api.do("POST", "/api/2.2/jobs/delete", body=body, headers=headers)
9538
9723
 
9539
9724
  def delete_run(self, run_id: int):
9540
- """Delete a job run.
9541
-
9542
- Deletes a non-active run. Returns an error if the run is active.
9725
+ """Deletes a non-active run. Returns an error if the run is active.
9543
9726
 
9544
9727
  :param run_id: int
9545
9728
  ID of the run to delete.
@@ -9556,9 +9739,7 @@ class JobsAPI:
9556
9739
  self._api.do("POST", "/api/2.2/jobs/runs/delete", body=body, headers=headers)
9557
9740
 
9558
9741
  def export_run(self, run_id: int, *, views_to_export: Optional[ViewsToExport] = None) -> ExportRunOutput:
9559
- """Export and retrieve a job run.
9560
-
9561
- Export and retrieve the job run task.
9742
+ """Export and retrieve the job run task.
9562
9743
 
9563
9744
  :param run_id: int
9564
9745
  The canonical identifier for the run. This field is required.
@@ -9581,9 +9762,7 @@ class JobsAPI:
9581
9762
  return ExportRunOutput.from_dict(res)
9582
9763
 
9583
9764
  def get(self, job_id: int, *, page_token: Optional[str] = None) -> Job:
9584
- """Get a single job.
9585
-
9586
- Retrieves the details for a single job.
9765
+ """Retrieves the details for a single job.
9587
9766
 
9588
9767
  Large arrays in the results will be paginated when they exceed 100 elements. A request for a single
9589
9768
  job will return all properties for that job, and the first 100 elements of array properties (`tasks`,
@@ -9614,9 +9793,7 @@ class JobsAPI:
9614
9793
  return Job.from_dict(res)
9615
9794
 
9616
9795
  def get_permission_levels(self, job_id: str) -> GetJobPermissionLevelsResponse:
9617
- """Get job permission levels.
9618
-
9619
- Gets the permission levels that a user can have on an object.
9796
+ """Gets the permission levels that a user can have on an object.
9620
9797
 
9621
9798
  :param job_id: str
9622
9799
  The job for which to get or manage permissions.
@@ -9632,9 +9809,7 @@ class JobsAPI:
9632
9809
  return GetJobPermissionLevelsResponse.from_dict(res)
9633
9810
 
9634
9811
  def get_permissions(self, job_id: str) -> JobPermissions:
9635
- """Get job permissions.
9636
-
9637
- Gets the permissions of a job. Jobs can inherit permissions from their root object.
9812
+ """Gets the permissions of a job. Jobs can inherit permissions from their root object.
9638
9813
 
9639
9814
  :param job_id: str
9640
9815
  The job for which to get or manage permissions.
@@ -9657,9 +9832,7 @@ class JobsAPI:
9657
9832
  include_resolved_values: Optional[bool] = None,
9658
9833
  page_token: Optional[str] = None,
9659
9834
  ) -> Run:
9660
- """Get a single job run.
9661
-
9662
- Retrieves the metadata of a run.
9835
+ """Retrieves the metadata of a run.
9663
9836
 
9664
9837
  Large arrays in the results will be paginated when they exceed 100 elements. A request for a single
9665
9838
  run will return all properties for that run, and the first 100 elements of array properties (`tasks`,
@@ -9698,9 +9871,7 @@ class JobsAPI:
9698
9871
  return Run.from_dict(res)
9699
9872
 
9700
9873
  def get_run_output(self, run_id: int) -> RunOutput:
9701
- """Get the output for a single run.
9702
-
9703
- Retrieve the output and metadata of a single task run. When a notebook task returns a value through
9874
+ """Retrieve the output and metadata of a single task run. When a notebook task returns a value through
9704
9875
  the `dbutils.notebook.exit()` call, you can use this endpoint to retrieve that value. Databricks
9705
9876
  restricts this API to returning the first 5 MB of the output. To return a larger result, you can store
9706
9877
  job results in a cloud storage service.
@@ -9734,9 +9905,7 @@ class JobsAPI:
9734
9905
  offset: Optional[int] = None,
9735
9906
  page_token: Optional[str] = None,
9736
9907
  ) -> Iterator[BaseJob]:
9737
- """List jobs.
9738
-
9739
- Retrieves a list of jobs.
9908
+ """Retrieves a list of jobs.
9740
9909
 
9741
9910
  :param expand_tasks: bool (optional)
9742
9911
  Whether to include task and cluster details in the response. Note that only the first 100 elements
@@ -9794,9 +9963,7 @@ class JobsAPI:
9794
9963
  start_time_from: Optional[int] = None,
9795
9964
  start_time_to: Optional[int] = None,
9796
9965
  ) -> Iterator[BaseRun]:
9797
- """List job runs.
9798
-
9799
- List runs in descending order by start time.
9966
+ """List runs in descending order by start time.
9800
9967
 
9801
9968
  :param active_only: bool (optional)
9802
9969
  If active_only is `true`, only active runs are included in the results; otherwise, lists both active
@@ -9884,9 +10051,7 @@ class JobsAPI:
9884
10051
  spark_submit_params: Optional[List[str]] = None,
9885
10052
  sql_params: Optional[Dict[str, str]] = None,
9886
10053
  ) -> Wait[Run]:
9887
- """Repair a job run.
9888
-
9889
- Re-run one or more tasks. Tasks are re-run as part of the original job run. They use the current job
10054
+ """Re-run one or more tasks. Tasks are re-run as part of the original job run. They use the current job
9890
10055
  and task settings, and can be viewed in the history for the original job run.
9891
10056
 
9892
10057
  :param run_id: int
@@ -10064,9 +10229,7 @@ class JobsAPI:
10064
10229
  ).result(timeout=timeout)
10065
10230
 
10066
10231
  def reset(self, job_id: int, new_settings: JobSettings):
10067
- """Update all job settings (reset).
10068
-
10069
- Overwrite all settings for the given job. Use the [_Update_ endpoint](:method:jobs/update) to update
10232
+ """Overwrite all settings for the given job. Use the [_Update_ endpoint](:method:jobs/update) to update
10070
10233
  job settings partially.
10071
10234
 
10072
10235
  :param job_id: int
@@ -10108,9 +10271,7 @@ class JobsAPI:
10108
10271
  spark_submit_params: Optional[List[str]] = None,
10109
10272
  sql_params: Optional[Dict[str, str]] = None,
10110
10273
  ) -> Wait[Run]:
10111
- """Trigger a new job run.
10112
-
10113
- Run a job and return the `run_id` of the triggered run.
10274
+ """Run a job and return the `run_id` of the triggered run.
10114
10275
 
10115
10276
  :param job_id: int
10116
10277
  The ID of the job to be executed
@@ -10293,9 +10454,7 @@ class JobsAPI:
10293
10454
  def set_permissions(
10294
10455
  self, job_id: str, *, access_control_list: Optional[List[JobAccessControlRequest]] = None
10295
10456
  ) -> JobPermissions:
10296
- """Set job permissions.
10297
-
10298
- Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
10457
+ """Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
10299
10458
  permissions if none are specified. Objects can inherit permissions from their root object.
10300
10459
 
10301
10460
  :param job_id: str
@@ -10333,9 +10492,7 @@ class JobsAPI:
10333
10492
  timeout_seconds: Optional[int] = None,
10334
10493
  webhook_notifications: Optional[WebhookNotifications] = None,
10335
10494
  ) -> Wait[Run]:
10336
- """Create and trigger a one-time run.
10337
-
10338
- Submit a one-time run. This endpoint allows you to submit a workload directly without creating a job.
10495
+ """Submit a one-time run. This endpoint allows you to submit a workload directly without creating a job.
10339
10496
  Runs submitted using this endpoint don’t display in the UI. Use the `jobs/runs/get` API to check the
10340
10497
  run state after the job is submitted.
10341
10498
 
@@ -10472,9 +10629,7 @@ class JobsAPI:
10472
10629
  def update(
10473
10630
  self, job_id: int, *, fields_to_remove: Optional[List[str]] = None, new_settings: Optional[JobSettings] = None
10474
10631
  ):
10475
- """Update job settings partially.
10476
-
10477
- Add, update, or remove specific settings of an existing job. Use the [_Reset_
10632
+ """Add, update, or remove specific settings of an existing job. Use the [_Reset_
10478
10633
  endpoint](:method:jobs/reset) to overwrite all job settings.
10479
10634
 
10480
10635
  :param job_id: int
@@ -10512,9 +10667,7 @@ class JobsAPI:
10512
10667
  def update_permissions(
10513
10668
  self, job_id: str, *, access_control_list: Optional[List[JobAccessControlRequest]] = None
10514
10669
  ) -> JobPermissions:
10515
- """Update job permissions.
10516
-
10517
- Updates the permissions on a job. Jobs can inherit permissions from their root object.
10670
+ """Updates the permissions on a job. Jobs can inherit permissions from their root object.
10518
10671
 
10519
10672
  :param job_id: str
10520
10673
  The job for which to get or manage permissions.
@@ -10552,9 +10705,7 @@ class PolicyComplianceForJobsAPI:
10552
10705
  def enforce_compliance(
10553
10706
  self, job_id: int, *, validate_only: Optional[bool] = None
10554
10707
  ) -> EnforcePolicyComplianceResponse:
10555
- """Enforce job policy compliance.
10556
-
10557
- Updates a job so the job clusters that are created when running the job (specified in `new_cluster`)
10708
+ """Updates a job so the job clusters that are created when running the job (specified in `new_cluster`)
10558
10709
  are compliant with the current versions of their respective cluster policies. All-purpose clusters
10559
10710
  used in the job will not be updated.
10560
10711
 
@@ -10579,9 +10730,7 @@ class PolicyComplianceForJobsAPI:
10579
10730
  return EnforcePolicyComplianceResponse.from_dict(res)
10580
10731
 
10581
10732
  def get_compliance(self, job_id: int) -> GetPolicyComplianceResponse:
10582
- """Get job policy compliance.
10583
-
10584
- Returns the policy compliance status of a job. Jobs could be out of compliance if a cluster policy
10733
+ """Returns the policy compliance status of a job. Jobs could be out of compliance if a cluster policy
10585
10734
  they use was updated after the job was last edited and some of its job clusters no longer comply with
10586
10735
  their updated policies.
10587
10736
 
@@ -10604,9 +10753,7 @@ class PolicyComplianceForJobsAPI:
10604
10753
  def list_compliance(
10605
10754
  self, policy_id: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
10606
10755
  ) -> Iterator[JobCompliance]:
10607
- """List job policy compliance.
10608
-
10609
- Returns the policy compliance status of all jobs that use a given policy. Jobs could be out of
10756
+ """Returns the policy compliance status of all jobs that use a given policy. Jobs could be out of
10610
10757
  compliance if a cluster policy they use was updated after the job was last edited and its job clusters
10611
10758
  no longer comply with the updated policy.
10612
10759