databricks-sdk 0.19.1__py3-none-any.whl → 0.21.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 (35) hide show
  1. databricks/sdk/__init__.py +28 -6
  2. databricks/sdk/_widgets/__init__.py +2 -2
  3. databricks/sdk/config.py +3 -2
  4. databricks/sdk/core.py +4 -2
  5. databricks/sdk/mixins/workspace.py +2 -1
  6. databricks/sdk/oauth.py +1 -1
  7. databricks/sdk/runtime/__init__.py +85 -11
  8. databricks/sdk/runtime/dbutils_stub.py +1 -1
  9. databricks/sdk/service/_internal.py +1 -1
  10. databricks/sdk/service/billing.py +64 -1
  11. databricks/sdk/service/catalog.py +796 -84
  12. databricks/sdk/service/compute.py +391 -13
  13. databricks/sdk/service/dashboards.py +15 -0
  14. databricks/sdk/service/files.py +289 -15
  15. databricks/sdk/service/iam.py +214 -0
  16. databricks/sdk/service/jobs.py +242 -143
  17. databricks/sdk/service/ml.py +407 -0
  18. databricks/sdk/service/oauth2.py +83 -0
  19. databricks/sdk/service/pipelines.py +78 -8
  20. databricks/sdk/service/provisioning.py +108 -36
  21. databricks/sdk/service/serving.py +101 -35
  22. databricks/sdk/service/settings.py +1316 -186
  23. databricks/sdk/service/sharing.py +94 -18
  24. databricks/sdk/service/sql.py +230 -13
  25. databricks/sdk/service/vectorsearch.py +105 -60
  26. databricks/sdk/service/workspace.py +175 -1
  27. databricks/sdk/version.py +1 -1
  28. {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/METADATA +3 -1
  29. databricks_sdk-0.21.0.dist-info/RECORD +53 -0
  30. databricks/sdk/runtime/stub.py +0 -48
  31. databricks_sdk-0.19.1.dist-info/RECORD +0 -54
  32. {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/LICENSE +0 -0
  33. {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/NOTICE +0 -0
  34. {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/WHEEL +0 -0
  35. {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/top_level.txt +0 -0
@@ -544,6 +544,34 @@ class CreateShare:
544
544
  return cls(comment=d.get('comment', None), name=d.get('name', None))
545
545
 
546
546
 
547
+ @dataclass
548
+ class DeleteResponse:
549
+
550
+ def as_dict(self) -> dict:
551
+ """Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body."""
552
+ body = {}
553
+ return body
554
+
555
+ @classmethod
556
+ def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
557
+ """Deserializes the DeleteResponse from a dictionary."""
558
+ return cls()
559
+
560
+
561
+ @dataclass
562
+ class GetActivationUrlInfoResponse:
563
+
564
+ def as_dict(self) -> dict:
565
+ """Serializes the GetActivationUrlInfoResponse into a dictionary suitable for use as a JSON request body."""
566
+ body = {}
567
+ return body
568
+
569
+ @classmethod
570
+ def from_dict(cls, d: Dict[str, any]) -> GetActivationUrlInfoResponse:
571
+ """Deserializes the GetActivationUrlInfoResponse from a dictionary."""
572
+ return cls()
573
+
574
+
547
575
  @dataclass
548
576
  class GetRecipientSharePermissionsResponse:
549
577
  permissions_out: Optional[List[ShareToPrivilegeAssignment]] = None
@@ -1380,7 +1408,7 @@ class UpdateCleanRoom:
1380
1408
  comment: Optional[str] = None
1381
1409
  """User-provided free-form text description."""
1382
1410
 
1383
- name_arg: Optional[str] = None
1411
+ name: Optional[str] = None
1384
1412
  """The name of the clean room."""
1385
1413
 
1386
1414
  owner: Optional[str] = None
@@ -1391,7 +1419,7 @@ class UpdateCleanRoom:
1391
1419
  body = {}
1392
1420
  if self.catalog_updates: body['catalog_updates'] = [v.as_dict() for v in self.catalog_updates]
1393
1421
  if self.comment is not None: body['comment'] = self.comment
1394
- if self.name_arg is not None: body['name_arg'] = self.name_arg
1422
+ if self.name is not None: body['name'] = self.name
1395
1423
  if self.owner is not None: body['owner'] = self.owner
1396
1424
  return body
1397
1425
 
@@ -1400,10 +1428,24 @@ class UpdateCleanRoom:
1400
1428
  """Deserializes the UpdateCleanRoom from a dictionary."""
1401
1429
  return cls(catalog_updates=_repeated_dict(d, 'catalog_updates', CleanRoomCatalogUpdate),
1402
1430
  comment=d.get('comment', None),
1403
- name_arg=d.get('name_arg', None),
1431
+ name=d.get('name', None),
1404
1432
  owner=d.get('owner', None))
1405
1433
 
1406
1434
 
1435
+ @dataclass
1436
+ class UpdatePermissionsResponse:
1437
+
1438
+ def as_dict(self) -> dict:
1439
+ """Serializes the UpdatePermissionsResponse into a dictionary suitable for use as a JSON request body."""
1440
+ body = {}
1441
+ return body
1442
+
1443
+ @classmethod
1444
+ def from_dict(cls, d: Dict[str, any]) -> UpdatePermissionsResponse:
1445
+ """Deserializes the UpdatePermissionsResponse from a dictionary."""
1446
+ return cls()
1447
+
1448
+
1407
1449
  @dataclass
1408
1450
  class UpdateProvider:
1409
1451
  comment: Optional[str] = None
@@ -1485,6 +1527,20 @@ class UpdateRecipient:
1485
1527
  properties_kvpairs=_from_dict(d, 'properties_kvpairs', SecurablePropertiesKvPairs))
1486
1528
 
1487
1529
 
1530
+ @dataclass
1531
+ class UpdateResponse:
1532
+
1533
+ def as_dict(self) -> dict:
1534
+ """Serializes the UpdateResponse into a dictionary suitable for use as a JSON request body."""
1535
+ body = {}
1536
+ return body
1537
+
1538
+ @classmethod
1539
+ def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
1540
+ """Deserializes the UpdateResponse from a dictionary."""
1541
+ return cls()
1542
+
1543
+
1488
1544
  @dataclass
1489
1545
  class UpdateShare:
1490
1546
  comment: Optional[str] = None
@@ -1576,30 +1632,32 @@ class CleanRoomsAPI:
1576
1632
  if name is not None: body['name'] = name
1577
1633
  if remote_detailed_info is not None: body['remote_detailed_info'] = remote_detailed_info.as_dict()
1578
1634
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1635
+
1579
1636
  res = self._api.do('POST', '/api/2.1/unity-catalog/clean-rooms', body=body, headers=headers)
1580
1637
  return CleanRoomInfo.from_dict(res)
1581
1638
 
1582
- def delete(self, name_arg: str):
1639
+ def delete(self, name: str):
1583
1640
  """Delete a clean room.
1584
1641
 
1585
1642
  Deletes a data object clean room from the metastore. The caller must be an owner of the clean room.
1586
1643
 
1587
- :param name_arg: str
1644
+ :param name: str
1588
1645
  The name of the clean room.
1589
1646
 
1590
1647
 
1591
1648
  """
1592
1649
 
1593
1650
  headers = {'Accept': 'application/json', }
1594
- self._api.do('DELETE', f'/api/2.1/unity-catalog/clean-rooms/{name_arg}', headers=headers)
1595
1651
 
1596
- def get(self, name_arg: str, *, include_remote_details: Optional[bool] = None) -> CleanRoomInfo:
1652
+ self._api.do('DELETE', f'/api/2.1/unity-catalog/clean-rooms/{name}', headers=headers)
1653
+
1654
+ def get(self, name: str, *, include_remote_details: Optional[bool] = None) -> CleanRoomInfo:
1597
1655
  """Get a clean room.
1598
1656
 
1599
1657
  Gets a data object clean room from the metastore. The caller must be a metastore admin or the owner of
1600
1658
  the clean room.
1601
1659
 
1602
- :param name_arg: str
1660
+ :param name: str
1603
1661
  The name of the clean room.
1604
1662
  :param include_remote_details: bool (optional)
1605
1663
  Whether to include remote details (central) on the clean room.
@@ -1610,10 +1668,8 @@ class CleanRoomsAPI:
1610
1668
  query = {}
1611
1669
  if include_remote_details is not None: query['include_remote_details'] = include_remote_details
1612
1670
  headers = {'Accept': 'application/json', }
1613
- res = self._api.do('GET',
1614
- f'/api/2.1/unity-catalog/clean-rooms/{name_arg}',
1615
- query=query,
1616
- headers=headers)
1671
+
1672
+ res = self._api.do('GET', f'/api/2.1/unity-catalog/clean-rooms/{name}', query=query, headers=headers)
1617
1673
  return CleanRoomInfo.from_dict(res)
1618
1674
 
1619
1675
  def list(self,
@@ -1652,7 +1708,7 @@ class CleanRoomsAPI:
1652
1708
  query['page_token'] = json['next_page_token']
1653
1709
 
1654
1710
  def update(self,
1655
- name_arg: str,
1711
+ name: str,
1656
1712
  *,
1657
1713
  catalog_updates: Optional[List[CleanRoomCatalogUpdate]] = None,
1658
1714
  comment: Optional[str] = None,
@@ -1673,7 +1729,7 @@ class CleanRoomsAPI:
1673
1729
 
1674
1730
  Table removals through **update** do not require additional privileges.
1675
1731
 
1676
- :param name_arg: str
1732
+ :param name: str
1677
1733
  The name of the clean room.
1678
1734
  :param catalog_updates: List[:class:`CleanRoomCatalogUpdate`] (optional)
1679
1735
  Array of shared data object updates.
@@ -1689,10 +1745,8 @@ class CleanRoomsAPI:
1689
1745
  if comment is not None: body['comment'] = comment
1690
1746
  if owner is not None: body['owner'] = owner
1691
1747
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1692
- res = self._api.do('PATCH',
1693
- f'/api/2.1/unity-catalog/clean-rooms/{name_arg}',
1694
- body=body,
1695
- headers=headers)
1748
+
1749
+ res = self._api.do('PATCH', f'/api/2.1/unity-catalog/clean-rooms/{name}', body=body, headers=headers)
1696
1750
  return CleanRoomInfo.from_dict(res)
1697
1751
 
1698
1752
 
@@ -1731,6 +1785,7 @@ class ProvidersAPI:
1731
1785
  if name is not None: body['name'] = name
1732
1786
  if recipient_profile_str is not None: body['recipient_profile_str'] = recipient_profile_str
1733
1787
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1788
+
1734
1789
  res = self._api.do('POST', '/api/2.1/unity-catalog/providers', body=body, headers=headers)
1735
1790
  return ProviderInfo.from_dict(res)
1736
1791
 
@@ -1747,6 +1802,7 @@ class ProvidersAPI:
1747
1802
  """
1748
1803
 
1749
1804
  headers = {'Accept': 'application/json', }
1805
+
1750
1806
  self._api.do('DELETE', f'/api/2.1/unity-catalog/providers/{name}', headers=headers)
1751
1807
 
1752
1808
  def get(self, name: str) -> ProviderInfo:
@@ -1762,6 +1818,7 @@ class ProvidersAPI:
1762
1818
  """
1763
1819
 
1764
1820
  headers = {'Accept': 'application/json', }
1821
+
1765
1822
  res = self._api.do('GET', f'/api/2.1/unity-catalog/providers/{name}', headers=headers)
1766
1823
  return ProviderInfo.from_dict(res)
1767
1824
 
@@ -1783,6 +1840,7 @@ class ProvidersAPI:
1783
1840
  if data_provider_global_metastore_id is not None:
1784
1841
  query['data_provider_global_metastore_id'] = data_provider_global_metastore_id
1785
1842
  headers = {'Accept': 'application/json', }
1843
+
1786
1844
  json = self._api.do('GET', '/api/2.1/unity-catalog/providers', query=query, headers=headers)
1787
1845
  parsed = ListProvidersResponse.from_dict(json).providers
1788
1846
  return parsed if parsed is not None else []
@@ -1801,6 +1859,7 @@ class ProvidersAPI:
1801
1859
  """
1802
1860
 
1803
1861
  headers = {'Accept': 'application/json', }
1862
+
1804
1863
  json = self._api.do('GET', f'/api/2.1/unity-catalog/providers/{name}/shares', headers=headers)
1805
1864
  parsed = ListProviderSharesResponse.from_dict(json).shares
1806
1865
  return parsed if parsed is not None else []
@@ -1837,6 +1896,7 @@ class ProvidersAPI:
1837
1896
  if owner is not None: body['owner'] = owner
1838
1897
  if recipient_profile_str is not None: body['recipient_profile_str'] = recipient_profile_str
1839
1898
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1899
+
1840
1900
  res = self._api.do('PATCH', f'/api/2.1/unity-catalog/providers/{name}', body=body, headers=headers)
1841
1901
  return ProviderInfo.from_dict(res)
1842
1902
 
@@ -1865,6 +1925,7 @@ class RecipientActivationAPI:
1865
1925
  """
1866
1926
 
1867
1927
  headers = {'Accept': 'application/json', }
1928
+
1868
1929
  self._api.do('GET',
1869
1930
  f'/api/2.1/unity-catalog/public/data_sharing_activation_info/{activation_url}',
1870
1931
  headers=headers)
@@ -1881,6 +1942,7 @@ class RecipientActivationAPI:
1881
1942
  """
1882
1943
 
1883
1944
  headers = {'Accept': 'application/json', }
1945
+
1884
1946
  res = self._api.do('GET',
1885
1947
  f'/api/2.1/unity-catalog/public/data_sharing_activation/{activation_url}',
1886
1948
  headers=headers)
@@ -1953,6 +2015,7 @@ class RecipientsAPI:
1953
2015
  if properties_kvpairs is not None: body['properties_kvpairs'] = properties_kvpairs.as_dict()
1954
2016
  if sharing_code is not None: body['sharing_code'] = sharing_code
1955
2017
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2018
+
1956
2019
  res = self._api.do('POST', '/api/2.1/unity-catalog/recipients', body=body, headers=headers)
1957
2020
  return RecipientInfo.from_dict(res)
1958
2021
 
@@ -1968,6 +2031,7 @@ class RecipientsAPI:
1968
2031
  """
1969
2032
 
1970
2033
  headers = {'Accept': 'application/json', }
2034
+
1971
2035
  self._api.do('DELETE', f'/api/2.1/unity-catalog/recipients/{name}', headers=headers)
1972
2036
 
1973
2037
  def get(self, name: str) -> RecipientInfo:
@@ -1984,6 +2048,7 @@ class RecipientsAPI:
1984
2048
  """
1985
2049
 
1986
2050
  headers = {'Accept': 'application/json', }
2051
+
1987
2052
  res = self._api.do('GET', f'/api/2.1/unity-catalog/recipients/{name}', headers=headers)
1988
2053
  return RecipientInfo.from_dict(res)
1989
2054
 
@@ -2006,6 +2071,7 @@ class RecipientsAPI:
2006
2071
  if data_recipient_global_metastore_id is not None:
2007
2072
  query['data_recipient_global_metastore_id'] = data_recipient_global_metastore_id
2008
2073
  headers = {'Accept': 'application/json', }
2074
+
2009
2075
  json = self._api.do('GET', '/api/2.1/unity-catalog/recipients', query=query, headers=headers)
2010
2076
  parsed = ListRecipientsResponse.from_dict(json).recipients
2011
2077
  return parsed if parsed is not None else []
@@ -2029,6 +2095,7 @@ class RecipientsAPI:
2029
2095
  if existing_token_expire_in_seconds is not None:
2030
2096
  body['existing_token_expire_in_seconds'] = existing_token_expire_in_seconds
2031
2097
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2098
+
2032
2099
  res = self._api.do('POST',
2033
2100
  f'/api/2.1/unity-catalog/recipients/{name}/rotate-token',
2034
2101
  body=body,
@@ -2048,6 +2115,7 @@ class RecipientsAPI:
2048
2115
  """
2049
2116
 
2050
2117
  headers = {'Accept': 'application/json', }
2118
+
2051
2119
  res = self._api.do('GET',
2052
2120
  f'/api/2.1/unity-catalog/recipients/{name}/share-permissions',
2053
2121
  headers=headers)
@@ -2091,6 +2159,7 @@ class RecipientsAPI:
2091
2159
  if owner is not None: body['owner'] = owner
2092
2160
  if properties_kvpairs is not None: body['properties_kvpairs'] = properties_kvpairs.as_dict()
2093
2161
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2162
+
2094
2163
  self._api.do('PATCH', f'/api/2.1/unity-catalog/recipients/{name}', body=body, headers=headers)
2095
2164
 
2096
2165
 
@@ -2120,6 +2189,7 @@ class SharesAPI:
2120
2189
  if comment is not None: body['comment'] = comment
2121
2190
  if name is not None: body['name'] = name
2122
2191
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2192
+
2123
2193
  res = self._api.do('POST', '/api/2.1/unity-catalog/shares', body=body, headers=headers)
2124
2194
  return ShareInfo.from_dict(res)
2125
2195
 
@@ -2135,6 +2205,7 @@ class SharesAPI:
2135
2205
  """
2136
2206
 
2137
2207
  headers = {'Accept': 'application/json', }
2208
+
2138
2209
  self._api.do('DELETE', f'/api/2.1/unity-catalog/shares/{name}', headers=headers)
2139
2210
 
2140
2211
  def get(self, name: str, *, include_shared_data: Optional[bool] = None) -> ShareInfo:
@@ -2154,6 +2225,7 @@ class SharesAPI:
2154
2225
  query = {}
2155
2226
  if include_shared_data is not None: query['include_shared_data'] = include_shared_data
2156
2227
  headers = {'Accept': 'application/json', }
2228
+
2157
2229
  res = self._api.do('GET', f'/api/2.1/unity-catalog/shares/{name}', query=query, headers=headers)
2158
2230
  return ShareInfo.from_dict(res)
2159
2231
 
@@ -2167,6 +2239,7 @@ class SharesAPI:
2167
2239
  """
2168
2240
 
2169
2241
  headers = {'Accept': 'application/json', }
2242
+
2170
2243
  json = self._api.do('GET', '/api/2.1/unity-catalog/shares', headers=headers)
2171
2244
  parsed = ListSharesResponse.from_dict(json).shares
2172
2245
  return parsed if parsed is not None else []
@@ -2184,6 +2257,7 @@ class SharesAPI:
2184
2257
  """
2185
2258
 
2186
2259
  headers = {'Accept': 'application/json', }
2260
+
2187
2261
  res = self._api.do('GET', f'/api/2.1/unity-catalog/shares/{name}/permissions', headers=headers)
2188
2262
  return PermissionsList.from_dict(res)
2189
2263
 
@@ -2229,6 +2303,7 @@ class SharesAPI:
2229
2303
  if owner is not None: body['owner'] = owner
2230
2304
  if updates is not None: body['updates'] = [v.as_dict() for v in updates]
2231
2305
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2306
+
2232
2307
  res = self._api.do('PATCH', f'/api/2.1/unity-catalog/shares/{name}', body=body, headers=headers)
2233
2308
  return ShareInfo.from_dict(res)
2234
2309
 
@@ -2251,4 +2326,5 @@ class SharesAPI:
2251
2326
  body = {}
2252
2327
  if changes is not None: body['changes'] = [v.as_dict() for v in changes]
2253
2328
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2329
+
2254
2330
  self._api.do('PATCH', f'/api/2.1/unity-catalog/shares/{name}/permissions', body=body, headers=headers)