databricks-sdk 0.49.0__py3-none-any.whl → 0.50.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.

@@ -3390,38 +3390,6 @@ class PipelinesAPI:
3390
3390
  def __init__(self, api_client):
3391
3391
  self._api = api_client
3392
3392
 
3393
- def wait_get_pipeline_running(
3394
- self,
3395
- pipeline_id: str,
3396
- timeout=timedelta(minutes=20),
3397
- callback: Optional[Callable[[GetPipelineResponse], None]] = None,
3398
- ) -> GetPipelineResponse:
3399
- deadline = time.time() + timeout.total_seconds()
3400
- target_states = (PipelineState.RUNNING,)
3401
- failure_states = (PipelineState.FAILED,)
3402
- status_message = "polling..."
3403
- attempt = 1
3404
- while time.time() < deadline:
3405
- poll = self.get(pipeline_id=pipeline_id)
3406
- status = poll.state
3407
- status_message = poll.cause
3408
- if status in target_states:
3409
- return poll
3410
- if callback:
3411
- callback(poll)
3412
- if status in failure_states:
3413
- msg = f"failed to reach RUNNING, got {status}: {status_message}"
3414
- raise OperationFailed(msg)
3415
- prefix = f"pipeline_id={pipeline_id}"
3416
- sleep = attempt
3417
- if sleep > 10:
3418
- # sleep 10s max per attempt
3419
- sleep = 10
3420
- _LOG.debug(f"{prefix}: ({status}) {status_message} (sleeping ~{sleep}s)")
3421
- time.sleep(sleep + random.random())
3422
- attempt += 1
3423
- raise TimeoutError(f"timed out after {timeout}: {status_message}")
3424
-
3425
3393
  def wait_get_pipeline_idle(
3426
3394
  self,
3427
3395
  pipeline_id: str,
@@ -849,8 +849,9 @@ class CreateServingEndpoint:
849
849
  workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores."""
850
850
 
851
851
  ai_gateway: Optional[AiGatewayConfig] = None
852
- """The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned
853
- throughput endpoints are currently supported."""
852
+ """The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned
853
+ throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only
854
+ support inference tables."""
854
855
 
855
856
  budget_policy_id: Optional[str] = None
856
857
  """The budget policy to be applied to the serving endpoint."""
@@ -3531,8 +3532,9 @@ class ServerLogsResponse:
3531
3532
  @dataclass
3532
3533
  class ServingEndpoint:
3533
3534
  ai_gateway: Optional[AiGatewayConfig] = None
3534
- """The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned
3535
- throughput endpoints are currently supported."""
3535
+ """The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned
3536
+ throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only
3537
+ support inference tables."""
3536
3538
 
3537
3539
  budget_policy_id: Optional[str] = None
3538
3540
  """The budget policy associated with the endpoint."""
@@ -3749,8 +3751,9 @@ class ServingEndpointAccessControlResponse:
3749
3751
  @dataclass
3750
3752
  class ServingEndpointDetailed:
3751
3753
  ai_gateway: Optional[AiGatewayConfig] = None
3752
- """The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned
3753
- throughput endpoints are currently supported."""
3754
+ """The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned
3755
+ throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only
3756
+ support inference tables."""
3754
3757
 
3755
3758
  budget_policy_id: Optional[str] = None
3756
3759
  """The budget policy associated with the endpoint."""
@@ -4242,8 +4245,9 @@ class ServingEndpointsAPI:
4242
4245
  The name of the serving endpoint. This field is required and must be unique across a Databricks
4243
4246
  workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores.
4244
4247
  :param ai_gateway: :class:`AiGatewayConfig` (optional)
4245
- The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned
4246
- throughput endpoints are currently supported.
4248
+ The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned throughput,
4249
+ and pay-per-token endpoints are fully supported; agent endpoints currently only support inference
4250
+ tables.
4247
4251
  :param budget_policy_id: str (optional)
4248
4252
  The budget policy to be applied to the serving endpoint.
4249
4253
  :param config: :class:`EndpointCoreConfigInput` (optional)
@@ -4533,8 +4537,7 @@ class ServingEndpointsAPI:
4533
4537
  def put(self, name: str, *, rate_limits: Optional[List[RateLimit]] = None) -> PutResponse:
4534
4538
  """Update rate limits of a serving endpoint.
4535
4539
 
4536
- Used to update the rate limits of a serving endpoint. NOTE: Only foundation model endpoints are
4537
- currently supported. For external models, use AI Gateway to manage rate limits.
4540
+ Deprecated: Please use AI Gateway to manage rate limits instead.
4538
4541
 
4539
4542
  :param name: str
4540
4543
  The name of the serving endpoint whose rate limits are being updated. This field is required.
@@ -4566,8 +4569,8 @@ class ServingEndpointsAPI:
4566
4569
  ) -> PutAiGatewayResponse:
4567
4570
  """Update AI Gateway of a serving endpoint.
4568
4571
 
4569
- Used to update the AI Gateway of a serving endpoint. NOTE: Only external model and provisioned
4570
- throughput endpoints are currently supported.
4572
+ Used to update the AI Gateway of a serving endpoint. NOTE: External model, provisioned throughput, and
4573
+ pay-per-token endpoints are fully supported; agent endpoints currently only support inference tables.
4571
4574
 
4572
4575
  :param name: str
4573
4576
  The name of the serving endpoint whose AI Gateway is being updated. This field is required.
@@ -2004,6 +2004,108 @@ class Empty:
2004
2004
  return cls()
2005
2005
 
2006
2006
 
2007
+ @dataclass
2008
+ class EnableExportNotebook:
2009
+ boolean_val: Optional[BooleanMessage] = None
2010
+
2011
+ setting_name: Optional[str] = None
2012
+ """Name of the corresponding setting. This field is populated in the response, but it will not be
2013
+ respected even if it's set in the request body. The setting name in the path parameter will be
2014
+ respected instead. Setting name is required to be 'default' if the setting only has one instance
2015
+ per workspace."""
2016
+
2017
+ def as_dict(self) -> dict:
2018
+ """Serializes the EnableExportNotebook into a dictionary suitable for use as a JSON request body."""
2019
+ body = {}
2020
+ if self.boolean_val:
2021
+ body["boolean_val"] = self.boolean_val.as_dict()
2022
+ if self.setting_name is not None:
2023
+ body["setting_name"] = self.setting_name
2024
+ return body
2025
+
2026
+ def as_shallow_dict(self) -> dict:
2027
+ """Serializes the EnableExportNotebook into a shallow dictionary of its immediate attributes."""
2028
+ body = {}
2029
+ if self.boolean_val:
2030
+ body["boolean_val"] = self.boolean_val
2031
+ if self.setting_name is not None:
2032
+ body["setting_name"] = self.setting_name
2033
+ return body
2034
+
2035
+ @classmethod
2036
+ def from_dict(cls, d: Dict[str, Any]) -> EnableExportNotebook:
2037
+ """Deserializes the EnableExportNotebook from a dictionary."""
2038
+ return cls(boolean_val=_from_dict(d, "boolean_val", BooleanMessage), setting_name=d.get("setting_name", None))
2039
+
2040
+
2041
+ @dataclass
2042
+ class EnableNotebookTableClipboard:
2043
+ boolean_val: Optional[BooleanMessage] = None
2044
+
2045
+ setting_name: Optional[str] = None
2046
+ """Name of the corresponding setting. This field is populated in the response, but it will not be
2047
+ respected even if it's set in the request body. The setting name in the path parameter will be
2048
+ respected instead. Setting name is required to be 'default' if the setting only has one instance
2049
+ per workspace."""
2050
+
2051
+ def as_dict(self) -> dict:
2052
+ """Serializes the EnableNotebookTableClipboard into a dictionary suitable for use as a JSON request body."""
2053
+ body = {}
2054
+ if self.boolean_val:
2055
+ body["boolean_val"] = self.boolean_val.as_dict()
2056
+ if self.setting_name is not None:
2057
+ body["setting_name"] = self.setting_name
2058
+ return body
2059
+
2060
+ def as_shallow_dict(self) -> dict:
2061
+ """Serializes the EnableNotebookTableClipboard into a shallow dictionary of its immediate attributes."""
2062
+ body = {}
2063
+ if self.boolean_val:
2064
+ body["boolean_val"] = self.boolean_val
2065
+ if self.setting_name is not None:
2066
+ body["setting_name"] = self.setting_name
2067
+ return body
2068
+
2069
+ @classmethod
2070
+ def from_dict(cls, d: Dict[str, Any]) -> EnableNotebookTableClipboard:
2071
+ """Deserializes the EnableNotebookTableClipboard from a dictionary."""
2072
+ return cls(boolean_val=_from_dict(d, "boolean_val", BooleanMessage), setting_name=d.get("setting_name", None))
2073
+
2074
+
2075
+ @dataclass
2076
+ class EnableResultsDownloading:
2077
+ boolean_val: Optional[BooleanMessage] = None
2078
+
2079
+ setting_name: Optional[str] = None
2080
+ """Name of the corresponding setting. This field is populated in the response, but it will not be
2081
+ respected even if it's set in the request body. The setting name in the path parameter will be
2082
+ respected instead. Setting name is required to be 'default' if the setting only has one instance
2083
+ per workspace."""
2084
+
2085
+ def as_dict(self) -> dict:
2086
+ """Serializes the EnableResultsDownloading into a dictionary suitable for use as a JSON request body."""
2087
+ body = {}
2088
+ if self.boolean_val:
2089
+ body["boolean_val"] = self.boolean_val.as_dict()
2090
+ if self.setting_name is not None:
2091
+ body["setting_name"] = self.setting_name
2092
+ return body
2093
+
2094
+ def as_shallow_dict(self) -> dict:
2095
+ """Serializes the EnableResultsDownloading into a shallow dictionary of its immediate attributes."""
2096
+ body = {}
2097
+ if self.boolean_val:
2098
+ body["boolean_val"] = self.boolean_val
2099
+ if self.setting_name is not None:
2100
+ body["setting_name"] = self.setting_name
2101
+ return body
2102
+
2103
+ @classmethod
2104
+ def from_dict(cls, d: Dict[str, Any]) -> EnableResultsDownloading:
2105
+ """Deserializes the EnableResultsDownloading from a dictionary."""
2106
+ return cls(boolean_val=_from_dict(d, "boolean_val", BooleanMessage), setting_name=d.get("setting_name", None))
2107
+
2108
+
2007
2109
  @dataclass
2008
2110
  class EnhancedSecurityMonitoring:
2009
2111
  """SHIELD feature: ESM"""
@@ -4680,6 +4782,162 @@ class UpdateDisableLegacyFeaturesRequest:
4680
4782
  )
4681
4783
 
4682
4784
 
4785
+ @dataclass
4786
+ class UpdateEnableExportNotebookRequest:
4787
+ """Details required to update a setting."""
4788
+
4789
+ allow_missing: bool
4790
+ """This should always be set to true for Settings API. Added for AIP compliance."""
4791
+
4792
+ setting: EnableExportNotebook
4793
+
4794
+ field_mask: str
4795
+ """The field mask must be a single string, with multiple fields separated by commas (no spaces).
4796
+ The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields
4797
+ (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed,
4798
+ as only the entire collection field can be specified. Field names must exactly match the
4799
+ resource field names.
4800
+
4801
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
4802
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the
4803
+ API changes in the future."""
4804
+
4805
+ def as_dict(self) -> dict:
4806
+ """Serializes the UpdateEnableExportNotebookRequest into a dictionary suitable for use as a JSON request body."""
4807
+ body = {}
4808
+ if self.allow_missing is not None:
4809
+ body["allow_missing"] = self.allow_missing
4810
+ if self.field_mask is not None:
4811
+ body["field_mask"] = self.field_mask
4812
+ if self.setting:
4813
+ body["setting"] = self.setting.as_dict()
4814
+ return body
4815
+
4816
+ def as_shallow_dict(self) -> dict:
4817
+ """Serializes the UpdateEnableExportNotebookRequest into a shallow dictionary of its immediate attributes."""
4818
+ body = {}
4819
+ if self.allow_missing is not None:
4820
+ body["allow_missing"] = self.allow_missing
4821
+ if self.field_mask is not None:
4822
+ body["field_mask"] = self.field_mask
4823
+ if self.setting:
4824
+ body["setting"] = self.setting
4825
+ return body
4826
+
4827
+ @classmethod
4828
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateEnableExportNotebookRequest:
4829
+ """Deserializes the UpdateEnableExportNotebookRequest from a dictionary."""
4830
+ return cls(
4831
+ allow_missing=d.get("allow_missing", None),
4832
+ field_mask=d.get("field_mask", None),
4833
+ setting=_from_dict(d, "setting", EnableExportNotebook),
4834
+ )
4835
+
4836
+
4837
+ @dataclass
4838
+ class UpdateEnableNotebookTableClipboardRequest:
4839
+ """Details required to update a setting."""
4840
+
4841
+ allow_missing: bool
4842
+ """This should always be set to true for Settings API. Added for AIP compliance."""
4843
+
4844
+ setting: EnableNotebookTableClipboard
4845
+
4846
+ field_mask: str
4847
+ """The field mask must be a single string, with multiple fields separated by commas (no spaces).
4848
+ The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields
4849
+ (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed,
4850
+ as only the entire collection field can be specified. Field names must exactly match the
4851
+ resource field names.
4852
+
4853
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
4854
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the
4855
+ API changes in the future."""
4856
+
4857
+ def as_dict(self) -> dict:
4858
+ """Serializes the UpdateEnableNotebookTableClipboardRequest into a dictionary suitable for use as a JSON request body."""
4859
+ body = {}
4860
+ if self.allow_missing is not None:
4861
+ body["allow_missing"] = self.allow_missing
4862
+ if self.field_mask is not None:
4863
+ body["field_mask"] = self.field_mask
4864
+ if self.setting:
4865
+ body["setting"] = self.setting.as_dict()
4866
+ return body
4867
+
4868
+ def as_shallow_dict(self) -> dict:
4869
+ """Serializes the UpdateEnableNotebookTableClipboardRequest into a shallow dictionary of its immediate attributes."""
4870
+ body = {}
4871
+ if self.allow_missing is not None:
4872
+ body["allow_missing"] = self.allow_missing
4873
+ if self.field_mask is not None:
4874
+ body["field_mask"] = self.field_mask
4875
+ if self.setting:
4876
+ body["setting"] = self.setting
4877
+ return body
4878
+
4879
+ @classmethod
4880
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateEnableNotebookTableClipboardRequest:
4881
+ """Deserializes the UpdateEnableNotebookTableClipboardRequest from a dictionary."""
4882
+ return cls(
4883
+ allow_missing=d.get("allow_missing", None),
4884
+ field_mask=d.get("field_mask", None),
4885
+ setting=_from_dict(d, "setting", EnableNotebookTableClipboard),
4886
+ )
4887
+
4888
+
4889
+ @dataclass
4890
+ class UpdateEnableResultsDownloadingRequest:
4891
+ """Details required to update a setting."""
4892
+
4893
+ allow_missing: bool
4894
+ """This should always be set to true for Settings API. Added for AIP compliance."""
4895
+
4896
+ setting: EnableResultsDownloading
4897
+
4898
+ field_mask: str
4899
+ """The field mask must be a single string, with multiple fields separated by commas (no spaces).
4900
+ The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields
4901
+ (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed,
4902
+ as only the entire collection field can be specified. Field names must exactly match the
4903
+ resource field names.
4904
+
4905
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
4906
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the
4907
+ API changes in the future."""
4908
+
4909
+ def as_dict(self) -> dict:
4910
+ """Serializes the UpdateEnableResultsDownloadingRequest into a dictionary suitable for use as a JSON request body."""
4911
+ body = {}
4912
+ if self.allow_missing is not None:
4913
+ body["allow_missing"] = self.allow_missing
4914
+ if self.field_mask is not None:
4915
+ body["field_mask"] = self.field_mask
4916
+ if self.setting:
4917
+ body["setting"] = self.setting.as_dict()
4918
+ return body
4919
+
4920
+ def as_shallow_dict(self) -> dict:
4921
+ """Serializes the UpdateEnableResultsDownloadingRequest into a shallow dictionary of its immediate attributes."""
4922
+ body = {}
4923
+ if self.allow_missing is not None:
4924
+ body["allow_missing"] = self.allow_missing
4925
+ if self.field_mask is not None:
4926
+ body["field_mask"] = self.field_mask
4927
+ if self.setting:
4928
+ body["setting"] = self.setting
4929
+ return body
4930
+
4931
+ @classmethod
4932
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateEnableResultsDownloadingRequest:
4933
+ """Deserializes the UpdateEnableResultsDownloadingRequest from a dictionary."""
4934
+ return cls(
4935
+ allow_missing=d.get("allow_missing", None),
4936
+ field_mask=d.get("field_mask", None),
4937
+ setting=_from_dict(d, "setting", EnableResultsDownloading),
4938
+ )
4939
+
4940
+
4683
4941
  @dataclass
4684
4942
  class UpdateEnhancedSecurityMonitoringSettingRequest:
4685
4943
  """Details required to update a setting."""
@@ -5919,10 +6177,9 @@ class DefaultNamespaceAPI:
5919
6177
  class DisableLegacyAccessAPI:
5920
6178
  """'Disabling legacy access' has the following impacts:
5921
6179
 
5922
- 1. Disables direct access to the Hive Metastore. However, you can still access Hive Metastore through HMS
5923
- Federation. 2. Disables Fallback Mode (docs link) on any External Location access from the workspace. 3.
5924
- Alters DBFS path access to use External Location permissions in place of legacy credentials. 4. Enforces
5925
- Unity Catalog access on all path based access."""
6180
+ 1. Disables direct access to Hive Metastores from the workspace. However, you can still access a Hive
6181
+ Metastore through Hive Metastore federation. 2. Disables fallback mode on external location access from
6182
+ the workspace. 3. Disables Databricks Runtime versions prior to 13.3LTS."""
5926
6183
 
5927
6184
  def __init__(self, api_client):
5928
6185
  self._api = api_client
@@ -6232,6 +6489,70 @@ class DisableLegacyFeaturesAPI:
6232
6489
  return DisableLegacyFeatures.from_dict(res)
6233
6490
 
6234
6491
 
6492
+ class EnableExportNotebookAPI:
6493
+ """Controls whether users can export notebooks and files from the Workspace. By default, this setting is
6494
+ enabled."""
6495
+
6496
+ def __init__(self, api_client):
6497
+ self._api = api_client
6498
+
6499
+ def get_enable_export_notebook(self) -> EnableExportNotebook:
6500
+ """Get the Enable Export Notebook setting.
6501
+
6502
+ Gets the Enable Export Notebook setting.
6503
+
6504
+ :returns: :class:`EnableExportNotebook`
6505
+ """
6506
+
6507
+ headers = {
6508
+ "Accept": "application/json",
6509
+ }
6510
+
6511
+ res = self._api.do("GET", "/api/2.0/settings/types/enable-export-notebook/names/default", headers=headers)
6512
+ return EnableExportNotebook.from_dict(res)
6513
+
6514
+ def patch_enable_export_notebook(
6515
+ self, allow_missing: bool, setting: EnableExportNotebook, field_mask: str
6516
+ ) -> EnableExportNotebook:
6517
+ """Update the Enable Export Notebook setting.
6518
+
6519
+ Updates the Enable Export Notebook setting. The model follows eventual consistency, which means the
6520
+ get after the update operation might receive stale values for some time.
6521
+
6522
+ :param allow_missing: bool
6523
+ This should always be set to true for Settings API. Added for AIP compliance.
6524
+ :param setting: :class:`EnableExportNotebook`
6525
+ :param field_mask: str
6526
+ The field mask must be a single string, with multiple fields separated by commas (no spaces). The
6527
+ field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g.,
6528
+ `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only
6529
+ the entire collection field can be specified. Field names must exactly match the resource field
6530
+ names.
6531
+
6532
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
6533
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API
6534
+ changes in the future.
6535
+
6536
+ :returns: :class:`EnableExportNotebook`
6537
+ """
6538
+ body = {}
6539
+ if allow_missing is not None:
6540
+ body["allow_missing"] = allow_missing
6541
+ if field_mask is not None:
6542
+ body["field_mask"] = field_mask
6543
+ if setting is not None:
6544
+ body["setting"] = setting.as_dict()
6545
+ headers = {
6546
+ "Accept": "application/json",
6547
+ "Content-Type": "application/json",
6548
+ }
6549
+
6550
+ res = self._api.do(
6551
+ "PATCH", "/api/2.0/settings/types/enable-export-notebook/names/default", body=body, headers=headers
6552
+ )
6553
+ return EnableExportNotebook.from_dict(res)
6554
+
6555
+
6235
6556
  class EnableIpAccessListsAPI:
6236
6557
  """Controls the enforcement of IP access lists for accessing the account console. Allowing you to enable or
6237
6558
  disable restricted access based on IP addresses."""
@@ -6341,6 +6662,135 @@ class EnableIpAccessListsAPI:
6341
6662
  return AccountIpAccessEnable.from_dict(res)
6342
6663
 
6343
6664
 
6665
+ class EnableNotebookTableClipboardAPI:
6666
+ """Controls whether users can copy tabular data to the clipboard via the UI. By default, this setting is
6667
+ enabled."""
6668
+
6669
+ def __init__(self, api_client):
6670
+ self._api = api_client
6671
+
6672
+ def get_enable_notebook_table_clipboard(self) -> EnableNotebookTableClipboard:
6673
+ """Get the Enable Notebook Table Clipboard setting.
6674
+
6675
+ Gets the Enable Notebook Table Clipboard setting.
6676
+
6677
+ :returns: :class:`EnableNotebookTableClipboard`
6678
+ """
6679
+
6680
+ headers = {
6681
+ "Accept": "application/json",
6682
+ }
6683
+
6684
+ res = self._api.do(
6685
+ "GET", "/api/2.0/settings/types/enable-notebook-table-clipboard/names/default", headers=headers
6686
+ )
6687
+ return EnableNotebookTableClipboard.from_dict(res)
6688
+
6689
+ def patch_enable_notebook_table_clipboard(
6690
+ self, allow_missing: bool, setting: EnableNotebookTableClipboard, field_mask: str
6691
+ ) -> EnableNotebookTableClipboard:
6692
+ """Update the Enable Notebook Table Clipboard setting.
6693
+
6694
+ Updates the Enable Notebook Table Clipboard setting. The model follows eventual consistency, which
6695
+ means the get after the update operation might receive stale values for some time.
6696
+
6697
+ :param allow_missing: bool
6698
+ This should always be set to true for Settings API. Added for AIP compliance.
6699
+ :param setting: :class:`EnableNotebookTableClipboard`
6700
+ :param field_mask: str
6701
+ The field mask must be a single string, with multiple fields separated by commas (no spaces). The
6702
+ field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g.,
6703
+ `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only
6704
+ the entire collection field can be specified. Field names must exactly match the resource field
6705
+ names.
6706
+
6707
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
6708
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API
6709
+ changes in the future.
6710
+
6711
+ :returns: :class:`EnableNotebookTableClipboard`
6712
+ """
6713
+ body = {}
6714
+ if allow_missing is not None:
6715
+ body["allow_missing"] = allow_missing
6716
+ if field_mask is not None:
6717
+ body["field_mask"] = field_mask
6718
+ if setting is not None:
6719
+ body["setting"] = setting.as_dict()
6720
+ headers = {
6721
+ "Accept": "application/json",
6722
+ "Content-Type": "application/json",
6723
+ }
6724
+
6725
+ res = self._api.do(
6726
+ "PATCH", "/api/2.0/settings/types/enable-notebook-table-clipboard/names/default", body=body, headers=headers
6727
+ )
6728
+ return EnableNotebookTableClipboard.from_dict(res)
6729
+
6730
+
6731
+ class EnableResultsDownloadingAPI:
6732
+ """Controls whether users can download notebook results. By default, this setting is enabled."""
6733
+
6734
+ def __init__(self, api_client):
6735
+ self._api = api_client
6736
+
6737
+ def get_enable_results_downloading(self) -> EnableResultsDownloading:
6738
+ """Get the Enable Results Downloading setting.
6739
+
6740
+ Gets the Enable Results Downloading setting.
6741
+
6742
+ :returns: :class:`EnableResultsDownloading`
6743
+ """
6744
+
6745
+ headers = {
6746
+ "Accept": "application/json",
6747
+ }
6748
+
6749
+ res = self._api.do("GET", "/api/2.0/settings/types/enable-results-downloading/names/default", headers=headers)
6750
+ return EnableResultsDownloading.from_dict(res)
6751
+
6752
+ def patch_enable_results_downloading(
6753
+ self, allow_missing: bool, setting: EnableResultsDownloading, field_mask: str
6754
+ ) -> EnableResultsDownloading:
6755
+ """Update the Enable Results Downloading setting.
6756
+
6757
+ Updates the Enable Results Downloading setting. The model follows eventual consistency, which means
6758
+ the get after the update operation might receive stale values for some time.
6759
+
6760
+ :param allow_missing: bool
6761
+ This should always be set to true for Settings API. Added for AIP compliance.
6762
+ :param setting: :class:`EnableResultsDownloading`
6763
+ :param field_mask: str
6764
+ The field mask must be a single string, with multiple fields separated by commas (no spaces). The
6765
+ field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g.,
6766
+ `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only
6767
+ the entire collection field can be specified. Field names must exactly match the resource field
6768
+ names.
6769
+
6770
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
6771
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API
6772
+ changes in the future.
6773
+
6774
+ :returns: :class:`EnableResultsDownloading`
6775
+ """
6776
+ body = {}
6777
+ if allow_missing is not None:
6778
+ body["allow_missing"] = allow_missing
6779
+ if field_mask is not None:
6780
+ body["field_mask"] = field_mask
6781
+ if setting is not None:
6782
+ body["setting"] = setting.as_dict()
6783
+ headers = {
6784
+ "Accept": "application/json",
6785
+ "Content-Type": "application/json",
6786
+ }
6787
+
6788
+ res = self._api.do(
6789
+ "PATCH", "/api/2.0/settings/types/enable-results-downloading/names/default", body=body, headers=headers
6790
+ )
6791
+ return EnableResultsDownloading.from_dict(res)
6792
+
6793
+
6344
6794
  class EnhancedSecurityMonitoringAPI:
6345
6795
  """Controls whether enhanced security monitoring is enabled for the current workspace. If the compliance
6346
6796
  security profile is enabled, this is automatically enabled. By default, it is disabled. However, if the
@@ -7351,6 +7801,9 @@ class SettingsAPI:
7351
7801
  self._default_namespace = DefaultNamespaceAPI(self._api)
7352
7802
  self._disable_legacy_access = DisableLegacyAccessAPI(self._api)
7353
7803
  self._disable_legacy_dbfs = DisableLegacyDbfsAPI(self._api)
7804
+ self._enable_export_notebook = EnableExportNotebookAPI(self._api)
7805
+ self._enable_notebook_table_clipboard = EnableNotebookTableClipboardAPI(self._api)
7806
+ self._enable_results_downloading = EnableResultsDownloadingAPI(self._api)
7354
7807
  self._enhanced_security_monitoring = EnhancedSecurityMonitoringAPI(self._api)
7355
7808
  self._restrict_workspace_admins = RestrictWorkspaceAdminsAPI(self._api)
7356
7809
 
@@ -7389,6 +7842,21 @@ class SettingsAPI:
7389
7842
  """When this setting is on, access to DBFS root and DBFS mounts is disallowed (as well as creation of new mounts)."""
7390
7843
  return self._disable_legacy_dbfs
7391
7844
 
7845
+ @property
7846
+ def enable_export_notebook(self) -> EnableExportNotebookAPI:
7847
+ """Controls whether users can export notebooks and files from the Workspace."""
7848
+ return self._enable_export_notebook
7849
+
7850
+ @property
7851
+ def enable_notebook_table_clipboard(self) -> EnableNotebookTableClipboardAPI:
7852
+ """Controls whether users can copy tabular data to the clipboard via the UI."""
7853
+ return self._enable_notebook_table_clipboard
7854
+
7855
+ @property
7856
+ def enable_results_downloading(self) -> EnableResultsDownloadingAPI:
7857
+ """Controls whether users can download notebook results."""
7858
+ return self._enable_results_downloading
7859
+
7392
7860
  @property
7393
7861
  def enhanced_security_monitoring(self) -> EnhancedSecurityMonitoringAPI:
7394
7862
  """Controls whether enhanced security monitoring is enabled for the current workspace."""
@@ -5194,6 +5194,11 @@ class QueryInfo:
5194
5194
  channel_used: Optional[ChannelInfo] = None
5195
5195
  """SQL Warehouse channel information at the time of query execution"""
5196
5196
 
5197
+ client_application: Optional[str] = None
5198
+ """Client application that ran the statement. For example: Databricks SQL Editor, Tableau, and
5199
+ Power BI. This field is derived from information provided by client applications. While values
5200
+ are expected to remain static over time, this cannot be guaranteed."""
5201
+
5197
5202
  duration: Optional[int] = None
5198
5203
  """Total execution time of the statement ( excluding result fetch time )."""
5199
5204
 
@@ -5271,6 +5276,8 @@ class QueryInfo:
5271
5276
  body = {}
5272
5277
  if self.channel_used:
5273
5278
  body["channel_used"] = self.channel_used.as_dict()
5279
+ if self.client_application is not None:
5280
+ body["client_application"] = self.client_application
5274
5281
  if self.duration is not None:
5275
5282
  body["duration"] = self.duration
5276
5283
  if self.endpoint_id is not None:
@@ -5322,6 +5329,8 @@ class QueryInfo:
5322
5329
  body = {}
5323
5330
  if self.channel_used:
5324
5331
  body["channel_used"] = self.channel_used
5332
+ if self.client_application is not None:
5333
+ body["client_application"] = self.client_application
5325
5334
  if self.duration is not None:
5326
5335
  body["duration"] = self.duration
5327
5336
  if self.endpoint_id is not None:
@@ -5373,6 +5382,7 @@ class QueryInfo:
5373
5382
  """Deserializes the QueryInfo from a dictionary."""
5374
5383
  return cls(
5375
5384
  channel_used=_from_dict(d, "channel_used", ChannelInfo),
5385
+ client_application=d.get("client_application", None),
5376
5386
  duration=d.get("duration", None),
5377
5387
  endpoint_id=d.get("endpoint_id", None),
5378
5388
  error_message=d.get("error_message", None),
@@ -7536,6 +7546,7 @@ class WarehousePermissionLevel(Enum):
7536
7546
  CAN_MANAGE = "CAN_MANAGE"
7537
7547
  CAN_MONITOR = "CAN_MONITOR"
7538
7548
  CAN_USE = "CAN_USE"
7549
+ CAN_VIEW = "CAN_VIEW"
7539
7550
  IS_OWNER = "IS_OWNER"
7540
7551
 
7541
7552