databricks-sdk 0.41.0__py3-none-any.whl → 0.42.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 +252 -238
- databricks/sdk/_base_client.py +20 -21
- databricks/sdk/credentials_provider.py +12 -6
- databricks/sdk/mixins/open_ai_client.py +25 -10
- databricks/sdk/retries.py +5 -1
- databricks/sdk/service/billing.py +348 -0
- databricks/sdk/service/catalog.py +15 -62
- databricks/sdk/service/cleanrooms.py +71 -1
- databricks/sdk/service/compute.py +36 -0
- databricks/sdk/service/dashboards.py +5 -0
- databricks/sdk/service/jobs.py +85 -1
- databricks/sdk/service/oauth2.py +41 -5
- databricks/sdk/service/serving.py +34 -40
- databricks/sdk/service/settings.py +206 -0
- databricks/sdk/useragent.py +54 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.41.0.dist-info → databricks_sdk-0.42.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.41.0.dist-info → databricks_sdk-0.42.0.dist-info}/RECORD +22 -22
- {databricks_sdk-0.41.0.dist-info → databricks_sdk-0.42.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.41.0.dist-info → databricks_sdk-0.42.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.41.0.dist-info → databricks_sdk-0.42.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.41.0.dist-info → databricks_sdk-0.42.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/jobs.py
CHANGED
|
@@ -111,6 +111,12 @@ class BaseRun:
|
|
|
111
111
|
description: Optional[str] = None
|
|
112
112
|
"""Description of the run"""
|
|
113
113
|
|
|
114
|
+
effective_performance_target: Optional[PerformanceTarget] = None
|
|
115
|
+
"""effective_performance_target is the actual performance target used by the run during execution.
|
|
116
|
+
effective_performance_target can differ from performance_target depending on if the job was
|
|
117
|
+
eligible to be cost-optimized (e.g. contains at least 1 serverless task) or if we specifically
|
|
118
|
+
override the value for the run (ex. RunNow)."""
|
|
119
|
+
|
|
114
120
|
end_time: Optional[int] = None
|
|
115
121
|
"""The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
|
|
116
122
|
field is set to 0 if the job is still running."""
|
|
@@ -240,6 +246,8 @@ class BaseRun:
|
|
|
240
246
|
if self.cluster_spec: body['cluster_spec'] = self.cluster_spec.as_dict()
|
|
241
247
|
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
242
248
|
if self.description is not None: body['description'] = self.description
|
|
249
|
+
if self.effective_performance_target is not None:
|
|
250
|
+
body['effective_performance_target'] = self.effective_performance_target.value
|
|
243
251
|
if self.end_time is not None: body['end_time'] = self.end_time
|
|
244
252
|
if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
|
|
245
253
|
if self.git_source: body['git_source'] = self.git_source.as_dict()
|
|
@@ -278,6 +286,8 @@ class BaseRun:
|
|
|
278
286
|
if self.cluster_spec: body['cluster_spec'] = self.cluster_spec
|
|
279
287
|
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
280
288
|
if self.description is not None: body['description'] = self.description
|
|
289
|
+
if self.effective_performance_target is not None:
|
|
290
|
+
body['effective_performance_target'] = self.effective_performance_target
|
|
281
291
|
if self.end_time is not None: body['end_time'] = self.end_time
|
|
282
292
|
if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
|
|
283
293
|
if self.git_source: body['git_source'] = self.git_source
|
|
@@ -316,6 +326,7 @@ class BaseRun:
|
|
|
316
326
|
cluster_spec=_from_dict(d, 'cluster_spec', ClusterSpec),
|
|
317
327
|
creator_user_name=d.get('creator_user_name', None),
|
|
318
328
|
description=d.get('description', None),
|
|
329
|
+
effective_performance_target=_enum(d, 'effective_performance_target', PerformanceTarget),
|
|
319
330
|
end_time=d.get('end_time', None),
|
|
320
331
|
execution_duration=d.get('execution_duration', None),
|
|
321
332
|
git_source=_from_dict(d, 'git_source', GitSource),
|
|
@@ -834,6 +845,10 @@ class CreateJob:
|
|
|
834
845
|
parameters: Optional[List[JobParameterDefinition]] = None
|
|
835
846
|
"""Job-level parameter definitions"""
|
|
836
847
|
|
|
848
|
+
performance_target: Optional[PerformanceTarget] = None
|
|
849
|
+
"""PerformanceTarget defines how performant or cost efficient the execution of run on serverless
|
|
850
|
+
should be."""
|
|
851
|
+
|
|
837
852
|
queue: Optional[QueueSettings] = None
|
|
838
853
|
"""The queue settings of the job."""
|
|
839
854
|
|
|
@@ -888,6 +903,7 @@ class CreateJob:
|
|
|
888
903
|
if self.name is not None: body['name'] = self.name
|
|
889
904
|
if self.notification_settings: body['notification_settings'] = self.notification_settings.as_dict()
|
|
890
905
|
if self.parameters: body['parameters'] = [v.as_dict() for v in self.parameters]
|
|
906
|
+
if self.performance_target is not None: body['performance_target'] = self.performance_target.value
|
|
891
907
|
if self.queue: body['queue'] = self.queue.as_dict()
|
|
892
908
|
if self.run_as: body['run_as'] = self.run_as.as_dict()
|
|
893
909
|
if self.schedule: body['schedule'] = self.schedule.as_dict()
|
|
@@ -917,6 +933,7 @@ class CreateJob:
|
|
|
917
933
|
if self.name is not None: body['name'] = self.name
|
|
918
934
|
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
919
935
|
if self.parameters: body['parameters'] = self.parameters
|
|
936
|
+
if self.performance_target is not None: body['performance_target'] = self.performance_target
|
|
920
937
|
if self.queue: body['queue'] = self.queue
|
|
921
938
|
if self.run_as: body['run_as'] = self.run_as
|
|
922
939
|
if self.schedule: body['schedule'] = self.schedule
|
|
@@ -946,6 +963,7 @@ class CreateJob:
|
|
|
946
963
|
name=d.get('name', None),
|
|
947
964
|
notification_settings=_from_dict(d, 'notification_settings', JobNotificationSettings),
|
|
948
965
|
parameters=_repeated_dict(d, 'parameters', JobParameterDefinition),
|
|
966
|
+
performance_target=_enum(d, 'performance_target', PerformanceTarget),
|
|
949
967
|
queue=_from_dict(d, 'queue', QueueSettings),
|
|
950
968
|
run_as=_from_dict(d, 'run_as', JobRunAs),
|
|
951
969
|
schedule=_from_dict(d, 'schedule', CronSchedule),
|
|
@@ -2463,6 +2481,10 @@ class JobSettings:
|
|
|
2463
2481
|
parameters: Optional[List[JobParameterDefinition]] = None
|
|
2464
2482
|
"""Job-level parameter definitions"""
|
|
2465
2483
|
|
|
2484
|
+
performance_target: Optional[PerformanceTarget] = None
|
|
2485
|
+
"""PerformanceTarget defines how performant or cost efficient the execution of run on serverless
|
|
2486
|
+
should be."""
|
|
2487
|
+
|
|
2466
2488
|
queue: Optional[QueueSettings] = None
|
|
2467
2489
|
"""The queue settings of the job."""
|
|
2468
2490
|
|
|
@@ -2515,6 +2537,7 @@ class JobSettings:
|
|
|
2515
2537
|
if self.name is not None: body['name'] = self.name
|
|
2516
2538
|
if self.notification_settings: body['notification_settings'] = self.notification_settings.as_dict()
|
|
2517
2539
|
if self.parameters: body['parameters'] = [v.as_dict() for v in self.parameters]
|
|
2540
|
+
if self.performance_target is not None: body['performance_target'] = self.performance_target.value
|
|
2518
2541
|
if self.queue: body['queue'] = self.queue.as_dict()
|
|
2519
2542
|
if self.run_as: body['run_as'] = self.run_as.as_dict()
|
|
2520
2543
|
if self.schedule: body['schedule'] = self.schedule.as_dict()
|
|
@@ -2543,6 +2566,7 @@ class JobSettings:
|
|
|
2543
2566
|
if self.name is not None: body['name'] = self.name
|
|
2544
2567
|
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
2545
2568
|
if self.parameters: body['parameters'] = self.parameters
|
|
2569
|
+
if self.performance_target is not None: body['performance_target'] = self.performance_target
|
|
2546
2570
|
if self.queue: body['queue'] = self.queue
|
|
2547
2571
|
if self.run_as: body['run_as'] = self.run_as
|
|
2548
2572
|
if self.schedule: body['schedule'] = self.schedule
|
|
@@ -2571,6 +2595,7 @@ class JobSettings:
|
|
|
2571
2595
|
name=d.get('name', None),
|
|
2572
2596
|
notification_settings=_from_dict(d, 'notification_settings', JobNotificationSettings),
|
|
2573
2597
|
parameters=_repeated_dict(d, 'parameters', JobParameterDefinition),
|
|
2598
|
+
performance_target=_enum(d, 'performance_target', PerformanceTarget),
|
|
2574
2599
|
queue=_from_dict(d, 'queue', QueueSettings),
|
|
2575
2600
|
run_as=_from_dict(d, 'run_as', JobRunAs),
|
|
2576
2601
|
schedule=_from_dict(d, 'schedule', CronSchedule),
|
|
@@ -2994,6 +3019,15 @@ class PauseStatus(Enum):
|
|
|
2994
3019
|
UNPAUSED = 'UNPAUSED'
|
|
2995
3020
|
|
|
2996
3021
|
|
|
3022
|
+
class PerformanceTarget(Enum):
|
|
3023
|
+
"""PerformanceTarget defines how performant (lower latency) or cost efficient the execution of run
|
|
3024
|
+
on serverless compute should be. The performance mode on the job or pipeline should map to a
|
|
3025
|
+
performance setting that is passed to Cluster Manager (see cluster-common PerformanceTarget)."""
|
|
3026
|
+
|
|
3027
|
+
COST_OPTIMIZED = 'COST_OPTIMIZED'
|
|
3028
|
+
PERFORMANCE_OPTIMIZED = 'PERFORMANCE_OPTIMIZED'
|
|
3029
|
+
|
|
3030
|
+
|
|
2997
3031
|
@dataclass
|
|
2998
3032
|
class PeriodicTriggerConfiguration:
|
|
2999
3033
|
interval: int
|
|
@@ -3755,6 +3789,12 @@ class Run:
|
|
|
3755
3789
|
description: Optional[str] = None
|
|
3756
3790
|
"""Description of the run"""
|
|
3757
3791
|
|
|
3792
|
+
effective_performance_target: Optional[PerformanceTarget] = None
|
|
3793
|
+
"""effective_performance_target is the actual performance target used by the run during execution.
|
|
3794
|
+
effective_performance_target can differ from performance_target depending on if the job was
|
|
3795
|
+
eligible to be cost-optimized (e.g. contains at least 1 serverless task) or if we specifically
|
|
3796
|
+
override the value for the run (ex. RunNow)."""
|
|
3797
|
+
|
|
3758
3798
|
end_time: Optional[int] = None
|
|
3759
3799
|
"""The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
|
|
3760
3800
|
field is set to 0 if the job is still running."""
|
|
@@ -3890,6 +3930,8 @@ class Run:
|
|
|
3890
3930
|
if self.cluster_spec: body['cluster_spec'] = self.cluster_spec.as_dict()
|
|
3891
3931
|
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
3892
3932
|
if self.description is not None: body['description'] = self.description
|
|
3933
|
+
if self.effective_performance_target is not None:
|
|
3934
|
+
body['effective_performance_target'] = self.effective_performance_target.value
|
|
3893
3935
|
if self.end_time is not None: body['end_time'] = self.end_time
|
|
3894
3936
|
if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
|
|
3895
3937
|
if self.git_source: body['git_source'] = self.git_source.as_dict()
|
|
@@ -3930,6 +3972,8 @@ class Run:
|
|
|
3930
3972
|
if self.cluster_spec: body['cluster_spec'] = self.cluster_spec
|
|
3931
3973
|
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
3932
3974
|
if self.description is not None: body['description'] = self.description
|
|
3975
|
+
if self.effective_performance_target is not None:
|
|
3976
|
+
body['effective_performance_target'] = self.effective_performance_target
|
|
3933
3977
|
if self.end_time is not None: body['end_time'] = self.end_time
|
|
3934
3978
|
if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
|
|
3935
3979
|
if self.git_source: body['git_source'] = self.git_source
|
|
@@ -3970,6 +4014,7 @@ class Run:
|
|
|
3970
4014
|
cluster_spec=_from_dict(d, 'cluster_spec', ClusterSpec),
|
|
3971
4015
|
creator_user_name=d.get('creator_user_name', None),
|
|
3972
4016
|
description=d.get('description', None),
|
|
4017
|
+
effective_performance_target=_enum(d, 'effective_performance_target', PerformanceTarget),
|
|
3973
4018
|
end_time=d.get('end_time', None),
|
|
3974
4019
|
execution_duration=d.get('execution_duration', None),
|
|
3975
4020
|
git_source=_from_dict(d, 'git_source', GitSource),
|
|
@@ -4356,6 +4401,11 @@ class RunNow:
|
|
|
4356
4401
|
"""A list of task keys to run inside of the job. If this field is not provided, all tasks in the
|
|
4357
4402
|
job will be run."""
|
|
4358
4403
|
|
|
4404
|
+
performance_target: Optional[PerformanceTarget] = None
|
|
4405
|
+
"""PerformanceTarget defines how performant or cost efficient the execution of run on serverless
|
|
4406
|
+
compute should be. For RunNow request, the run will execute with this settings instead of ones
|
|
4407
|
+
defined in job."""
|
|
4408
|
+
|
|
4359
4409
|
pipeline_params: Optional[PipelineParams] = None
|
|
4360
4410
|
"""Controls whether the pipeline should perform a full refresh"""
|
|
4361
4411
|
|
|
@@ -4411,6 +4461,7 @@ class RunNow:
|
|
|
4411
4461
|
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
4412
4462
|
if self.notebook_params: body['notebook_params'] = self.notebook_params
|
|
4413
4463
|
if self.only: body['only'] = [v for v in self.only]
|
|
4464
|
+
if self.performance_target is not None: body['performance_target'] = self.performance_target.value
|
|
4414
4465
|
if self.pipeline_params: body['pipeline_params'] = self.pipeline_params.as_dict()
|
|
4415
4466
|
if self.python_named_params: body['python_named_params'] = self.python_named_params
|
|
4416
4467
|
if self.python_params: body['python_params'] = [v for v in self.python_params]
|
|
@@ -4429,6 +4480,7 @@ class RunNow:
|
|
|
4429
4480
|
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
4430
4481
|
if self.notebook_params: body['notebook_params'] = self.notebook_params
|
|
4431
4482
|
if self.only: body['only'] = self.only
|
|
4483
|
+
if self.performance_target is not None: body['performance_target'] = self.performance_target
|
|
4432
4484
|
if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
|
|
4433
4485
|
if self.python_named_params: body['python_named_params'] = self.python_named_params
|
|
4434
4486
|
if self.python_params: body['python_params'] = self.python_params
|
|
@@ -4447,6 +4499,7 @@ class RunNow:
|
|
|
4447
4499
|
job_parameters=d.get('job_parameters', None),
|
|
4448
4500
|
notebook_params=d.get('notebook_params', None),
|
|
4449
4501
|
only=d.get('only', None),
|
|
4502
|
+
performance_target=_enum(d, 'performance_target', PerformanceTarget),
|
|
4450
4503
|
pipeline_params=_from_dict(d, 'pipeline_params', PipelineParams),
|
|
4451
4504
|
python_named_params=d.get('python_named_params', None),
|
|
4452
4505
|
python_params=d.get('python_params', None),
|
|
@@ -4862,6 +4915,12 @@ class RunTask:
|
|
|
4862
4915
|
description: Optional[str] = None
|
|
4863
4916
|
"""An optional description for this task."""
|
|
4864
4917
|
|
|
4918
|
+
effective_performance_target: Optional[PerformanceTarget] = None
|
|
4919
|
+
"""effective_performance_target is the actual performance target used by the run during execution.
|
|
4920
|
+
effective_performance_target can differ from performance_target depending on if the job was
|
|
4921
|
+
eligible to be cost-optimized (e.g. contains at least 1 serverless task) or if an override was
|
|
4922
|
+
provided for the run (ex. RunNow)."""
|
|
4923
|
+
|
|
4865
4924
|
email_notifications: Optional[JobEmailNotifications] = None
|
|
4866
4925
|
"""An optional set of email addresses notified when the task run begins or completes. The default
|
|
4867
4926
|
behavior is to not send any emails."""
|
|
@@ -5010,6 +5069,8 @@ class RunTask:
|
|
|
5010
5069
|
if self.dbt_task: body['dbt_task'] = self.dbt_task.as_dict()
|
|
5011
5070
|
if self.depends_on: body['depends_on'] = [v.as_dict() for v in self.depends_on]
|
|
5012
5071
|
if self.description is not None: body['description'] = self.description
|
|
5072
|
+
if self.effective_performance_target is not None:
|
|
5073
|
+
body['effective_performance_target'] = self.effective_performance_target.value
|
|
5013
5074
|
if self.email_notifications: body['email_notifications'] = self.email_notifications.as_dict()
|
|
5014
5075
|
if self.end_time is not None: body['end_time'] = self.end_time
|
|
5015
5076
|
if self.environment_key is not None: body['environment_key'] = self.environment_key
|
|
@@ -5055,6 +5116,8 @@ class RunTask:
|
|
|
5055
5116
|
if self.dbt_task: body['dbt_task'] = self.dbt_task
|
|
5056
5117
|
if self.depends_on: body['depends_on'] = self.depends_on
|
|
5057
5118
|
if self.description is not None: body['description'] = self.description
|
|
5119
|
+
if self.effective_performance_target is not None:
|
|
5120
|
+
body['effective_performance_target'] = self.effective_performance_target
|
|
5058
5121
|
if self.email_notifications: body['email_notifications'] = self.email_notifications
|
|
5059
5122
|
if self.end_time is not None: body['end_time'] = self.end_time
|
|
5060
5123
|
if self.environment_key is not None: body['environment_key'] = self.environment_key
|
|
@@ -5101,6 +5164,7 @@ class RunTask:
|
|
|
5101
5164
|
dbt_task=_from_dict(d, 'dbt_task', DbtTask),
|
|
5102
5165
|
depends_on=_repeated_dict(d, 'depends_on', TaskDependency),
|
|
5103
5166
|
description=d.get('description', None),
|
|
5167
|
+
effective_performance_target=_enum(d, 'effective_performance_target', PerformanceTarget),
|
|
5104
5168
|
email_notifications=_from_dict(d, 'email_notifications', JobEmailNotifications),
|
|
5105
5169
|
end_time=d.get('end_time', None),
|
|
5106
5170
|
environment_key=d.get('environment_key', None),
|
|
@@ -5180,12 +5244,16 @@ class SparkJarTask:
|
|
|
5180
5244
|
|
|
5181
5245
|
[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
|
|
5182
5246
|
|
|
5247
|
+
run_as_repl: Optional[bool] = None
|
|
5248
|
+
"""Deprecated. A value of `false` is no longer supported."""
|
|
5249
|
+
|
|
5183
5250
|
def as_dict(self) -> dict:
|
|
5184
5251
|
"""Serializes the SparkJarTask into a dictionary suitable for use as a JSON request body."""
|
|
5185
5252
|
body = {}
|
|
5186
5253
|
if self.jar_uri is not None: body['jar_uri'] = self.jar_uri
|
|
5187
5254
|
if self.main_class_name is not None: body['main_class_name'] = self.main_class_name
|
|
5188
5255
|
if self.parameters: body['parameters'] = [v for v in self.parameters]
|
|
5256
|
+
if self.run_as_repl is not None: body['run_as_repl'] = self.run_as_repl
|
|
5189
5257
|
return body
|
|
5190
5258
|
|
|
5191
5259
|
def as_shallow_dict(self) -> dict:
|
|
@@ -5194,6 +5262,7 @@ class SparkJarTask:
|
|
|
5194
5262
|
if self.jar_uri is not None: body['jar_uri'] = self.jar_uri
|
|
5195
5263
|
if self.main_class_name is not None: body['main_class_name'] = self.main_class_name
|
|
5196
5264
|
if self.parameters: body['parameters'] = self.parameters
|
|
5265
|
+
if self.run_as_repl is not None: body['run_as_repl'] = self.run_as_repl
|
|
5197
5266
|
return body
|
|
5198
5267
|
|
|
5199
5268
|
@classmethod
|
|
@@ -5201,7 +5270,8 @@ class SparkJarTask:
|
|
|
5201
5270
|
"""Deserializes the SparkJarTask from a dictionary."""
|
|
5202
5271
|
return cls(jar_uri=d.get('jar_uri', None),
|
|
5203
5272
|
main_class_name=d.get('main_class_name', None),
|
|
5204
|
-
parameters=d.get('parameters', None)
|
|
5273
|
+
parameters=d.get('parameters', None),
|
|
5274
|
+
run_as_repl=d.get('run_as_repl', None))
|
|
5205
5275
|
|
|
5206
5276
|
|
|
5207
5277
|
@dataclass
|
|
@@ -6622,6 +6692,7 @@ class TerminationCodeCode(Enum):
|
|
|
6622
6692
|
|
|
6623
6693
|
[Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now"""
|
|
6624
6694
|
|
|
6695
|
+
BUDGET_POLICY_LIMIT_EXCEEDED = 'BUDGET_POLICY_LIMIT_EXCEEDED'
|
|
6625
6696
|
CANCELED = 'CANCELED'
|
|
6626
6697
|
CLOUD_FAILURE = 'CLOUD_FAILURE'
|
|
6627
6698
|
CLUSTER_ERROR = 'CLUSTER_ERROR'
|
|
@@ -7144,6 +7215,7 @@ class JobsAPI:
|
|
|
7144
7215
|
name: Optional[str] = None,
|
|
7145
7216
|
notification_settings: Optional[JobNotificationSettings] = None,
|
|
7146
7217
|
parameters: Optional[List[JobParameterDefinition]] = None,
|
|
7218
|
+
performance_target: Optional[PerformanceTarget] = None,
|
|
7147
7219
|
queue: Optional[QueueSettings] = None,
|
|
7148
7220
|
run_as: Optional[JobRunAs] = None,
|
|
7149
7221
|
schedule: Optional[CronSchedule] = None,
|
|
@@ -7216,6 +7288,9 @@ class JobsAPI:
|
|
|
7216
7288
|
`email_notifications` and `webhook_notifications` for this job.
|
|
7217
7289
|
:param parameters: List[:class:`JobParameterDefinition`] (optional)
|
|
7218
7290
|
Job-level parameter definitions
|
|
7291
|
+
:param performance_target: :class:`PerformanceTarget` (optional)
|
|
7292
|
+
PerformanceTarget defines how performant or cost efficient the execution of run on serverless should
|
|
7293
|
+
be.
|
|
7219
7294
|
:param queue: :class:`QueueSettings` (optional)
|
|
7220
7295
|
The queue settings of the job.
|
|
7221
7296
|
:param run_as: :class:`JobRunAs` (optional)
|
|
@@ -7263,6 +7338,7 @@ class JobsAPI:
|
|
|
7263
7338
|
if name is not None: body['name'] = name
|
|
7264
7339
|
if notification_settings is not None: body['notification_settings'] = notification_settings.as_dict()
|
|
7265
7340
|
if parameters is not None: body['parameters'] = [v.as_dict() for v in parameters]
|
|
7341
|
+
if performance_target is not None: body['performance_target'] = performance_target.value
|
|
7266
7342
|
if queue is not None: body['queue'] = queue.as_dict()
|
|
7267
7343
|
if run_as is not None: body['run_as'] = run_as.as_dict()
|
|
7268
7344
|
if schedule is not None: body['schedule'] = schedule.as_dict()
|
|
@@ -7761,6 +7837,7 @@ class JobsAPI:
|
|
|
7761
7837
|
job_parameters: Optional[Dict[str, str]] = None,
|
|
7762
7838
|
notebook_params: Optional[Dict[str, str]] = None,
|
|
7763
7839
|
only: Optional[List[str]] = None,
|
|
7840
|
+
performance_target: Optional[PerformanceTarget] = None,
|
|
7764
7841
|
pipeline_params: Optional[PipelineParams] = None,
|
|
7765
7842
|
python_named_params: Optional[Dict[str, str]] = None,
|
|
7766
7843
|
python_params: Optional[List[str]] = None,
|
|
@@ -7820,6 +7897,10 @@ class JobsAPI:
|
|
|
7820
7897
|
:param only: List[str] (optional)
|
|
7821
7898
|
A list of task keys to run inside of the job. If this field is not provided, all tasks in the job
|
|
7822
7899
|
will be run.
|
|
7900
|
+
:param performance_target: :class:`PerformanceTarget` (optional)
|
|
7901
|
+
PerformanceTarget defines how performant or cost efficient the execution of run on serverless
|
|
7902
|
+
compute should be. For RunNow request, the run will execute with this settings instead of ones
|
|
7903
|
+
defined in job.
|
|
7823
7904
|
:param pipeline_params: :class:`PipelineParams` (optional)
|
|
7824
7905
|
Controls whether the pipeline should perform a full refresh
|
|
7825
7906
|
:param python_named_params: Dict[str,str] (optional)
|
|
@@ -7872,6 +7953,7 @@ class JobsAPI:
|
|
|
7872
7953
|
if job_parameters is not None: body['job_parameters'] = job_parameters
|
|
7873
7954
|
if notebook_params is not None: body['notebook_params'] = notebook_params
|
|
7874
7955
|
if only is not None: body['only'] = [v for v in only]
|
|
7956
|
+
if performance_target is not None: body['performance_target'] = performance_target.value
|
|
7875
7957
|
if pipeline_params is not None: body['pipeline_params'] = pipeline_params.as_dict()
|
|
7876
7958
|
if python_named_params is not None: body['python_named_params'] = python_named_params
|
|
7877
7959
|
if python_params is not None: body['python_params'] = [v for v in python_params]
|
|
@@ -7894,6 +7976,7 @@ class JobsAPI:
|
|
|
7894
7976
|
job_parameters: Optional[Dict[str, str]] = None,
|
|
7895
7977
|
notebook_params: Optional[Dict[str, str]] = None,
|
|
7896
7978
|
only: Optional[List[str]] = None,
|
|
7979
|
+
performance_target: Optional[PerformanceTarget] = None,
|
|
7897
7980
|
pipeline_params: Optional[PipelineParams] = None,
|
|
7898
7981
|
python_named_params: Optional[Dict[str, str]] = None,
|
|
7899
7982
|
python_params: Optional[List[str]] = None,
|
|
@@ -7908,6 +7991,7 @@ class JobsAPI:
|
|
|
7908
7991
|
job_parameters=job_parameters,
|
|
7909
7992
|
notebook_params=notebook_params,
|
|
7910
7993
|
only=only,
|
|
7994
|
+
performance_target=performance_target,
|
|
7911
7995
|
pipeline_params=pipeline_params,
|
|
7912
7996
|
python_named_params=python_named_params,
|
|
7913
7997
|
python_params=python_params,
|
databricks/sdk/service/oauth2.py
CHANGED
|
@@ -31,6 +31,10 @@ class CreateCustomAppIntegration:
|
|
|
31
31
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
32
32
|
"""Token access policy"""
|
|
33
33
|
|
|
34
|
+
user_authorized_scopes: Optional[List[str]] = None
|
|
35
|
+
"""Scopes that will need to be consented by end user to mint the access token. If the user does not
|
|
36
|
+
authorize the access token will not be minted. Must be a subset of scopes."""
|
|
37
|
+
|
|
34
38
|
def as_dict(self) -> dict:
|
|
35
39
|
"""Serializes the CreateCustomAppIntegration into a dictionary suitable for use as a JSON request body."""
|
|
36
40
|
body = {}
|
|
@@ -39,6 +43,8 @@ class CreateCustomAppIntegration:
|
|
|
39
43
|
if self.redirect_urls: body['redirect_urls'] = [v for v in self.redirect_urls]
|
|
40
44
|
if self.scopes: body['scopes'] = [v for v in self.scopes]
|
|
41
45
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy.as_dict()
|
|
46
|
+
if self.user_authorized_scopes:
|
|
47
|
+
body['user_authorized_scopes'] = [v for v in self.user_authorized_scopes]
|
|
42
48
|
return body
|
|
43
49
|
|
|
44
50
|
def as_shallow_dict(self) -> dict:
|
|
@@ -49,6 +55,7 @@ class CreateCustomAppIntegration:
|
|
|
49
55
|
if self.redirect_urls: body['redirect_urls'] = self.redirect_urls
|
|
50
56
|
if self.scopes: body['scopes'] = self.scopes
|
|
51
57
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy
|
|
58
|
+
if self.user_authorized_scopes: body['user_authorized_scopes'] = self.user_authorized_scopes
|
|
52
59
|
return body
|
|
53
60
|
|
|
54
61
|
@classmethod
|
|
@@ -58,7 +65,8 @@ class CreateCustomAppIntegration:
|
|
|
58
65
|
name=d.get('name', None),
|
|
59
66
|
redirect_urls=d.get('redirect_urls', None),
|
|
60
67
|
scopes=d.get('scopes', None),
|
|
61
|
-
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy)
|
|
68
|
+
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy),
|
|
69
|
+
user_authorized_scopes=d.get('user_authorized_scopes', None))
|
|
62
70
|
|
|
63
71
|
|
|
64
72
|
@dataclass
|
|
@@ -346,6 +354,10 @@ class GetCustomAppIntegrationOutput:
|
|
|
346
354
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
347
355
|
"""Token access policy"""
|
|
348
356
|
|
|
357
|
+
user_authorized_scopes: Optional[List[str]] = None
|
|
358
|
+
"""Scopes that will need to be consented by end user to mint the access token. If the user does not
|
|
359
|
+
authorize the access token will not be minted. Must be a subset of scopes."""
|
|
360
|
+
|
|
349
361
|
def as_dict(self) -> dict:
|
|
350
362
|
"""Serializes the GetCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
351
363
|
body = {}
|
|
@@ -359,6 +371,8 @@ class GetCustomAppIntegrationOutput:
|
|
|
359
371
|
if self.redirect_urls: body['redirect_urls'] = [v for v in self.redirect_urls]
|
|
360
372
|
if self.scopes: body['scopes'] = [v for v in self.scopes]
|
|
361
373
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy.as_dict()
|
|
374
|
+
if self.user_authorized_scopes:
|
|
375
|
+
body['user_authorized_scopes'] = [v for v in self.user_authorized_scopes]
|
|
362
376
|
return body
|
|
363
377
|
|
|
364
378
|
def as_shallow_dict(self) -> dict:
|
|
@@ -374,6 +388,7 @@ class GetCustomAppIntegrationOutput:
|
|
|
374
388
|
if self.redirect_urls: body['redirect_urls'] = self.redirect_urls
|
|
375
389
|
if self.scopes: body['scopes'] = self.scopes
|
|
376
390
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy
|
|
391
|
+
if self.user_authorized_scopes: body['user_authorized_scopes'] = self.user_authorized_scopes
|
|
377
392
|
return body
|
|
378
393
|
|
|
379
394
|
@classmethod
|
|
@@ -388,7 +403,8 @@ class GetCustomAppIntegrationOutput:
|
|
|
388
403
|
name=d.get('name', None),
|
|
389
404
|
redirect_urls=d.get('redirect_urls', None),
|
|
390
405
|
scopes=d.get('scopes', None),
|
|
391
|
-
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy)
|
|
406
|
+
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy),
|
|
407
|
+
user_authorized_scopes=d.get('user_authorized_scopes', None))
|
|
392
408
|
|
|
393
409
|
|
|
394
410
|
@dataclass
|
|
@@ -798,6 +814,10 @@ class UpdateCustomAppIntegration:
|
|
|
798
814
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
799
815
|
"""Token access policy to be updated in the custom OAuth app integration"""
|
|
800
816
|
|
|
817
|
+
user_authorized_scopes: Optional[List[str]] = None
|
|
818
|
+
"""Scopes that will need to be consented by end user to mint the access token. If the user does not
|
|
819
|
+
authorize the access token will not be minted. Must be a subset of scopes."""
|
|
820
|
+
|
|
801
821
|
def as_dict(self) -> dict:
|
|
802
822
|
"""Serializes the UpdateCustomAppIntegration into a dictionary suitable for use as a JSON request body."""
|
|
803
823
|
body = {}
|
|
@@ -805,6 +825,8 @@ class UpdateCustomAppIntegration:
|
|
|
805
825
|
if self.redirect_urls: body['redirect_urls'] = [v for v in self.redirect_urls]
|
|
806
826
|
if self.scopes: body['scopes'] = [v for v in self.scopes]
|
|
807
827
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy.as_dict()
|
|
828
|
+
if self.user_authorized_scopes:
|
|
829
|
+
body['user_authorized_scopes'] = [v for v in self.user_authorized_scopes]
|
|
808
830
|
return body
|
|
809
831
|
|
|
810
832
|
def as_shallow_dict(self) -> dict:
|
|
@@ -814,6 +836,7 @@ class UpdateCustomAppIntegration:
|
|
|
814
836
|
if self.redirect_urls: body['redirect_urls'] = self.redirect_urls
|
|
815
837
|
if self.scopes: body['scopes'] = self.scopes
|
|
816
838
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy
|
|
839
|
+
if self.user_authorized_scopes: body['user_authorized_scopes'] = self.user_authorized_scopes
|
|
817
840
|
return body
|
|
818
841
|
|
|
819
842
|
@classmethod
|
|
@@ -822,7 +845,8 @@ class UpdateCustomAppIntegration:
|
|
|
822
845
|
return cls(integration_id=d.get('integration_id', None),
|
|
823
846
|
redirect_urls=d.get('redirect_urls', None),
|
|
824
847
|
scopes=d.get('scopes', None),
|
|
825
|
-
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy)
|
|
848
|
+
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy),
|
|
849
|
+
user_authorized_scopes=d.get('user_authorized_scopes', None))
|
|
826
850
|
|
|
827
851
|
|
|
828
852
|
@dataclass
|
|
@@ -1066,7 +1090,8 @@ class CustomAppIntegrationAPI:
|
|
|
1066
1090
|
name: Optional[str] = None,
|
|
1067
1091
|
redirect_urls: Optional[List[str]] = None,
|
|
1068
1092
|
scopes: Optional[List[str]] = None,
|
|
1069
|
-
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
1093
|
+
token_access_policy: Optional[TokenAccessPolicy] = None,
|
|
1094
|
+
user_authorized_scopes: Optional[List[str]] = None) -> CreateCustomAppIntegrationOutput:
|
|
1070
1095
|
"""Create Custom OAuth App Integration.
|
|
1071
1096
|
|
|
1072
1097
|
Create Custom OAuth App Integration.
|
|
@@ -1084,6 +1109,9 @@ class CustomAppIntegrationAPI:
|
|
|
1084
1109
|
profile, email.
|
|
1085
1110
|
:param token_access_policy: :class:`TokenAccessPolicy` (optional)
|
|
1086
1111
|
Token access policy
|
|
1112
|
+
:param user_authorized_scopes: List[str] (optional)
|
|
1113
|
+
Scopes that will need to be consented by end user to mint the access token. If the user does not
|
|
1114
|
+
authorize the access token will not be minted. Must be a subset of scopes.
|
|
1087
1115
|
|
|
1088
1116
|
:returns: :class:`CreateCustomAppIntegrationOutput`
|
|
1089
1117
|
"""
|
|
@@ -1093,6 +1121,8 @@ class CustomAppIntegrationAPI:
|
|
|
1093
1121
|
if redirect_urls is not None: body['redirect_urls'] = [v for v in redirect_urls]
|
|
1094
1122
|
if scopes is not None: body['scopes'] = [v for v in scopes]
|
|
1095
1123
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
1124
|
+
if user_authorized_scopes is not None:
|
|
1125
|
+
body['user_authorized_scopes'] = [v for v in user_authorized_scopes]
|
|
1096
1126
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1097
1127
|
|
|
1098
1128
|
res = self._api.do('POST',
|
|
@@ -1177,7 +1207,8 @@ class CustomAppIntegrationAPI:
|
|
|
1177
1207
|
*,
|
|
1178
1208
|
redirect_urls: Optional[List[str]] = None,
|
|
1179
1209
|
scopes: Optional[List[str]] = None,
|
|
1180
|
-
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
1210
|
+
token_access_policy: Optional[TokenAccessPolicy] = None,
|
|
1211
|
+
user_authorized_scopes: Optional[List[str]] = None):
|
|
1181
1212
|
"""Updates Custom OAuth App Integration.
|
|
1182
1213
|
|
|
1183
1214
|
Updates an existing custom OAuth App Integration. You can retrieve the custom OAuth app integration
|
|
@@ -1191,6 +1222,9 @@ class CustomAppIntegrationAPI:
|
|
|
1191
1222
|
this will fully replace the existing values instead of appending
|
|
1192
1223
|
:param token_access_policy: :class:`TokenAccessPolicy` (optional)
|
|
1193
1224
|
Token access policy to be updated in the custom OAuth app integration
|
|
1225
|
+
:param user_authorized_scopes: List[str] (optional)
|
|
1226
|
+
Scopes that will need to be consented by end user to mint the access token. If the user does not
|
|
1227
|
+
authorize the access token will not be minted. Must be a subset of scopes.
|
|
1194
1228
|
|
|
1195
1229
|
|
|
1196
1230
|
"""
|
|
@@ -1198,6 +1232,8 @@ class CustomAppIntegrationAPI:
|
|
|
1198
1232
|
if redirect_urls is not None: body['redirect_urls'] = [v for v in redirect_urls]
|
|
1199
1233
|
if scopes is not None: body['scopes'] = [v for v in scopes]
|
|
1200
1234
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
1235
|
+
if user_authorized_scopes is not None:
|
|
1236
|
+
body['user_authorized_scopes'] = [v for v in user_authorized_scopes]
|
|
1201
1237
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1202
1238
|
|
|
1203
1239
|
self._api.do(
|
|
@@ -650,13 +650,13 @@ class CreateServingEndpoint:
|
|
|
650
650
|
"""The name of the serving endpoint. This field is required and must be unique across a Databricks
|
|
651
651
|
workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores."""
|
|
652
652
|
|
|
653
|
-
config: EndpointCoreConfigInput
|
|
654
|
-
"""The core config of the serving endpoint."""
|
|
655
|
-
|
|
656
653
|
ai_gateway: Optional[AiGatewayConfig] = None
|
|
657
654
|
"""The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned
|
|
658
655
|
throughput endpoints are currently supported."""
|
|
659
656
|
|
|
657
|
+
config: Optional[EndpointCoreConfigInput] = None
|
|
658
|
+
"""The core config of the serving endpoint."""
|
|
659
|
+
|
|
660
660
|
rate_limits: Optional[List[RateLimit]] = None
|
|
661
661
|
"""Rate limits to be applied to the serving endpoint. NOTE: this field is deprecated, please use AI
|
|
662
662
|
Gateway to manage rate limits."""
|
|
@@ -1242,34 +1242,6 @@ class ExternalFunctionRequestHttpMethod(Enum):
|
|
|
1242
1242
|
PUT = 'PUT'
|
|
1243
1243
|
|
|
1244
1244
|
|
|
1245
|
-
@dataclass
|
|
1246
|
-
class ExternalFunctionResponse:
|
|
1247
|
-
status_code: Optional[int] = None
|
|
1248
|
-
"""The HTTP status code of the response"""
|
|
1249
|
-
|
|
1250
|
-
text: Optional[str] = None
|
|
1251
|
-
"""The content of the response"""
|
|
1252
|
-
|
|
1253
|
-
def as_dict(self) -> dict:
|
|
1254
|
-
"""Serializes the ExternalFunctionResponse into a dictionary suitable for use as a JSON request body."""
|
|
1255
|
-
body = {}
|
|
1256
|
-
if self.status_code is not None: body['status_code'] = self.status_code
|
|
1257
|
-
if self.text is not None: body['text'] = self.text
|
|
1258
|
-
return body
|
|
1259
|
-
|
|
1260
|
-
def as_shallow_dict(self) -> dict:
|
|
1261
|
-
"""Serializes the ExternalFunctionResponse into a shallow dictionary of its immediate attributes."""
|
|
1262
|
-
body = {}
|
|
1263
|
-
if self.status_code is not None: body['status_code'] = self.status_code
|
|
1264
|
-
if self.text is not None: body['text'] = self.text
|
|
1265
|
-
return body
|
|
1266
|
-
|
|
1267
|
-
@classmethod
|
|
1268
|
-
def from_dict(cls, d: Dict[str, any]) -> ExternalFunctionResponse:
|
|
1269
|
-
"""Deserializes the ExternalFunctionResponse from a dictionary."""
|
|
1270
|
-
return cls(status_code=d.get('status_code', None), text=d.get('text', None))
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
1245
|
@dataclass
|
|
1274
1246
|
class ExternalModel:
|
|
1275
1247
|
provider: ExternalModelProvider
|
|
@@ -1550,6 +1522,28 @@ class GoogleCloudVertexAiConfig:
|
|
|
1550
1522
|
region=d.get('region', None))
|
|
1551
1523
|
|
|
1552
1524
|
|
|
1525
|
+
@dataclass
|
|
1526
|
+
class HttpRequestResponse:
|
|
1527
|
+
contents: Optional[BinaryIO] = None
|
|
1528
|
+
|
|
1529
|
+
def as_dict(self) -> dict:
|
|
1530
|
+
"""Serializes the HttpRequestResponse into a dictionary suitable for use as a JSON request body."""
|
|
1531
|
+
body = {}
|
|
1532
|
+
if self.contents: body['contents'] = self.contents
|
|
1533
|
+
return body
|
|
1534
|
+
|
|
1535
|
+
def as_shallow_dict(self) -> dict:
|
|
1536
|
+
"""Serializes the HttpRequestResponse into a shallow dictionary of its immediate attributes."""
|
|
1537
|
+
body = {}
|
|
1538
|
+
if self.contents: body['contents'] = self.contents
|
|
1539
|
+
return body
|
|
1540
|
+
|
|
1541
|
+
@classmethod
|
|
1542
|
+
def from_dict(cls, d: Dict[str, any]) -> HttpRequestResponse:
|
|
1543
|
+
"""Deserializes the HttpRequestResponse from a dictionary."""
|
|
1544
|
+
return cls(contents=d.get('contents', None))
|
|
1545
|
+
|
|
1546
|
+
|
|
1553
1547
|
@dataclass
|
|
1554
1548
|
class ListEndpointsResponse:
|
|
1555
1549
|
endpoints: Optional[List[ServingEndpoint]] = None
|
|
@@ -3403,9 +3397,9 @@ class ServingEndpointsAPI:
|
|
|
3403
3397
|
|
|
3404
3398
|
def create(self,
|
|
3405
3399
|
name: str,
|
|
3406
|
-
config: EndpointCoreConfigInput,
|
|
3407
3400
|
*,
|
|
3408
3401
|
ai_gateway: Optional[AiGatewayConfig] = None,
|
|
3402
|
+
config: Optional[EndpointCoreConfigInput] = None,
|
|
3409
3403
|
rate_limits: Optional[List[RateLimit]] = None,
|
|
3410
3404
|
route_optimized: Optional[bool] = None,
|
|
3411
3405
|
tags: Optional[List[EndpointTag]] = None) -> Wait[ServingEndpointDetailed]:
|
|
@@ -3414,11 +3408,11 @@ class ServingEndpointsAPI:
|
|
|
3414
3408
|
:param name: str
|
|
3415
3409
|
The name of the serving endpoint. This field is required and must be unique across a Databricks
|
|
3416
3410
|
workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores.
|
|
3417
|
-
:param config: :class:`EndpointCoreConfigInput`
|
|
3418
|
-
The core config of the serving endpoint.
|
|
3419
3411
|
:param ai_gateway: :class:`AiGatewayConfig` (optional)
|
|
3420
3412
|
The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned
|
|
3421
3413
|
throughput endpoints are currently supported.
|
|
3414
|
+
:param config: :class:`EndpointCoreConfigInput` (optional)
|
|
3415
|
+
The core config of the serving endpoint.
|
|
3422
3416
|
:param rate_limits: List[:class:`RateLimit`] (optional)
|
|
3423
3417
|
Rate limits to be applied to the serving endpoint. NOTE: this field is deprecated, please use AI
|
|
3424
3418
|
Gateway to manage rate limits.
|
|
@@ -3448,9 +3442,9 @@ class ServingEndpointsAPI:
|
|
|
3448
3442
|
def create_and_wait(
|
|
3449
3443
|
self,
|
|
3450
3444
|
name: str,
|
|
3451
|
-
config: EndpointCoreConfigInput,
|
|
3452
3445
|
*,
|
|
3453
3446
|
ai_gateway: Optional[AiGatewayConfig] = None,
|
|
3447
|
+
config: Optional[EndpointCoreConfigInput] = None,
|
|
3454
3448
|
rate_limits: Optional[List[RateLimit]] = None,
|
|
3455
3449
|
route_optimized: Optional[bool] = None,
|
|
3456
3450
|
tags: Optional[List[EndpointTag]] = None,
|
|
@@ -3568,7 +3562,7 @@ class ServingEndpointsAPI:
|
|
|
3568
3562
|
*,
|
|
3569
3563
|
headers: Optional[str] = None,
|
|
3570
3564
|
json: Optional[str] = None,
|
|
3571
|
-
params: Optional[str] = None) ->
|
|
3565
|
+
params: Optional[str] = None) -> HttpRequestResponse:
|
|
3572
3566
|
"""Make external services call using the credentials stored in UC Connection.
|
|
3573
3567
|
|
|
3574
3568
|
:param connection_name: str
|
|
@@ -3585,7 +3579,7 @@ class ServingEndpointsAPI:
|
|
|
3585
3579
|
:param params: str (optional)
|
|
3586
3580
|
Query parameters for the request.
|
|
3587
3581
|
|
|
3588
|
-
:returns: :class:`
|
|
3582
|
+
:returns: :class:`HttpRequestResponse`
|
|
3589
3583
|
"""
|
|
3590
3584
|
body = {}
|
|
3591
3585
|
if connection_name is not None: body['connection_name'] = connection_name
|
|
@@ -3594,10 +3588,10 @@ class ServingEndpointsAPI:
|
|
|
3594
3588
|
if method is not None: body['method'] = method.value
|
|
3595
3589
|
if params is not None: body['params'] = params
|
|
3596
3590
|
if path is not None: body['path'] = path
|
|
3597
|
-
headers = {'Accept': '
|
|
3591
|
+
headers = {'Accept': 'text/plain', 'Content-Type': 'application/json', }
|
|
3598
3592
|
|
|
3599
|
-
res = self._api.do('POST', '/api/2.0/external-function', body=body, headers=headers)
|
|
3600
|
-
return
|
|
3593
|
+
res = self._api.do('POST', '/api/2.0/external-function', body=body, headers=headers, raw=True)
|
|
3594
|
+
return HttpRequestResponse.from_dict(res)
|
|
3601
3595
|
|
|
3602
3596
|
def list(self) -> Iterator[ServingEndpoint]:
|
|
3603
3597
|
"""Get all serving endpoints.
|