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
@@ -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,10 +112,39 @@ 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
 
115
119
 
120
+ @dataclass
121
+ class DeleteResponse:
122
+
123
+ def as_dict(self) -> dict:
124
+ """Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body."""
125
+ body = {}
126
+ return body
127
+
128
+ @classmethod
129
+ def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
130
+ """Deserializes the DeleteResponse from a dictionary."""
131
+ return cls()
132
+
133
+
134
+ @dataclass
135
+ class DeleteWorkspaceAssignments:
136
+
137
+ def as_dict(self) -> dict:
138
+ """Serializes the DeleteWorkspaceAssignments into a dictionary suitable for use as a JSON request body."""
139
+ body = {}
140
+ return body
141
+
142
+ @classmethod
143
+ def from_dict(cls, d: Dict[str, any]) -> DeleteWorkspaceAssignments:
144
+ """Deserializes the DeleteWorkspaceAssignments from a dictionary."""
145
+ return cls()
146
+
147
+
116
148
  @dataclass
117
149
  class GetAssignableRolesForResourceResponse:
118
150
  roles: Optional[List[Role]] = None
@@ -645,6 +677,20 @@ class PatchOp(Enum):
645
677
  REPLACE = 'replace'
646
678
 
647
679
 
680
+ @dataclass
681
+ class PatchResponse:
682
+
683
+ def as_dict(self) -> dict:
684
+ """Serializes the PatchResponse into a dictionary suitable for use as a JSON request body."""
685
+ body = {}
686
+ return body
687
+
688
+ @classmethod
689
+ def from_dict(cls, d: Dict[str, any]) -> PatchResponse:
690
+ """Deserializes the PatchResponse from a dictionary."""
691
+ return cls()
692
+
693
+
648
694
  class PatchSchema(Enum):
649
695
 
650
696
  URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP = 'urn:ietf:params:scim:api:messages:2.0:PatchOp'
@@ -740,6 +786,57 @@ class PermissionLevel(Enum):
740
786
  IS_OWNER = 'IS_OWNER'
741
787
 
742
788
 
789
+ @dataclass
790
+ class PermissionMigrationRequest:
791
+ workspace_id: int
792
+ """WorkspaceId of the associated workspace where the permission migration will occur. Both
793
+ workspace group and account group must be in this workspace."""
794
+
795
+ from_workspace_group_name: str
796
+ """The name of the workspace group that permissions will be migrated from."""
797
+
798
+ to_account_group_name: str
799
+ """The name of the account group that permissions will be migrated to."""
800
+
801
+ size: Optional[int] = None
802
+ """The maximum number of permissions that will be migrated."""
803
+
804
+ def as_dict(self) -> dict:
805
+ """Serializes the PermissionMigrationRequest into a dictionary suitable for use as a JSON request body."""
806
+ body = {}
807
+ if self.from_workspace_group_name is not None:
808
+ body['from_workspace_group_name'] = self.from_workspace_group_name
809
+ if self.size is not None: body['size'] = self.size
810
+ if self.to_account_group_name is not None: body['to_account_group_name'] = self.to_account_group_name
811
+ if self.workspace_id is not None: body['workspace_id'] = self.workspace_id
812
+ return body
813
+
814
+ @classmethod
815
+ def from_dict(cls, d: Dict[str, any]) -> PermissionMigrationRequest:
816
+ """Deserializes the PermissionMigrationRequest from a dictionary."""
817
+ return cls(from_workspace_group_name=d.get('from_workspace_group_name', None),
818
+ size=d.get('size', None),
819
+ to_account_group_name=d.get('to_account_group_name', None),
820
+ workspace_id=d.get('workspace_id', None))
821
+
822
+
823
+ @dataclass
824
+ class PermissionMigrationResponse:
825
+ permissions_migrated: Optional[int] = None
826
+ """Number of permissions migrated."""
827
+
828
+ def as_dict(self) -> dict:
829
+ """Serializes the PermissionMigrationResponse into a dictionary suitable for use as a JSON request body."""
830
+ body = {}
831
+ if self.permissions_migrated is not None: body['permissions_migrated'] = self.permissions_migrated
832
+ return body
833
+
834
+ @classmethod
835
+ def from_dict(cls, d: Dict[str, any]) -> PermissionMigrationResponse:
836
+ """Deserializes the PermissionMigrationResponse from a dictionary."""
837
+ return cls(permissions_migrated=d.get('permissions_migrated', None))
838
+
839
+
743
840
  @dataclass
744
841
  class PermissionOutput:
745
842
  description: Optional[str] = None
@@ -1000,6 +1097,20 @@ class ServicePrincipalSchema(Enum):
1000
1097
  URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_SERVICE_PRINCIPAL = 'urn:ietf:params:scim:schemas:core:2.0:ServicePrincipal'
1001
1098
 
1002
1099
 
1100
+ @dataclass
1101
+ class UpdateResponse:
1102
+
1103
+ def as_dict(self) -> dict:
1104
+ """Serializes the UpdateResponse into a dictionary suitable for use as a JSON request body."""
1105
+ body = {}
1106
+ return body
1107
+
1108
+ @classmethod
1109
+ def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
1110
+ """Deserializes the UpdateResponse from a dictionary."""
1111
+ return cls()
1112
+
1113
+
1003
1114
  @dataclass
1004
1115
  class UpdateRuleSetRequest:
1005
1116
  name: str
@@ -1126,6 +1237,20 @@ class UserSchema(Enum):
1126
1237
  URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER = 'urn:ietf:params:scim:schemas:extension:workspace:2.0:User'
1127
1238
 
1128
1239
 
1240
+ @dataclass
1241
+ class WorkspaceAssignmentsUpdated:
1242
+
1243
+ def as_dict(self) -> dict:
1244
+ """Serializes the WorkspaceAssignmentsUpdated into a dictionary suitable for use as a JSON request body."""
1245
+ body = {}
1246
+ return body
1247
+
1248
+ @classmethod
1249
+ def from_dict(cls, d: Dict[str, any]) -> WorkspaceAssignmentsUpdated:
1250
+ """Deserializes the WorkspaceAssignmentsUpdated from a dictionary."""
1251
+ return cls()
1252
+
1253
+
1129
1254
  class WorkspacePermission(Enum):
1130
1255
 
1131
1256
  ADMIN = 'ADMIN'
@@ -1173,6 +1298,7 @@ class AccountAccessControlAPI:
1173
1298
  query = {}
1174
1299
  if resource is not None: query['resource'] = resource
1175
1300
  headers = {'Accept': 'application/json', }
1301
+
1176
1302
  res = self._api.do(
1177
1303
  'GET',
1178
1304
  f'/api/2.0/preview/accounts/{self._api.account_id}/access-control/assignable-roles',
@@ -1203,6 +1329,7 @@ class AccountAccessControlAPI:
1203
1329
  if etag is not None: query['etag'] = etag
1204
1330
  if name is not None: query['name'] = name
1205
1331
  headers = {'Accept': 'application/json', }
1332
+
1206
1333
  res = self._api.do('GET',
1207
1334
  f'/api/2.0/preview/accounts/{self._api.account_id}/access-control/rule-sets',
1208
1335
  query=query,
@@ -1225,6 +1352,7 @@ class AccountAccessControlAPI:
1225
1352
  if name is not None: body['name'] = name
1226
1353
  if rule_set is not None: body['rule_set'] = rule_set.as_dict()
1227
1354
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1355
+
1228
1356
  res = self._api.do('PUT',
1229
1357
  f'/api/2.0/preview/accounts/{self._api.account_id}/access-control/rule-sets',
1230
1358
  body=body,
@@ -1255,6 +1383,7 @@ class AccountAccessControlProxyAPI:
1255
1383
  query = {}
1256
1384
  if resource is not None: query['resource'] = resource
1257
1385
  headers = {'Accept': 'application/json', }
1386
+
1258
1387
  res = self._api.do('GET',
1259
1388
  '/api/2.0/preview/accounts/access-control/assignable-roles',
1260
1389
  query=query,
@@ -1284,6 +1413,7 @@ class AccountAccessControlProxyAPI:
1284
1413
  if etag is not None: query['etag'] = etag
1285
1414
  if name is not None: query['name'] = name
1286
1415
  headers = {'Accept': 'application/json', }
1416
+
1287
1417
  res = self._api.do('GET',
1288
1418
  '/api/2.0/preview/accounts/access-control/rule-sets',
1289
1419
  query=query,
@@ -1306,6 +1436,7 @@ class AccountAccessControlProxyAPI:
1306
1436
  if name is not None: body['name'] = name
1307
1437
  if rule_set is not None: body['rule_set'] = rule_set.as_dict()
1308
1438
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1439
+
1309
1440
  res = self._api.do('PUT',
1310
1441
  '/api/2.0/preview/accounts/access-control/rule-sets',
1311
1442
  body=body,
@@ -1371,6 +1502,7 @@ class AccountGroupsAPI:
1371
1502
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1372
1503
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1373
1504
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1505
+
1374
1506
  res = self._api.do('POST',
1375
1507
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups',
1376
1508
  body=body,
@@ -1389,6 +1521,7 @@ class AccountGroupsAPI:
1389
1521
  """
1390
1522
 
1391
1523
  headers = {}
1524
+
1392
1525
  self._api.do('DELETE',
1393
1526
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1394
1527
  headers=headers)
@@ -1405,6 +1538,7 @@ class AccountGroupsAPI:
1405
1538
  """
1406
1539
 
1407
1540
  headers = {'Accept': 'application/json', }
1541
+
1408
1542
  res = self._api.do('GET',
1409
1543
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1410
1544
  headers=headers)
@@ -1497,6 +1631,7 @@ class AccountGroupsAPI:
1497
1631
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
1498
1632
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1499
1633
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1634
+
1500
1635
  self._api.do('PATCH',
1501
1636
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1502
1637
  body=body,
@@ -1548,6 +1683,7 @@ class AccountGroupsAPI:
1548
1683
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1549
1684
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1550
1685
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1686
+
1551
1687
  self._api.do('PUT',
1552
1688
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Groups/{id}',
1553
1689
  body=body,
@@ -1612,6 +1748,7 @@ class AccountServicePrincipalsAPI:
1612
1748
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1613
1749
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1614
1750
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1751
+
1615
1752
  res = self._api.do('POST',
1616
1753
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals',
1617
1754
  body=body,
@@ -1630,6 +1767,7 @@ class AccountServicePrincipalsAPI:
1630
1767
  """
1631
1768
 
1632
1769
  headers = {}
1770
+
1633
1771
  self._api.do('DELETE',
1634
1772
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1635
1773
  headers=headers)
@@ -1646,6 +1784,7 @@ class AccountServicePrincipalsAPI:
1646
1784
  """
1647
1785
 
1648
1786
  headers = {'Accept': 'application/json', }
1787
+
1649
1788
  res = self._api.do('GET',
1650
1789
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1651
1790
  headers=headers)
@@ -1738,6 +1877,7 @@ class AccountServicePrincipalsAPI:
1738
1877
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
1739
1878
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1740
1879
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1880
+
1741
1881
  self._api.do('PATCH',
1742
1882
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1743
1883
  body=body,
@@ -1792,6 +1932,7 @@ class AccountServicePrincipalsAPI:
1792
1932
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
1793
1933
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1794
1934
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1935
+
1795
1936
  self._api.do('PUT',
1796
1937
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/ServicePrincipals/{id}',
1797
1938
  body=body,
@@ -1873,6 +2014,7 @@ class AccountUsersAPI:
1873
2014
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
1874
2015
  if user_name is not None: body['userName'] = user_name
1875
2016
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2017
+
1876
2018
  res = self._api.do('POST',
1877
2019
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users',
1878
2020
  body=body,
@@ -1892,6 +2034,7 @@ class AccountUsersAPI:
1892
2034
  """
1893
2035
 
1894
2036
  headers = {}
2037
+
1895
2038
  self._api.do('DELETE',
1896
2039
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
1897
2040
  headers=headers)
@@ -1945,6 +2088,7 @@ class AccountUsersAPI:
1945
2088
  if sort_order is not None: query['sortOrder'] = sort_order.value
1946
2089
  if start_index is not None: query['startIndex'] = start_index
1947
2090
  headers = {'Accept': 'application/json', }
2091
+
1948
2092
  res = self._api.do('GET',
1949
2093
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
1950
2094
  query=query,
@@ -2039,6 +2183,7 @@ class AccountUsersAPI:
2039
2183
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2040
2184
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2041
2185
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2186
+
2042
2187
  self._api.do('PATCH',
2043
2188
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
2044
2189
  body=body,
@@ -2103,6 +2248,7 @@ class AccountUsersAPI:
2103
2248
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2104
2249
  if user_name is not None: body['userName'] = user_name
2105
2250
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2251
+
2106
2252
  self._api.do('PUT',
2107
2253
  f'/api/2.0/accounts/{self._api.account_id}/scim/v2/Users/{id}',
2108
2254
  body=body,
@@ -2124,6 +2270,7 @@ class CurrentUserAPI:
2124
2270
  """
2125
2271
 
2126
2272
  headers = {'Accept': 'application/json', }
2273
+
2127
2274
  res = self._api.do('GET', '/api/2.0/preview/scim/v2/Me', headers=headers)
2128
2275
  return User.from_dict(res)
2129
2276
 
@@ -2186,6 +2333,7 @@ class GroupsAPI:
2186
2333
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2187
2334
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2188
2335
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2336
+
2189
2337
  res = self._api.do('POST', '/api/2.0/preview/scim/v2/Groups', body=body, headers=headers)
2190
2338
  return Group.from_dict(res)
2191
2339
 
@@ -2201,6 +2349,7 @@ class GroupsAPI:
2201
2349
  """
2202
2350
 
2203
2351
  headers = {}
2352
+
2204
2353
  self._api.do('DELETE', f'/api/2.0/preview/scim/v2/Groups/{id}', headers=headers)
2205
2354
 
2206
2355
  def get(self, id: str) -> Group:
@@ -2215,6 +2364,7 @@ class GroupsAPI:
2215
2364
  """
2216
2365
 
2217
2366
  headers = {'Accept': 'application/json', }
2367
+
2218
2368
  res = self._api.do('GET', f'/api/2.0/preview/scim/v2/Groups/{id}', headers=headers)
2219
2369
  return Group.from_dict(res)
2220
2370
 
@@ -2302,6 +2452,7 @@ class GroupsAPI:
2302
2452
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2303
2453
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2304
2454
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2455
+
2305
2456
  self._api.do('PATCH', f'/api/2.0/preview/scim/v2/Groups/{id}', body=body, headers=headers)
2306
2457
 
2307
2458
  def update(self,
@@ -2350,9 +2501,50 @@ class GroupsAPI:
2350
2501
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2351
2502
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2352
2503
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2504
+
2353
2505
  self._api.do('PUT', f'/api/2.0/preview/scim/v2/Groups/{id}', body=body, headers=headers)
2354
2506
 
2355
2507
 
2508
+ class PermissionMigrationAPI:
2509
+ """This spec contains undocumented permission migration APIs used in https://github.com/databrickslabs/ucx."""
2510
+
2511
+ def __init__(self, api_client):
2512
+ self._api = api_client
2513
+
2514
+ def migrate_permissions(self,
2515
+ workspace_id: int,
2516
+ from_workspace_group_name: str,
2517
+ to_account_group_name: str,
2518
+ *,
2519
+ size: Optional[int] = None) -> PermissionMigrationResponse:
2520
+ """Migrate Permissions.
2521
+
2522
+ Migrate a batch of permissions from a workspace local group to an account group.
2523
+
2524
+ :param workspace_id: int
2525
+ WorkspaceId of the associated workspace where the permission migration will occur. Both workspace
2526
+ group and account group must be in this workspace.
2527
+ :param from_workspace_group_name: str
2528
+ The name of the workspace group that permissions will be migrated from.
2529
+ :param to_account_group_name: str
2530
+ The name of the account group that permissions will be migrated to.
2531
+ :param size: int (optional)
2532
+ The maximum number of permissions that will be migrated.
2533
+
2534
+ :returns: :class:`PermissionMigrationResponse`
2535
+ """
2536
+ body = {}
2537
+ if from_workspace_group_name is not None:
2538
+ body['from_workspace_group_name'] = from_workspace_group_name
2539
+ if size is not None: body['size'] = size
2540
+ if to_account_group_name is not None: body['to_account_group_name'] = to_account_group_name
2541
+ if workspace_id is not None: body['workspace_id'] = workspace_id
2542
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2543
+
2544
+ res = self._api.do('POST', '/api/2.0/permissionmigration', body=body, headers=headers)
2545
+ return PermissionMigrationResponse.from_dict(res)
2546
+
2547
+
2356
2548
  class PermissionsAPI:
2357
2549
  """Permissions API are used to create read, write, edit, update and manage access for various users on
2358
2550
  different objects and endpoints.
@@ -2419,6 +2611,7 @@ class PermissionsAPI:
2419
2611
  """
2420
2612
 
2421
2613
  headers = {'Accept': 'application/json', }
2614
+
2422
2615
  res = self._api.do('GET',
2423
2616
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}',
2424
2617
  headers=headers)
@@ -2439,6 +2632,7 @@ class PermissionsAPI:
2439
2632
  """
2440
2633
 
2441
2634
  headers = {'Accept': 'application/json', }
2635
+
2442
2636
  res = self._api.do('GET',
2443
2637
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}/permissionLevels',
2444
2638
  headers=headers)
@@ -2468,6 +2662,7 @@ class PermissionsAPI:
2468
2662
  if access_control_list is not None:
2469
2663
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
2470
2664
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2665
+
2471
2666
  res = self._api.do('PUT',
2472
2667
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}',
2473
2668
  body=body,
@@ -2498,6 +2693,7 @@ class PermissionsAPI:
2498
2693
  if access_control_list is not None:
2499
2694
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
2500
2695
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2696
+
2501
2697
  res = self._api.do('PATCH',
2502
2698
  f'/api/2.0/permissions/{request_object_type}/{request_object_id}',
2503
2699
  body=body,
@@ -2563,6 +2759,7 @@ class ServicePrincipalsAPI:
2563
2759
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2564
2760
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2565
2761
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2762
+
2566
2763
  res = self._api.do('POST', '/api/2.0/preview/scim/v2/ServicePrincipals', body=body, headers=headers)
2567
2764
  return ServicePrincipal.from_dict(res)
2568
2765
 
@@ -2578,6 +2775,7 @@ class ServicePrincipalsAPI:
2578
2775
  """
2579
2776
 
2580
2777
  headers = {}
2778
+
2581
2779
  self._api.do('DELETE', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', headers=headers)
2582
2780
 
2583
2781
  def get(self, id: str) -> ServicePrincipal:
@@ -2592,6 +2790,7 @@ class ServicePrincipalsAPI:
2592
2790
  """
2593
2791
 
2594
2792
  headers = {'Accept': 'application/json', }
2793
+
2595
2794
  res = self._api.do('GET', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', headers=headers)
2596
2795
  return ServicePrincipal.from_dict(res)
2597
2796
 
@@ -2682,6 +2881,7 @@ class ServicePrincipalsAPI:
2682
2881
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2683
2882
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2684
2883
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2884
+
2685
2885
  self._api.do('PATCH', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', body=body, headers=headers)
2686
2886
 
2687
2887
  def update(self,
@@ -2733,6 +2933,7 @@ class ServicePrincipalsAPI:
2733
2933
  if roles is not None: body['roles'] = [v.as_dict() for v in roles]
2734
2934
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2735
2935
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2936
+
2736
2937
  self._api.do('PUT', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', body=body, headers=headers)
2737
2938
 
2738
2939
 
@@ -2811,6 +3012,7 @@ class UsersAPI:
2811
3012
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2812
3013
  if user_name is not None: body['userName'] = user_name
2813
3014
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3015
+
2814
3016
  res = self._api.do('POST', '/api/2.0/preview/scim/v2/Users', body=body, headers=headers)
2815
3017
  return User.from_dict(res)
2816
3018
 
@@ -2827,6 +3029,7 @@ class UsersAPI:
2827
3029
  """
2828
3030
 
2829
3031
  headers = {}
3032
+
2830
3033
  self._api.do('DELETE', f'/api/2.0/preview/scim/v2/Users/{id}', headers=headers)
2831
3034
 
2832
3035
  def get(self,
@@ -2878,6 +3081,7 @@ class UsersAPI:
2878
3081
  if sort_order is not None: query['sortOrder'] = sort_order.value
2879
3082
  if start_index is not None: query['startIndex'] = start_index
2880
3083
  headers = {'Accept': 'application/json', }
3084
+
2881
3085
  res = self._api.do('GET', f'/api/2.0/preview/scim/v2/Users/{id}', query=query, headers=headers)
2882
3086
  return User.from_dict(res)
2883
3087
 
@@ -2890,6 +3094,7 @@ class UsersAPI:
2890
3094
  """
2891
3095
 
2892
3096
  headers = {'Accept': 'application/json', }
3097
+
2893
3098
  res = self._api.do('GET',
2894
3099
  '/api/2.0/permissions/authorization/passwords/permissionLevels',
2895
3100
  headers=headers)
@@ -2904,6 +3109,7 @@ class UsersAPI:
2904
3109
  """
2905
3110
 
2906
3111
  headers = {'Accept': 'application/json', }
3112
+
2907
3113
  res = self._api.do('GET', '/api/2.0/permissions/authorization/passwords', headers=headers)
2908
3114
  return PasswordPermissions.from_dict(res)
2909
3115
 
@@ -2992,6 +3198,7 @@ class UsersAPI:
2992
3198
  if operations is not None: body['Operations'] = [v.as_dict() for v in operations]
2993
3199
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
2994
3200
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3201
+
2995
3202
  self._api.do('PATCH', f'/api/2.0/preview/scim/v2/Users/{id}', body=body, headers=headers)
2996
3203
 
2997
3204
  def set_permissions(
@@ -3010,6 +3217,7 @@ class UsersAPI:
3010
3217
  if access_control_list is not None:
3011
3218
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
3012
3219
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3220
+
3013
3221
  res = self._api.do('PUT', '/api/2.0/permissions/authorization/passwords', body=body, headers=headers)
3014
3222
  return PasswordPermissions.from_dict(res)
3015
3223
 
@@ -3072,6 +3280,7 @@ class UsersAPI:
3072
3280
  if schemas is not None: body['schemas'] = [v.value for v in schemas]
3073
3281
  if user_name is not None: body['userName'] = user_name
3074
3282
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3283
+
3075
3284
  self._api.do('PUT', f'/api/2.0/preview/scim/v2/Users/{id}', body=body, headers=headers)
3076
3285
 
3077
3286
  def update_permissions(
@@ -3090,6 +3299,7 @@ class UsersAPI:
3090
3299
  if access_control_list is not None:
3091
3300
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
3092
3301
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3302
+
3093
3303
  res = self._api.do('PATCH',
3094
3304
  '/api/2.0/permissions/authorization/passwords',
3095
3305
  body=body,
@@ -3119,6 +3329,7 @@ class WorkspaceAssignmentAPI:
3119
3329
  """
3120
3330
 
3121
3331
  headers = {'Accept': 'application/json', }
3332
+
3122
3333
  self._api.do(
3123
3334
  'DELETE',
3124
3335
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments/principals/{principal_id}',
@@ -3136,6 +3347,7 @@ class WorkspaceAssignmentAPI:
3136
3347
  """
3137
3348
 
3138
3349
  headers = {'Accept': 'application/json', }
3350
+
3139
3351
  res = self._api.do(
3140
3352
  'GET',
3141
3353
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments/permissions',
@@ -3154,6 +3366,7 @@ class WorkspaceAssignmentAPI:
3154
3366
  """
3155
3367
 
3156
3368
  headers = {'Accept': 'application/json', }
3369
+
3157
3370
  json = self._api.do(
3158
3371
  'GET',
3159
3372
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments',
@@ -3179,6 +3392,7 @@ class WorkspaceAssignmentAPI:
3179
3392
  body = {}
3180
3393
  if permissions is not None: body['permissions'] = [v.value for v in permissions]
3181
3394
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3395
+
3182
3396
  self._api.do(
3183
3397
  'PUT',
3184
3398
  f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}/permissionassignments/principals/{principal_id}',