databricks-sdk 0.18.0__py3-none-any.whl → 0.19.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 (33) hide show
  1. databricks/sdk/__init__.py +30 -1
  2. databricks/sdk/azure.py +14 -0
  3. databricks/sdk/clock.py +49 -0
  4. databricks/sdk/config.py +7 -0
  5. databricks/sdk/core.py +2 -1
  6. databricks/sdk/credentials_provider.py +14 -3
  7. databricks/sdk/environments.py +1 -1
  8. databricks/sdk/errors/__init__.py +1 -1
  9. databricks/sdk/errors/mapper.py +5 -5
  10. databricks/sdk/mixins/workspace.py +3 -3
  11. databricks/sdk/retries.py +9 -5
  12. databricks/sdk/service/catalog.py +173 -78
  13. databricks/sdk/service/compute.py +86 -25
  14. databricks/sdk/service/files.py +136 -22
  15. databricks/sdk/service/iam.py +42 -36
  16. databricks/sdk/service/jobs.py +192 -14
  17. databricks/sdk/service/ml.py +27 -36
  18. databricks/sdk/service/oauth2.py +3 -4
  19. databricks/sdk/service/pipelines.py +50 -29
  20. databricks/sdk/service/settings.py +338 -57
  21. databricks/sdk/service/sharing.py +3 -4
  22. databricks/sdk/service/sql.py +24 -17
  23. databricks/sdk/service/vectorsearch.py +13 -17
  24. databricks/sdk/service/workspace.py +18 -7
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/METADATA +1 -1
  27. databricks_sdk-0.19.0.dist-info/RECORD +53 -0
  28. databricks_sdk-0.18.0.dist-info/RECORD +0 -52
  29. /databricks/sdk/errors/{mapping.py → platform.py} +0 -0
  30. {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/LICENSE +0 -0
  31. {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/NOTICE +0 -0
  32. {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/WHEEL +0 -0
  33. {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/top_level.txt +0 -0
@@ -784,6 +784,7 @@ class ConnectionInfoSecurableKind(Enum):
784
784
  class ConnectionType(Enum):
785
785
  """The type of connection."""
786
786
 
787
+ BIGQUERY = 'BIGQUERY'
787
788
  DATABRICKS = 'DATABRICKS'
788
789
  MYSQL = 'MYSQL'
789
790
  POSTGRESQL = 'POSTGRESQL'
@@ -3136,6 +3137,53 @@ class MonitorNotificationsConfig:
3136
3137
  return cls(on_failure=_from_dict(d, 'on_failure', MonitorDestinations))
3137
3138
 
3138
3139
 
3140
+ @dataclass
3141
+ class MonitorRefreshInfo:
3142
+ end_time_ms: Optional[int] = None
3143
+ """The time at which the refresh ended, in epoch milliseconds."""
3144
+
3145
+ message: Optional[str] = None
3146
+ """An optional message to give insight into the current state of the job (e.g. FAILURE messages)."""
3147
+
3148
+ refresh_id: Optional[int] = None
3149
+ """The ID of the refresh."""
3150
+
3151
+ start_time_ms: Optional[int] = None
3152
+ """The time at which the refresh started, in epoch milliseconds."""
3153
+
3154
+ state: Optional[MonitorRefreshInfoState] = None
3155
+ """The current state of the refresh."""
3156
+
3157
+ def as_dict(self) -> dict:
3158
+ """Serializes the MonitorRefreshInfo into a dictionary suitable for use as a JSON request body."""
3159
+ body = {}
3160
+ if self.end_time_ms is not None: body['end_time_ms'] = self.end_time_ms
3161
+ if self.message is not None: body['message'] = self.message
3162
+ if self.refresh_id is not None: body['refresh_id'] = self.refresh_id
3163
+ if self.start_time_ms is not None: body['start_time_ms'] = self.start_time_ms
3164
+ if self.state is not None: body['state'] = self.state.value
3165
+ return body
3166
+
3167
+ @classmethod
3168
+ def from_dict(cls, d: Dict[str, any]) -> MonitorRefreshInfo:
3169
+ """Deserializes the MonitorRefreshInfo from a dictionary."""
3170
+ return cls(end_time_ms=d.get('end_time_ms', None),
3171
+ message=d.get('message', None),
3172
+ refresh_id=d.get('refresh_id', None),
3173
+ start_time_ms=d.get('start_time_ms', None),
3174
+ state=_enum(d, 'state', MonitorRefreshInfoState))
3175
+
3176
+
3177
+ class MonitorRefreshInfoState(Enum):
3178
+ """The current state of the refresh."""
3179
+
3180
+ CANCELED = 'CANCELED'
3181
+ FAILED = 'FAILED'
3182
+ PENDING = 'PENDING'
3183
+ RUNNING = 'RUNNING'
3184
+ SUCCESS = 'SUCCESS'
3185
+
3186
+
3139
3187
  @dataclass
3140
3188
  class MonitorTimeSeriesProfileType:
3141
3189
  granularities: Optional[List[str]] = None
@@ -4115,9 +4163,6 @@ class UpdateConnection:
4115
4163
  options: Dict[str, str]
4116
4164
  """A map of key-value properties attached to the securable."""
4117
4165
 
4118
- name: Optional[str] = None
4119
- """Name of the connection."""
4120
-
4121
4166
  name_arg: Optional[str] = None
4122
4167
  """Name of the connection."""
4123
4168
 
@@ -4130,7 +4175,6 @@ class UpdateConnection:
4130
4175
  def as_dict(self) -> dict:
4131
4176
  """Serializes the UpdateConnection into a dictionary suitable for use as a JSON request body."""
4132
4177
  body = {}
4133
- if self.name is not None: body['name'] = self.name
4134
4178
  if self.name_arg is not None: body['name_arg'] = self.name_arg
4135
4179
  if self.new_name is not None: body['new_name'] = self.new_name
4136
4180
  if self.options: body['options'] = self.options
@@ -4140,8 +4184,7 @@ class UpdateConnection:
4140
4184
  @classmethod
4141
4185
  def from_dict(cls, d: Dict[str, any]) -> UpdateConnection:
4142
4186
  """Deserializes the UpdateConnection from a dictionary."""
4143
- return cls(name=d.get('name', None),
4144
- name_arg=d.get('name_arg', None),
4187
+ return cls(name_arg=d.get('name_arg', None),
4145
4188
  new_name=d.get('new_name', None),
4146
4189
  options=d.get('options', None),
4147
4190
  owner=d.get('owner', None))
@@ -4251,9 +4294,6 @@ class UpdateMetastore:
4251
4294
  id: Optional[str] = None
4252
4295
  """Unique ID of the metastore."""
4253
4296
 
4254
- name: Optional[str] = None
4255
- """The user-specified name of the metastore."""
4256
-
4257
4297
  new_name: Optional[str] = None
4258
4298
  """New name for the metastore."""
4259
4299
 
@@ -4276,7 +4316,6 @@ class UpdateMetastore:
4276
4316
  'delta_sharing_recipient_token_lifetime_in_seconds'] = self.delta_sharing_recipient_token_lifetime_in_seconds
4277
4317
  if self.delta_sharing_scope is not None: body['delta_sharing_scope'] = self.delta_sharing_scope.value
4278
4318
  if self.id is not None: body['id'] = self.id
4279
- if self.name is not None: body['name'] = self.name
4280
4319
  if self.new_name is not None: body['new_name'] = self.new_name
4281
4320
  if self.owner is not None: body['owner'] = self.owner
4282
4321
  if self.privilege_model_version is not None:
@@ -4293,7 +4332,6 @@ class UpdateMetastore:
4293
4332
  'delta_sharing_recipient_token_lifetime_in_seconds', None),
4294
4333
  delta_sharing_scope=_enum(d, 'delta_sharing_scope', UpdateMetastoreDeltaSharingScope),
4295
4334
  id=d.get('id', None),
4296
- name=d.get('name', None),
4297
4335
  new_name=d.get('new_name', None),
4298
4336
  owner=d.get('owner', None),
4299
4337
  privilege_model_version=d.get('privilege_model_version', None),
@@ -4475,9 +4513,6 @@ class UpdateRegisteredModelRequest:
4475
4513
  full_name: Optional[str] = None
4476
4514
  """The three-level (fully qualified) name of the registered model"""
4477
4515
 
4478
- name: Optional[str] = None
4479
- """The name of the registered model"""
4480
-
4481
4516
  new_name: Optional[str] = None
4482
4517
  """New name for the registered model."""
4483
4518
 
@@ -4489,7 +4524,6 @@ class UpdateRegisteredModelRequest:
4489
4524
  body = {}
4490
4525
  if self.comment is not None: body['comment'] = self.comment
4491
4526
  if self.full_name is not None: body['full_name'] = self.full_name
4492
- if self.name is not None: body['name'] = self.name
4493
4527
  if self.new_name is not None: body['new_name'] = self.new_name
4494
4528
  if self.owner is not None: body['owner'] = self.owner
4495
4529
  return body
@@ -4499,7 +4533,6 @@ class UpdateRegisteredModelRequest:
4499
4533
  """Deserializes the UpdateRegisteredModelRequest from a dictionary."""
4500
4534
  return cls(comment=d.get('comment', None),
4501
4535
  full_name=d.get('full_name', None),
4502
- name=d.get('name', None),
4503
4536
  new_name=d.get('new_name', None),
4504
4537
  owner=d.get('owner', None))
4505
4538
 
@@ -4515,9 +4548,6 @@ class UpdateSchema:
4515
4548
  full_name: Optional[str] = None
4516
4549
  """Full name of the schema."""
4517
4550
 
4518
- name: Optional[str] = None
4519
- """Name of schema, relative to parent catalog."""
4520
-
4521
4551
  new_name: Optional[str] = None
4522
4552
  """New name for the schema."""
4523
4553
 
@@ -4534,7 +4564,6 @@ class UpdateSchema:
4534
4564
  if self.enable_predictive_optimization is not None:
4535
4565
  body['enable_predictive_optimization'] = self.enable_predictive_optimization.value
4536
4566
  if self.full_name is not None: body['full_name'] = self.full_name
4537
- if self.name is not None: body['name'] = self.name
4538
4567
  if self.new_name is not None: body['new_name'] = self.new_name
4539
4568
  if self.owner is not None: body['owner'] = self.owner
4540
4569
  if self.properties: body['properties'] = self.properties
@@ -4547,7 +4576,6 @@ class UpdateSchema:
4547
4576
  enable_predictive_optimization=_enum(d, 'enable_predictive_optimization',
4548
4577
  EnablePredictiveOptimization),
4549
4578
  full_name=d.get('full_name', None),
4550
- name=d.get('name', None),
4551
4579
  new_name=d.get('new_name', None),
4552
4580
  owner=d.get('owner', None),
4553
4581
  properties=d.get('properties', None))
@@ -4635,9 +4663,6 @@ class UpdateVolumeRequestContent:
4635
4663
  full_name_arg: Optional[str] = None
4636
4664
  """The three-level (fully qualified) name of the volume"""
4637
4665
 
4638
- name: Optional[str] = None
4639
- """The name of the volume"""
4640
-
4641
4666
  new_name: Optional[str] = None
4642
4667
  """New name for the volume."""
4643
4668
 
@@ -4649,7 +4674,6 @@ class UpdateVolumeRequestContent:
4649
4674
  body = {}
4650
4675
  if self.comment is not None: body['comment'] = self.comment
4651
4676
  if self.full_name_arg is not None: body['full_name_arg'] = self.full_name_arg
4652
- if self.name is not None: body['name'] = self.name
4653
4677
  if self.new_name is not None: body['new_name'] = self.new_name
4654
4678
  if self.owner is not None: body['owner'] = self.owner
4655
4679
  return body
@@ -4659,7 +4683,6 @@ class UpdateVolumeRequestContent:
4659
4683
  """Deserializes the UpdateVolumeRequestContent from a dictionary."""
4660
4684
  return cls(comment=d.get('comment', None),
4661
4685
  full_name_arg=d.get('full_name_arg', None),
4662
- name=d.get('name', None),
4663
4686
  new_name=d.get('new_name', None),
4664
4687
  owner=d.get('owner', None))
4665
4688
 
@@ -5638,7 +5661,6 @@ class ConnectionsAPI:
5638
5661
  name_arg: str,
5639
5662
  options: Dict[str, str],
5640
5663
  *,
5641
- name: Optional[str] = None,
5642
5664
  new_name: Optional[str] = None,
5643
5665
  owner: Optional[str] = None) -> ConnectionInfo:
5644
5666
  """Update a connection.
@@ -5649,8 +5671,6 @@ class ConnectionsAPI:
5649
5671
  Name of the connection.
5650
5672
  :param options: Dict[str,str]
5651
5673
  A map of key-value properties attached to the securable.
5652
- :param name: str (optional)
5653
- Name of the connection.
5654
5674
  :param new_name: str (optional)
5655
5675
  New name for the connection.
5656
5676
  :param owner: str (optional)
@@ -5659,7 +5679,6 @@ class ConnectionsAPI:
5659
5679
  :returns: :class:`ConnectionInfo`
5660
5680
  """
5661
5681
  body = {}
5662
- if name is not None: body['name'] = name
5663
5682
  if new_name is not None: body['new_name'] = new_name
5664
5683
  if options is not None: body['options'] = options
5665
5684
  if owner is not None: body['owner'] = owner
@@ -5804,10 +5823,9 @@ class ExternalLocationsAPI:
5804
5823
  '/api/2.1/unity-catalog/external-locations',
5805
5824
  query=query,
5806
5825
  headers=headers)
5807
- if 'external_locations' not in json or not json['external_locations']:
5808
- return
5809
- for v in json['external_locations']:
5810
- yield ExternalLocationInfo.from_dict(v)
5826
+ if 'external_locations' in json:
5827
+ for v in json['external_locations']:
5828
+ yield ExternalLocationInfo.from_dict(v)
5811
5829
  if 'next_page_token' not in json or not json['next_page_token']:
5812
5830
  return
5813
5831
  query['page_token'] = json['next_page_token']
@@ -5988,10 +6006,9 @@ class FunctionsAPI:
5988
6006
 
5989
6007
  while True:
5990
6008
  json = self._api.do('GET', '/api/2.1/unity-catalog/functions', query=query, headers=headers)
5991
- if 'functions' not in json or not json['functions']:
5992
- return
5993
- for v in json['functions']:
5994
- yield FunctionInfo.from_dict(v)
6009
+ if 'functions' in json:
6010
+ for v in json['functions']:
6011
+ yield FunctionInfo.from_dict(v)
5995
6012
  if 'next_page_token' not in json or not json['next_page_token']:
5996
6013
  return
5997
6014
  query['page_token'] = json['next_page_token']
@@ -6131,6 +6148,31 @@ class LakehouseMonitorsAPI:
6131
6148
  def __init__(self, api_client):
6132
6149
  self._api = api_client
6133
6150
 
6151
+ def cancel_refresh(self, full_name: str, refresh_id: str):
6152
+ """Cancel refresh.
6153
+
6154
+ Cancel an active monitor refresh for the given refresh ID.
6155
+
6156
+ The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
6157
+ table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
6158
+ - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the table's parent schema - be an
6159
+ owner of the table
6160
+
6161
+ Additionally, the call must be made from the workspace where the monitor was created.
6162
+
6163
+ :param full_name: str
6164
+ Full name of the table.
6165
+ :param refresh_id: str
6166
+ ID of the refresh.
6167
+
6168
+
6169
+ """
6170
+
6171
+ headers = {}
6172
+ self._api.do('POST',
6173
+ f'/api/2.1/unity-catalog/tables/{full_name}/monitor/refreshes/{refresh_id}/cancel',
6174
+ headers=headers)
6175
+
6134
6176
  def create(self,
6135
6177
  full_name: str,
6136
6178
  assets_dir: str,
@@ -6265,6 +6307,81 @@ class LakehouseMonitorsAPI:
6265
6307
  res = self._api.do('GET', f'/api/2.1/unity-catalog/tables/{full_name}/monitor', headers=headers)
6266
6308
  return MonitorInfo.from_dict(res)
6267
6309
 
6310
+ def get_refresh(self, full_name: str, refresh_id: str) -> MonitorRefreshInfo:
6311
+ """Get refresh.
6312
+
6313
+ Gets info about a specific monitor refresh using the given refresh ID.
6314
+
6315
+ The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
6316
+ table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
6317
+ - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the table's parent schema -
6318
+ **SELECT** privilege on the table.
6319
+
6320
+ Additionally, the call must be made from the workspace where the monitor was created.
6321
+
6322
+ :param full_name: str
6323
+ Full name of the table.
6324
+ :param refresh_id: str
6325
+ ID of the refresh.
6326
+
6327
+ :returns: :class:`MonitorRefreshInfo`
6328
+ """
6329
+
6330
+ headers = {'Accept': 'application/json', }
6331
+ res = self._api.do('GET',
6332
+ f'/api/2.1/unity-catalog/tables/{full_name}/monitor/refreshes/{refresh_id}',
6333
+ headers=headers)
6334
+ return MonitorRefreshInfo.from_dict(res)
6335
+
6336
+ def list_refreshes(self, full_name: str) -> Iterator[MonitorRefreshInfo]:
6337
+ """List refreshes.
6338
+
6339
+ Gets an array containing the history of the most recent refreshes (up to 25) for this table.
6340
+
6341
+ The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
6342
+ table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
6343
+ - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the table's parent schema -
6344
+ **SELECT** privilege on the table.
6345
+
6346
+ Additionally, the call must be made from the workspace where the monitor was created.
6347
+
6348
+ :param full_name: str
6349
+ Full name of the table.
6350
+
6351
+ :returns: Iterator over :class:`MonitorRefreshInfo`
6352
+ """
6353
+
6354
+ headers = {'Accept': 'application/json', }
6355
+ res = self._api.do('GET',
6356
+ f'/api/2.1/unity-catalog/tables/{full_name}/monitor/refreshes',
6357
+ headers=headers)
6358
+ return [MonitorRefreshInfo.from_dict(v) for v in res]
6359
+
6360
+ def run_refresh(self, full_name: str) -> MonitorRefreshInfo:
6361
+ """Queue a metric refresh for a monitor.
6362
+
6363
+ Queues a metric refresh on the monitor for the specified table. The refresh will execute in the
6364
+ background.
6365
+
6366
+ The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
6367
+ table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
6368
+ - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the table's parent schema - be an
6369
+ owner of the table
6370
+
6371
+ Additionally, the call must be made from the workspace where the monitor was created.
6372
+
6373
+ :param full_name: str
6374
+ Full name of the table.
6375
+
6376
+ :returns: :class:`MonitorRefreshInfo`
6377
+ """
6378
+
6379
+ headers = {'Accept': 'application/json', }
6380
+ res = self._api.do('POST',
6381
+ f'/api/2.1/unity-catalog/tables/{full_name}/monitor/refreshes',
6382
+ headers=headers)
6383
+ return MonitorRefreshInfo.from_dict(res)
6384
+
6268
6385
  def update(self,
6269
6386
  full_name: str,
6270
6387
  assets_dir: str,
@@ -6516,7 +6633,6 @@ class MetastoresAPI:
6516
6633
  delta_sharing_organization_name: Optional[str] = None,
6517
6634
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None,
6518
6635
  delta_sharing_scope: Optional[UpdateMetastoreDeltaSharingScope] = None,
6519
- name: Optional[str] = None,
6520
6636
  new_name: Optional[str] = None,
6521
6637
  owner: Optional[str] = None,
6522
6638
  privilege_model_version: Optional[str] = None,
@@ -6535,8 +6651,6 @@ class MetastoresAPI:
6535
6651
  The lifetime of delta sharing recipient token in seconds.
6536
6652
  :param delta_sharing_scope: :class:`UpdateMetastoreDeltaSharingScope` (optional)
6537
6653
  The scope of Delta Sharing enabled for the metastore.
6538
- :param name: str (optional)
6539
- The user-specified name of the metastore.
6540
6654
  :param new_name: str (optional)
6541
6655
  New name for the metastore.
6542
6656
  :param owner: str (optional)
@@ -6555,7 +6669,6 @@ class MetastoresAPI:
6555
6669
  body[
6556
6670
  'delta_sharing_recipient_token_lifetime_in_seconds'] = delta_sharing_recipient_token_lifetime_in_seconds
6557
6671
  if delta_sharing_scope is not None: body['delta_sharing_scope'] = delta_sharing_scope.value
6558
- if name is not None: body['name'] = name
6559
6672
  if new_name is not None: body['new_name'] = new_name
6560
6673
  if owner is not None: body['owner'] = owner
6561
6674
  if privilege_model_version is not None: body['privilege_model_version'] = privilege_model_version
@@ -6718,10 +6831,9 @@ class ModelVersionsAPI:
6718
6831
  f'/api/2.1/unity-catalog/models/{full_name}/versions',
6719
6832
  query=query,
6720
6833
  headers=headers)
6721
- if 'model_versions' not in json or not json['model_versions']:
6722
- return
6723
- for v in json['model_versions']:
6724
- yield ModelVersionInfo.from_dict(v)
6834
+ if 'model_versions' in json:
6835
+ for v in json['model_versions']:
6836
+ yield ModelVersionInfo.from_dict(v)
6725
6837
  if 'next_page_token' not in json or not json['next_page_token']:
6726
6838
  return
6727
6839
  query['page_token'] = json['next_page_token']
@@ -6928,10 +7040,9 @@ class RegisteredModelsAPI:
6928
7040
 
6929
7041
  while True:
6930
7042
  json = self._api.do('GET', '/api/2.1/unity-catalog/models', query=query, headers=headers)
6931
- if 'registered_models' not in json or not json['registered_models']:
6932
- return
6933
- for v in json['registered_models']:
6934
- yield RegisteredModelInfo.from_dict(v)
7043
+ if 'registered_models' in json:
7044
+ for v in json['registered_models']:
7045
+ yield RegisteredModelInfo.from_dict(v)
6935
7046
  if 'next_page_token' not in json or not json['next_page_token']:
6936
7047
  return
6937
7048
  query['page_token'] = json['next_page_token']
@@ -6967,7 +7078,6 @@ class RegisteredModelsAPI:
6967
7078
  full_name: str,
6968
7079
  *,
6969
7080
  comment: Optional[str] = None,
6970
- name: Optional[str] = None,
6971
7081
  new_name: Optional[str] = None,
6972
7082
  owner: Optional[str] = None) -> RegisteredModelInfo:
6973
7083
  """Update a Registered Model.
@@ -6984,8 +7094,6 @@ class RegisteredModelsAPI:
6984
7094
  The three-level (fully qualified) name of the registered model
6985
7095
  :param comment: str (optional)
6986
7096
  The comment attached to the registered model
6987
- :param name: str (optional)
6988
- The name of the registered model
6989
7097
  :param new_name: str (optional)
6990
7098
  New name for the registered model.
6991
7099
  :param owner: str (optional)
@@ -6995,7 +7103,6 @@ class RegisteredModelsAPI:
6995
7103
  """
6996
7104
  body = {}
6997
7105
  if comment is not None: body['comment'] = comment
6998
- if name is not None: body['name'] = name
6999
7106
  if new_name is not None: body['new_name'] = new_name
7000
7107
  if owner is not None: body['owner'] = owner
7001
7108
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
@@ -7112,10 +7219,9 @@ class SchemasAPI:
7112
7219
 
7113
7220
  while True:
7114
7221
  json = self._api.do('GET', '/api/2.1/unity-catalog/schemas', query=query, headers=headers)
7115
- if 'schemas' not in json or not json['schemas']:
7116
- return
7117
- for v in json['schemas']:
7118
- yield SchemaInfo.from_dict(v)
7222
+ if 'schemas' in json:
7223
+ for v in json['schemas']:
7224
+ yield SchemaInfo.from_dict(v)
7119
7225
  if 'next_page_token' not in json or not json['next_page_token']:
7120
7226
  return
7121
7227
  query['page_token'] = json['next_page_token']
@@ -7125,7 +7231,6 @@ class SchemasAPI:
7125
7231
  *,
7126
7232
  comment: Optional[str] = None,
7127
7233
  enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None,
7128
- name: Optional[str] = None,
7129
7234
  new_name: Optional[str] = None,
7130
7235
  owner: Optional[str] = None,
7131
7236
  properties: Optional[Dict[str, str]] = None) -> SchemaInfo:
@@ -7142,8 +7247,6 @@ class SchemasAPI:
7142
7247
  User-provided free-form text description.
7143
7248
  :param enable_predictive_optimization: :class:`EnablePredictiveOptimization` (optional)
7144
7249
  Whether predictive optimization should be enabled for this object and objects under it.
7145
- :param name: str (optional)
7146
- Name of schema, relative to parent catalog.
7147
7250
  :param new_name: str (optional)
7148
7251
  New name for the schema.
7149
7252
  :param owner: str (optional)
@@ -7157,7 +7260,6 @@ class SchemasAPI:
7157
7260
  if comment is not None: body['comment'] = comment
7158
7261
  if enable_predictive_optimization is not None:
7159
7262
  body['enable_predictive_optimization'] = enable_predictive_optimization.value
7160
- if name is not None: body['name'] = name
7161
7263
  if new_name is not None: body['new_name'] = new_name
7162
7264
  if owner is not None: body['owner'] = owner
7163
7265
  if properties is not None: body['properties'] = properties
@@ -7306,10 +7408,9 @@ class StorageCredentialsAPI:
7306
7408
  '/api/2.1/unity-catalog/storage-credentials',
7307
7409
  query=query,
7308
7410
  headers=headers)
7309
- if 'storage_credentials' not in json or not json['storage_credentials']:
7310
- return
7311
- for v in json['storage_credentials']:
7312
- yield StorageCredentialInfo.from_dict(v)
7411
+ if 'storage_credentials' in json:
7412
+ for v in json['storage_credentials']:
7413
+ yield StorageCredentialInfo.from_dict(v)
7313
7414
  if 'next_page_token' not in json or not json['next_page_token']:
7314
7415
  return
7315
7416
  query['page_token'] = json['next_page_token']
@@ -7709,10 +7810,9 @@ class TablesAPI:
7709
7810
 
7710
7811
  while True:
7711
7812
  json = self._api.do('GET', '/api/2.1/unity-catalog/tables', query=query, headers=headers)
7712
- if 'tables' not in json or not json['tables']:
7713
- return
7714
- for v in json['tables']:
7715
- yield TableInfo.from_dict(v)
7813
+ if 'tables' in json:
7814
+ for v in json['tables']:
7815
+ yield TableInfo.from_dict(v)
7716
7816
  if 'next_page_token' not in json or not json['next_page_token']:
7717
7817
  return
7718
7818
  query['page_token'] = json['next_page_token']
@@ -7765,10 +7865,9 @@ class TablesAPI:
7765
7865
 
7766
7866
  while True:
7767
7867
  json = self._api.do('GET', '/api/2.1/unity-catalog/table-summaries', query=query, headers=headers)
7768
- if 'tables' not in json or not json['tables']:
7769
- return
7770
- for v in json['tables']:
7771
- yield TableSummary.from_dict(v)
7868
+ if 'tables' in json:
7869
+ for v in json['tables']:
7870
+ yield TableSummary.from_dict(v)
7772
7871
  if 'next_page_token' not in json or not json['next_page_token']:
7773
7872
  return
7774
7873
  query['page_token'] = json['next_page_token']
@@ -7925,7 +8024,6 @@ class VolumesAPI:
7925
8024
  full_name_arg: str,
7926
8025
  *,
7927
8026
  comment: Optional[str] = None,
7928
- name: Optional[str] = None,
7929
8027
  new_name: Optional[str] = None,
7930
8028
  owner: Optional[str] = None) -> VolumeInfo:
7931
8029
  """Update a Volume.
@@ -7942,8 +8040,6 @@ class VolumesAPI:
7942
8040
  The three-level (fully qualified) name of the volume
7943
8041
  :param comment: str (optional)
7944
8042
  The comment attached to the volume
7945
- :param name: str (optional)
7946
- The name of the volume
7947
8043
  :param new_name: str (optional)
7948
8044
  New name for the volume.
7949
8045
  :param owner: str (optional)
@@ -7953,7 +8049,6 @@ class VolumesAPI:
7953
8049
  """
7954
8050
  body = {}
7955
8051
  if comment is not None: body['comment'] = comment
7956
- if name is not None: body['name'] = name
7957
8052
  if new_name is not None: body['new_name'] = new_name
7958
8053
  if owner is not None: body['owner'] = owner
7959
8054
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }