databricks-sdk 0.19.1__py3-none-any.whl → 0.20.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 +8 -1
- databricks/sdk/core.py +4 -2
- databricks/sdk/mixins/workspace.py +2 -1
- databricks/sdk/service/billing.py +22 -1
- databricks/sdk/service/catalog.py +557 -46
- databricks/sdk/service/compute.py +57 -0
- databricks/sdk/service/dashboards.py +1 -0
- databricks/sdk/service/files.py +147 -15
- databricks/sdk/service/iam.py +53 -0
- databricks/sdk/service/jobs.py +147 -135
- databricks/sdk/service/ml.py +57 -0
- databricks/sdk/service/oauth2.py +13 -0
- databricks/sdk/service/pipelines.py +12 -0
- databricks/sdk/service/provisioning.py +30 -0
- databricks/sdk/service/serving.py +73 -35
- databricks/sdk/service/settings.py +41 -0
- databricks/sdk/service/sharing.py +38 -18
- databricks/sdk/service/sql.py +92 -2
- databricks/sdk/service/vectorsearch.py +10 -0
- databricks/sdk/service/workspace.py +34 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.20.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.20.0.dist-info}/RECORD +27 -27
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.20.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.20.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.20.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.20.0.dist-info}/top_level.txt +0 -0
|
@@ -1615,6 +1615,7 @@ class AccountIpAccessListsAPI:
|
|
|
1615
1615
|
if label is not None: body['label'] = label
|
|
1616
1616
|
if list_type is not None: body['list_type'] = list_type.value
|
|
1617
1617
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1618
|
+
|
|
1618
1619
|
res = self._api.do('POST',
|
|
1619
1620
|
f'/api/2.0/accounts/{self._api.account_id}/ip-access-lists',
|
|
1620
1621
|
body=body,
|
|
@@ -1633,6 +1634,7 @@ class AccountIpAccessListsAPI:
|
|
|
1633
1634
|
"""
|
|
1634
1635
|
|
|
1635
1636
|
headers = {'Accept': 'application/json', }
|
|
1637
|
+
|
|
1636
1638
|
self._api.do('DELETE',
|
|
1637
1639
|
f'/api/2.0/accounts/{self._api.account_id}/ip-access-lists/{ip_access_list_id}',
|
|
1638
1640
|
headers=headers)
|
|
@@ -1649,6 +1651,7 @@ class AccountIpAccessListsAPI:
|
|
|
1649
1651
|
"""
|
|
1650
1652
|
|
|
1651
1653
|
headers = {'Accept': 'application/json', }
|
|
1654
|
+
|
|
1652
1655
|
res = self._api.do('GET',
|
|
1653
1656
|
f'/api/2.0/accounts/{self._api.account_id}/ip-access-lists/{ip_access_list_id}',
|
|
1654
1657
|
headers=headers)
|
|
@@ -1663,6 +1666,7 @@ class AccountIpAccessListsAPI:
|
|
|
1663
1666
|
"""
|
|
1664
1667
|
|
|
1665
1668
|
headers = {'Accept': 'application/json', }
|
|
1669
|
+
|
|
1666
1670
|
json = self._api.do('GET',
|
|
1667
1671
|
f'/api/2.0/accounts/{self._api.account_id}/ip-access-lists',
|
|
1668
1672
|
headers=headers)
|
|
@@ -1709,6 +1713,7 @@ class AccountIpAccessListsAPI:
|
|
|
1709
1713
|
if label is not None: body['label'] = label
|
|
1710
1714
|
if list_type is not None: body['list_type'] = list_type.value
|
|
1711
1715
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1716
|
+
|
|
1712
1717
|
self._api.do('PUT',
|
|
1713
1718
|
f'/api/2.0/accounts/{self._api.account_id}/ip-access-lists/{ip_access_list_id}',
|
|
1714
1719
|
body=body,
|
|
@@ -1758,6 +1763,7 @@ class AccountIpAccessListsAPI:
|
|
|
1758
1763
|
if label is not None: body['label'] = label
|
|
1759
1764
|
if list_type is not None: body['list_type'] = list_type.value
|
|
1760
1765
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1766
|
+
|
|
1761
1767
|
self._api.do('PATCH',
|
|
1762
1768
|
f'/api/2.0/accounts/{self._api.account_id}/ip-access-lists/{ip_access_list_id}',
|
|
1763
1769
|
body=body,
|
|
@@ -1796,6 +1802,7 @@ class AccountSettingsAPI:
|
|
|
1796
1802
|
query = {}
|
|
1797
1803
|
if etag is not None: query['etag'] = etag
|
|
1798
1804
|
headers = {'Accept': 'application/json', }
|
|
1805
|
+
|
|
1799
1806
|
res = self._api.do(
|
|
1800
1807
|
'DELETE',
|
|
1801
1808
|
f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
|
|
@@ -1821,6 +1828,7 @@ class AccountSettingsAPI:
|
|
|
1821
1828
|
query = {}
|
|
1822
1829
|
if etag is not None: query['etag'] = etag
|
|
1823
1830
|
headers = {'Accept': 'application/json', }
|
|
1831
|
+
|
|
1824
1832
|
res = self._api.do(
|
|
1825
1833
|
'GET',
|
|
1826
1834
|
f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
|
|
@@ -1849,6 +1857,7 @@ class AccountSettingsAPI:
|
|
|
1849
1857
|
if field_mask is not None: body['field_mask'] = field_mask
|
|
1850
1858
|
if setting is not None: body['setting'] = setting.as_dict()
|
|
1851
1859
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1860
|
+
|
|
1852
1861
|
res = self._api.do(
|
|
1853
1862
|
'PATCH',
|
|
1854
1863
|
f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
|
|
@@ -1885,6 +1894,7 @@ class CredentialsManagerAPI:
|
|
|
1885
1894
|
if scopes is not None: body['scopes'] = [v for v in scopes]
|
|
1886
1895
|
if token_type is not None: body['tokenType'] = [v.value for v in token_type]
|
|
1887
1896
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1897
|
+
|
|
1888
1898
|
res = self._api.do('POST',
|
|
1889
1899
|
'/api/2.0/credentials-manager/exchange-tokens/token',
|
|
1890
1900
|
body=body,
|
|
@@ -1952,6 +1962,7 @@ class IpAccessListsAPI:
|
|
|
1952
1962
|
if label is not None: body['label'] = label
|
|
1953
1963
|
if list_type is not None: body['list_type'] = list_type.value
|
|
1954
1964
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1965
|
+
|
|
1955
1966
|
res = self._api.do('POST', '/api/2.0/ip-access-lists', body=body, headers=headers)
|
|
1956
1967
|
return CreateIpAccessListResponse.from_dict(res)
|
|
1957
1968
|
|
|
@@ -1967,6 +1978,7 @@ class IpAccessListsAPI:
|
|
|
1967
1978
|
"""
|
|
1968
1979
|
|
|
1969
1980
|
headers = {'Accept': 'application/json', }
|
|
1981
|
+
|
|
1970
1982
|
self._api.do('DELETE', f'/api/2.0/ip-access-lists/{ip_access_list_id}', headers=headers)
|
|
1971
1983
|
|
|
1972
1984
|
def get(self, ip_access_list_id: str) -> FetchIpAccessListResponse:
|
|
@@ -1981,6 +1993,7 @@ class IpAccessListsAPI:
|
|
|
1981
1993
|
"""
|
|
1982
1994
|
|
|
1983
1995
|
headers = {'Accept': 'application/json', }
|
|
1996
|
+
|
|
1984
1997
|
res = self._api.do('GET', f'/api/2.0/ip-access-lists/{ip_access_list_id}', headers=headers)
|
|
1985
1998
|
return FetchIpAccessListResponse.from_dict(res)
|
|
1986
1999
|
|
|
@@ -1993,6 +2006,7 @@ class IpAccessListsAPI:
|
|
|
1993
2006
|
"""
|
|
1994
2007
|
|
|
1995
2008
|
headers = {'Accept': 'application/json', }
|
|
2009
|
+
|
|
1996
2010
|
json = self._api.do('GET', '/api/2.0/ip-access-lists', headers=headers)
|
|
1997
2011
|
parsed = ListIpAccessListResponse.from_dict(json).ip_access_lists
|
|
1998
2012
|
return parsed if parsed is not None else []
|
|
@@ -2038,6 +2052,7 @@ class IpAccessListsAPI:
|
|
|
2038
2052
|
if label is not None: body['label'] = label
|
|
2039
2053
|
if list_type is not None: body['list_type'] = list_type.value
|
|
2040
2054
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2055
|
+
|
|
2041
2056
|
self._api.do('PUT', f'/api/2.0/ip-access-lists/{ip_access_list_id}', body=body, headers=headers)
|
|
2042
2057
|
|
|
2043
2058
|
def update(self,
|
|
@@ -2085,6 +2100,7 @@ class IpAccessListsAPI:
|
|
|
2085
2100
|
if label is not None: body['label'] = label
|
|
2086
2101
|
if list_type is not None: body['list_type'] = list_type.value
|
|
2087
2102
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2103
|
+
|
|
2088
2104
|
self._api.do('PATCH', f'/api/2.0/ip-access-lists/{ip_access_list_id}', body=body, headers=headers)
|
|
2089
2105
|
|
|
2090
2106
|
|
|
@@ -2130,6 +2146,7 @@ class NetworkConnectivityAPI:
|
|
|
2130
2146
|
if name is not None: body['name'] = name
|
|
2131
2147
|
if region is not None: body['region'] = region
|
|
2132
2148
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2149
|
+
|
|
2133
2150
|
res = self._api.do('POST',
|
|
2134
2151
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs',
|
|
2135
2152
|
body=body,
|
|
@@ -2165,6 +2182,7 @@ class NetworkConnectivityAPI:
|
|
|
2165
2182
|
if group_id is not None: body['group_id'] = group_id.value
|
|
2166
2183
|
if resource_id is not None: body['resource_id'] = resource_id
|
|
2167
2184
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2185
|
+
|
|
2168
2186
|
res = self._api.do(
|
|
2169
2187
|
'POST',
|
|
2170
2188
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs/{network_connectivity_config_id}/private-endpoint-rules',
|
|
@@ -2184,6 +2202,7 @@ class NetworkConnectivityAPI:
|
|
|
2184
2202
|
"""
|
|
2185
2203
|
|
|
2186
2204
|
headers = {'Accept': 'application/json', }
|
|
2205
|
+
|
|
2187
2206
|
self._api.do(
|
|
2188
2207
|
'DELETE',
|
|
2189
2208
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs/{network_connectivity_config_id}',
|
|
@@ -2207,6 +2226,7 @@ class NetworkConnectivityAPI:
|
|
|
2207
2226
|
"""
|
|
2208
2227
|
|
|
2209
2228
|
headers = {'Accept': 'application/json', }
|
|
2229
|
+
|
|
2210
2230
|
res = self._api.do(
|
|
2211
2231
|
'DELETE',
|
|
2212
2232
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs/{network_connectivity_config_id}/private-endpoint-rules/{private_endpoint_rule_id}',
|
|
@@ -2226,6 +2246,7 @@ class NetworkConnectivityAPI:
|
|
|
2226
2246
|
"""
|
|
2227
2247
|
|
|
2228
2248
|
headers = {'Accept': 'application/json', }
|
|
2249
|
+
|
|
2229
2250
|
res = self._api.do(
|
|
2230
2251
|
'GET',
|
|
2231
2252
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs/{network_connectivity_config_id}',
|
|
@@ -2247,6 +2268,7 @@ class NetworkConnectivityAPI:
|
|
|
2247
2268
|
"""
|
|
2248
2269
|
|
|
2249
2270
|
headers = {'Accept': 'application/json', }
|
|
2271
|
+
|
|
2250
2272
|
res = self._api.do(
|
|
2251
2273
|
'GET',
|
|
2252
2274
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs/{network_connectivity_config_id}/private-endpoint-rules/{private_endpoint_rule_id}',
|
|
@@ -2356,6 +2378,7 @@ class SettingsAPI:
|
|
|
2356
2378
|
query = {}
|
|
2357
2379
|
if etag is not None: query['etag'] = etag
|
|
2358
2380
|
headers = {'Accept': 'application/json', }
|
|
2381
|
+
|
|
2359
2382
|
res = self._api.do('DELETE',
|
|
2360
2383
|
'/api/2.0/settings/types/default_namespace_ws/names/default',
|
|
2361
2384
|
query=query,
|
|
@@ -2386,6 +2409,7 @@ class SettingsAPI:
|
|
|
2386
2409
|
query = {}
|
|
2387
2410
|
if etag is not None: query['etag'] = etag
|
|
2388
2411
|
headers = {'Accept': 'application/json', }
|
|
2412
|
+
|
|
2389
2413
|
res = self._api.do('DELETE',
|
|
2390
2414
|
'/api/2.0/settings/types/restrict_workspace_admins/names/default',
|
|
2391
2415
|
query=query,
|
|
@@ -2410,6 +2434,7 @@ class SettingsAPI:
|
|
|
2410
2434
|
query = {}
|
|
2411
2435
|
if etag is not None: query['etag'] = etag
|
|
2412
2436
|
headers = {'Accept': 'application/json', }
|
|
2437
|
+
|
|
2413
2438
|
res = self._api.do('GET',
|
|
2414
2439
|
'/api/2.0/settings/types/default_namespace_ws/names/default',
|
|
2415
2440
|
query=query,
|
|
@@ -2436,6 +2461,7 @@ class SettingsAPI:
|
|
|
2436
2461
|
query = {}
|
|
2437
2462
|
if etag is not None: query['etag'] = etag
|
|
2438
2463
|
headers = {'Accept': 'application/json', }
|
|
2464
|
+
|
|
2439
2465
|
res = self._api.do('GET',
|
|
2440
2466
|
'/api/2.0/settings/types/restrict_workspace_admins/names/default',
|
|
2441
2467
|
query=query,
|
|
@@ -2475,6 +2501,7 @@ class SettingsAPI:
|
|
|
2475
2501
|
if field_mask is not None: body['field_mask'] = field_mask
|
|
2476
2502
|
if setting is not None: body['setting'] = setting.as_dict()
|
|
2477
2503
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2504
|
+
|
|
2478
2505
|
res = self._api.do('PATCH',
|
|
2479
2506
|
'/api/2.0/settings/types/default_namespace_ws/names/default',
|
|
2480
2507
|
body=body,
|
|
@@ -2506,6 +2533,7 @@ class SettingsAPI:
|
|
|
2506
2533
|
if field_mask is not None: body['field_mask'] = field_mask
|
|
2507
2534
|
if setting is not None: body['setting'] = setting.as_dict()
|
|
2508
2535
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2536
|
+
|
|
2509
2537
|
res = self._api.do('PATCH',
|
|
2510
2538
|
'/api/2.0/settings/types/restrict_workspace_admins/names/default',
|
|
2511
2539
|
body=body,
|
|
@@ -2543,6 +2571,7 @@ class TokenManagementAPI:
|
|
|
2543
2571
|
if comment is not None: body['comment'] = comment
|
|
2544
2572
|
if lifetime_seconds is not None: body['lifetime_seconds'] = lifetime_seconds
|
|
2545
2573
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2574
|
+
|
|
2546
2575
|
res = self._api.do('POST',
|
|
2547
2576
|
'/api/2.0/token-management/on-behalf-of/tokens',
|
|
2548
2577
|
body=body,
|
|
@@ -2561,6 +2590,7 @@ class TokenManagementAPI:
|
|
|
2561
2590
|
"""
|
|
2562
2591
|
|
|
2563
2592
|
headers = {'Accept': 'application/json', }
|
|
2593
|
+
|
|
2564
2594
|
self._api.do('DELETE', f'/api/2.0/token-management/tokens/{token_id}', headers=headers)
|
|
2565
2595
|
|
|
2566
2596
|
def get(self, token_id: str) -> GetTokenResponse:
|
|
@@ -2575,6 +2605,7 @@ class TokenManagementAPI:
|
|
|
2575
2605
|
"""
|
|
2576
2606
|
|
|
2577
2607
|
headers = {'Accept': 'application/json', }
|
|
2608
|
+
|
|
2578
2609
|
res = self._api.do('GET', f'/api/2.0/token-management/tokens/{token_id}', headers=headers)
|
|
2579
2610
|
return GetTokenResponse.from_dict(res)
|
|
2580
2611
|
|
|
@@ -2587,6 +2618,7 @@ class TokenManagementAPI:
|
|
|
2587
2618
|
"""
|
|
2588
2619
|
|
|
2589
2620
|
headers = {'Accept': 'application/json', }
|
|
2621
|
+
|
|
2590
2622
|
res = self._api.do('GET',
|
|
2591
2623
|
'/api/2.0/permissions/authorization/tokens/permissionLevels',
|
|
2592
2624
|
headers=headers)
|
|
@@ -2601,6 +2633,7 @@ class TokenManagementAPI:
|
|
|
2601
2633
|
"""
|
|
2602
2634
|
|
|
2603
2635
|
headers = {'Accept': 'application/json', }
|
|
2636
|
+
|
|
2604
2637
|
res = self._api.do('GET', '/api/2.0/permissions/authorization/tokens', headers=headers)
|
|
2605
2638
|
return TokenPermissions.from_dict(res)
|
|
2606
2639
|
|
|
@@ -2624,6 +2657,7 @@ class TokenManagementAPI:
|
|
|
2624
2657
|
if created_by_id is not None: query['created_by_id'] = created_by_id
|
|
2625
2658
|
if created_by_username is not None: query['created_by_username'] = created_by_username
|
|
2626
2659
|
headers = {'Accept': 'application/json', }
|
|
2660
|
+
|
|
2627
2661
|
json = self._api.do('GET', '/api/2.0/token-management/tokens', query=query, headers=headers)
|
|
2628
2662
|
parsed = ListTokensResponse.from_dict(json).token_infos
|
|
2629
2663
|
return parsed if parsed is not None else []
|
|
@@ -2644,6 +2678,7 @@ class TokenManagementAPI:
|
|
|
2644
2678
|
if access_control_list is not None:
|
|
2645
2679
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
2646
2680
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2681
|
+
|
|
2647
2682
|
res = self._api.do('PUT', '/api/2.0/permissions/authorization/tokens', body=body, headers=headers)
|
|
2648
2683
|
return TokenPermissions.from_dict(res)
|
|
2649
2684
|
|
|
@@ -2663,6 +2698,7 @@ class TokenManagementAPI:
|
|
|
2663
2698
|
if access_control_list is not None:
|
|
2664
2699
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
2665
2700
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2701
|
+
|
|
2666
2702
|
res = self._api.do('PATCH', '/api/2.0/permissions/authorization/tokens', body=body, headers=headers)
|
|
2667
2703
|
return TokenPermissions.from_dict(res)
|
|
2668
2704
|
|
|
@@ -2697,6 +2733,7 @@ class TokensAPI:
|
|
|
2697
2733
|
if comment is not None: body['comment'] = comment
|
|
2698
2734
|
if lifetime_seconds is not None: body['lifetime_seconds'] = lifetime_seconds
|
|
2699
2735
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2736
|
+
|
|
2700
2737
|
res = self._api.do('POST', '/api/2.0/token/create', body=body, headers=headers)
|
|
2701
2738
|
return CreateTokenResponse.from_dict(res)
|
|
2702
2739
|
|
|
@@ -2715,6 +2752,7 @@ class TokensAPI:
|
|
|
2715
2752
|
body = {}
|
|
2716
2753
|
if token_id is not None: body['token_id'] = token_id
|
|
2717
2754
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2755
|
+
|
|
2718
2756
|
self._api.do('POST', '/api/2.0/token/delete', body=body, headers=headers)
|
|
2719
2757
|
|
|
2720
2758
|
def list(self) -> Iterator[PublicTokenInfo]:
|
|
@@ -2726,6 +2764,7 @@ class TokensAPI:
|
|
|
2726
2764
|
"""
|
|
2727
2765
|
|
|
2728
2766
|
headers = {'Accept': 'application/json', }
|
|
2767
|
+
|
|
2729
2768
|
json = self._api.do('GET', '/api/2.0/token/list', headers=headers)
|
|
2730
2769
|
parsed = ListPublicTokensResponse.from_dict(json).token_infos
|
|
2731
2770
|
return parsed if parsed is not None else []
|
|
@@ -2750,6 +2789,7 @@ class WorkspaceConfAPI:
|
|
|
2750
2789
|
query = {}
|
|
2751
2790
|
if keys is not None: query['keys'] = keys
|
|
2752
2791
|
headers = {'Accept': 'application/json', }
|
|
2792
|
+
|
|
2753
2793
|
res = self._api.do('GET', '/api/2.0/workspace-conf', query=query, headers=headers)
|
|
2754
2794
|
return res
|
|
2755
2795
|
|
|
@@ -2763,4 +2803,5 @@ class WorkspaceConfAPI:
|
|
|
2763
2803
|
"""
|
|
2764
2804
|
|
|
2765
2805
|
headers = {'Content-Type': 'application/json', }
|
|
2806
|
+
|
|
2766
2807
|
self._api.do('PATCH', '/api/2.0/workspace-conf', body=contents, headers=headers)
|
|
@@ -1380,7 +1380,7 @@ class UpdateCleanRoom:
|
|
|
1380
1380
|
comment: Optional[str] = None
|
|
1381
1381
|
"""User-provided free-form text description."""
|
|
1382
1382
|
|
|
1383
|
-
|
|
1383
|
+
name: Optional[str] = None
|
|
1384
1384
|
"""The name of the clean room."""
|
|
1385
1385
|
|
|
1386
1386
|
owner: Optional[str] = None
|
|
@@ -1391,7 +1391,7 @@ class UpdateCleanRoom:
|
|
|
1391
1391
|
body = {}
|
|
1392
1392
|
if self.catalog_updates: body['catalog_updates'] = [v.as_dict() for v in self.catalog_updates]
|
|
1393
1393
|
if self.comment is not None: body['comment'] = self.comment
|
|
1394
|
-
if self.
|
|
1394
|
+
if self.name is not None: body['name'] = self.name
|
|
1395
1395
|
if self.owner is not None: body['owner'] = self.owner
|
|
1396
1396
|
return body
|
|
1397
1397
|
|
|
@@ -1400,7 +1400,7 @@ class UpdateCleanRoom:
|
|
|
1400
1400
|
"""Deserializes the UpdateCleanRoom from a dictionary."""
|
|
1401
1401
|
return cls(catalog_updates=_repeated_dict(d, 'catalog_updates', CleanRoomCatalogUpdate),
|
|
1402
1402
|
comment=d.get('comment', None),
|
|
1403
|
-
|
|
1403
|
+
name=d.get('name', None),
|
|
1404
1404
|
owner=d.get('owner', None))
|
|
1405
1405
|
|
|
1406
1406
|
|
|
@@ -1576,30 +1576,32 @@ class CleanRoomsAPI:
|
|
|
1576
1576
|
if name is not None: body['name'] = name
|
|
1577
1577
|
if remote_detailed_info is not None: body['remote_detailed_info'] = remote_detailed_info.as_dict()
|
|
1578
1578
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1579
|
+
|
|
1579
1580
|
res = self._api.do('POST', '/api/2.1/unity-catalog/clean-rooms', body=body, headers=headers)
|
|
1580
1581
|
return CleanRoomInfo.from_dict(res)
|
|
1581
1582
|
|
|
1582
|
-
def delete(self,
|
|
1583
|
+
def delete(self, name: str):
|
|
1583
1584
|
"""Delete a clean room.
|
|
1584
1585
|
|
|
1585
1586
|
Deletes a data object clean room from the metastore. The caller must be an owner of the clean room.
|
|
1586
1587
|
|
|
1587
|
-
:param
|
|
1588
|
+
:param name: str
|
|
1588
1589
|
The name of the clean room.
|
|
1589
1590
|
|
|
1590
1591
|
|
|
1591
1592
|
"""
|
|
1592
1593
|
|
|
1593
1594
|
headers = {'Accept': 'application/json', }
|
|
1594
|
-
self._api.do('DELETE', f'/api/2.1/unity-catalog/clean-rooms/{name_arg}', headers=headers)
|
|
1595
1595
|
|
|
1596
|
-
|
|
1596
|
+
self._api.do('DELETE', f'/api/2.1/unity-catalog/clean-rooms/{name}', headers=headers)
|
|
1597
|
+
|
|
1598
|
+
def get(self, name: str, *, include_remote_details: Optional[bool] = None) -> CleanRoomInfo:
|
|
1597
1599
|
"""Get a clean room.
|
|
1598
1600
|
|
|
1599
1601
|
Gets a data object clean room from the metastore. The caller must be a metastore admin or the owner of
|
|
1600
1602
|
the clean room.
|
|
1601
1603
|
|
|
1602
|
-
:param
|
|
1604
|
+
:param name: str
|
|
1603
1605
|
The name of the clean room.
|
|
1604
1606
|
:param include_remote_details: bool (optional)
|
|
1605
1607
|
Whether to include remote details (central) on the clean room.
|
|
@@ -1610,10 +1612,8 @@ class CleanRoomsAPI:
|
|
|
1610
1612
|
query = {}
|
|
1611
1613
|
if include_remote_details is not None: query['include_remote_details'] = include_remote_details
|
|
1612
1614
|
headers = {'Accept': 'application/json', }
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
query=query,
|
|
1616
|
-
headers=headers)
|
|
1615
|
+
|
|
1616
|
+
res = self._api.do('GET', f'/api/2.1/unity-catalog/clean-rooms/{name}', query=query, headers=headers)
|
|
1617
1617
|
return CleanRoomInfo.from_dict(res)
|
|
1618
1618
|
|
|
1619
1619
|
def list(self,
|
|
@@ -1652,7 +1652,7 @@ class CleanRoomsAPI:
|
|
|
1652
1652
|
query['page_token'] = json['next_page_token']
|
|
1653
1653
|
|
|
1654
1654
|
def update(self,
|
|
1655
|
-
|
|
1655
|
+
name: str,
|
|
1656
1656
|
*,
|
|
1657
1657
|
catalog_updates: Optional[List[CleanRoomCatalogUpdate]] = None,
|
|
1658
1658
|
comment: Optional[str] = None,
|
|
@@ -1673,7 +1673,7 @@ class CleanRoomsAPI:
|
|
|
1673
1673
|
|
|
1674
1674
|
Table removals through **update** do not require additional privileges.
|
|
1675
1675
|
|
|
1676
|
-
:param
|
|
1676
|
+
:param name: str
|
|
1677
1677
|
The name of the clean room.
|
|
1678
1678
|
:param catalog_updates: List[:class:`CleanRoomCatalogUpdate`] (optional)
|
|
1679
1679
|
Array of shared data object updates.
|
|
@@ -1689,10 +1689,8 @@ class CleanRoomsAPI:
|
|
|
1689
1689
|
if comment is not None: body['comment'] = comment
|
|
1690
1690
|
if owner is not None: body['owner'] = owner
|
|
1691
1691
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
body=body,
|
|
1695
|
-
headers=headers)
|
|
1692
|
+
|
|
1693
|
+
res = self._api.do('PATCH', f'/api/2.1/unity-catalog/clean-rooms/{name}', body=body, headers=headers)
|
|
1696
1694
|
return CleanRoomInfo.from_dict(res)
|
|
1697
1695
|
|
|
1698
1696
|
|
|
@@ -1731,6 +1729,7 @@ class ProvidersAPI:
|
|
|
1731
1729
|
if name is not None: body['name'] = name
|
|
1732
1730
|
if recipient_profile_str is not None: body['recipient_profile_str'] = recipient_profile_str
|
|
1733
1731
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1732
|
+
|
|
1734
1733
|
res = self._api.do('POST', '/api/2.1/unity-catalog/providers', body=body, headers=headers)
|
|
1735
1734
|
return ProviderInfo.from_dict(res)
|
|
1736
1735
|
|
|
@@ -1747,6 +1746,7 @@ class ProvidersAPI:
|
|
|
1747
1746
|
"""
|
|
1748
1747
|
|
|
1749
1748
|
headers = {'Accept': 'application/json', }
|
|
1749
|
+
|
|
1750
1750
|
self._api.do('DELETE', f'/api/2.1/unity-catalog/providers/{name}', headers=headers)
|
|
1751
1751
|
|
|
1752
1752
|
def get(self, name: str) -> ProviderInfo:
|
|
@@ -1762,6 +1762,7 @@ class ProvidersAPI:
|
|
|
1762
1762
|
"""
|
|
1763
1763
|
|
|
1764
1764
|
headers = {'Accept': 'application/json', }
|
|
1765
|
+
|
|
1765
1766
|
res = self._api.do('GET', f'/api/2.1/unity-catalog/providers/{name}', headers=headers)
|
|
1766
1767
|
return ProviderInfo.from_dict(res)
|
|
1767
1768
|
|
|
@@ -1783,6 +1784,7 @@ class ProvidersAPI:
|
|
|
1783
1784
|
if data_provider_global_metastore_id is not None:
|
|
1784
1785
|
query['data_provider_global_metastore_id'] = data_provider_global_metastore_id
|
|
1785
1786
|
headers = {'Accept': 'application/json', }
|
|
1787
|
+
|
|
1786
1788
|
json = self._api.do('GET', '/api/2.1/unity-catalog/providers', query=query, headers=headers)
|
|
1787
1789
|
parsed = ListProvidersResponse.from_dict(json).providers
|
|
1788
1790
|
return parsed if parsed is not None else []
|
|
@@ -1801,6 +1803,7 @@ class ProvidersAPI:
|
|
|
1801
1803
|
"""
|
|
1802
1804
|
|
|
1803
1805
|
headers = {'Accept': 'application/json', }
|
|
1806
|
+
|
|
1804
1807
|
json = self._api.do('GET', f'/api/2.1/unity-catalog/providers/{name}/shares', headers=headers)
|
|
1805
1808
|
parsed = ListProviderSharesResponse.from_dict(json).shares
|
|
1806
1809
|
return parsed if parsed is not None else []
|
|
@@ -1837,6 +1840,7 @@ class ProvidersAPI:
|
|
|
1837
1840
|
if owner is not None: body['owner'] = owner
|
|
1838
1841
|
if recipient_profile_str is not None: body['recipient_profile_str'] = recipient_profile_str
|
|
1839
1842
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1843
|
+
|
|
1840
1844
|
res = self._api.do('PATCH', f'/api/2.1/unity-catalog/providers/{name}', body=body, headers=headers)
|
|
1841
1845
|
return ProviderInfo.from_dict(res)
|
|
1842
1846
|
|
|
@@ -1865,6 +1869,7 @@ class RecipientActivationAPI:
|
|
|
1865
1869
|
"""
|
|
1866
1870
|
|
|
1867
1871
|
headers = {'Accept': 'application/json', }
|
|
1872
|
+
|
|
1868
1873
|
self._api.do('GET',
|
|
1869
1874
|
f'/api/2.1/unity-catalog/public/data_sharing_activation_info/{activation_url}',
|
|
1870
1875
|
headers=headers)
|
|
@@ -1881,6 +1886,7 @@ class RecipientActivationAPI:
|
|
|
1881
1886
|
"""
|
|
1882
1887
|
|
|
1883
1888
|
headers = {'Accept': 'application/json', }
|
|
1889
|
+
|
|
1884
1890
|
res = self._api.do('GET',
|
|
1885
1891
|
f'/api/2.1/unity-catalog/public/data_sharing_activation/{activation_url}',
|
|
1886
1892
|
headers=headers)
|
|
@@ -1953,6 +1959,7 @@ class RecipientsAPI:
|
|
|
1953
1959
|
if properties_kvpairs is not None: body['properties_kvpairs'] = properties_kvpairs.as_dict()
|
|
1954
1960
|
if sharing_code is not None: body['sharing_code'] = sharing_code
|
|
1955
1961
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1962
|
+
|
|
1956
1963
|
res = self._api.do('POST', '/api/2.1/unity-catalog/recipients', body=body, headers=headers)
|
|
1957
1964
|
return RecipientInfo.from_dict(res)
|
|
1958
1965
|
|
|
@@ -1968,6 +1975,7 @@ class RecipientsAPI:
|
|
|
1968
1975
|
"""
|
|
1969
1976
|
|
|
1970
1977
|
headers = {'Accept': 'application/json', }
|
|
1978
|
+
|
|
1971
1979
|
self._api.do('DELETE', f'/api/2.1/unity-catalog/recipients/{name}', headers=headers)
|
|
1972
1980
|
|
|
1973
1981
|
def get(self, name: str) -> RecipientInfo:
|
|
@@ -1984,6 +1992,7 @@ class RecipientsAPI:
|
|
|
1984
1992
|
"""
|
|
1985
1993
|
|
|
1986
1994
|
headers = {'Accept': 'application/json', }
|
|
1995
|
+
|
|
1987
1996
|
res = self._api.do('GET', f'/api/2.1/unity-catalog/recipients/{name}', headers=headers)
|
|
1988
1997
|
return RecipientInfo.from_dict(res)
|
|
1989
1998
|
|
|
@@ -2006,6 +2015,7 @@ class RecipientsAPI:
|
|
|
2006
2015
|
if data_recipient_global_metastore_id is not None:
|
|
2007
2016
|
query['data_recipient_global_metastore_id'] = data_recipient_global_metastore_id
|
|
2008
2017
|
headers = {'Accept': 'application/json', }
|
|
2018
|
+
|
|
2009
2019
|
json = self._api.do('GET', '/api/2.1/unity-catalog/recipients', query=query, headers=headers)
|
|
2010
2020
|
parsed = ListRecipientsResponse.from_dict(json).recipients
|
|
2011
2021
|
return parsed if parsed is not None else []
|
|
@@ -2029,6 +2039,7 @@ class RecipientsAPI:
|
|
|
2029
2039
|
if existing_token_expire_in_seconds is not None:
|
|
2030
2040
|
body['existing_token_expire_in_seconds'] = existing_token_expire_in_seconds
|
|
2031
2041
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2042
|
+
|
|
2032
2043
|
res = self._api.do('POST',
|
|
2033
2044
|
f'/api/2.1/unity-catalog/recipients/{name}/rotate-token',
|
|
2034
2045
|
body=body,
|
|
@@ -2048,6 +2059,7 @@ class RecipientsAPI:
|
|
|
2048
2059
|
"""
|
|
2049
2060
|
|
|
2050
2061
|
headers = {'Accept': 'application/json', }
|
|
2062
|
+
|
|
2051
2063
|
res = self._api.do('GET',
|
|
2052
2064
|
f'/api/2.1/unity-catalog/recipients/{name}/share-permissions',
|
|
2053
2065
|
headers=headers)
|
|
@@ -2091,6 +2103,7 @@ class RecipientsAPI:
|
|
|
2091
2103
|
if owner is not None: body['owner'] = owner
|
|
2092
2104
|
if properties_kvpairs is not None: body['properties_kvpairs'] = properties_kvpairs.as_dict()
|
|
2093
2105
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2106
|
+
|
|
2094
2107
|
self._api.do('PATCH', f'/api/2.1/unity-catalog/recipients/{name}', body=body, headers=headers)
|
|
2095
2108
|
|
|
2096
2109
|
|
|
@@ -2120,6 +2133,7 @@ class SharesAPI:
|
|
|
2120
2133
|
if comment is not None: body['comment'] = comment
|
|
2121
2134
|
if name is not None: body['name'] = name
|
|
2122
2135
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2136
|
+
|
|
2123
2137
|
res = self._api.do('POST', '/api/2.1/unity-catalog/shares', body=body, headers=headers)
|
|
2124
2138
|
return ShareInfo.from_dict(res)
|
|
2125
2139
|
|
|
@@ -2135,6 +2149,7 @@ class SharesAPI:
|
|
|
2135
2149
|
"""
|
|
2136
2150
|
|
|
2137
2151
|
headers = {'Accept': 'application/json', }
|
|
2152
|
+
|
|
2138
2153
|
self._api.do('DELETE', f'/api/2.1/unity-catalog/shares/{name}', headers=headers)
|
|
2139
2154
|
|
|
2140
2155
|
def get(self, name: str, *, include_shared_data: Optional[bool] = None) -> ShareInfo:
|
|
@@ -2154,6 +2169,7 @@ class SharesAPI:
|
|
|
2154
2169
|
query = {}
|
|
2155
2170
|
if include_shared_data is not None: query['include_shared_data'] = include_shared_data
|
|
2156
2171
|
headers = {'Accept': 'application/json', }
|
|
2172
|
+
|
|
2157
2173
|
res = self._api.do('GET', f'/api/2.1/unity-catalog/shares/{name}', query=query, headers=headers)
|
|
2158
2174
|
return ShareInfo.from_dict(res)
|
|
2159
2175
|
|
|
@@ -2167,6 +2183,7 @@ class SharesAPI:
|
|
|
2167
2183
|
"""
|
|
2168
2184
|
|
|
2169
2185
|
headers = {'Accept': 'application/json', }
|
|
2186
|
+
|
|
2170
2187
|
json = self._api.do('GET', '/api/2.1/unity-catalog/shares', headers=headers)
|
|
2171
2188
|
parsed = ListSharesResponse.from_dict(json).shares
|
|
2172
2189
|
return parsed if parsed is not None else []
|
|
@@ -2184,6 +2201,7 @@ class SharesAPI:
|
|
|
2184
2201
|
"""
|
|
2185
2202
|
|
|
2186
2203
|
headers = {'Accept': 'application/json', }
|
|
2204
|
+
|
|
2187
2205
|
res = self._api.do('GET', f'/api/2.1/unity-catalog/shares/{name}/permissions', headers=headers)
|
|
2188
2206
|
return PermissionsList.from_dict(res)
|
|
2189
2207
|
|
|
@@ -2229,6 +2247,7 @@ class SharesAPI:
|
|
|
2229
2247
|
if owner is not None: body['owner'] = owner
|
|
2230
2248
|
if updates is not None: body['updates'] = [v.as_dict() for v in updates]
|
|
2231
2249
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2250
|
+
|
|
2232
2251
|
res = self._api.do('PATCH', f'/api/2.1/unity-catalog/shares/{name}', body=body, headers=headers)
|
|
2233
2252
|
return ShareInfo.from_dict(res)
|
|
2234
2253
|
|
|
@@ -2251,4 +2270,5 @@ class SharesAPI:
|
|
|
2251
2270
|
body = {}
|
|
2252
2271
|
if changes is not None: body['changes'] = [v.as_dict() for v in changes]
|
|
2253
2272
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2273
|
+
|
|
2254
2274
|
self._api.do('PATCH', f'/api/2.1/unity-catalog/shares/{name}/permissions', body=body, headers=headers)
|