databricks-sdk 0.35.0__py3-none-any.whl → 0.37.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.

@@ -23,418 +23,6 @@ class AuthenticationType(Enum):
23
23
  TOKEN = 'TOKEN'
24
24
 
25
25
 
26
- @dataclass
27
- class CentralCleanRoomInfo:
28
- clean_room_assets: Optional[List[CleanRoomAssetInfo]] = None
29
- """All assets from all collaborators that are available in the clean room. Only one of table_info
30
- or notebook_info will be filled in."""
31
-
32
- collaborators: Optional[List[CleanRoomCollaboratorInfo]] = None
33
- """All collaborators who are in the clean room."""
34
-
35
- creator: Optional[CleanRoomCollaboratorInfo] = None
36
- """The collaborator who created the clean room."""
37
-
38
- station_cloud: Optional[str] = None
39
- """The cloud where clean room tasks will be run."""
40
-
41
- station_region: Optional[str] = None
42
- """The region where clean room tasks will be run."""
43
-
44
- def as_dict(self) -> dict:
45
- """Serializes the CentralCleanRoomInfo into a dictionary suitable for use as a JSON request body."""
46
- body = {}
47
- if self.clean_room_assets: body['clean_room_assets'] = [v.as_dict() for v in self.clean_room_assets]
48
- if self.collaborators: body['collaborators'] = [v.as_dict() for v in self.collaborators]
49
- if self.creator: body['creator'] = self.creator.as_dict()
50
- if self.station_cloud is not None: body['station_cloud'] = self.station_cloud
51
- if self.station_region is not None: body['station_region'] = self.station_region
52
- return body
53
-
54
- @classmethod
55
- def from_dict(cls, d: Dict[str, any]) -> CentralCleanRoomInfo:
56
- """Deserializes the CentralCleanRoomInfo from a dictionary."""
57
- return cls(clean_room_assets=_repeated_dict(d, 'clean_room_assets', CleanRoomAssetInfo),
58
- collaborators=_repeated_dict(d, 'collaborators', CleanRoomCollaboratorInfo),
59
- creator=_from_dict(d, 'creator', CleanRoomCollaboratorInfo),
60
- station_cloud=d.get('station_cloud', None),
61
- station_region=d.get('station_region', None))
62
-
63
-
64
- @dataclass
65
- class CleanRoomAssetInfo:
66
- added_at: Optional[int] = None
67
- """Time at which this asset was added, in epoch milliseconds."""
68
-
69
- notebook_info: Optional[CleanRoomNotebookInfo] = None
70
- """Details about the notebook asset."""
71
-
72
- owner: Optional[CleanRoomCollaboratorInfo] = None
73
- """The collaborator who owns the asset."""
74
-
75
- table_info: Optional[CleanRoomTableInfo] = None
76
- """Details about the table asset."""
77
-
78
- updated_at: Optional[int] = None
79
- """Time at which this asset was updated, in epoch milliseconds."""
80
-
81
- def as_dict(self) -> dict:
82
- """Serializes the CleanRoomAssetInfo into a dictionary suitable for use as a JSON request body."""
83
- body = {}
84
- if self.added_at is not None: body['added_at'] = self.added_at
85
- if self.notebook_info: body['notebook_info'] = self.notebook_info.as_dict()
86
- if self.owner: body['owner'] = self.owner.as_dict()
87
- if self.table_info: body['table_info'] = self.table_info.as_dict()
88
- if self.updated_at is not None: body['updated_at'] = self.updated_at
89
- return body
90
-
91
- @classmethod
92
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetInfo:
93
- """Deserializes the CleanRoomAssetInfo from a dictionary."""
94
- return cls(added_at=d.get('added_at', None),
95
- notebook_info=_from_dict(d, 'notebook_info', CleanRoomNotebookInfo),
96
- owner=_from_dict(d, 'owner', CleanRoomCollaboratorInfo),
97
- table_info=_from_dict(d, 'table_info', CleanRoomTableInfo),
98
- updated_at=d.get('updated_at', None))
99
-
100
-
101
- @dataclass
102
- class CleanRoomCatalog:
103
- catalog_name: Optional[str] = None
104
- """Name of the catalog in the clean room station. Empty for notebooks."""
105
-
106
- notebook_files: Optional[List[SharedDataObject]] = None
107
- """The details of the shared notebook files."""
108
-
109
- tables: Optional[List[SharedDataObject]] = None
110
- """The details of the shared tables."""
111
-
112
- def as_dict(self) -> dict:
113
- """Serializes the CleanRoomCatalog into a dictionary suitable for use as a JSON request body."""
114
- body = {}
115
- if self.catalog_name is not None: body['catalog_name'] = self.catalog_name
116
- if self.notebook_files: body['notebook_files'] = [v.as_dict() for v in self.notebook_files]
117
- if self.tables: body['tables'] = [v.as_dict() for v in self.tables]
118
- return body
119
-
120
- @classmethod
121
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomCatalog:
122
- """Deserializes the CleanRoomCatalog from a dictionary."""
123
- return cls(catalog_name=d.get('catalog_name', None),
124
- notebook_files=_repeated_dict(d, 'notebook_files', SharedDataObject),
125
- tables=_repeated_dict(d, 'tables', SharedDataObject))
126
-
127
-
128
- @dataclass
129
- class CleanRoomCatalogUpdate:
130
- catalog_name: Optional[str] = None
131
- """The name of the catalog to update assets."""
132
-
133
- updates: Optional[SharedDataObjectUpdate] = None
134
- """The updates to the assets in the catalog."""
135
-
136
- def as_dict(self) -> dict:
137
- """Serializes the CleanRoomCatalogUpdate into a dictionary suitable for use as a JSON request body."""
138
- body = {}
139
- if self.catalog_name is not None: body['catalog_name'] = self.catalog_name
140
- if self.updates: body['updates'] = self.updates.as_dict()
141
- return body
142
-
143
- @classmethod
144
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomCatalogUpdate:
145
- """Deserializes the CleanRoomCatalogUpdate from a dictionary."""
146
- return cls(catalog_name=d.get('catalog_name', None),
147
- updates=_from_dict(d, 'updates', SharedDataObjectUpdate))
148
-
149
-
150
- @dataclass
151
- class CleanRoomCollaboratorInfo:
152
- global_metastore_id: Optional[str] = None
153
- """The global Unity Catalog metastore id of the collaborator. Also known as the sharing identifier.
154
- The identifier is of format __cloud__:__region__:__metastore-uuid__."""
155
-
156
- organization_name: Optional[str] = None
157
- """The organization name of the collaborator. This is configured in the metastore for Delta Sharing
158
- and is used to identify the organization to other collaborators."""
159
-
160
- def as_dict(self) -> dict:
161
- """Serializes the CleanRoomCollaboratorInfo into a dictionary suitable for use as a JSON request body."""
162
- body = {}
163
- if self.global_metastore_id is not None: body['global_metastore_id'] = self.global_metastore_id
164
- if self.organization_name is not None: body['organization_name'] = self.organization_name
165
- return body
166
-
167
- @classmethod
168
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomCollaboratorInfo:
169
- """Deserializes the CleanRoomCollaboratorInfo from a dictionary."""
170
- return cls(global_metastore_id=d.get('global_metastore_id', None),
171
- organization_name=d.get('organization_name', None))
172
-
173
-
174
- @dataclass
175
- class CleanRoomInfo:
176
- comment: Optional[str] = None
177
- """User-provided free-form text description."""
178
-
179
- created_at: Optional[int] = None
180
- """Time at which this clean room was created, in epoch milliseconds."""
181
-
182
- created_by: Optional[str] = None
183
- """Username of clean room creator."""
184
-
185
- local_catalogs: Optional[List[CleanRoomCatalog]] = None
186
- """Catalog aliases shared by the current collaborator with asset details."""
187
-
188
- name: Optional[str] = None
189
- """Name of the clean room."""
190
-
191
- owner: Optional[str] = None
192
- """Username of current owner of clean room."""
193
-
194
- remote_detailed_info: Optional[CentralCleanRoomInfo] = None
195
- """Central clean room details."""
196
-
197
- updated_at: Optional[int] = None
198
- """Time at which this clean room was updated, in epoch milliseconds."""
199
-
200
- updated_by: Optional[str] = None
201
- """Username of clean room updater."""
202
-
203
- def as_dict(self) -> dict:
204
- """Serializes the CleanRoomInfo into a dictionary suitable for use as a JSON request body."""
205
- body = {}
206
- if self.comment is not None: body['comment'] = self.comment
207
- if self.created_at is not None: body['created_at'] = self.created_at
208
- if self.created_by is not None: body['created_by'] = self.created_by
209
- if self.local_catalogs: body['local_catalogs'] = [v.as_dict() for v in self.local_catalogs]
210
- if self.name is not None: body['name'] = self.name
211
- if self.owner is not None: body['owner'] = self.owner
212
- if self.remote_detailed_info: body['remote_detailed_info'] = self.remote_detailed_info.as_dict()
213
- if self.updated_at is not None: body['updated_at'] = self.updated_at
214
- if self.updated_by is not None: body['updated_by'] = self.updated_by
215
- return body
216
-
217
- @classmethod
218
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomInfo:
219
- """Deserializes the CleanRoomInfo from a dictionary."""
220
- return cls(comment=d.get('comment', None),
221
- created_at=d.get('created_at', None),
222
- created_by=d.get('created_by', None),
223
- local_catalogs=_repeated_dict(d, 'local_catalogs', CleanRoomCatalog),
224
- name=d.get('name', None),
225
- owner=d.get('owner', None),
226
- remote_detailed_info=_from_dict(d, 'remote_detailed_info', CentralCleanRoomInfo),
227
- updated_at=d.get('updated_at', None),
228
- updated_by=d.get('updated_by', None))
229
-
230
-
231
- @dataclass
232
- class CleanRoomNotebookInfo:
233
- notebook_content: Optional[str] = None
234
- """The base64 representation of the notebook content in HTML."""
235
-
236
- notebook_name: Optional[str] = None
237
- """The name of the notebook."""
238
-
239
- def as_dict(self) -> dict:
240
- """Serializes the CleanRoomNotebookInfo into a dictionary suitable for use as a JSON request body."""
241
- body = {}
242
- if self.notebook_content is not None: body['notebook_content'] = self.notebook_content
243
- if self.notebook_name is not None: body['notebook_name'] = self.notebook_name
244
- return body
245
-
246
- @classmethod
247
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomNotebookInfo:
248
- """Deserializes the CleanRoomNotebookInfo from a dictionary."""
249
- return cls(notebook_content=d.get('notebook_content', None),
250
- notebook_name=d.get('notebook_name', None))
251
-
252
-
253
- @dataclass
254
- class CleanRoomTableInfo:
255
- catalog_name: Optional[str] = None
256
- """Name of parent catalog."""
257
-
258
- columns: Optional[List[ColumnInfo]] = None
259
- """The array of __ColumnInfo__ definitions of the table's columns."""
260
-
261
- full_name: Optional[str] = None
262
- """Full name of table, in form of __catalog_name__.__schema_name__.__table_name__"""
263
-
264
- name: Optional[str] = None
265
- """Name of table, relative to parent schema."""
266
-
267
- schema_name: Optional[str] = None
268
- """Name of parent schema relative to its parent catalog."""
269
-
270
- def as_dict(self) -> dict:
271
- """Serializes the CleanRoomTableInfo into a dictionary suitable for use as a JSON request body."""
272
- body = {}
273
- if self.catalog_name is not None: body['catalog_name'] = self.catalog_name
274
- if self.columns: body['columns'] = [v.as_dict() for v in self.columns]
275
- if self.full_name is not None: body['full_name'] = self.full_name
276
- if self.name is not None: body['name'] = self.name
277
- if self.schema_name is not None: body['schema_name'] = self.schema_name
278
- return body
279
-
280
- @classmethod
281
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomTableInfo:
282
- """Deserializes the CleanRoomTableInfo from a dictionary."""
283
- return cls(catalog_name=d.get('catalog_name', None),
284
- columns=_repeated_dict(d, 'columns', ColumnInfo),
285
- full_name=d.get('full_name', None),
286
- name=d.get('name', None),
287
- schema_name=d.get('schema_name', None))
288
-
289
-
290
- @dataclass
291
- class ColumnInfo:
292
- comment: Optional[str] = None
293
- """User-provided free-form text description."""
294
-
295
- mask: Optional[ColumnMask] = None
296
-
297
- name: Optional[str] = None
298
- """Name of Column."""
299
-
300
- nullable: Optional[bool] = None
301
- """Whether field may be Null (default: true)."""
302
-
303
- partition_index: Optional[int] = None
304
- """Partition index for column."""
305
-
306
- position: Optional[int] = None
307
- """Ordinal position of column (starting at position 0)."""
308
-
309
- type_interval_type: Optional[str] = None
310
- """Format of IntervalType."""
311
-
312
- type_json: Optional[str] = None
313
- """Full data type specification, JSON-serialized."""
314
-
315
- type_name: Optional[ColumnTypeName] = None
316
- """Name of type (INT, STRUCT, MAP, etc.)."""
317
-
318
- type_precision: Optional[int] = None
319
- """Digits of precision; required for DecimalTypes."""
320
-
321
- type_scale: Optional[int] = None
322
- """Digits to right of decimal; Required for DecimalTypes."""
323
-
324
- type_text: Optional[str] = None
325
- """Full data type specification as SQL/catalogString text."""
326
-
327
- def as_dict(self) -> dict:
328
- """Serializes the ColumnInfo into a dictionary suitable for use as a JSON request body."""
329
- body = {}
330
- if self.comment is not None: body['comment'] = self.comment
331
- if self.mask: body['mask'] = self.mask.as_dict()
332
- if self.name is not None: body['name'] = self.name
333
- if self.nullable is not None: body['nullable'] = self.nullable
334
- if self.partition_index is not None: body['partition_index'] = self.partition_index
335
- if self.position is not None: body['position'] = self.position
336
- if self.type_interval_type is not None: body['type_interval_type'] = self.type_interval_type
337
- if self.type_json is not None: body['type_json'] = self.type_json
338
- if self.type_name is not None: body['type_name'] = self.type_name.value
339
- if self.type_precision is not None: body['type_precision'] = self.type_precision
340
- if self.type_scale is not None: body['type_scale'] = self.type_scale
341
- if self.type_text is not None: body['type_text'] = self.type_text
342
- return body
343
-
344
- @classmethod
345
- def from_dict(cls, d: Dict[str, any]) -> ColumnInfo:
346
- """Deserializes the ColumnInfo from a dictionary."""
347
- return cls(comment=d.get('comment', None),
348
- mask=_from_dict(d, 'mask', ColumnMask),
349
- name=d.get('name', None),
350
- nullable=d.get('nullable', None),
351
- partition_index=d.get('partition_index', None),
352
- position=d.get('position', None),
353
- type_interval_type=d.get('type_interval_type', None),
354
- type_json=d.get('type_json', None),
355
- type_name=_enum(d, 'type_name', ColumnTypeName),
356
- type_precision=d.get('type_precision', None),
357
- type_scale=d.get('type_scale', None),
358
- type_text=d.get('type_text', None))
359
-
360
-
361
- @dataclass
362
- class ColumnMask:
363
- function_name: Optional[str] = None
364
- """The full name of the column mask SQL UDF."""
365
-
366
- using_column_names: Optional[List[str]] = None
367
- """The list of additional table columns to be passed as input to the column mask function. The
368
- first arg of the mask function should be of the type of the column being masked and the types of
369
- the rest of the args should match the types of columns in 'using_column_names'."""
370
-
371
- def as_dict(self) -> dict:
372
- """Serializes the ColumnMask into a dictionary suitable for use as a JSON request body."""
373
- body = {}
374
- if self.function_name is not None: body['function_name'] = self.function_name
375
- if self.using_column_names: body['using_column_names'] = [v for v in self.using_column_names]
376
- return body
377
-
378
- @classmethod
379
- def from_dict(cls, d: Dict[str, any]) -> ColumnMask:
380
- """Deserializes the ColumnMask from a dictionary."""
381
- return cls(function_name=d.get('function_name', None),
382
- using_column_names=d.get('using_column_names', None))
383
-
384
-
385
- class ColumnTypeName(Enum):
386
- """Name of type (INT, STRUCT, MAP, etc.)."""
387
-
388
- ARRAY = 'ARRAY'
389
- BINARY = 'BINARY'
390
- BOOLEAN = 'BOOLEAN'
391
- BYTE = 'BYTE'
392
- CHAR = 'CHAR'
393
- DATE = 'DATE'
394
- DECIMAL = 'DECIMAL'
395
- DOUBLE = 'DOUBLE'
396
- FLOAT = 'FLOAT'
397
- INT = 'INT'
398
- INTERVAL = 'INTERVAL'
399
- LONG = 'LONG'
400
- MAP = 'MAP'
401
- NULL = 'NULL'
402
- SHORT = 'SHORT'
403
- STRING = 'STRING'
404
- STRUCT = 'STRUCT'
405
- TABLE_TYPE = 'TABLE_TYPE'
406
- TIMESTAMP = 'TIMESTAMP'
407
- TIMESTAMP_NTZ = 'TIMESTAMP_NTZ'
408
- USER_DEFINED_TYPE = 'USER_DEFINED_TYPE'
409
-
410
-
411
- @dataclass
412
- class CreateCleanRoom:
413
- name: str
414
- """Name of the clean room."""
415
-
416
- remote_detailed_info: CentralCleanRoomInfo
417
- """Central clean room details."""
418
-
419
- comment: Optional[str] = None
420
- """User-provided free-form text description."""
421
-
422
- def as_dict(self) -> dict:
423
- """Serializes the CreateCleanRoom into a dictionary suitable for use as a JSON request body."""
424
- body = {}
425
- if self.comment is not None: body['comment'] = self.comment
426
- if self.name is not None: body['name'] = self.name
427
- if self.remote_detailed_info: body['remote_detailed_info'] = self.remote_detailed_info.as_dict()
428
- return body
429
-
430
- @classmethod
431
- def from_dict(cls, d: Dict[str, any]) -> CreateCleanRoom:
432
- """Deserializes the CreateCleanRoom from a dictionary."""
433
- return cls(comment=d.get('comment', None),
434
- name=d.get('name', None),
435
- remote_detailed_info=_from_dict(d, 'remote_detailed_info', CentralCleanRoomInfo))
436
-
437
-
438
26
  @dataclass
439
27
  class CreateProvider:
440
28
  name: str
@@ -623,29 +211,6 @@ class IpAccessList:
623
211
  return cls(allowed_ip_addresses=d.get('allowed_ip_addresses', None))
624
212
 
625
213
 
626
- @dataclass
627
- class ListCleanRoomsResponse:
628
- clean_rooms: Optional[List[CleanRoomInfo]] = None
629
- """An array of clean rooms. Remote details (central) are not included."""
630
-
631
- next_page_token: Optional[str] = None
632
- """Opaque token to retrieve the next page of results. Absent if there are no more pages.
633
- __page_token__ should be set to this value for the next request (for the next page of results)."""
634
-
635
- def as_dict(self) -> dict:
636
- """Serializes the ListCleanRoomsResponse into a dictionary suitable for use as a JSON request body."""
637
- body = {}
638
- if self.clean_rooms: body['clean_rooms'] = [v.as_dict() for v in self.clean_rooms]
639
- if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
640
- return body
641
-
642
- @classmethod
643
- def from_dict(cls, d: Dict[str, any]) -> ListCleanRoomsResponse:
644
- """Deserializes the ListCleanRoomsResponse from a dictionary."""
645
- return cls(clean_rooms=_repeated_dict(d, 'clean_rooms', CleanRoomInfo),
646
- next_page_token=d.get('next_page_token', None))
647
-
648
-
649
214
  @dataclass
650
215
  class ListProviderSharesResponse:
651
216
  next_page_token: Optional[str] = None
@@ -1473,38 +1038,6 @@ class SharedDataObjectUpdateAction(Enum):
1473
1038
  UPDATE = 'UPDATE'
1474
1039
 
1475
1040
 
1476
- @dataclass
1477
- class UpdateCleanRoom:
1478
- catalog_updates: Optional[List[CleanRoomCatalogUpdate]] = None
1479
- """Array of shared data object updates."""
1480
-
1481
- comment: Optional[str] = None
1482
- """User-provided free-form text description."""
1483
-
1484
- name: Optional[str] = None
1485
- """The name of the clean room."""
1486
-
1487
- owner: Optional[str] = None
1488
- """Username of current owner of clean room."""
1489
-
1490
- def as_dict(self) -> dict:
1491
- """Serializes the UpdateCleanRoom into a dictionary suitable for use as a JSON request body."""
1492
- body = {}
1493
- if self.catalog_updates: body['catalog_updates'] = [v.as_dict() for v in self.catalog_updates]
1494
- if self.comment is not None: body['comment'] = self.comment
1495
- if self.name is not None: body['name'] = self.name
1496
- if self.owner is not None: body['owner'] = self.owner
1497
- return body
1498
-
1499
- @classmethod
1500
- def from_dict(cls, d: Dict[str, any]) -> UpdateCleanRoom:
1501
- """Deserializes the UpdateCleanRoom from a dictionary."""
1502
- return cls(catalog_updates=_repeated_dict(d, 'catalog_updates', CleanRoomCatalogUpdate),
1503
- comment=d.get('comment', None),
1504
- name=d.get('name', None),
1505
- owner=d.get('owner', None))
1506
-
1507
-
1508
1041
  @dataclass
1509
1042
  class UpdatePermissionsResponse:
1510
1043
 
@@ -1699,157 +1232,6 @@ class UpdateSharePermissions:
1699
1232
  page_token=d.get('page_token', None))
1700
1233
 
1701
1234
 
1702
- class CleanRoomsAPI:
1703
- """A clean room is a secure, privacy-protecting environment where two or more parties can share sensitive
1704
- enterprise data, including customer data, for measurements, insights, activation and other use cases.
1705
-
1706
- To create clean rooms, you must be a metastore admin or a user with the **CREATE_CLEAN_ROOM** privilege."""
1707
-
1708
- def __init__(self, api_client):
1709
- self._api = api_client
1710
-
1711
- def create(self,
1712
- name: str,
1713
- remote_detailed_info: CentralCleanRoomInfo,
1714
- *,
1715
- comment: Optional[str] = None) -> CleanRoomInfo:
1716
- """Create a clean room.
1717
-
1718
- Creates a new clean room with specified colaborators. The caller must be a metastore admin or have the
1719
- **CREATE_CLEAN_ROOM** privilege on the metastore.
1720
-
1721
- :param name: str
1722
- Name of the clean room.
1723
- :param remote_detailed_info: :class:`CentralCleanRoomInfo`
1724
- Central clean room details.
1725
- :param comment: str (optional)
1726
- User-provided free-form text description.
1727
-
1728
- :returns: :class:`CleanRoomInfo`
1729
- """
1730
- body = {}
1731
- if comment is not None: body['comment'] = comment
1732
- if name is not None: body['name'] = name
1733
- if remote_detailed_info is not None: body['remote_detailed_info'] = remote_detailed_info.as_dict()
1734
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1735
-
1736
- res = self._api.do('POST', '/api/2.1/unity-catalog/clean-rooms', body=body, headers=headers)
1737
- return CleanRoomInfo.from_dict(res)
1738
-
1739
- def delete(self, name: str):
1740
- """Delete a clean room.
1741
-
1742
- Deletes a data object clean room from the metastore. The caller must be an owner of the clean room.
1743
-
1744
- :param name: str
1745
- The name of the clean room.
1746
-
1747
-
1748
- """
1749
-
1750
- headers = {'Accept': 'application/json', }
1751
-
1752
- self._api.do('DELETE', f'/api/2.1/unity-catalog/clean-rooms/{name}', headers=headers)
1753
-
1754
- def get(self, name: str, *, include_remote_details: Optional[bool] = None) -> CleanRoomInfo:
1755
- """Get a clean room.
1756
-
1757
- Gets a data object clean room from the metastore. The caller must be a metastore admin or the owner of
1758
- the clean room.
1759
-
1760
- :param name: str
1761
- The name of the clean room.
1762
- :param include_remote_details: bool (optional)
1763
- Whether to include remote details (central) on the clean room.
1764
-
1765
- :returns: :class:`CleanRoomInfo`
1766
- """
1767
-
1768
- query = {}
1769
- if include_remote_details is not None: query['include_remote_details'] = include_remote_details
1770
- headers = {'Accept': 'application/json', }
1771
-
1772
- res = self._api.do('GET', f'/api/2.1/unity-catalog/clean-rooms/{name}', query=query, headers=headers)
1773
- return CleanRoomInfo.from_dict(res)
1774
-
1775
- def list(self,
1776
- *,
1777
- max_results: Optional[int] = None,
1778
- page_token: Optional[str] = None) -> Iterator[CleanRoomInfo]:
1779
- """List clean rooms.
1780
-
1781
- Gets an array of data object clean rooms from the metastore. The caller must be a metastore admin or
1782
- the owner of the clean room. There is no guarantee of a specific ordering of the elements in the
1783
- array.
1784
-
1785
- :param max_results: int (optional)
1786
- Maximum number of clean rooms to return. If not set, all the clean rooms are returned (not
1787
- recommended). - when set to a value greater than 0, the page length is the minimum of this value and
1788
- a server configured value; - when set to 0, the page length is set to a server configured value
1789
- (recommended); - when set to a value less than 0, an invalid parameter error is returned;
1790
- :param page_token: str (optional)
1791
- Opaque pagination token to go to next page based on previous query.
1792
-
1793
- :returns: Iterator over :class:`CleanRoomInfo`
1794
- """
1795
-
1796
- query = {}
1797
- if max_results is not None: query['max_results'] = max_results
1798
- if page_token is not None: query['page_token'] = page_token
1799
- headers = {'Accept': 'application/json', }
1800
-
1801
- while True:
1802
- json = self._api.do('GET', '/api/2.1/unity-catalog/clean-rooms', query=query, headers=headers)
1803
- if 'clean_rooms' in json:
1804
- for v in json['clean_rooms']:
1805
- yield CleanRoomInfo.from_dict(v)
1806
- if 'next_page_token' not in json or not json['next_page_token']:
1807
- return
1808
- query['page_token'] = json['next_page_token']
1809
-
1810
- def update(self,
1811
- name: str,
1812
- *,
1813
- catalog_updates: Optional[List[CleanRoomCatalogUpdate]] = None,
1814
- comment: Optional[str] = None,
1815
- owner: Optional[str] = None) -> CleanRoomInfo:
1816
- """Update a clean room.
1817
-
1818
- Updates the clean room with the changes and data objects in the request. The caller must be the owner
1819
- of the clean room or a metastore admin.
1820
-
1821
- When the caller is a metastore admin, only the __owner__ field can be updated.
1822
-
1823
- In the case that the clean room name is changed **updateCleanRoom** requires that the caller is both
1824
- the clean room owner and a metastore admin.
1825
-
1826
- For each table that is added through this method, the clean room owner must also have **SELECT**
1827
- privilege on the table. The privilege must be maintained indefinitely for recipients to be able to
1828
- access the table. Typically, you should use a group as the clean room owner.
1829
-
1830
- Table removals through **update** do not require additional privileges.
1831
-
1832
- :param name: str
1833
- The name of the clean room.
1834
- :param catalog_updates: List[:class:`CleanRoomCatalogUpdate`] (optional)
1835
- Array of shared data object updates.
1836
- :param comment: str (optional)
1837
- User-provided free-form text description.
1838
- :param owner: str (optional)
1839
- Username of current owner of clean room.
1840
-
1841
- :returns: :class:`CleanRoomInfo`
1842
- """
1843
- body = {}
1844
- if catalog_updates is not None: body['catalog_updates'] = [v.as_dict() for v in catalog_updates]
1845
- if comment is not None: body['comment'] = comment
1846
- if owner is not None: body['owner'] = owner
1847
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1848
-
1849
- res = self._api.do('PATCH', f'/api/2.1/unity-catalog/clean-rooms/{name}', body=body, headers=headers)
1850
- return CleanRoomInfo.from_dict(res)
1851
-
1852
-
1853
1235
  class ProvidersAPI:
1854
1236
  """A data provider is an object representing the organization in the real world who shares the data. A
1855
1237
  provider contains shares which further contain the shared data."""
@@ -507,7 +507,7 @@ class ChannelName(Enum):
507
507
  CHANNEL_NAME_CURRENT = 'CHANNEL_NAME_CURRENT'
508
508
  CHANNEL_NAME_CUSTOM = 'CHANNEL_NAME_CUSTOM'
509
509
  CHANNEL_NAME_PREVIEW = 'CHANNEL_NAME_PREVIEW'
510
- CHANNEL_NAME_UNSPECIFIED = 'CHANNEL_NAME_UNSPECIFIED'
510
+ CHANNEL_NAME_PREVIOUS = 'CHANNEL_NAME_PREVIOUS'
511
511
 
512
512
 
513
513
  @dataclass
@@ -6579,11 +6579,10 @@ class StatementExecutionAPI:
6579
6579
  outstanding statement might have already completed execution when the cancel request arrives. Polling for
6580
6580
  status until a terminal state is reached is a reliable way to determine the final state. - Wait timeouts
6581
6581
  are approximate, occur server-side, and cannot account for things such as caller delays and network
6582
- latency from caller to service. - The system will auto-close a statement after one hour if the client
6583
- stops polling and thus you must poll at least once an hour. - The results are only available for one hour
6584
- after success; polling does not extend this. - The SQL Execution API must be used for the entire lifecycle
6585
- of the statement. For example, you cannot use the Jobs API to execute the command, and then the SQL
6586
- Execution API to cancel it.
6582
+ latency from caller to service. - To guarantee that the statement is kept alive, you must poll at least
6583
+ once every 15 minutes. - The results are only available for one hour after success; polling does not
6584
+ extend this. - The SQL Execution API must be used for the entire lifecycle of the statement. For example,
6585
+ you cannot use the Jobs API to execute the command, and then the SQL Execution API to cancel it.
6587
6586
 
6588
6587
  [Apache Arrow Columnar]: https://arrow.apache.org/overview/
6589
6588
  [Databricks SQL Statement Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html"""
@@ -7243,7 +7242,8 @@ class WarehousesAPI:
7243
7242
  ) -> WarehousePermissions:
7244
7243
  """Set SQL warehouse permissions.
7245
7244
 
7246
- Sets permissions on a SQL warehouse. SQL warehouses can inherit permissions from their root object.
7245
+ Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
7246
+ permissions if none are specified. Objects can inherit permissions from their root object.
7247
7247
 
7248
7248
  :param warehouse_id: str
7249
7249
  The SQL warehouse for which to get or manage permissions.