databricks-sdk 0.28.0__py3-none-any.whl → 0.30.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.
- databricks/sdk/__init__.py +74 -22
- databricks/sdk/config.py +89 -48
- databricks/sdk/core.py +38 -9
- databricks/sdk/credentials_provider.py +134 -57
- databricks/sdk/data_plane.py +65 -0
- databricks/sdk/dbutils.py +81 -3
- databricks/sdk/mixins/files.py +12 -4
- databricks/sdk/oauth.py +8 -6
- databricks/sdk/service/apps.py +977 -0
- databricks/sdk/service/billing.py +602 -218
- databricks/sdk/service/catalog.py +263 -62
- databricks/sdk/service/compute.py +515 -94
- databricks/sdk/service/dashboards.py +1310 -2
- databricks/sdk/service/iam.py +99 -88
- databricks/sdk/service/jobs.py +159 -166
- databricks/sdk/service/marketplace.py +74 -58
- databricks/sdk/service/oauth2.py +149 -70
- databricks/sdk/service/pipelines.py +73 -53
- databricks/sdk/service/serving.py +332 -694
- databricks/sdk/service/settings.py +424 -4
- databricks/sdk/service/sharing.py +235 -26
- databricks/sdk/service/sql.py +2484 -553
- databricks/sdk/service/vectorsearch.py +75 -0
- databricks/sdk/useragent.py +144 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/METADATA +37 -16
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/RECORD +31 -28
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/WHEEL +1 -1
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/top_level.txt +0 -0
|
@@ -56,7 +56,38 @@ class AssetType(Enum):
|
|
|
56
56
|
ASSET_TYPE_MEDIA = 'ASSET_TYPE_MEDIA'
|
|
57
57
|
ASSET_TYPE_MODEL = 'ASSET_TYPE_MODEL'
|
|
58
58
|
ASSET_TYPE_NOTEBOOK = 'ASSET_TYPE_NOTEBOOK'
|
|
59
|
-
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@dataclass
|
|
62
|
+
class BatchGetListingsResponse:
|
|
63
|
+
listings: Optional[List[Listing]] = None
|
|
64
|
+
|
|
65
|
+
def as_dict(self) -> dict:
|
|
66
|
+
"""Serializes the BatchGetListingsResponse into a dictionary suitable for use as a JSON request body."""
|
|
67
|
+
body = {}
|
|
68
|
+
if self.listings: body['listings'] = [v.as_dict() for v in self.listings]
|
|
69
|
+
return body
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls, d: Dict[str, any]) -> BatchGetListingsResponse:
|
|
73
|
+
"""Deserializes the BatchGetListingsResponse from a dictionary."""
|
|
74
|
+
return cls(listings=_repeated_dict(d, 'listings', Listing))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@dataclass
|
|
78
|
+
class BatchGetProvidersResponse:
|
|
79
|
+
providers: Optional[List[ProviderInfo]] = None
|
|
80
|
+
|
|
81
|
+
def as_dict(self) -> dict:
|
|
82
|
+
"""Serializes the BatchGetProvidersResponse into a dictionary suitable for use as a JSON request body."""
|
|
83
|
+
body = {}
|
|
84
|
+
if self.providers: body['providers'] = [v.as_dict() for v in self.providers]
|
|
85
|
+
return body
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, d: Dict[str, any]) -> BatchGetProvidersResponse:
|
|
89
|
+
"""Deserializes the BatchGetProvidersResponse from a dictionary."""
|
|
90
|
+
return cls(providers=_repeated_dict(d, 'providers', ProviderInfo))
|
|
60
91
|
|
|
61
92
|
|
|
62
93
|
class Category(Enum):
|
|
@@ -772,11 +803,6 @@ class FileStatus(Enum):
|
|
|
772
803
|
FILE_STATUS_STAGING = 'FILE_STATUS_STAGING'
|
|
773
804
|
|
|
774
805
|
|
|
775
|
-
class FilterType(Enum):
|
|
776
|
-
|
|
777
|
-
METASTORE = 'METASTORE'
|
|
778
|
-
|
|
779
|
-
|
|
780
806
|
class FulfillmentType(Enum):
|
|
781
807
|
|
|
782
808
|
INSTALL = 'INSTALL'
|
|
@@ -1423,23 +1449,18 @@ class ListingFulfillment:
|
|
|
1423
1449
|
|
|
1424
1450
|
@dataclass
|
|
1425
1451
|
class ListingSetting:
|
|
1426
|
-
filters: Optional[List[VisibilityFilter]] = None
|
|
1427
|
-
"""filters are joined with `or` conjunction."""
|
|
1428
|
-
|
|
1429
1452
|
visibility: Optional[Visibility] = None
|
|
1430
1453
|
|
|
1431
1454
|
def as_dict(self) -> dict:
|
|
1432
1455
|
"""Serializes the ListingSetting into a dictionary suitable for use as a JSON request body."""
|
|
1433
1456
|
body = {}
|
|
1434
|
-
if self.filters: body['filters'] = [v.as_dict() for v in self.filters]
|
|
1435
1457
|
if self.visibility is not None: body['visibility'] = self.visibility.value
|
|
1436
1458
|
return body
|
|
1437
1459
|
|
|
1438
1460
|
@classmethod
|
|
1439
1461
|
def from_dict(cls, d: Dict[str, any]) -> ListingSetting:
|
|
1440
1462
|
"""Deserializes the ListingSetting from a dictionary."""
|
|
1441
|
-
return cls(
|
|
1442
|
-
visibility=_enum(d, 'visibility', Visibility))
|
|
1463
|
+
return cls(visibility=_enum(d, 'visibility', Visibility))
|
|
1443
1464
|
|
|
1444
1465
|
|
|
1445
1466
|
class ListingShareType(Enum):
|
|
@@ -1479,8 +1500,6 @@ class ListingSummary:
|
|
|
1479
1500
|
"""if a git repo is being created, a listing will be initialized with this field as opposed to a
|
|
1480
1501
|
share"""
|
|
1481
1502
|
|
|
1482
|
-
metastore_id: Optional[str] = None
|
|
1483
|
-
|
|
1484
1503
|
provider_id: Optional[str] = None
|
|
1485
1504
|
|
|
1486
1505
|
provider_region: Optional[RegionInfo] = None
|
|
@@ -1514,7 +1533,6 @@ class ListingSummary:
|
|
|
1514
1533
|
if self.exchange_ids: body['exchange_ids'] = [v for v in self.exchange_ids]
|
|
1515
1534
|
if self.git_repo: body['git_repo'] = self.git_repo.as_dict()
|
|
1516
1535
|
if self.listing_type is not None: body['listingType'] = self.listing_type.value
|
|
1517
|
-
if self.metastore_id is not None: body['metastore_id'] = self.metastore_id
|
|
1518
1536
|
if self.name is not None: body['name'] = self.name
|
|
1519
1537
|
if self.provider_id is not None: body['provider_id'] = self.provider_id
|
|
1520
1538
|
if self.provider_region: body['provider_region'] = self.provider_region.as_dict()
|
|
@@ -1539,7 +1557,6 @@ class ListingSummary:
|
|
|
1539
1557
|
exchange_ids=d.get('exchange_ids', None),
|
|
1540
1558
|
git_repo=_from_dict(d, 'git_repo', RepoInfo),
|
|
1541
1559
|
listing_type=_enum(d, 'listingType', ListingType),
|
|
1542
|
-
metastore_id=d.get('metastore_id', None),
|
|
1543
1560
|
name=d.get('name', None),
|
|
1544
1561
|
provider_id=d.get('provider_id', None),
|
|
1545
1562
|
provider_region=_from_dict(d, 'provider_region', RegionInfo),
|
|
@@ -1579,7 +1596,6 @@ class ListingTagType(Enum):
|
|
|
1579
1596
|
|
|
1580
1597
|
LISTING_TAG_TYPE_LANGUAGE = 'LISTING_TAG_TYPE_LANGUAGE'
|
|
1581
1598
|
LISTING_TAG_TYPE_TASK = 'LISTING_TAG_TYPE_TASK'
|
|
1582
|
-
LISTING_TAG_TYPE_UNSPECIFIED = 'LISTING_TAG_TYPE_UNSPECIFIED'
|
|
1583
1599
|
|
|
1584
1600
|
|
|
1585
1601
|
class ListingType(Enum):
|
|
@@ -1900,14 +1916,6 @@ class SharedDataObject:
|
|
|
1900
1916
|
return cls(data_object_type=d.get('data_object_type', None), name=d.get('name', None))
|
|
1901
1917
|
|
|
1902
1918
|
|
|
1903
|
-
class SortBy(Enum):
|
|
1904
|
-
|
|
1905
|
-
SORT_BY_DATE = 'SORT_BY_DATE'
|
|
1906
|
-
SORT_BY_RELEVANCE = 'SORT_BY_RELEVANCE'
|
|
1907
|
-
SORT_BY_TITLE = 'SORT_BY_TITLE'
|
|
1908
|
-
SORT_BY_UNSPECIFIED = 'SORT_BY_UNSPECIFIED'
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
1919
|
@dataclass
|
|
1912
1920
|
class TokenDetail:
|
|
1913
1921
|
bearer_token: Optional[str] = None
|
|
@@ -2273,25 +2281,6 @@ class Visibility(Enum):
|
|
|
2273
2281
|
PUBLIC = 'PUBLIC'
|
|
2274
2282
|
|
|
2275
2283
|
|
|
2276
|
-
@dataclass
|
|
2277
|
-
class VisibilityFilter:
|
|
2278
|
-
filter_type: Optional[FilterType] = None
|
|
2279
|
-
|
|
2280
|
-
filter_value: Optional[str] = None
|
|
2281
|
-
|
|
2282
|
-
def as_dict(self) -> dict:
|
|
2283
|
-
"""Serializes the VisibilityFilter into a dictionary suitable for use as a JSON request body."""
|
|
2284
|
-
body = {}
|
|
2285
|
-
if self.filter_type is not None: body['filterType'] = self.filter_type.value
|
|
2286
|
-
if self.filter_value is not None: body['filterValue'] = self.filter_value
|
|
2287
|
-
return body
|
|
2288
|
-
|
|
2289
|
-
@classmethod
|
|
2290
|
-
def from_dict(cls, d: Dict[str, any]) -> VisibilityFilter:
|
|
2291
|
-
"""Deserializes the VisibilityFilter from a dictionary."""
|
|
2292
|
-
return cls(filter_type=_enum(d, 'filterType', FilterType), filter_value=d.get('filterValue', None))
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
2284
|
class ConsumerFulfillmentsAPI:
|
|
2296
2285
|
"""Fulfillments are entities that allow consumers to preview installations."""
|
|
2297
2286
|
|
|
@@ -2532,6 +2521,26 @@ class ConsumerListingsAPI:
|
|
|
2532
2521
|
def __init__(self, api_client):
|
|
2533
2522
|
self._api = api_client
|
|
2534
2523
|
|
|
2524
|
+
def batch_get(self, *, ids: Optional[List[str]] = None) -> BatchGetListingsResponse:
|
|
2525
|
+
"""Get one batch of listings. One may specify up to 50 IDs per request.
|
|
2526
|
+
|
|
2527
|
+
Batch get a published listing in the Databricks Marketplace that the consumer has access to.
|
|
2528
|
+
|
|
2529
|
+
:param ids: List[str] (optional)
|
|
2530
|
+
|
|
2531
|
+
:returns: :class:`BatchGetListingsResponse`
|
|
2532
|
+
"""
|
|
2533
|
+
|
|
2534
|
+
query = {}
|
|
2535
|
+
if ids is not None: query['ids'] = [v for v in ids]
|
|
2536
|
+
headers = {'Accept': 'application/json', }
|
|
2537
|
+
|
|
2538
|
+
res = self._api.do('GET',
|
|
2539
|
+
'/api/2.1/marketplace-consumer/listings:batchGet',
|
|
2540
|
+
query=query,
|
|
2541
|
+
headers=headers)
|
|
2542
|
+
return BatchGetListingsResponse.from_dict(res)
|
|
2543
|
+
|
|
2535
2544
|
def get(self, id: str) -> GetListingResponse:
|
|
2536
2545
|
"""Get listing.
|
|
2537
2546
|
|
|
@@ -2551,14 +2560,12 @@ class ConsumerListingsAPI:
|
|
|
2551
2560
|
*,
|
|
2552
2561
|
assets: Optional[List[AssetType]] = None,
|
|
2553
2562
|
categories: Optional[List[Category]] = None,
|
|
2554
|
-
is_ascending: Optional[bool] = None,
|
|
2555
2563
|
is_free: Optional[bool] = None,
|
|
2556
2564
|
is_private_exchange: Optional[bool] = None,
|
|
2557
2565
|
is_staff_pick: Optional[bool] = None,
|
|
2558
2566
|
page_size: Optional[int] = None,
|
|
2559
2567
|
page_token: Optional[str] = None,
|
|
2560
2568
|
provider_ids: Optional[List[str]] = None,
|
|
2561
|
-
sort_by: Optional[SortBy] = None,
|
|
2562
2569
|
tags: Optional[List[ListingTag]] = None) -> Iterator[Listing]:
|
|
2563
2570
|
"""List listings.
|
|
2564
2571
|
|
|
@@ -2568,7 +2575,6 @@ class ConsumerListingsAPI:
|
|
|
2568
2575
|
Matches any of the following asset types
|
|
2569
2576
|
:param categories: List[:class:`Category`] (optional)
|
|
2570
2577
|
Matches any of the following categories
|
|
2571
|
-
:param is_ascending: bool (optional)
|
|
2572
2578
|
:param is_free: bool (optional)
|
|
2573
2579
|
Filters each listing based on if it is free.
|
|
2574
2580
|
:param is_private_exchange: bool (optional)
|
|
@@ -2579,8 +2585,6 @@ class ConsumerListingsAPI:
|
|
|
2579
2585
|
:param page_token: str (optional)
|
|
2580
2586
|
:param provider_ids: List[str] (optional)
|
|
2581
2587
|
Matches any of the following provider ids
|
|
2582
|
-
:param sort_by: :class:`SortBy` (optional)
|
|
2583
|
-
Criteria for sorting the resulting set of listings.
|
|
2584
2588
|
:param tags: List[:class:`ListingTag`] (optional)
|
|
2585
2589
|
Matches any of the following tags
|
|
2586
2590
|
|
|
@@ -2590,14 +2594,12 @@ class ConsumerListingsAPI:
|
|
|
2590
2594
|
query = {}
|
|
2591
2595
|
if assets is not None: query['assets'] = [v.value for v in assets]
|
|
2592
2596
|
if categories is not None: query['categories'] = [v.value for v in categories]
|
|
2593
|
-
if is_ascending is not None: query['is_ascending'] = is_ascending
|
|
2594
2597
|
if is_free is not None: query['is_free'] = is_free
|
|
2595
2598
|
if is_private_exchange is not None: query['is_private_exchange'] = is_private_exchange
|
|
2596
2599
|
if is_staff_pick is not None: query['is_staff_pick'] = is_staff_pick
|
|
2597
2600
|
if page_size is not None: query['page_size'] = page_size
|
|
2598
2601
|
if page_token is not None: query['page_token'] = page_token
|
|
2599
2602
|
if provider_ids is not None: query['provider_ids'] = [v for v in provider_ids]
|
|
2600
|
-
if sort_by is not None: query['sort_by'] = sort_by.value
|
|
2601
2603
|
if tags is not None: query['tags'] = [v.as_dict() for v in tags]
|
|
2602
2604
|
headers = {'Accept': 'application/json', }
|
|
2603
2605
|
|
|
@@ -2615,13 +2617,11 @@ class ConsumerListingsAPI:
|
|
|
2615
2617
|
*,
|
|
2616
2618
|
assets: Optional[List[AssetType]] = None,
|
|
2617
2619
|
categories: Optional[List[Category]] = None,
|
|
2618
|
-
is_ascending: Optional[bool] = None,
|
|
2619
2620
|
is_free: Optional[bool] = None,
|
|
2620
2621
|
is_private_exchange: Optional[bool] = None,
|
|
2621
2622
|
page_size: Optional[int] = None,
|
|
2622
2623
|
page_token: Optional[str] = None,
|
|
2623
|
-
provider_ids: Optional[List[str]] = None
|
|
2624
|
-
sort_by: Optional[SortBy] = None) -> Iterator[Listing]:
|
|
2624
|
+
provider_ids: Optional[List[str]] = None) -> Iterator[Listing]:
|
|
2625
2625
|
"""Search listings.
|
|
2626
2626
|
|
|
2627
2627
|
Search published listings in the Databricks Marketplace that the consumer has access to. This query
|
|
@@ -2633,14 +2633,12 @@ class ConsumerListingsAPI:
|
|
|
2633
2633
|
Matches any of the following asset types
|
|
2634
2634
|
:param categories: List[:class:`Category`] (optional)
|
|
2635
2635
|
Matches any of the following categories
|
|
2636
|
-
:param is_ascending: bool (optional)
|
|
2637
2636
|
:param is_free: bool (optional)
|
|
2638
2637
|
:param is_private_exchange: bool (optional)
|
|
2639
2638
|
:param page_size: int (optional)
|
|
2640
2639
|
:param page_token: str (optional)
|
|
2641
2640
|
:param provider_ids: List[str] (optional)
|
|
2642
2641
|
Matches any of the following provider ids
|
|
2643
|
-
:param sort_by: :class:`SortBy` (optional)
|
|
2644
2642
|
|
|
2645
2643
|
:returns: Iterator over :class:`Listing`
|
|
2646
2644
|
"""
|
|
@@ -2648,14 +2646,12 @@ class ConsumerListingsAPI:
|
|
|
2648
2646
|
query = {}
|
|
2649
2647
|
if assets is not None: query['assets'] = [v.value for v in assets]
|
|
2650
2648
|
if categories is not None: query['categories'] = [v.value for v in categories]
|
|
2651
|
-
if is_ascending is not None: query['is_ascending'] = is_ascending
|
|
2652
2649
|
if is_free is not None: query['is_free'] = is_free
|
|
2653
2650
|
if is_private_exchange is not None: query['is_private_exchange'] = is_private_exchange
|
|
2654
2651
|
if page_size is not None: query['page_size'] = page_size
|
|
2655
2652
|
if page_token is not None: query['page_token'] = page_token
|
|
2656
2653
|
if provider_ids is not None: query['provider_ids'] = [v for v in provider_ids]
|
|
2657
2654
|
if query is not None: query['query'] = query
|
|
2658
|
-
if sort_by is not None: query['sort_by'] = sort_by.value
|
|
2659
2655
|
headers = {'Accept': 'application/json', }
|
|
2660
2656
|
|
|
2661
2657
|
while True:
|
|
@@ -2780,6 +2776,26 @@ class ConsumerProvidersAPI:
|
|
|
2780
2776
|
def __init__(self, api_client):
|
|
2781
2777
|
self._api = api_client
|
|
2782
2778
|
|
|
2779
|
+
def batch_get(self, *, ids: Optional[List[str]] = None) -> BatchGetProvidersResponse:
|
|
2780
|
+
"""Get one batch of providers. One may specify up to 50 IDs per request.
|
|
2781
|
+
|
|
2782
|
+
Batch get a provider in the Databricks Marketplace with at least one visible listing.
|
|
2783
|
+
|
|
2784
|
+
:param ids: List[str] (optional)
|
|
2785
|
+
|
|
2786
|
+
:returns: :class:`BatchGetProvidersResponse`
|
|
2787
|
+
"""
|
|
2788
|
+
|
|
2789
|
+
query = {}
|
|
2790
|
+
if ids is not None: query['ids'] = [v for v in ids]
|
|
2791
|
+
headers = {'Accept': 'application/json', }
|
|
2792
|
+
|
|
2793
|
+
res = self._api.do('GET',
|
|
2794
|
+
'/api/2.1/marketplace-consumer/providers:batchGet',
|
|
2795
|
+
query=query,
|
|
2796
|
+
headers=headers)
|
|
2797
|
+
return BatchGetProvidersResponse.from_dict(res)
|
|
2798
|
+
|
|
2783
2799
|
def get(self, id: str) -> GetProviderResponse:
|
|
2784
2800
|
"""Get a provider.
|
|
2785
2801
|
|