databricks-sdk 0.63.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.
- databricks/sdk/__init__.py +45 -3
- databricks/sdk/service/agentbricks.py +3 -3
- databricks/sdk/service/apps.py +519 -0
- databricks/sdk/service/catalog.py +712 -45
- databricks/sdk/service/cleanrooms.py +3 -3
- databricks/sdk/service/dashboards.py +155 -6
- databricks/sdk/service/jobs.py +36 -4
- databricks/sdk/service/serving.py +16 -0
- databricks/sdk/service/settingsv2.py +937 -0
- databricks/sdk/service/sharing.py +1 -28
- databricks/sdk/service/sql.py +64 -1
- databricks/sdk/service/tags.py +232 -0
- databricks/sdk/service/vectorsearch.py +13 -2
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.64.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.64.0.dist-info}/RECORD +20 -18
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.64.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.64.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.64.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.64.0.dist-info}/top_level.txt +0 -0
|
@@ -1827,59 +1827,32 @@ class SecurablePropertiesKvPairs:
|
|
|
1827
1827
|
|
|
1828
1828
|
@dataclass
|
|
1829
1829
|
class Share:
|
|
1830
|
-
comment: Optional[str] = None
|
|
1831
|
-
"""The comment of the share."""
|
|
1832
|
-
|
|
1833
|
-
display_name: Optional[str] = None
|
|
1834
|
-
"""The display name of the share. If defined, it will be shown in the UI."""
|
|
1835
|
-
|
|
1836
1830
|
id: Optional[str] = None
|
|
1837
1831
|
|
|
1838
1832
|
name: Optional[str] = None
|
|
1839
1833
|
|
|
1840
|
-
tags: Optional[List[catalog.TagKeyValue]] = None
|
|
1841
|
-
"""The tags of the share."""
|
|
1842
|
-
|
|
1843
1834
|
def as_dict(self) -> dict:
|
|
1844
1835
|
"""Serializes the Share into a dictionary suitable for use as a JSON request body."""
|
|
1845
1836
|
body = {}
|
|
1846
|
-
if self.comment is not None:
|
|
1847
|
-
body["comment"] = self.comment
|
|
1848
|
-
if self.display_name is not None:
|
|
1849
|
-
body["display_name"] = self.display_name
|
|
1850
1837
|
if self.id is not None:
|
|
1851
1838
|
body["id"] = self.id
|
|
1852
1839
|
if self.name is not None:
|
|
1853
1840
|
body["name"] = self.name
|
|
1854
|
-
if self.tags:
|
|
1855
|
-
body["tags"] = [v.as_dict() for v in self.tags]
|
|
1856
1841
|
return body
|
|
1857
1842
|
|
|
1858
1843
|
def as_shallow_dict(self) -> dict:
|
|
1859
1844
|
"""Serializes the Share into a shallow dictionary of its immediate attributes."""
|
|
1860
1845
|
body = {}
|
|
1861
|
-
if self.comment is not None:
|
|
1862
|
-
body["comment"] = self.comment
|
|
1863
|
-
if self.display_name is not None:
|
|
1864
|
-
body["display_name"] = self.display_name
|
|
1865
1846
|
if self.id is not None:
|
|
1866
1847
|
body["id"] = self.id
|
|
1867
1848
|
if self.name is not None:
|
|
1868
1849
|
body["name"] = self.name
|
|
1869
|
-
if self.tags:
|
|
1870
|
-
body["tags"] = self.tags
|
|
1871
1850
|
return body
|
|
1872
1851
|
|
|
1873
1852
|
@classmethod
|
|
1874
1853
|
def from_dict(cls, d: Dict[str, Any]) -> Share:
|
|
1875
1854
|
"""Deserializes the Share from a dictionary."""
|
|
1876
|
-
return cls(
|
|
1877
|
-
comment=d.get("comment", None),
|
|
1878
|
-
display_name=d.get("display_name", None),
|
|
1879
|
-
id=d.get("id", None),
|
|
1880
|
-
name=d.get("name", None),
|
|
1881
|
-
tags=_repeated_dict(d, "tags", catalog.TagKeyValue),
|
|
1882
|
-
)
|
|
1855
|
+
return cls(id=d.get("id", None), name=d.get("name", None))
|
|
1883
1856
|
|
|
1884
1857
|
|
|
1885
1858
|
@dataclass
|
databricks/sdk/service/sql.py
CHANGED
|
@@ -646,6 +646,10 @@ class AlertV2:
|
|
|
646
646
|
display_name: Optional[str] = None
|
|
647
647
|
"""The display name of the alert."""
|
|
648
648
|
|
|
649
|
+
effective_run_as: Optional[AlertV2RunAs] = None
|
|
650
|
+
"""The actual identity that will be used to execute the alert. This is an output-only field that
|
|
651
|
+
shows the resolved run-as identity after applying permissions and defaults."""
|
|
652
|
+
|
|
649
653
|
evaluation: Optional[AlertV2Evaluation] = None
|
|
650
654
|
|
|
651
655
|
id: Optional[str] = None
|
|
@@ -664,10 +668,18 @@ class AlertV2:
|
|
|
664
668
|
query_text: Optional[str] = None
|
|
665
669
|
"""Text of the query to be run."""
|
|
666
670
|
|
|
671
|
+
run_as: Optional[AlertV2RunAs] = None
|
|
672
|
+
"""Specifies the identity that will be used to run the alert. This field allows you to configure
|
|
673
|
+
alerts to run as a specific user or service principal. - For user identity: Set `user_name` to
|
|
674
|
+
the email of an active workspace user. Users can only set this to their own email. - For service
|
|
675
|
+
principal: Set `service_principal_name` to the application ID. Requires the
|
|
676
|
+
`servicePrincipal/user` role. If not specified, the alert will run as the request user."""
|
|
677
|
+
|
|
667
678
|
run_as_user_name: Optional[str] = None
|
|
668
679
|
"""The run as username or application ID of service principal. On Create and Update, this field can
|
|
669
680
|
be set to application ID of an active service principal. Setting this field requires the
|
|
670
|
-
servicePrincipal/user role.
|
|
681
|
+
servicePrincipal/user role. Deprecated: Use `run_as` field instead. This field will be removed
|
|
682
|
+
in a future release."""
|
|
671
683
|
|
|
672
684
|
schedule: Optional[CronSchedule] = None
|
|
673
685
|
|
|
@@ -688,6 +700,8 @@ class AlertV2:
|
|
|
688
700
|
body["custom_summary"] = self.custom_summary
|
|
689
701
|
if self.display_name is not None:
|
|
690
702
|
body["display_name"] = self.display_name
|
|
703
|
+
if self.effective_run_as:
|
|
704
|
+
body["effective_run_as"] = self.effective_run_as.as_dict()
|
|
691
705
|
if self.evaluation:
|
|
692
706
|
body["evaluation"] = self.evaluation.as_dict()
|
|
693
707
|
if self.id is not None:
|
|
@@ -700,6 +714,8 @@ class AlertV2:
|
|
|
700
714
|
body["parent_path"] = self.parent_path
|
|
701
715
|
if self.query_text is not None:
|
|
702
716
|
body["query_text"] = self.query_text
|
|
717
|
+
if self.run_as:
|
|
718
|
+
body["run_as"] = self.run_as.as_dict()
|
|
703
719
|
if self.run_as_user_name is not None:
|
|
704
720
|
body["run_as_user_name"] = self.run_as_user_name
|
|
705
721
|
if self.schedule:
|
|
@@ -721,6 +737,8 @@ class AlertV2:
|
|
|
721
737
|
body["custom_summary"] = self.custom_summary
|
|
722
738
|
if self.display_name is not None:
|
|
723
739
|
body["display_name"] = self.display_name
|
|
740
|
+
if self.effective_run_as:
|
|
741
|
+
body["effective_run_as"] = self.effective_run_as
|
|
724
742
|
if self.evaluation:
|
|
725
743
|
body["evaluation"] = self.evaluation
|
|
726
744
|
if self.id is not None:
|
|
@@ -733,6 +751,8 @@ class AlertV2:
|
|
|
733
751
|
body["parent_path"] = self.parent_path
|
|
734
752
|
if self.query_text is not None:
|
|
735
753
|
body["query_text"] = self.query_text
|
|
754
|
+
if self.run_as:
|
|
755
|
+
body["run_as"] = self.run_as
|
|
736
756
|
if self.run_as_user_name is not None:
|
|
737
757
|
body["run_as_user_name"] = self.run_as_user_name
|
|
738
758
|
if self.schedule:
|
|
@@ -751,12 +771,14 @@ class AlertV2:
|
|
|
751
771
|
custom_description=d.get("custom_description", None),
|
|
752
772
|
custom_summary=d.get("custom_summary", None),
|
|
753
773
|
display_name=d.get("display_name", None),
|
|
774
|
+
effective_run_as=_from_dict(d, "effective_run_as", AlertV2RunAs),
|
|
754
775
|
evaluation=_from_dict(d, "evaluation", AlertV2Evaluation),
|
|
755
776
|
id=d.get("id", None),
|
|
756
777
|
lifecycle_state=_enum(d, "lifecycle_state", LifecycleState),
|
|
757
778
|
owner_user_name=d.get("owner_user_name", None),
|
|
758
779
|
parent_path=d.get("parent_path", None),
|
|
759
780
|
query_text=d.get("query_text", None),
|
|
781
|
+
run_as=_from_dict(d, "run_as", AlertV2RunAs),
|
|
760
782
|
run_as_user_name=d.get("run_as_user_name", None),
|
|
761
783
|
schedule=_from_dict(d, "schedule", CronSchedule),
|
|
762
784
|
update_time=d.get("update_time", None),
|
|
@@ -992,6 +1014,39 @@ class AlertV2OperandValue:
|
|
|
992
1014
|
)
|
|
993
1015
|
|
|
994
1016
|
|
|
1017
|
+
@dataclass
|
|
1018
|
+
class AlertV2RunAs:
|
|
1019
|
+
service_principal_name: Optional[str] = None
|
|
1020
|
+
"""Application ID of an active service principal. Setting this field requires the
|
|
1021
|
+
`servicePrincipal/user` role."""
|
|
1022
|
+
|
|
1023
|
+
user_name: Optional[str] = None
|
|
1024
|
+
"""The email of an active workspace user. Can only set this field to their own email."""
|
|
1025
|
+
|
|
1026
|
+
def as_dict(self) -> dict:
|
|
1027
|
+
"""Serializes the AlertV2RunAs into a dictionary suitable for use as a JSON request body."""
|
|
1028
|
+
body = {}
|
|
1029
|
+
if self.service_principal_name is not None:
|
|
1030
|
+
body["service_principal_name"] = self.service_principal_name
|
|
1031
|
+
if self.user_name is not None:
|
|
1032
|
+
body["user_name"] = self.user_name
|
|
1033
|
+
return body
|
|
1034
|
+
|
|
1035
|
+
def as_shallow_dict(self) -> dict:
|
|
1036
|
+
"""Serializes the AlertV2RunAs into a shallow dictionary of its immediate attributes."""
|
|
1037
|
+
body = {}
|
|
1038
|
+
if self.service_principal_name is not None:
|
|
1039
|
+
body["service_principal_name"] = self.service_principal_name
|
|
1040
|
+
if self.user_name is not None:
|
|
1041
|
+
body["user_name"] = self.user_name
|
|
1042
|
+
return body
|
|
1043
|
+
|
|
1044
|
+
@classmethod
|
|
1045
|
+
def from_dict(cls, d: Dict[str, Any]) -> AlertV2RunAs:
|
|
1046
|
+
"""Deserializes the AlertV2RunAs from a dictionary."""
|
|
1047
|
+
return cls(service_principal_name=d.get("service_principal_name", None), user_name=d.get("user_name", None))
|
|
1048
|
+
|
|
1049
|
+
|
|
995
1050
|
@dataclass
|
|
996
1051
|
class AlertV2Subscription:
|
|
997
1052
|
destination_id: Optional[str] = None
|
|
@@ -4723,6 +4778,9 @@ class QueryFilter:
|
|
|
4723
4778
|
|
|
4724
4779
|
@dataclass
|
|
4725
4780
|
class QueryInfo:
|
|
4781
|
+
cache_query_id: Optional[str] = None
|
|
4782
|
+
"""The ID of the cached query if this result retrieved from cache"""
|
|
4783
|
+
|
|
4726
4784
|
channel_used: Optional[ChannelInfo] = None
|
|
4727
4785
|
"""SQL Warehouse channel information at the time of query execution"""
|
|
4728
4786
|
|
|
@@ -4808,6 +4866,8 @@ class QueryInfo:
|
|
|
4808
4866
|
def as_dict(self) -> dict:
|
|
4809
4867
|
"""Serializes the QueryInfo into a dictionary suitable for use as a JSON request body."""
|
|
4810
4868
|
body = {}
|
|
4869
|
+
if self.cache_query_id is not None:
|
|
4870
|
+
body["cache_query_id"] = self.cache_query_id
|
|
4811
4871
|
if self.channel_used:
|
|
4812
4872
|
body["channel_used"] = self.channel_used.as_dict()
|
|
4813
4873
|
if self.client_application is not None:
|
|
@@ -4861,6 +4921,8 @@ class QueryInfo:
|
|
|
4861
4921
|
def as_shallow_dict(self) -> dict:
|
|
4862
4922
|
"""Serializes the QueryInfo into a shallow dictionary of its immediate attributes."""
|
|
4863
4923
|
body = {}
|
|
4924
|
+
if self.cache_query_id is not None:
|
|
4925
|
+
body["cache_query_id"] = self.cache_query_id
|
|
4864
4926
|
if self.channel_used:
|
|
4865
4927
|
body["channel_used"] = self.channel_used
|
|
4866
4928
|
if self.client_application is not None:
|
|
@@ -4915,6 +4977,7 @@ class QueryInfo:
|
|
|
4915
4977
|
def from_dict(cls, d: Dict[str, Any]) -> QueryInfo:
|
|
4916
4978
|
"""Deserializes the QueryInfo from a dictionary."""
|
|
4917
4979
|
return cls(
|
|
4980
|
+
cache_query_id=d.get("cache_query_id", None),
|
|
4918
4981
|
channel_used=_from_dict(d, "channel_used", ChannelInfo),
|
|
4919
4982
|
client_application=d.get("client_application", None),
|
|
4920
4983
|
duration=d.get("duration", None),
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from typing import Any, Dict, Iterator, List, Optional
|
|
8
|
+
|
|
9
|
+
from ._internal import _repeated_dict
|
|
10
|
+
|
|
11
|
+
_LOG = logging.getLogger("databricks.sdk")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# all definitions in this file are in alphabetical order
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class ListTagPoliciesResponse:
|
|
19
|
+
next_page_token: Optional[str] = None
|
|
20
|
+
|
|
21
|
+
tag_policies: Optional[List[TagPolicy]] = None
|
|
22
|
+
|
|
23
|
+
def as_dict(self) -> dict:
|
|
24
|
+
"""Serializes the ListTagPoliciesResponse into a dictionary suitable for use as a JSON request body."""
|
|
25
|
+
body = {}
|
|
26
|
+
if self.next_page_token is not None:
|
|
27
|
+
body["next_page_token"] = self.next_page_token
|
|
28
|
+
if self.tag_policies:
|
|
29
|
+
body["tag_policies"] = [v.as_dict() for v in self.tag_policies]
|
|
30
|
+
return body
|
|
31
|
+
|
|
32
|
+
def as_shallow_dict(self) -> dict:
|
|
33
|
+
"""Serializes the ListTagPoliciesResponse into a shallow dictionary of its immediate attributes."""
|
|
34
|
+
body = {}
|
|
35
|
+
if self.next_page_token is not None:
|
|
36
|
+
body["next_page_token"] = self.next_page_token
|
|
37
|
+
if self.tag_policies:
|
|
38
|
+
body["tag_policies"] = self.tag_policies
|
|
39
|
+
return body
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls, d: Dict[str, Any]) -> ListTagPoliciesResponse:
|
|
43
|
+
"""Deserializes the ListTagPoliciesResponse from a dictionary."""
|
|
44
|
+
return cls(
|
|
45
|
+
next_page_token=d.get("next_page_token", None), tag_policies=_repeated_dict(d, "tag_policies", TagPolicy)
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass
|
|
50
|
+
class TagPolicy:
|
|
51
|
+
tag_key: str
|
|
52
|
+
|
|
53
|
+
description: Optional[str] = None
|
|
54
|
+
|
|
55
|
+
id: Optional[str] = None
|
|
56
|
+
|
|
57
|
+
values: Optional[List[Value]] = None
|
|
58
|
+
|
|
59
|
+
def as_dict(self) -> dict:
|
|
60
|
+
"""Serializes the TagPolicy into a dictionary suitable for use as a JSON request body."""
|
|
61
|
+
body = {}
|
|
62
|
+
if self.description is not None:
|
|
63
|
+
body["description"] = self.description
|
|
64
|
+
if self.id is not None:
|
|
65
|
+
body["id"] = self.id
|
|
66
|
+
if self.tag_key is not None:
|
|
67
|
+
body["tag_key"] = self.tag_key
|
|
68
|
+
if self.values:
|
|
69
|
+
body["values"] = [v.as_dict() for v in self.values]
|
|
70
|
+
return body
|
|
71
|
+
|
|
72
|
+
def as_shallow_dict(self) -> dict:
|
|
73
|
+
"""Serializes the TagPolicy into a shallow dictionary of its immediate attributes."""
|
|
74
|
+
body = {}
|
|
75
|
+
if self.description is not None:
|
|
76
|
+
body["description"] = self.description
|
|
77
|
+
if self.id is not None:
|
|
78
|
+
body["id"] = self.id
|
|
79
|
+
if self.tag_key is not None:
|
|
80
|
+
body["tag_key"] = self.tag_key
|
|
81
|
+
if self.values:
|
|
82
|
+
body["values"] = self.values
|
|
83
|
+
return body
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, d: Dict[str, Any]) -> TagPolicy:
|
|
87
|
+
"""Deserializes the TagPolicy from a dictionary."""
|
|
88
|
+
return cls(
|
|
89
|
+
description=d.get("description", None),
|
|
90
|
+
id=d.get("id", None),
|
|
91
|
+
tag_key=d.get("tag_key", None),
|
|
92
|
+
values=_repeated_dict(d, "values", Value),
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@dataclass
|
|
97
|
+
class Value:
|
|
98
|
+
name: str
|
|
99
|
+
|
|
100
|
+
def as_dict(self) -> dict:
|
|
101
|
+
"""Serializes the Value into a dictionary suitable for use as a JSON request body."""
|
|
102
|
+
body = {}
|
|
103
|
+
if self.name is not None:
|
|
104
|
+
body["name"] = self.name
|
|
105
|
+
return body
|
|
106
|
+
|
|
107
|
+
def as_shallow_dict(self) -> dict:
|
|
108
|
+
"""Serializes the Value into a shallow dictionary of its immediate attributes."""
|
|
109
|
+
body = {}
|
|
110
|
+
if self.name is not None:
|
|
111
|
+
body["name"] = self.name
|
|
112
|
+
return body
|
|
113
|
+
|
|
114
|
+
@classmethod
|
|
115
|
+
def from_dict(cls, d: Dict[str, Any]) -> Value:
|
|
116
|
+
"""Deserializes the Value from a dictionary."""
|
|
117
|
+
return cls(name=d.get("name", None))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class TagPoliciesAPI:
|
|
121
|
+
"""The Tag Policy API allows you to manage tag policies in Databricks."""
|
|
122
|
+
|
|
123
|
+
def __init__(self, api_client):
|
|
124
|
+
self._api = api_client
|
|
125
|
+
|
|
126
|
+
def create_tag_policy(self, tag_policy: TagPolicy) -> TagPolicy:
|
|
127
|
+
"""Creates a new tag policy.
|
|
128
|
+
|
|
129
|
+
:param tag_policy: :class:`TagPolicy`
|
|
130
|
+
|
|
131
|
+
:returns: :class:`TagPolicy`
|
|
132
|
+
"""
|
|
133
|
+
body = tag_policy.as_dict()
|
|
134
|
+
headers = {
|
|
135
|
+
"Accept": "application/json",
|
|
136
|
+
"Content-Type": "application/json",
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
res = self._api.do("POST", "/api/2.1/tag-policies", body=body, headers=headers)
|
|
140
|
+
return TagPolicy.from_dict(res)
|
|
141
|
+
|
|
142
|
+
def delete_tag_policy(self, tag_key: str):
|
|
143
|
+
"""Deletes a tag policy by its key.
|
|
144
|
+
|
|
145
|
+
:param tag_key: str
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
headers = {
|
|
151
|
+
"Accept": "application/json",
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
self._api.do("DELETE", f"/api/2.1/tag-policies/{tag_key}", headers=headers)
|
|
155
|
+
|
|
156
|
+
def get_tag_policy(self, tag_key: str) -> TagPolicy:
|
|
157
|
+
"""Gets a single tag policy by its key.
|
|
158
|
+
|
|
159
|
+
:param tag_key: str
|
|
160
|
+
|
|
161
|
+
:returns: :class:`TagPolicy`
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
headers = {
|
|
165
|
+
"Accept": "application/json",
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
res = self._api.do("GET", f"/api/2.1/tag-policies/{tag_key}", headers=headers)
|
|
169
|
+
return TagPolicy.from_dict(res)
|
|
170
|
+
|
|
171
|
+
def list_tag_policies(
|
|
172
|
+
self, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
173
|
+
) -> Iterator[TagPolicy]:
|
|
174
|
+
"""Lists all tag policies in the account.
|
|
175
|
+
|
|
176
|
+
:param page_size: int (optional)
|
|
177
|
+
The maximum number of results to return in this request. Fewer results may be returned than
|
|
178
|
+
requested. If unspecified or set to 0, this defaults to 1000. The maximum value is 1000; values
|
|
179
|
+
above 1000 will be coerced down to 1000.
|
|
180
|
+
:param page_token: str (optional)
|
|
181
|
+
An optional page token received from a previous list tag policies call.
|
|
182
|
+
|
|
183
|
+
:returns: Iterator over :class:`TagPolicy`
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
query = {}
|
|
187
|
+
if page_size is not None:
|
|
188
|
+
query["page_size"] = page_size
|
|
189
|
+
if page_token is not None:
|
|
190
|
+
query["page_token"] = page_token
|
|
191
|
+
headers = {
|
|
192
|
+
"Accept": "application/json",
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
while True:
|
|
196
|
+
json = self._api.do("GET", "/api/2.1/tag-policies", query=query, headers=headers)
|
|
197
|
+
if "tag_policies" in json:
|
|
198
|
+
for v in json["tag_policies"]:
|
|
199
|
+
yield TagPolicy.from_dict(v)
|
|
200
|
+
if "next_page_token" not in json or not json["next_page_token"]:
|
|
201
|
+
return
|
|
202
|
+
query["page_token"] = json["next_page_token"]
|
|
203
|
+
|
|
204
|
+
def update_tag_policy(self, tag_key: str, tag_policy: TagPolicy, update_mask: str) -> TagPolicy:
|
|
205
|
+
"""Updates an existing tag policy.
|
|
206
|
+
|
|
207
|
+
:param tag_key: str
|
|
208
|
+
:param tag_policy: :class:`TagPolicy`
|
|
209
|
+
:param update_mask: str
|
|
210
|
+
The field mask must be a single string, with multiple fields separated by commas (no spaces). The
|
|
211
|
+
field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g.,
|
|
212
|
+
`author.given_name`). Specification of elements in sequence or map fields is not allowed, as only
|
|
213
|
+
the entire collection field can be specified. Field names must exactly match the resource field
|
|
214
|
+
names.
|
|
215
|
+
|
|
216
|
+
A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
|
|
217
|
+
fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API
|
|
218
|
+
changes in the future.
|
|
219
|
+
|
|
220
|
+
:returns: :class:`TagPolicy`
|
|
221
|
+
"""
|
|
222
|
+
body = tag_policy.as_dict()
|
|
223
|
+
query = {}
|
|
224
|
+
if update_mask is not None:
|
|
225
|
+
query["update_mask"] = update_mask
|
|
226
|
+
headers = {
|
|
227
|
+
"Accept": "application/json",
|
|
228
|
+
"Content-Type": "application/json",
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
res = self._api.do("PATCH", f"/api/2.1/tag-policies/{tag_key}", query=query, body=body, headers=headers)
|
|
232
|
+
return TagPolicy.from_dict(res)
|
|
@@ -377,7 +377,10 @@ class DirectAccessVectorIndexSpec:
|
|
|
377
377
|
@dataclass
|
|
378
378
|
class EmbeddingSourceColumn:
|
|
379
379
|
embedding_model_endpoint_name: Optional[str] = None
|
|
380
|
-
"""Name of the embedding model endpoint"""
|
|
380
|
+
"""Name of the embedding model endpoint, used by default for both ingestion and querying."""
|
|
381
|
+
|
|
382
|
+
model_endpoint_name_for_query: Optional[str] = None
|
|
383
|
+
"""Name of the embedding model endpoint which, if specified, is used for querying (not ingestion)."""
|
|
381
384
|
|
|
382
385
|
name: Optional[str] = None
|
|
383
386
|
"""Name of the column"""
|
|
@@ -387,6 +390,8 @@ class EmbeddingSourceColumn:
|
|
|
387
390
|
body = {}
|
|
388
391
|
if self.embedding_model_endpoint_name is not None:
|
|
389
392
|
body["embedding_model_endpoint_name"] = self.embedding_model_endpoint_name
|
|
393
|
+
if self.model_endpoint_name_for_query is not None:
|
|
394
|
+
body["model_endpoint_name_for_query"] = self.model_endpoint_name_for_query
|
|
390
395
|
if self.name is not None:
|
|
391
396
|
body["name"] = self.name
|
|
392
397
|
return body
|
|
@@ -396,6 +401,8 @@ class EmbeddingSourceColumn:
|
|
|
396
401
|
body = {}
|
|
397
402
|
if self.embedding_model_endpoint_name is not None:
|
|
398
403
|
body["embedding_model_endpoint_name"] = self.embedding_model_endpoint_name
|
|
404
|
+
if self.model_endpoint_name_for_query is not None:
|
|
405
|
+
body["model_endpoint_name_for_query"] = self.model_endpoint_name_for_query
|
|
399
406
|
if self.name is not None:
|
|
400
407
|
body["name"] = self.name
|
|
401
408
|
return body
|
|
@@ -403,7 +410,11 @@ class EmbeddingSourceColumn:
|
|
|
403
410
|
@classmethod
|
|
404
411
|
def from_dict(cls, d: Dict[str, Any]) -> EmbeddingSourceColumn:
|
|
405
412
|
"""Deserializes the EmbeddingSourceColumn from a dictionary."""
|
|
406
|
-
return cls(
|
|
413
|
+
return cls(
|
|
414
|
+
embedding_model_endpoint_name=d.get("embedding_model_endpoint_name", None),
|
|
415
|
+
model_endpoint_name_for_query=d.get("model_endpoint_name_for_query", None),
|
|
416
|
+
name=d.get("name", None),
|
|
417
|
+
)
|
|
407
418
|
|
|
408
419
|
|
|
409
420
|
@dataclass
|
databricks/sdk/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.64.0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
databricks/__init__.py,sha256=CF2MJcZFwbpn9TwQER8qnCDhkPooBGQNVkX4v7g6p3g,537
|
|
2
|
-
databricks/sdk/__init__.py,sha256=
|
|
2
|
+
databricks/sdk/__init__.py,sha256=IohKistbgPSpX6erDEiG6XKJssDPyZbMlxoheU9nQKE,64357
|
|
3
3
|
databricks/sdk/_base_client.py,sha256=IMHtzC5BhWt-lBVjifewR1Ah5fegGDMv0__-O1hCxWI,15850
|
|
4
4
|
databricks/sdk/_property.py,sha256=ccbxhkXZmZOxbx2sqKMTzhVZDuvWXG0WPHFRgac6JAM,1701
|
|
5
5
|
databricks/sdk/azure.py,sha256=sN_ARpmP9h1JovtiHIsDLtrVQP_K11eNDDtHS6PD19k,1015
|
|
@@ -17,7 +17,7 @@ databricks/sdk/oidc_token_supplier.py,sha256=QrO6J0QY4yFfcdQDL5h2OfxMxvBZJPtPmPe
|
|
|
17
17
|
databricks/sdk/py.typed,sha256=pSvaHpbY1UPNEXyVFUjlgBhjPFZMmVC_UNrPC7eMOHI,74
|
|
18
18
|
databricks/sdk/retries.py,sha256=7k2kEexGqGKXHNAWHbPFSZSugU8UIU0qtyly_hix22Q,2581
|
|
19
19
|
databricks/sdk/useragent.py,sha256=boEgzTv-Zmo6boipZKjSopNy0CXg4GShC1_lTKpJgqs,7361
|
|
20
|
-
databricks/sdk/version.py,sha256=
|
|
20
|
+
databricks/sdk/version.py,sha256=4aEOIqCiMfp1lfhnZ0isYinRITBjjNflprA4nXib3RQ,23
|
|
21
21
|
databricks/sdk/_widgets/__init__.py,sha256=VhI-VvLlr3rKUT1nbROslHJIbmZX_tPJ9rRhrdFsYUA,2811
|
|
22
22
|
databricks/sdk/_widgets/default_widgets_utils.py,sha256=_hwCbptLbRzWEmknco0H1wQNAYcuy2pjFO9NiRbvFeo,1127
|
|
23
23
|
databricks/sdk/_widgets/ipywidgets_utils.py,sha256=mg3rEPG9z76e0yVjGgcLybUvd_zSuN5ziGeKiZ-c8Ew,2927
|
|
@@ -44,32 +44,34 @@ databricks/sdk/runtime/__init__.py,sha256=6nthZxeYY1HjHieQcP7kXVLIId7w2yfHpZRXXt
|
|
|
44
44
|
databricks/sdk/runtime/dbutils_stub.py,sha256=S_pgWyGmwp3Ay-pMDEXccYsPwNVqCtz7MpD3fZVlHUA,11408
|
|
45
45
|
databricks/sdk/service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
databricks/sdk/service/_internal.py,sha256=PY83MPehEwGuMzCnyvolqglnfZeQ7-eS38kedTa7KDU,1985
|
|
47
|
-
databricks/sdk/service/agentbricks.py,sha256=
|
|
48
|
-
databricks/sdk/service/apps.py,sha256=
|
|
47
|
+
databricks/sdk/service/agentbricks.py,sha256=cGl_d1MEFG2XY48WN9veCJ4UgVMadC9KOsDvUpbMc0k,11706
|
|
48
|
+
databricks/sdk/service/apps.py,sha256=RXuwG12MU62W9B855dP9N99R47hAZkNJlXcdmCNe5Jo,77562
|
|
49
49
|
databricks/sdk/service/billing.py,sha256=Y1tuA7x-wl720TCA98merqUqwrhA4KGd92oWCv679ps,90880
|
|
50
|
-
databricks/sdk/service/catalog.py,sha256=
|
|
51
|
-
databricks/sdk/service/cleanrooms.py,sha256=
|
|
50
|
+
databricks/sdk/service/catalog.py,sha256=JjvVZdQ8my2JnYMrTgK55ixb8Bs6I2C0pALB0Kx_S0Y,657446
|
|
51
|
+
databricks/sdk/service/cleanrooms.py,sha256=QpmlhVjy-DMWa7ggAK8n0Zspz317i2N1sPXb5RLprpA,81091
|
|
52
52
|
databricks/sdk/service/compute.py,sha256=ZRCPSF2CkJaT5RNWb1YWSYVj8_EjQft13xPj0vDFQpc,468481
|
|
53
|
-
databricks/sdk/service/dashboards.py,sha256=
|
|
53
|
+
databricks/sdk/service/dashboards.py,sha256=uz604lHCvx-YMPPhrUFAqiBD2nycAriruCjofZJnYb0,98027
|
|
54
54
|
databricks/sdk/service/database.py,sha256=Xcfuc7sdgoZRA0PwfF3aS73_t_FuxLMkTjGdYaH808c,85977
|
|
55
55
|
databricks/sdk/service/files.py,sha256=k28gM20L9bw_RmKcIm8IcNFfHVtENCbakptM3p8bgbw,38403
|
|
56
56
|
databricks/sdk/service/iam.py,sha256=cSKocvBtKqC9IARCBpYpCfUZAnmGdRis2vVdzx6X_WQ,165768
|
|
57
|
-
databricks/sdk/service/jobs.py,sha256=
|
|
57
|
+
databricks/sdk/service/jobs.py,sha256=3S5dZAX2bmw1BCNY1Ks-RTAHSWLc7Lafan0b8IKnI0g,431714
|
|
58
58
|
databricks/sdk/service/marketplace.py,sha256=8MpP8Y65R6bGyvuWW4ZU6b-6__a4WLZVcDScLh0to4g,153028
|
|
59
59
|
databricks/sdk/service/ml.py,sha256=y-I4JLzCGNZu3nW_PHlTDBbcTKCFIcnwCTHaRZr12fQ,303773
|
|
60
60
|
databricks/sdk/service/oauth2.py,sha256=6yoa5zmpJ68lCIIFyqcrM3fiSaWvPtf7Pl1dNhXL9pU,75330
|
|
61
61
|
databricks/sdk/service/pipelines.py,sha256=CblPuyVF6z5cLEbxuU0JpYLPDtGavvUN8vyiaAYGOPA,154614
|
|
62
62
|
databricks/sdk/service/provisioning.py,sha256=zZm_4lDO_mhDAOcaNoMDDz4Die_MXoapNa4NuwLJYww,129980
|
|
63
63
|
databricks/sdk/service/qualitymonitorv2.py,sha256=82IUD7oTDNPwMcIDE_v59-nr2I3gpL65Ih7UfB5eInY,9202
|
|
64
|
-
databricks/sdk/service/serving.py,sha256=
|
|
64
|
+
databricks/sdk/service/serving.py,sha256=xDddrGyr7836whZCf2Cfr7dmWHye1-r7EZ3YorEgWlw,214037
|
|
65
65
|
databricks/sdk/service/settings.py,sha256=Dqv0yPC6kcMrxvjx6RzaRonpkhkdUgGsJHOGLCqhrts,372788
|
|
66
|
-
databricks/sdk/service/
|
|
67
|
-
databricks/sdk/service/
|
|
68
|
-
databricks/sdk/service/
|
|
66
|
+
databricks/sdk/service/settingsv2.py,sha256=l6uKjlMwXb8z4GX37cQceDvgug6hx1sjZTQVr3TTAzg,39673
|
|
67
|
+
databricks/sdk/service/sharing.py,sha256=7B4wnHx4bu6PqOCST2Q8GUcZH7yVInj0L645Z5RfGE8,142394
|
|
68
|
+
databricks/sdk/service/sql.py,sha256=C2OhRU9_z8K7Jr4po86rxGYAgMVEbyHp4IhlC4HNbQg,387360
|
|
69
|
+
databricks/sdk/service/tags.py,sha256=sx1sMAfBE9Y5yu2mBSWXZKW3l_NTA1ujPQ3oHEljc_E,7817
|
|
70
|
+
databricks/sdk/service/vectorsearch.py,sha256=PWbZ9XIC5VocdpVpVFJP8TAtSJkYhYQOAYs-JE0STBo,69716
|
|
69
71
|
databricks/sdk/service/workspace.py,sha256=iss6wuYvMDSMrgwks0FuRRBeJSZFmWNOCkPIMJAzMgY,111868
|
|
70
|
-
databricks_sdk-0.
|
|
71
|
-
databricks_sdk-0.
|
|
72
|
-
databricks_sdk-0.
|
|
73
|
-
databricks_sdk-0.
|
|
74
|
-
databricks_sdk-0.
|
|
75
|
-
databricks_sdk-0.
|
|
72
|
+
databricks_sdk-0.64.0.dist-info/licenses/LICENSE,sha256=afBgTZo-JsYqj4VOjnejBetMuHKcFR30YobDdpVFkqY,11411
|
|
73
|
+
databricks_sdk-0.64.0.dist-info/licenses/NOTICE,sha256=tkRcQYA1k68wDLcnOWbg2xJDsUOJw8G8DGBhb8dnI3w,1588
|
|
74
|
+
databricks_sdk-0.64.0.dist-info/METADATA,sha256=ZcqjNGQKK9zVQnftUJU7axAeDYPVgmfKTd1AkHR72KQ,39397
|
|
75
|
+
databricks_sdk-0.64.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
76
|
+
databricks_sdk-0.64.0.dist-info/top_level.txt,sha256=7kRdatoSgU0EUurRQJ_3F1Nv4EOSHWAr6ng25tJOJKU,11
|
|
77
|
+
databricks_sdk-0.64.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|