databricks-sdk 0.56.0__py3-none-any.whl → 0.58.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 +38 -11
- databricks/sdk/service/aibuilder.py +122 -17
- databricks/sdk/service/apps.py +15 -45
- databricks/sdk/service/billing.py +70 -74
- databricks/sdk/service/catalog.py +1898 -557
- databricks/sdk/service/cleanrooms.py +14 -55
- databricks/sdk/service/compute.py +305 -508
- databricks/sdk/service/dashboards.py +148 -223
- databricks/sdk/service/database.py +657 -127
- databricks/sdk/service/files.py +18 -54
- databricks/sdk/service/iam.py +55 -165
- databricks/sdk/service/jobs.py +238 -214
- databricks/sdk/service/marketplace.py +47 -146
- databricks/sdk/service/ml.py +1137 -447
- databricks/sdk/service/oauth2.py +17 -46
- databricks/sdk/service/pipelines.py +93 -69
- databricks/sdk/service/provisioning.py +34 -212
- databricks/sdk/service/qualitymonitorv2.py +5 -33
- databricks/sdk/service/serving.py +69 -55
- databricks/sdk/service/settings.py +106 -434
- databricks/sdk/service/sharing.py +33 -95
- databricks/sdk/service/sql.py +164 -254
- databricks/sdk/service/vectorsearch.py +13 -62
- databricks/sdk/service/workspace.py +36 -110
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/RECORD +31 -31
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/top_level.txt +0 -0
|
@@ -863,24 +863,6 @@ class DeleteBudgetConfigurationResponse:
|
|
|
863
863
|
return cls()
|
|
864
864
|
|
|
865
865
|
|
|
866
|
-
@dataclass
|
|
867
|
-
class DeleteResponse:
|
|
868
|
-
def as_dict(self) -> dict:
|
|
869
|
-
"""Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body."""
|
|
870
|
-
body = {}
|
|
871
|
-
return body
|
|
872
|
-
|
|
873
|
-
def as_shallow_dict(self) -> dict:
|
|
874
|
-
"""Serializes the DeleteResponse into a shallow dictionary of its immediate attributes."""
|
|
875
|
-
body = {}
|
|
876
|
-
return body
|
|
877
|
-
|
|
878
|
-
@classmethod
|
|
879
|
-
def from_dict(cls, d: Dict[str, Any]) -> DeleteResponse:
|
|
880
|
-
"""Deserializes the DeleteResponse from a dictionary."""
|
|
881
|
-
return cls()
|
|
882
|
-
|
|
883
|
-
|
|
884
866
|
class DeliveryStatus(Enum):
|
|
885
867
|
"""* The status string for log delivery. Possible values are: `CREATED`: There were no log delivery
|
|
886
868
|
attempts since the config was created. `SUCCEEDED`: The latest attempt of log delivery has
|
|
@@ -1626,7 +1608,6 @@ class WrappedCreateLogDeliveryConfiguration:
|
|
|
1626
1608
|
"""* Properties of the new log delivery configuration."""
|
|
1627
1609
|
|
|
1628
1610
|
log_delivery_configuration: CreateLogDeliveryConfigurationParams
|
|
1629
|
-
"""* Log Delivery Configuration"""
|
|
1630
1611
|
|
|
1631
1612
|
def as_dict(self) -> dict:
|
|
1632
1613
|
"""Serializes the WrappedCreateLogDeliveryConfiguration into a dictionary suitable for use as a JSON request body."""
|
|
@@ -1719,9 +1700,7 @@ class BillableUsageAPI:
|
|
|
1719
1700
|
self._api = api_client
|
|
1720
1701
|
|
|
1721
1702
|
def download(self, start_month: str, end_month: str, *, personal_data: Optional[bool] = None) -> DownloadResponse:
|
|
1722
|
-
"""
|
|
1723
|
-
|
|
1724
|
-
Returns billable usage logs in CSV format for the specified account and date range. For the data
|
|
1703
|
+
"""Returns billable usage logs in CSV format for the specified account and date range. For the data
|
|
1725
1704
|
schema, see [CSV file schema]. Note that this method might take multiple minutes to complete.
|
|
1726
1705
|
|
|
1727
1706
|
**Warning**: Depending on the queried date range, the number of workspaces in the account, the size of
|
|
@@ -1766,9 +1745,7 @@ class BudgetPolicyAPI:
|
|
|
1766
1745
|
self._api = api_client
|
|
1767
1746
|
|
|
1768
1747
|
def create(self, *, policy: Optional[BudgetPolicy] = None, request_id: Optional[str] = None) -> BudgetPolicy:
|
|
1769
|
-
"""
|
|
1770
|
-
|
|
1771
|
-
Creates a new policy.
|
|
1748
|
+
"""Creates a new policy.
|
|
1772
1749
|
|
|
1773
1750
|
:param policy: :class:`BudgetPolicy` (optional)
|
|
1774
1751
|
The policy to create. `policy_id` needs to be empty as it will be generated `policy_name` must be
|
|
@@ -1796,9 +1773,7 @@ class BudgetPolicyAPI:
|
|
|
1796
1773
|
return BudgetPolicy.from_dict(res)
|
|
1797
1774
|
|
|
1798
1775
|
def delete(self, policy_id: str):
|
|
1799
|
-
"""
|
|
1800
|
-
|
|
1801
|
-
Deletes a policy
|
|
1776
|
+
"""Deletes a policy
|
|
1802
1777
|
|
|
1803
1778
|
:param policy_id: str
|
|
1804
1779
|
The Id of the policy.
|
|
@@ -1813,9 +1788,7 @@ class BudgetPolicyAPI:
|
|
|
1813
1788
|
self._api.do("DELETE", f"/api/2.1/accounts/{self._api.account_id}/budget-policies/{policy_id}", headers=headers)
|
|
1814
1789
|
|
|
1815
1790
|
def get(self, policy_id: str) -> BudgetPolicy:
|
|
1816
|
-
"""
|
|
1817
|
-
|
|
1818
|
-
Retrieves a policy by it's ID.
|
|
1791
|
+
"""Retrieves a policy by it's ID.
|
|
1819
1792
|
|
|
1820
1793
|
:param policy_id: str
|
|
1821
1794
|
The Id of the policy.
|
|
@@ -1840,9 +1813,7 @@ class BudgetPolicyAPI:
|
|
|
1840
1813
|
page_token: Optional[str] = None,
|
|
1841
1814
|
sort_spec: Optional[SortSpec] = None,
|
|
1842
1815
|
) -> Iterator[BudgetPolicy]:
|
|
1843
|
-
"""
|
|
1844
|
-
|
|
1845
|
-
Lists all policies. Policies are returned in the alphabetically ascending order of their names.
|
|
1816
|
+
"""Lists all policies. Policies are returned in the alphabetically ascending order of their names.
|
|
1846
1817
|
|
|
1847
1818
|
:param filter_by: :class:`Filter` (optional)
|
|
1848
1819
|
A filter to apply to the list of policies.
|
|
@@ -1888,14 +1859,13 @@ class BudgetPolicyAPI:
|
|
|
1888
1859
|
def update(
|
|
1889
1860
|
self, policy_id: str, policy: BudgetPolicy, *, limit_config: Optional[LimitConfig] = None
|
|
1890
1861
|
) -> BudgetPolicy:
|
|
1891
|
-
"""
|
|
1892
|
-
|
|
1893
|
-
Updates a policy
|
|
1862
|
+
"""Updates a policy
|
|
1894
1863
|
|
|
1895
1864
|
:param policy_id: str
|
|
1896
1865
|
The Id of the policy. This field is generated by Databricks and globally unique.
|
|
1897
1866
|
:param policy: :class:`BudgetPolicy`
|
|
1898
|
-
|
|
1867
|
+
The policy to update. `creator_user_id` cannot be specified in the request. All other fields must be
|
|
1868
|
+
specified even if not changed. The `policy_id` is used to identify the policy to update.
|
|
1899
1869
|
:param limit_config: :class:`LimitConfig` (optional)
|
|
1900
1870
|
DEPRECATED. This is redundant field as LimitConfig is part of the BudgetPolicy
|
|
1901
1871
|
|
|
@@ -1929,9 +1899,7 @@ class BudgetsAPI:
|
|
|
1929
1899
|
self._api = api_client
|
|
1930
1900
|
|
|
1931
1901
|
def create(self, budget: CreateBudgetConfigurationBudget) -> CreateBudgetConfigurationResponse:
|
|
1932
|
-
"""Create new budget.
|
|
1933
|
-
|
|
1934
|
-
Create a new budget configuration for an account. For full details, see
|
|
1902
|
+
"""Create a new budget configuration for an account. For full details, see
|
|
1935
1903
|
https://docs.databricks.com/en/admin/account-settings/budgets.html.
|
|
1936
1904
|
|
|
1937
1905
|
:param budget: :class:`CreateBudgetConfigurationBudget`
|
|
@@ -1951,9 +1919,7 @@ class BudgetsAPI:
|
|
|
1951
1919
|
return CreateBudgetConfigurationResponse.from_dict(res)
|
|
1952
1920
|
|
|
1953
1921
|
def delete(self, budget_id: str):
|
|
1954
|
-
"""
|
|
1955
|
-
|
|
1956
|
-
Deletes a budget configuration for an account. Both account and budget configuration are specified by
|
|
1922
|
+
"""Deletes a budget configuration for an account. Both account and budget configuration are specified by
|
|
1957
1923
|
ID. This cannot be undone.
|
|
1958
1924
|
|
|
1959
1925
|
:param budget_id: str
|
|
@@ -1969,9 +1935,7 @@ class BudgetsAPI:
|
|
|
1969
1935
|
self._api.do("DELETE", f"/api/2.1/accounts/{self._api.account_id}/budgets/{budget_id}", headers=headers)
|
|
1970
1936
|
|
|
1971
1937
|
def get(self, budget_id: str) -> GetBudgetConfigurationResponse:
|
|
1972
|
-
"""
|
|
1973
|
-
|
|
1974
|
-
Gets a budget configuration for an account. Both account and budget configuration are specified by ID.
|
|
1938
|
+
"""Gets a budget configuration for an account. Both account and budget configuration are specified by ID.
|
|
1975
1939
|
|
|
1976
1940
|
:param budget_id: str
|
|
1977
1941
|
The budget configuration ID
|
|
@@ -1987,9 +1951,7 @@ class BudgetsAPI:
|
|
|
1987
1951
|
return GetBudgetConfigurationResponse.from_dict(res)
|
|
1988
1952
|
|
|
1989
1953
|
def list(self, *, page_token: Optional[str] = None) -> Iterator[BudgetConfiguration]:
|
|
1990
|
-
"""
|
|
1991
|
-
|
|
1992
|
-
Gets all budgets associated with this account.
|
|
1954
|
+
"""Gets all budgets associated with this account.
|
|
1993
1955
|
|
|
1994
1956
|
:param page_token: str (optional)
|
|
1995
1957
|
A page token received from a previous get all budget configurations call. This token can be used to
|
|
@@ -2017,9 +1979,7 @@ class BudgetsAPI:
|
|
|
2017
1979
|
query["page_token"] = json["next_page_token"]
|
|
2018
1980
|
|
|
2019
1981
|
def update(self, budget_id: str, budget: UpdateBudgetConfigurationBudget) -> UpdateBudgetConfigurationResponse:
|
|
2020
|
-
"""
|
|
2021
|
-
|
|
2022
|
-
Updates a budget configuration for an account. Both account and budget configuration are specified by
|
|
1982
|
+
"""Updates a budget configuration for an account. Both account and budget configuration are specified by
|
|
2023
1983
|
ID.
|
|
2024
1984
|
|
|
2025
1985
|
:param budget_id: str
|
|
@@ -2044,8 +2004,57 @@ class BudgetsAPI:
|
|
|
2044
2004
|
|
|
2045
2005
|
|
|
2046
2006
|
class LogDeliveryAPI:
|
|
2047
|
-
"""These APIs manage
|
|
2048
|
-
|
|
2007
|
+
"""These APIs manage log delivery configurations for this account. The two supported log types for this API
|
|
2008
|
+
are _billable usage logs_ and _audit logs_. This feature is in Public Preview. This feature works with all
|
|
2009
|
+
account ID types.
|
|
2010
|
+
|
|
2011
|
+
Log delivery works with all account types. However, if your account is on the E2 version of the platform
|
|
2012
|
+
or on a select custom plan that allows multiple workspaces per account, you can optionally configure
|
|
2013
|
+
different storage destinations for each workspace. Log delivery status is also provided to know the latest
|
|
2014
|
+
status of log delivery attempts.
|
|
2015
|
+
|
|
2016
|
+
The high-level flow of billable usage delivery:
|
|
2017
|
+
|
|
2018
|
+
1. **Create storage**: In AWS, [create a new AWS S3 bucket] with a specific bucket policy. Using
|
|
2019
|
+
Databricks APIs, call the Account API to create a [storage configuration object](:method:Storage/Create)
|
|
2020
|
+
that uses the bucket name.
|
|
2021
|
+
|
|
2022
|
+
2. **Create credentials**: In AWS, create the appropriate AWS IAM role. For full details, including the
|
|
2023
|
+
required IAM role policies and trust relationship, see [Billable usage log delivery]. Using Databricks
|
|
2024
|
+
APIs, call the Account API to create a [credential configuration object](:method:Credentials/Create) that
|
|
2025
|
+
uses the IAM role's ARN.
|
|
2026
|
+
|
|
2027
|
+
3. **Create log delivery configuration**: Using Databricks APIs, call the Account API to [create a log
|
|
2028
|
+
delivery configuration](:method:LogDelivery/Create) that uses the credential and storage configuration
|
|
2029
|
+
objects from previous steps. You can specify if the logs should include all events of that log type in
|
|
2030
|
+
your account (_Account level_ delivery) or only events for a specific set of workspaces (_workspace level_
|
|
2031
|
+
delivery). Account level log delivery applies to all current and future workspaces plus account level
|
|
2032
|
+
logs, while workspace level log delivery solely delivers logs related to the specified workspaces. You can
|
|
2033
|
+
create multiple types of delivery configurations per account.
|
|
2034
|
+
|
|
2035
|
+
For billable usage delivery: * For more information about billable usage logs, see [Billable usage log
|
|
2036
|
+
delivery]. For the CSV schema, see the [Usage page]. * The delivery location is
|
|
2037
|
+
`<bucket-name>/<prefix>/billable-usage/csv/`, where `<prefix>` is the name of the optional delivery path
|
|
2038
|
+
prefix you set up during log delivery configuration. Files are named
|
|
2039
|
+
`workspaceId=<workspace-id>-usageMonth=<month>.csv`. * All billable usage logs apply to specific
|
|
2040
|
+
workspaces (_workspace level_ logs). You can aggregate usage for your entire account by creating an
|
|
2041
|
+
_account level_ delivery configuration that delivers logs for all current and future workspaces in your
|
|
2042
|
+
account. * The files are delivered daily by overwriting the month's CSV file for each workspace.
|
|
2043
|
+
|
|
2044
|
+
For audit log delivery: * For more information about about audit log delivery, see [Audit log delivery],
|
|
2045
|
+
which includes information about the used JSON schema. * The delivery location is
|
|
2046
|
+
`<bucket-name>/<delivery-path-prefix>/workspaceId=<workspaceId>/date=<yyyy-mm-dd>/auditlogs_<internal-id>.json`.
|
|
2047
|
+
Files may get overwritten with the same content multiple times to achieve exactly-once delivery. * If the
|
|
2048
|
+
audit log delivery configuration included specific workspace IDs, only _workspace-level_ audit logs for
|
|
2049
|
+
those workspaces are delivered. If the log delivery configuration applies to the entire account (_account
|
|
2050
|
+
level_ delivery configuration), the audit log delivery includes workspace-level audit logs for all
|
|
2051
|
+
workspaces in the account as well as account-level audit logs. See [Audit log delivery] for details. *
|
|
2052
|
+
Auditable events are typically available in logs within 15 minutes.
|
|
2053
|
+
|
|
2054
|
+
[Audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
|
|
2055
|
+
[Billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
|
|
2056
|
+
[Usage page]: https://docs.databricks.com/administration-guide/account-settings/usage.html
|
|
2057
|
+
[create a new AWS S3 bucket]: https://docs.databricks.com/administration-guide/account-api/aws-storage.html"""
|
|
2049
2058
|
|
|
2050
2059
|
def __init__(self, api_client):
|
|
2051
2060
|
self._api = api_client
|
|
@@ -2053,9 +2062,7 @@ class LogDeliveryAPI:
|
|
|
2053
2062
|
def create(
|
|
2054
2063
|
self, log_delivery_configuration: CreateLogDeliveryConfigurationParams
|
|
2055
2064
|
) -> WrappedLogDeliveryConfiguration:
|
|
2056
|
-
"""
|
|
2057
|
-
|
|
2058
|
-
Creates a new Databricks log delivery configuration to enable delivery of the specified type of logs
|
|
2065
|
+
"""Creates a new Databricks log delivery configuration to enable delivery of the specified type of logs
|
|
2059
2066
|
to your storage location. This requires that you already created a [credential
|
|
2060
2067
|
object](:method:Credentials/Create) (which encapsulates a cross-account service IAM role) and a
|
|
2061
2068
|
[storage configuration object](:method:Storage/Create) (which encapsulates an S3 bucket).
|
|
@@ -2077,7 +2084,6 @@ class LogDeliveryAPI:
|
|
|
2077
2084
|
[Deliver and access billable usage logs]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
|
|
2078
2085
|
|
|
2079
2086
|
:param log_delivery_configuration: :class:`CreateLogDeliveryConfigurationParams`
|
|
2080
|
-
* Log Delivery Configuration
|
|
2081
2087
|
|
|
2082
2088
|
:returns: :class:`WrappedLogDeliveryConfiguration`
|
|
2083
2089
|
"""
|
|
@@ -2093,9 +2099,7 @@ class LogDeliveryAPI:
|
|
|
2093
2099
|
return WrappedLogDeliveryConfiguration.from_dict(res)
|
|
2094
2100
|
|
|
2095
2101
|
def get(self, log_delivery_configuration_id: str) -> GetLogDeliveryConfigurationResponse:
|
|
2096
|
-
"""
|
|
2097
|
-
|
|
2098
|
-
Gets a Databricks log delivery configuration object for an account, both specified by ID.
|
|
2102
|
+
"""Gets a Databricks log delivery configuration object for an account, both specified by ID.
|
|
2099
2103
|
|
|
2100
2104
|
:param log_delivery_configuration_id: str
|
|
2101
2105
|
The log delivery configuration id of customer
|
|
@@ -2122,9 +2126,7 @@ class LogDeliveryAPI:
|
|
|
2122
2126
|
status: Optional[LogDeliveryConfigStatus] = None,
|
|
2123
2127
|
storage_configuration_id: Optional[str] = None,
|
|
2124
2128
|
) -> Iterator[LogDeliveryConfiguration]:
|
|
2125
|
-
"""
|
|
2126
|
-
|
|
2127
|
-
Gets all Databricks log delivery configurations associated with an account specified by ID.
|
|
2129
|
+
"""Gets all Databricks log delivery configurations associated with an account specified by ID.
|
|
2128
2130
|
|
|
2129
2131
|
:param credentials_id: str (optional)
|
|
2130
2132
|
The Credentials id to filter the search results with
|
|
@@ -2164,9 +2166,7 @@ class LogDeliveryAPI:
|
|
|
2164
2166
|
query["page_token"] = json["next_page_token"]
|
|
2165
2167
|
|
|
2166
2168
|
def patch_status(self, log_delivery_configuration_id: str, status: LogDeliveryConfigStatus):
|
|
2167
|
-
"""
|
|
2168
|
-
|
|
2169
|
-
Enables or disables a log delivery configuration. Deletion of delivery configurations is not
|
|
2169
|
+
"""Enables or disables a log delivery configuration. Deletion of delivery configurations is not
|
|
2170
2170
|
supported, so disable log delivery configurations that are no longer needed. Note that you can't
|
|
2171
2171
|
re-enable a delivery configuration if this would violate the delivery configuration limits described
|
|
2172
2172
|
under [Create log delivery](:method:LogDelivery/Create).
|
|
@@ -2208,9 +2208,7 @@ class UsageDashboardsAPI:
|
|
|
2208
2208
|
def create(
|
|
2209
2209
|
self, *, dashboard_type: Optional[UsageDashboardType] = None, workspace_id: Optional[int] = None
|
|
2210
2210
|
) -> CreateBillingUsageDashboardResponse:
|
|
2211
|
-
"""Create
|
|
2212
|
-
|
|
2213
|
-
Create a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2211
|
+
"""Create a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2214
2212
|
|
|
2215
2213
|
:param dashboard_type: :class:`UsageDashboardType` (optional)
|
|
2216
2214
|
Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage
|
|
@@ -2236,9 +2234,7 @@ class UsageDashboardsAPI:
|
|
|
2236
2234
|
def get(
|
|
2237
2235
|
self, *, dashboard_type: Optional[UsageDashboardType] = None, workspace_id: Optional[int] = None
|
|
2238
2236
|
) -> GetBillingUsageDashboardResponse:
|
|
2239
|
-
"""Get usage dashboard.
|
|
2240
|
-
|
|
2241
|
-
Get a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2237
|
+
"""Get a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2242
2238
|
|
|
2243
2239
|
:param dashboard_type: :class:`UsageDashboardType` (optional)
|
|
2244
2240
|
Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage
|