databricks-sdk 0.33.0__py3-none-any.whl → 0.34.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 +1 -0
- databricks/sdk/_base_client.py +323 -0
- databricks/sdk/core.py +25 -292
- databricks/sdk/mixins/files.py +9 -9
- databricks/sdk/service/apps.py +212 -7
- databricks/sdk/service/catalog.py +5 -2
- databricks/sdk/service/dashboards.py +2 -2
- databricks/sdk/service/jobs.py +6 -0
- databricks/sdk/service/settings.py +179 -0
- databricks/sdk/service/sharing.py +1 -1
- databricks/sdk/service/sql.py +7 -3
- databricks/sdk/service/workspace.py +2 -2
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.33.0.dist-info → databricks_sdk-0.34.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.33.0.dist-info → databricks_sdk-0.34.0.dist-info}/RECORD +19 -18
- {databricks_sdk-0.33.0.dist-info → databricks_sdk-0.34.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.33.0.dist-info → databricks_sdk-0.34.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.33.0.dist-info → databricks_sdk-0.34.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.33.0.dist-info → databricks_sdk-0.34.0.dist-info}/top_level.txt +0 -0
databricks/sdk/mixins/files.py
CHANGED
|
@@ -167,7 +167,7 @@ class _DbfsIO(BinaryIO):
|
|
|
167
167
|
return f"<_DbfsIO {self._path} {'read' if self.readable() else 'write'}=True>"
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
class
|
|
170
|
+
class _VolumesIO(BinaryIO):
|
|
171
171
|
|
|
172
172
|
def __init__(self, api: files.FilesAPI, path: str, *, read: bool, write: bool, overwrite: bool):
|
|
173
173
|
self._buffer = []
|
|
@@ -262,7 +262,7 @@ class _FilesIO(BinaryIO):
|
|
|
262
262
|
self.close()
|
|
263
263
|
|
|
264
264
|
def __repr__(self) -> str:
|
|
265
|
-
return f"<
|
|
265
|
+
return f"<_VolumesIO {self._path} {'read' if self.readable() else 'write'}=True>"
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
class _Path(ABC):
|
|
@@ -398,7 +398,7 @@ class _LocalPath(_Path):
|
|
|
398
398
|
return f'<_LocalPath {self._path}>'
|
|
399
399
|
|
|
400
400
|
|
|
401
|
-
class
|
|
401
|
+
class _VolumesPath(_Path):
|
|
402
402
|
|
|
403
403
|
def __init__(self, api: files.FilesAPI, src: Union[str, pathlib.Path]):
|
|
404
404
|
self._path = pathlib.PurePosixPath(str(src).replace('dbfs:', '').replace('file:', ''))
|
|
@@ -411,7 +411,7 @@ class _FilesPath(_Path):
|
|
|
411
411
|
return False
|
|
412
412
|
|
|
413
413
|
def child(self, path: str) -> Self:
|
|
414
|
-
return
|
|
414
|
+
return _VolumesPath(self._api, str(self._path / path))
|
|
415
415
|
|
|
416
416
|
def _is_dir(self) -> bool:
|
|
417
417
|
try:
|
|
@@ -431,7 +431,7 @@ class _FilesPath(_Path):
|
|
|
431
431
|
return self.is_dir
|
|
432
432
|
|
|
433
433
|
def open(self, *, read=False, write=False, overwrite=False) -> BinaryIO:
|
|
434
|
-
return
|
|
434
|
+
return _VolumesIO(self._api, self.as_string, read=read, write=write, overwrite=overwrite)
|
|
435
435
|
|
|
436
436
|
def list(self, *, recursive=False) -> Generator[files.FileInfo, None, None]:
|
|
437
437
|
if not self.is_dir:
|
|
@@ -458,13 +458,13 @@ class _FilesPath(_Path):
|
|
|
458
458
|
def delete(self, *, recursive=False):
|
|
459
459
|
if self.is_dir:
|
|
460
460
|
for entry in self.list(recursive=False):
|
|
461
|
-
|
|
461
|
+
_VolumesPath(self._api, entry.path).delete(recursive=True)
|
|
462
462
|
self._api.delete_directory(self.as_string)
|
|
463
463
|
else:
|
|
464
464
|
self._api.delete(self.as_string)
|
|
465
465
|
|
|
466
466
|
def __repr__(self) -> str:
|
|
467
|
-
return f'<
|
|
467
|
+
return f'<_VolumesPath {self._path}>'
|
|
468
468
|
|
|
469
469
|
|
|
470
470
|
class _DbfsPath(_Path):
|
|
@@ -589,8 +589,8 @@ class DbfsExt(files.DbfsAPI):
|
|
|
589
589
|
'UC Volumes paths, not external locations or DBFS mount points.')
|
|
590
590
|
if src.scheme == 'file':
|
|
591
591
|
return _LocalPath(src.geturl())
|
|
592
|
-
if src.path.startswith(
|
|
593
|
-
return
|
|
592
|
+
if src.path.startswith('/Volumes'):
|
|
593
|
+
return _VolumesPath(self._files_api, src.geturl())
|
|
594
594
|
return _DbfsPath(self._dbfs_api, src.geturl())
|
|
595
595
|
|
|
596
596
|
def copy(self, src: str, dst: str, *, recursive=False, overwrite=False):
|
databricks/sdk/service/apps.py
CHANGED
|
@@ -25,7 +25,8 @@ class App:
|
|
|
25
25
|
It must be unique within the workspace."""
|
|
26
26
|
|
|
27
27
|
active_deployment: Optional[AppDeployment] = None
|
|
28
|
-
"""The active deployment of the app.
|
|
28
|
+
"""The active deployment of the app. A deployment is considered active when it has been deployed to
|
|
29
|
+
the app compute."""
|
|
29
30
|
|
|
30
31
|
app_status: Optional[ApplicationStatus] = None
|
|
31
32
|
|
|
@@ -37,11 +38,19 @@ class App:
|
|
|
37
38
|
creator: Optional[str] = None
|
|
38
39
|
"""The email of the user that created the app."""
|
|
39
40
|
|
|
41
|
+
default_source_code_path: Optional[str] = None
|
|
42
|
+
"""The default workspace file system path of the source code from which app deployment are created.
|
|
43
|
+
This field tracks the workspace source code path of the last active deployment."""
|
|
44
|
+
|
|
40
45
|
description: Optional[str] = None
|
|
41
46
|
"""The description of the app."""
|
|
42
47
|
|
|
43
48
|
pending_deployment: Optional[AppDeployment] = None
|
|
44
|
-
"""The pending deployment of the app.
|
|
49
|
+
"""The pending deployment of the app. A deployment is considered pending when it is being prepared
|
|
50
|
+
for deployment to the app compute."""
|
|
51
|
+
|
|
52
|
+
resources: Optional[List[AppResource]] = None
|
|
53
|
+
"""Resources for the app."""
|
|
45
54
|
|
|
46
55
|
service_principal_id: Optional[int] = None
|
|
47
56
|
|
|
@@ -64,9 +73,12 @@ class App:
|
|
|
64
73
|
if self.compute_status: body['compute_status'] = self.compute_status.as_dict()
|
|
65
74
|
if self.create_time is not None: body['create_time'] = self.create_time
|
|
66
75
|
if self.creator is not None: body['creator'] = self.creator
|
|
76
|
+
if self.default_source_code_path is not None:
|
|
77
|
+
body['default_source_code_path'] = self.default_source_code_path
|
|
67
78
|
if self.description is not None: body['description'] = self.description
|
|
68
79
|
if self.name is not None: body['name'] = self.name
|
|
69
80
|
if self.pending_deployment: body['pending_deployment'] = self.pending_deployment.as_dict()
|
|
81
|
+
if self.resources: body['resources'] = [v.as_dict() for v in self.resources]
|
|
70
82
|
if self.service_principal_id is not None: body['service_principal_id'] = self.service_principal_id
|
|
71
83
|
if self.service_principal_name is not None:
|
|
72
84
|
body['service_principal_name'] = self.service_principal_name
|
|
@@ -83,9 +95,11 @@ class App:
|
|
|
83
95
|
compute_status=_from_dict(d, 'compute_status', ComputeStatus),
|
|
84
96
|
create_time=d.get('create_time', None),
|
|
85
97
|
creator=d.get('creator', None),
|
|
98
|
+
default_source_code_path=d.get('default_source_code_path', None),
|
|
86
99
|
description=d.get('description', None),
|
|
87
100
|
name=d.get('name', None),
|
|
88
101
|
pending_deployment=_from_dict(d, 'pending_deployment', AppDeployment),
|
|
102
|
+
resources=_repeated_dict(d, 'resources', AppResource),
|
|
89
103
|
service_principal_id=d.get('service_principal_id', None),
|
|
90
104
|
service_principal_name=d.get('service_principal_name', None),
|
|
91
105
|
update_time=d.get('update_time', None),
|
|
@@ -372,6 +386,170 @@ class AppPermissionsRequest:
|
|
|
372
386
|
app_name=d.get('app_name', None))
|
|
373
387
|
|
|
374
388
|
|
|
389
|
+
@dataclass
|
|
390
|
+
class AppResource:
|
|
391
|
+
name: str
|
|
392
|
+
"""Name of the App Resource."""
|
|
393
|
+
|
|
394
|
+
description: Optional[str] = None
|
|
395
|
+
"""Description of the App Resource."""
|
|
396
|
+
|
|
397
|
+
job: Optional[AppResourceJob] = None
|
|
398
|
+
|
|
399
|
+
secret: Optional[AppResourceSecret] = None
|
|
400
|
+
|
|
401
|
+
serving_endpoint: Optional[AppResourceServingEndpoint] = None
|
|
402
|
+
|
|
403
|
+
sql_warehouse: Optional[AppResourceSqlWarehouse] = None
|
|
404
|
+
|
|
405
|
+
def as_dict(self) -> dict:
|
|
406
|
+
"""Serializes the AppResource into a dictionary suitable for use as a JSON request body."""
|
|
407
|
+
body = {}
|
|
408
|
+
if self.description is not None: body['description'] = self.description
|
|
409
|
+
if self.job: body['job'] = self.job.as_dict()
|
|
410
|
+
if self.name is not None: body['name'] = self.name
|
|
411
|
+
if self.secret: body['secret'] = self.secret.as_dict()
|
|
412
|
+
if self.serving_endpoint: body['serving_endpoint'] = self.serving_endpoint.as_dict()
|
|
413
|
+
if self.sql_warehouse: body['sql_warehouse'] = self.sql_warehouse.as_dict()
|
|
414
|
+
return body
|
|
415
|
+
|
|
416
|
+
@classmethod
|
|
417
|
+
def from_dict(cls, d: Dict[str, any]) -> AppResource:
|
|
418
|
+
"""Deserializes the AppResource from a dictionary."""
|
|
419
|
+
return cls(description=d.get('description', None),
|
|
420
|
+
job=_from_dict(d, 'job', AppResourceJob),
|
|
421
|
+
name=d.get('name', None),
|
|
422
|
+
secret=_from_dict(d, 'secret', AppResourceSecret),
|
|
423
|
+
serving_endpoint=_from_dict(d, 'serving_endpoint', AppResourceServingEndpoint),
|
|
424
|
+
sql_warehouse=_from_dict(d, 'sql_warehouse', AppResourceSqlWarehouse))
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
@dataclass
|
|
428
|
+
class AppResourceJob:
|
|
429
|
+
id: str
|
|
430
|
+
"""Id of the job to grant permission on."""
|
|
431
|
+
|
|
432
|
+
permission: AppResourceJobJobPermission
|
|
433
|
+
"""Permissions to grant on the Job. Supported permissions are: "CAN_MANAGE", "IS_OWNER",
|
|
434
|
+
"CAN_MANAGE_RUN", "CAN_VIEW"."""
|
|
435
|
+
|
|
436
|
+
def as_dict(self) -> dict:
|
|
437
|
+
"""Serializes the AppResourceJob into a dictionary suitable for use as a JSON request body."""
|
|
438
|
+
body = {}
|
|
439
|
+
if self.id is not None: body['id'] = self.id
|
|
440
|
+
if self.permission is not None: body['permission'] = self.permission.value
|
|
441
|
+
return body
|
|
442
|
+
|
|
443
|
+
@classmethod
|
|
444
|
+
def from_dict(cls, d: Dict[str, any]) -> AppResourceJob:
|
|
445
|
+
"""Deserializes the AppResourceJob from a dictionary."""
|
|
446
|
+
return cls(id=d.get('id', None), permission=_enum(d, 'permission', AppResourceJobJobPermission))
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
class AppResourceJobJobPermission(Enum):
|
|
450
|
+
|
|
451
|
+
CAN_MANAGE = 'CAN_MANAGE'
|
|
452
|
+
CAN_MANAGE_RUN = 'CAN_MANAGE_RUN'
|
|
453
|
+
CAN_VIEW = 'CAN_VIEW'
|
|
454
|
+
IS_OWNER = 'IS_OWNER'
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
@dataclass
|
|
458
|
+
class AppResourceSecret:
|
|
459
|
+
scope: str
|
|
460
|
+
"""Scope of the secret to grant permission on."""
|
|
461
|
+
|
|
462
|
+
key: str
|
|
463
|
+
"""Key of the secret to grant permission on."""
|
|
464
|
+
|
|
465
|
+
permission: AppResourceSecretSecretPermission
|
|
466
|
+
"""Permission to grant on the secret scope. For secrets, only one permission is allowed. Permission
|
|
467
|
+
must be one of: "READ", "WRITE", "MANAGE"."""
|
|
468
|
+
|
|
469
|
+
def as_dict(self) -> dict:
|
|
470
|
+
"""Serializes the AppResourceSecret into a dictionary suitable for use as a JSON request body."""
|
|
471
|
+
body = {}
|
|
472
|
+
if self.key is not None: body['key'] = self.key
|
|
473
|
+
if self.permission is not None: body['permission'] = self.permission.value
|
|
474
|
+
if self.scope is not None: body['scope'] = self.scope
|
|
475
|
+
return body
|
|
476
|
+
|
|
477
|
+
@classmethod
|
|
478
|
+
def from_dict(cls, d: Dict[str, any]) -> AppResourceSecret:
|
|
479
|
+
"""Deserializes the AppResourceSecret from a dictionary."""
|
|
480
|
+
return cls(key=d.get('key', None),
|
|
481
|
+
permission=_enum(d, 'permission', AppResourceSecretSecretPermission),
|
|
482
|
+
scope=d.get('scope', None))
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
class AppResourceSecretSecretPermission(Enum):
|
|
486
|
+
"""Permission to grant on the secret scope. Supported permissions are: "READ", "WRITE", "MANAGE"."""
|
|
487
|
+
|
|
488
|
+
MANAGE = 'MANAGE'
|
|
489
|
+
READ = 'READ'
|
|
490
|
+
WRITE = 'WRITE'
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
@dataclass
|
|
494
|
+
class AppResourceServingEndpoint:
|
|
495
|
+
name: str
|
|
496
|
+
"""Name of the serving endpoint to grant permission on."""
|
|
497
|
+
|
|
498
|
+
permission: AppResourceServingEndpointServingEndpointPermission
|
|
499
|
+
"""Permission to grant on the serving endpoint. Supported permissions are: "CAN_MANAGE",
|
|
500
|
+
"CAN_QUERY", "CAN_VIEW"."""
|
|
501
|
+
|
|
502
|
+
def as_dict(self) -> dict:
|
|
503
|
+
"""Serializes the AppResourceServingEndpoint into a dictionary suitable for use as a JSON request body."""
|
|
504
|
+
body = {}
|
|
505
|
+
if self.name is not None: body['name'] = self.name
|
|
506
|
+
if self.permission is not None: body['permission'] = self.permission.value
|
|
507
|
+
return body
|
|
508
|
+
|
|
509
|
+
@classmethod
|
|
510
|
+
def from_dict(cls, d: Dict[str, any]) -> AppResourceServingEndpoint:
|
|
511
|
+
"""Deserializes the AppResourceServingEndpoint from a dictionary."""
|
|
512
|
+
return cls(name=d.get('name', None),
|
|
513
|
+
permission=_enum(d, 'permission', AppResourceServingEndpointServingEndpointPermission))
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
class AppResourceServingEndpointServingEndpointPermission(Enum):
|
|
517
|
+
|
|
518
|
+
CAN_MANAGE = 'CAN_MANAGE'
|
|
519
|
+
CAN_QUERY = 'CAN_QUERY'
|
|
520
|
+
CAN_VIEW = 'CAN_VIEW'
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
@dataclass
|
|
524
|
+
class AppResourceSqlWarehouse:
|
|
525
|
+
id: str
|
|
526
|
+
"""Id of the SQL warehouse to grant permission on."""
|
|
527
|
+
|
|
528
|
+
permission: AppResourceSqlWarehouseSqlWarehousePermission
|
|
529
|
+
"""Permission to grant on the SQL warehouse. Supported permissions are: "CAN_MANAGE", "CAN_USE",
|
|
530
|
+
"IS_OWNER"."""
|
|
531
|
+
|
|
532
|
+
def as_dict(self) -> dict:
|
|
533
|
+
"""Serializes the AppResourceSqlWarehouse into a dictionary suitable for use as a JSON request body."""
|
|
534
|
+
body = {}
|
|
535
|
+
if self.id is not None: body['id'] = self.id
|
|
536
|
+
if self.permission is not None: body['permission'] = self.permission.value
|
|
537
|
+
return body
|
|
538
|
+
|
|
539
|
+
@classmethod
|
|
540
|
+
def from_dict(cls, d: Dict[str, any]) -> AppResourceSqlWarehouse:
|
|
541
|
+
"""Deserializes the AppResourceSqlWarehouse from a dictionary."""
|
|
542
|
+
return cls(id=d.get('id', None),
|
|
543
|
+
permission=_enum(d, 'permission', AppResourceSqlWarehouseSqlWarehousePermission))
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
class AppResourceSqlWarehouseSqlWarehousePermission(Enum):
|
|
547
|
+
|
|
548
|
+
CAN_MANAGE = 'CAN_MANAGE'
|
|
549
|
+
CAN_USE = 'CAN_USE'
|
|
550
|
+
IS_OWNER = 'IS_OWNER'
|
|
551
|
+
|
|
552
|
+
|
|
375
553
|
class ApplicationState(Enum):
|
|
376
554
|
|
|
377
555
|
CRASHED = 'CRASHED'
|
|
@@ -478,17 +656,23 @@ class CreateAppRequest:
|
|
|
478
656
|
description: Optional[str] = None
|
|
479
657
|
"""The description of the app."""
|
|
480
658
|
|
|
659
|
+
resources: Optional[List[AppResource]] = None
|
|
660
|
+
"""Resources for the app."""
|
|
661
|
+
|
|
481
662
|
def as_dict(self) -> dict:
|
|
482
663
|
"""Serializes the CreateAppRequest into a dictionary suitable for use as a JSON request body."""
|
|
483
664
|
body = {}
|
|
484
665
|
if self.description is not None: body['description'] = self.description
|
|
485
666
|
if self.name is not None: body['name'] = self.name
|
|
667
|
+
if self.resources: body['resources'] = [v.as_dict() for v in self.resources]
|
|
486
668
|
return body
|
|
487
669
|
|
|
488
670
|
@classmethod
|
|
489
671
|
def from_dict(cls, d: Dict[str, any]) -> CreateAppRequest:
|
|
490
672
|
"""Deserializes the CreateAppRequest from a dictionary."""
|
|
491
|
-
return cls(description=d.get('description', None),
|
|
673
|
+
return cls(description=d.get('description', None),
|
|
674
|
+
name=d.get('name', None),
|
|
675
|
+
resources=_repeated_dict(d, 'resources', AppResource))
|
|
492
676
|
|
|
493
677
|
|
|
494
678
|
@dataclass
|
|
@@ -571,17 +755,23 @@ class UpdateAppRequest:
|
|
|
571
755
|
description: Optional[str] = None
|
|
572
756
|
"""The description of the app."""
|
|
573
757
|
|
|
758
|
+
resources: Optional[List[AppResource]] = None
|
|
759
|
+
"""Resources for the app."""
|
|
760
|
+
|
|
574
761
|
def as_dict(self) -> dict:
|
|
575
762
|
"""Serializes the UpdateAppRequest into a dictionary suitable for use as a JSON request body."""
|
|
576
763
|
body = {}
|
|
577
764
|
if self.description is not None: body['description'] = self.description
|
|
578
765
|
if self.name is not None: body['name'] = self.name
|
|
766
|
+
if self.resources: body['resources'] = [v.as_dict() for v in self.resources]
|
|
579
767
|
return body
|
|
580
768
|
|
|
581
769
|
@classmethod
|
|
582
770
|
def from_dict(cls, d: Dict[str, any]) -> UpdateAppRequest:
|
|
583
771
|
"""Deserializes the UpdateAppRequest from a dictionary."""
|
|
584
|
-
return cls(description=d.get('description', None),
|
|
772
|
+
return cls(description=d.get('description', None),
|
|
773
|
+
name=d.get('name', None),
|
|
774
|
+
resources=_repeated_dict(d, 'resources', AppResource))
|
|
585
775
|
|
|
586
776
|
|
|
587
777
|
class AppsAPI:
|
|
@@ -689,7 +879,11 @@ class AppsAPI:
|
|
|
689
879
|
attempt += 1
|
|
690
880
|
raise TimeoutError(f'timed out after {timeout}: {status_message}')
|
|
691
881
|
|
|
692
|
-
def create(self,
|
|
882
|
+
def create(self,
|
|
883
|
+
name: str,
|
|
884
|
+
*,
|
|
885
|
+
description: Optional[str] = None,
|
|
886
|
+
resources: Optional[List[AppResource]] = None) -> Wait[App]:
|
|
693
887
|
"""Create an app.
|
|
694
888
|
|
|
695
889
|
Creates a new app.
|
|
@@ -699,6 +893,8 @@ class AppsAPI:
|
|
|
699
893
|
must be unique within the workspace.
|
|
700
894
|
:param description: str (optional)
|
|
701
895
|
The description of the app.
|
|
896
|
+
:param resources: List[:class:`AppResource`] (optional)
|
|
897
|
+
Resources for the app.
|
|
702
898
|
|
|
703
899
|
:returns:
|
|
704
900
|
Long-running operation waiter for :class:`App`.
|
|
@@ -707,6 +903,7 @@ class AppsAPI:
|
|
|
707
903
|
body = {}
|
|
708
904
|
if description is not None: body['description'] = description
|
|
709
905
|
if name is not None: body['name'] = name
|
|
906
|
+
if resources is not None: body['resources'] = [v.as_dict() for v in resources]
|
|
710
907
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
711
908
|
|
|
712
909
|
op_response = self._api.do('POST', '/api/2.0/apps', body=body, headers=headers)
|
|
@@ -716,8 +913,9 @@ class AppsAPI:
|
|
|
716
913
|
name: str,
|
|
717
914
|
*,
|
|
718
915
|
description: Optional[str] = None,
|
|
916
|
+
resources: Optional[List[AppResource]] = None,
|
|
719
917
|
timeout=timedelta(minutes=20)) -> App:
|
|
720
|
-
return self.create(description=description, name=name).result(timeout=timeout)
|
|
918
|
+
return self.create(description=description, name=name, resources=resources).result(timeout=timeout)
|
|
721
919
|
|
|
722
920
|
def delete(self, name: str) -> App:
|
|
723
921
|
"""Delete an app.
|
|
@@ -981,7 +1179,11 @@ class AppsAPI:
|
|
|
981
1179
|
def stop_and_wait(self, name: str, timeout=timedelta(minutes=20)) -> App:
|
|
982
1180
|
return self.stop(name=name).result(timeout=timeout)
|
|
983
1181
|
|
|
984
|
-
def update(self,
|
|
1182
|
+
def update(self,
|
|
1183
|
+
name: str,
|
|
1184
|
+
*,
|
|
1185
|
+
description: Optional[str] = None,
|
|
1186
|
+
resources: Optional[List[AppResource]] = None) -> App:
|
|
985
1187
|
"""Update an app.
|
|
986
1188
|
|
|
987
1189
|
Updates the app with the supplied name.
|
|
@@ -991,11 +1193,14 @@ class AppsAPI:
|
|
|
991
1193
|
must be unique within the workspace.
|
|
992
1194
|
:param description: str (optional)
|
|
993
1195
|
The description of the app.
|
|
1196
|
+
:param resources: List[:class:`AppResource`] (optional)
|
|
1197
|
+
Resources for the app.
|
|
994
1198
|
|
|
995
1199
|
:returns: :class:`App`
|
|
996
1200
|
"""
|
|
997
1201
|
body = {}
|
|
998
1202
|
if description is not None: body['description'] = description
|
|
1203
|
+
if resources is not None: body['resources'] = [v.as_dict() for v in resources]
|
|
999
1204
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1000
1205
|
|
|
1001
1206
|
res = self._api.do('PATCH', f'/api/2.0/apps/{name}', body=body, headers=headers)
|
|
@@ -909,6 +909,7 @@ class ConnectionInfoSecurableKind(Enum):
|
|
|
909
909
|
CONNECTION_DATABRICKS = 'CONNECTION_DATABRICKS'
|
|
910
910
|
CONNECTION_EXTERNAL_HIVE_METASTORE = 'CONNECTION_EXTERNAL_HIVE_METASTORE'
|
|
911
911
|
CONNECTION_GLUE = 'CONNECTION_GLUE'
|
|
912
|
+
CONNECTION_HTTP_BEARER = 'CONNECTION_HTTP_BEARER'
|
|
912
913
|
CONNECTION_MYSQL = 'CONNECTION_MYSQL'
|
|
913
914
|
CONNECTION_ONLINE_CATALOG = 'CONNECTION_ONLINE_CATALOG'
|
|
914
915
|
CONNECTION_POSTGRESQL = 'CONNECTION_POSTGRESQL'
|
|
@@ -925,6 +926,7 @@ class ConnectionType(Enum):
|
|
|
925
926
|
DATABRICKS = 'DATABRICKS'
|
|
926
927
|
GLUE = 'GLUE'
|
|
927
928
|
HIVE_METASTORE = 'HIVE_METASTORE'
|
|
929
|
+
HTTP = 'HTTP'
|
|
928
930
|
MYSQL = 'MYSQL'
|
|
929
931
|
POSTGRESQL = 'POSTGRESQL'
|
|
930
932
|
REDSHIFT = 'REDSHIFT'
|
|
@@ -1676,6 +1678,7 @@ class CreateVolumeRequestContent:
|
|
|
1676
1678
|
class CredentialType(Enum):
|
|
1677
1679
|
"""The type of credential."""
|
|
1678
1680
|
|
|
1681
|
+
BEARER_TOKEN = 'BEARER_TOKEN'
|
|
1679
1682
|
USERNAME_PASSWORD = 'USERNAME_PASSWORD'
|
|
1680
1683
|
|
|
1681
1684
|
|
|
@@ -2547,8 +2550,8 @@ class GenerateTemporaryTableCredentialResponse:
|
|
|
2547
2550
|
https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas"""
|
|
2548
2551
|
|
|
2549
2552
|
expiration_time: Optional[int] = None
|
|
2550
|
-
"""Server time when the credential will expire, in
|
|
2551
|
-
|
|
2553
|
+
"""Server time when the credential will expire, in epoch milliseconds. The API client is advised to
|
|
2554
|
+
cache the credential given this expiration time."""
|
|
2552
2555
|
|
|
2553
2556
|
gcp_oauth_token: Optional[GcpOauthToken] = None
|
|
2554
2557
|
"""GCP temporary credentials for API authentication. Read more at
|
|
@@ -169,8 +169,8 @@ class Dashboard:
|
|
|
169
169
|
trailing slash. This field is excluded in List Dashboards responses."""
|
|
170
170
|
|
|
171
171
|
path: Optional[str] = None
|
|
172
|
-
"""The workspace path of the dashboard asset, including the file name.
|
|
173
|
-
List Dashboards responses."""
|
|
172
|
+
"""The workspace path of the dashboard asset, including the file name. Exported dashboards always
|
|
173
|
+
have the file extension `.lvdash.json`. This field is excluded in List Dashboards responses."""
|
|
174
174
|
|
|
175
175
|
serialized_dashboard: Optional[str] = None
|
|
176
176
|
"""The contents of the dashboard in serialized string form. This field is excluded in List
|
databricks/sdk/service/jobs.py
CHANGED
|
@@ -2478,6 +2478,7 @@ class RepairRun:
|
|
|
2478
2478
|
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
|
|
2479
2479
|
|
|
2480
2480
|
pipeline_params: Optional[PipelineParams] = None
|
|
2481
|
+
"""Controls whether the pipeline should perform a full refresh"""
|
|
2481
2482
|
|
|
2482
2483
|
python_named_params: Optional[Dict[str, str]] = None
|
|
2483
2484
|
|
|
@@ -3181,6 +3182,7 @@ class RunJobTask:
|
|
|
3181
3182
|
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
|
|
3182
3183
|
|
|
3183
3184
|
pipeline_params: Optional[PipelineParams] = None
|
|
3185
|
+
"""Controls whether the pipeline should perform a full refresh"""
|
|
3184
3186
|
|
|
3185
3187
|
python_named_params: Optional[Dict[str, str]] = None
|
|
3186
3188
|
|
|
@@ -3340,6 +3342,7 @@ class RunNow:
|
|
|
3340
3342
|
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
|
|
3341
3343
|
|
|
3342
3344
|
pipeline_params: Optional[PipelineParams] = None
|
|
3345
|
+
"""Controls whether the pipeline should perform a full refresh"""
|
|
3343
3346
|
|
|
3344
3347
|
python_named_params: Optional[Dict[str, str]] = None
|
|
3345
3348
|
|
|
@@ -3549,6 +3552,7 @@ class RunParameters:
|
|
|
3549
3552
|
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
|
|
3550
3553
|
|
|
3551
3554
|
pipeline_params: Optional[PipelineParams] = None
|
|
3555
|
+
"""Controls whether the pipeline should perform a full refresh"""
|
|
3552
3556
|
|
|
3553
3557
|
python_named_params: Optional[Dict[str, str]] = None
|
|
3554
3558
|
|
|
@@ -6087,6 +6091,7 @@ class JobsAPI:
|
|
|
6087
6091
|
[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
|
|
6088
6092
|
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
|
|
6089
6093
|
:param pipeline_params: :class:`PipelineParams` (optional)
|
|
6094
|
+
Controls whether the pipeline should perform a full refresh
|
|
6090
6095
|
:param python_named_params: Dict[str,str] (optional)
|
|
6091
6096
|
:param python_params: List[str] (optional)
|
|
6092
6097
|
A list of parameters for jobs with Python tasks, for example `"python_params": ["john doe", "35"]`.
|
|
@@ -6276,6 +6281,7 @@ class JobsAPI:
|
|
|
6276
6281
|
[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
|
|
6277
6282
|
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
|
|
6278
6283
|
:param pipeline_params: :class:`PipelineParams` (optional)
|
|
6284
|
+
Controls whether the pipeline should perform a full refresh
|
|
6279
6285
|
:param python_named_params: Dict[str,str] (optional)
|
|
6280
6286
|
:param python_params: List[str] (optional)
|
|
6281
6287
|
A list of parameters for jobs with Python tasks, for example `"python_params": ["john doe", "35"]`.
|