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

@@ -12,7 +12,6 @@ from databricks.sdk.mixins.compute import ClustersExt
12
12
  from databricks.sdk.mixins.files import DbfsExt, FilesExt
13
13
  from databricks.sdk.mixins.jobs import JobsExt
14
14
  from databricks.sdk.mixins.open_ai_client import ServingEndpointsExt
15
- from databricks.sdk.mixins.sharing import SharesExt
16
15
  from databricks.sdk.mixins.workspace import WorkspaceExt
17
16
  from databricks.sdk.service import agentbricks as pkg_agentbricks
18
17
  from databricks.sdk.service import apps as pkg_apps
@@ -358,7 +357,7 @@ class WorkspaceClient:
358
357
  self._api_client, serving_endpoints, serving_endpoints_data_plane_token_source
359
358
  )
360
359
  self._settings = pkg_settings.SettingsAPI(self._api_client)
361
- self._shares = SharesExt(self._api_client)
360
+ self._shares = pkg_sharing.SharesAPI(self._api_client)
362
361
  self._statement_execution = pkg_sql.StatementExecutionAPI(self._api_client)
363
362
  self._storage_credentials = pkg_catalog.StorageCredentialsAPI(self._api_client)
364
363
  self._system_schemas = pkg_catalog.SystemSchemasAPI(self._api_client)
@@ -882,7 +881,7 @@ class WorkspaceClient:
882
881
  return self._settings
883
882
 
884
883
  @property
885
- def shares(self) -> SharesExt:
884
+ def shares(self) -> pkg_sharing.SharesAPI:
886
885
  """A share is a container instantiated with :method:shares/create."""
887
886
  return self._shares
888
887
 
@@ -7856,6 +7856,7 @@ class Privilege(Enum):
7856
7856
  CREATE_VOLUME = "CREATE_VOLUME"
7857
7857
  EXECUTE = "EXECUTE"
7858
7858
  EXECUTE_CLEAN_ROOM_TASK = "EXECUTE_CLEAN_ROOM_TASK"
7859
+ EXTERNAL_USE_SCHEMA = "EXTERNAL_USE_SCHEMA"
7859
7860
  MANAGE = "MANAGE"
7860
7861
  MANAGE_ALLOWLIST = "MANAGE_ALLOWLIST"
7861
7862
  MODIFY = "MODIFY"
@@ -8539,7 +8540,7 @@ class Securable:
8539
8540
 
8540
8541
 
8541
8542
  class SecurableKind(Enum):
8542
- """Latest kind: CONNECTION_PALANTIR_OAUTH_M2M = 263; Next id:264"""
8543
+ """Latest kind: CONNECTION_SHAREPOINT_OAUTH_M2M = 264; Next id:265"""
8543
8544
 
8544
8545
  TABLE_DB_STORAGE = "TABLE_DB_STORAGE"
8545
8546
  TABLE_DELTA = "TABLE_DELTA"
@@ -9003,6 +9004,7 @@ class SystemType(Enum):
9003
9004
  SAP = "SAP"
9004
9005
  SERVICENOW = "SERVICENOW"
9005
9006
  SNOWFLAKE = "SNOWFLAKE"
9007
+ STREAM_NATIVE = "STREAM_NATIVE"
9006
9008
  TABLEAU = "TABLEAU"
9007
9009
  TERADATA = "TERADATA"
9008
9010
  WORKDAY = "WORKDAY"
@@ -10249,6 +10251,11 @@ class VolumeInfo:
10249
10251
  """The unique identifier of the volume"""
10250
10252
 
10251
10253
  volume_type: Optional[VolumeType] = None
10254
+ """The type of the volume. An external volume is located in the specified external location. A
10255
+ managed volume is located in the default location which is specified by the parent schema, or
10256
+ the parent catalog, or the Metastore. [Learn more]
10257
+
10258
+ [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external"""
10252
10259
 
10253
10260
  def as_dict(self) -> dict:
10254
10261
  """Serializes the VolumeInfo into a dictionary suitable for use as a JSON request body."""
@@ -10353,11 +10360,6 @@ class VolumeInfo:
10353
10360
 
10354
10361
 
10355
10362
  class VolumeType(Enum):
10356
- """The type of the volume. An external volume is located in the specified external location. A
10357
- managed volume is located in the default location which is specified by the parent schema, or
10358
- the parent catalog, or the Metastore. [Learn more]
10359
-
10360
- [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external"""
10361
10363
 
10362
10364
  EXTERNAL = "EXTERNAL"
10363
10365
  MANAGED = "MANAGED"
@@ -15424,6 +15426,11 @@ class VolumesAPI:
15424
15426
  :param name: str
15425
15427
  The name of the volume
15426
15428
  :param volume_type: :class:`VolumeType`
15429
+ The type of the volume. An external volume is located in the specified external location. A managed
15430
+ volume is located in the default location which is specified by the parent schema, or the parent
15431
+ catalog, or the Metastore. [Learn more]
15432
+
15433
+ [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external
15427
15434
  :param comment: str (optional)
15428
15435
  The comment attached to the volume
15429
15436
  :param storage_location: str (optional)
@@ -15482,7 +15489,7 @@ class VolumesAPI:
15482
15489
 
15483
15490
  The returned volumes are filtered based on the privileges of the calling user. For example, the
15484
15491
  metastore admin is able to list all the volumes. A regular user needs to be the owner or have the
15485
- **READ VOLUME** privilege on the volume to recieve the volumes in the response. For the latter case,
15492
+ **READ VOLUME** privilege on the volume to receive the volumes in the response. For the latter case,
15486
15493
  the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the
15487
15494
  **USE_SCHEMA** privilege on the parent schema.
15488
15495
 
@@ -714,6 +714,8 @@ class GenieQueryAttachment:
714
714
  last_updated_timestamp: Optional[int] = None
715
715
  """Time when the user updated the query last"""
716
716
 
717
+ parameters: Optional[List[QueryAttachmentParameter]] = None
718
+
717
719
  query: Optional[str] = None
718
720
  """AI generated SQL query"""
719
721
 
@@ -736,6 +738,8 @@ class GenieQueryAttachment:
736
738
  body["id"] = self.id
737
739
  if self.last_updated_timestamp is not None:
738
740
  body["last_updated_timestamp"] = self.last_updated_timestamp
741
+ if self.parameters:
742
+ body["parameters"] = [v.as_dict() for v in self.parameters]
739
743
  if self.query is not None:
740
744
  body["query"] = self.query
741
745
  if self.query_result_metadata:
@@ -755,6 +759,8 @@ class GenieQueryAttachment:
755
759
  body["id"] = self.id
756
760
  if self.last_updated_timestamp is not None:
757
761
  body["last_updated_timestamp"] = self.last_updated_timestamp
762
+ if self.parameters:
763
+ body["parameters"] = self.parameters
758
764
  if self.query is not None:
759
765
  body["query"] = self.query
760
766
  if self.query_result_metadata:
@@ -772,6 +778,7 @@ class GenieQueryAttachment:
772
778
  description=d.get("description", None),
773
779
  id=d.get("id", None),
774
780
  last_updated_timestamp=d.get("last_updated_timestamp", None),
781
+ parameters=_repeated_dict(d, "parameters", QueryAttachmentParameter),
775
782
  query=d.get("query", None),
776
783
  query_result_metadata=_from_dict(d, "query_result_metadata", GenieResultMetadata),
777
784
  statement_id=d.get("statement_id", None),
@@ -1135,6 +1142,7 @@ class MessageErrorType(Enum):
1135
1142
  DESCRIBE_QUERY_INVALID_SQL_ERROR = "DESCRIBE_QUERY_INVALID_SQL_ERROR"
1136
1143
  DESCRIBE_QUERY_TIMEOUT = "DESCRIBE_QUERY_TIMEOUT"
1137
1144
  DESCRIBE_QUERY_UNEXPECTED_FAILURE = "DESCRIBE_QUERY_UNEXPECTED_FAILURE"
1145
+ EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION = "EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION"
1138
1146
  FUNCTIONS_NOT_AVAILABLE_EXCEPTION = "FUNCTIONS_NOT_AVAILABLE_EXCEPTION"
1139
1147
  FUNCTION_ARGUMENTS_INVALID_EXCEPTION = "FUNCTION_ARGUMENTS_INVALID_EXCEPTION"
1140
1148
  FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION = "FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION"
@@ -1260,6 +1268,42 @@ class PublishedDashboard:
1260
1268
  )
1261
1269
 
1262
1270
 
1271
+ @dataclass
1272
+ class QueryAttachmentParameter:
1273
+ keyword: Optional[str] = None
1274
+
1275
+ sql_type: Optional[str] = None
1276
+
1277
+ value: Optional[str] = None
1278
+
1279
+ def as_dict(self) -> dict:
1280
+ """Serializes the QueryAttachmentParameter into a dictionary suitable for use as a JSON request body."""
1281
+ body = {}
1282
+ if self.keyword is not None:
1283
+ body["keyword"] = self.keyword
1284
+ if self.sql_type is not None:
1285
+ body["sql_type"] = self.sql_type
1286
+ if self.value is not None:
1287
+ body["value"] = self.value
1288
+ return body
1289
+
1290
+ def as_shallow_dict(self) -> dict:
1291
+ """Serializes the QueryAttachmentParameter into a shallow dictionary of its immediate attributes."""
1292
+ body = {}
1293
+ if self.keyword is not None:
1294
+ body["keyword"] = self.keyword
1295
+ if self.sql_type is not None:
1296
+ body["sql_type"] = self.sql_type
1297
+ if self.value is not None:
1298
+ body["value"] = self.value
1299
+ return body
1300
+
1301
+ @classmethod
1302
+ def from_dict(cls, d: Dict[str, Any]) -> QueryAttachmentParameter:
1303
+ """Deserializes the QueryAttachmentParameter from a dictionary."""
1304
+ return cls(keyword=d.get("keyword", None), sql_type=d.get("sql_type", None), value=d.get("value", None))
1305
+
1306
+
1263
1307
  @dataclass
1264
1308
  class Result:
1265
1309
  is_truncated: Optional[bool] = None
@@ -18,6 +18,38 @@ _LOG = logging.getLogger("databricks.sdk")
18
18
  # all definitions in this file are in alphabetical order
19
19
 
20
20
 
21
+ @dataclass
22
+ class CustomTag:
23
+ key: Optional[str] = None
24
+ """The key of the custom tag."""
25
+
26
+ value: Optional[str] = None
27
+ """The value of the custom tag."""
28
+
29
+ def as_dict(self) -> dict:
30
+ """Serializes the CustomTag into a dictionary suitable for use as a JSON request body."""
31
+ body = {}
32
+ if self.key is not None:
33
+ body["key"] = self.key
34
+ if self.value is not None:
35
+ body["value"] = self.value
36
+ return body
37
+
38
+ def as_shallow_dict(self) -> dict:
39
+ """Serializes the CustomTag into a shallow dictionary of its immediate attributes."""
40
+ body = {}
41
+ if self.key is not None:
42
+ body["key"] = self.key
43
+ if self.value is not None:
44
+ body["value"] = self.value
45
+ return body
46
+
47
+ @classmethod
48
+ def from_dict(cls, d: Dict[str, Any]) -> CustomTag:
49
+ """Deserializes the CustomTag from a dictionary."""
50
+ return cls(key=d.get("key", None), value=d.get("value", None))
51
+
52
+
21
53
  @dataclass
22
54
  class DatabaseCatalog:
23
55
  name: str
@@ -125,9 +157,16 @@ class DatabaseInstance:
125
157
  creator: Optional[str] = None
126
158
  """The email of the creator of the instance."""
127
159
 
160
+ custom_tags: Optional[List[CustomTag]] = None
161
+ """Custom tags associated with the instance. This field is only included on create and update
162
+ responses."""
163
+
128
164
  effective_capacity: Optional[str] = None
129
165
  """Deprecated. The sku of the instance; this field will always match the value of capacity."""
130
166
 
167
+ effective_custom_tags: Optional[List[CustomTag]] = None
168
+ """The recorded custom tags associated with the instance."""
169
+
131
170
  effective_enable_pg_native_login: Optional[bool] = None
132
171
  """Whether the instance has PG native password login enabled."""
133
172
 
@@ -145,6 +184,9 @@ class DatabaseInstance:
145
184
  effective_stopped: Optional[bool] = None
146
185
  """Whether the instance is stopped."""
147
186
 
187
+ effective_usage_policy_id: Optional[str] = None
188
+ """The policy that is applied to the instance."""
189
+
148
190
  enable_pg_native_login: Optional[bool] = None
149
191
  """Whether to enable PG native password login on the instance. Defaults to false."""
150
192
 
@@ -184,6 +226,9 @@ class DatabaseInstance:
184
226
  uid: Optional[str] = None
185
227
  """An immutable UUID identifier for the instance."""
186
228
 
229
+ usage_policy_id: Optional[str] = None
230
+ """The desired usage policy to associate with the instance."""
231
+
187
232
  def as_dict(self) -> dict:
188
233
  """Serializes the DatabaseInstance into a dictionary suitable for use as a JSON request body."""
189
234
  body = {}
@@ -195,8 +240,12 @@ class DatabaseInstance:
195
240
  body["creation_time"] = self.creation_time
196
241
  if self.creator is not None:
197
242
  body["creator"] = self.creator
243
+ if self.custom_tags:
244
+ body["custom_tags"] = [v.as_dict() for v in self.custom_tags]
198
245
  if self.effective_capacity is not None:
199
246
  body["effective_capacity"] = self.effective_capacity
247
+ if self.effective_custom_tags:
248
+ body["effective_custom_tags"] = [v.as_dict() for v in self.effective_custom_tags]
200
249
  if self.effective_enable_pg_native_login is not None:
201
250
  body["effective_enable_pg_native_login"] = self.effective_enable_pg_native_login
202
251
  if self.effective_enable_readable_secondaries is not None:
@@ -207,6 +256,8 @@ class DatabaseInstance:
207
256
  body["effective_retention_window_in_days"] = self.effective_retention_window_in_days
208
257
  if self.effective_stopped is not None:
209
258
  body["effective_stopped"] = self.effective_stopped
259
+ if self.effective_usage_policy_id is not None:
260
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
210
261
  if self.enable_pg_native_login is not None:
211
262
  body["enable_pg_native_login"] = self.enable_pg_native_login
212
263
  if self.enable_readable_secondaries is not None:
@@ -231,6 +282,8 @@ class DatabaseInstance:
231
282
  body["stopped"] = self.stopped
232
283
  if self.uid is not None:
233
284
  body["uid"] = self.uid
285
+ if self.usage_policy_id is not None:
286
+ body["usage_policy_id"] = self.usage_policy_id
234
287
  return body
235
288
 
236
289
  def as_shallow_dict(self) -> dict:
@@ -244,8 +297,12 @@ class DatabaseInstance:
244
297
  body["creation_time"] = self.creation_time
245
298
  if self.creator is not None:
246
299
  body["creator"] = self.creator
300
+ if self.custom_tags:
301
+ body["custom_tags"] = self.custom_tags
247
302
  if self.effective_capacity is not None:
248
303
  body["effective_capacity"] = self.effective_capacity
304
+ if self.effective_custom_tags:
305
+ body["effective_custom_tags"] = self.effective_custom_tags
249
306
  if self.effective_enable_pg_native_login is not None:
250
307
  body["effective_enable_pg_native_login"] = self.effective_enable_pg_native_login
251
308
  if self.effective_enable_readable_secondaries is not None:
@@ -256,6 +313,8 @@ class DatabaseInstance:
256
313
  body["effective_retention_window_in_days"] = self.effective_retention_window_in_days
257
314
  if self.effective_stopped is not None:
258
315
  body["effective_stopped"] = self.effective_stopped
316
+ if self.effective_usage_policy_id is not None:
317
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
259
318
  if self.enable_pg_native_login is not None:
260
319
  body["enable_pg_native_login"] = self.enable_pg_native_login
261
320
  if self.enable_readable_secondaries is not None:
@@ -280,6 +339,8 @@ class DatabaseInstance:
280
339
  body["stopped"] = self.stopped
281
340
  if self.uid is not None:
282
341
  body["uid"] = self.uid
342
+ if self.usage_policy_id is not None:
343
+ body["usage_policy_id"] = self.usage_policy_id
283
344
  return body
284
345
 
285
346
  @classmethod
@@ -290,12 +351,15 @@ class DatabaseInstance:
290
351
  child_instance_refs=_repeated_dict(d, "child_instance_refs", DatabaseInstanceRef),
291
352
  creation_time=d.get("creation_time", None),
292
353
  creator=d.get("creator", None),
354
+ custom_tags=_repeated_dict(d, "custom_tags", CustomTag),
293
355
  effective_capacity=d.get("effective_capacity", None),
356
+ effective_custom_tags=_repeated_dict(d, "effective_custom_tags", CustomTag),
294
357
  effective_enable_pg_native_login=d.get("effective_enable_pg_native_login", None),
295
358
  effective_enable_readable_secondaries=d.get("effective_enable_readable_secondaries", None),
296
359
  effective_node_count=d.get("effective_node_count", None),
297
360
  effective_retention_window_in_days=d.get("effective_retention_window_in_days", None),
298
361
  effective_stopped=d.get("effective_stopped", None),
362
+ effective_usage_policy_id=d.get("effective_usage_policy_id", None),
299
363
  enable_pg_native_login=d.get("enable_pg_native_login", None),
300
364
  enable_readable_secondaries=d.get("enable_readable_secondaries", None),
301
365
  name=d.get("name", None),
@@ -308,6 +372,7 @@ class DatabaseInstance:
308
372
  state=_enum(d, "state", DatabaseInstanceState),
309
373
  stopped=d.get("stopped", None),
310
374
  uid=d.get("uid", None),
375
+ usage_policy_id=d.get("usage_policy_id", None),
311
376
  )
312
377
 
313
378
 
@@ -390,25 +455,34 @@ class DatabaseInstanceRef:
390
455
  class DatabaseInstanceRole:
391
456
  """A DatabaseInstanceRole represents a Postgres role in a database instance."""
392
457
 
458
+ name: str
459
+ """The name of the role. This is the unique identifier for the role in an instance."""
460
+
393
461
  attributes: Optional[DatabaseInstanceRoleAttributes] = None
394
- """API-exposed Postgres role attributes"""
462
+ """The desired API-exposed Postgres role attribute to associate with the role. Optional."""
463
+
464
+ effective_attributes: Optional[DatabaseInstanceRoleAttributes] = None
465
+ """The attributes that are applied to the role."""
395
466
 
396
467
  identity_type: Optional[DatabaseInstanceRoleIdentityType] = None
397
468
  """The type of the role."""
398
469
 
470
+ instance_name: Optional[str] = None
471
+
399
472
  membership_role: Optional[DatabaseInstanceRoleMembershipRole] = None
400
473
  """An enum value for a standard role that this role is a member of."""
401
474
 
402
- name: Optional[str] = None
403
- """The name of the role. This is the unique identifier for the role in an instance."""
404
-
405
475
  def as_dict(self) -> dict:
406
476
  """Serializes the DatabaseInstanceRole into a dictionary suitable for use as a JSON request body."""
407
477
  body = {}
408
478
  if self.attributes:
409
479
  body["attributes"] = self.attributes.as_dict()
480
+ if self.effective_attributes:
481
+ body["effective_attributes"] = self.effective_attributes.as_dict()
410
482
  if self.identity_type is not None:
411
483
  body["identity_type"] = self.identity_type.value
484
+ if self.instance_name is not None:
485
+ body["instance_name"] = self.instance_name
412
486
  if self.membership_role is not None:
413
487
  body["membership_role"] = self.membership_role.value
414
488
  if self.name is not None:
@@ -420,8 +494,12 @@ class DatabaseInstanceRole:
420
494
  body = {}
421
495
  if self.attributes:
422
496
  body["attributes"] = self.attributes
497
+ if self.effective_attributes:
498
+ body["effective_attributes"] = self.effective_attributes
423
499
  if self.identity_type is not None:
424
500
  body["identity_type"] = self.identity_type
501
+ if self.instance_name is not None:
502
+ body["instance_name"] = self.instance_name
425
503
  if self.membership_role is not None:
426
504
  body["membership_role"] = self.membership_role
427
505
  if self.name is not None:
@@ -433,7 +511,9 @@ class DatabaseInstanceRole:
433
511
  """Deserializes the DatabaseInstanceRole from a dictionary."""
434
512
  return cls(
435
513
  attributes=_from_dict(d, "attributes", DatabaseInstanceRoleAttributes),
514
+ effective_attributes=_from_dict(d, "effective_attributes", DatabaseInstanceRoleAttributes),
436
515
  identity_type=_enum(d, "identity_type", DatabaseInstanceRoleIdentityType),
516
+ instance_name=d.get("instance_name", None),
437
517
  membership_role=_enum(d, "membership_role", DatabaseInstanceRoleMembershipRole),
438
518
  name=d.get("name", None),
439
519
  )
@@ -1527,22 +1607,32 @@ class DatabaseAPI:
1527
1607
  return self.create_database_instance(database_instance=database_instance).result(timeout=timeout)
1528
1608
 
1529
1609
  def create_database_instance_role(
1530
- self, instance_name: str, database_instance_role: DatabaseInstanceRole
1610
+ self,
1611
+ instance_name: str,
1612
+ database_instance_role: DatabaseInstanceRole,
1613
+ *,
1614
+ database_instance_name: Optional[str] = None,
1531
1615
  ) -> DatabaseInstanceRole:
1532
1616
  """Create a role for a Database Instance.
1533
1617
 
1534
1618
  :param instance_name: str
1535
1619
  :param database_instance_role: :class:`DatabaseInstanceRole`
1620
+ :param database_instance_name: str (optional)
1536
1621
 
1537
1622
  :returns: :class:`DatabaseInstanceRole`
1538
1623
  """
1539
1624
  body = database_instance_role.as_dict()
1625
+ query = {}
1626
+ if database_instance_name is not None:
1627
+ query["database_instance_name"] = database_instance_name
1540
1628
  headers = {
1541
1629
  "Accept": "application/json",
1542
1630
  "Content-Type": "application/json",
1543
1631
  }
1544
1632
 
1545
- res = self._api.do("POST", f"/api/2.0/database/instances/{instance_name}/roles", body=body, headers=headers)
1633
+ res = self._api.do(
1634
+ "POST", f"/api/2.0/database/instances/{instance_name}/roles", query=query, body=body, headers=headers
1635
+ )
1546
1636
  return DatabaseInstanceRole.from_dict(res)
1547
1637
 
1548
1638
  def create_database_table(self, table: DatabaseTable) -> DatabaseTable:
@@ -3583,7 +3583,7 @@ class PermissionsAPI:
3583
3583
 
3584
3584
  :param request_object_type: str
3585
3585
  The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3586
- clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3586
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, genie,
3587
3587
  instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3588
3588
  warehouses.
3589
3589
  :param request_object_id: str
@@ -3604,7 +3604,7 @@ class PermissionsAPI:
3604
3604
 
3605
3605
  :param request_object_type: str
3606
3606
  The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3607
- clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3607
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, genie,
3608
3608
  instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3609
3609
  warehouses.
3610
3610
  :param request_object_id: str
@@ -3634,7 +3634,7 @@ class PermissionsAPI:
3634
3634
 
3635
3635
  :param request_object_type: str
3636
3636
  The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3637
- clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3637
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, genie,
3638
3638
  instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3639
3639
  warehouses.
3640
3640
  :param request_object_id: str
@@ -3668,7 +3668,7 @@ class PermissionsAPI:
3668
3668
 
3669
3669
  :param request_object_type: str
3670
3670
  The type of the request object. Can be one of the following: alerts, alertsv2, authorization,
3671
- clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files,
3671
+ clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, genie,
3672
3672
  instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or
3673
3673
  warehouses.
3674
3674
  :param request_object_id: str
@@ -3905,6 +3905,38 @@ class TrafficConfig:
3905
3905
  return cls(routes=_repeated_dict(d, "routes", Route))
3906
3906
 
3907
3907
 
3908
+ @dataclass
3909
+ class UpdateInferenceEndpointNotificationsResponse:
3910
+ email_notifications: Optional[EmailNotifications] = None
3911
+
3912
+ name: Optional[str] = None
3913
+
3914
+ def as_dict(self) -> dict:
3915
+ """Serializes the UpdateInferenceEndpointNotificationsResponse into a dictionary suitable for use as a JSON request body."""
3916
+ body = {}
3917
+ if self.email_notifications:
3918
+ body["email_notifications"] = self.email_notifications.as_dict()
3919
+ if self.name is not None:
3920
+ body["name"] = self.name
3921
+ return body
3922
+
3923
+ def as_shallow_dict(self) -> dict:
3924
+ """Serializes the UpdateInferenceEndpointNotificationsResponse into a shallow dictionary of its immediate attributes."""
3925
+ body = {}
3926
+ if self.email_notifications:
3927
+ body["email_notifications"] = self.email_notifications
3928
+ if self.name is not None:
3929
+ body["name"] = self.name
3930
+ return body
3931
+
3932
+ @classmethod
3933
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateInferenceEndpointNotificationsResponse:
3934
+ """Deserializes the UpdateInferenceEndpointNotificationsResponse from a dictionary."""
3935
+ return cls(
3936
+ email_notifications=_from_dict(d, "email_notifications", EmailNotifications), name=d.get("name", None)
3937
+ )
3938
+
3939
+
3908
3940
  @dataclass
3909
3941
  class V1ResponseChoiceElement:
3910
3942
  finish_reason: Optional[str] = None
@@ -4706,6 +4738,30 @@ class ServingEndpointsAPI:
4706
4738
  traffic_config=traffic_config,
4707
4739
  ).result(timeout=timeout)
4708
4740
 
4741
+ def update_notifications(
4742
+ self, name: str, *, email_notifications: Optional[EmailNotifications] = None
4743
+ ) -> UpdateInferenceEndpointNotificationsResponse:
4744
+ """Updates the email and webhook notification settings for an endpoint.
4745
+
4746
+ :param name: str
4747
+ The name of the serving endpoint whose notifications are being updated. This field is required.
4748
+ :param email_notifications: :class:`EmailNotifications` (optional)
4749
+ The email notification settings to update. Specify email addresses to notify when endpoint state
4750
+ changes occur.
4751
+
4752
+ :returns: :class:`UpdateInferenceEndpointNotificationsResponse`
4753
+ """
4754
+ body = {}
4755
+ if email_notifications is not None:
4756
+ body["email_notifications"] = email_notifications.as_dict()
4757
+ headers = {
4758
+ "Accept": "application/json",
4759
+ "Content-Type": "application/json",
4760
+ }
4761
+
4762
+ res = self._api.do("PATCH", f"/api/2.0/serving-endpoints/{name}/notifications", body=body, headers=headers)
4763
+ return UpdateInferenceEndpointNotificationsResponse.from_dict(res)
4764
+
4709
4765
  def update_permissions(
4710
4766
  self,
4711
4767
  serving_endpoint_id: str,
databricks/sdk/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.66.0"
1
+ __version__ = "0.67.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: databricks-sdk
3
- Version: 0.66.0
3
+ Version: 0.67.0
4
4
  Summary: Databricks SDK for Python (Beta)
5
5
  Project-URL: Documentation, https://databricks-sdk-py.readthedocs.io
6
6
  Keywords: databricks,sdk
@@ -1,5 +1,5 @@
1
1
  databricks/__init__.py,sha256=CF2MJcZFwbpn9TwQER8qnCDhkPooBGQNVkX4v7g6p3g,537
2
- databricks/sdk/__init__.py,sha256=et__pswfMvQLJhVOmAy2XCmgmkMH3-NnXau0LBnJZ9M,67455
2
+ databricks/sdk/__init__.py,sha256=77dDqCny0vY_9pmY5hitze4AHSyb0rSHVk6bzM3M0n8,67427
3
3
  databricks/sdk/_base_client.py,sha256=IMHtzC5BhWt-lBVjifewR1Ah5fegGDMv0__-O1hCxWI,15850
4
4
  databricks/sdk/_property.py,sha256=ccbxhkXZmZOxbx2sqKMTzhVZDuvWXG0WPHFRgac6JAM,1701
5
5
  databricks/sdk/azure.py,sha256=sN_ARpmP9h1JovtiHIsDLtrVQP_K11eNDDtHS6PD19k,1015
@@ -17,7 +17,7 @@ databricks/sdk/oidc_token_supplier.py,sha256=QrO6J0QY4yFfcdQDL5h2OfxMxvBZJPtPmPe
17
17
  databricks/sdk/py.typed,sha256=pSvaHpbY1UPNEXyVFUjlgBhjPFZMmVC_UNrPC7eMOHI,74
18
18
  databricks/sdk/retries.py,sha256=7k2kEexGqGKXHNAWHbPFSZSugU8UIU0qtyly_hix22Q,2581
19
19
  databricks/sdk/useragent.py,sha256=boEgzTv-Zmo6boipZKjSopNy0CXg4GShC1_lTKpJgqs,7361
20
- databricks/sdk/version.py,sha256=rdBd9Kj9DDCtQNzVZEbaE1YatB7HZXL9qX4Ge-gXzaM,23
20
+ databricks/sdk/version.py,sha256=DkegR91M-IkILN5EBv-0LVftxIGE60qyryEQ_lYCjdg,23
21
21
  databricks/sdk/_widgets/__init__.py,sha256=VhI-VvLlr3rKUT1nbROslHJIbmZX_tPJ9rRhrdFsYUA,2811
22
22
  databricks/sdk/_widgets/default_widgets_utils.py,sha256=_hwCbptLbRzWEmknco0H1wQNAYcuy2pjFO9NiRbvFeo,1127
23
23
  databricks/sdk/_widgets/ipywidgets_utils.py,sha256=mg3rEPG9z76e0yVjGgcLybUvd_zSuN5ziGeKiZ-c8Ew,2927
@@ -48,13 +48,13 @@ databricks/sdk/service/_internal.py,sha256=PY83MPehEwGuMzCnyvolqglnfZeQ7-eS38ked
48
48
  databricks/sdk/service/agentbricks.py,sha256=cGl_d1MEFG2XY48WN9veCJ4UgVMadC9KOsDvUpbMc0k,11706
49
49
  databricks/sdk/service/apps.py,sha256=RXuwG12MU62W9B855dP9N99R47hAZkNJlXcdmCNe5Jo,77562
50
50
  databricks/sdk/service/billing.py,sha256=Y1tuA7x-wl720TCA98merqUqwrhA4KGd92oWCv679ps,90880
51
- databricks/sdk/service/catalog.py,sha256=WORL1vy1-qmkZw3Eh68KltkfIaQILMAgl-mEe1r29zA,657977
51
+ databricks/sdk/service/catalog.py,sha256=2yLb9idl9XNTknVXDKkAxLWhovbILgB3Lbje-x6RXmo,658422
52
52
  databricks/sdk/service/cleanrooms.py,sha256=EOsSMl103re7FJPGGvyrnAo-HLS1RUwL09yM7PyQaso,81148
53
53
  databricks/sdk/service/compute.py,sha256=n56cAv-pgvf4CvX2WMDXR7EaAYK9DZH8CdnQyE7X11Q,469028
54
- databricks/sdk/service/dashboards.py,sha256=Bu7Yfxv9iAjeBtHnoZKOxcsblIw48tD35ObJwuUfRaY,100878
55
- databricks/sdk/service/database.py,sha256=tI7-T3fLOfSrc7NK525xHpRGakT2aeLWxtfTmT_HwLY,85638
54
+ databricks/sdk/service/dashboards.py,sha256=JfAbTQ64S_MvCw_71Y9gQU9Xc31-YBtLVqH9G3WpPpw,102551
55
+ databricks/sdk/service/database.py,sha256=0v0NaszFFAh1hyGyqUvoyzIcctwsuXHgr9LMuPPTur8,89435
56
56
  databricks/sdk/service/files.py,sha256=k28gM20L9bw_RmKcIm8IcNFfHVtENCbakptM3p8bgbw,38403
57
- databricks/sdk/service/iam.py,sha256=JGrnL-yVKq7gqyQHjs3FJYuEIZ0AJkO7uoVPHshpjGg,247828
57
+ databricks/sdk/service/iam.py,sha256=bw-p6ZacjJObuxsFVy4U5-lklKFlwwOShEsCd1DMdTk,247856
58
58
  databricks/sdk/service/iamv2.py,sha256=7PMPsbTaFpYmJ0AxduUNNGqYMeip_v5xCOT6BdcX45M,24082
59
59
  databricks/sdk/service/jobs.py,sha256=fl3sTb_PIYyyoR5HIiYFivutq4ZwrYKK7JOQBakIefE,430601
60
60
  databricks/sdk/service/marketplace.py,sha256=8MpP8Y65R6bGyvuWW4ZU6b-6__a4WLZVcDScLh0to4g,153028
@@ -63,7 +63,7 @@ databricks/sdk/service/oauth2.py,sha256=9jvm4Blh-X096WsdK0RR_LQVKdP2K69mvik6RAUa
63
63
  databricks/sdk/service/pipelines.py,sha256=Jzr4oU3rhrXNh0WN-GsVAATxBzJNLJr-CVZ8OAO1pQs,164867
64
64
  databricks/sdk/service/provisioning.py,sha256=zZm_4lDO_mhDAOcaNoMDDz4Die_MXoapNa4NuwLJYww,129980
65
65
  databricks/sdk/service/qualitymonitorv2.py,sha256=82IUD7oTDNPwMcIDE_v59-nr2I3gpL65Ih7UfB5eInY,9202
66
- databricks/sdk/service/serving.py,sha256=xDddrGyr7836whZCf2Cfr7dmWHye1-r7EZ3YorEgWlw,214037
66
+ databricks/sdk/service/serving.py,sha256=QBaRuqm56uh6rtUxE9TWPBU0DOLAv-XvKRADFrdTKeM,216435
67
67
  databricks/sdk/service/settings.py,sha256=032ZhPMCCEA6fMnEdWWIg6qcsdC5Oc7pFBjvhvzT0ns,375492
68
68
  databricks/sdk/service/settingsv2.py,sha256=5DvSFFx69V0n0BRSzg02iCh3GOmJFJnQWOsinWlZrUI,37560
69
69
  databricks/sdk/service/sharing.py,sha256=0TmpkNBfiiBmSXCCvi4SP2O-YxtxnfL8ak5dRa_TIM4,142979
@@ -71,9 +71,9 @@ databricks/sdk/service/sql.py,sha256=ASiMwJWHKGmjeB4NmPw_zHfnrW7SHpUu8mnFYgpSU-I
71
71
  databricks/sdk/service/tags.py,sha256=Vb051O_BpaD6n0Y3fGf95_qr1JAQ2xrUnEpVdezMMMw,8866
72
72
  databricks/sdk/service/vectorsearch.py,sha256=y2GK_kgArrgPwf1gXtHfuIt3nn5GD9GapSmQTemdhYE,72592
73
73
  databricks/sdk/service/workspace.py,sha256=iss6wuYvMDSMrgwks0FuRRBeJSZFmWNOCkPIMJAzMgY,111868
74
- databricks_sdk-0.66.0.dist-info/licenses/LICENSE,sha256=afBgTZo-JsYqj4VOjnejBetMuHKcFR30YobDdpVFkqY,11411
75
- databricks_sdk-0.66.0.dist-info/licenses/NOTICE,sha256=tkRcQYA1k68wDLcnOWbg2xJDsUOJw8G8DGBhb8dnI3w,1588
76
- databricks_sdk-0.66.0.dist-info/METADATA,sha256=x4-gZEOLtpwdF_chddbnj7MAzuEuk-4vfZR15Z0j8xw,39409
77
- databricks_sdk-0.66.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
78
- databricks_sdk-0.66.0.dist-info/top_level.txt,sha256=7kRdatoSgU0EUurRQJ_3F1Nv4EOSHWAr6ng25tJOJKU,11
79
- databricks_sdk-0.66.0.dist-info/RECORD,,
74
+ databricks_sdk-0.67.0.dist-info/licenses/LICENSE,sha256=afBgTZo-JsYqj4VOjnejBetMuHKcFR30YobDdpVFkqY,11411
75
+ databricks_sdk-0.67.0.dist-info/licenses/NOTICE,sha256=tkRcQYA1k68wDLcnOWbg2xJDsUOJw8G8DGBhb8dnI3w,1588
76
+ databricks_sdk-0.67.0.dist-info/METADATA,sha256=cpcpPkUQEDiDNQO6cGwcGGyOClfa2xcbgX3doyMbxaA,39409
77
+ databricks_sdk-0.67.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
78
+ databricks_sdk-0.67.0.dist-info/top_level.txt,sha256=7kRdatoSgU0EUurRQJ_3F1Nv4EOSHWAr6ng25tJOJKU,11
79
+ databricks_sdk-0.67.0.dist-info/RECORD,,