databricks-sdk 0.54.0__py3-none-any.whl → 0.56.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 (30) hide show
  1. databricks/sdk/__init__.py +304 -278
  2. databricks/sdk/config.py +15 -4
  3. databricks/sdk/credentials_provider.py +101 -55
  4. databricks/sdk/oauth.py +0 -5
  5. databricks/sdk/oidc.py +206 -0
  6. databricks/sdk/service/aibuilder.py +364 -0
  7. databricks/sdk/service/billing.py +150 -169
  8. databricks/sdk/service/catalog.py +263 -835
  9. databricks/sdk/service/cleanrooms.py +15 -10
  10. databricks/sdk/service/compute.py +12 -22
  11. databricks/sdk/service/dashboards.py +59 -451
  12. databricks/sdk/service/database.py +1256 -0
  13. databricks/sdk/service/files.py +2 -0
  14. databricks/sdk/service/iam.py +6 -6
  15. databricks/sdk/service/jobs.py +238 -0
  16. databricks/sdk/service/ml.py +8 -271
  17. databricks/sdk/service/pipelines.py +45 -1
  18. databricks/sdk/service/provisioning.py +0 -3
  19. databricks/sdk/service/qualitymonitorv2.py +275 -0
  20. databricks/sdk/service/serving.py +76 -4
  21. databricks/sdk/service/settings.py +982 -99
  22. databricks/sdk/service/sharing.py +3 -2
  23. databricks/sdk/service/sql.py +218 -1
  24. databricks/sdk/version.py +1 -1
  25. {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/METADATA +1 -1
  26. {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/RECORD +30 -26
  27. {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/WHEEL +1 -1
  28. {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/licenses/LICENSE +0 -0
  29. {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/licenses/NOTICE +0 -0
  30. {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/top_level.txt +0 -0
@@ -1414,7 +1414,7 @@ class ConnectionInfo:
1414
1414
  """Username of current owner of the connection."""
1415
1415
 
1416
1416
  properties: Optional[Dict[str, str]] = None
1417
- """An object containing map of key-value properties attached to the connection."""
1417
+ """A map of key-value properties attached to the securable."""
1418
1418
 
1419
1419
  provisioning_info: Optional[ProvisioningInfo] = None
1420
1420
  """Status of an asynchronously provisioned resource."""
@@ -1422,7 +1422,8 @@ class ConnectionInfo:
1422
1422
  read_only: Optional[bool] = None
1423
1423
  """If the connection is read only."""
1424
1424
 
1425
- securable_type: Optional[str] = None
1425
+ securable_type: Optional[SecurableType] = None
1426
+ """The type of Unity Catalog securable."""
1426
1427
 
1427
1428
  updated_at: Optional[int] = None
1428
1429
  """Time at which this connection was updated, in epoch milliseconds."""
@@ -1465,7 +1466,7 @@ class ConnectionInfo:
1465
1466
  if self.read_only is not None:
1466
1467
  body["read_only"] = self.read_only
1467
1468
  if self.securable_type is not None:
1468
- body["securable_type"] = self.securable_type
1469
+ body["securable_type"] = self.securable_type.value
1469
1470
  if self.updated_at is not None:
1470
1471
  body["updated_at"] = self.updated_at
1471
1472
  if self.updated_by is not None:
@@ -1533,7 +1534,7 @@ class ConnectionInfo:
1533
1534
  properties=d.get("properties", None),
1534
1535
  provisioning_info=_from_dict(d, "provisioning_info", ProvisioningInfo),
1535
1536
  read_only=d.get("read_only", None),
1536
- securable_type=d.get("securable_type", None),
1537
+ securable_type=_enum(d, "securable_type", SecurableType),
1537
1538
  updated_at=d.get("updated_at", None),
1538
1539
  updated_by=d.get("updated_by", None),
1539
1540
  url=d.get("url", None),
@@ -1541,21 +1542,28 @@ class ConnectionInfo:
1541
1542
 
1542
1543
 
1543
1544
  class ConnectionType(Enum):
1544
- """The type of connection."""
1545
+ """Next Id: 31"""
1545
1546
 
1546
1547
  BIGQUERY = "BIGQUERY"
1547
1548
  DATABRICKS = "DATABRICKS"
1549
+ GA4_RAW_DATA = "GA4_RAW_DATA"
1548
1550
  GLUE = "GLUE"
1549
1551
  HIVE_METASTORE = "HIVE_METASTORE"
1550
1552
  HTTP = "HTTP"
1551
1553
  MYSQL = "MYSQL"
1552
1554
  ORACLE = "ORACLE"
1553
1555
  POSTGRESQL = "POSTGRESQL"
1556
+ POWER_BI = "POWER_BI"
1554
1557
  REDSHIFT = "REDSHIFT"
1558
+ SALESFORCE = "SALESFORCE"
1559
+ SALESFORCE_DATA_CLOUD = "SALESFORCE_DATA_CLOUD"
1560
+ SERVICENOW = "SERVICENOW"
1555
1561
  SNOWFLAKE = "SNOWFLAKE"
1556
1562
  SQLDW = "SQLDW"
1557
1563
  SQLSERVER = "SQLSERVER"
1558
1564
  TERADATA = "TERADATA"
1565
+ UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE"
1566
+ WORKDAY_RAAS = "WORKDAY_RAAS"
1559
1567
 
1560
1568
 
1561
1569
  @dataclass
@@ -1706,7 +1714,7 @@ class CreateConnection:
1706
1714
  """User-provided free-form text description."""
1707
1715
 
1708
1716
  properties: Optional[Dict[str, str]] = None
1709
- """An object containing map of key-value properties attached to the connection."""
1717
+ """A map of key-value properties attached to the securable."""
1710
1718
 
1711
1719
  read_only: Optional[bool] = None
1712
1720
  """If the connection is read only."""
@@ -2202,9 +2210,7 @@ class CreateMetastore:
2202
2210
  """The user-specified name of the metastore."""
2203
2211
 
2204
2212
  region: Optional[str] = None
2205
- """Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). The field can be omitted
2206
- in the __workspace-level__ __API__ but not in the __account-level__ __API__. If this field is
2207
- omitted, the region of the workspace receiving the request will be used."""
2213
+ """Cloud region which the metastore serves (e.g., `us-west-2`, `westus`)."""
2208
2214
 
2209
2215
  storage_root: Optional[str] = None
2210
2216
  """The storage root URL for metastore"""
@@ -2243,7 +2249,7 @@ class CreateMetastoreAssignment:
2243
2249
  """The unique ID of the metastore."""
2244
2250
 
2245
2251
  default_catalog_name: str
2246
- """The name of the default catalog in the metastore. This field is depracted. Please use "Default
2252
+ """The name of the default catalog in the metastore. This field is deprecated. Please use "Default
2247
2253
  Namespace API" to configure the default catalog for a Databricks workspace."""
2248
2254
 
2249
2255
  workspace_id: Optional[int] = None
@@ -2924,9 +2930,19 @@ class CredentialPurpose(Enum):
2924
2930
 
2925
2931
 
2926
2932
  class CredentialType(Enum):
2927
- """The type of credential."""
2933
+ """Next Id: 12"""
2928
2934
 
2929
2935
  BEARER_TOKEN = "BEARER_TOKEN"
2936
+ OAUTH_ACCESS_TOKEN = "OAUTH_ACCESS_TOKEN"
2937
+ OAUTH_M2M = "OAUTH_M2M"
2938
+ OAUTH_REFRESH_TOKEN = "OAUTH_REFRESH_TOKEN"
2939
+ OAUTH_RESOURCE_OWNER_PASSWORD = "OAUTH_RESOURCE_OWNER_PASSWORD"
2940
+ OAUTH_U2M = "OAUTH_U2M"
2941
+ OAUTH_U2M_MAPPING = "OAUTH_U2M_MAPPING"
2942
+ OIDC_TOKEN = "OIDC_TOKEN"
2943
+ PEM_PRIVATE_KEY = "PEM_PRIVATE_KEY"
2944
+ SERVICE_CREDENTIAL = "SERVICE_CREDENTIAL"
2945
+ UNKNOWN_CREDENTIAL_TYPE = "UNKNOWN_CREDENTIAL_TYPE"
2930
2946
  USERNAME_PASSWORD = "USERNAME_PASSWORD"
2931
2947
 
2932
2948
 
@@ -2990,183 +3006,6 @@ class DataSourceFormat(Enum):
2990
3006
  WORKDAY_RAAS_FORMAT = "WORKDAY_RAAS_FORMAT"
2991
3007
 
2992
3008
 
2993
- @dataclass
2994
- class DatabaseCatalog:
2995
- name: str
2996
- """The name of the catalog in UC."""
2997
-
2998
- database_instance_name: str
2999
- """The name of the DatabaseInstance housing the database."""
3000
-
3001
- database_name: str
3002
- """The name of the database (in a instance) associated with the catalog."""
3003
-
3004
- create_database_if_not_exists: Optional[bool] = None
3005
-
3006
- uid: Optional[str] = None
3007
-
3008
- def as_dict(self) -> dict:
3009
- """Serializes the DatabaseCatalog into a dictionary suitable for use as a JSON request body."""
3010
- body = {}
3011
- if self.create_database_if_not_exists is not None:
3012
- body["create_database_if_not_exists"] = self.create_database_if_not_exists
3013
- if self.database_instance_name is not None:
3014
- body["database_instance_name"] = self.database_instance_name
3015
- if self.database_name is not None:
3016
- body["database_name"] = self.database_name
3017
- if self.name is not None:
3018
- body["name"] = self.name
3019
- if self.uid is not None:
3020
- body["uid"] = self.uid
3021
- return body
3022
-
3023
- def as_shallow_dict(self) -> dict:
3024
- """Serializes the DatabaseCatalog into a shallow dictionary of its immediate attributes."""
3025
- body = {}
3026
- if self.create_database_if_not_exists is not None:
3027
- body["create_database_if_not_exists"] = self.create_database_if_not_exists
3028
- if self.database_instance_name is not None:
3029
- body["database_instance_name"] = self.database_instance_name
3030
- if self.database_name is not None:
3031
- body["database_name"] = self.database_name
3032
- if self.name is not None:
3033
- body["name"] = self.name
3034
- if self.uid is not None:
3035
- body["uid"] = self.uid
3036
- return body
3037
-
3038
- @classmethod
3039
- def from_dict(cls, d: Dict[str, Any]) -> DatabaseCatalog:
3040
- """Deserializes the DatabaseCatalog from a dictionary."""
3041
- return cls(
3042
- create_database_if_not_exists=d.get("create_database_if_not_exists", None),
3043
- database_instance_name=d.get("database_instance_name", None),
3044
- database_name=d.get("database_name", None),
3045
- name=d.get("name", None),
3046
- uid=d.get("uid", None),
3047
- )
3048
-
3049
-
3050
- @dataclass
3051
- class DatabaseInstance:
3052
- """A DatabaseInstance represents a logical Postgres instance, comprised of both compute and
3053
- storage."""
3054
-
3055
- name: str
3056
- """The name of the instance. This is the unique identifier for the instance."""
3057
-
3058
- admin_password: Optional[str] = None
3059
- """Password for admin user to create. If not provided, no user will be created."""
3060
-
3061
- admin_rolename: Optional[str] = None
3062
- """Name of the admin role for the instance. If not provided, defaults to 'databricks_admin'."""
3063
-
3064
- capacity: Optional[str] = None
3065
- """The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4"."""
3066
-
3067
- creation_time: Optional[str] = None
3068
- """The timestamp when the instance was created."""
3069
-
3070
- creator: Optional[str] = None
3071
- """The email of the creator of the instance."""
3072
-
3073
- pg_version: Optional[str] = None
3074
- """The version of Postgres running on the instance."""
3075
-
3076
- read_write_dns: Optional[str] = None
3077
- """The DNS endpoint to connect to the instance for read+write access."""
3078
-
3079
- state: Optional[DatabaseInstanceState] = None
3080
- """The current state of the instance."""
3081
-
3082
- stopped: Optional[bool] = None
3083
- """Whether the instance is stopped."""
3084
-
3085
- uid: Optional[str] = None
3086
- """An immutable UUID identifier for the instance."""
3087
-
3088
- def as_dict(self) -> dict:
3089
- """Serializes the DatabaseInstance into a dictionary suitable for use as a JSON request body."""
3090
- body = {}
3091
- if self.admin_password is not None:
3092
- body["admin_password"] = self.admin_password
3093
- if self.admin_rolename is not None:
3094
- body["admin_rolename"] = self.admin_rolename
3095
- if self.capacity is not None:
3096
- body["capacity"] = self.capacity
3097
- if self.creation_time is not None:
3098
- body["creation_time"] = self.creation_time
3099
- if self.creator is not None:
3100
- body["creator"] = self.creator
3101
- if self.name is not None:
3102
- body["name"] = self.name
3103
- if self.pg_version is not None:
3104
- body["pg_version"] = self.pg_version
3105
- if self.read_write_dns is not None:
3106
- body["read_write_dns"] = self.read_write_dns
3107
- if self.state is not None:
3108
- body["state"] = self.state.value
3109
- if self.stopped is not None:
3110
- body["stopped"] = self.stopped
3111
- if self.uid is not None:
3112
- body["uid"] = self.uid
3113
- return body
3114
-
3115
- def as_shallow_dict(self) -> dict:
3116
- """Serializes the DatabaseInstance into a shallow dictionary of its immediate attributes."""
3117
- body = {}
3118
- if self.admin_password is not None:
3119
- body["admin_password"] = self.admin_password
3120
- if self.admin_rolename is not None:
3121
- body["admin_rolename"] = self.admin_rolename
3122
- if self.capacity is not None:
3123
- body["capacity"] = self.capacity
3124
- if self.creation_time is not None:
3125
- body["creation_time"] = self.creation_time
3126
- if self.creator is not None:
3127
- body["creator"] = self.creator
3128
- if self.name is not None:
3129
- body["name"] = self.name
3130
- if self.pg_version is not None:
3131
- body["pg_version"] = self.pg_version
3132
- if self.read_write_dns is not None:
3133
- body["read_write_dns"] = self.read_write_dns
3134
- if self.state is not None:
3135
- body["state"] = self.state
3136
- if self.stopped is not None:
3137
- body["stopped"] = self.stopped
3138
- if self.uid is not None:
3139
- body["uid"] = self.uid
3140
- return body
3141
-
3142
- @classmethod
3143
- def from_dict(cls, d: Dict[str, Any]) -> DatabaseInstance:
3144
- """Deserializes the DatabaseInstance from a dictionary."""
3145
- return cls(
3146
- admin_password=d.get("admin_password", None),
3147
- admin_rolename=d.get("admin_rolename", None),
3148
- capacity=d.get("capacity", None),
3149
- creation_time=d.get("creation_time", None),
3150
- creator=d.get("creator", None),
3151
- name=d.get("name", None),
3152
- pg_version=d.get("pg_version", None),
3153
- read_write_dns=d.get("read_write_dns", None),
3154
- state=_enum(d, "state", DatabaseInstanceState),
3155
- stopped=d.get("stopped", None),
3156
- uid=d.get("uid", None),
3157
- )
3158
-
3159
-
3160
- class DatabaseInstanceState(Enum):
3161
-
3162
- AVAILABLE = "AVAILABLE"
3163
- DELETING = "DELETING"
3164
- FAILING_OVER = "FAILING_OVER"
3165
- STARTING = "STARTING"
3166
- STOPPED = "STOPPED"
3167
- UPDATING = "UPDATING"
3168
-
3169
-
3170
3009
  @dataclass
3171
3010
  class DatabricksGcpServiceAccount:
3172
3011
  """GCP long-lived credential. Databricks-created Google Cloud Storage service account."""
@@ -3300,42 +3139,6 @@ class DeleteCredentialResponse:
3300
3139
  return cls()
3301
3140
 
3302
3141
 
3303
- @dataclass
3304
- class DeleteDatabaseCatalogResponse:
3305
- def as_dict(self) -> dict:
3306
- """Serializes the DeleteDatabaseCatalogResponse into a dictionary suitable for use as a JSON request body."""
3307
- body = {}
3308
- return body
3309
-
3310
- def as_shallow_dict(self) -> dict:
3311
- """Serializes the DeleteDatabaseCatalogResponse into a shallow dictionary of its immediate attributes."""
3312
- body = {}
3313
- return body
3314
-
3315
- @classmethod
3316
- def from_dict(cls, d: Dict[str, Any]) -> DeleteDatabaseCatalogResponse:
3317
- """Deserializes the DeleteDatabaseCatalogResponse from a dictionary."""
3318
- return cls()
3319
-
3320
-
3321
- @dataclass
3322
- class DeleteDatabaseInstanceResponse:
3323
- def as_dict(self) -> dict:
3324
- """Serializes the DeleteDatabaseInstanceResponse into a dictionary suitable for use as a JSON request body."""
3325
- body = {}
3326
- return body
3327
-
3328
- def as_shallow_dict(self) -> dict:
3329
- """Serializes the DeleteDatabaseInstanceResponse into a shallow dictionary of its immediate attributes."""
3330
- body = {}
3331
- return body
3332
-
3333
- @classmethod
3334
- def from_dict(cls, d: Dict[str, Any]) -> DeleteDatabaseInstanceResponse:
3335
- """Deserializes the DeleteDatabaseInstanceResponse from a dictionary."""
3336
- return cls()
3337
-
3338
-
3339
3142
  @dataclass
3340
3143
  class DeleteResponse:
3341
3144
  def as_dict(self) -> dict:
@@ -3354,24 +3157,6 @@ class DeleteResponse:
3354
3157
  return cls()
3355
3158
 
3356
3159
 
3357
- @dataclass
3358
- class DeleteSyncedDatabaseTableResponse:
3359
- def as_dict(self) -> dict:
3360
- """Serializes the DeleteSyncedDatabaseTableResponse into a dictionary suitable for use as a JSON request body."""
3361
- body = {}
3362
- return body
3363
-
3364
- def as_shallow_dict(self) -> dict:
3365
- """Serializes the DeleteSyncedDatabaseTableResponse into a shallow dictionary of its immediate attributes."""
3366
- body = {}
3367
- return body
3368
-
3369
- @classmethod
3370
- def from_dict(cls, d: Dict[str, Any]) -> DeleteSyncedDatabaseTableResponse:
3371
- """Deserializes the DeleteSyncedDatabaseTableResponse from a dictionary."""
3372
- return cls()
3373
-
3374
-
3375
3160
  @dataclass
3376
3161
  class DeltaRuntimePropertiesKvPairs:
3377
3162
  """Properties pertaining to the current state of the delta table as given by the commit server.
@@ -3400,6 +3185,12 @@ class DeltaRuntimePropertiesKvPairs:
3400
3185
  return cls(delta_runtime_properties=d.get("delta_runtime_properties", None))
3401
3186
 
3402
3187
 
3188
+ class DeltaSharingScopeEnum(Enum):
3189
+
3190
+ INTERNAL = "INTERNAL"
3191
+ INTERNAL_AND_EXTERNAL = "INTERNAL_AND_EXTERNAL"
3192
+
3193
+
3403
3194
  @dataclass
3404
3195
  class Dependency:
3405
3196
  """A dependency of a SQL object. Either the __table__ field or the __function__ field must be
@@ -3484,12 +3275,18 @@ class DisableResponse:
3484
3275
 
3485
3276
  @dataclass
3486
3277
  class EffectivePermissionsList:
3278
+ next_page_token: Optional[str] = None
3279
+ """Opaque token to retrieve the next page of results. Absent if there are no more pages.
3280
+ __page_token__ should be set to this value for the next request (for the next page of results)."""
3281
+
3487
3282
  privilege_assignments: Optional[List[EffectivePrivilegeAssignment]] = None
3488
3283
  """The privileges conveyed to each principal (either directly or via inheritance)"""
3489
3284
 
3490
3285
  def as_dict(self) -> dict:
3491
3286
  """Serializes the EffectivePermissionsList into a dictionary suitable for use as a JSON request body."""
3492
3287
  body = {}
3288
+ if self.next_page_token is not None:
3289
+ body["next_page_token"] = self.next_page_token
3493
3290
  if self.privilege_assignments:
3494
3291
  body["privilege_assignments"] = [v.as_dict() for v in self.privilege_assignments]
3495
3292
  return body
@@ -3497,6 +3294,8 @@ class EffectivePermissionsList:
3497
3294
  def as_shallow_dict(self) -> dict:
3498
3295
  """Serializes the EffectivePermissionsList into a shallow dictionary of its immediate attributes."""
3499
3296
  body = {}
3297
+ if self.next_page_token is not None:
3298
+ body["next_page_token"] = self.next_page_token
3500
3299
  if self.privilege_assignments:
3501
3300
  body["privilege_assignments"] = self.privilege_assignments
3502
3301
  return body
@@ -3504,7 +3303,10 @@ class EffectivePermissionsList:
3504
3303
  @classmethod
3505
3304
  def from_dict(cls, d: Dict[str, Any]) -> EffectivePermissionsList:
3506
3305
  """Deserializes the EffectivePermissionsList from a dictionary."""
3507
- return cls(privilege_assignments=_repeated_dict(d, "privilege_assignments", EffectivePrivilegeAssignment))
3306
+ return cls(
3307
+ next_page_token=d.get("next_page_token", None),
3308
+ privilege_assignments=_repeated_dict(d, "privilege_assignments", EffectivePrivilegeAssignment),
3309
+ )
3508
3310
 
3509
3311
 
3510
3312
  @dataclass
@@ -4847,7 +4649,7 @@ class GetMetastoreSummaryResponse:
4847
4649
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None
4848
4650
  """The lifetime of delta sharing recipient token in seconds."""
4849
4651
 
4850
- delta_sharing_scope: Optional[GetMetastoreSummaryResponseDeltaSharingScope] = None
4652
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None
4851
4653
  """The scope of Delta Sharing enabled for the metastore."""
4852
4654
 
4853
4655
  external_access_enabled: Optional[bool] = None
@@ -4988,7 +4790,7 @@ class GetMetastoreSummaryResponse:
4988
4790
  delta_sharing_recipient_token_lifetime_in_seconds=d.get(
4989
4791
  "delta_sharing_recipient_token_lifetime_in_seconds", None
4990
4792
  ),
4991
- delta_sharing_scope=_enum(d, "delta_sharing_scope", GetMetastoreSummaryResponseDeltaSharingScope),
4793
+ delta_sharing_scope=_enum(d, "delta_sharing_scope", DeltaSharingScopeEnum),
4992
4794
  external_access_enabled=d.get("external_access_enabled", None),
4993
4795
  global_metastore_id=d.get("global_metastore_id", None),
4994
4796
  metastore_id=d.get("metastore_id", None),
@@ -5004,11 +4806,40 @@ class GetMetastoreSummaryResponse:
5004
4806
  )
5005
4807
 
5006
4808
 
5007
- class GetMetastoreSummaryResponseDeltaSharingScope(Enum):
5008
- """The scope of Delta Sharing enabled for the metastore."""
4809
+ @dataclass
4810
+ class GetPermissionsResponse:
4811
+ next_page_token: Optional[str] = None
4812
+ """Opaque token to retrieve the next page of results. Absent if there are no more pages.
4813
+ __page_token__ should be set to this value for the next request (for the next page of results)."""
5009
4814
 
5010
- INTERNAL = "INTERNAL"
5011
- INTERNAL_AND_EXTERNAL = "INTERNAL_AND_EXTERNAL"
4815
+ privilege_assignments: Optional[List[PrivilegeAssignment]] = None
4816
+ """The privileges assigned to each principal"""
4817
+
4818
+ def as_dict(self) -> dict:
4819
+ """Serializes the GetPermissionsResponse into a dictionary suitable for use as a JSON request body."""
4820
+ body = {}
4821
+ if self.next_page_token is not None:
4822
+ body["next_page_token"] = self.next_page_token
4823
+ if self.privilege_assignments:
4824
+ body["privilege_assignments"] = [v.as_dict() for v in self.privilege_assignments]
4825
+ return body
4826
+
4827
+ def as_shallow_dict(self) -> dict:
4828
+ """Serializes the GetPermissionsResponse into a shallow dictionary of its immediate attributes."""
4829
+ body = {}
4830
+ if self.next_page_token is not None:
4831
+ body["next_page_token"] = self.next_page_token
4832
+ if self.privilege_assignments:
4833
+ body["privilege_assignments"] = self.privilege_assignments
4834
+ return body
4835
+
4836
+ @classmethod
4837
+ def from_dict(cls, d: Dict[str, Any]) -> GetPermissionsResponse:
4838
+ """Deserializes the GetPermissionsResponse from a dictionary."""
4839
+ return cls(
4840
+ next_page_token=d.get("next_page_token", None),
4841
+ privilege_assignments=_repeated_dict(d, "privilege_assignments", PrivilegeAssignment),
4842
+ )
5012
4843
 
5013
4844
 
5014
4845
  @dataclass
@@ -5230,41 +5061,6 @@ class ListCredentialsResponse:
5230
5061
  )
5231
5062
 
5232
5063
 
5233
- @dataclass
5234
- class ListDatabaseInstancesResponse:
5235
- database_instances: Optional[List[DatabaseInstance]] = None
5236
- """List of instances."""
5237
-
5238
- next_page_token: Optional[str] = None
5239
- """Pagination token to request the next page of instances."""
5240
-
5241
- def as_dict(self) -> dict:
5242
- """Serializes the ListDatabaseInstancesResponse into a dictionary suitable for use as a JSON request body."""
5243
- body = {}
5244
- if self.database_instances:
5245
- body["database_instances"] = [v.as_dict() for v in self.database_instances]
5246
- if self.next_page_token is not None:
5247
- body["next_page_token"] = self.next_page_token
5248
- return body
5249
-
5250
- def as_shallow_dict(self) -> dict:
5251
- """Serializes the ListDatabaseInstancesResponse into a shallow dictionary of its immediate attributes."""
5252
- body = {}
5253
- if self.database_instances:
5254
- body["database_instances"] = self.database_instances
5255
- if self.next_page_token is not None:
5256
- body["next_page_token"] = self.next_page_token
5257
- return body
5258
-
5259
- @classmethod
5260
- def from_dict(cls, d: Dict[str, Any]) -> ListDatabaseInstancesResponse:
5261
- """Deserializes the ListDatabaseInstancesResponse from a dictionary."""
5262
- return cls(
5263
- database_instances=_repeated_dict(d, "database_instances", DatabaseInstance),
5264
- next_page_token=d.get("next_page_token", None),
5265
- )
5266
-
5267
-
5268
5064
  @dataclass
5269
5065
  class ListExternalLocationsResponse:
5270
5066
  external_locations: Optional[List[ExternalLocationInfo]] = None
@@ -5341,11 +5137,17 @@ class ListMetastoresResponse:
5341
5137
  metastores: Optional[List[MetastoreInfo]] = None
5342
5138
  """An array of metastore information objects."""
5343
5139
 
5140
+ next_page_token: Optional[str] = None
5141
+ """Opaque token to retrieve the next page of results. Absent if there are no more pages.
5142
+ __page_token__ should be set to this value for the next request (for the next page of results)."""
5143
+
5344
5144
  def as_dict(self) -> dict:
5345
5145
  """Serializes the ListMetastoresResponse into a dictionary suitable for use as a JSON request body."""
5346
5146
  body = {}
5347
5147
  if self.metastores:
5348
5148
  body["metastores"] = [v.as_dict() for v in self.metastores]
5149
+ if self.next_page_token is not None:
5150
+ body["next_page_token"] = self.next_page_token
5349
5151
  return body
5350
5152
 
5351
5153
  def as_shallow_dict(self) -> dict:
@@ -5353,12 +5155,16 @@ class ListMetastoresResponse:
5353
5155
  body = {}
5354
5156
  if self.metastores:
5355
5157
  body["metastores"] = self.metastores
5158
+ if self.next_page_token is not None:
5159
+ body["next_page_token"] = self.next_page_token
5356
5160
  return body
5357
5161
 
5358
5162
  @classmethod
5359
5163
  def from_dict(cls, d: Dict[str, Any]) -> ListMetastoresResponse:
5360
5164
  """Deserializes the ListMetastoresResponse from a dictionary."""
5361
- return cls(metastores=_repeated_dict(d, "metastores", MetastoreInfo))
5165
+ return cls(
5166
+ metastores=_repeated_dict(d, "metastores", MetastoreInfo), next_page_token=d.get("next_page_token", None)
5167
+ )
5362
5168
 
5363
5169
 
5364
5170
  @dataclass
@@ -5674,12 +5480,12 @@ class MatchType(Enum):
5674
5480
 
5675
5481
  @dataclass
5676
5482
  class MetastoreAssignment:
5677
- metastore_id: str
5678
- """The unique ID of the metastore."""
5679
-
5680
5483
  workspace_id: int
5681
5484
  """The unique ID of the Databricks workspace."""
5682
5485
 
5486
+ metastore_id: str
5487
+ """The unique ID of the metastore."""
5488
+
5683
5489
  default_catalog_name: Optional[str] = None
5684
5490
  """The name of the default catalog in the metastore."""
5685
5491
 
@@ -5736,7 +5542,7 @@ class MetastoreInfo:
5736
5542
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None
5737
5543
  """The lifetime of delta sharing recipient token in seconds."""
5738
5544
 
5739
- delta_sharing_scope: Optional[MetastoreInfoDeltaSharingScope] = None
5545
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None
5740
5546
  """The scope of Delta Sharing enabled for the metastore."""
5741
5547
 
5742
5548
  external_access_enabled: Optional[bool] = None
@@ -5877,7 +5683,7 @@ class MetastoreInfo:
5877
5683
  delta_sharing_recipient_token_lifetime_in_seconds=d.get(
5878
5684
  "delta_sharing_recipient_token_lifetime_in_seconds", None
5879
5685
  ),
5880
- delta_sharing_scope=_enum(d, "delta_sharing_scope", MetastoreInfoDeltaSharingScope),
5686
+ delta_sharing_scope=_enum(d, "delta_sharing_scope", DeltaSharingScopeEnum),
5881
5687
  external_access_enabled=d.get("external_access_enabled", None),
5882
5688
  global_metastore_id=d.get("global_metastore_id", None),
5883
5689
  metastore_id=d.get("metastore_id", None),
@@ -5893,13 +5699,6 @@ class MetastoreInfo:
5893
5699
  )
5894
5700
 
5895
5701
 
5896
- class MetastoreInfoDeltaSharingScope(Enum):
5897
- """The scope of Delta Sharing enabled for the metastore."""
5898
-
5899
- INTERNAL = "INTERNAL"
5900
- INTERNAL_AND_EXTERNAL = "INTERNAL_AND_EXTERNAL"
5901
-
5902
-
5903
5702
  @dataclass
5904
5703
  class ModelVersionInfo:
5905
5704
  aliases: Optional[List[RegisteredModelAlias]] = None
@@ -6769,43 +6568,6 @@ class NamedTableConstraint:
6769
6568
  return cls(name=d.get("name", None))
6770
6569
 
6771
6570
 
6772
- @dataclass
6773
- class NewPipelineSpec:
6774
- """Custom fields that user can set for pipeline while creating SyncedDatabaseTable. Note that other
6775
- fields of pipeline are still inferred by table def internally"""
6776
-
6777
- storage_catalog: Optional[str] = None
6778
- """UC catalog for the pipeline to store intermediate files (checkpoints, event logs etc). This
6779
- needs to be a standard catalog where the user has permissions to create Delta tables."""
6780
-
6781
- storage_schema: Optional[str] = None
6782
- """UC schema for the pipeline to store intermediate files (checkpoints, event logs etc). This needs
6783
- to be in the standard catalog where the user has permissions to create Delta tables."""
6784
-
6785
- def as_dict(self) -> dict:
6786
- """Serializes the NewPipelineSpec into a dictionary suitable for use as a JSON request body."""
6787
- body = {}
6788
- if self.storage_catalog is not None:
6789
- body["storage_catalog"] = self.storage_catalog
6790
- if self.storage_schema is not None:
6791
- body["storage_schema"] = self.storage_schema
6792
- return body
6793
-
6794
- def as_shallow_dict(self) -> dict:
6795
- """Serializes the NewPipelineSpec into a shallow dictionary of its immediate attributes."""
6796
- body = {}
6797
- if self.storage_catalog is not None:
6798
- body["storage_catalog"] = self.storage_catalog
6799
- if self.storage_schema is not None:
6800
- body["storage_schema"] = self.storage_schema
6801
- return body
6802
-
6803
- @classmethod
6804
- def from_dict(cls, d: Dict[str, Any]) -> NewPipelineSpec:
6805
- """Deserializes the NewPipelineSpec from a dictionary."""
6806
- return cls(storage_catalog=d.get("storage_catalog", None), storage_schema=d.get("storage_schema", None))
6807
-
6808
-
6809
6571
  @dataclass
6810
6572
  class OnlineTable:
6811
6573
  """Online Table information."""
@@ -7120,31 +6882,6 @@ class PermissionsChange:
7120
6882
  )
7121
6883
 
7122
6884
 
7123
- @dataclass
7124
- class PermissionsList:
7125
- privilege_assignments: Optional[List[PrivilegeAssignment]] = None
7126
- """The privileges assigned to each principal"""
7127
-
7128
- def as_dict(self) -> dict:
7129
- """Serializes the PermissionsList into a dictionary suitable for use as a JSON request body."""
7130
- body = {}
7131
- if self.privilege_assignments:
7132
- body["privilege_assignments"] = [v.as_dict() for v in self.privilege_assignments]
7133
- return body
7134
-
7135
- def as_shallow_dict(self) -> dict:
7136
- """Serializes the PermissionsList into a shallow dictionary of its immediate attributes."""
7137
- body = {}
7138
- if self.privilege_assignments:
7139
- body["privilege_assignments"] = self.privilege_assignments
7140
- return body
7141
-
7142
- @classmethod
7143
- def from_dict(cls, d: Dict[str, Any]) -> PermissionsList:
7144
- """Deserializes the PermissionsList from a dictionary."""
7145
- return cls(privilege_assignments=_repeated_dict(d, "privilege_assignments", PrivilegeAssignment))
7146
-
7147
-
7148
6885
  @dataclass
7149
6886
  class PipelineProgress:
7150
6887
  """Progress information of the Online Table data synchronization pipeline."""
@@ -7335,9 +7072,6 @@ class PrivilegeAssignment:
7335
7072
  return cls(principal=d.get("principal", None), privileges=_repeated_enum(d, "privileges", Privilege))
7336
7073
 
7337
7074
 
7338
- PropertiesKvPairs = Dict[str, str]
7339
-
7340
-
7341
7075
  @dataclass
7342
7076
  class ProvisioningInfo:
7343
7077
  """Status of an asynchronously provisioned resource."""
@@ -7750,6 +7484,8 @@ class RegisteredModelInfo:
7750
7484
 
7751
7485
  @dataclass
7752
7486
  class SchemaInfo:
7487
+ """Next ID: 40"""
7488
+
7753
7489
  browse_only: Optional[bool] = None
7754
7490
  """Indicates whether the principal is limited to retrieving metadata for the associated object
7755
7491
  through the BROWSE privilege when include_browse is enabled in the request."""
@@ -7757,7 +7493,7 @@ class SchemaInfo:
7757
7493
  catalog_name: Optional[str] = None
7758
7494
  """Name of parent catalog."""
7759
7495
 
7760
- catalog_type: Optional[str] = None
7496
+ catalog_type: Optional[CatalogType] = None
7761
7497
  """The type of the parent catalog."""
7762
7498
 
7763
7499
  comment: Optional[str] = None
@@ -7772,6 +7508,7 @@ class SchemaInfo:
7772
7508
  effective_predictive_optimization_flag: Optional[EffectivePredictiveOptimizationFlag] = None
7773
7509
 
7774
7510
  enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None
7511
+ """Whether predictive optimization should be enabled for this object and objects under it."""
7775
7512
 
7776
7513
  full_name: Optional[str] = None
7777
7514
  """Full name of schema, in form of __catalog_name__.__schema_name__."""
@@ -7811,7 +7548,7 @@ class SchemaInfo:
7811
7548
  if self.catalog_name is not None:
7812
7549
  body["catalog_name"] = self.catalog_name
7813
7550
  if self.catalog_type is not None:
7814
- body["catalog_type"] = self.catalog_type
7551
+ body["catalog_type"] = self.catalog_type.value
7815
7552
  if self.comment is not None:
7816
7553
  body["comment"] = self.comment
7817
7554
  if self.created_at is not None:
@@ -7891,7 +7628,7 @@ class SchemaInfo:
7891
7628
  return cls(
7892
7629
  browse_only=d.get("browse_only", None),
7893
7630
  catalog_name=d.get("catalog_name", None),
7894
- catalog_type=d.get("catalog_type", None),
7631
+ catalog_type=_enum(d, "catalog_type", CatalogType),
7895
7632
  comment=d.get("comment", None),
7896
7633
  created_at=d.get("created_at", None),
7897
7634
  created_by=d.get("created_by", None),
@@ -7912,12 +7649,6 @@ class SchemaInfo:
7912
7649
  )
7913
7650
 
7914
7651
 
7915
- SecurableOptionsMap = Dict[str, str]
7916
-
7917
-
7918
- SecurablePropertiesMap = Dict[str, str]
7919
-
7920
-
7921
7652
  class SecurableType(Enum):
7922
7653
  """The type of Unity Catalog securable."""
7923
7654
 
@@ -8249,184 +7980,6 @@ class StorageCredentialInfo:
8249
7980
  )
8250
7981
 
8251
7982
 
8252
- @dataclass
8253
- class SyncedDatabaseTable:
8254
- """Next field marker: 10"""
8255
-
8256
- name: str
8257
- """Full three-part (catalog, schema, table) name of the table."""
8258
-
8259
- data_synchronization_status: Optional[OnlineTableStatus] = None
8260
- """Synced Table data synchronization status"""
8261
-
8262
- database_instance_name: Optional[str] = None
8263
- """Name of the target database instance. This is required when creating synced database tables in
8264
- standard catalogs. This is optional when creating synced database tables in registered catalogs.
8265
- If this field is specified when creating synced database tables in registered catalogs, the
8266
- database instance name MUST match that of the registered catalog (or the request will be
8267
- rejected)."""
8268
-
8269
- logical_database_name: Optional[str] = None
8270
- """Target Postgres database object (logical database) name for this table. This field is optional
8271
- in all scenarios.
8272
-
8273
- When creating a synced table in a registered Postgres catalog, the target Postgres database name
8274
- is inferred to be that of the registered catalog. If this field is specified in this scenario,
8275
- the Postgres database name MUST match that of the registered catalog (or the request will be
8276
- rejected).
8277
-
8278
- When creating a synced table in a standard catalog, the target database name is inferred to be
8279
- that of the standard catalog. In this scenario, specifying this field will allow targeting an
8280
- arbitrary postgres database."""
8281
-
8282
- spec: Optional[SyncedTableSpec] = None
8283
- """Specification of a synced database table."""
8284
-
8285
- table_serving_url: Optional[str] = None
8286
- """Data serving REST API URL for this table"""
8287
-
8288
- unity_catalog_provisioning_state: Optional[ProvisioningInfoState] = None
8289
- """The provisioning state of the synced table entity in Unity Catalog. This is distinct from the
8290
- state of the data synchronization pipeline (i.e. the table may be in "ACTIVE" but the pipeline
8291
- may be in "PROVISIONING" as it runs asynchronously)."""
8292
-
8293
- def as_dict(self) -> dict:
8294
- """Serializes the SyncedDatabaseTable into a dictionary suitable for use as a JSON request body."""
8295
- body = {}
8296
- if self.data_synchronization_status:
8297
- body["data_synchronization_status"] = self.data_synchronization_status.as_dict()
8298
- if self.database_instance_name is not None:
8299
- body["database_instance_name"] = self.database_instance_name
8300
- if self.logical_database_name is not None:
8301
- body["logical_database_name"] = self.logical_database_name
8302
- if self.name is not None:
8303
- body["name"] = self.name
8304
- if self.spec:
8305
- body["spec"] = self.spec.as_dict()
8306
- if self.table_serving_url is not None:
8307
- body["table_serving_url"] = self.table_serving_url
8308
- if self.unity_catalog_provisioning_state is not None:
8309
- body["unity_catalog_provisioning_state"] = self.unity_catalog_provisioning_state.value
8310
- return body
8311
-
8312
- def as_shallow_dict(self) -> dict:
8313
- """Serializes the SyncedDatabaseTable into a shallow dictionary of its immediate attributes."""
8314
- body = {}
8315
- if self.data_synchronization_status:
8316
- body["data_synchronization_status"] = self.data_synchronization_status
8317
- if self.database_instance_name is not None:
8318
- body["database_instance_name"] = self.database_instance_name
8319
- if self.logical_database_name is not None:
8320
- body["logical_database_name"] = self.logical_database_name
8321
- if self.name is not None:
8322
- body["name"] = self.name
8323
- if self.spec:
8324
- body["spec"] = self.spec
8325
- if self.table_serving_url is not None:
8326
- body["table_serving_url"] = self.table_serving_url
8327
- if self.unity_catalog_provisioning_state is not None:
8328
- body["unity_catalog_provisioning_state"] = self.unity_catalog_provisioning_state
8329
- return body
8330
-
8331
- @classmethod
8332
- def from_dict(cls, d: Dict[str, Any]) -> SyncedDatabaseTable:
8333
- """Deserializes the SyncedDatabaseTable from a dictionary."""
8334
- return cls(
8335
- data_synchronization_status=_from_dict(d, "data_synchronization_status", OnlineTableStatus),
8336
- database_instance_name=d.get("database_instance_name", None),
8337
- logical_database_name=d.get("logical_database_name", None),
8338
- name=d.get("name", None),
8339
- spec=_from_dict(d, "spec", SyncedTableSpec),
8340
- table_serving_url=d.get("table_serving_url", None),
8341
- unity_catalog_provisioning_state=_enum(d, "unity_catalog_provisioning_state", ProvisioningInfoState),
8342
- )
8343
-
8344
-
8345
- class SyncedTableSchedulingPolicy(Enum):
8346
-
8347
- CONTINUOUS = "CONTINUOUS"
8348
- SNAPSHOT = "SNAPSHOT"
8349
- TRIGGERED = "TRIGGERED"
8350
-
8351
-
8352
- @dataclass
8353
- class SyncedTableSpec:
8354
- """Specification of a synced database table."""
8355
-
8356
- create_database_objects_if_missing: Optional[bool] = None
8357
- """If true, the synced table's logical database and schema resources in PG will be created if they
8358
- do not already exist."""
8359
-
8360
- new_pipeline_spec: Optional[NewPipelineSpec] = None
8361
- """Spec of new pipeline. Should be empty if pipeline_id is set"""
8362
-
8363
- pipeline_id: Optional[str] = None
8364
- """ID of the associated pipeline. Should be empty if new_pipeline_spec is set"""
8365
-
8366
- primary_key_columns: Optional[List[str]] = None
8367
- """Primary Key columns to be used for data insert/update in the destination."""
8368
-
8369
- scheduling_policy: Optional[SyncedTableSchedulingPolicy] = None
8370
- """Scheduling policy of the underlying pipeline."""
8371
-
8372
- source_table_full_name: Optional[str] = None
8373
- """Three-part (catalog, schema, table) name of the source Delta table."""
8374
-
8375
- timeseries_key: Optional[str] = None
8376
- """Time series key to deduplicate (tie-break) rows with the same primary key."""
8377
-
8378
- def as_dict(self) -> dict:
8379
- """Serializes the SyncedTableSpec into a dictionary suitable for use as a JSON request body."""
8380
- body = {}
8381
- if self.create_database_objects_if_missing is not None:
8382
- body["create_database_objects_if_missing"] = self.create_database_objects_if_missing
8383
- if self.new_pipeline_spec:
8384
- body["new_pipeline_spec"] = self.new_pipeline_spec.as_dict()
8385
- if self.pipeline_id is not None:
8386
- body["pipeline_id"] = self.pipeline_id
8387
- if self.primary_key_columns:
8388
- body["primary_key_columns"] = [v for v in self.primary_key_columns]
8389
- if self.scheduling_policy is not None:
8390
- body["scheduling_policy"] = self.scheduling_policy.value
8391
- if self.source_table_full_name is not None:
8392
- body["source_table_full_name"] = self.source_table_full_name
8393
- if self.timeseries_key is not None:
8394
- body["timeseries_key"] = self.timeseries_key
8395
- return body
8396
-
8397
- def as_shallow_dict(self) -> dict:
8398
- """Serializes the SyncedTableSpec into a shallow dictionary of its immediate attributes."""
8399
- body = {}
8400
- if self.create_database_objects_if_missing is not None:
8401
- body["create_database_objects_if_missing"] = self.create_database_objects_if_missing
8402
- if self.new_pipeline_spec:
8403
- body["new_pipeline_spec"] = self.new_pipeline_spec
8404
- if self.pipeline_id is not None:
8405
- body["pipeline_id"] = self.pipeline_id
8406
- if self.primary_key_columns:
8407
- body["primary_key_columns"] = self.primary_key_columns
8408
- if self.scheduling_policy is not None:
8409
- body["scheduling_policy"] = self.scheduling_policy
8410
- if self.source_table_full_name is not None:
8411
- body["source_table_full_name"] = self.source_table_full_name
8412
- if self.timeseries_key is not None:
8413
- body["timeseries_key"] = self.timeseries_key
8414
- return body
8415
-
8416
- @classmethod
8417
- def from_dict(cls, d: Dict[str, Any]) -> SyncedTableSpec:
8418
- """Deserializes the SyncedTableSpec from a dictionary."""
8419
- return cls(
8420
- create_database_objects_if_missing=d.get("create_database_objects_if_missing", None),
8421
- new_pipeline_spec=_from_dict(d, "new_pipeline_spec", NewPipelineSpec),
8422
- pipeline_id=d.get("pipeline_id", None),
8423
- primary_key_columns=d.get("primary_key_columns", None),
8424
- scheduling_policy=_enum(d, "scheduling_policy", SyncedTableSchedulingPolicy),
8425
- source_table_full_name=d.get("source_table_full_name", None),
8426
- timeseries_key=d.get("timeseries_key", None),
8427
- )
8428
-
8429
-
8430
7983
  @dataclass
8431
7984
  class SystemSchemaInfo:
8432
7985
  schema: str
@@ -9543,7 +9096,7 @@ class UpdateMetastore:
9543
9096
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None
9544
9097
  """The lifetime of delta sharing recipient token in seconds."""
9545
9098
 
9546
- delta_sharing_scope: Optional[UpdateMetastoreDeltaSharingScope] = None
9099
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None
9547
9100
  """The scope of Delta Sharing enabled for the metastore."""
9548
9101
 
9549
9102
  id: Optional[str] = None
@@ -9615,7 +9168,7 @@ class UpdateMetastore:
9615
9168
  delta_sharing_recipient_token_lifetime_in_seconds=d.get(
9616
9169
  "delta_sharing_recipient_token_lifetime_in_seconds", None
9617
9170
  ),
9618
- delta_sharing_scope=_enum(d, "delta_sharing_scope", UpdateMetastoreDeltaSharingScope),
9171
+ delta_sharing_scope=_enum(d, "delta_sharing_scope", DeltaSharingScopeEnum),
9619
9172
  id=d.get("id", None),
9620
9173
  new_name=d.get("new_name", None),
9621
9174
  owner=d.get("owner", None),
@@ -9627,7 +9180,7 @@ class UpdateMetastore:
9627
9180
  @dataclass
9628
9181
  class UpdateMetastoreAssignment:
9629
9182
  default_catalog_name: Optional[str] = None
9630
- """The name of the default catalog in the metastore. This field is depracted. Please use "Default
9183
+ """The name of the default catalog in the metastore. This field is deprecated. Please use "Default
9631
9184
  Namespace API" to configure the default catalog for a Databricks workspace."""
9632
9185
 
9633
9186
  metastore_id: Optional[str] = None
@@ -9668,13 +9221,6 @@ class UpdateMetastoreAssignment:
9668
9221
  )
9669
9222
 
9670
9223
 
9671
- class UpdateMetastoreDeltaSharingScope(Enum):
9672
- """The scope of Delta Sharing enabled for the metastore."""
9673
-
9674
- INTERNAL = "INTERNAL"
9675
- INTERNAL_AND_EXTERNAL = "INTERNAL_AND_EXTERNAL"
9676
-
9677
-
9678
9224
  @dataclass
9679
9225
  class UpdateModelVersionRequest:
9680
9226
  comment: Optional[str] = None
@@ -9843,7 +9389,7 @@ class UpdatePermissions:
9843
9389
  full_name: Optional[str] = None
9844
9390
  """Full name of securable."""
9845
9391
 
9846
- securable_type: Optional[SecurableType] = None
9392
+ securable_type: Optional[str] = None
9847
9393
  """Type of securable."""
9848
9394
 
9849
9395
  def as_dict(self) -> dict:
@@ -9854,7 +9400,7 @@ class UpdatePermissions:
9854
9400
  if self.full_name is not None:
9855
9401
  body["full_name"] = self.full_name
9856
9402
  if self.securable_type is not None:
9857
- body["securable_type"] = self.securable_type.value
9403
+ body["securable_type"] = self.securable_type
9858
9404
  return body
9859
9405
 
9860
9406
  def as_shallow_dict(self) -> dict:
@@ -9874,10 +9420,35 @@ class UpdatePermissions:
9874
9420
  return cls(
9875
9421
  changes=_repeated_dict(d, "changes", PermissionsChange),
9876
9422
  full_name=d.get("full_name", None),
9877
- securable_type=_enum(d, "securable_type", SecurableType),
9423
+ securable_type=d.get("securable_type", None),
9878
9424
  )
9879
9425
 
9880
9426
 
9427
+ @dataclass
9428
+ class UpdatePermissionsResponse:
9429
+ privilege_assignments: Optional[List[PrivilegeAssignment]] = None
9430
+ """The privileges assigned to each principal"""
9431
+
9432
+ def as_dict(self) -> dict:
9433
+ """Serializes the UpdatePermissionsResponse into a dictionary suitable for use as a JSON request body."""
9434
+ body = {}
9435
+ if self.privilege_assignments:
9436
+ body["privilege_assignments"] = [v.as_dict() for v in self.privilege_assignments]
9437
+ return body
9438
+
9439
+ def as_shallow_dict(self) -> dict:
9440
+ """Serializes the UpdatePermissionsResponse into a shallow dictionary of its immediate attributes."""
9441
+ body = {}
9442
+ if self.privilege_assignments:
9443
+ body["privilege_assignments"] = self.privilege_assignments
9444
+ return body
9445
+
9446
+ @classmethod
9447
+ def from_dict(cls, d: Dict[str, Any]) -> UpdatePermissionsResponse:
9448
+ """Deserializes the UpdatePermissionsResponse from a dictionary."""
9449
+ return cls(privilege_assignments=_repeated_dict(d, "privilege_assignments", PrivilegeAssignment))
9450
+
9451
+
9881
9452
  @dataclass
9882
9453
  class UpdateRegisteredModelRequest:
9883
9454
  comment: Optional[str] = None
@@ -9953,6 +9524,7 @@ class UpdateSchema:
9953
9524
  """User-provided free-form text description."""
9954
9525
 
9955
9526
  enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None
9527
+ """Whether predictive optimization should be enabled for this object and objects under it."""
9956
9528
 
9957
9529
  full_name: Optional[str] = None
9958
9530
  """Full name of the schema."""
@@ -10137,6 +9709,39 @@ class UpdateStorageCredential:
10137
9709
  )
10138
9710
 
10139
9711
 
9712
+ @dataclass
9713
+ class UpdateTableRequest:
9714
+ """Update a table owner."""
9715
+
9716
+ full_name: Optional[str] = None
9717
+ """Full name of the table."""
9718
+
9719
+ owner: Optional[str] = None
9720
+
9721
+ def as_dict(self) -> dict:
9722
+ """Serializes the UpdateTableRequest into a dictionary suitable for use as a JSON request body."""
9723
+ body = {}
9724
+ if self.full_name is not None:
9725
+ body["full_name"] = self.full_name
9726
+ if self.owner is not None:
9727
+ body["owner"] = self.owner
9728
+ return body
9729
+
9730
+ def as_shallow_dict(self) -> dict:
9731
+ """Serializes the UpdateTableRequest into a shallow dictionary of its immediate attributes."""
9732
+ body = {}
9733
+ if self.full_name is not None:
9734
+ body["full_name"] = self.full_name
9735
+ if self.owner is not None:
9736
+ body["owner"] = self.owner
9737
+ return body
9738
+
9739
+ @classmethod
9740
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateTableRequest:
9741
+ """Deserializes the UpdateTableRequest from a dictionary."""
9742
+ return cls(full_name=d.get("full_name", None), owner=d.get("owner", None))
9743
+
9744
+
10140
9745
  @dataclass
10141
9746
  class UpdateVolumeRequestContent:
10142
9747
  comment: Optional[str] = None
@@ -11586,7 +11191,7 @@ class ConnectionsAPI:
11586
11191
  :param comment: str (optional)
11587
11192
  User-provided free-form text description.
11588
11193
  :param properties: Dict[str,str] (optional)
11589
- An object containing map of key-value properties attached to the connection.
11194
+ A map of key-value properties attached to the securable.
11590
11195
  :param read_only: bool (optional)
11591
11196
  If the connection is read only.
11592
11197
 
@@ -11673,8 +11278,6 @@ class ConnectionsAPI:
11673
11278
  "Accept": "application/json",
11674
11279
  }
11675
11280
 
11676
- if "max_results" not in query:
11677
- query["max_results"] = 0
11678
11281
  while True:
11679
11282
  json = self._api.do("GET", "/api/2.1/unity-catalog/connections", query=query, headers=headers)
11680
11283
  if "connections" in json:
@@ -12086,241 +11689,6 @@ class CredentialsAPI:
12086
11689
  return ValidateCredentialResponse.from_dict(res)
12087
11690
 
12088
11691
 
12089
- class DatabaseInstancesAPI:
12090
- """Database Instances provide access to a database via REST API or direct SQL."""
12091
-
12092
- def __init__(self, api_client):
12093
- self._api = api_client
12094
-
12095
- def create_database_catalog(self, catalog: DatabaseCatalog) -> DatabaseCatalog:
12096
- """Create a Database Catalog.
12097
-
12098
- :param catalog: :class:`DatabaseCatalog`
12099
-
12100
- :returns: :class:`DatabaseCatalog`
12101
- """
12102
- body = catalog.as_dict()
12103
- headers = {
12104
- "Accept": "application/json",
12105
- "Content-Type": "application/json",
12106
- }
12107
-
12108
- res = self._api.do("POST", "/api/2.0/database/catalogs", body=body, headers=headers)
12109
- return DatabaseCatalog.from_dict(res)
12110
-
12111
- def create_database_instance(self, database_instance: DatabaseInstance) -> DatabaseInstance:
12112
- """Create a Database Instance.
12113
-
12114
- :param database_instance: :class:`DatabaseInstance`
12115
- A DatabaseInstance represents a logical Postgres instance, comprised of both compute and storage.
12116
-
12117
- :returns: :class:`DatabaseInstance`
12118
- """
12119
- body = database_instance.as_dict()
12120
- headers = {
12121
- "Accept": "application/json",
12122
- "Content-Type": "application/json",
12123
- }
12124
-
12125
- res = self._api.do("POST", "/api/2.0/database/instances", body=body, headers=headers)
12126
- return DatabaseInstance.from_dict(res)
12127
-
12128
- def create_synced_database_table(self, synced_table: SyncedDatabaseTable) -> SyncedDatabaseTable:
12129
- """Create a Synced Database Table.
12130
-
12131
- :param synced_table: :class:`SyncedDatabaseTable`
12132
- Next field marker: 10
12133
-
12134
- :returns: :class:`SyncedDatabaseTable`
12135
- """
12136
- body = synced_table.as_dict()
12137
- headers = {
12138
- "Accept": "application/json",
12139
- "Content-Type": "application/json",
12140
- }
12141
-
12142
- res = self._api.do("POST", "/api/2.0/database/synced_tables", body=body, headers=headers)
12143
- return SyncedDatabaseTable.from_dict(res)
12144
-
12145
- def delete_database_catalog(self, name: str):
12146
- """Delete a Database Catalog.
12147
-
12148
- :param name: str
12149
-
12150
-
12151
- """
12152
-
12153
- headers = {
12154
- "Accept": "application/json",
12155
- }
12156
-
12157
- self._api.do("DELETE", f"/api/2.0/database/catalogs/{name}", headers=headers)
12158
-
12159
- def delete_database_instance(self, name: str, *, force: Optional[bool] = None, purge: Optional[bool] = None):
12160
- """Delete a Database Instance.
12161
-
12162
- :param name: str
12163
- Name of the instance to delete.
12164
- :param force: bool (optional)
12165
- By default, a instance cannot be deleted if it has descendant instances created via PITR. If this
12166
- flag is specified as true, all descendent instances will be deleted as well.
12167
- :param purge: bool (optional)
12168
- If false, the database instance is soft deleted. Soft deleted instances behave as if they are
12169
- deleted, and cannot be used for CRUD operations nor connected to. However they can be undeleted by
12170
- calling the undelete API for a limited time. If true, the database instance is hard deleted and
12171
- cannot be undeleted.
12172
-
12173
-
12174
- """
12175
-
12176
- query = {}
12177
- if force is not None:
12178
- query["force"] = force
12179
- if purge is not None:
12180
- query["purge"] = purge
12181
- headers = {
12182
- "Accept": "application/json",
12183
- }
12184
-
12185
- self._api.do("DELETE", f"/api/2.0/database/instances/{name}", query=query, headers=headers)
12186
-
12187
- def delete_synced_database_table(self, name: str):
12188
- """Delete a Synced Database Table.
12189
-
12190
- :param name: str
12191
-
12192
-
12193
- """
12194
-
12195
- headers = {
12196
- "Accept": "application/json",
12197
- }
12198
-
12199
- self._api.do("DELETE", f"/api/2.0/database/synced_tables/{name}", headers=headers)
12200
-
12201
- def find_database_instance_by_uid(self, *, uid: Optional[str] = None) -> DatabaseInstance:
12202
- """Find a Database Instance by uid.
12203
-
12204
- :param uid: str (optional)
12205
- UID of the cluster to get.
12206
-
12207
- :returns: :class:`DatabaseInstance`
12208
- """
12209
-
12210
- query = {}
12211
- if uid is not None:
12212
- query["uid"] = uid
12213
- headers = {
12214
- "Accept": "application/json",
12215
- }
12216
-
12217
- res = self._api.do("GET", "/api/2.0/database/instances:findByUid", query=query, headers=headers)
12218
- return DatabaseInstance.from_dict(res)
12219
-
12220
- def get_database_catalog(self, name: str) -> DatabaseCatalog:
12221
- """Get a Database Catalog.
12222
-
12223
- :param name: str
12224
-
12225
- :returns: :class:`DatabaseCatalog`
12226
- """
12227
-
12228
- headers = {
12229
- "Accept": "application/json",
12230
- }
12231
-
12232
- res = self._api.do("GET", f"/api/2.0/database/catalogs/{name}", headers=headers)
12233
- return DatabaseCatalog.from_dict(res)
12234
-
12235
- def get_database_instance(self, name: str) -> DatabaseInstance:
12236
- """Get a Database Instance.
12237
-
12238
- :param name: str
12239
- Name of the cluster to get.
12240
-
12241
- :returns: :class:`DatabaseInstance`
12242
- """
12243
-
12244
- headers = {
12245
- "Accept": "application/json",
12246
- }
12247
-
12248
- res = self._api.do("GET", f"/api/2.0/database/instances/{name}", headers=headers)
12249
- return DatabaseInstance.from_dict(res)
12250
-
12251
- def get_synced_database_table(self, name: str) -> SyncedDatabaseTable:
12252
- """Get a Synced Database Table.
12253
-
12254
- :param name: str
12255
-
12256
- :returns: :class:`SyncedDatabaseTable`
12257
- """
12258
-
12259
- headers = {
12260
- "Accept": "application/json",
12261
- }
12262
-
12263
- res = self._api.do("GET", f"/api/2.0/database/synced_tables/{name}", headers=headers)
12264
- return SyncedDatabaseTable.from_dict(res)
12265
-
12266
- def list_database_instances(
12267
- self, *, page_size: Optional[int] = None, page_token: Optional[str] = None
12268
- ) -> Iterator[DatabaseInstance]:
12269
- """List Database Instances.
12270
-
12271
- :param page_size: int (optional)
12272
- Upper bound for items returned.
12273
- :param page_token: str (optional)
12274
- Pagination token to go to the next page of Database Instances. Requests first page if absent.
12275
-
12276
- :returns: Iterator over :class:`DatabaseInstance`
12277
- """
12278
-
12279
- query = {}
12280
- if page_size is not None:
12281
- query["page_size"] = page_size
12282
- if page_token is not None:
12283
- query["page_token"] = page_token
12284
- headers = {
12285
- "Accept": "application/json",
12286
- }
12287
-
12288
- while True:
12289
- json = self._api.do("GET", "/api/2.0/database/instances", query=query, headers=headers)
12290
- if "database_instances" in json:
12291
- for v in json["database_instances"]:
12292
- yield DatabaseInstance.from_dict(v)
12293
- if "next_page_token" not in json or not json["next_page_token"]:
12294
- return
12295
- query["page_token"] = json["next_page_token"]
12296
-
12297
- def update_database_instance(
12298
- self, name: str, database_instance: DatabaseInstance, update_mask: str
12299
- ) -> DatabaseInstance:
12300
- """Update a Database Instance.
12301
-
12302
- :param name: str
12303
- The name of the instance. This is the unique identifier for the instance.
12304
- :param database_instance: :class:`DatabaseInstance`
12305
- A DatabaseInstance represents a logical Postgres instance, comprised of both compute and storage.
12306
- :param update_mask: str
12307
- The list of fields to update.
12308
-
12309
- :returns: :class:`DatabaseInstance`
12310
- """
12311
- body = database_instance.as_dict()
12312
- query = {}
12313
- if update_mask is not None:
12314
- query["update_mask"] = update_mask
12315
- headers = {
12316
- "Accept": "application/json",
12317
- "Content-Type": "application/json",
12318
- }
12319
-
12320
- res = self._api.do("PATCH", f"/api/2.0/database/instances/{name}", query=query, body=body, headers=headers)
12321
- return DatabaseInstance.from_dict(res)
12322
-
12323
-
12324
11692
  class ExternalLocationsAPI:
12325
11693
  """An external location is an object that combines a cloud storage path with a storage credential that
12326
11694
  authorizes access to the cloud storage path. Each external location is subject to Unity Catalog
@@ -12794,22 +12162,46 @@ class GrantsAPI:
12794
12162
  def __init__(self, api_client):
12795
12163
  self._api = api_client
12796
12164
 
12797
- def get(self, securable_type: SecurableType, full_name: str, *, principal: Optional[str] = None) -> PermissionsList:
12165
+ def get(
12166
+ self,
12167
+ securable_type: str,
12168
+ full_name: str,
12169
+ *,
12170
+ max_results: Optional[int] = None,
12171
+ page_token: Optional[str] = None,
12172
+ principal: Optional[str] = None,
12173
+ ) -> GetPermissionsResponse:
12798
12174
  """Get permissions.
12799
12175
 
12800
- Gets the permissions for a securable.
12176
+ Gets the permissions for a securable. Does not include inherited permissions.
12801
12177
 
12802
- :param securable_type: :class:`SecurableType`
12178
+ :param securable_type: str
12803
12179
  Type of securable.
12804
12180
  :param full_name: str
12805
12181
  Full name of securable.
12182
+ :param max_results: int (optional)
12183
+ Specifies the maximum number of privileges to return (page length). Every PrivilegeAssignment
12184
+ present in a single page response is guaranteed to contain all the privileges granted on the
12185
+ requested Securable for the respective principal.
12186
+
12187
+ If not set, all the permissions are returned. If set to - lesser than 0: invalid parameter error -
12188
+ 0: page length is set to a server configured value - lesser than 150 but greater than 0: invalid
12189
+ parameter error (this is to ensure that server is able to return at least one complete
12190
+ PrivilegeAssignment in a single page response) - greater than (or equal to) 150: page length is the
12191
+ minimum of this value and a server configured value
12192
+ :param page_token: str (optional)
12193
+ Opaque pagination token to go to next page based on previous query.
12806
12194
  :param principal: str (optional)
12807
12195
  If provided, only the permissions for the specified principal (user or group) are returned.
12808
12196
 
12809
- :returns: :class:`PermissionsList`
12197
+ :returns: :class:`GetPermissionsResponse`
12810
12198
  """
12811
12199
 
12812
12200
  query = {}
12201
+ if max_results is not None:
12202
+ query["max_results"] = max_results
12203
+ if page_token is not None:
12204
+ query["page_token"] = page_token
12813
12205
  if principal is not None:
12814
12206
  query["principal"] = principal
12815
12207
  headers = {
@@ -12817,24 +12209,41 @@ class GrantsAPI:
12817
12209
  }
12818
12210
 
12819
12211
  res = self._api.do(
12820
- "GET",
12821
- f"/api/2.1/unity-catalog/permissions/{securable_type.value}/{full_name}",
12822
- query=query,
12823
- headers=headers,
12212
+ "GET", f"/api/2.1/unity-catalog/permissions/{securable_type}/{full_name}", query=query, headers=headers
12824
12213
  )
12825
- return PermissionsList.from_dict(res)
12214
+ return GetPermissionsResponse.from_dict(res)
12826
12215
 
12827
12216
  def get_effective(
12828
- self, securable_type: SecurableType, full_name: str, *, principal: Optional[str] = None
12217
+ self,
12218
+ securable_type: str,
12219
+ full_name: str,
12220
+ *,
12221
+ max_results: Optional[int] = None,
12222
+ page_token: Optional[str] = None,
12223
+ principal: Optional[str] = None,
12829
12224
  ) -> EffectivePermissionsList:
12830
12225
  """Get effective permissions.
12831
12226
 
12832
- Gets the effective permissions for a securable.
12227
+ Gets the effective permissions for a securable. Includes inherited permissions from any parent
12228
+ securables.
12833
12229
 
12834
- :param securable_type: :class:`SecurableType`
12230
+ :param securable_type: str
12835
12231
  Type of securable.
12836
12232
  :param full_name: str
12837
12233
  Full name of securable.
12234
+ :param max_results: int (optional)
12235
+ Specifies the maximum number of privileges to return (page length). Every
12236
+ EffectivePrivilegeAssignment present in a single page response is guaranteed to contain all the
12237
+ effective privileges granted on (or inherited by) the requested Securable for the respective
12238
+ principal.
12239
+
12240
+ If not set, all the effective permissions are returned. If set to - lesser than 0: invalid parameter
12241
+ error - 0: page length is set to a server configured value - lesser than 150 but greater than 0:
12242
+ invalid parameter error (this is to ensure that server is able to return at least one complete
12243
+ EffectivePrivilegeAssignment in a single page response) - greater than (or equal to) 150: page
12244
+ length is the minimum of this value and a server configured value
12245
+ :param page_token: str (optional)
12246
+ Opaque token for the next page of results (pagination).
12838
12247
  :param principal: str (optional)
12839
12248
  If provided, only the effective permissions for the specified principal (user or group) are
12840
12249
  returned.
@@ -12843,6 +12252,10 @@ class GrantsAPI:
12843
12252
  """
12844
12253
 
12845
12254
  query = {}
12255
+ if max_results is not None:
12256
+ query["max_results"] = max_results
12257
+ if page_token is not None:
12258
+ query["page_token"] = page_token
12846
12259
  if principal is not None:
12847
12260
  query["principal"] = principal
12848
12261
  headers = {
@@ -12851,27 +12264,27 @@ class GrantsAPI:
12851
12264
 
12852
12265
  res = self._api.do(
12853
12266
  "GET",
12854
- f"/api/2.1/unity-catalog/effective-permissions/{securable_type.value}/{full_name}",
12267
+ f"/api/2.1/unity-catalog/effective-permissions/{securable_type}/{full_name}",
12855
12268
  query=query,
12856
12269
  headers=headers,
12857
12270
  )
12858
12271
  return EffectivePermissionsList.from_dict(res)
12859
12272
 
12860
12273
  def update(
12861
- self, securable_type: SecurableType, full_name: str, *, changes: Optional[List[PermissionsChange]] = None
12862
- ) -> PermissionsList:
12274
+ self, securable_type: str, full_name: str, *, changes: Optional[List[PermissionsChange]] = None
12275
+ ) -> UpdatePermissionsResponse:
12863
12276
  """Update permissions.
12864
12277
 
12865
12278
  Updates the permissions for a securable.
12866
12279
 
12867
- :param securable_type: :class:`SecurableType`
12280
+ :param securable_type: str
12868
12281
  Type of securable.
12869
12282
  :param full_name: str
12870
12283
  Full name of securable.
12871
12284
  :param changes: List[:class:`PermissionsChange`] (optional)
12872
12285
  Array of permissions change objects.
12873
12286
 
12874
- :returns: :class:`PermissionsList`
12287
+ :returns: :class:`UpdatePermissionsResponse`
12875
12288
  """
12876
12289
  body = {}
12877
12290
  if changes is not None:
@@ -12882,12 +12295,9 @@ class GrantsAPI:
12882
12295
  }
12883
12296
 
12884
12297
  res = self._api.do(
12885
- "PATCH",
12886
- f"/api/2.1/unity-catalog/permissions/{securable_type.value}/{full_name}",
12887
- body=body,
12888
- headers=headers,
12298
+ "PATCH", f"/api/2.1/unity-catalog/permissions/{securable_type}/{full_name}", body=body, headers=headers
12889
12299
  )
12890
- return PermissionsList.from_dict(res)
12300
+ return UpdatePermissionsResponse.from_dict(res)
12891
12301
 
12892
12302
 
12893
12303
  class MetastoresAPI:
@@ -12918,7 +12328,7 @@ class MetastoresAPI:
12918
12328
  :param metastore_id: str
12919
12329
  The unique ID of the metastore.
12920
12330
  :param default_catalog_name: str
12921
- The name of the default catalog in the metastore. This field is depracted. Please use "Default
12331
+ The name of the default catalog in the metastore. This field is deprecated. Please use "Default
12922
12332
  Namespace API" to configure the default catalog for a Databricks workspace.
12923
12333
 
12924
12334
 
@@ -12946,9 +12356,7 @@ class MetastoresAPI:
12946
12356
  :param name: str
12947
12357
  The user-specified name of the metastore.
12948
12358
  :param region: str (optional)
12949
- Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). The field can be omitted in
12950
- the __workspace-level__ __API__ but not in the __account-level__ __API__. If this field is omitted,
12951
- the region of the workspace receiving the request will be used.
12359
+ Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
12952
12360
  :param storage_root: str (optional)
12953
12361
  The storage root URL for metastore
12954
12362
 
@@ -13025,22 +12433,43 @@ class MetastoresAPI:
13025
12433
  res = self._api.do("GET", f"/api/2.1/unity-catalog/metastores/{id}", headers=headers)
13026
12434
  return MetastoreInfo.from_dict(res)
13027
12435
 
13028
- def list(self) -> Iterator[MetastoreInfo]:
12436
+ def list(self, *, max_results: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[MetastoreInfo]:
13029
12437
  """List metastores.
13030
12438
 
13031
12439
  Gets an array of the available metastores (as __MetastoreInfo__ objects). The caller must be an admin
13032
12440
  to retrieve this info. There is no guarantee of a specific ordering of the elements in the array.
13033
12441
 
12442
+ :param max_results: int (optional)
12443
+ Maximum number of metastores to return. - when set to a value greater than 0, the page length is the
12444
+ minimum of this value and a server configured value; - when set to 0, the page length is set to a
12445
+ server configured value (recommended); - when set to a value less than 0, an invalid parameter error
12446
+ is returned; - If not set, all the metastores are returned (not recommended). - Note: The number of
12447
+ returned metastores might be less than the specified max_results size, even zero. The only
12448
+ definitive indication that no further metastores can be fetched is when the next_page_token is unset
12449
+ from the response.
12450
+ :param page_token: str (optional)
12451
+ Opaque pagination token to go to next page based on previous query.
12452
+
13034
12453
  :returns: Iterator over :class:`MetastoreInfo`
13035
12454
  """
13036
12455
 
12456
+ query = {}
12457
+ if max_results is not None:
12458
+ query["max_results"] = max_results
12459
+ if page_token is not None:
12460
+ query["page_token"] = page_token
13037
12461
  headers = {
13038
12462
  "Accept": "application/json",
13039
12463
  }
13040
12464
 
13041
- json = self._api.do("GET", "/api/2.1/unity-catalog/metastores", headers=headers)
13042
- parsed = ListMetastoresResponse.from_dict(json).metastores
13043
- return parsed if parsed is not None else []
12465
+ while True:
12466
+ json = self._api.do("GET", "/api/2.1/unity-catalog/metastores", query=query, headers=headers)
12467
+ if "metastores" in json:
12468
+ for v in json["metastores"]:
12469
+ yield MetastoreInfo.from_dict(v)
12470
+ if "next_page_token" not in json or not json["next_page_token"]:
12471
+ return
12472
+ query["page_token"] = json["next_page_token"]
13044
12473
 
13045
12474
  def summary(self) -> GetMetastoreSummaryResponse:
13046
12475
  """Get a metastore summary.
@@ -13088,7 +12517,7 @@ class MetastoresAPI:
13088
12517
  *,
13089
12518
  delta_sharing_organization_name: Optional[str] = None,
13090
12519
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None,
13091
- delta_sharing_scope: Optional[UpdateMetastoreDeltaSharingScope] = None,
12520
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None,
13092
12521
  new_name: Optional[str] = None,
13093
12522
  owner: Optional[str] = None,
13094
12523
  privilege_model_version: Optional[str] = None,
@@ -13106,7 +12535,7 @@ class MetastoresAPI:
13106
12535
  Sharing as the official name.
13107
12536
  :param delta_sharing_recipient_token_lifetime_in_seconds: int (optional)
13108
12537
  The lifetime of delta sharing recipient token in seconds.
13109
- :param delta_sharing_scope: :class:`UpdateMetastoreDeltaSharingScope` (optional)
12538
+ :param delta_sharing_scope: :class:`DeltaSharingScopeEnum` (optional)
13110
12539
  The scope of Delta Sharing enabled for the metastore.
13111
12540
  :param new_name: str (optional)
13112
12541
  New name for the metastore.
@@ -13157,7 +12586,7 @@ class MetastoresAPI:
13157
12586
  :param workspace_id: int
13158
12587
  A workspace ID.
13159
12588
  :param default_catalog_name: str (optional)
13160
- The name of the default catalog in the metastore. This field is depracted. Please use "Default
12589
+ The name of the default catalog in the metastore. This field is deprecated. Please use "Default
13161
12590
  Namespace API" to configure the default catalog for a Databricks workspace.
13162
12591
  :param metastore_id: str (optional)
13163
12592
  The unique ID of the metastore.
@@ -14409,8 +13838,6 @@ class SchemasAPI:
14409
13838
  "Accept": "application/json",
14410
13839
  }
14411
13840
 
14412
- if "max_results" not in query:
14413
- query["max_results"] = 0
14414
13841
  while True:
14415
13842
  json = self._api.do("GET", "/api/2.1/unity-catalog/schemas", query=query, headers=headers)
14416
13843
  if "schemas" in json:
@@ -14442,6 +13869,7 @@ class SchemasAPI:
14442
13869
  :param comment: str (optional)
14443
13870
  User-provided free-form text description.
14444
13871
  :param enable_predictive_optimization: :class:`EnablePredictiveOptimization` (optional)
13872
+ Whether predictive optimization should be enabled for this object and objects under it.
14445
13873
  :param new_name: str (optional)
14446
13874
  New name for the schema.
14447
13875
  :param owner: str (optional)