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

@@ -42,6 +42,9 @@ class BaseJob:
42
42
  Jobs UI in the job details page and Jobs API using `budget_policy_id` 3. Inferred default based
43
43
  on accessible budget policies of the run_as identity on job creation or modification."""
44
44
 
45
+ effective_usage_policy_id: Optional[str] = None
46
+ """The id of the usage policy used by this job for cost attribution purposes."""
47
+
45
48
  has_more: Optional[bool] = None
46
49
  """Indicates if the job has more array properties (`tasks`, `job_clusters`) that are not shown.
47
50
  They can be accessed via :method:jobs/get endpoint. It is only relevant for API 2.2
@@ -66,6 +69,8 @@ class BaseJob:
66
69
  body["creator_user_name"] = self.creator_user_name
67
70
  if self.effective_budget_policy_id is not None:
68
71
  body["effective_budget_policy_id"] = self.effective_budget_policy_id
72
+ if self.effective_usage_policy_id is not None:
73
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
69
74
  if self.has_more is not None:
70
75
  body["has_more"] = self.has_more
71
76
  if self.job_id is not None:
@@ -85,6 +90,8 @@ class BaseJob:
85
90
  body["creator_user_name"] = self.creator_user_name
86
91
  if self.effective_budget_policy_id is not None:
87
92
  body["effective_budget_policy_id"] = self.effective_budget_policy_id
93
+ if self.effective_usage_policy_id is not None:
94
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
88
95
  if self.has_more is not None:
89
96
  body["has_more"] = self.has_more
90
97
  if self.job_id is not None:
@@ -102,6 +109,7 @@ class BaseJob:
102
109
  created_time=d.get("created_time", None),
103
110
  creator_user_name=d.get("creator_user_name", None),
104
111
  effective_budget_policy_id=d.get("effective_budget_policy_id", None),
112
+ effective_usage_policy_id=d.get("effective_usage_policy_id", None),
105
113
  has_more=d.get("has_more", None),
106
114
  job_id=d.get("job_id", None),
107
115
  settings=_from_dict(d, "settings", JobSettings),
@@ -147,6 +155,9 @@ class BaseRun:
147
155
  `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times through rapid scaling and
148
156
  optimized cluster performance."""
149
157
 
158
+ effective_usage_policy_id: Optional[str] = None
159
+ """The id of the usage policy used by this run for cost attribution purposes."""
160
+
150
161
  end_time: Optional[int] = None
151
162
  """The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
152
163
  field is set to 0 if the job is still running."""
@@ -267,6 +278,8 @@ class BaseRun:
267
278
  body["description"] = self.description
268
279
  if self.effective_performance_target is not None:
269
280
  body["effective_performance_target"] = self.effective_performance_target.value
281
+ if self.effective_usage_policy_id is not None:
282
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
270
283
  if self.end_time is not None:
271
284
  body["end_time"] = self.end_time
272
285
  if self.execution_duration is not None:
@@ -338,6 +351,8 @@ class BaseRun:
338
351
  body["description"] = self.description
339
352
  if self.effective_performance_target is not None:
340
353
  body["effective_performance_target"] = self.effective_performance_target
354
+ if self.effective_usage_policy_id is not None:
355
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
341
356
  if self.end_time is not None:
342
357
  body["end_time"] = self.end_time
343
358
  if self.execution_duration is not None:
@@ -403,6 +418,7 @@ class BaseRun:
403
418
  creator_user_name=d.get("creator_user_name", None),
404
419
  description=d.get("description", None),
405
420
  effective_performance_target=_enum(d, "effective_performance_target", PerformanceTarget),
421
+ effective_usage_policy_id=d.get("effective_usage_policy_id", None),
406
422
  end_time=d.get("end_time", None),
407
423
  execution_duration=d.get("execution_duration", None),
408
424
  git_source=_from_dict(d, "git_source", GitSource),
@@ -2212,6 +2228,9 @@ class Job:
2212
2228
  Jobs UI in the job details page and Jobs API using `budget_policy_id` 3. Inferred default based
2213
2229
  on accessible budget policies of the run_as identity on job creation or modification."""
2214
2230
 
2231
+ effective_usage_policy_id: Optional[str] = None
2232
+ """The id of the usage policy used by this job for cost attribution purposes."""
2233
+
2215
2234
  has_more: Optional[bool] = None
2216
2235
  """Indicates if the job has more array properties (`tasks`, `job_clusters`) that are not shown.
2217
2236
  They can be accessed via :method:jobs/get endpoint. It is only relevant for API 2.2
@@ -2248,6 +2267,8 @@ class Job:
2248
2267
  body["creator_user_name"] = self.creator_user_name
2249
2268
  if self.effective_budget_policy_id is not None:
2250
2269
  body["effective_budget_policy_id"] = self.effective_budget_policy_id
2270
+ if self.effective_usage_policy_id is not None:
2271
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
2251
2272
  if self.has_more is not None:
2252
2273
  body["has_more"] = self.has_more
2253
2274
  if self.job_id is not None:
@@ -2271,6 +2292,8 @@ class Job:
2271
2292
  body["creator_user_name"] = self.creator_user_name
2272
2293
  if self.effective_budget_policy_id is not None:
2273
2294
  body["effective_budget_policy_id"] = self.effective_budget_policy_id
2295
+ if self.effective_usage_policy_id is not None:
2296
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
2274
2297
  if self.has_more is not None:
2275
2298
  body["has_more"] = self.has_more
2276
2299
  if self.job_id is not None:
@@ -2292,6 +2315,7 @@ class Job:
2292
2315
  created_time=d.get("created_time", None),
2293
2316
  creator_user_name=d.get("creator_user_name", None),
2294
2317
  effective_budget_policy_id=d.get("effective_budget_policy_id", None),
2318
+ effective_usage_policy_id=d.get("effective_usage_policy_id", None),
2295
2319
  has_more=d.get("has_more", None),
2296
2320
  job_id=d.get("job_id", None),
2297
2321
  next_page_token=d.get("next_page_token", None),
@@ -3037,6 +3061,11 @@ class JobSettings:
3037
3061
  the job runs only when triggered by clicking “Run Now” in the Jobs UI or sending an API
3038
3062
  request to `runNow`."""
3039
3063
 
3064
+ usage_policy_id: Optional[str] = None
3065
+ """The id of the user specified usage policy to use for this job. If not specified, a default usage
3066
+ policy may be applied when creating or modifying the job. See `effective_usage_policy_id` for
3067
+ the usage policy used by this workload."""
3068
+
3040
3069
  webhook_notifications: Optional[WebhookNotifications] = None
3041
3070
  """A collection of system notification IDs to notify when runs of this job begin or complete."""
3042
3071
 
@@ -3089,6 +3118,8 @@ class JobSettings:
3089
3118
  body["timeout_seconds"] = self.timeout_seconds
3090
3119
  if self.trigger:
3091
3120
  body["trigger"] = self.trigger.as_dict()
3121
+ if self.usage_policy_id is not None:
3122
+ body["usage_policy_id"] = self.usage_policy_id
3092
3123
  if self.webhook_notifications:
3093
3124
  body["webhook_notifications"] = self.webhook_notifications.as_dict()
3094
3125
  return body
@@ -3142,6 +3173,8 @@ class JobSettings:
3142
3173
  body["timeout_seconds"] = self.timeout_seconds
3143
3174
  if self.trigger:
3144
3175
  body["trigger"] = self.trigger
3176
+ if self.usage_policy_id is not None:
3177
+ body["usage_policy_id"] = self.usage_policy_id
3145
3178
  if self.webhook_notifications:
3146
3179
  body["webhook_notifications"] = self.webhook_notifications
3147
3180
  return body
@@ -3173,6 +3206,7 @@ class JobSettings:
3173
3206
  tasks=_repeated_dict(d, "tasks", Task),
3174
3207
  timeout_seconds=d.get("timeout_seconds", None),
3175
3208
  trigger=_from_dict(d, "trigger", TriggerSettings),
3209
+ usage_policy_id=d.get("usage_policy_id", None),
3176
3210
  webhook_notifications=_from_dict(d, "webhook_notifications", WebhookNotifications),
3177
3211
  )
3178
3212
 
@@ -4499,6 +4533,9 @@ class Run:
4499
4533
  `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times through rapid scaling and
4500
4534
  optimized cluster performance."""
4501
4535
 
4536
+ effective_usage_policy_id: Optional[str] = None
4537
+ """The id of the usage policy used by this run for cost attribution purposes."""
4538
+
4502
4539
  end_time: Optional[int] = None
4503
4540
  """The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
4504
4541
  field is set to 0 if the job is still running."""
@@ -4625,6 +4662,8 @@ class Run:
4625
4662
  body["description"] = self.description
4626
4663
  if self.effective_performance_target is not None:
4627
4664
  body["effective_performance_target"] = self.effective_performance_target.value
4665
+ if self.effective_usage_policy_id is not None:
4666
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
4628
4667
  if self.end_time is not None:
4629
4668
  body["end_time"] = self.end_time
4630
4669
  if self.execution_duration is not None:
@@ -4700,6 +4739,8 @@ class Run:
4700
4739
  body["description"] = self.description
4701
4740
  if self.effective_performance_target is not None:
4702
4741
  body["effective_performance_target"] = self.effective_performance_target
4742
+ if self.effective_usage_policy_id is not None:
4743
+ body["effective_usage_policy_id"] = self.effective_usage_policy_id
4703
4744
  if self.end_time is not None:
4704
4745
  body["end_time"] = self.end_time
4705
4746
  if self.execution_duration is not None:
@@ -4769,6 +4810,7 @@ class Run:
4769
4810
  creator_user_name=d.get("creator_user_name", None),
4770
4811
  description=d.get("description", None),
4771
4812
  effective_performance_target=_enum(d, "effective_performance_target", PerformanceTarget),
4813
+ effective_usage_policy_id=d.get("effective_usage_policy_id", None),
4772
4814
  end_time=d.get("end_time", None),
4773
4815
  execution_duration=d.get("execution_duration", None),
4774
4816
  git_source=_from_dict(d, "git_source", GitSource),
@@ -7884,6 +7926,8 @@ class TerminationCodeCode(Enum):
7884
7926
  run failed due to a cloud provider issue. Refer to the state message for further details. *
7885
7927
  `MAX_JOB_QUEUE_SIZE_EXCEEDED`: The run was skipped due to reaching the job level queue size
7886
7928
  limit. * `DISABLED`: The run was never executed because it was disabled explicitly by the user.
7929
+ * `BREAKING_CHANGE`: Run failed because of an intentional breaking change in Spark, but it will
7930
+ be retried with a mitigation config.
7887
7931
 
7888
7932
  [Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now"""
7889
7933
 
@@ -8437,6 +8481,7 @@ class JobsAPI:
8437
8481
  tasks: Optional[List[Task]] = None,
8438
8482
  timeout_seconds: Optional[int] = None,
8439
8483
  trigger: Optional[TriggerSettings] = None,
8484
+ usage_policy_id: Optional[str] = None,
8440
8485
  webhook_notifications: Optional[WebhookNotifications] = None,
8441
8486
  ) -> CreateResponse:
8442
8487
  """Create a new job.
@@ -8531,6 +8576,10 @@ class JobsAPI:
8531
8576
  A configuration to trigger a run when certain conditions are met. The default behavior is that the
8532
8577
  job runs only when triggered by clicking “Run Now” in the Jobs UI or sending an API request to
8533
8578
  `runNow`.
8579
+ :param usage_policy_id: str (optional)
8580
+ The id of the user specified usage policy to use for this job. If not specified, a default usage
8581
+ policy may be applied when creating or modifying the job. See `effective_usage_policy_id` for the
8582
+ usage policy used by this workload.
8534
8583
  :param webhook_notifications: :class:`WebhookNotifications` (optional)
8535
8584
  A collection of system notification IDs to notify when runs of this job begin or complete.
8536
8585
 
@@ -8585,6 +8634,8 @@ class JobsAPI:
8585
8634
  body["timeout_seconds"] = timeout_seconds
8586
8635
  if trigger is not None:
8587
8636
  body["trigger"] = trigger.as_dict()
8637
+ if usage_policy_id is not None:
8638
+ body["usage_policy_id"] = usage_policy_id
8588
8639
  if webhook_notifications is not None:
8589
8640
  body["webhook_notifications"] = webhook_notifications.as_dict()
8590
8641
  headers = {
@@ -9381,6 +9432,7 @@ class JobsAPI:
9381
9432
  run_name: Optional[str] = None,
9382
9433
  tasks: Optional[List[SubmitTask]] = None,
9383
9434
  timeout_seconds: Optional[int] = None,
9435
+ usage_policy_id: Optional[str] = None,
9384
9436
  webhook_notifications: Optional[WebhookNotifications] = None,
9385
9437
  ) -> Wait[Run]:
9386
9438
  """Submit a one-time run. This endpoint allows you to submit a workload directly without creating a job.
@@ -9432,6 +9484,9 @@ class JobsAPI:
9432
9484
  :param tasks: List[:class:`SubmitTask`] (optional)
9433
9485
  :param timeout_seconds: int (optional)
9434
9486
  An optional timeout applied to each run of this job. A value of `0` means no timeout.
9487
+ :param usage_policy_id: str (optional)
9488
+ The user specified id of the usage policy to use for this one-time run. If not specified, a default
9489
+ usage policy may be applied when creating or modifying the job.
9435
9490
  :param webhook_notifications: :class:`WebhookNotifications` (optional)
9436
9491
  A collection of system notification IDs to notify when the run begins or completes.
9437
9492
 
@@ -9466,6 +9521,8 @@ class JobsAPI:
9466
9521
  body["tasks"] = [v.as_dict() for v in tasks]
9467
9522
  if timeout_seconds is not None:
9468
9523
  body["timeout_seconds"] = timeout_seconds
9524
+ if usage_policy_id is not None:
9525
+ body["usage_policy_id"] = usage_policy_id
9469
9526
  if webhook_notifications is not None:
9470
9527
  body["webhook_notifications"] = webhook_notifications.as_dict()
9471
9528
  headers = {
@@ -9496,6 +9553,7 @@ class JobsAPI:
9496
9553
  run_name: Optional[str] = None,
9497
9554
  tasks: Optional[List[SubmitTask]] = None,
9498
9555
  timeout_seconds: Optional[int] = None,
9556
+ usage_policy_id: Optional[str] = None,
9499
9557
  webhook_notifications: Optional[WebhookNotifications] = None,
9500
9558
  timeout=timedelta(minutes=20),
9501
9559
  ) -> Run:
@@ -9513,6 +9571,7 @@ class JobsAPI:
9513
9571
  run_name=run_name,
9514
9572
  tasks=tasks,
9515
9573
  timeout_seconds=timeout_seconds,
9574
+ usage_policy_id=usage_policy_id,
9516
9575
  webhook_notifications=webhook_notifications,
9517
9576
  ).result(timeout=timeout)
9518
9577
 
@@ -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: Optional[PublishSpecPublishMode] = None
3498
- """The publish mode of the pipeline that syncs the online table with the source table. Defaults to
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
 
@@ -314,6 +314,9 @@ class AiGatewayRateLimit:
314
314
  """Principal field for a user, user group, or service principal to apply rate limiting to. Accepts
315
315
  a user email, group name, or service principal application ID."""
316
316
 
317
+ tokens: Optional[int] = None
318
+ """Used to specify how many tokens are allowed for a key within the renewal_period."""
319
+
317
320
  def as_dict(self) -> dict:
318
321
  """Serializes the AiGatewayRateLimit into a dictionary suitable for use as a JSON request body."""
319
322
  body = {}
@@ -325,6 +328,8 @@ class AiGatewayRateLimit:
325
328
  body["principal"] = self.principal
326
329
  if self.renewal_period is not None:
327
330
  body["renewal_period"] = self.renewal_period.value
331
+ if self.tokens is not None:
332
+ body["tokens"] = self.tokens
328
333
  return body
329
334
 
330
335
  def as_shallow_dict(self) -> dict:
@@ -338,6 +343,8 @@ class AiGatewayRateLimit:
338
343
  body["principal"] = self.principal
339
344
  if self.renewal_period is not None:
340
345
  body["renewal_period"] = self.renewal_period
346
+ if self.tokens is not None:
347
+ body["tokens"] = self.tokens
341
348
  return body
342
349
 
343
350
  @classmethod
@@ -348,6 +355,7 @@ class AiGatewayRateLimit:
348
355
  key=_enum(d, "key", AiGatewayRateLimitKey),
349
356
  principal=d.get("principal", None),
350
357
  renewal_period=_enum(d, "renewal_period", AiGatewayRateLimitRenewalPeriod),
358
+ tokens=d.get("tokens", None),
351
359
  )
352
360
 
353
361
 
@@ -3374,6 +3382,9 @@ class ServingEndpoint:
3374
3382
  task: Optional[str] = None
3375
3383
  """The task type of the serving endpoint."""
3376
3384
 
3385
+ usage_policy_id: Optional[str] = None
3386
+ """The usage policy associated with serving endpoint."""
3387
+
3377
3388
  def as_dict(self) -> dict:
3378
3389
  """Serializes the ServingEndpoint into a dictionary suitable for use as a JSON request body."""
3379
3390
  body = {}
@@ -3401,6 +3412,8 @@ class ServingEndpoint:
3401
3412
  body["tags"] = [v.as_dict() for v in self.tags]
3402
3413
  if self.task is not None:
3403
3414
  body["task"] = self.task
3415
+ if self.usage_policy_id is not None:
3416
+ body["usage_policy_id"] = self.usage_policy_id
3404
3417
  return body
3405
3418
 
3406
3419
  def as_shallow_dict(self) -> dict:
@@ -3430,6 +3443,8 @@ class ServingEndpoint:
3430
3443
  body["tags"] = self.tags
3431
3444
  if self.task is not None:
3432
3445
  body["task"] = self.task
3446
+ if self.usage_policy_id is not None:
3447
+ body["usage_policy_id"] = self.usage_policy_id
3433
3448
  return body
3434
3449
 
3435
3450
  @classmethod
@@ -3448,6 +3463,7 @@ class ServingEndpoint:
3448
3463
  state=_from_dict(d, "state", EndpointState),
3449
3464
  tags=_repeated_dict(d, "tags", EndpointTag),
3450
3465
  task=d.get("task", None),
3466
+ usage_policy_id=d.get("usage_policy_id", None),
3451
3467
  )
3452
3468
 
3453
3469
 
@@ -4474,6 +4490,7 @@ class ServingEndpointsAPI:
4474
4490
  self,
4475
4491
  name: str,
4476
4492
  *,
4493
+ client_request_id: Optional[str] = None,
4477
4494
  dataframe_records: Optional[List[Any]] = None,
4478
4495
  dataframe_split: Optional[DataframeSplitInput] = None,
4479
4496
  extra_params: Optional[Dict[str, str]] = None,
@@ -4487,11 +4504,15 @@ class ServingEndpointsAPI:
4487
4504
  stop: Optional[List[str]] = None,
4488
4505
  stream: Optional[bool] = None,
4489
4506
  temperature: Optional[float] = None,
4507
+ usage_context: Optional[Dict[str, str]] = None,
4490
4508
  ) -> QueryEndpointResponse:
4491
4509
  """Query a serving endpoint
4492
4510
 
4493
4511
  :param name: str
4494
4512
  The name of the serving endpoint. This field is required and is provided via the path parameter.
4513
+ :param client_request_id: str (optional)
4514
+ Optional user-provided request identifier that will be recorded in the inference table and the usage
4515
+ tracking table.
4495
4516
  :param dataframe_records: List[Any] (optional)
4496
4517
  Pandas Dataframe input in the records orientation.
4497
4518
  :param dataframe_split: :class:`DataframeSplitInput` (optional)
@@ -4533,10 +4554,14 @@ class ServingEndpointsAPI:
4533
4554
  The temperature field used ONLY for __completions__ and __chat external & foundation model__ serving
4534
4555
  endpoints. This is a float between 0.0 and 2.0 with a default of 1.0 and should only be used with
4535
4556
  other chat/completions query fields.
4557
+ :param usage_context: Dict[str,str] (optional)
4558
+ Optional user-provided context that will be recorded in the usage tracking table.
4536
4559
 
4537
4560
  :returns: :class:`QueryEndpointResponse`
4538
4561
  """
4539
4562
  body = {}
4563
+ if client_request_id is not None:
4564
+ body["client_request_id"] = client_request_id
4540
4565
  if dataframe_records is not None:
4541
4566
  body["dataframe_records"] = [v for v in dataframe_records]
4542
4567
  if dataframe_split is not None:
@@ -4563,6 +4588,8 @@ class ServingEndpointsAPI:
4563
4588
  body["stream"] = stream
4564
4589
  if temperature is not None:
4565
4590
  body["temperature"] = temperature
4591
+ if usage_context is not None:
4592
+ body["usage_context"] = usage_context
4566
4593
  headers = {
4567
4594
  "Accept": "application/json",
4568
4595
  "Content-Type": "application/json",
@@ -4777,6 +4804,7 @@ class ServingEndpointsDataPlaneAPI:
4777
4804
  self,
4778
4805
  name: str,
4779
4806
  *,
4807
+ client_request_id: Optional[str] = None,
4780
4808
  dataframe_records: Optional[List[Any]] = None,
4781
4809
  dataframe_split: Optional[DataframeSplitInput] = None,
4782
4810
  extra_params: Optional[Dict[str, str]] = None,
@@ -4790,11 +4818,15 @@ class ServingEndpointsDataPlaneAPI:
4790
4818
  stop: Optional[List[str]] = None,
4791
4819
  stream: Optional[bool] = None,
4792
4820
  temperature: Optional[float] = None,
4821
+ usage_context: Optional[Dict[str, str]] = None,
4793
4822
  ) -> QueryEndpointResponse:
4794
4823
  """Query a serving endpoint
4795
4824
 
4796
4825
  :param name: str
4797
4826
  The name of the serving endpoint. This field is required and is provided via the path parameter.
4827
+ :param client_request_id: str (optional)
4828
+ Optional user-provided request identifier that will be recorded in the inference table and the usage
4829
+ tracking table.
4798
4830
  :param dataframe_records: List[Any] (optional)
4799
4831
  Pandas Dataframe input in the records orientation.
4800
4832
  :param dataframe_split: :class:`DataframeSplitInput` (optional)
@@ -4836,10 +4868,14 @@ class ServingEndpointsDataPlaneAPI:
4836
4868
  The temperature field used ONLY for __completions__ and __chat external & foundation model__ serving
4837
4869
  endpoints. This is a float between 0.0 and 2.0 with a default of 1.0 and should only be used with
4838
4870
  other chat/completions query fields.
4871
+ :param usage_context: Dict[str,str] (optional)
4872
+ Optional user-provided context that will be recorded in the usage tracking table.
4839
4873
 
4840
4874
  :returns: :class:`QueryEndpointResponse`
4841
4875
  """
4842
4876
  body = {}
4877
+ if client_request_id is not None:
4878
+ body["client_request_id"] = client_request_id
4843
4879
  if dataframe_records is not None:
4844
4880
  body["dataframe_records"] = [v for v in dataframe_records]
4845
4881
  if dataframe_split is not None:
@@ -4866,6 +4902,8 @@ class ServingEndpointsDataPlaneAPI:
4866
4902
  body["stream"] = stream
4867
4903
  if temperature is not None:
4868
4904
  body["temperature"] = temperature
4905
+ if usage_context is not None:
4906
+ body["usage_context"] = usage_context
4869
4907
  data_plane_info = self._data_plane_info_query(
4870
4908
  name=name,
4871
4909
  )
@@ -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(url=d.get("url", None), url_set=d.get("url_set", None))
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