databricks-sdk 0.63.0__py3-none-any.whl → 0.65.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/mixins/open_ai_client.py +55 -6
- 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 +7 -6
- databricks/sdk/service/dashboards.py +155 -6
- databricks/sdk/service/database.py +20 -0
- databricks/sdk/service/iam.py +3 -1
- databricks/sdk/service/jobs.py +57 -5
- databricks/sdk/service/ml.py +47 -47
- databricks/sdk/service/pipelines.py +130 -0
- databricks/sdk/service/serving.py +16 -0
- databricks/sdk/service/settings.py +69 -2
- 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 +82 -5
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.65.0.dist-info}/METADATA +2 -2
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.65.0.dist-info}/RECORD +26 -24
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.65.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.65.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.65.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.63.0.dist-info → databricks_sdk-0.65.0.dist-info}/top_level.txt +0 -0
|
@@ -45,7 +45,7 @@ class CleanRoom:
|
|
|
45
45
|
using the separate CreateCleanRoomOutputCatalog API."""
|
|
46
46
|
|
|
47
47
|
owner: Optional[str] = None
|
|
48
|
-
"""This is Databricks username of the owner of the local clean room securable for permission
|
|
48
|
+
"""This is the Databricks username of the owner of the local clean room securable for permission
|
|
49
49
|
management."""
|
|
50
50
|
|
|
51
51
|
remote_detailed_info: Optional[CleanRoomRemoteDetail] = None
|
|
@@ -358,7 +358,7 @@ class CleanRoomAssetNotebook:
|
|
|
358
358
|
"""All existing approvals or rejections"""
|
|
359
359
|
|
|
360
360
|
runner_collaborator_aliases: Optional[List[str]] = None
|
|
361
|
-
"""collaborators that can run the notebook"""
|
|
361
|
+
"""Aliases of collaborators that can run the notebook."""
|
|
362
362
|
|
|
363
363
|
def as_dict(self) -> dict:
|
|
364
364
|
"""Serializes the CleanRoomAssetNotebook into a dictionary suitable for use as a JSON request body."""
|
|
@@ -643,7 +643,7 @@ class CleanRoomCollaborator:
|
|
|
643
643
|
It is not restricted to these values and could change in the future"""
|
|
644
644
|
|
|
645
645
|
global_metastore_id: Optional[str] = None
|
|
646
|
-
"""The global Unity Catalog metastore
|
|
646
|
+
"""The global Unity Catalog metastore ID of the collaborator. The identifier is of format
|
|
647
647
|
cloud:region:metastore-uuid."""
|
|
648
648
|
|
|
649
649
|
invite_recipient_email: Optional[str] = None
|
|
@@ -1509,17 +1509,18 @@ class CleanRoomAssetsAPI:
|
|
|
1509
1509
|
clean_room_name: str,
|
|
1510
1510
|
asset_type: CleanRoomAssetAssetType,
|
|
1511
1511
|
name: str,
|
|
1512
|
-
|
|
1512
|
+
*,
|
|
1513
|
+
notebook_review: Optional[NotebookVersionReview] = None,
|
|
1513
1514
|
) -> CreateCleanRoomAssetReviewResponse:
|
|
1514
1515
|
"""Submit an asset review
|
|
1515
1516
|
|
|
1516
1517
|
:param clean_room_name: str
|
|
1517
1518
|
Name of the clean room
|
|
1518
1519
|
:param asset_type: :class:`CleanRoomAssetAssetType`
|
|
1519
|
-
Asset type. Can
|
|
1520
|
+
Asset type. Can either be NOTEBOOK_FILE or JAR_ANALYSIS.
|
|
1520
1521
|
:param name: str
|
|
1521
1522
|
Name of the asset
|
|
1522
|
-
:param notebook_review: :class:`NotebookVersionReview`
|
|
1523
|
+
:param notebook_review: :class:`NotebookVersionReview` (optional)
|
|
1523
1524
|
|
|
1524
1525
|
:returns: :class:`CreateCleanRoomAssetReviewResponse`
|
|
1525
1526
|
"""
|
|
@@ -413,6 +413,14 @@ class GenieConversationSummary:
|
|
|
413
413
|
)
|
|
414
414
|
|
|
415
415
|
|
|
416
|
+
class GenieFeedbackRating(Enum):
|
|
417
|
+
"""Feedback rating for Genie messages"""
|
|
418
|
+
|
|
419
|
+
NEGATIVE = "NEGATIVE"
|
|
420
|
+
NONE = "NONE"
|
|
421
|
+
POSITIVE = "POSITIVE"
|
|
422
|
+
|
|
423
|
+
|
|
416
424
|
@dataclass
|
|
417
425
|
class GenieGetMessageQueryResultResponse:
|
|
418
426
|
statement_response: Optional[sql.StatementResponse] = None
|
|
@@ -439,6 +447,38 @@ class GenieGetMessageQueryResultResponse:
|
|
|
439
447
|
return cls(statement_response=_from_dict(d, "statement_response", sql.StatementResponse))
|
|
440
448
|
|
|
441
449
|
|
|
450
|
+
@dataclass
|
|
451
|
+
class GenieListConversationMessagesResponse:
|
|
452
|
+
messages: Optional[List[GenieMessage]] = None
|
|
453
|
+
"""List of messages in the conversation."""
|
|
454
|
+
|
|
455
|
+
next_page_token: Optional[str] = None
|
|
456
|
+
"""The token to use for retrieving the next page of results."""
|
|
457
|
+
|
|
458
|
+
def as_dict(self) -> dict:
|
|
459
|
+
"""Serializes the GenieListConversationMessagesResponse into a dictionary suitable for use as a JSON request body."""
|
|
460
|
+
body = {}
|
|
461
|
+
if self.messages:
|
|
462
|
+
body["messages"] = [v.as_dict() for v in self.messages]
|
|
463
|
+
if self.next_page_token is not None:
|
|
464
|
+
body["next_page_token"] = self.next_page_token
|
|
465
|
+
return body
|
|
466
|
+
|
|
467
|
+
def as_shallow_dict(self) -> dict:
|
|
468
|
+
"""Serializes the GenieListConversationMessagesResponse into a shallow dictionary of its immediate attributes."""
|
|
469
|
+
body = {}
|
|
470
|
+
if self.messages:
|
|
471
|
+
body["messages"] = self.messages
|
|
472
|
+
if self.next_page_token is not None:
|
|
473
|
+
body["next_page_token"] = self.next_page_token
|
|
474
|
+
return body
|
|
475
|
+
|
|
476
|
+
@classmethod
|
|
477
|
+
def from_dict(cls, d: Dict[str, Any]) -> GenieListConversationMessagesResponse:
|
|
478
|
+
"""Deserializes the GenieListConversationMessagesResponse from a dictionary."""
|
|
479
|
+
return cls(messages=_repeated_dict(d, "messages", GenieMessage), next_page_token=d.get("next_page_token", None))
|
|
480
|
+
|
|
481
|
+
|
|
442
482
|
@dataclass
|
|
443
483
|
class GenieListConversationsResponse:
|
|
444
484
|
conversations: Optional[List[GenieConversationSummary]] = None
|
|
@@ -1630,6 +1670,29 @@ class GenieAPI:
|
|
|
1630
1670
|
|
|
1631
1671
|
self._api.do("DELETE", f"/api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}", headers=headers)
|
|
1632
1672
|
|
|
1673
|
+
def delete_conversation_message(self, space_id: str, conversation_id: str, message_id: str):
|
|
1674
|
+
"""Delete a conversation message.
|
|
1675
|
+
|
|
1676
|
+
:param space_id: str
|
|
1677
|
+
The ID associated with the Genie space where the message is located.
|
|
1678
|
+
:param conversation_id: str
|
|
1679
|
+
The ID associated with the conversation.
|
|
1680
|
+
:param message_id: str
|
|
1681
|
+
The ID associated with the message to delete.
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
"""
|
|
1685
|
+
|
|
1686
|
+
headers = {
|
|
1687
|
+
"Accept": "application/json",
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
self._api.do(
|
|
1691
|
+
"DELETE",
|
|
1692
|
+
f"/api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}",
|
|
1693
|
+
headers=headers,
|
|
1694
|
+
)
|
|
1695
|
+
|
|
1633
1696
|
def execute_message_attachment_query(
|
|
1634
1697
|
self, space_id: str, conversation_id: str, message_id: str, attachment_id: str
|
|
1635
1698
|
) -> GenieGetMessageQueryResultResponse:
|
|
@@ -1662,7 +1725,8 @@ class GenieAPI:
|
|
|
1662
1725
|
def execute_message_query(
|
|
1663
1726
|
self, space_id: str, conversation_id: str, message_id: str
|
|
1664
1727
|
) -> GenieGetMessageQueryResultResponse:
|
|
1665
|
-
"""
|
|
1728
|
+
"""DEPRECATED: Use [Execute Message Attachment Query](:method:genie/executemessageattachmentquery)
|
|
1729
|
+
instead.
|
|
1666
1730
|
|
|
1667
1731
|
:param space_id: str
|
|
1668
1732
|
Genie space ID
|
|
@@ -1741,8 +1805,8 @@ class GenieAPI:
|
|
|
1741
1805
|
def get_message_query_result(
|
|
1742
1806
|
self, space_id: str, conversation_id: str, message_id: str
|
|
1743
1807
|
) -> GenieGetMessageQueryResultResponse:
|
|
1744
|
-
"""
|
|
1745
|
-
|
|
1808
|
+
"""DEPRECATED: Use [Get Message Attachment Query Result](:method:genie/getmessageattachmentqueryresult)
|
|
1809
|
+
instead.
|
|
1746
1810
|
|
|
1747
1811
|
:param space_id: str
|
|
1748
1812
|
Genie space ID
|
|
@@ -1768,8 +1832,8 @@ class GenieAPI:
|
|
|
1768
1832
|
def get_message_query_result_by_attachment(
|
|
1769
1833
|
self, space_id: str, conversation_id: str, message_id: str, attachment_id: str
|
|
1770
1834
|
) -> GenieGetMessageQueryResultResponse:
|
|
1771
|
-
"""
|
|
1772
|
-
|
|
1835
|
+
"""DEPRECATED: Use [Get Message Attachment Query Result](:method:genie/getmessageattachmentqueryresult)
|
|
1836
|
+
instead.
|
|
1773
1837
|
|
|
1774
1838
|
:param space_id: str
|
|
1775
1839
|
Genie space ID
|
|
@@ -1810,13 +1874,55 @@ class GenieAPI:
|
|
|
1810
1874
|
res = self._api.do("GET", f"/api/2.0/genie/spaces/{space_id}", headers=headers)
|
|
1811
1875
|
return GenieSpace.from_dict(res)
|
|
1812
1876
|
|
|
1877
|
+
def list_conversation_messages(
|
|
1878
|
+
self, space_id: str, conversation_id: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
1879
|
+
) -> GenieListConversationMessagesResponse:
|
|
1880
|
+
"""List messages in a conversation
|
|
1881
|
+
|
|
1882
|
+
:param space_id: str
|
|
1883
|
+
The ID associated with the Genie space where the conversation is located
|
|
1884
|
+
:param conversation_id: str
|
|
1885
|
+
The ID of the conversation to list messages from
|
|
1886
|
+
:param page_size: int (optional)
|
|
1887
|
+
Maximum number of messages to return per page
|
|
1888
|
+
:param page_token: str (optional)
|
|
1889
|
+
Token to get the next page of results
|
|
1890
|
+
|
|
1891
|
+
:returns: :class:`GenieListConversationMessagesResponse`
|
|
1892
|
+
"""
|
|
1893
|
+
|
|
1894
|
+
query = {}
|
|
1895
|
+
if page_size is not None:
|
|
1896
|
+
query["page_size"] = page_size
|
|
1897
|
+
if page_token is not None:
|
|
1898
|
+
query["page_token"] = page_token
|
|
1899
|
+
headers = {
|
|
1900
|
+
"Accept": "application/json",
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
res = self._api.do(
|
|
1904
|
+
"GET",
|
|
1905
|
+
f"/api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages",
|
|
1906
|
+
query=query,
|
|
1907
|
+
headers=headers,
|
|
1908
|
+
)
|
|
1909
|
+
return GenieListConversationMessagesResponse.from_dict(res)
|
|
1910
|
+
|
|
1813
1911
|
def list_conversations(
|
|
1814
|
-
self,
|
|
1912
|
+
self,
|
|
1913
|
+
space_id: str,
|
|
1914
|
+
*,
|
|
1915
|
+
include_all: Optional[bool] = None,
|
|
1916
|
+
page_size: Optional[int] = None,
|
|
1917
|
+
page_token: Optional[str] = None,
|
|
1815
1918
|
) -> GenieListConversationsResponse:
|
|
1816
1919
|
"""Get a list of conversations in a Genie Space.
|
|
1817
1920
|
|
|
1818
1921
|
:param space_id: str
|
|
1819
1922
|
The ID of the Genie space to retrieve conversations from.
|
|
1923
|
+
:param include_all: bool (optional)
|
|
1924
|
+
Include all conversations in the space across all users. Requires "Can Manage" permission on the
|
|
1925
|
+
space.
|
|
1820
1926
|
:param page_size: int (optional)
|
|
1821
1927
|
Maximum number of conversations to return per page
|
|
1822
1928
|
:param page_token: str (optional)
|
|
@@ -1826,6 +1932,8 @@ class GenieAPI:
|
|
|
1826
1932
|
"""
|
|
1827
1933
|
|
|
1828
1934
|
query = {}
|
|
1935
|
+
if include_all is not None:
|
|
1936
|
+
query["include_all"] = include_all
|
|
1829
1937
|
if page_size is not None:
|
|
1830
1938
|
query["page_size"] = page_size
|
|
1831
1939
|
if page_token is not None:
|
|
@@ -1862,6 +1970,47 @@ class GenieAPI:
|
|
|
1862
1970
|
res = self._api.do("GET", "/api/2.0/genie/spaces", query=query, headers=headers)
|
|
1863
1971
|
return GenieListSpacesResponse.from_dict(res)
|
|
1864
1972
|
|
|
1973
|
+
def send_message_feedback(
|
|
1974
|
+
self,
|
|
1975
|
+
space_id: str,
|
|
1976
|
+
conversation_id: str,
|
|
1977
|
+
message_id: str,
|
|
1978
|
+
rating: GenieFeedbackRating,
|
|
1979
|
+
*,
|
|
1980
|
+
comment: Optional[str] = None,
|
|
1981
|
+
):
|
|
1982
|
+
"""Send feedback for a message.
|
|
1983
|
+
|
|
1984
|
+
:param space_id: str
|
|
1985
|
+
The ID associated with the Genie space where the message is located.
|
|
1986
|
+
:param conversation_id: str
|
|
1987
|
+
The ID associated with the conversation.
|
|
1988
|
+
:param message_id: str
|
|
1989
|
+
The ID associated with the message to provide feedback for.
|
|
1990
|
+
:param rating: :class:`GenieFeedbackRating`
|
|
1991
|
+
The rating (POSITIVE, NEGATIVE, or NONE).
|
|
1992
|
+
:param comment: str (optional)
|
|
1993
|
+
Optional text feedback that will be stored as a comment.
|
|
1994
|
+
|
|
1995
|
+
|
|
1996
|
+
"""
|
|
1997
|
+
body = {}
|
|
1998
|
+
if comment is not None:
|
|
1999
|
+
body["comment"] = comment
|
|
2000
|
+
if rating is not None:
|
|
2001
|
+
body["rating"] = rating.value
|
|
2002
|
+
headers = {
|
|
2003
|
+
"Accept": "application/json",
|
|
2004
|
+
"Content-Type": "application/json",
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
self._api.do(
|
|
2008
|
+
"POST",
|
|
2009
|
+
f"/api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/feedback",
|
|
2010
|
+
body=body,
|
|
2011
|
+
headers=headers,
|
|
2012
|
+
)
|
|
2013
|
+
|
|
1865
2014
|
def start_conversation(self, space_id: str, content: str) -> Wait[GenieMessage]:
|
|
1866
2015
|
"""Start a new conversation.
|
|
1867
2016
|
|
|
@@ -125,6 +125,13 @@ class DatabaseInstance:
|
|
|
125
125
|
creator: Optional[str] = None
|
|
126
126
|
"""The email of the creator of the instance."""
|
|
127
127
|
|
|
128
|
+
effective_enable_pg_native_login: Optional[bool] = None
|
|
129
|
+
"""xref AIP-129. `enable_pg_native_login` is owned by the client, while
|
|
130
|
+
`effective_enable_pg_native_login` is owned by the server. `enable_pg_native_login` will only be
|
|
131
|
+
set in Create/Update response messages if and only if the user provides the field via the
|
|
132
|
+
request. `effective_enable_pg_native_login` on the other hand will always bet set in all
|
|
133
|
+
response messages (Create/Update/Get/List)."""
|
|
134
|
+
|
|
128
135
|
effective_enable_readable_secondaries: Optional[bool] = None
|
|
129
136
|
"""xref AIP-129. `enable_readable_secondaries` is owned by the client, while
|
|
130
137
|
`effective_enable_readable_secondaries` is owned by the server. `enable_readable_secondaries`
|
|
@@ -151,6 +158,9 @@ class DatabaseInstance:
|
|
|
151
158
|
provides the field via the request. `effective_stopped` on the other hand will always bet set in
|
|
152
159
|
all response messages (Create/Update/Get/List)."""
|
|
153
160
|
|
|
161
|
+
enable_pg_native_login: Optional[bool] = None
|
|
162
|
+
"""Whether the instance has PG native password login enabled. Defaults to true."""
|
|
163
|
+
|
|
154
164
|
enable_readable_secondaries: Optional[bool] = None
|
|
155
165
|
"""Whether to enable secondaries to serve read-only traffic. Defaults to false."""
|
|
156
166
|
|
|
@@ -197,6 +207,8 @@ class DatabaseInstance:
|
|
|
197
207
|
body["creation_time"] = self.creation_time
|
|
198
208
|
if self.creator is not None:
|
|
199
209
|
body["creator"] = self.creator
|
|
210
|
+
if self.effective_enable_pg_native_login is not None:
|
|
211
|
+
body["effective_enable_pg_native_login"] = self.effective_enable_pg_native_login
|
|
200
212
|
if self.effective_enable_readable_secondaries is not None:
|
|
201
213
|
body["effective_enable_readable_secondaries"] = self.effective_enable_readable_secondaries
|
|
202
214
|
if self.effective_node_count is not None:
|
|
@@ -205,6 +217,8 @@ class DatabaseInstance:
|
|
|
205
217
|
body["effective_retention_window_in_days"] = self.effective_retention_window_in_days
|
|
206
218
|
if self.effective_stopped is not None:
|
|
207
219
|
body["effective_stopped"] = self.effective_stopped
|
|
220
|
+
if self.enable_pg_native_login is not None:
|
|
221
|
+
body["enable_pg_native_login"] = self.enable_pg_native_login
|
|
208
222
|
if self.enable_readable_secondaries is not None:
|
|
209
223
|
body["enable_readable_secondaries"] = self.enable_readable_secondaries
|
|
210
224
|
if self.name is not None:
|
|
@@ -240,6 +254,8 @@ class DatabaseInstance:
|
|
|
240
254
|
body["creation_time"] = self.creation_time
|
|
241
255
|
if self.creator is not None:
|
|
242
256
|
body["creator"] = self.creator
|
|
257
|
+
if self.effective_enable_pg_native_login is not None:
|
|
258
|
+
body["effective_enable_pg_native_login"] = self.effective_enable_pg_native_login
|
|
243
259
|
if self.effective_enable_readable_secondaries is not None:
|
|
244
260
|
body["effective_enable_readable_secondaries"] = self.effective_enable_readable_secondaries
|
|
245
261
|
if self.effective_node_count is not None:
|
|
@@ -248,6 +264,8 @@ class DatabaseInstance:
|
|
|
248
264
|
body["effective_retention_window_in_days"] = self.effective_retention_window_in_days
|
|
249
265
|
if self.effective_stopped is not None:
|
|
250
266
|
body["effective_stopped"] = self.effective_stopped
|
|
267
|
+
if self.enable_pg_native_login is not None:
|
|
268
|
+
body["enable_pg_native_login"] = self.enable_pg_native_login
|
|
251
269
|
if self.enable_readable_secondaries is not None:
|
|
252
270
|
body["enable_readable_secondaries"] = self.enable_readable_secondaries
|
|
253
271
|
if self.name is not None:
|
|
@@ -280,10 +298,12 @@ class DatabaseInstance:
|
|
|
280
298
|
child_instance_refs=_repeated_dict(d, "child_instance_refs", DatabaseInstanceRef),
|
|
281
299
|
creation_time=d.get("creation_time", None),
|
|
282
300
|
creator=d.get("creator", None),
|
|
301
|
+
effective_enable_pg_native_login=d.get("effective_enable_pg_native_login", None),
|
|
283
302
|
effective_enable_readable_secondaries=d.get("effective_enable_readable_secondaries", None),
|
|
284
303
|
effective_node_count=d.get("effective_node_count", None),
|
|
285
304
|
effective_retention_window_in_days=d.get("effective_retention_window_in_days", None),
|
|
286
305
|
effective_stopped=d.get("effective_stopped", None),
|
|
306
|
+
enable_pg_native_login=d.get("enable_pg_native_login", None),
|
|
287
307
|
enable_readable_secondaries=d.get("enable_readable_secondaries", None),
|
|
288
308
|
name=d.get("name", None),
|
|
289
309
|
node_count=d.get("node_count", None),
|
databricks/sdk/service/iam.py
CHANGED
|
@@ -2193,7 +2193,9 @@ class AccountGroupsAPI:
|
|
|
2193
2193
|
sort_order: Optional[ListSortOrder] = None,
|
|
2194
2194
|
start_index: Optional[int] = None,
|
|
2195
2195
|
) -> Iterator[Group]:
|
|
2196
|
-
"""Gets all details of the groups associated with the Databricks account.
|
|
2196
|
+
"""Gets all details of the groups associated with the Databricks account. As of 08/22/2025, this endpoint
|
|
2197
|
+
will not return members. Instead, members should be retrieved by iterating through `Get group
|
|
2198
|
+
details`.
|
|
2197
2199
|
|
|
2198
2200
|
:param attributes: str (optional)
|
|
2199
2201
|
Comma-separated list of attributes to return in response.
|
databricks/sdk/service/jobs.py
CHANGED
|
@@ -42,6 +42,9 @@ class BaseJob:
|
|
|
42
42
|
Jobs UI in the job details page and Jobs API using `budget_policy_id` 3. Inferred default based
|
|
43
43
|
on accessible budget policies of the run_as identity on job creation or modification."""
|
|
44
44
|
|
|
45
|
+
effective_usage_policy_id: Optional[str] = None
|
|
46
|
+
"""The id of the usage policy used by this job for cost attribution purposes."""
|
|
47
|
+
|
|
45
48
|
has_more: Optional[bool] = None
|
|
46
49
|
"""Indicates if the job has more array properties (`tasks`, `job_clusters`) that are not shown.
|
|
47
50
|
They can be accessed via :method:jobs/get endpoint. It is only relevant for API 2.2
|
|
@@ -66,6 +69,8 @@ class BaseJob:
|
|
|
66
69
|
body["creator_user_name"] = self.creator_user_name
|
|
67
70
|
if self.effective_budget_policy_id is not None:
|
|
68
71
|
body["effective_budget_policy_id"] = self.effective_budget_policy_id
|
|
72
|
+
if self.effective_usage_policy_id is not None:
|
|
73
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
69
74
|
if self.has_more is not None:
|
|
70
75
|
body["has_more"] = self.has_more
|
|
71
76
|
if self.job_id is not None:
|
|
@@ -85,6 +90,8 @@ class BaseJob:
|
|
|
85
90
|
body["creator_user_name"] = self.creator_user_name
|
|
86
91
|
if self.effective_budget_policy_id is not None:
|
|
87
92
|
body["effective_budget_policy_id"] = self.effective_budget_policy_id
|
|
93
|
+
if self.effective_usage_policy_id is not None:
|
|
94
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
88
95
|
if self.has_more is not None:
|
|
89
96
|
body["has_more"] = self.has_more
|
|
90
97
|
if self.job_id is not None:
|
|
@@ -102,6 +109,7 @@ class BaseJob:
|
|
|
102
109
|
created_time=d.get("created_time", None),
|
|
103
110
|
creator_user_name=d.get("creator_user_name", None),
|
|
104
111
|
effective_budget_policy_id=d.get("effective_budget_policy_id", None),
|
|
112
|
+
effective_usage_policy_id=d.get("effective_usage_policy_id", None),
|
|
105
113
|
has_more=d.get("has_more", None),
|
|
106
114
|
job_id=d.get("job_id", None),
|
|
107
115
|
settings=_from_dict(d, "settings", JobSettings),
|
|
@@ -147,6 +155,9 @@ class BaseRun:
|
|
|
147
155
|
`PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times through rapid scaling and
|
|
148
156
|
optimized cluster performance."""
|
|
149
157
|
|
|
158
|
+
effective_usage_policy_id: Optional[str] = None
|
|
159
|
+
"""The id of the usage policy used by this run for cost attribution purposes."""
|
|
160
|
+
|
|
150
161
|
end_time: Optional[int] = None
|
|
151
162
|
"""The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
|
|
152
163
|
field is set to 0 if the job is still running."""
|
|
@@ -267,6 +278,8 @@ class BaseRun:
|
|
|
267
278
|
body["description"] = self.description
|
|
268
279
|
if self.effective_performance_target is not None:
|
|
269
280
|
body["effective_performance_target"] = self.effective_performance_target.value
|
|
281
|
+
if self.effective_usage_policy_id is not None:
|
|
282
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
270
283
|
if self.end_time is not None:
|
|
271
284
|
body["end_time"] = self.end_time
|
|
272
285
|
if self.execution_duration is not None:
|
|
@@ -338,6 +351,8 @@ class BaseRun:
|
|
|
338
351
|
body["description"] = self.description
|
|
339
352
|
if self.effective_performance_target is not None:
|
|
340
353
|
body["effective_performance_target"] = self.effective_performance_target
|
|
354
|
+
if self.effective_usage_policy_id is not None:
|
|
355
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
341
356
|
if self.end_time is not None:
|
|
342
357
|
body["end_time"] = self.end_time
|
|
343
358
|
if self.execution_duration is not None:
|
|
@@ -403,6 +418,7 @@ class BaseRun:
|
|
|
403
418
|
creator_user_name=d.get("creator_user_name", None),
|
|
404
419
|
description=d.get("description", None),
|
|
405
420
|
effective_performance_target=_enum(d, "effective_performance_target", PerformanceTarget),
|
|
421
|
+
effective_usage_policy_id=d.get("effective_usage_policy_id", None),
|
|
406
422
|
end_time=d.get("end_time", None),
|
|
407
423
|
execution_duration=d.get("execution_duration", None),
|
|
408
424
|
git_source=_from_dict(d, "git_source", GitSource),
|
|
@@ -857,11 +873,16 @@ class Continuous:
|
|
|
857
873
|
pause_status: Optional[PauseStatus] = None
|
|
858
874
|
"""Indicate whether the continuous execution of the job is paused or not. Defaults to UNPAUSED."""
|
|
859
875
|
|
|
876
|
+
task_retry_mode: Optional[TaskRetryMode] = None
|
|
877
|
+
"""Indicate whether the continuous job is applying task level retries or not. Defaults to NEVER."""
|
|
878
|
+
|
|
860
879
|
def as_dict(self) -> dict:
|
|
861
880
|
"""Serializes the Continuous into a dictionary suitable for use as a JSON request body."""
|
|
862
881
|
body = {}
|
|
863
882
|
if self.pause_status is not None:
|
|
864
883
|
body["pause_status"] = self.pause_status.value
|
|
884
|
+
if self.task_retry_mode is not None:
|
|
885
|
+
body["task_retry_mode"] = self.task_retry_mode.value
|
|
865
886
|
return body
|
|
866
887
|
|
|
867
888
|
def as_shallow_dict(self) -> dict:
|
|
@@ -869,12 +890,17 @@ class Continuous:
|
|
|
869
890
|
body = {}
|
|
870
891
|
if self.pause_status is not None:
|
|
871
892
|
body["pause_status"] = self.pause_status
|
|
893
|
+
if self.task_retry_mode is not None:
|
|
894
|
+
body["task_retry_mode"] = self.task_retry_mode
|
|
872
895
|
return body
|
|
873
896
|
|
|
874
897
|
@classmethod
|
|
875
898
|
def from_dict(cls, d: Dict[str, Any]) -> Continuous:
|
|
876
899
|
"""Deserializes the Continuous from a dictionary."""
|
|
877
|
-
return cls(
|
|
900
|
+
return cls(
|
|
901
|
+
pause_status=_enum(d, "pause_status", PauseStatus),
|
|
902
|
+
task_retry_mode=_enum(d, "task_retry_mode", TaskRetryMode),
|
|
903
|
+
)
|
|
878
904
|
|
|
879
905
|
|
|
880
906
|
@dataclass
|
|
@@ -2212,6 +2238,9 @@ class Job:
|
|
|
2212
2238
|
Jobs UI in the job details page and Jobs API using `budget_policy_id` 3. Inferred default based
|
|
2213
2239
|
on accessible budget policies of the run_as identity on job creation or modification."""
|
|
2214
2240
|
|
|
2241
|
+
effective_usage_policy_id: Optional[str] = None
|
|
2242
|
+
"""The id of the usage policy used by this job for cost attribution purposes."""
|
|
2243
|
+
|
|
2215
2244
|
has_more: Optional[bool] = None
|
|
2216
2245
|
"""Indicates if the job has more array properties (`tasks`, `job_clusters`) that are not shown.
|
|
2217
2246
|
They can be accessed via :method:jobs/get endpoint. It is only relevant for API 2.2
|
|
@@ -2248,6 +2277,8 @@ class Job:
|
|
|
2248
2277
|
body["creator_user_name"] = self.creator_user_name
|
|
2249
2278
|
if self.effective_budget_policy_id is not None:
|
|
2250
2279
|
body["effective_budget_policy_id"] = self.effective_budget_policy_id
|
|
2280
|
+
if self.effective_usage_policy_id is not None:
|
|
2281
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
2251
2282
|
if self.has_more is not None:
|
|
2252
2283
|
body["has_more"] = self.has_more
|
|
2253
2284
|
if self.job_id is not None:
|
|
@@ -2271,6 +2302,8 @@ class Job:
|
|
|
2271
2302
|
body["creator_user_name"] = self.creator_user_name
|
|
2272
2303
|
if self.effective_budget_policy_id is not None:
|
|
2273
2304
|
body["effective_budget_policy_id"] = self.effective_budget_policy_id
|
|
2305
|
+
if self.effective_usage_policy_id is not None:
|
|
2306
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
2274
2307
|
if self.has_more is not None:
|
|
2275
2308
|
body["has_more"] = self.has_more
|
|
2276
2309
|
if self.job_id is not None:
|
|
@@ -2292,6 +2325,7 @@ class Job:
|
|
|
2292
2325
|
created_time=d.get("created_time", None),
|
|
2293
2326
|
creator_user_name=d.get("creator_user_name", None),
|
|
2294
2327
|
effective_budget_policy_id=d.get("effective_budget_policy_id", None),
|
|
2328
|
+
effective_usage_policy_id=d.get("effective_usage_policy_id", None),
|
|
2295
2329
|
has_more=d.get("has_more", None),
|
|
2296
2330
|
job_id=d.get("job_id", None),
|
|
2297
2331
|
next_page_token=d.get("next_page_token", None),
|
|
@@ -3039,8 +3073,8 @@ class JobSettings:
|
|
|
3039
3073
|
|
|
3040
3074
|
usage_policy_id: Optional[str] = None
|
|
3041
3075
|
"""The id of the user specified usage policy to use for this job. If not specified, a default usage
|
|
3042
|
-
policy may be applied when creating or modifying the job. See `
|
|
3043
|
-
the
|
|
3076
|
+
policy may be applied when creating or modifying the job. See `effective_usage_policy_id` for
|
|
3077
|
+
the usage policy used by this workload."""
|
|
3044
3078
|
|
|
3045
3079
|
webhook_notifications: Optional[WebhookNotifications] = None
|
|
3046
3080
|
"""A collection of system notification IDs to notify when runs of this job begin or complete."""
|
|
@@ -4509,6 +4543,9 @@ class Run:
|
|
|
4509
4543
|
`PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times through rapid scaling and
|
|
4510
4544
|
optimized cluster performance."""
|
|
4511
4545
|
|
|
4546
|
+
effective_usage_policy_id: Optional[str] = None
|
|
4547
|
+
"""The id of the usage policy used by this run for cost attribution purposes."""
|
|
4548
|
+
|
|
4512
4549
|
end_time: Optional[int] = None
|
|
4513
4550
|
"""The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
|
|
4514
4551
|
field is set to 0 if the job is still running."""
|
|
@@ -4635,6 +4672,8 @@ class Run:
|
|
|
4635
4672
|
body["description"] = self.description
|
|
4636
4673
|
if self.effective_performance_target is not None:
|
|
4637
4674
|
body["effective_performance_target"] = self.effective_performance_target.value
|
|
4675
|
+
if self.effective_usage_policy_id is not None:
|
|
4676
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
4638
4677
|
if self.end_time is not None:
|
|
4639
4678
|
body["end_time"] = self.end_time
|
|
4640
4679
|
if self.execution_duration is not None:
|
|
@@ -4710,6 +4749,8 @@ class Run:
|
|
|
4710
4749
|
body["description"] = self.description
|
|
4711
4750
|
if self.effective_performance_target is not None:
|
|
4712
4751
|
body["effective_performance_target"] = self.effective_performance_target
|
|
4752
|
+
if self.effective_usage_policy_id is not None:
|
|
4753
|
+
body["effective_usage_policy_id"] = self.effective_usage_policy_id
|
|
4713
4754
|
if self.end_time is not None:
|
|
4714
4755
|
body["end_time"] = self.end_time
|
|
4715
4756
|
if self.execution_duration is not None:
|
|
@@ -4779,6 +4820,7 @@ class Run:
|
|
|
4779
4820
|
creator_user_name=d.get("creator_user_name", None),
|
|
4780
4821
|
description=d.get("description", None),
|
|
4781
4822
|
effective_performance_target=_enum(d, "effective_performance_target", PerformanceTarget),
|
|
4823
|
+
effective_usage_policy_id=d.get("effective_usage_policy_id", None),
|
|
4782
4824
|
end_time=d.get("end_time", None),
|
|
4783
4825
|
execution_duration=d.get("execution_duration", None),
|
|
4784
4826
|
git_source=_from_dict(d, "git_source", GitSource),
|
|
@@ -7859,6 +7901,16 @@ class TaskNotificationSettings:
|
|
|
7859
7901
|
)
|
|
7860
7902
|
|
|
7861
7903
|
|
|
7904
|
+
class TaskRetryMode(Enum):
|
|
7905
|
+
"""task retry mode of the continuous job * NEVER: The failed task will not be retried. *
|
|
7906
|
+
ON_FAILURE: Retry a failed task if at least one other task in the job is still running its first
|
|
7907
|
+
attempt. When this condition is no longer met or the retry limit is reached, the job run is
|
|
7908
|
+
cancelled and a new run is started."""
|
|
7909
|
+
|
|
7910
|
+
NEVER = "NEVER"
|
|
7911
|
+
ON_FAILURE = "ON_FAILURE"
|
|
7912
|
+
|
|
7913
|
+
|
|
7862
7914
|
class TerminationCodeCode(Enum):
|
|
7863
7915
|
"""The code indicates why the run was terminated. Additional codes might be introduced in future
|
|
7864
7916
|
releases. * `SUCCESS`: The run was completed successfully. * `SUCCESS_WITH_FAILURES`: The run
|
|
@@ -8546,8 +8598,8 @@ class JobsAPI:
|
|
|
8546
8598
|
`runNow`.
|
|
8547
8599
|
:param usage_policy_id: str (optional)
|
|
8548
8600
|
The id of the user specified usage policy to use for this job. If not specified, a default usage
|
|
8549
|
-
policy may be applied when creating or modifying the job. See `
|
|
8550
|
-
|
|
8601
|
+
policy may be applied when creating or modifying the job. See `effective_usage_policy_id` for the
|
|
8602
|
+
usage policy used by this workload.
|
|
8551
8603
|
:param webhook_notifications: :class:`WebhookNotifications` (optional)
|
|
8552
8604
|
A collection of system notification IDs to notify when runs of this job begin or complete.
|
|
8553
8605
|
|