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.

@@ -91,6 +91,8 @@ class ComplexValue:
91
91
 
92
92
  primary: Optional[bool] = None
93
93
 
94
+ ref: Optional[str] = None
95
+
94
96
  type: Optional[str] = None
95
97
 
96
98
  value: Optional[str] = None
@@ -100,6 +102,7 @@ class ComplexValue:
100
102
  body = {}
101
103
  if self.display is not None: body['display'] = self.display
102
104
  if self.primary is not None: body['primary'] = self.primary
105
+ if self.ref is not None: body['$ref'] = self.ref
103
106
  if self.type is not None: body['type'] = self.type
104
107
  if self.value is not None: body['value'] = self.value
105
108
  return body
@@ -109,6 +112,7 @@ class ComplexValue:
109
112
  """Deserializes the ComplexValue from a dictionary."""
110
113
  return cls(display=d.get('display', None),
111
114
  primary=d.get('primary', None),
115
+ ref=d.get('$ref', None),
112
116
  type=d.get('type', None),
113
117
  value=d.get('value', None))
114
118
 
@@ -1173,6 +1177,7 @@ class AccountAccessControlAPI:
1173
1177
  query = {}
1174
1178
  if resource is not None: query['resource'] = resource
1175
1179
  headers = {'Accept': 'application/json', }
1180
+
1176
1181
  res = self._api.do(
1177
1182
  'GET',
1178
1183
  f'/api/2.0/preview/accounts/{self._api.account_id}/access-control/assignable-roles',
@@ -1203,6 +1208,7 @@ class AccountAccessControlAPI:
1203
1208
  if etag is not None: query['etag'] = etag
1204
1209
  if name is not None: query['name'] = name
1205
1210
  headers = {'Accept': 'application/json', }
1211
+
1206
1212
  res = self._api.do('GET',
1207
1213
  f'/api/2.0/preview/accounts/{self._api.account_id}/access-control/rule-sets',
1208
1214
  query=query,
@@ -1225,6 +1231,7 @@ class AccountAccessControlAPI:
1225
1231
  if name is not None: body['name'] = name
1226
1232
  if rule_set is not None: body['rule_set'] = rule_set.as_dict()
1227
1233
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1234
+
1228
1235
  res = self._api.do('PUT',
1229
1236
  f'/api/2.0/preview/accounts/{self._api.account_id}/access-control/rule-sets',
1230
1237
  body=body,
@@ -1255,6 +1262,7 @@ class AccountAccessControlProxyAPI:
1255
1262
  query = {}
1256
1263
  if resource is not None: query['resource'] = resource
1257
1264
  headers = {'Accept': 'application/json', }
1265
+
1258
1266
  res = self._api.do('GET',
1259
1267
  '/api/2.0/preview/accounts/access-control/assignable-roles',
1260
1268
  query=query,
@@ -1284,6 +1292,7 @@ class AccountAccessControlProxyAPI:
1284
1292
  if etag is not None: query['etag'] = etag
1285
1293
  if name is not None: query['name'] = name
1286
1294
  headers = {'Accept': 'application/json', }
1295
+
1287
1296
  res = self._api.do('GET',
1288
1297
  '/api/2.0/preview/accounts/access-control/rule-sets',
1289
1298
  query=query,
@@ -1306,6 +1315,7 @@ class AccountAccessControlProxyAPI:
1306
1315
  if name is not None: body['name'] = name
1307
1316
  if rule_set is not None: body['rule_set'] = rule_set.as_dict()
1308
1317
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1318
+
1309
1319
  res = self._api.do('PUT',
1310
1320
  '/api/2.0/preview/accounts/access-control/rule-sets',
1311
1321
  body=body,
@@ -1371,6 +1381,7 @@ class AccountGroupsAPI:
1371
1381
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1372
1382
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1373
1383
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1384
+
1374
1385
  res = self._api.do('POST',
1375
1386
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups',
1376
1387
  body=body,
@@ -1389,6 +1400,7 @@ class AccountGroupsAPI:
1389
1400
  """
1390
1401
 
1391
1402
  headers = {}
1403
+
1392
1404
  self._api.do('DELETE',
1393
1405
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1394
1406
  headers=headers)
@@ -1405,6 +1417,7 @@ class AccountGroupsAPI:
1405
1417
  """
1406
1418
 
1407
1419
  headers = {'Accept': 'application/json', }
1420
+
1408
1421
  res = self._api.do('GET',
1409
1422
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1410
1423
  headers=headers)
@@ -1497,6 +1510,7 @@ class AccountGroupsAPI:
1497
1510
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
1498
1511
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1499
1512
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1513
+
1500
1514
  self._api.do('PATCH',
1501
1515
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1502
1516
  body=body,
@@ -1548,6 +1562,7 @@ class AccountGroupsAPI:
1548
1562
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1549
1563
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1550
1564
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1565
+
1551
1566
  self._api.do('PUT',
1552
1567
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1553
1568
  body=body,
@@ -1612,6 +1627,7 @@ class AccountServicePrincipalsAPI:
1612
1627
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1613
1628
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1614
1629
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1630
+
1615
1631
  res = self._api.do('POST',
1616
1632
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals',
1617
1633
  body=body,
@@ -1630,6 +1646,7 @@ class AccountServicePrincipalsAPI:
1630
1646
  """
1631
1647
 
1632
1648
  headers = {}
1649
+
1633
1650
  self._api.do('DELETE',
1634
1651
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1635
1652
  headers=headers)
@@ -1646,6 +1663,7 @@ class AccountServicePrincipalsAPI:
1646
1663
  """
1647
1664
 
1648
1665
  headers = {'Accept': 'application/json', }
1666
+
1649
1667
  res = self._api.do('GET',
1650
1668
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1651
1669
  headers=headers)
@@ -1738,6 +1756,7 @@ class AccountServicePrincipalsAPI:
1738
1756
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
1739
1757
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1740
1758
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1759
+
1741
1760
  self._api.do('PATCH',
1742
1761
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1743
1762
  body=body,
@@ -1792,6 +1811,7 @@ class AccountServicePrincipalsAPI:
1792
1811
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1793
1812
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1794
1813
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1814
+
1795
1815
  self._api.do('PUT',
1796
1816
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1797
1817
  body=body,
@@ -1873,6 +1893,7 @@ class AccountUsersAPI:
1873
1893
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1874
1894
  if user_name is not None: body['userName'] = user_name
1875
1895
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1896
+
1876
1897
  res = self._api.do('POST',
1877
1898
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users',
1878
1899
  body=body,
@@ -1892,6 +1913,7 @@ class AccountUsersAPI:
1892
1913
  """
1893
1914
 
1894
1915
  headers = {}
1916
+
1895
1917
  self._api.do('DELETE',
1896
1918
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
1897
1919
  headers=headers)
@@ -1945,6 +1967,7 @@ class AccountUsersAPI:
1945
1967
  if sort_order is not None: query['sortOrder'] = sort_order.value
1946
1968
  if start_index is not None: query['startIndex'] = start_index
1947
1969
  headers = {'Accept': 'application/json', }
1970
+
1948
1971
  res = self._api.do('GET',
1949
1972
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
1950
1973
  query=query,
@@ -2039,6 +2062,7 @@ class AccountUsersAPI:
2039
2062
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2040
2063
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2041
2064
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2065
+
2042
2066
  self._api.do('PATCH',
2043
2067
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
2044
2068
  body=body,
@@ -2103,6 +2127,7 @@ class AccountUsersAPI:
2103
2127
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2104
2128
  if user_name is not None: body['userName'] = user_name
2105
2129
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2130
+
2106
2131
  self._api.do('PUT',
2107
2132
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
2108
2133
  body=body,
@@ -2124,6 +2149,7 @@ class CurrentUserAPI:
2124
2149
  """
2125
2150
 
2126
2151
  headers = {'Accept': 'application/json', }
2152
+
2127
2153
  res = self._api.do('GET', '/api/2.0/preview/scim/v2/Me', headers=headers)
2128
2154
  return User.from_dict(res)
2129
2155
 
@@ -2186,6 +2212,7 @@ class GroupsAPI:
2186
2212
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2187
2213
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2188
2214
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2215
+
2189
2216
  res = self._api.do('POST', '/api/2.0/preview/scim/v2/Groups', body=body, headers=headers)
2190
2217
  return Group.from_dict(res)
2191
2218
 
@@ -2201,6 +2228,7 @@ class GroupsAPI:
2201
2228
  """
2202
2229
 
2203
2230
  headers = {}
2231
+
2204
2232
  self._api.do('DELETE', f'/api/2.0/preview/scim/v2/Groups/{id}', headers=headers)
2205
2233
 
2206
2234
  def get(self, id: str) -> Group:
@@ -2215,6 +2243,7 @@ class GroupsAPI:
2215
2243
  """
2216
2244
 
2217
2245
  headers = {'Accept': 'application/json', }
2246
+
2218
2247
  res = self._api.do('GET', f'/api/2.0/preview/scim/v2/Groups/{id}', headers=headers)
2219
2248
  return Group.from_dict(res)
2220
2249
 
@@ -2302,6 +2331,7 @@ class GroupsAPI:
2302
2331
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2303
2332
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2304
2333
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2334
+
2305
2335
  self._api.do('PATCH', f'/api/2.0/preview/scim/v2/Groups/{id}', body=body, headers=headers)
2306
2336
 
2307
2337
  def update(self,
@@ -2350,6 +2380,7 @@ class GroupsAPI:
2350
2380
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2351
2381
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2352
2382
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2383
+
2353
2384
  self._api.do('PUT', f'/api/2.0/preview/scim/v2/Groups/{id}', body=body, headers=headers)
2354
2385
 
2355
2386
 
@@ -2419,6 +2450,7 @@ class PermissionsAPI:
2419
2450
  """
2420
2451
 
2421
2452
  headers = {'Accept': 'application/json', }
2453
+
2422
2454
  res = self._api.do('GET',
2423
2455
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}',
2424
2456
  headers=headers)
@@ -2439,6 +2471,7 @@ class PermissionsAPI:
2439
2471
  """
2440
2472
 
2441
2473
  headers = {'Accept': 'application/json', }
2474
+
2442
2475
  res = self._api.do('GET',
2443
2476
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}/permissionLevels',
2444
2477
  headers=headers)
@@ -2468,6 +2501,7 @@ class PermissionsAPI:
2468
2501
  if access_control_list is not None:
2469
2502
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
2470
2503
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2504
+
2471
2505
  res = self._api.do('PUT',
2472
2506
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}',
2473
2507
  body=body,
@@ -2498,6 +2532,7 @@ class PermissionsAPI:
2498
2532
  if access_control_list is not None:
2499
2533
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
2500
2534
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2535
+
2501
2536
  res = self._api.do('PATCH',
2502
2537
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}',
2503
2538
  body=body,
@@ -2563,6 +2598,7 @@ class ServicePrincipalsAPI:
2563
2598
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2564
2599
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2565
2600
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2601
+
2566
2602
  res = self._api.do('POST', '/api/2.0/preview/scim/v2/ServicePrincipals', body=body, headers=headers)
2567
2603
  return ServicePrincipal.from_dict(res)
2568
2604
 
@@ -2578,6 +2614,7 @@ class ServicePrincipalsAPI:
2578
2614
  """
2579
2615
 
2580
2616
  headers = {}
2617
+
2581
2618
  self._api.do('DELETE', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', headers=headers)
2582
2619
 
2583
2620
  def get(self, id: str) -> ServicePrincipal:
@@ -2592,6 +2629,7 @@ class ServicePrincipalsAPI:
2592
2629
  """
2593
2630
 
2594
2631
  headers = {'Accept': 'application/json', }
2632
+
2595
2633
  res = self._api.do('GET', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', headers=headers)
2596
2634
  return ServicePrincipal.from_dict(res)
2597
2635
 
@@ -2682,6 +2720,7 @@ class ServicePrincipalsAPI:
2682
2720
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2683
2721
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2684
2722
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2723
+
2685
2724
  self._api.do('PATCH', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', body=body, headers=headers)
2686
2725
 
2687
2726
  def update(self,
@@ -2733,6 +2772,7 @@ class ServicePrincipalsAPI:
2733
2772
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2734
2773
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2735
2774
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2775
+
2736
2776
  self._api.do('PUT', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', body=body, headers=headers)
2737
2777
 
2738
2778
 
@@ -2811,6 +2851,7 @@ class UsersAPI:
2811
2851
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2812
2852
  if user_name is not None: body['userName'] = user_name
2813
2853
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2854
+
2814
2855
  res = self._api.do('POST', '/api/2.0/preview/scim/v2/Users', body=body, headers=headers)
2815
2856
  return User.from_dict(res)
2816
2857
 
@@ -2827,6 +2868,7 @@ class UsersAPI:
2827
2868
  """
2828
2869
 
2829
2870
  headers = {}
2871
+
2830
2872
  self._api.do('DELETE', f'/api/2.0/preview/scim/v2/Users/{id}', headers=headers)
2831
2873
 
2832
2874
  def get(self,
@@ -2878,6 +2920,7 @@ class UsersAPI:
2878
2920
  if sort_order is not None: query['sortOrder'] = sort_order.value
2879
2921
  if start_index is not None: query['startIndex'] = start_index
2880
2922
  headers = {'Accept': 'application/json', }
2923
+
2881
2924
  res = self._api.do('GET', f'/api/2.0/preview/scim/v2/Users/{id}', query=query, headers=headers)
2882
2925
  return User.from_dict(res)
2883
2926
 
@@ -2890,6 +2933,7 @@ class UsersAPI:
2890
2933
  """
2891
2934
 
2892
2935
  headers = {'Accept': 'application/json', }
2936
+
2893
2937
  res = self._api.do('GET',
2894
2938
  '/api/2.0/permissions/authorization/passwords/permissionLevels',
2895
2939
  headers=headers)
@@ -2904,6 +2948,7 @@ class UsersAPI:
2904
2948
  """
2905
2949
 
2906
2950
  headers = {'Accept': 'application/json', }
2951
+
2907
2952
  res = self._api.do('GET', '/api/2.0/permissions/authorization/passwords', headers=headers)
2908
2953
  return PasswordPermissions.from_dict(res)
2909
2954
 
@@ -2992,6 +3037,7 @@ class UsersAPI:
2992
3037
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2993
3038
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2994
3039
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3040
+
2995
3041
  self._api.do('PATCH', f'/api/2.0/preview/scim/v2/Users/{id}', body=body, headers=headers)
2996
3042
 
2997
3043
  def set_permissions(
@@ -3010,6 +3056,7 @@ class UsersAPI:
3010
3056
  if access_control_list is not None:
3011
3057
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
3012
3058
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3059
+
3013
3060
  res = self._api.do('PUT', '/api/2.0/permissions/authorization/passwords', body=body, headers=headers)
3014
3061
  return PasswordPermissions.from_dict(res)
3015
3062
 
@@ -3072,6 +3119,7 @@ class UsersAPI:
3072
3119
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
3073
3120
  if user_name is not None: body['userName'] = user_name
3074
3121
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3122
+
3075
3123
  self._api.do('PUT', f'/api/2.0/preview/scim/v2/Users/{id}', body=body, headers=headers)
3076
3124
 
3077
3125
  def update_permissions(
@@ -3090,6 +3138,7 @@ class UsersAPI:
3090
3138
  if access_control_list is not None:
3091
3139
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
3092
3140
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3141
+
3093
3142
  res = self._api.do('PATCH',
3094
3143
  '/api/2.0/permissions/authorization/passwords',
3095
3144
  body=body,
@@ -3119,6 +3168,7 @@ class WorkspaceAssignmentAPI:
3119
3168
  """
3120
3169
 
3121
3170
  headers = {'Accept': 'application/json', }
3171
+
3122
3172
  self._api.do(
3123
3173
  'DELETE',
3124
3174
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments/principals/{principal_id}',
@@ -3136,6 +3186,7 @@ class WorkspaceAssignmentAPI:
3136
3186
  """
3137
3187
 
3138
3188
  headers = {'Accept': 'application/json', }
3189
+
3139
3190
  res = self._api.do(
3140
3191
  'GET',
3141
3192
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments/permissions',
@@ -3154,6 +3205,7 @@ class WorkspaceAssignmentAPI:
3154
3205
  """
3155
3206
 
3156
3207
  headers = {'Accept': 'application/json', }
3208
+
3157
3209
  json = self._api.do(
3158
3210
  'GET',
3159
3211
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments',
@@ -3179,6 +3231,7 @@ class WorkspaceAssignmentAPI:
3179
3231
  body = {}
3180
3232
  if permissions is not None: body['permissions'] = [v.value for v in permissions]
3181
3233
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3234
+
3182
3235
  self._api.do(
3183
3236
  'PUT',
3184
3237
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments/principals/{principal_id}',