databricks-sdk 0.57.0__py3-none-any.whl → 0.59.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 (31) hide show
  1. databricks/sdk/__init__.py +38 -9
  2. databricks/sdk/service/aibuilder.py +0 -163
  3. databricks/sdk/service/apps.py +53 -49
  4. databricks/sdk/service/billing.py +62 -223
  5. databricks/sdk/service/catalog.py +3052 -3707
  6. databricks/sdk/service/cleanrooms.py +5 -54
  7. databricks/sdk/service/compute.py +579 -2715
  8. databricks/sdk/service/dashboards.py +108 -317
  9. databricks/sdk/service/database.py +603 -122
  10. databricks/sdk/service/files.py +2 -218
  11. databricks/sdk/service/iam.py +19 -298
  12. databricks/sdk/service/jobs.py +77 -1263
  13. databricks/sdk/service/marketplace.py +3 -575
  14. databricks/sdk/service/ml.py +816 -2734
  15. databricks/sdk/service/oauth2.py +122 -238
  16. databricks/sdk/service/pipelines.py +133 -724
  17. databricks/sdk/service/provisioning.py +36 -757
  18. databricks/sdk/service/qualitymonitorv2.py +0 -18
  19. databricks/sdk/service/serving.py +37 -583
  20. databricks/sdk/service/settings.py +282 -1768
  21. databricks/sdk/service/sharing.py +6 -478
  22. databricks/sdk/service/sql.py +129 -1696
  23. databricks/sdk/service/vectorsearch.py +0 -410
  24. databricks/sdk/service/workspace.py +252 -727
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/METADATA +1 -1
  27. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/RECORD +31 -31
  28. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/WHEEL +0 -0
  29. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/LICENSE +0 -0
  30. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/NOTICE +0 -0
  31. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/top_level.txt +0 -0
@@ -14,38 +14,6 @@ _LOG = logging.getLogger("databricks.sdk")
14
14
  # all definitions in this file are in alphabetical order
15
15
 
16
16
 
17
- @dataclass
18
- class AddBlock:
19
- handle: int
20
- """The handle on an open stream."""
21
-
22
- data: str
23
- """The base64-encoded data to append to the stream. This has a limit of 1 MB."""
24
-
25
- def as_dict(self) -> dict:
26
- """Serializes the AddBlock into a dictionary suitable for use as a JSON request body."""
27
- body = {}
28
- if self.data is not None:
29
- body["data"] = self.data
30
- if self.handle is not None:
31
- body["handle"] = self.handle
32
- return body
33
-
34
- def as_shallow_dict(self) -> dict:
35
- """Serializes the AddBlock into a shallow dictionary of its immediate attributes."""
36
- body = {}
37
- if self.data is not None:
38
- body["data"] = self.data
39
- if self.handle is not None:
40
- body["handle"] = self.handle
41
- return body
42
-
43
- @classmethod
44
- def from_dict(cls, d: Dict[str, Any]) -> AddBlock:
45
- """Deserializes the AddBlock from a dictionary."""
46
- return cls(data=d.get("data", None), handle=d.get("handle", None))
47
-
48
-
49
17
  @dataclass
50
18
  class AddBlockResponse:
51
19
  def as_dict(self) -> dict:
@@ -64,31 +32,6 @@ class AddBlockResponse:
64
32
  return cls()
65
33
 
66
34
 
67
- @dataclass
68
- class Close:
69
- handle: int
70
- """The handle on an open stream."""
71
-
72
- def as_dict(self) -> dict:
73
- """Serializes the Close into a dictionary suitable for use as a JSON request body."""
74
- body = {}
75
- if self.handle is not None:
76
- body["handle"] = self.handle
77
- return body
78
-
79
- def as_shallow_dict(self) -> dict:
80
- """Serializes the Close into a shallow dictionary of its immediate attributes."""
81
- body = {}
82
- if self.handle is not None:
83
- body["handle"] = self.handle
84
- return body
85
-
86
- @classmethod
87
- def from_dict(cls, d: Dict[str, Any]) -> Close:
88
- """Deserializes the Close from a dictionary."""
89
- return cls(handle=d.get("handle", None))
90
-
91
-
92
35
  @dataclass
93
36
  class CloseResponse:
94
37
  def as_dict(self) -> dict:
@@ -107,38 +50,6 @@ class CloseResponse:
107
50
  return cls()
108
51
 
109
52
 
110
- @dataclass
111
- class Create:
112
- path: str
113
- """The path of the new file. The path should be the absolute DBFS path."""
114
-
115
- overwrite: Optional[bool] = None
116
- """The flag that specifies whether to overwrite existing file/files."""
117
-
118
- def as_dict(self) -> dict:
119
- """Serializes the Create into a dictionary suitable for use as a JSON request body."""
120
- body = {}
121
- if self.overwrite is not None:
122
- body["overwrite"] = self.overwrite
123
- if self.path is not None:
124
- body["path"] = self.path
125
- return body
126
-
127
- def as_shallow_dict(self) -> dict:
128
- """Serializes the Create into a shallow dictionary of its immediate attributes."""
129
- body = {}
130
- if self.overwrite is not None:
131
- body["overwrite"] = self.overwrite
132
- if self.path is not None:
133
- body["path"] = self.path
134
- return body
135
-
136
- @classmethod
137
- def from_dict(cls, d: Dict[str, Any]) -> Create:
138
- """Deserializes the Create from a dictionary."""
139
- return cls(overwrite=d.get("overwrite", None), path=d.get("path", None))
140
-
141
-
142
53
  @dataclass
143
54
  class CreateDirectoryResponse:
144
55
  def as_dict(self) -> dict:
@@ -183,39 +94,6 @@ class CreateResponse:
183
94
  return cls(handle=d.get("handle", None))
184
95
 
185
96
 
186
- @dataclass
187
- class Delete:
188
- path: str
189
- """The path of the file or directory to delete. The path should be the absolute DBFS path."""
190
-
191
- recursive: Optional[bool] = None
192
- """Whether or not to recursively delete the directory's contents. Deleting empty directories can be
193
- done without providing the recursive flag."""
194
-
195
- def as_dict(self) -> dict:
196
- """Serializes the Delete into a dictionary suitable for use as a JSON request body."""
197
- body = {}
198
- if self.path is not None:
199
- body["path"] = self.path
200
- if self.recursive is not None:
201
- body["recursive"] = self.recursive
202
- return body
203
-
204
- def as_shallow_dict(self) -> dict:
205
- """Serializes the Delete into a shallow dictionary of its immediate attributes."""
206
- body = {}
207
- if self.path is not None:
208
- body["path"] = self.path
209
- if self.recursive is not None:
210
- body["recursive"] = self.recursive
211
- return body
212
-
213
- @classmethod
214
- def from_dict(cls, d: Dict[str, Any]) -> Delete:
215
- """Deserializes the Delete from a dictionary."""
216
- return cls(path=d.get("path", None), recursive=d.get("recursive", None))
217
-
218
-
219
97
  @dataclass
220
98
  class DeleteDirectoryResponse:
221
99
  def as_dict(self) -> dict:
@@ -530,31 +408,6 @@ class ListStatusResponse:
530
408
  return cls(files=_repeated_dict(d, "files", FileInfo))
531
409
 
532
410
 
533
- @dataclass
534
- class MkDirs:
535
- path: str
536
- """The path of the new directory. The path should be the absolute DBFS path."""
537
-
538
- def as_dict(self) -> dict:
539
- """Serializes the MkDirs into a dictionary suitable for use as a JSON request body."""
540
- body = {}
541
- if self.path is not None:
542
- body["path"] = self.path
543
- return body
544
-
545
- def as_shallow_dict(self) -> dict:
546
- """Serializes the MkDirs into a shallow dictionary of its immediate attributes."""
547
- body = {}
548
- if self.path is not None:
549
- body["path"] = self.path
550
- return body
551
-
552
- @classmethod
553
- def from_dict(cls, d: Dict[str, Any]) -> MkDirs:
554
- """Deserializes the MkDirs from a dictionary."""
555
- return cls(path=d.get("path", None))
556
-
557
-
558
411
  @dataclass
559
412
  class MkDirsResponse:
560
413
  def as_dict(self) -> dict:
@@ -573,38 +426,6 @@ class MkDirsResponse:
573
426
  return cls()
574
427
 
575
428
 
576
- @dataclass
577
- class Move:
578
- source_path: str
579
- """The source path of the file or directory. The path should be the absolute DBFS path."""
580
-
581
- destination_path: str
582
- """The destination path of the file or directory. The path should be the absolute DBFS path."""
583
-
584
- def as_dict(self) -> dict:
585
- """Serializes the Move into a dictionary suitable for use as a JSON request body."""
586
- body = {}
587
- if self.destination_path is not None:
588
- body["destination_path"] = self.destination_path
589
- if self.source_path is not None:
590
- body["source_path"] = self.source_path
591
- return body
592
-
593
- def as_shallow_dict(self) -> dict:
594
- """Serializes the Move into a shallow dictionary of its immediate attributes."""
595
- body = {}
596
- if self.destination_path is not None:
597
- body["destination_path"] = self.destination_path
598
- if self.source_path is not None:
599
- body["source_path"] = self.source_path
600
- return body
601
-
602
- @classmethod
603
- def from_dict(cls, d: Dict[str, Any]) -> Move:
604
- """Deserializes the Move from a dictionary."""
605
- return cls(destination_path=d.get("destination_path", None), source_path=d.get("source_path", None))
606
-
607
-
608
429
  @dataclass
609
430
  class MoveResponse:
610
431
  def as_dict(self) -> dict:
@@ -623,45 +444,6 @@ class MoveResponse:
623
444
  return cls()
624
445
 
625
446
 
626
- @dataclass
627
- class Put:
628
- path: str
629
- """The path of the new file. The path should be the absolute DBFS path."""
630
-
631
- contents: Optional[str] = None
632
- """This parameter might be absent, and instead a posted file will be used."""
633
-
634
- overwrite: Optional[bool] = None
635
- """The flag that specifies whether to overwrite existing file/files."""
636
-
637
- def as_dict(self) -> dict:
638
- """Serializes the Put into a dictionary suitable for use as a JSON request body."""
639
- body = {}
640
- if self.contents is not None:
641
- body["contents"] = self.contents
642
- if self.overwrite is not None:
643
- body["overwrite"] = self.overwrite
644
- if self.path is not None:
645
- body["path"] = self.path
646
- return body
647
-
648
- def as_shallow_dict(self) -> dict:
649
- """Serializes the Put into a shallow dictionary of its immediate attributes."""
650
- body = {}
651
- if self.contents is not None:
652
- body["contents"] = self.contents
653
- if self.overwrite is not None:
654
- body["overwrite"] = self.overwrite
655
- if self.path is not None:
656
- body["path"] = self.path
657
- return body
658
-
659
- @classmethod
660
- def from_dict(cls, d: Dict[str, Any]) -> Put:
661
- """Deserializes the Put from a dictionary."""
662
- return cls(contents=d.get("contents", None), overwrite=d.get("overwrite", None), path=d.get("path", None))
663
-
664
-
665
447
  @dataclass
666
448
  class PutResponse:
667
449
  def as_dict(self) -> dict:
@@ -1097,6 +879,7 @@ class FilesAPI:
1097
879
  headers = {
1098
880
  "Accept": "application/octet-stream",
1099
881
  }
882
+
1100
883
  response_headers = [
1101
884
  "content-length",
1102
885
  "content-type",
@@ -1142,6 +925,7 @@ class FilesAPI:
1142
925
  """
1143
926
 
1144
927
  headers = {}
928
+
1145
929
  response_headers = [
1146
930
  "content-length",
1147
931
  "content-type",
@@ -21,7 +21,6 @@ class AccessControlRequest:
21
21
  """name of the group"""
22
22
 
23
23
  permission_level: Optional[PermissionLevel] = None
24
- """Permission level"""
25
24
 
26
25
  service_principal_name: Optional[str] = None
27
26
  """application ID of a service principal"""
@@ -698,57 +697,6 @@ class ListUsersResponse:
698
697
  )
699
698
 
700
699
 
701
- @dataclass
702
- class MigratePermissionsRequest:
703
- workspace_id: int
704
- """WorkspaceId of the associated workspace where the permission migration will occur."""
705
-
706
- from_workspace_group_name: str
707
- """The name of the workspace group that permissions will be migrated from."""
708
-
709
- to_account_group_name: str
710
- """The name of the account group that permissions will be migrated to."""
711
-
712
- size: Optional[int] = None
713
- """The maximum number of permissions that will be migrated."""
714
-
715
- def as_dict(self) -> dict:
716
- """Serializes the MigratePermissionsRequest into a dictionary suitable for use as a JSON request body."""
717
- body = {}
718
- if self.from_workspace_group_name is not None:
719
- body["from_workspace_group_name"] = self.from_workspace_group_name
720
- if self.size is not None:
721
- body["size"] = self.size
722
- if self.to_account_group_name is not None:
723
- body["to_account_group_name"] = self.to_account_group_name
724
- if self.workspace_id is not None:
725
- body["workspace_id"] = self.workspace_id
726
- return body
727
-
728
- def as_shallow_dict(self) -> dict:
729
- """Serializes the MigratePermissionsRequest into a shallow dictionary of its immediate attributes."""
730
- body = {}
731
- if self.from_workspace_group_name is not None:
732
- body["from_workspace_group_name"] = self.from_workspace_group_name
733
- if self.size is not None:
734
- body["size"] = self.size
735
- if self.to_account_group_name is not None:
736
- body["to_account_group_name"] = self.to_account_group_name
737
- if self.workspace_id is not None:
738
- body["workspace_id"] = self.workspace_id
739
- return body
740
-
741
- @classmethod
742
- def from_dict(cls, d: Dict[str, Any]) -> MigratePermissionsRequest:
743
- """Deserializes the MigratePermissionsRequest from a dictionary."""
744
- return cls(
745
- from_workspace_group_name=d.get("from_workspace_group_name", None),
746
- size=d.get("size", None),
747
- to_account_group_name=d.get("to_account_group_name", None),
748
- workspace_id=d.get("workspace_id", None),
749
- )
750
-
751
-
752
700
  @dataclass
753
701
  class MigratePermissionsResponse:
754
702
  permissions_migrated: Optional[int] = None
@@ -846,48 +794,6 @@ class ObjectPermissions:
846
794
  )
847
795
 
848
796
 
849
- @dataclass
850
- class PartialUpdate:
851
- id: Optional[str] = None
852
- """Unique ID in the Databricks workspace."""
853
-
854
- operations: Optional[List[Patch]] = None
855
-
856
- schemas: Optional[List[PatchSchema]] = None
857
- """The schema of the patch request. Must be ["urn:ietf:params:scim:api:messages:2.0:PatchOp"]."""
858
-
859
- def as_dict(self) -> dict:
860
- """Serializes the PartialUpdate into a dictionary suitable for use as a JSON request body."""
861
- body = {}
862
- if self.id is not None:
863
- body["id"] = self.id
864
- if self.operations:
865
- body["Operations"] = [v.as_dict() for v in self.operations]
866
- if self.schemas:
867
- body["schemas"] = [v.value for v in self.schemas]
868
- return body
869
-
870
- def as_shallow_dict(self) -> dict:
871
- """Serializes the PartialUpdate into a shallow dictionary of its immediate attributes."""
872
- body = {}
873
- if self.id is not None:
874
- body["id"] = self.id
875
- if self.operations:
876
- body["Operations"] = self.operations
877
- if self.schemas:
878
- body["schemas"] = self.schemas
879
- return body
880
-
881
- @classmethod
882
- def from_dict(cls, d: Dict[str, Any]) -> PartialUpdate:
883
- """Deserializes the PartialUpdate from a dictionary."""
884
- return cls(
885
- id=d.get("id", None),
886
- operations=_repeated_dict(d, "Operations", Patch),
887
- schemas=_repeated_enum(d, "schemas", PatchSchema),
888
- )
889
-
890
-
891
797
  @dataclass
892
798
  class PasswordAccessControlRequest:
893
799
  group_name: Optional[str] = None
@@ -1119,30 +1025,6 @@ class PasswordPermissionsDescription:
1119
1025
  )
1120
1026
 
1121
1027
 
1122
- @dataclass
1123
- class PasswordPermissionsRequest:
1124
- access_control_list: Optional[List[PasswordAccessControlRequest]] = None
1125
-
1126
- def as_dict(self) -> dict:
1127
- """Serializes the PasswordPermissionsRequest into a dictionary suitable for use as a JSON request body."""
1128
- body = {}
1129
- if self.access_control_list:
1130
- body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
1131
- return body
1132
-
1133
- def as_shallow_dict(self) -> dict:
1134
- """Serializes the PasswordPermissionsRequest into a shallow dictionary of its immediate attributes."""
1135
- body = {}
1136
- if self.access_control_list:
1137
- body["access_control_list"] = self.access_control_list
1138
- return body
1139
-
1140
- @classmethod
1141
- def from_dict(cls, d: Dict[str, Any]) -> PasswordPermissionsRequest:
1142
- """Deserializes the PasswordPermissionsRequest from a dictionary."""
1143
- return cls(access_control_list=_repeated_dict(d, "access_control_list", PasswordAccessControlRequest))
1144
-
1145
-
1146
1028
  @dataclass
1147
1029
  class Patch:
1148
1030
  op: Optional[PatchOp] = None
@@ -1220,7 +1102,6 @@ class Permission:
1220
1102
  inherited_from_object: Optional[List[str]] = None
1221
1103
 
1222
1104
  permission_level: Optional[PermissionLevel] = None
1223
- """Permission level"""
1224
1105
 
1225
1106
  def as_dict(self) -> dict:
1226
1107
  """Serializes the Permission into a dictionary suitable for use as a JSON request body."""
@@ -1387,7 +1268,6 @@ class PermissionsDescription:
1387
1268
  description: Optional[str] = None
1388
1269
 
1389
1270
  permission_level: Optional[PermissionLevel] = None
1390
- """Permission level"""
1391
1271
 
1392
1272
  def as_dict(self) -> dict:
1393
1273
  """Serializes the PermissionsDescription into a dictionary suitable for use as a JSON request body."""
@@ -1767,94 +1647,6 @@ class ServicePrincipalSchema(Enum):
1767
1647
  URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_SERVICE_PRINCIPAL = "urn:ietf:params:scim:schemas:core:2.0:ServicePrincipal"
1768
1648
 
1769
1649
 
1770
- @dataclass
1771
- class SetObjectPermissions:
1772
- access_control_list: Optional[List[AccessControlRequest]] = None
1773
-
1774
- request_object_id: Optional[str] = None
1775
- """The id of the request object."""
1776
-
1777
- request_object_type: Optional[str] = None
1778
- """The type of the request object. Can be one of the following: alerts, authorization, clusters,
1779
- cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools,
1780
- jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses."""
1781
-
1782
- def as_dict(self) -> dict:
1783
- """Serializes the SetObjectPermissions into a dictionary suitable for use as a JSON request body."""
1784
- body = {}
1785
- if self.access_control_list:
1786
- body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
1787
- if self.request_object_id is not None:
1788
- body["request_object_id"] = self.request_object_id
1789
- if self.request_object_type is not None:
1790
- body["request_object_type"] = self.request_object_type
1791
- return body
1792
-
1793
- def as_shallow_dict(self) -> dict:
1794
- """Serializes the SetObjectPermissions into a shallow dictionary of its immediate attributes."""
1795
- body = {}
1796
- if self.access_control_list:
1797
- body["access_control_list"] = self.access_control_list
1798
- if self.request_object_id is not None:
1799
- body["request_object_id"] = self.request_object_id
1800
- if self.request_object_type is not None:
1801
- body["request_object_type"] = self.request_object_type
1802
- return body
1803
-
1804
- @classmethod
1805
- def from_dict(cls, d: Dict[str, Any]) -> SetObjectPermissions:
1806
- """Deserializes the SetObjectPermissions from a dictionary."""
1807
- return cls(
1808
- access_control_list=_repeated_dict(d, "access_control_list", AccessControlRequest),
1809
- request_object_id=d.get("request_object_id", None),
1810
- request_object_type=d.get("request_object_type", None),
1811
- )
1812
-
1813
-
1814
- @dataclass
1815
- class UpdateObjectPermissions:
1816
- access_control_list: Optional[List[AccessControlRequest]] = None
1817
-
1818
- request_object_id: Optional[str] = None
1819
- """The id of the request object."""
1820
-
1821
- request_object_type: Optional[str] = None
1822
- """The type of the request object. Can be one of the following: alerts, authorization, clusters,
1823
- cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools,
1824
- jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses."""
1825
-
1826
- def as_dict(self) -> dict:
1827
- """Serializes the UpdateObjectPermissions into a dictionary suitable for use as a JSON request body."""
1828
- body = {}
1829
- if self.access_control_list:
1830
- body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
1831
- if self.request_object_id is not None:
1832
- body["request_object_id"] = self.request_object_id
1833
- if self.request_object_type is not None:
1834
- body["request_object_type"] = self.request_object_type
1835
- return body
1836
-
1837
- def as_shallow_dict(self) -> dict:
1838
- """Serializes the UpdateObjectPermissions into a shallow dictionary of its immediate attributes."""
1839
- body = {}
1840
- if self.access_control_list:
1841
- body["access_control_list"] = self.access_control_list
1842
- if self.request_object_id is not None:
1843
- body["request_object_id"] = self.request_object_id
1844
- if self.request_object_type is not None:
1845
- body["request_object_type"] = self.request_object_type
1846
- return body
1847
-
1848
- @classmethod
1849
- def from_dict(cls, d: Dict[str, Any]) -> UpdateObjectPermissions:
1850
- """Deserializes the UpdateObjectPermissions from a dictionary."""
1851
- return cls(
1852
- access_control_list=_repeated_dict(d, "access_control_list", AccessControlRequest),
1853
- request_object_id=d.get("request_object_id", None),
1854
- request_object_type=d.get("request_object_type", None),
1855
- )
1856
-
1857
-
1858
1650
  @dataclass
1859
1651
  class UpdateResponse:
1860
1652
  def as_dict(self) -> dict:
@@ -1873,84 +1665,6 @@ class UpdateResponse:
1873
1665
  return cls()
1874
1666
 
1875
1667
 
1876
- @dataclass
1877
- class UpdateRuleSetRequest:
1878
- name: str
1879
- """Name of the rule set."""
1880
-
1881
- rule_set: RuleSetUpdateRequest
1882
-
1883
- def as_dict(self) -> dict:
1884
- """Serializes the UpdateRuleSetRequest into a dictionary suitable for use as a JSON request body."""
1885
- body = {}
1886
- if self.name is not None:
1887
- body["name"] = self.name
1888
- if self.rule_set:
1889
- body["rule_set"] = self.rule_set.as_dict()
1890
- return body
1891
-
1892
- def as_shallow_dict(self) -> dict:
1893
- """Serializes the UpdateRuleSetRequest into a shallow dictionary of its immediate attributes."""
1894
- body = {}
1895
- if self.name is not None:
1896
- body["name"] = self.name
1897
- if self.rule_set:
1898
- body["rule_set"] = self.rule_set
1899
- return body
1900
-
1901
- @classmethod
1902
- def from_dict(cls, d: Dict[str, Any]) -> UpdateRuleSetRequest:
1903
- """Deserializes the UpdateRuleSetRequest from a dictionary."""
1904
- return cls(name=d.get("name", None), rule_set=_from_dict(d, "rule_set", RuleSetUpdateRequest))
1905
-
1906
-
1907
- @dataclass
1908
- class UpdateWorkspaceAssignments:
1909
- permissions: Optional[List[WorkspacePermission]] = None
1910
- """Array of permissions assignments to update on the workspace. Valid values are "USER" and "ADMIN"
1911
- (case-sensitive). If both "USER" and "ADMIN" are provided, "ADMIN" takes precedence. Other
1912
- values will be ignored. Note that excluding this field, or providing unsupported values, will
1913
- have the same effect as providing an empty list, which will result in the deletion of all
1914
- permissions for the principal."""
1915
-
1916
- principal_id: Optional[int] = None
1917
- """The ID of the user, service principal, or group."""
1918
-
1919
- workspace_id: Optional[int] = None
1920
- """The workspace ID."""
1921
-
1922
- def as_dict(self) -> dict:
1923
- """Serializes the UpdateWorkspaceAssignments into a dictionary suitable for use as a JSON request body."""
1924
- body = {}
1925
- if self.permissions:
1926
- body["permissions"] = [v.value for v in self.permissions]
1927
- if self.principal_id is not None:
1928
- body["principal_id"] = self.principal_id
1929
- if self.workspace_id is not None:
1930
- body["workspace_id"] = self.workspace_id
1931
- return body
1932
-
1933
- def as_shallow_dict(self) -> dict:
1934
- """Serializes the UpdateWorkspaceAssignments into a shallow dictionary of its immediate attributes."""
1935
- body = {}
1936
- if self.permissions:
1937
- body["permissions"] = self.permissions
1938
- if self.principal_id is not None:
1939
- body["principal_id"] = self.principal_id
1940
- if self.workspace_id is not None:
1941
- body["workspace_id"] = self.workspace_id
1942
- return body
1943
-
1944
- @classmethod
1945
- def from_dict(cls, d: Dict[str, Any]) -> UpdateWorkspaceAssignments:
1946
- """Deserializes the UpdateWorkspaceAssignments from a dictionary."""
1947
- return cls(
1948
- permissions=_repeated_enum(d, "permissions", WorkspacePermission),
1949
- principal_id=d.get("principal_id", None),
1950
- workspace_id=d.get("workspace_id", None),
1951
- )
1952
-
1953
-
1954
1668
  @dataclass
1955
1669
  class User:
1956
1670
  active: Optional[bool] = None
@@ -3264,6 +2978,7 @@ class CurrentUserAPI:
3264
2978
  def me(self) -> User:
3265
2979
  """Get details about the current method caller's identity.
3266
2980
 
2981
+
3267
2982
  :returns: :class:`User`
3268
2983
  """
3269
2984
 
@@ -3610,9 +3325,10 @@ class PermissionsAPI:
3610
3325
  object.
3611
3326
 
3612
3327
  :param request_object_type: str
3613
- The type of the request object. Can be one of the following: alerts, authorization, clusters,
3614
- cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools,
3615
- jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses.
3328
+ The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3329
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3330
+ instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3331
+ warehouses.
3616
3332
  :param request_object_id: str
3617
3333
  The id of the request object.
3618
3334
 
@@ -3630,9 +3346,10 @@ class PermissionsAPI:
3630
3346
  """Gets the permission levels that a user can have on an object.
3631
3347
 
3632
3348
  :param request_object_type: str
3633
- The type of the request object. Can be one of the following: alerts, authorization, clusters,
3634
- cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools,
3635
- jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses.
3349
+ The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3350
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3351
+ instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3352
+ warehouses.
3636
3353
  :param request_object_id: str
3637
3354
 
3638
3355
  :returns: :class:`GetPermissionLevelsResponse`
@@ -3659,9 +3376,10 @@ class PermissionsAPI:
3659
3376
  object.
3660
3377
 
3661
3378
  :param request_object_type: str
3662
- The type of the request object. Can be one of the following: alerts, authorization, clusters,
3663
- cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools,
3664
- jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses.
3379
+ The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3380
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3381
+ instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3382
+ warehouses.
3665
3383
  :param request_object_id: str
3666
3384
  The id of the request object.
3667
3385
  :param access_control_list: List[:class:`AccessControlRequest`] (optional)
@@ -3692,9 +3410,10 @@ class PermissionsAPI:
3692
3410
  root object.
3693
3411
 
3694
3412
  :param request_object_type: str
3695
- The type of the request object. Can be one of the following: alerts, authorization, clusters,
3696
- cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools,
3697
- jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses.
3413
+ The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3414
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3415
+ instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3416
+ warehouses.
3698
3417
  :param request_object_id: str
3699
3418
  The id of the request object.
3700
3419
  :param access_control_list: List[:class:`AccessControlRequest`] (optional)
@@ -4147,6 +3866,7 @@ class UsersAPI:
4147
3866
  def get_permission_levels(self) -> GetPasswordPermissionLevelsResponse:
4148
3867
  """Gets the permission levels that a user can have on an object.
4149
3868
 
3869
+
4150
3870
  :returns: :class:`GetPasswordPermissionLevelsResponse`
4151
3871
  """
4152
3872
 
@@ -4160,6 +3880,7 @@ class UsersAPI:
4160
3880
  def get_permissions(self) -> PasswordPermissions:
4161
3881
  """Gets the permissions of all passwords. Passwords can inherit permissions from their root object.
4162
3882
 
3883
+
4163
3884
  :returns: :class:`PasswordPermissions`
4164
3885
  """
4165
3886