databricks-sdk 0.61.0__py3-none-any.whl → 0.63.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.
- databricks/sdk/__init__.py +15 -2
- databricks/sdk/config.py +15 -2
- databricks/sdk/service/catalog.py +791 -22
- databricks/sdk/service/cleanrooms.py +21 -14
- databricks/sdk/service/compute.py +14 -0
- databricks/sdk/service/dashboards.py +8 -0
- databricks/sdk/service/database.py +214 -3
- databricks/sdk/service/jobs.py +104 -1
- databricks/sdk/service/ml.py +3 -4
- databricks/sdk/service/serving.py +102 -14
- databricks/sdk/service/settings.py +36 -1
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.61.0.dist-info → databricks_sdk-0.63.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.61.0.dist-info → databricks_sdk-0.63.0.dist-info}/RECORD +18 -18
- {databricks_sdk-0.61.0.dist-info → databricks_sdk-0.63.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.61.0.dist-info → databricks_sdk-0.63.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.61.0.dist-info → databricks_sdk-0.63.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.61.0.dist-info → databricks_sdk-0.63.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/jobs.py
CHANGED
|
@@ -3037,6 +3037,11 @@ class JobSettings:
|
|
|
3037
3037
|
the job runs only when triggered by clicking “Run Now” in the Jobs UI or sending an API
|
|
3038
3038
|
request to `runNow`."""
|
|
3039
3039
|
|
|
3040
|
+
usage_policy_id: Optional[str] = None
|
|
3041
|
+
"""The id of the user specified usage policy to use for this job. If not specified, a default usage
|
|
3042
|
+
policy may be applied when creating or modifying the job. See `effective_budget_policy_id` for
|
|
3043
|
+
the budget policy used by this workload."""
|
|
3044
|
+
|
|
3040
3045
|
webhook_notifications: Optional[WebhookNotifications] = None
|
|
3041
3046
|
"""A collection of system notification IDs to notify when runs of this job begin or complete."""
|
|
3042
3047
|
|
|
@@ -3089,6 +3094,8 @@ class JobSettings:
|
|
|
3089
3094
|
body["timeout_seconds"] = self.timeout_seconds
|
|
3090
3095
|
if self.trigger:
|
|
3091
3096
|
body["trigger"] = self.trigger.as_dict()
|
|
3097
|
+
if self.usage_policy_id is not None:
|
|
3098
|
+
body["usage_policy_id"] = self.usage_policy_id
|
|
3092
3099
|
if self.webhook_notifications:
|
|
3093
3100
|
body["webhook_notifications"] = self.webhook_notifications.as_dict()
|
|
3094
3101
|
return body
|
|
@@ -3142,6 +3149,8 @@ class JobSettings:
|
|
|
3142
3149
|
body["timeout_seconds"] = self.timeout_seconds
|
|
3143
3150
|
if self.trigger:
|
|
3144
3151
|
body["trigger"] = self.trigger
|
|
3152
|
+
if self.usage_policy_id is not None:
|
|
3153
|
+
body["usage_policy_id"] = self.usage_policy_id
|
|
3145
3154
|
if self.webhook_notifications:
|
|
3146
3155
|
body["webhook_notifications"] = self.webhook_notifications
|
|
3147
3156
|
return body
|
|
@@ -3173,6 +3182,7 @@ class JobSettings:
|
|
|
3173
3182
|
tasks=_repeated_dict(d, "tasks", Task),
|
|
3174
3183
|
timeout_seconds=d.get("timeout_seconds", None),
|
|
3175
3184
|
trigger=_from_dict(d, "trigger", TriggerSettings),
|
|
3185
|
+
usage_policy_id=d.get("usage_policy_id", None),
|
|
3176
3186
|
webhook_notifications=_from_dict(d, "webhook_notifications", WebhookNotifications),
|
|
3177
3187
|
)
|
|
3178
3188
|
|
|
@@ -7223,6 +7233,73 @@ class SubscriptionSubscriber:
|
|
|
7223
7233
|
return cls(destination_id=d.get("destination_id", None), user_name=d.get("user_name", None))
|
|
7224
7234
|
|
|
7225
7235
|
|
|
7236
|
+
@dataclass
|
|
7237
|
+
class TableState:
|
|
7238
|
+
has_seen_updates: Optional[bool] = None
|
|
7239
|
+
"""Whether or not the table has seen updates since either the creation of the trigger or the last
|
|
7240
|
+
successful evaluation of the trigger"""
|
|
7241
|
+
|
|
7242
|
+
table_name: Optional[str] = None
|
|
7243
|
+
"""Full table name of the table to monitor, e.g. `mycatalog.myschema.mytable`"""
|
|
7244
|
+
|
|
7245
|
+
def as_dict(self) -> dict:
|
|
7246
|
+
"""Serializes the TableState into a dictionary suitable for use as a JSON request body."""
|
|
7247
|
+
body = {}
|
|
7248
|
+
if self.has_seen_updates is not None:
|
|
7249
|
+
body["has_seen_updates"] = self.has_seen_updates
|
|
7250
|
+
if self.table_name is not None:
|
|
7251
|
+
body["table_name"] = self.table_name
|
|
7252
|
+
return body
|
|
7253
|
+
|
|
7254
|
+
def as_shallow_dict(self) -> dict:
|
|
7255
|
+
"""Serializes the TableState into a shallow dictionary of its immediate attributes."""
|
|
7256
|
+
body = {}
|
|
7257
|
+
if self.has_seen_updates is not None:
|
|
7258
|
+
body["has_seen_updates"] = self.has_seen_updates
|
|
7259
|
+
if self.table_name is not None:
|
|
7260
|
+
body["table_name"] = self.table_name
|
|
7261
|
+
return body
|
|
7262
|
+
|
|
7263
|
+
@classmethod
|
|
7264
|
+
def from_dict(cls, d: Dict[str, Any]) -> TableState:
|
|
7265
|
+
"""Deserializes the TableState from a dictionary."""
|
|
7266
|
+
return cls(has_seen_updates=d.get("has_seen_updates", None), table_name=d.get("table_name", None))
|
|
7267
|
+
|
|
7268
|
+
|
|
7269
|
+
@dataclass
|
|
7270
|
+
class TableTriggerState:
|
|
7271
|
+
last_seen_table_states: Optional[List[TableState]] = None
|
|
7272
|
+
|
|
7273
|
+
using_scalable_monitoring: Optional[bool] = None
|
|
7274
|
+
"""Indicates whether the trigger is using scalable monitoring."""
|
|
7275
|
+
|
|
7276
|
+
def as_dict(self) -> dict:
|
|
7277
|
+
"""Serializes the TableTriggerState into a dictionary suitable for use as a JSON request body."""
|
|
7278
|
+
body = {}
|
|
7279
|
+
if self.last_seen_table_states:
|
|
7280
|
+
body["last_seen_table_states"] = [v.as_dict() for v in self.last_seen_table_states]
|
|
7281
|
+
if self.using_scalable_monitoring is not None:
|
|
7282
|
+
body["using_scalable_monitoring"] = self.using_scalable_monitoring
|
|
7283
|
+
return body
|
|
7284
|
+
|
|
7285
|
+
def as_shallow_dict(self) -> dict:
|
|
7286
|
+
"""Serializes the TableTriggerState into a shallow dictionary of its immediate attributes."""
|
|
7287
|
+
body = {}
|
|
7288
|
+
if self.last_seen_table_states:
|
|
7289
|
+
body["last_seen_table_states"] = self.last_seen_table_states
|
|
7290
|
+
if self.using_scalable_monitoring is not None:
|
|
7291
|
+
body["using_scalable_monitoring"] = self.using_scalable_monitoring
|
|
7292
|
+
return body
|
|
7293
|
+
|
|
7294
|
+
@classmethod
|
|
7295
|
+
def from_dict(cls, d: Dict[str, Any]) -> TableTriggerState:
|
|
7296
|
+
"""Deserializes the TableTriggerState from a dictionary."""
|
|
7297
|
+
return cls(
|
|
7298
|
+
last_seen_table_states=_repeated_dict(d, "last_seen_table_states", TableState),
|
|
7299
|
+
using_scalable_monitoring=d.get("using_scalable_monitoring", None),
|
|
7300
|
+
)
|
|
7301
|
+
|
|
7302
|
+
|
|
7226
7303
|
@dataclass
|
|
7227
7304
|
class TableUpdateTriggerConfiguration:
|
|
7228
7305
|
condition: Optional[Condition] = None
|
|
@@ -7817,6 +7894,8 @@ class TerminationCodeCode(Enum):
|
|
|
7817
7894
|
run failed due to a cloud provider issue. Refer to the state message for further details. *
|
|
7818
7895
|
`MAX_JOB_QUEUE_SIZE_EXCEEDED`: The run was skipped due to reaching the job level queue size
|
|
7819
7896
|
limit. * `DISABLED`: The run was never executed because it was disabled explicitly by the user.
|
|
7897
|
+
* `BREAKING_CHANGE`: Run failed because of an intentional breaking change in Spark, but it will
|
|
7898
|
+
be retried with a mitigation config.
|
|
7820
7899
|
|
|
7821
7900
|
[Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now"""
|
|
7822
7901
|
|
|
@@ -7993,11 +8072,15 @@ class TriggerSettings:
|
|
|
7993
8072
|
class TriggerStateProto:
|
|
7994
8073
|
file_arrival: Optional[FileArrivalTriggerState] = None
|
|
7995
8074
|
|
|
8075
|
+
table: Optional[TableTriggerState] = None
|
|
8076
|
+
|
|
7996
8077
|
def as_dict(self) -> dict:
|
|
7997
8078
|
"""Serializes the TriggerStateProto into a dictionary suitable for use as a JSON request body."""
|
|
7998
8079
|
body = {}
|
|
7999
8080
|
if self.file_arrival:
|
|
8000
8081
|
body["file_arrival"] = self.file_arrival.as_dict()
|
|
8082
|
+
if self.table:
|
|
8083
|
+
body["table"] = self.table.as_dict()
|
|
8001
8084
|
return body
|
|
8002
8085
|
|
|
8003
8086
|
def as_shallow_dict(self) -> dict:
|
|
@@ -8005,12 +8088,17 @@ class TriggerStateProto:
|
|
|
8005
8088
|
body = {}
|
|
8006
8089
|
if self.file_arrival:
|
|
8007
8090
|
body["file_arrival"] = self.file_arrival
|
|
8091
|
+
if self.table:
|
|
8092
|
+
body["table"] = self.table
|
|
8008
8093
|
return body
|
|
8009
8094
|
|
|
8010
8095
|
@classmethod
|
|
8011
8096
|
def from_dict(cls, d: Dict[str, Any]) -> TriggerStateProto:
|
|
8012
8097
|
"""Deserializes the TriggerStateProto from a dictionary."""
|
|
8013
|
-
return cls(
|
|
8098
|
+
return cls(
|
|
8099
|
+
file_arrival=_from_dict(d, "file_arrival", FileArrivalTriggerState),
|
|
8100
|
+
table=_from_dict(d, "table", TableTriggerState),
|
|
8101
|
+
)
|
|
8014
8102
|
|
|
8015
8103
|
|
|
8016
8104
|
class TriggerType(Enum):
|
|
@@ -8361,6 +8449,7 @@ class JobsAPI:
|
|
|
8361
8449
|
tasks: Optional[List[Task]] = None,
|
|
8362
8450
|
timeout_seconds: Optional[int] = None,
|
|
8363
8451
|
trigger: Optional[TriggerSettings] = None,
|
|
8452
|
+
usage_policy_id: Optional[str] = None,
|
|
8364
8453
|
webhook_notifications: Optional[WebhookNotifications] = None,
|
|
8365
8454
|
) -> CreateResponse:
|
|
8366
8455
|
"""Create a new job.
|
|
@@ -8455,6 +8544,10 @@ class JobsAPI:
|
|
|
8455
8544
|
A configuration to trigger a run when certain conditions are met. The default behavior is that the
|
|
8456
8545
|
job runs only when triggered by clicking “Run Now” in the Jobs UI or sending an API request to
|
|
8457
8546
|
`runNow`.
|
|
8547
|
+
:param usage_policy_id: str (optional)
|
|
8548
|
+
The id of the user specified usage policy to use for this job. If not specified, a default usage
|
|
8549
|
+
policy may be applied when creating or modifying the job. See `effective_budget_policy_id` for the
|
|
8550
|
+
budget policy used by this workload.
|
|
8458
8551
|
:param webhook_notifications: :class:`WebhookNotifications` (optional)
|
|
8459
8552
|
A collection of system notification IDs to notify when runs of this job begin or complete.
|
|
8460
8553
|
|
|
@@ -8509,6 +8602,8 @@ class JobsAPI:
|
|
|
8509
8602
|
body["timeout_seconds"] = timeout_seconds
|
|
8510
8603
|
if trigger is not None:
|
|
8511
8604
|
body["trigger"] = trigger.as_dict()
|
|
8605
|
+
if usage_policy_id is not None:
|
|
8606
|
+
body["usage_policy_id"] = usage_policy_id
|
|
8512
8607
|
if webhook_notifications is not None:
|
|
8513
8608
|
body["webhook_notifications"] = webhook_notifications.as_dict()
|
|
8514
8609
|
headers = {
|
|
@@ -9305,6 +9400,7 @@ class JobsAPI:
|
|
|
9305
9400
|
run_name: Optional[str] = None,
|
|
9306
9401
|
tasks: Optional[List[SubmitTask]] = None,
|
|
9307
9402
|
timeout_seconds: Optional[int] = None,
|
|
9403
|
+
usage_policy_id: Optional[str] = None,
|
|
9308
9404
|
webhook_notifications: Optional[WebhookNotifications] = None,
|
|
9309
9405
|
) -> Wait[Run]:
|
|
9310
9406
|
"""Submit a one-time run. This endpoint allows you to submit a workload directly without creating a job.
|
|
@@ -9356,6 +9452,9 @@ class JobsAPI:
|
|
|
9356
9452
|
:param tasks: List[:class:`SubmitTask`] (optional)
|
|
9357
9453
|
:param timeout_seconds: int (optional)
|
|
9358
9454
|
An optional timeout applied to each run of this job. A value of `0` means no timeout.
|
|
9455
|
+
:param usage_policy_id: str (optional)
|
|
9456
|
+
The user specified id of the usage policy to use for this one-time run. If not specified, a default
|
|
9457
|
+
usage policy may be applied when creating or modifying the job.
|
|
9359
9458
|
:param webhook_notifications: :class:`WebhookNotifications` (optional)
|
|
9360
9459
|
A collection of system notification IDs to notify when the run begins or completes.
|
|
9361
9460
|
|
|
@@ -9390,6 +9489,8 @@ class JobsAPI:
|
|
|
9390
9489
|
body["tasks"] = [v.as_dict() for v in tasks]
|
|
9391
9490
|
if timeout_seconds is not None:
|
|
9392
9491
|
body["timeout_seconds"] = timeout_seconds
|
|
9492
|
+
if usage_policy_id is not None:
|
|
9493
|
+
body["usage_policy_id"] = usage_policy_id
|
|
9393
9494
|
if webhook_notifications is not None:
|
|
9394
9495
|
body["webhook_notifications"] = webhook_notifications.as_dict()
|
|
9395
9496
|
headers = {
|
|
@@ -9420,6 +9521,7 @@ class JobsAPI:
|
|
|
9420
9521
|
run_name: Optional[str] = None,
|
|
9421
9522
|
tasks: Optional[List[SubmitTask]] = None,
|
|
9422
9523
|
timeout_seconds: Optional[int] = None,
|
|
9524
|
+
usage_policy_id: Optional[str] = None,
|
|
9423
9525
|
webhook_notifications: Optional[WebhookNotifications] = None,
|
|
9424
9526
|
timeout=timedelta(minutes=20),
|
|
9425
9527
|
) -> Run:
|
|
@@ -9437,6 +9539,7 @@ class JobsAPI:
|
|
|
9437
9539
|
run_name=run_name,
|
|
9438
9540
|
tasks=tasks,
|
|
9439
9541
|
timeout_seconds=timeout_seconds,
|
|
9542
|
+
usage_policy_id=usage_policy_id,
|
|
9440
9543
|
webhook_notifications=webhook_notifications,
|
|
9441
9544
|
).result(timeout=timeout)
|
|
9442
9545
|
|
databricks/sdk/service/ml.py
CHANGED
|
@@ -3494,10 +3494,8 @@ class PublishSpec:
|
|
|
3494
3494
|
online_table_name: str
|
|
3495
3495
|
"""The full three-part (catalog, schema, table) name of the online table."""
|
|
3496
3496
|
|
|
3497
|
-
publish_mode:
|
|
3498
|
-
"""The publish mode of the pipeline that syncs the online table with the source table.
|
|
3499
|
-
TRIGGERED if not specified. All publish modes require the source table to have Change Data Feed
|
|
3500
|
-
(CDF) enabled."""
|
|
3497
|
+
publish_mode: PublishSpecPublishMode
|
|
3498
|
+
"""The publish mode of the pipeline that syncs the online table with the source table."""
|
|
3501
3499
|
|
|
3502
3500
|
def as_dict(self) -> dict:
|
|
3503
3501
|
"""Serializes the PublishSpec into a dictionary suitable for use as a JSON request body."""
|
|
@@ -3534,6 +3532,7 @@ class PublishSpec:
|
|
|
3534
3532
|
class PublishSpecPublishMode(Enum):
|
|
3535
3533
|
|
|
3536
3534
|
CONTINUOUS = "CONTINUOUS"
|
|
3535
|
+
SNAPSHOT = "SNAPSHOT"
|
|
3537
3536
|
TRIGGERED = "TRIGGERED"
|
|
3538
3537
|
|
|
3539
3538
|
|
|
@@ -990,10 +990,13 @@ class DatabricksModelServingConfig:
|
|
|
990
990
|
@dataclass
|
|
991
991
|
class DataframeSplitInput:
|
|
992
992
|
columns: Optional[List[Any]] = None
|
|
993
|
+
"""Columns array for the dataframe"""
|
|
993
994
|
|
|
994
995
|
data: Optional[List[Any]] = None
|
|
996
|
+
"""Data array for the dataframe"""
|
|
995
997
|
|
|
996
998
|
index: Optional[List[int]] = None
|
|
999
|
+
"""Index array for the dataframe"""
|
|
997
1000
|
|
|
998
1001
|
def as_dict(self) -> dict:
|
|
999
1002
|
"""Serializes the DataframeSplitInput into a dictionary suitable for use as a JSON request body."""
|
|
@@ -1041,9 +1044,46 @@ class DeleteResponse:
|
|
|
1041
1044
|
return cls()
|
|
1042
1045
|
|
|
1043
1046
|
|
|
1047
|
+
@dataclass
|
|
1048
|
+
class EmailNotifications:
|
|
1049
|
+
on_update_failure: Optional[List[str]] = None
|
|
1050
|
+
"""A list of email addresses to be notified when an endpoint fails to update its configuration or
|
|
1051
|
+
state."""
|
|
1052
|
+
|
|
1053
|
+
on_update_success: Optional[List[str]] = None
|
|
1054
|
+
"""A list of email addresses to be notified when an endpoint successfully updates its configuration
|
|
1055
|
+
or state."""
|
|
1056
|
+
|
|
1057
|
+
def as_dict(self) -> dict:
|
|
1058
|
+
"""Serializes the EmailNotifications into a dictionary suitable for use as a JSON request body."""
|
|
1059
|
+
body = {}
|
|
1060
|
+
if self.on_update_failure:
|
|
1061
|
+
body["on_update_failure"] = [v for v in self.on_update_failure]
|
|
1062
|
+
if self.on_update_success:
|
|
1063
|
+
body["on_update_success"] = [v for v in self.on_update_success]
|
|
1064
|
+
return body
|
|
1065
|
+
|
|
1066
|
+
def as_shallow_dict(self) -> dict:
|
|
1067
|
+
"""Serializes the EmailNotifications into a shallow dictionary of its immediate attributes."""
|
|
1068
|
+
body = {}
|
|
1069
|
+
if self.on_update_failure:
|
|
1070
|
+
body["on_update_failure"] = self.on_update_failure
|
|
1071
|
+
if self.on_update_success:
|
|
1072
|
+
body["on_update_success"] = self.on_update_success
|
|
1073
|
+
return body
|
|
1074
|
+
|
|
1075
|
+
@classmethod
|
|
1076
|
+
def from_dict(cls, d: Dict[str, Any]) -> EmailNotifications:
|
|
1077
|
+
"""Deserializes the EmailNotifications from a dictionary."""
|
|
1078
|
+
return cls(
|
|
1079
|
+
on_update_failure=d.get("on_update_failure", None), on_update_success=d.get("on_update_success", None)
|
|
1080
|
+
)
|
|
1081
|
+
|
|
1082
|
+
|
|
1044
1083
|
@dataclass
|
|
1045
1084
|
class EmbeddingsV1ResponseEmbeddingElement:
|
|
1046
1085
|
embedding: Optional[List[float]] = None
|
|
1086
|
+
"""The embedding vector"""
|
|
1047
1087
|
|
|
1048
1088
|
index: Optional[int] = None
|
|
1049
1089
|
"""The index of the embedding in the response."""
|
|
@@ -3262,11 +3302,11 @@ class ServedModelState:
|
|
|
3262
3302
|
|
|
3263
3303
|
class ServedModelStateDeployment(Enum):
|
|
3264
3304
|
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3305
|
+
DEPLOYMENT_ABORTED = "DEPLOYMENT_ABORTED"
|
|
3306
|
+
DEPLOYMENT_CREATING = "DEPLOYMENT_CREATING"
|
|
3307
|
+
DEPLOYMENT_FAILED = "DEPLOYMENT_FAILED"
|
|
3308
|
+
DEPLOYMENT_READY = "DEPLOYMENT_READY"
|
|
3309
|
+
DEPLOYMENT_RECOVERING = "DEPLOYMENT_RECOVERING"
|
|
3270
3310
|
|
|
3271
3311
|
|
|
3272
3312
|
@dataclass
|
|
@@ -3545,6 +3585,9 @@ class ServingEndpointDetailed:
|
|
|
3545
3585
|
description: Optional[str] = None
|
|
3546
3586
|
"""Description of the serving model"""
|
|
3547
3587
|
|
|
3588
|
+
email_notifications: Optional[EmailNotifications] = None
|
|
3589
|
+
"""Email notification settings."""
|
|
3590
|
+
|
|
3548
3591
|
endpoint_url: Optional[str] = None
|
|
3549
3592
|
"""Endpoint invocation url if route optimization is enabled for endpoint"""
|
|
3550
3593
|
|
|
@@ -3593,6 +3636,8 @@ class ServingEndpointDetailed:
|
|
|
3593
3636
|
body["data_plane_info"] = self.data_plane_info.as_dict()
|
|
3594
3637
|
if self.description is not None:
|
|
3595
3638
|
body["description"] = self.description
|
|
3639
|
+
if self.email_notifications:
|
|
3640
|
+
body["email_notifications"] = self.email_notifications.as_dict()
|
|
3596
3641
|
if self.endpoint_url is not None:
|
|
3597
3642
|
body["endpoint_url"] = self.endpoint_url
|
|
3598
3643
|
if self.id is not None:
|
|
@@ -3632,6 +3677,8 @@ class ServingEndpointDetailed:
|
|
|
3632
3677
|
body["data_plane_info"] = self.data_plane_info
|
|
3633
3678
|
if self.description is not None:
|
|
3634
3679
|
body["description"] = self.description
|
|
3680
|
+
if self.email_notifications:
|
|
3681
|
+
body["email_notifications"] = self.email_notifications
|
|
3635
3682
|
if self.endpoint_url is not None:
|
|
3636
3683
|
body["endpoint_url"] = self.endpoint_url
|
|
3637
3684
|
if self.id is not None:
|
|
@@ -3665,6 +3712,7 @@ class ServingEndpointDetailed:
|
|
|
3665
3712
|
creator=d.get("creator", None),
|
|
3666
3713
|
data_plane_info=_from_dict(d, "data_plane_info", ModelDataPlaneInfo),
|
|
3667
3714
|
description=d.get("description", None),
|
|
3715
|
+
email_notifications=_from_dict(d, "email_notifications", EmailNotifications),
|
|
3668
3716
|
endpoint_url=d.get("endpoint_url", None),
|
|
3669
3717
|
id=d.get("id", None),
|
|
3670
3718
|
last_updated_timestamp=d.get("last_updated_timestamp", None),
|
|
@@ -3978,6 +4026,7 @@ class ServingEndpointsAPI:
|
|
|
3978
4026
|
budget_policy_id: Optional[str] = None,
|
|
3979
4027
|
config: Optional[EndpointCoreConfigInput] = None,
|
|
3980
4028
|
description: Optional[str] = None,
|
|
4029
|
+
email_notifications: Optional[EmailNotifications] = None,
|
|
3981
4030
|
rate_limits: Optional[List[RateLimit]] = None,
|
|
3982
4031
|
route_optimized: Optional[bool] = None,
|
|
3983
4032
|
tags: Optional[List[EndpointTag]] = None,
|
|
@@ -3996,6 +4045,8 @@ class ServingEndpointsAPI:
|
|
|
3996
4045
|
:param config: :class:`EndpointCoreConfigInput` (optional)
|
|
3997
4046
|
The core config of the serving endpoint.
|
|
3998
4047
|
:param description: str (optional)
|
|
4048
|
+
:param email_notifications: :class:`EmailNotifications` (optional)
|
|
4049
|
+
Email notification settings.
|
|
3999
4050
|
:param rate_limits: List[:class:`RateLimit`] (optional)
|
|
4000
4051
|
Rate limits to be applied to the serving endpoint. NOTE: this field is deprecated, please use AI
|
|
4001
4052
|
Gateway to manage rate limits.
|
|
@@ -4017,6 +4068,8 @@ class ServingEndpointsAPI:
|
|
|
4017
4068
|
body["config"] = config.as_dict()
|
|
4018
4069
|
if description is not None:
|
|
4019
4070
|
body["description"] = description
|
|
4071
|
+
if email_notifications is not None:
|
|
4072
|
+
body["email_notifications"] = email_notifications.as_dict()
|
|
4020
4073
|
if name is not None:
|
|
4021
4074
|
body["name"] = name
|
|
4022
4075
|
if rate_limits is not None:
|
|
@@ -4045,6 +4098,7 @@ class ServingEndpointsAPI:
|
|
|
4045
4098
|
budget_policy_id: Optional[str] = None,
|
|
4046
4099
|
config: Optional[EndpointCoreConfigInput] = None,
|
|
4047
4100
|
description: Optional[str] = None,
|
|
4101
|
+
email_notifications: Optional[EmailNotifications] = None,
|
|
4048
4102
|
rate_limits: Optional[List[RateLimit]] = None,
|
|
4049
4103
|
route_optimized: Optional[bool] = None,
|
|
4050
4104
|
tags: Optional[List[EndpointTag]] = None,
|
|
@@ -4055,6 +4109,7 @@ class ServingEndpointsAPI:
|
|
|
4055
4109
|
budget_policy_id=budget_policy_id,
|
|
4056
4110
|
config=config,
|
|
4057
4111
|
description=description,
|
|
4112
|
+
email_notifications=email_notifications,
|
|
4058
4113
|
name=name,
|
|
4059
4114
|
rate_limits=rate_limits,
|
|
4060
4115
|
route_optimized=route_optimized,
|
|
@@ -4068,6 +4123,7 @@ class ServingEndpointsAPI:
|
|
|
4068
4123
|
*,
|
|
4069
4124
|
ai_gateway: Optional[AiGatewayConfig] = None,
|
|
4070
4125
|
budget_policy_id: Optional[str] = None,
|
|
4126
|
+
email_notifications: Optional[EmailNotifications] = None,
|
|
4071
4127
|
tags: Optional[List[EndpointTag]] = None,
|
|
4072
4128
|
) -> Wait[ServingEndpointDetailed]:
|
|
4073
4129
|
"""Create a new PT serving endpoint.
|
|
@@ -4081,6 +4137,8 @@ class ServingEndpointsAPI:
|
|
|
4081
4137
|
The AI Gateway configuration for the serving endpoint.
|
|
4082
4138
|
:param budget_policy_id: str (optional)
|
|
4083
4139
|
The budget policy associated with the endpoint.
|
|
4140
|
+
:param email_notifications: :class:`EmailNotifications` (optional)
|
|
4141
|
+
Email notification settings.
|
|
4084
4142
|
:param tags: List[:class:`EndpointTag`] (optional)
|
|
4085
4143
|
Tags to be attached to the serving endpoint and automatically propagated to billing logs.
|
|
4086
4144
|
|
|
@@ -4095,6 +4153,8 @@ class ServingEndpointsAPI:
|
|
|
4095
4153
|
body["budget_policy_id"] = budget_policy_id
|
|
4096
4154
|
if config is not None:
|
|
4097
4155
|
body["config"] = config.as_dict()
|
|
4156
|
+
if email_notifications is not None:
|
|
4157
|
+
body["email_notifications"] = email_notifications.as_dict()
|
|
4098
4158
|
if name is not None:
|
|
4099
4159
|
body["name"] = name
|
|
4100
4160
|
if tags is not None:
|
|
@@ -4118,11 +4178,17 @@ class ServingEndpointsAPI:
|
|
|
4118
4178
|
*,
|
|
4119
4179
|
ai_gateway: Optional[AiGatewayConfig] = None,
|
|
4120
4180
|
budget_policy_id: Optional[str] = None,
|
|
4181
|
+
email_notifications: Optional[EmailNotifications] = None,
|
|
4121
4182
|
tags: Optional[List[EndpointTag]] = None,
|
|
4122
4183
|
timeout=timedelta(minutes=20),
|
|
4123
4184
|
) -> ServingEndpointDetailed:
|
|
4124
4185
|
return self.create_provisioned_throughput_endpoint(
|
|
4125
|
-
ai_gateway=ai_gateway,
|
|
4186
|
+
ai_gateway=ai_gateway,
|
|
4187
|
+
budget_policy_id=budget_policy_id,
|
|
4188
|
+
config=config,
|
|
4189
|
+
email_notifications=email_notifications,
|
|
4190
|
+
name=name,
|
|
4191
|
+
tags=tags,
|
|
4126
4192
|
).result(timeout=timeout)
|
|
4127
4193
|
|
|
4128
4194
|
def delete(self, name: str):
|
|
@@ -4408,6 +4474,7 @@ class ServingEndpointsAPI:
|
|
|
4408
4474
|
self,
|
|
4409
4475
|
name: str,
|
|
4410
4476
|
*,
|
|
4477
|
+
client_request_id: Optional[str] = None,
|
|
4411
4478
|
dataframe_records: Optional[List[Any]] = None,
|
|
4412
4479
|
dataframe_split: Optional[DataframeSplitInput] = None,
|
|
4413
4480
|
extra_params: Optional[Dict[str, str]] = None,
|
|
@@ -4421,11 +4488,15 @@ class ServingEndpointsAPI:
|
|
|
4421
4488
|
stop: Optional[List[str]] = None,
|
|
4422
4489
|
stream: Optional[bool] = None,
|
|
4423
4490
|
temperature: Optional[float] = None,
|
|
4491
|
+
usage_context: Optional[Dict[str, str]] = None,
|
|
4424
4492
|
) -> QueryEndpointResponse:
|
|
4425
|
-
"""Query a serving endpoint
|
|
4493
|
+
"""Query a serving endpoint
|
|
4426
4494
|
|
|
4427
4495
|
:param name: str
|
|
4428
|
-
The name of the serving endpoint. This field is required.
|
|
4496
|
+
The name of the serving endpoint. This field is required and is provided via the path parameter.
|
|
4497
|
+
:param client_request_id: str (optional)
|
|
4498
|
+
Optional user-provided request identifier that will be recorded in the inference table and the usage
|
|
4499
|
+
tracking table.
|
|
4429
4500
|
:param dataframe_records: List[Any] (optional)
|
|
4430
4501
|
Pandas Dataframe input in the records orientation.
|
|
4431
4502
|
:param dataframe_split: :class:`DataframeSplitInput` (optional)
|
|
@@ -4446,8 +4517,8 @@ class ServingEndpointsAPI:
|
|
|
4446
4517
|
The max tokens field used ONLY for __completions__ and __chat external & foundation model__ serving
|
|
4447
4518
|
endpoints. This is an integer and should only be used with other chat/completions query fields.
|
|
4448
4519
|
:param messages: List[:class:`ChatMessage`] (optional)
|
|
4449
|
-
The messages field used ONLY for __chat external & foundation model__ serving endpoints. This is
|
|
4450
|
-
|
|
4520
|
+
The messages field used ONLY for __chat external & foundation model__ serving endpoints. This is an
|
|
4521
|
+
array of ChatMessage objects and should only be used with other chat query fields.
|
|
4451
4522
|
:param n: int (optional)
|
|
4452
4523
|
The n (number of candidates) field used ONLY for __completions__ and __chat external & foundation
|
|
4453
4524
|
model__ serving endpoints. This is an integer between 1 and 5 with a default of 1 and should only be
|
|
@@ -4467,10 +4538,14 @@ class ServingEndpointsAPI:
|
|
|
4467
4538
|
The temperature field used ONLY for __completions__ and __chat external & foundation model__ serving
|
|
4468
4539
|
endpoints. This is a float between 0.0 and 2.0 with a default of 1.0 and should only be used with
|
|
4469
4540
|
other chat/completions query fields.
|
|
4541
|
+
:param usage_context: Dict[str,str] (optional)
|
|
4542
|
+
Optional user-provided context that will be recorded in the usage tracking table.
|
|
4470
4543
|
|
|
4471
4544
|
:returns: :class:`QueryEndpointResponse`
|
|
4472
4545
|
"""
|
|
4473
4546
|
body = {}
|
|
4547
|
+
if client_request_id is not None:
|
|
4548
|
+
body["client_request_id"] = client_request_id
|
|
4474
4549
|
if dataframe_records is not None:
|
|
4475
4550
|
body["dataframe_records"] = [v for v in dataframe_records]
|
|
4476
4551
|
if dataframe_split is not None:
|
|
@@ -4497,6 +4572,8 @@ class ServingEndpointsAPI:
|
|
|
4497
4572
|
body["stream"] = stream
|
|
4498
4573
|
if temperature is not None:
|
|
4499
4574
|
body["temperature"] = temperature
|
|
4575
|
+
if usage_context is not None:
|
|
4576
|
+
body["usage_context"] = usage_context
|
|
4500
4577
|
headers = {
|
|
4501
4578
|
"Accept": "application/json",
|
|
4502
4579
|
"Content-Type": "application/json",
|
|
@@ -4711,6 +4788,7 @@ class ServingEndpointsDataPlaneAPI:
|
|
|
4711
4788
|
self,
|
|
4712
4789
|
name: str,
|
|
4713
4790
|
*,
|
|
4791
|
+
client_request_id: Optional[str] = None,
|
|
4714
4792
|
dataframe_records: Optional[List[Any]] = None,
|
|
4715
4793
|
dataframe_split: Optional[DataframeSplitInput] = None,
|
|
4716
4794
|
extra_params: Optional[Dict[str, str]] = None,
|
|
@@ -4724,11 +4802,15 @@ class ServingEndpointsDataPlaneAPI:
|
|
|
4724
4802
|
stop: Optional[List[str]] = None,
|
|
4725
4803
|
stream: Optional[bool] = None,
|
|
4726
4804
|
temperature: Optional[float] = None,
|
|
4805
|
+
usage_context: Optional[Dict[str, str]] = None,
|
|
4727
4806
|
) -> QueryEndpointResponse:
|
|
4728
|
-
"""Query a serving endpoint
|
|
4807
|
+
"""Query a serving endpoint
|
|
4729
4808
|
|
|
4730
4809
|
:param name: str
|
|
4731
|
-
The name of the serving endpoint. This field is required.
|
|
4810
|
+
The name of the serving endpoint. This field is required and is provided via the path parameter.
|
|
4811
|
+
:param client_request_id: str (optional)
|
|
4812
|
+
Optional user-provided request identifier that will be recorded in the inference table and the usage
|
|
4813
|
+
tracking table.
|
|
4732
4814
|
:param dataframe_records: List[Any] (optional)
|
|
4733
4815
|
Pandas Dataframe input in the records orientation.
|
|
4734
4816
|
:param dataframe_split: :class:`DataframeSplitInput` (optional)
|
|
@@ -4749,8 +4831,8 @@ class ServingEndpointsDataPlaneAPI:
|
|
|
4749
4831
|
The max tokens field used ONLY for __completions__ and __chat external & foundation model__ serving
|
|
4750
4832
|
endpoints. This is an integer and should only be used with other chat/completions query fields.
|
|
4751
4833
|
:param messages: List[:class:`ChatMessage`] (optional)
|
|
4752
|
-
The messages field used ONLY for __chat external & foundation model__ serving endpoints. This is
|
|
4753
|
-
|
|
4834
|
+
The messages field used ONLY for __chat external & foundation model__ serving endpoints. This is an
|
|
4835
|
+
array of ChatMessage objects and should only be used with other chat query fields.
|
|
4754
4836
|
:param n: int (optional)
|
|
4755
4837
|
The n (number of candidates) field used ONLY for __completions__ and __chat external & foundation
|
|
4756
4838
|
model__ serving endpoints. This is an integer between 1 and 5 with a default of 1 and should only be
|
|
@@ -4770,10 +4852,14 @@ class ServingEndpointsDataPlaneAPI:
|
|
|
4770
4852
|
The temperature field used ONLY for __completions__ and __chat external & foundation model__ serving
|
|
4771
4853
|
endpoints. This is a float between 0.0 and 2.0 with a default of 1.0 and should only be used with
|
|
4772
4854
|
other chat/completions query fields.
|
|
4855
|
+
:param usage_context: Dict[str,str] (optional)
|
|
4856
|
+
Optional user-provided context that will be recorded in the usage tracking table.
|
|
4773
4857
|
|
|
4774
4858
|
:returns: :class:`QueryEndpointResponse`
|
|
4775
4859
|
"""
|
|
4776
4860
|
body = {}
|
|
4861
|
+
if client_request_id is not None:
|
|
4862
|
+
body["client_request_id"] = client_request_id
|
|
4777
4863
|
if dataframe_records is not None:
|
|
4778
4864
|
body["dataframe_records"] = [v for v in dataframe_records]
|
|
4779
4865
|
if dataframe_split is not None:
|
|
@@ -4800,6 +4886,8 @@ class ServingEndpointsDataPlaneAPI:
|
|
|
4800
4886
|
body["stream"] = stream
|
|
4801
4887
|
if temperature is not None:
|
|
4802
4888
|
body["temperature"] = temperature
|
|
4889
|
+
if usage_context is not None:
|
|
4890
|
+
body["usage_context"] = usage_context
|
|
4803
4891
|
data_plane_info = self._data_plane_info_query(
|
|
4804
4892
|
name=name,
|
|
4805
4893
|
)
|
|
@@ -4617,6 +4617,18 @@ class SetStatusResponse:
|
|
|
4617
4617
|
|
|
4618
4618
|
@dataclass
|
|
4619
4619
|
class SlackConfig:
|
|
4620
|
+
channel_id: Optional[str] = None
|
|
4621
|
+
"""[Input-Only] Slack channel ID for notifications."""
|
|
4622
|
+
|
|
4623
|
+
channel_id_set: Optional[bool] = None
|
|
4624
|
+
"""[Output-Only] Whether channel ID is set."""
|
|
4625
|
+
|
|
4626
|
+
oauth_token: Optional[str] = None
|
|
4627
|
+
"""[Input-Only] OAuth token for Slack authentication."""
|
|
4628
|
+
|
|
4629
|
+
oauth_token_set: Optional[bool] = None
|
|
4630
|
+
"""[Output-Only] Whether OAuth token is set."""
|
|
4631
|
+
|
|
4620
4632
|
url: Optional[str] = None
|
|
4621
4633
|
"""[Input-Only] URL for Slack destination."""
|
|
4622
4634
|
|
|
@@ -4626,6 +4638,14 @@ class SlackConfig:
|
|
|
4626
4638
|
def as_dict(self) -> dict:
|
|
4627
4639
|
"""Serializes the SlackConfig into a dictionary suitable for use as a JSON request body."""
|
|
4628
4640
|
body = {}
|
|
4641
|
+
if self.channel_id is not None:
|
|
4642
|
+
body["channel_id"] = self.channel_id
|
|
4643
|
+
if self.channel_id_set is not None:
|
|
4644
|
+
body["channel_id_set"] = self.channel_id_set
|
|
4645
|
+
if self.oauth_token is not None:
|
|
4646
|
+
body["oauth_token"] = self.oauth_token
|
|
4647
|
+
if self.oauth_token_set is not None:
|
|
4648
|
+
body["oauth_token_set"] = self.oauth_token_set
|
|
4629
4649
|
if self.url is not None:
|
|
4630
4650
|
body["url"] = self.url
|
|
4631
4651
|
if self.url_set is not None:
|
|
@@ -4635,6 +4655,14 @@ class SlackConfig:
|
|
|
4635
4655
|
def as_shallow_dict(self) -> dict:
|
|
4636
4656
|
"""Serializes the SlackConfig into a shallow dictionary of its immediate attributes."""
|
|
4637
4657
|
body = {}
|
|
4658
|
+
if self.channel_id is not None:
|
|
4659
|
+
body["channel_id"] = self.channel_id
|
|
4660
|
+
if self.channel_id_set is not None:
|
|
4661
|
+
body["channel_id_set"] = self.channel_id_set
|
|
4662
|
+
if self.oauth_token is not None:
|
|
4663
|
+
body["oauth_token"] = self.oauth_token
|
|
4664
|
+
if self.oauth_token_set is not None:
|
|
4665
|
+
body["oauth_token_set"] = self.oauth_token_set
|
|
4638
4666
|
if self.url is not None:
|
|
4639
4667
|
body["url"] = self.url
|
|
4640
4668
|
if self.url_set is not None:
|
|
@@ -4644,7 +4672,14 @@ class SlackConfig:
|
|
|
4644
4672
|
@classmethod
|
|
4645
4673
|
def from_dict(cls, d: Dict[str, Any]) -> SlackConfig:
|
|
4646
4674
|
"""Deserializes the SlackConfig from a dictionary."""
|
|
4647
|
-
return cls(
|
|
4675
|
+
return cls(
|
|
4676
|
+
channel_id=d.get("channel_id", None),
|
|
4677
|
+
channel_id_set=d.get("channel_id_set", None),
|
|
4678
|
+
oauth_token=d.get("oauth_token", None),
|
|
4679
|
+
oauth_token_set=d.get("oauth_token_set", None),
|
|
4680
|
+
url=d.get("url", None),
|
|
4681
|
+
url_set=d.get("url_set", None),
|
|
4682
|
+
)
|
|
4648
4683
|
|
|
4649
4684
|
|
|
4650
4685
|
@dataclass
|
databricks/sdk/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.63.0"
|