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.

Files changed (31) hide show
  1. databricks/sdk/__init__.py +38 -11
  2. databricks/sdk/service/aibuilder.py +122 -17
  3. databricks/sdk/service/apps.py +15 -45
  4. databricks/sdk/service/billing.py +70 -74
  5. databricks/sdk/service/catalog.py +1898 -557
  6. databricks/sdk/service/cleanrooms.py +14 -55
  7. databricks/sdk/service/compute.py +305 -508
  8. databricks/sdk/service/dashboards.py +148 -223
  9. databricks/sdk/service/database.py +657 -127
  10. databricks/sdk/service/files.py +18 -54
  11. databricks/sdk/service/iam.py +55 -165
  12. databricks/sdk/service/jobs.py +238 -214
  13. databricks/sdk/service/marketplace.py +47 -146
  14. databricks/sdk/service/ml.py +1137 -447
  15. databricks/sdk/service/oauth2.py +17 -46
  16. databricks/sdk/service/pipelines.py +93 -69
  17. databricks/sdk/service/provisioning.py +34 -212
  18. databricks/sdk/service/qualitymonitorv2.py +5 -33
  19. databricks/sdk/service/serving.py +69 -55
  20. databricks/sdk/service/settings.py +106 -434
  21. databricks/sdk/service/sharing.py +33 -95
  22. databricks/sdk/service/sql.py +164 -254
  23. databricks/sdk/service/vectorsearch.py +13 -62
  24. databricks/sdk/service/workspace.py +36 -110
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/METADATA +1 -1
  27. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/RECORD +31 -31
  28. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/WHEEL +0 -0
  29. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/LICENSE +0 -0
  30. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/NOTICE +0 -0
  31. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/top_level.txt +0 -0
@@ -665,7 +665,10 @@ class AlertV2:
665
665
  """Text of the query to be run."""
666
666
 
667
667
  run_as_user_name: Optional[str] = None
668
- """The run as username. This field is set to "Unavailable" if the user has been deleted."""
668
+ """The run as username or application ID of service principal. This field is set to "Unavailable"
669
+ if the user has been deleted. On Create and Update, this field can be set to application ID of
670
+ an active service principal. Setting this field requires the servicePrincipal/user role. If not
671
+ specified it'll default to be request user."""
669
672
 
670
673
  schedule: Optional[CronSchedule] = None
671
674
 
@@ -1700,16 +1703,16 @@ class CreateQueryRequestQuery:
1700
1703
  class CreateQueryVisualizationsLegacyRequest:
1701
1704
  """Add visualization to a query"""
1702
1705
 
1706
+ options: Any
1707
+ """The options object varies widely from one visualization type to the next and is unsupported.
1708
+ Databricks does not recommend modifying visualization settings in JSON."""
1709
+
1703
1710
  query_id: str
1704
1711
  """The identifier returned by :method:queries/create"""
1705
1712
 
1706
1713
  type: str
1707
1714
  """The type of visualization: chart, table, pivot table, and so on."""
1708
1715
 
1709
- options: Any
1710
- """The options object varies widely from one visualization type to the next and is unsupported.
1711
- Databricks does not recommend modifying visualization settings in JSON."""
1712
-
1713
1716
  description: Optional[str] = None
1714
1717
  """A short description of this visualization. This is not displayed in the UI."""
1715
1718
 
@@ -1902,7 +1905,6 @@ class CreateWarehouseRequest:
1902
1905
  Supported values: - Must be unique within an org. - Must be less than 100 characters."""
1903
1906
 
1904
1907
  spot_instance_policy: Optional[SpotInstancePolicy] = None
1905
- """Configurations whether the warehouse should use spot instances."""
1906
1908
 
1907
1909
  tags: Optional[EndpointTags] = None
1908
1910
  """A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS
@@ -1911,8 +1913,6 @@ class CreateWarehouseRequest:
1911
1913
  Supported values: - Number of tags < 45."""
1912
1914
 
1913
1915
  warehouse_type: Optional[CreateWarehouseRequestWarehouseType] = None
1914
- """Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute, you must set to `PRO`
1915
- and also set the field `enable_serverless_compute` to `true`."""
1916
1916
 
1917
1917
  def as_dict(self) -> dict:
1918
1918
  """Serializes the CreateWarehouseRequest into a dictionary suitable for use as a JSON request body."""
@@ -2040,9 +2040,6 @@ class CreateWidget:
2040
2040
  width: int
2041
2041
  """Width of a widget"""
2042
2042
 
2043
- id: Optional[str] = None
2044
- """Widget ID returned by :method:dashboardwidgets/create"""
2045
-
2046
2043
  text: Optional[str] = None
2047
2044
  """If this is a textbox widget, the application displays this text. This field is ignored if the
2048
2045
  widget contains a visualization in the `visualization` field."""
@@ -2055,8 +2052,6 @@ class CreateWidget:
2055
2052
  body = {}
2056
2053
  if self.dashboard_id is not None:
2057
2054
  body["dashboard_id"] = self.dashboard_id
2058
- if self.id is not None:
2059
- body["id"] = self.id
2060
2055
  if self.options:
2061
2056
  body["options"] = self.options.as_dict()
2062
2057
  if self.text is not None:
@@ -2072,8 +2067,6 @@ class CreateWidget:
2072
2067
  body = {}
2073
2068
  if self.dashboard_id is not None:
2074
2069
  body["dashboard_id"] = self.dashboard_id
2075
- if self.id is not None:
2076
- body["id"] = self.id
2077
2070
  if self.options:
2078
2071
  body["options"] = self.options
2079
2072
  if self.text is not None:
@@ -2089,7 +2082,6 @@ class CreateWidget:
2089
2082
  """Deserializes the CreateWidget from a dictionary."""
2090
2083
  return cls(
2091
2084
  dashboard_id=d.get("dashboard_id", None),
2092
- id=d.get("id", None),
2093
2085
  options=_from_dict(d, "options", WidgetOptions),
2094
2086
  text=d.get("text", None),
2095
2087
  visualization_id=d.get("visualization_id", None),
@@ -2865,7 +2857,6 @@ class EditWarehouseRequest:
2865
2857
  Supported values: - Must be unique within an org. - Must be less than 100 characters."""
2866
2858
 
2867
2859
  spot_instance_policy: Optional[SpotInstancePolicy] = None
2868
- """Configurations whether the warehouse should use spot instances."""
2869
2860
 
2870
2861
  tags: Optional[EndpointTags] = None
2871
2862
  """A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS
@@ -2874,8 +2865,6 @@ class EditWarehouseRequest:
2874
2865
  Supported values: - Number of tags < 45."""
2875
2866
 
2876
2867
  warehouse_type: Optional[EditWarehouseRequestWarehouseType] = None
2877
- """Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute, you must set to `PRO`
2878
- and also set the field `enable_serverless_compute` to `true`."""
2879
2868
 
2880
2869
  def as_dict(self) -> dict:
2881
2870
  """Serializes the EditWarehouseRequest into a dictionary suitable for use as a JSON request body."""
@@ -3055,7 +3044,6 @@ class EndpointHealth:
3055
3044
  """Deprecated. split into summary and details for security"""
3056
3045
 
3057
3046
  status: Optional[Status] = None
3058
- """Health status of the warehouse."""
3059
3047
 
3060
3048
  summary: Optional[str] = None
3061
3049
  """A short summary of the health status in case of degraded/failed warehouses."""
@@ -3178,10 +3166,8 @@ class EndpointInfo:
3178
3166
  """ODBC parameters for the SQL warehouse"""
3179
3167
 
3180
3168
  spot_instance_policy: Optional[SpotInstancePolicy] = None
3181
- """Configurations whether the warehouse should use spot instances."""
3182
3169
 
3183
3170
  state: Optional[State] = None
3184
- """State of the warehouse"""
3185
3171
 
3186
3172
  tags: Optional[EndpointTags] = None
3187
3173
  """A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS
@@ -3419,7 +3405,8 @@ class EnumValue:
3419
3405
  @dataclass
3420
3406
  class ExecuteStatementRequest:
3421
3407
  statement: str
3422
- """The SQL statement to execute. The statement can optionally be parameterized, see `parameters`."""
3408
+ """The SQL statement to execute. The statement can optionally be parameterized, see `parameters`.
3409
+ The maximum query text size is 16 MiB."""
3423
3410
 
3424
3411
  warehouse_id: str
3425
3412
  """Warehouse upon which to execute a statement. See also [What are SQL warehouses?]
@@ -3983,10 +3970,8 @@ class GetWarehouseResponse:
3983
3970
  """ODBC parameters for the SQL warehouse"""
3984
3971
 
3985
3972
  spot_instance_policy: Optional[SpotInstancePolicy] = None
3986
- """Configurations whether the warehouse should use spot instances."""
3987
3973
 
3988
3974
  state: Optional[State] = None
3989
- """State of the warehouse"""
3990
3975
 
3991
3976
  tags: Optional[EndpointTags] = None
3992
3977
  """A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS
@@ -3995,8 +3980,6 @@ class GetWarehouseResponse:
3995
3980
  Supported values: - Number of tags < 45."""
3996
3981
 
3997
3982
  warehouse_type: Optional[GetWarehouseResponseWarehouseType] = None
3998
- """Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute, you must set to `PRO`
3999
- and also set the field `enable_serverless_compute` to `true`."""
4000
3983
 
4001
3984
  def as_dict(self) -> dict:
4002
3985
  """Serializes the GetWarehouseResponse into a dictionary suitable for use as a JSON request body."""
@@ -4336,8 +4319,6 @@ class LegacyAlert:
4336
4319
 
4337
4320
 
4338
4321
  class LegacyAlertState(Enum):
4339
- """State of the alert. Possible values are: `unknown` (yet to be evaluated), `triggered` (evaluated
4340
- and fulfilled trigger conditions), or `ok` (evaluated and did not fulfill trigger conditions)."""
4341
4322
 
4342
4323
  OK = "ok"
4343
4324
  TRIGGERED = "triggered"
@@ -5317,7 +5298,6 @@ class OdbcParams:
5317
5298
 
5318
5299
 
5319
5300
  class OwnableObjectType(Enum):
5320
- """The singular form of the type of object which can be owned."""
5321
5301
 
5322
5302
  ALERT = "alert"
5323
5303
  DASHBOARD = "dashboard"
@@ -5402,7 +5382,6 @@ class Parameter:
5402
5382
 
5403
5383
 
5404
5384
  class ParameterType(Enum):
5405
- """Parameters can have several different types."""
5406
5385
 
5407
5386
  DATETIME = "datetime"
5408
5387
  ENUM = "enum"
@@ -5719,12 +5698,16 @@ class QueryEditContent:
5719
5698
  @dataclass
5720
5699
  class QueryFilter:
5721
5700
  query_start_time_range: Optional[TimeRange] = None
5722
- """A range filter for query submitted time. The time range must be <= 30 days."""
5701
+ """A range filter for query submitted time. The time range must be less than or equal to 30 days."""
5723
5702
 
5724
5703
  statement_ids: Optional[List[str]] = None
5725
5704
  """A list of statement IDs."""
5726
5705
 
5727
5706
  statuses: Optional[List[QueryStatus]] = None
5707
+ """A list of statuses (QUEUED, RUNNING, CANCELED, FAILED, FINISHED) to match query results.
5708
+ Corresponds to the `status` field in the response. Filtering for multiple statuses is not
5709
+ recommended. Instead, opt to filter by a single status multiple times and then combine the
5710
+ results."""
5728
5711
 
5729
5712
  user_ids: Optional[List[int]] = None
5730
5713
  """A list of user IDs who ran the queries."""
@@ -5785,7 +5768,9 @@ class QueryInfo:
5785
5768
  are expected to remain static over time, this cannot be guaranteed."""
5786
5769
 
5787
5770
  duration: Optional[int] = None
5788
- """Total execution time of the statement ( excluding result fetch time )."""
5771
+ """Total time of the statement execution. This value does not include the time taken to retrieve
5772
+ the results, which can result in a discrepancy between this value and the start-to-finish
5773
+ wall-clock time."""
5789
5774
 
5790
5775
  endpoint_id: Optional[str] = None
5791
5776
  """Alias for `warehouse_id`."""
@@ -6666,7 +6651,6 @@ class ResultManifest:
6666
6651
  format: Optional[Format] = None
6667
6652
 
6668
6653
  schema: Optional[ResultSchema] = None
6669
- """The schema is an ordered list of column descriptions."""
6670
6654
 
6671
6655
  total_byte_count: Optional[int] = None
6672
6656
  """The total number of bytes in the result set. This field is not available when using `INLINE`
@@ -6772,8 +6756,6 @@ class RunAsMode(Enum):
6772
6756
 
6773
6757
 
6774
6758
  class RunAsRole(Enum):
6775
- """Sets the **Run as** role for the object. Must be set to one of `"viewer"` (signifying "run as
6776
- viewer" behavior) or `"owner"` (signifying "run as owner" behavior)"""
6777
6759
 
6778
6760
  OWNER = "owner"
6779
6761
  VIEWER = "viewer"
@@ -7126,7 +7108,6 @@ class StatementParameterListItem:
7126
7108
  @dataclass
7127
7109
  class StatementResponse:
7128
7110
  manifest: Optional[ResultManifest] = None
7129
- """The result manifest provides schema and metadata for the result set."""
7130
7111
 
7131
7112
  result: Optional[ResultData] = None
7132
7113
 
@@ -7135,7 +7116,6 @@ class StatementResponse:
7135
7116
  reference for all subsequent calls."""
7136
7117
 
7137
7118
  status: Optional[StatementStatus] = None
7138
- """The status response includes execution state and if relevant, error information."""
7139
7119
 
7140
7120
  def as_dict(self) -> dict:
7141
7121
  """Serializes the StatementResponse into a dictionary suitable for use as a JSON request body."""
@@ -7196,11 +7176,6 @@ class StatementStatus:
7196
7176
  error: Optional[ServiceError] = None
7197
7177
 
7198
7178
  state: Optional[StatementState] = None
7199
- """Statement execution state: - `PENDING`: waiting for warehouse - `RUNNING`: running -
7200
- `SUCCEEDED`: execution was successful, result data available for fetch - `FAILED`: execution
7201
- failed; reason for failure described in accomanying error message - `CANCELED`: user canceled;
7202
- can come from explicit cancel call, or timeout with `on_wait_timeout=CANCEL` - `CLOSED`:
7203
- execution successful, and statement closed; result no longer available for fetch"""
7204
7179
 
7205
7180
  def as_dict(self) -> dict:
7206
7181
  """Serializes the StatementStatus into a dictionary suitable for use as a JSON request body."""
@@ -7558,8 +7533,6 @@ class TransferOwnershipObjectId:
7558
7533
 
7559
7534
  @dataclass
7560
7535
  class TransferOwnershipRequest:
7561
- """Transfer object ownership"""
7562
-
7563
7536
  new_owner: Optional[str] = None
7564
7537
  """Email address for the new owner, who must exist in the workspace."""
7565
7538
 
@@ -8032,6 +8005,73 @@ class UpdateVisualizationRequestVisualization:
8032
8005
  )
8033
8006
 
8034
8007
 
8008
+ @dataclass
8009
+ class UpdateWidgetRequest:
8010
+ dashboard_id: str
8011
+ """Dashboard ID returned by :method:dashboards/create."""
8012
+
8013
+ options: WidgetOptions
8014
+
8015
+ width: int
8016
+ """Width of a widget"""
8017
+
8018
+ id: Optional[str] = None
8019
+ """Widget ID returned by :method:dashboardwidgets/create"""
8020
+
8021
+ text: Optional[str] = None
8022
+ """If this is a textbox widget, the application displays this text. This field is ignored if the
8023
+ widget contains a visualization in the `visualization` field."""
8024
+
8025
+ visualization_id: Optional[str] = None
8026
+ """Query Vizualization ID returned by :method:queryvisualizations/create."""
8027
+
8028
+ def as_dict(self) -> dict:
8029
+ """Serializes the UpdateWidgetRequest into a dictionary suitable for use as a JSON request body."""
8030
+ body = {}
8031
+ if self.dashboard_id is not None:
8032
+ body["dashboard_id"] = self.dashboard_id
8033
+ if self.id is not None:
8034
+ body["id"] = self.id
8035
+ if self.options:
8036
+ body["options"] = self.options.as_dict()
8037
+ if self.text is not None:
8038
+ body["text"] = self.text
8039
+ if self.visualization_id is not None:
8040
+ body["visualization_id"] = self.visualization_id
8041
+ if self.width is not None:
8042
+ body["width"] = self.width
8043
+ return body
8044
+
8045
+ def as_shallow_dict(self) -> dict:
8046
+ """Serializes the UpdateWidgetRequest into a shallow dictionary of its immediate attributes."""
8047
+ body = {}
8048
+ if self.dashboard_id is not None:
8049
+ body["dashboard_id"] = self.dashboard_id
8050
+ if self.id is not None:
8051
+ body["id"] = self.id
8052
+ if self.options:
8053
+ body["options"] = self.options
8054
+ if self.text is not None:
8055
+ body["text"] = self.text
8056
+ if self.visualization_id is not None:
8057
+ body["visualization_id"] = self.visualization_id
8058
+ if self.width is not None:
8059
+ body["width"] = self.width
8060
+ return body
8061
+
8062
+ @classmethod
8063
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateWidgetRequest:
8064
+ """Deserializes the UpdateWidgetRequest from a dictionary."""
8065
+ return cls(
8066
+ dashboard_id=d.get("dashboard_id", None),
8067
+ id=d.get("id", None),
8068
+ options=_from_dict(d, "options", WidgetOptions),
8069
+ text=d.get("text", None),
8070
+ visualization_id=d.get("visualization_id", None),
8071
+ width=d.get("width", None),
8072
+ )
8073
+
8074
+
8035
8075
  @dataclass
8036
8076
  class User:
8037
8077
  email: Optional[str] = None
@@ -8159,7 +8199,6 @@ class WarehouseAccessControlRequest:
8159
8199
  """name of the group"""
8160
8200
 
8161
8201
  permission_level: Optional[WarehousePermissionLevel] = None
8162
- """Permission level"""
8163
8202
 
8164
8203
  service_principal_name: Optional[str] = None
8165
8204
  """application ID of a service principal"""
@@ -8270,7 +8309,6 @@ class WarehousePermission:
8270
8309
  inherited_from_object: Optional[List[str]] = None
8271
8310
 
8272
8311
  permission_level: Optional[WarehousePermissionLevel] = None
8273
- """Permission level"""
8274
8312
 
8275
8313
  def as_dict(self) -> dict:
8276
8314
  """Serializes the WarehousePermission into a dictionary suitable for use as a JSON request body."""
@@ -8359,7 +8397,6 @@ class WarehousePermissionsDescription:
8359
8397
  description: Optional[str] = None
8360
8398
 
8361
8399
  permission_level: Optional[WarehousePermissionLevel] = None
8362
- """Permission level"""
8363
8400
 
8364
8401
  def as_dict(self) -> dict:
8365
8402
  """Serializes the WarehousePermissionsDescription into a dictionary suitable for use as a JSON request body."""
@@ -8669,9 +8706,7 @@ class AlertsAPI:
8669
8706
  def create(
8670
8707
  self, *, alert: Optional[CreateAlertRequestAlert] = None, auto_resolve_display_name: Optional[bool] = None
8671
8708
  ) -> Alert:
8672
- """Create an alert.
8673
-
8674
- Creates an alert.
8709
+ """Creates an alert.
8675
8710
 
8676
8711
  :param alert: :class:`CreateAlertRequestAlert` (optional)
8677
8712
  :param auto_resolve_display_name: bool (optional)
@@ -8694,9 +8729,7 @@ class AlertsAPI:
8694
8729
  return Alert.from_dict(res)
8695
8730
 
8696
8731
  def delete(self, id: str):
8697
- """Delete an alert.
8698
-
8699
- Moves an alert to the trash. Trashed alerts immediately disappear from searches and list views, and
8732
+ """Moves an alert to the trash. Trashed alerts immediately disappear from searches and list views, and
8700
8733
  can no longer trigger. You can restore a trashed alert through the UI. A trashed alert is permanently
8701
8734
  deleted after 30 days.
8702
8735
 
@@ -8712,9 +8745,7 @@ class AlertsAPI:
8712
8745
  self._api.do("DELETE", f"/api/2.0/sql/alerts/{id}", headers=headers)
8713
8746
 
8714
8747
  def get(self, id: str) -> Alert:
8715
- """Get an alert.
8716
-
8717
- Gets an alert.
8748
+ """Gets an alert.
8718
8749
 
8719
8750
  :param id: str
8720
8751
 
@@ -8731,9 +8762,7 @@ class AlertsAPI:
8731
8762
  def list(
8732
8763
  self, *, page_size: Optional[int] = None, page_token: Optional[str] = None
8733
8764
  ) -> Iterator[ListAlertsResponseAlert]:
8734
- """List alerts.
8735
-
8736
- Gets a list of alerts accessible to the user, ordered by creation time. **Warning:** Calling this API
8765
+ """Gets a list of alerts accessible to the user, ordered by creation time. **Warning:** Calling this API
8737
8766
  concurrently 10 or more times could result in throttling, service degradation, or a temporary ban.
8738
8767
 
8739
8768
  :param page_size: int (optional)
@@ -8768,9 +8797,7 @@ class AlertsAPI:
8768
8797
  alert: Optional[UpdateAlertRequestAlert] = None,
8769
8798
  auto_resolve_display_name: Optional[bool] = None,
8770
8799
  ) -> Alert:
8771
- """Update an alert.
8772
-
8773
- Updates an alert.
8800
+ """Updates an alert.
8774
8801
 
8775
8802
  :param id: str
8776
8803
  :param update_mask: str
@@ -8829,9 +8856,7 @@ class AlertsLegacyAPI:
8829
8856
  parent: Optional[str] = None,
8830
8857
  rearm: Optional[int] = None,
8831
8858
  ) -> LegacyAlert:
8832
- """Create an alert.
8833
-
8834
- Creates an alert. An alert is a Databricks SQL object that periodically runs a query, evaluates a
8859
+ """Creates an alert. An alert is a Databricks SQL object that periodically runs a query, evaluates a
8835
8860
  condition of its result, and notifies users or notification destinations if the condition was met.
8836
8861
 
8837
8862
  **Note**: A new version of the Databricks SQL API is now available. Please use :method:alerts/create
@@ -8873,9 +8898,7 @@ class AlertsLegacyAPI:
8873
8898
  return LegacyAlert.from_dict(res)
8874
8899
 
8875
8900
  def delete(self, alert_id: str):
8876
- """Delete an alert.
8877
-
8878
- Deletes an alert. Deleted alerts are no longer accessible and cannot be restored. **Note**: Unlike
8901
+ """Deletes an alert. Deleted alerts are no longer accessible and cannot be restored. **Note**: Unlike
8879
8902
  queries and dashboards, alerts cannot be moved to the trash.
8880
8903
 
8881
8904
  **Note**: A new version of the Databricks SQL API is now available. Please use :method:alerts/delete
@@ -8895,9 +8918,7 @@ class AlertsLegacyAPI:
8895
8918
  self._api.do("DELETE", f"/api/2.0/preview/sql/alerts/{alert_id}", headers=headers)
8896
8919
 
8897
8920
  def get(self, alert_id: str) -> LegacyAlert:
8898
- """Get an alert.
8899
-
8900
- Gets an alert.
8921
+ """Gets an alert.
8901
8922
 
8902
8923
  **Note**: A new version of the Databricks SQL API is now available. Please use :method:alerts/get
8903
8924
  instead. [Learn more]
@@ -8917,15 +8938,14 @@ class AlertsLegacyAPI:
8917
8938
  return LegacyAlert.from_dict(res)
8918
8939
 
8919
8940
  def list(self) -> Iterator[LegacyAlert]:
8920
- """Get alerts.
8921
-
8922
- Gets a list of alerts.
8941
+ """Gets a list of alerts.
8923
8942
 
8924
8943
  **Note**: A new version of the Databricks SQL API is now available. Please use :method:alerts/list
8925
8944
  instead. [Learn more]
8926
8945
 
8927
8946
  [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
8928
8947
 
8948
+
8929
8949
  :returns: Iterator over :class:`LegacyAlert`
8930
8950
  """
8931
8951
 
@@ -8937,9 +8957,7 @@ class AlertsLegacyAPI:
8937
8957
  return [LegacyAlert.from_dict(v) for v in res]
8938
8958
 
8939
8959
  def update(self, alert_id: str, name: str, options: AlertOptions, query_id: str, *, rearm: Optional[int] = None):
8940
- """Update an alert.
8941
-
8942
- Updates an alert.
8960
+ """Updates an alert.
8943
8961
 
8944
8962
  **Note**: A new version of the Databricks SQL API is now available. Please use :method:alerts/update
8945
8963
  instead. [Learn more]
@@ -8983,9 +9001,7 @@ class AlertsV2API:
8983
9001
  self._api = api_client
8984
9002
 
8985
9003
  def create_alert(self, alert: AlertV2) -> AlertV2:
8986
- """Create an alert.
8987
-
8988
- Create Alert
9004
+ """Create Alert
8989
9005
 
8990
9006
  :param alert: :class:`AlertV2`
8991
9007
 
@@ -9001,9 +9017,7 @@ class AlertsV2API:
9001
9017
  return AlertV2.from_dict(res)
9002
9018
 
9003
9019
  def get_alert(self, id: str) -> AlertV2:
9004
- """Get an alert.
9005
-
9006
- Gets an alert.
9020
+ """Gets an alert.
9007
9021
 
9008
9022
  :param id: str
9009
9023
 
@@ -9018,9 +9032,7 @@ class AlertsV2API:
9018
9032
  return AlertV2.from_dict(res)
9019
9033
 
9020
9034
  def list_alerts(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[AlertV2]:
9021
- """List alerts.
9022
-
9023
- Gets a list of alerts accessible to the user, ordered by creation time.
9035
+ """Gets a list of alerts accessible to the user, ordered by creation time.
9024
9036
 
9025
9037
  :param page_size: int (optional)
9026
9038
  :param page_token: str (optional)
@@ -9047,9 +9059,7 @@ class AlertsV2API:
9047
9059
  query["page_token"] = json["next_page_token"]
9048
9060
 
9049
9061
  def trash_alert(self, id: str):
9050
- """Delete an alert.
9051
-
9052
- Moves an alert to the trash. Trashed alerts immediately disappear from list views, and can no longer
9062
+ """Moves an alert to the trash. Trashed alerts immediately disappear from list views, and can no longer
9053
9063
  trigger. You can restore a trashed alert through the UI. A trashed alert is permanently deleted after
9054
9064
  30 days.
9055
9065
 
@@ -9065,9 +9075,7 @@ class AlertsV2API:
9065
9075
  self._api.do("DELETE", f"/api/2.0/alerts/{id}", headers=headers)
9066
9076
 
9067
9077
  def update_alert(self, id: str, alert: AlertV2, update_mask: str) -> AlertV2:
9068
- """Update an alert.
9069
-
9070
- Update alert
9078
+ """Update alert
9071
9079
 
9072
9080
  :param id: str
9073
9081
  UUID identifying the alert.
@@ -9114,7 +9122,7 @@ class DashboardWidgetsAPI:
9114
9122
  text: Optional[str] = None,
9115
9123
  visualization_id: Optional[str] = None,
9116
9124
  ) -> Widget:
9117
- """Add widget to a dashboard.
9125
+ """Adds a widget to a dashboard
9118
9126
 
9119
9127
  :param dashboard_id: str
9120
9128
  Dashboard ID returned by :method:dashboards/create.
@@ -9149,7 +9157,7 @@ class DashboardWidgetsAPI:
9149
9157
  return Widget.from_dict(res)
9150
9158
 
9151
9159
  def delete(self, id: str):
9152
- """Remove widget.
9160
+ """Removes a widget from a dashboard
9153
9161
 
9154
9162
  :param id: str
9155
9163
  Widget ID returned by :method:dashboardwidgets/create
@@ -9173,7 +9181,7 @@ class DashboardWidgetsAPI:
9173
9181
  text: Optional[str] = None,
9174
9182
  visualization_id: Optional[str] = None,
9175
9183
  ) -> Widget:
9176
- """Update existing widget.
9184
+ """Updates an existing widget
9177
9185
 
9178
9186
  :param id: str
9179
9187
  Widget ID returned by :method:dashboardwidgets/create
@@ -9230,7 +9238,9 @@ class DashboardsAPI:
9230
9238
  run_as_role: Optional[RunAsRole] = None,
9231
9239
  tags: Optional[List[str]] = None,
9232
9240
  ) -> Dashboard:
9233
- """Create a dashboard object.
9241
+ """Creates a new dashboard object. Only the name parameter is required in the POST request JSON body.
9242
+ Other fields can be included when duplicating dashboards with this API. Databricks does not recommend
9243
+ designing dashboards exclusively using this API.',
9234
9244
 
9235
9245
  :param name: str
9236
9246
  The title of this dashboard that appears in list views and at the top of the dashboard page.
@@ -9269,9 +9279,7 @@ class DashboardsAPI:
9269
9279
  return Dashboard.from_dict(res)
9270
9280
 
9271
9281
  def delete(self, dashboard_id: str):
9272
- """Remove a dashboard.
9273
-
9274
- Moves a dashboard to the trash. Trashed dashboards do not appear in list views or searches, and cannot
9282
+ """Moves a dashboard to the trash. Trashed dashboards do not appear in list views or searches, and cannot
9275
9283
  be shared.
9276
9284
 
9277
9285
  :param dashboard_id: str
@@ -9286,9 +9294,7 @@ class DashboardsAPI:
9286
9294
  self._api.do("DELETE", f"/api/2.0/preview/sql/dashboards/{dashboard_id}", headers=headers)
9287
9295
 
9288
9296
  def get(self, dashboard_id: str) -> Dashboard:
9289
- """Retrieve a definition.
9290
-
9291
- Returns a JSON representation of a dashboard object, including its visualization and query objects.
9297
+ """Returns a JSON representation of a dashboard object, including its visualization and query objects.
9292
9298
 
9293
9299
  :param dashboard_id: str
9294
9300
 
@@ -9310,9 +9316,7 @@ class DashboardsAPI:
9310
9316
  page_size: Optional[int] = None,
9311
9317
  q: Optional[str] = None,
9312
9318
  ) -> Iterator[Dashboard]:
9313
- """Get dashboard objects.
9314
-
9315
- Fetch a paginated list of dashboard objects.
9319
+ """Fetch a paginated list of dashboard objects.
9316
9320
 
9317
9321
  **Warning**: Calling this API concurrently 10 or more times could result in throttling, service
9318
9322
  degradation, or a temporary ban.
@@ -9342,26 +9346,18 @@ class DashboardsAPI:
9342
9346
  "Accept": "application/json",
9343
9347
  }
9344
9348
 
9345
- # deduplicate items that may have been added during iteration
9346
- seen = set()
9347
9349
  query["page"] = 1
9348
9350
  while True:
9349
9351
  json = self._api.do("GET", "/api/2.0/preview/sql/dashboards", query=query, headers=headers)
9350
9352
  if "results" in json:
9351
9353
  for v in json["results"]:
9352
- i = v["id"]
9353
- if i in seen:
9354
- continue
9355
- seen.add(i)
9356
9354
  yield Dashboard.from_dict(v)
9357
9355
  if "results" not in json or not json["results"]:
9358
9356
  return
9359
9357
  query["page"] += 1
9360
9358
 
9361
9359
  def restore(self, dashboard_id: str):
9362
- """Restore a dashboard.
9363
-
9364
- A restored dashboard appears in list views and searches and can be shared.
9360
+ """A restored dashboard appears in list views and searches and can be shared.
9365
9361
 
9366
9362
  :param dashboard_id: str
9367
9363
 
@@ -9382,9 +9378,7 @@ class DashboardsAPI:
9382
9378
  run_as_role: Optional[RunAsRole] = None,
9383
9379
  tags: Optional[List[str]] = None,
9384
9380
  ) -> Dashboard:
9385
- """Change a dashboard definition.
9386
-
9387
- Modify this dashboard definition. This operation only affects attributes of the dashboard object. It
9381
+ """Modify this dashboard definition. This operation only affects attributes of the dashboard object. It
9388
9382
  does not add, modify, or remove widgets.
9389
9383
 
9390
9384
  **Note**: You cannot undo this operation.
@@ -9432,9 +9426,7 @@ class DataSourcesAPI:
9432
9426
  self._api = api_client
9433
9427
 
9434
9428
  def list(self) -> Iterator[DataSource]:
9435
- """Get a list of SQL warehouses.
9436
-
9437
- Retrieves a full list of SQL warehouses available in this workspace. All fields that appear in this
9429
+ """Retrieves a full list of SQL warehouses available in this workspace. All fields that appear in this
9438
9430
  API response are enumerated for clarity. However, you need only a SQL warehouse's `id` to create new
9439
9431
  queries against it.
9440
9432
 
@@ -9443,6 +9435,7 @@ class DataSourcesAPI:
9443
9435
 
9444
9436
  [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
9445
9437
 
9438
+
9446
9439
  :returns: Iterator over :class:`DataSource`
9447
9440
  """
9448
9441
 
@@ -9475,9 +9468,7 @@ class DbsqlPermissionsAPI:
9475
9468
  self._api = api_client
9476
9469
 
9477
9470
  def get(self, object_type: ObjectTypePlural, object_id: str) -> GetResponse:
9478
- """Get object ACL.
9479
-
9480
- Gets a JSON representation of the access control list (ACL) for a specified object.
9471
+ """Gets a JSON representation of the access control list (ACL) for a specified object.
9481
9472
 
9482
9473
  **Note**: A new version of the Databricks SQL API is now available. Please use
9483
9474
  :method:workspace/getpermissions instead. [Learn more]
@@ -9506,9 +9497,7 @@ class DbsqlPermissionsAPI:
9506
9497
  *,
9507
9498
  access_control_list: Optional[List[AccessControl]] = None,
9508
9499
  ) -> SetResponse:
9509
- """Set object ACL.
9510
-
9511
- Sets the access control list (ACL) for a specified object. This operation will complete rewrite the
9500
+ """Sets the access control list (ACL) for a specified object. This operation will complete rewrite the
9512
9501
  ACL.
9513
9502
 
9514
9503
  **Note**: A new version of the Databricks SQL API is now available. Please use
@@ -9540,9 +9529,7 @@ class DbsqlPermissionsAPI:
9540
9529
  def transfer_ownership(
9541
9530
  self, object_type: OwnableObjectType, object_id: TransferOwnershipObjectId, *, new_owner: Optional[str] = None
9542
9531
  ) -> Success:
9543
- """Transfer object ownership.
9544
-
9545
- Transfers ownership of a dashboard, query, or alert to an active user. Requires an admin API key.
9532
+ """Transfers ownership of a dashboard, query, or alert to an active user. Requires an admin API key.
9546
9533
 
9547
9534
  **Note**: A new version of the Databricks SQL API is now available. For queries and alerts, please use
9548
9535
  :method:queries/update and :method:alerts/update respectively instead. [Learn more]
@@ -9586,9 +9573,7 @@ class QueriesAPI:
9586
9573
  def create(
9587
9574
  self, *, auto_resolve_display_name: Optional[bool] = None, query: Optional[CreateQueryRequestQuery] = None
9588
9575
  ) -> Query:
9589
- """Create a query.
9590
-
9591
- Creates a query.
9576
+ """Creates a query.
9592
9577
 
9593
9578
  :param auto_resolve_display_name: bool (optional)
9594
9579
  If true, automatically resolve query display name conflicts. Otherwise, fail the request if the
@@ -9611,9 +9596,7 @@ class QueriesAPI:
9611
9596
  return Query.from_dict(res)
9612
9597
 
9613
9598
  def delete(self, id: str):
9614
- """Delete a query.
9615
-
9616
- Moves a query to the trash. Trashed queries immediately disappear from searches and list views, and
9599
+ """Moves a query to the trash. Trashed queries immediately disappear from searches and list views, and
9617
9600
  cannot be used for alerts. You can restore a trashed query through the UI. A trashed query is
9618
9601
  permanently deleted after 30 days.
9619
9602
 
@@ -9629,9 +9612,7 @@ class QueriesAPI:
9629
9612
  self._api.do("DELETE", f"/api/2.0/sql/queries/{id}", headers=headers)
9630
9613
 
9631
9614
  def get(self, id: str) -> Query:
9632
- """Get a query.
9633
-
9634
- Gets a query.
9615
+ """Gets a query.
9635
9616
 
9636
9617
  :param id: str
9637
9618
 
@@ -9648,9 +9629,7 @@ class QueriesAPI:
9648
9629
  def list(
9649
9630
  self, *, page_size: Optional[int] = None, page_token: Optional[str] = None
9650
9631
  ) -> Iterator[ListQueryObjectsResponseQuery]:
9651
- """List queries.
9652
-
9653
- Gets a list of queries accessible to the user, ordered by creation time. **Warning:** Calling this API
9632
+ """Gets a list of queries accessible to the user, ordered by creation time. **Warning:** Calling this API
9654
9633
  concurrently 10 or more times could result in throttling, service degradation, or a temporary ban.
9655
9634
 
9656
9635
  :param page_size: int (optional)
@@ -9680,9 +9659,7 @@ class QueriesAPI:
9680
9659
  def list_visualizations(
9681
9660
  self, id: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
9682
9661
  ) -> Iterator[Visualization]:
9683
- """List visualizations on a query.
9684
-
9685
- Gets a list of visualizations on a query.
9662
+ """Gets a list of visualizations on a query.
9686
9663
 
9687
9664
  :param id: str
9688
9665
  :param page_size: int (optional)
@@ -9717,9 +9694,7 @@ class QueriesAPI:
9717
9694
  auto_resolve_display_name: Optional[bool] = None,
9718
9695
  query: Optional[UpdateQueryRequestQuery] = None,
9719
9696
  ) -> Query:
9720
- """Update a query.
9721
-
9722
- Updates a query.
9697
+ """Updates a query.
9723
9698
 
9724
9699
  :param id: str
9725
9700
  :param update_mask: str
@@ -9780,9 +9755,7 @@ class QueriesLegacyAPI:
9780
9755
  run_as_role: Optional[RunAsRole] = None,
9781
9756
  tags: Optional[List[str]] = None,
9782
9757
  ) -> LegacyQuery:
9783
- """Create a new query definition.
9784
-
9785
- Creates a new query definition. Queries created with this endpoint belong to the authenticated user
9758
+ """Creates a new query definition. Queries created with this endpoint belong to the authenticated user
9786
9759
  making the request.
9787
9760
 
9788
9761
  The `data_source_id` field specifies the ID of the SQL warehouse to run this query against. You can
@@ -9846,9 +9819,7 @@ class QueriesLegacyAPI:
9846
9819
  return LegacyQuery.from_dict(res)
9847
9820
 
9848
9821
  def delete(self, query_id: str):
9849
- """Delete a query.
9850
-
9851
- Moves a query to the trash. Trashed queries immediately disappear from searches and list views, and
9822
+ """Moves a query to the trash. Trashed queries immediately disappear from searches and list views, and
9852
9823
  they cannot be used for alerts. The trash is deleted after 30 days.
9853
9824
 
9854
9825
  **Note**: A new version of the Databricks SQL API is now available. Please use :method:queries/delete
@@ -9868,9 +9839,7 @@ class QueriesLegacyAPI:
9868
9839
  self._api.do("DELETE", f"/api/2.0/preview/sql/queries/{query_id}", headers=headers)
9869
9840
 
9870
9841
  def get(self, query_id: str) -> LegacyQuery:
9871
- """Get a query definition.
9872
-
9873
- Retrieve a query object definition along with contextual permissions information about the currently
9842
+ """Retrieve a query object definition along with contextual permissions information about the currently
9874
9843
  authenticated user.
9875
9844
 
9876
9845
  **Note**: A new version of the Databricks SQL API is now available. Please use :method:queries/get
@@ -9898,9 +9867,7 @@ class QueriesLegacyAPI:
9898
9867
  page_size: Optional[int] = None,
9899
9868
  q: Optional[str] = None,
9900
9869
  ) -> Iterator[LegacyQuery]:
9901
- """Get a list of queries.
9902
-
9903
- Gets a list of queries. Optionally, this list can be filtered by a search term.
9870
+ """Gets a list of queries. Optionally, this list can be filtered by a search term.
9904
9871
 
9905
9872
  **Warning**: Calling this API concurrently 10 or more times could result in throttling, service
9906
9873
  degradation, or a temporary ban.
@@ -9947,26 +9914,18 @@ class QueriesLegacyAPI:
9947
9914
  "Accept": "application/json",
9948
9915
  }
9949
9916
 
9950
- # deduplicate items that may have been added during iteration
9951
- seen = set()
9952
9917
  query["page"] = 1
9953
9918
  while True:
9954
9919
  json = self._api.do("GET", "/api/2.0/preview/sql/queries", query=query, headers=headers)
9955
9920
  if "results" in json:
9956
9921
  for v in json["results"]:
9957
- i = v["id"]
9958
- if i in seen:
9959
- continue
9960
- seen.add(i)
9961
9922
  yield LegacyQuery.from_dict(v)
9962
9923
  if "results" not in json or not json["results"]:
9963
9924
  return
9964
9925
  query["page"] += 1
9965
9926
 
9966
9927
  def restore(self, query_id: str):
9967
- """Restore a query.
9968
-
9969
- Restore a query that has been moved to the trash. A restored query appears in list views and searches.
9928
+ """Restore a query that has been moved to the trash. A restored query appears in list views and searches.
9970
9929
  You can use restored queries for alerts.
9971
9930
 
9972
9931
  **Note**: A new version of the Databricks SQL API is now available. Please see the latest version.
@@ -9997,9 +9956,7 @@ class QueriesLegacyAPI:
9997
9956
  run_as_role: Optional[RunAsRole] = None,
9998
9957
  tags: Optional[List[str]] = None,
9999
9958
  ) -> LegacyQuery:
10000
- """Change a query definition.
10001
-
10002
- Modify this query definition.
9959
+ """Modify this query definition.
10003
9960
 
10004
9961
  **Note**: You cannot undo this operation.
10005
9962
 
@@ -10070,16 +10027,16 @@ class QueryHistoryAPI:
10070
10027
  max_results: Optional[int] = None,
10071
10028
  page_token: Optional[str] = None,
10072
10029
  ) -> ListQueriesResponse:
10073
- """List Queries.
10074
-
10075
- List the history of queries through SQL warehouses, and serverless compute.
10030
+ """List the history of queries through SQL warehouses, and serverless compute.
10076
10031
 
10077
10032
  You can filter by user ID, warehouse ID, status, and time range. Most recently started queries are
10078
10033
  returned first (up to max_results in request). The pagination token returned in response can be used
10079
10034
  to list subsequent query statuses.
10080
10035
 
10081
10036
  :param filter_by: :class:`QueryFilter` (optional)
10082
- A filter to limit query history results. This field is optional.
10037
+ An optional filter object to limit query history results. Accepts parameters such as user IDs,
10038
+ endpoint IDs, and statuses to narrow the returned data. In a URL, the parameters of this filter are
10039
+ specified with dot notation. For example: `filter_by.statement_ids`.
10083
10040
  :param include_metrics: bool (optional)
10084
10041
  Whether to include the query metrics with each query. Only use this for a small subset of queries
10085
10042
  (max_results). Defaults to false.
@@ -10118,9 +10075,7 @@ class QueryVisualizationsAPI:
10118
10075
  self._api = api_client
10119
10076
 
10120
10077
  def create(self, *, visualization: Optional[CreateVisualizationRequestVisualization] = None) -> Visualization:
10121
- """Add a visualization to a query.
10122
-
10123
- Adds a visualization to a query.
10078
+ """Adds a visualization to a query.
10124
10079
 
10125
10080
  :param visualization: :class:`CreateVisualizationRequestVisualization` (optional)
10126
10081
 
@@ -10138,9 +10093,7 @@ class QueryVisualizationsAPI:
10138
10093
  return Visualization.from_dict(res)
10139
10094
 
10140
10095
  def delete(self, id: str):
10141
- """Remove a visualization.
10142
-
10143
- Removes a visualization.
10096
+ """Removes a visualization.
10144
10097
 
10145
10098
  :param id: str
10146
10099
 
@@ -10156,9 +10109,7 @@ class QueryVisualizationsAPI:
10156
10109
  def update(
10157
10110
  self, id: str, update_mask: str, *, visualization: Optional[UpdateVisualizationRequestVisualization] = None
10158
10111
  ) -> Visualization:
10159
- """Update a visualization.
10160
-
10161
- Updates a visualization.
10112
+ """Updates a visualization.
10162
10113
 
10163
10114
  :param id: str
10164
10115
  :param update_mask: str
@@ -10202,24 +10153,22 @@ class QueryVisualizationsLegacyAPI:
10202
10153
  self._api = api_client
10203
10154
 
10204
10155
  def create(
10205
- self, query_id: str, type: str, options: Any, *, description: Optional[str] = None, name: Optional[str] = None
10156
+ self, options: Any, query_id: str, type: str, *, description: Optional[str] = None, name: Optional[str] = None
10206
10157
  ) -> LegacyVisualization:
10207
- """Add visualization to a query.
10208
-
10209
- Creates visualization in the query.
10158
+ """Creates visualization in the query.
10210
10159
 
10211
10160
  **Note**: A new version of the Databricks SQL API is now available. Please use
10212
10161
  :method:queryvisualizations/create instead. [Learn more]
10213
10162
 
10214
10163
  [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
10215
10164
 
10165
+ :param options: Any
10166
+ The options object varies widely from one visualization type to the next and is unsupported.
10167
+ Databricks does not recommend modifying visualization settings in JSON.
10216
10168
  :param query_id: str
10217
10169
  The identifier returned by :method:queries/create
10218
10170
  :param type: str
10219
10171
  The type of visualization: chart, table, pivot table, and so on.
10220
- :param options: Any
10221
- The options object varies widely from one visualization type to the next and is unsupported.
10222
- Databricks does not recommend modifying visualization settings in JSON.
10223
10172
  :param description: str (optional)
10224
10173
  A short description of this visualization. This is not displayed in the UI.
10225
10174
  :param name: str (optional)
@@ -10247,9 +10196,7 @@ class QueryVisualizationsLegacyAPI:
10247
10196
  return LegacyVisualization.from_dict(res)
10248
10197
 
10249
10198
  def delete(self, id: str):
10250
- """Remove visualization.
10251
-
10252
- Removes a visualization from the query.
10199
+ """Removes a visualization from the query.
10253
10200
 
10254
10201
  **Note**: A new version of the Databricks SQL API is now available. Please use
10255
10202
  :method:queryvisualizations/delete instead. [Learn more]
@@ -10257,7 +10204,7 @@ class QueryVisualizationsLegacyAPI:
10257
10204
  [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
10258
10205
 
10259
10206
  :param id: str
10260
- Widget ID returned by :method:queryvizualisations/create
10207
+ Widget ID returned by :method:queryvisualizations/create
10261
10208
 
10262
10209
 
10263
10210
  """
@@ -10280,9 +10227,7 @@ class QueryVisualizationsLegacyAPI:
10280
10227
  type: Optional[str] = None,
10281
10228
  updated_at: Optional[str] = None,
10282
10229
  ) -> LegacyVisualization:
10283
- """Edit existing visualization.
10284
-
10285
- Updates visualization in the query.
10230
+ """Updates visualization in the query.
10286
10231
 
10287
10232
  **Note**: A new version of the Databricks SQL API is now available. Please use
10288
10233
  :method:queryvisualizations/update instead. [Learn more]
@@ -10339,6 +10284,7 @@ class RedashConfigAPI:
10339
10284
  def get_config(self) -> ClientConfig:
10340
10285
  """Read workspace configuration for Redash-v2.
10341
10286
 
10287
+
10342
10288
  :returns: :class:`ClientConfig`
10343
10289
  """
10344
10290
 
@@ -10440,9 +10386,7 @@ class StatementExecutionAPI:
10440
10386
  self._api = api_client
10441
10387
 
10442
10388
  def cancel_execution(self, statement_id: str):
10443
- """Cancel statement execution.
10444
-
10445
- Requests that an executing statement be canceled. Callers must poll for status to see the terminal
10389
+ """Requests that an executing statement be canceled. Callers must poll for status to see the terminal
10446
10390
  state.
10447
10391
 
10448
10392
  :param statement_id: str
@@ -10471,10 +10415,11 @@ class StatementExecutionAPI:
10471
10415
  schema: Optional[str] = None,
10472
10416
  wait_timeout: Optional[str] = None,
10473
10417
  ) -> StatementResponse:
10474
- """Execute a SQL statement.
10418
+ """Execute a SQL statement
10475
10419
 
10476
10420
  :param statement: str
10477
- The SQL statement to execute. The statement can optionally be parameterized, see `parameters`.
10421
+ The SQL statement to execute. The statement can optionally be parameterized, see `parameters`. The
10422
+ maximum query text size is 16 MiB.
10478
10423
  :param warehouse_id: str
10479
10424
  Warehouse upon which to execute a statement. See also [What are SQL warehouses?]
10480
10425
 
@@ -10611,9 +10556,7 @@ class StatementExecutionAPI:
10611
10556
  return StatementResponse.from_dict(res)
10612
10557
 
10613
10558
  def get_statement(self, statement_id: str) -> StatementResponse:
10614
- """Get status, manifest, and result first chunk.
10615
-
10616
- This request can be used to poll for the statement's status. When the `status.state` field is
10559
+ """This request can be used to poll for the statement's status. When the `status.state` field is
10617
10560
  `SUCCEEDED` it will also return the result manifest and the first chunk of the result data. When the
10618
10561
  statement is in the terminal states `CANCELED`, `CLOSED` or `FAILED`, it returns HTTP 200 with the
10619
10562
  state set. After at least 12 hours in terminal state, the statement is removed from the warehouse and
@@ -10636,9 +10579,7 @@ class StatementExecutionAPI:
10636
10579
  return StatementResponse.from_dict(res)
10637
10580
 
10638
10581
  def get_statement_result_chunk_n(self, statement_id: str, chunk_index: int) -> ResultData:
10639
- """Get result chunk by index.
10640
-
10641
- After the statement execution has `SUCCEEDED`, this request can be used to fetch any chunk by index.
10582
+ """After the statement execution has `SUCCEEDED`, this request can be used to fetch any chunk by index.
10642
10583
  Whereas the first chunk with `chunk_index=0` is typically fetched with
10643
10584
  :method:statementexecution/executeStatement or :method:statementexecution/getStatement, this request
10644
10585
  can be used to fetch subsequent chunks. The response structure is identical to the nested `result`
@@ -10748,9 +10689,7 @@ class WarehousesAPI:
10748
10689
  tags: Optional[EndpointTags] = None,
10749
10690
  warehouse_type: Optional[CreateWarehouseRequestWarehouseType] = None,
10750
10691
  ) -> Wait[GetWarehouseResponse]:
10751
- """Create a warehouse.
10752
-
10753
- Creates a new SQL warehouse.
10692
+ """Creates a new SQL warehouse.
10754
10693
 
10755
10694
  :param auto_stop_mins: int (optional)
10756
10695
  The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it
@@ -10798,15 +10737,12 @@ class WarehousesAPI:
10798
10737
 
10799
10738
  Supported values: - Must be unique within an org. - Must be less than 100 characters.
10800
10739
  :param spot_instance_policy: :class:`SpotInstancePolicy` (optional)
10801
- Configurations whether the warehouse should use spot instances.
10802
10740
  :param tags: :class:`EndpointTags` (optional)
10803
10741
  A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes)
10804
10742
  associated with this SQL warehouse.
10805
10743
 
10806
10744
  Supported values: - Number of tags < 45.
10807
10745
  :param warehouse_type: :class:`CreateWarehouseRequestWarehouseType` (optional)
10808
- Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute, you must set to `PRO` and
10809
- also set the field `enable_serverless_compute` to `true`.
10810
10746
 
10811
10747
  :returns:
10812
10748
  Long-running operation waiter for :class:`GetWarehouseResponse`.
@@ -10886,9 +10822,7 @@ class WarehousesAPI:
10886
10822
  ).result(timeout=timeout)
10887
10823
 
10888
10824
  def delete(self, id: str):
10889
- """Delete a warehouse.
10890
-
10891
- Deletes a SQL warehouse.
10825
+ """Deletes a SQL warehouse.
10892
10826
 
10893
10827
  :param id: str
10894
10828
  Required. Id of the SQL warehouse.
@@ -10920,9 +10854,7 @@ class WarehousesAPI:
10920
10854
  tags: Optional[EndpointTags] = None,
10921
10855
  warehouse_type: Optional[EditWarehouseRequestWarehouseType] = None,
10922
10856
  ) -> Wait[GetWarehouseResponse]:
10923
- """Update a warehouse.
10924
-
10925
- Updates the configuration for a SQL warehouse.
10857
+ """Updates the configuration for a SQL warehouse.
10926
10858
 
10927
10859
  :param id: str
10928
10860
  Required. Id of the warehouse to configure.
@@ -10971,15 +10903,12 @@ class WarehousesAPI:
10971
10903
 
10972
10904
  Supported values: - Must be unique within an org. - Must be less than 100 characters.
10973
10905
  :param spot_instance_policy: :class:`SpotInstancePolicy` (optional)
10974
- Configurations whether the warehouse should use spot instances.
10975
10906
  :param tags: :class:`EndpointTags` (optional)
10976
10907
  A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes)
10977
10908
  associated with this SQL warehouse.
10978
10909
 
10979
10910
  Supported values: - Number of tags < 45.
10980
10911
  :param warehouse_type: :class:`EditWarehouseRequestWarehouseType` (optional)
10981
- Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute, you must set to `PRO` and
10982
- also set the field `enable_serverless_compute` to `true`.
10983
10912
 
10984
10913
  :returns:
10985
10914
  Long-running operation waiter for :class:`GetWarehouseResponse`.
@@ -11057,9 +10986,7 @@ class WarehousesAPI:
11057
10986
  ).result(timeout=timeout)
11058
10987
 
11059
10988
  def get(self, id: str) -> GetWarehouseResponse:
11060
- """Get warehouse info.
11061
-
11062
- Gets the information for a single SQL warehouse.
10989
+ """Gets the information for a single SQL warehouse.
11063
10990
 
11064
10991
  :param id: str
11065
10992
  Required. Id of the SQL warehouse.
@@ -11075,9 +11002,7 @@ class WarehousesAPI:
11075
11002
  return GetWarehouseResponse.from_dict(res)
11076
11003
 
11077
11004
  def get_permission_levels(self, warehouse_id: str) -> GetWarehousePermissionLevelsResponse:
11078
- """Get SQL warehouse permission levels.
11079
-
11080
- Gets the permission levels that a user can have on an object.
11005
+ """Gets the permission levels that a user can have on an object.
11081
11006
 
11082
11007
  :param warehouse_id: str
11083
11008
  The SQL warehouse for which to get or manage permissions.
@@ -11093,9 +11018,7 @@ class WarehousesAPI:
11093
11018
  return GetWarehousePermissionLevelsResponse.from_dict(res)
11094
11019
 
11095
11020
  def get_permissions(self, warehouse_id: str) -> WarehousePermissions:
11096
- """Get SQL warehouse permissions.
11097
-
11098
- Gets the permissions of a SQL warehouse. SQL warehouses can inherit permissions from their root
11021
+ """Gets the permissions of a SQL warehouse. SQL warehouses can inherit permissions from their root
11099
11022
  object.
11100
11023
 
11101
11024
  :param warehouse_id: str
@@ -11112,9 +11035,8 @@ class WarehousesAPI:
11112
11035
  return WarehousePermissions.from_dict(res)
11113
11036
 
11114
11037
  def get_workspace_warehouse_config(self) -> GetWorkspaceWarehouseConfigResponse:
11115
- """Get the workspace configuration.
11038
+ """Gets the workspace level configuration that is shared by all SQL warehouses in a workspace.
11116
11039
 
11117
- Gets the workspace level configuration that is shared by all SQL warehouses in a workspace.
11118
11040
 
11119
11041
  :returns: :class:`GetWorkspaceWarehouseConfigResponse`
11120
11042
  """
@@ -11127,9 +11049,7 @@ class WarehousesAPI:
11127
11049
  return GetWorkspaceWarehouseConfigResponse.from_dict(res)
11128
11050
 
11129
11051
  def list(self, *, run_as_user_id: Optional[int] = None) -> Iterator[EndpointInfo]:
11130
- """List warehouses.
11131
-
11132
- Lists all SQL warehouses that a user has manager permissions on.
11052
+ """Lists all SQL warehouses that a user has manager permissions on.
11133
11053
 
11134
11054
  :param run_as_user_id: int (optional)
11135
11055
  Service Principal which will be used to fetch the list of warehouses. If not specified, the user
@@ -11152,9 +11072,7 @@ class WarehousesAPI:
11152
11072
  def set_permissions(
11153
11073
  self, warehouse_id: str, *, access_control_list: Optional[List[WarehouseAccessControlRequest]] = None
11154
11074
  ) -> WarehousePermissions:
11155
- """Set SQL warehouse permissions.
11156
-
11157
- Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
11075
+ """Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
11158
11076
  permissions if none are specified. Objects can inherit permissions from their root object.
11159
11077
 
11160
11078
  :param warehouse_id: str
@@ -11187,9 +11105,7 @@ class WarehousesAPI:
11187
11105
  security_policy: Optional[SetWorkspaceWarehouseConfigRequestSecurityPolicy] = None,
11188
11106
  sql_configuration_parameters: Optional[RepeatedEndpointConfPairs] = None,
11189
11107
  ):
11190
- """Set the workspace configuration.
11191
-
11192
- Sets the workspace level configuration that is shared by all SQL warehouses in a workspace.
11108
+ """Sets the workspace level configuration that is shared by all SQL warehouses in a workspace.
11193
11109
 
11194
11110
  :param channel: :class:`Channel` (optional)
11195
11111
  Optional: Channel selection details
@@ -11243,9 +11159,7 @@ class WarehousesAPI:
11243
11159
  self._api.do("PUT", "/api/2.0/sql/config/warehouses", body=body, headers=headers)
11244
11160
 
11245
11161
  def start(self, id: str) -> Wait[GetWarehouseResponse]:
11246
- """Start a warehouse.
11247
-
11248
- Starts a SQL warehouse.
11162
+ """Starts a SQL warehouse.
11249
11163
 
11250
11164
  :param id: str
11251
11165
  Required. Id of the SQL warehouse.
@@ -11266,9 +11180,7 @@ class WarehousesAPI:
11266
11180
  return self.start(id=id).result(timeout=timeout)
11267
11181
 
11268
11182
  def stop(self, id: str) -> Wait[GetWarehouseResponse]:
11269
- """Stop a warehouse.
11270
-
11271
- Stops a SQL warehouse.
11183
+ """Stops a SQL warehouse.
11272
11184
 
11273
11185
  :param id: str
11274
11186
  Required. Id of the SQL warehouse.
@@ -11291,9 +11203,7 @@ class WarehousesAPI:
11291
11203
  def update_permissions(
11292
11204
  self, warehouse_id: str, *, access_control_list: Optional[List[WarehouseAccessControlRequest]] = None
11293
11205
  ) -> WarehousePermissions:
11294
- """Update SQL warehouse permissions.
11295
-
11296
- Updates the permissions on a SQL warehouse. SQL warehouses can inherit permissions from their root
11206
+ """Updates the permissions on a SQL warehouse. SQL warehouses can inherit permissions from their root
11297
11207
  object.
11298
11208
 
11299
11209
  :param warehouse_id: str