databricks-sdk 0.55.0__py3-none-any.whl → 0.57.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

Files changed (31) hide show
  1. databricks/sdk/__init__.py +41 -24
  2. databricks/sdk/service/aibuilder.py +505 -0
  3. databricks/sdk/service/apps.py +14 -42
  4. databricks/sdk/service/billing.py +167 -220
  5. databricks/sdk/service/catalog.py +462 -1235
  6. databricks/sdk/service/cleanrooms.py +26 -43
  7. databricks/sdk/service/compute.py +75 -211
  8. databricks/sdk/service/dashboards.py +77 -511
  9. databricks/sdk/service/database.py +1271 -0
  10. databricks/sdk/service/files.py +20 -54
  11. databricks/sdk/service/iam.py +61 -171
  12. databricks/sdk/service/jobs.py +453 -68
  13. databricks/sdk/service/marketplace.py +46 -146
  14. databricks/sdk/service/ml.py +453 -477
  15. databricks/sdk/service/oauth2.py +17 -45
  16. databricks/sdk/service/pipelines.py +125 -40
  17. databricks/sdk/service/provisioning.py +30 -93
  18. databricks/sdk/service/qualitymonitorv2.py +265 -0
  19. databricks/sdk/service/serving.py +106 -46
  20. databricks/sdk/service/settings.py +1062 -390
  21. databricks/sdk/service/sharing.py +33 -88
  22. databricks/sdk/service/sql.py +292 -185
  23. databricks/sdk/service/vectorsearch.py +13 -43
  24. databricks/sdk/service/workspace.py +35 -105
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/METADATA +1 -1
  27. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/RECORD +31 -28
  28. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/WHEEL +0 -0
  29. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/LICENSE +0 -0
  30. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/NOTICE +0 -0
  31. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/top_level.txt +0 -0
@@ -520,8 +520,10 @@ class AwsIamRole:
520
520
 
521
521
  @dataclass
522
522
  class AwsIamRoleRequest:
523
+ """The AWS IAM role configuration"""
524
+
523
525
  role_arn: str
524
- """The Amazon Resource Name (ARN) of the AWS IAM role for S3 data access."""
526
+ """The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials."""
525
527
 
526
528
  def as_dict(self) -> dict:
527
529
  """Serializes the AwsIamRoleRequest into a dictionary suitable for use as a JSON request body."""
@@ -545,11 +547,13 @@ class AwsIamRoleRequest:
545
547
 
546
548
  @dataclass
547
549
  class AwsIamRoleResponse:
550
+ """The AWS IAM role configuration"""
551
+
548
552
  role_arn: str
549
- """The Amazon Resource Name (ARN) of the AWS IAM role for S3 data access."""
553
+ """The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials."""
550
554
 
551
555
  external_id: Optional[str] = None
552
- """The external ID used in role assumption to prevent confused deputy problem.."""
556
+ """The external ID used in role assumption to prevent the confused deputy problem."""
553
557
 
554
558
  unity_catalog_iam_arn: Optional[str] = None
555
559
  """The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks. This is the identity
@@ -659,9 +663,7 @@ class AzureManagedIdentity:
659
663
  `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`."""
660
664
 
661
665
  credential_id: Optional[str] = None
662
- """The Databricks internal ID that represents this managed identity. This field is only used to
663
- persist the credential_id once it is fetched from the credentials manager - as we only use the
664
- protobuf serializer to store credentials, this ID gets persisted to the database. ."""
666
+ """The Databricks internal ID that represents this managed identity."""
665
667
 
666
668
  managed_identity_id: Optional[str] = None
667
669
  """The Azure resource ID of the managed identity. Use the format,
@@ -704,16 +706,18 @@ class AzureManagedIdentity:
704
706
 
705
707
  @dataclass
706
708
  class AzureManagedIdentityRequest:
709
+ """The Azure managed identity configuration."""
710
+
707
711
  access_connector_id: str
708
712
  """The Azure resource ID of the Azure Databricks Access Connector. Use the format
709
- /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}."""
713
+ `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`."""
710
714
 
711
715
  managed_identity_id: Optional[str] = None
712
- """The Azure resource ID of the managed identity. Use the format
713
- /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}.
716
+ """The Azure resource ID of the managed identity. Use the format,
717
+ `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}`
714
718
  This is only available for user-assgined identities. For system-assigned identities, the
715
719
  access_connector_id is used to identify the identity. If this field is not provided, then we
716
- assume the AzureManagedIdentity is for a system-assigned identity."""
720
+ assume the AzureManagedIdentity is using the system-assigned identity."""
717
721
 
718
722
  def as_dict(self) -> dict:
719
723
  """Serializes the AzureManagedIdentityRequest into a dictionary suitable for use as a JSON request body."""
@@ -744,19 +748,21 @@ class AzureManagedIdentityRequest:
744
748
 
745
749
  @dataclass
746
750
  class AzureManagedIdentityResponse:
751
+ """The Azure managed identity configuration."""
752
+
747
753
  access_connector_id: str
748
754
  """The Azure resource ID of the Azure Databricks Access Connector. Use the format
749
- /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}."""
755
+ `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`."""
750
756
 
751
757
  credential_id: Optional[str] = None
752
758
  """The Databricks internal ID that represents this managed identity."""
753
759
 
754
760
  managed_identity_id: Optional[str] = None
755
- """The Azure resource ID of the managed identity. Use the format
756
- /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}.
761
+ """The Azure resource ID of the managed identity. Use the format,
762
+ `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}`
757
763
  This is only available for user-assgined identities. For system-assigned identities, the
758
764
  access_connector_id is used to identify the identity. If this field is not provided, then we
759
- assume the AzureManagedIdentity is for a system-assigned identity."""
765
+ assume the AzureManagedIdentity is using the system-assigned identity."""
760
766
 
761
767
  def as_dict(self) -> dict:
762
768
  """Serializes the AzureManagedIdentityResponse into a dictionary suitable for use as a JSON request body."""
@@ -1162,14 +1168,17 @@ class CatalogType(Enum):
1162
1168
 
1163
1169
  @dataclass
1164
1170
  class CloudflareApiToken:
1171
+ """The Cloudflare API token configuration. Read more at
1172
+ https://developers.cloudflare.com/r2/api/s3/tokens/"""
1173
+
1165
1174
  access_key_id: str
1166
- """The Cloudflare access key id of the token."""
1175
+ """The access key ID associated with the API token."""
1167
1176
 
1168
1177
  secret_access_key: str
1169
- """The secret access token generated for the access key id"""
1178
+ """The secret access token generated for the above access key ID."""
1170
1179
 
1171
1180
  account_id: str
1172
- """The account id associated with the API token."""
1181
+ """The ID of the account associated with the API token."""
1173
1182
 
1174
1183
  def as_dict(self) -> dict:
1175
1184
  """Serializes the CloudflareApiToken into a dictionary suitable for use as a JSON request body."""
@@ -1414,7 +1423,7 @@ class ConnectionInfo:
1414
1423
  """Username of current owner of the connection."""
1415
1424
 
1416
1425
  properties: Optional[Dict[str, str]] = None
1417
- """An object containing map of key-value properties attached to the connection."""
1426
+ """A map of key-value properties attached to the securable."""
1418
1427
 
1419
1428
  provisioning_info: Optional[ProvisioningInfo] = None
1420
1429
  """Status of an asynchronously provisioned resource."""
@@ -1422,7 +1431,8 @@ class ConnectionInfo:
1422
1431
  read_only: Optional[bool] = None
1423
1432
  """If the connection is read only."""
1424
1433
 
1425
- securable_type: Optional[str] = None
1434
+ securable_type: Optional[SecurableType] = None
1435
+ """The type of Unity Catalog securable."""
1426
1436
 
1427
1437
  updated_at: Optional[int] = None
1428
1438
  """Time at which this connection was updated, in epoch milliseconds."""
@@ -1465,7 +1475,7 @@ class ConnectionInfo:
1465
1475
  if self.read_only is not None:
1466
1476
  body["read_only"] = self.read_only
1467
1477
  if self.securable_type is not None:
1468
- body["securable_type"] = self.securable_type
1478
+ body["securable_type"] = self.securable_type.value
1469
1479
  if self.updated_at is not None:
1470
1480
  body["updated_at"] = self.updated_at
1471
1481
  if self.updated_by is not None:
@@ -1533,7 +1543,7 @@ class ConnectionInfo:
1533
1543
  properties=d.get("properties", None),
1534
1544
  provisioning_info=_from_dict(d, "provisioning_info", ProvisioningInfo),
1535
1545
  read_only=d.get("read_only", None),
1536
- securable_type=d.get("securable_type", None),
1546
+ securable_type=_enum(d, "securable_type", SecurableType),
1537
1547
  updated_at=d.get("updated_at", None),
1538
1548
  updated_by=d.get("updated_by", None),
1539
1549
  url=d.get("url", None),
@@ -1541,21 +1551,28 @@ class ConnectionInfo:
1541
1551
 
1542
1552
 
1543
1553
  class ConnectionType(Enum):
1544
- """The type of connection."""
1554
+ """Next Id: 33"""
1545
1555
 
1546
1556
  BIGQUERY = "BIGQUERY"
1547
1557
  DATABRICKS = "DATABRICKS"
1558
+ GA4_RAW_DATA = "GA4_RAW_DATA"
1548
1559
  GLUE = "GLUE"
1549
1560
  HIVE_METASTORE = "HIVE_METASTORE"
1550
1561
  HTTP = "HTTP"
1551
1562
  MYSQL = "MYSQL"
1552
1563
  ORACLE = "ORACLE"
1553
1564
  POSTGRESQL = "POSTGRESQL"
1565
+ POWER_BI = "POWER_BI"
1554
1566
  REDSHIFT = "REDSHIFT"
1567
+ SALESFORCE = "SALESFORCE"
1568
+ SALESFORCE_DATA_CLOUD = "SALESFORCE_DATA_CLOUD"
1569
+ SERVICENOW = "SERVICENOW"
1555
1570
  SNOWFLAKE = "SNOWFLAKE"
1556
1571
  SQLDW = "SQLDW"
1557
1572
  SQLSERVER = "SQLSERVER"
1558
1573
  TERADATA = "TERADATA"
1574
+ UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE"
1575
+ WORKDAY_RAAS = "WORKDAY_RAAS"
1559
1576
 
1560
1577
 
1561
1578
  @dataclass
@@ -1706,7 +1723,7 @@ class CreateConnection:
1706
1723
  """User-provided free-form text description."""
1707
1724
 
1708
1725
  properties: Optional[Dict[str, str]] = None
1709
- """An object containing map of key-value properties attached to the connection."""
1726
+ """A map of key-value properties attached to the securable."""
1710
1727
 
1711
1728
  read_only: Optional[bool] = None
1712
1729
  """If the connection is read only."""
@@ -1765,19 +1782,19 @@ class CreateCredentialRequest:
1765
1782
  metastore."""
1766
1783
 
1767
1784
  aws_iam_role: Optional[AwsIamRole] = None
1768
- """The AWS IAM role configuration"""
1785
+ """The AWS IAM role configuration."""
1769
1786
 
1770
1787
  azure_managed_identity: Optional[AzureManagedIdentity] = None
1771
1788
  """The Azure managed identity configuration."""
1772
1789
 
1773
1790
  azure_service_principal: Optional[AzureServicePrincipal] = None
1774
- """The Azure service principal configuration. Only applicable when purpose is **STORAGE**."""
1791
+ """The Azure service principal configuration."""
1775
1792
 
1776
1793
  comment: Optional[str] = None
1777
1794
  """Comment associated with the credential."""
1778
1795
 
1779
1796
  databricks_gcp_service_account: Optional[DatabricksGcpServiceAccount] = None
1780
- """GCP long-lived credential. Databricks-created Google Cloud Storage service account."""
1797
+ """The Databricks managed GCP service account configuration."""
1781
1798
 
1782
1799
  purpose: Optional[CredentialPurpose] = None
1783
1800
  """Indicates the purpose of the credential."""
@@ -2202,9 +2219,7 @@ class CreateMetastore:
2202
2219
  """The user-specified name of the metastore."""
2203
2220
 
2204
2221
  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."""
2222
+ """Cloud region which the metastore serves (e.g., `us-west-2`, `westus`)."""
2208
2223
 
2209
2224
  storage_root: Optional[str] = None
2210
2225
  """The storage root URL for metastore"""
@@ -2243,7 +2258,7 @@ class CreateMetastoreAssignment:
2243
2258
  """The unique ID of the metastore."""
2244
2259
 
2245
2260
  default_catalog_name: str
2246
- """The name of the default catalog in the metastore. This field is depracted. Please use "Default
2261
+ """The name of the default catalog in the metastore. This field is deprecated. Please use "Default
2247
2262
  Namespace API" to configure the default catalog for a Databricks workspace."""
2248
2263
 
2249
2264
  workspace_id: Optional[int] = None
@@ -2557,7 +2572,8 @@ class CreateSchema:
2557
2572
  @dataclass
2558
2573
  class CreateStorageCredential:
2559
2574
  name: str
2560
- """The credential name. The name must be unique within the metastore."""
2575
+ """The credential name. The name must be unique among storage and service credentials within the
2576
+ metastore."""
2561
2577
 
2562
2578
  aws_iam_role: Optional[AwsIamRoleRequest] = None
2563
2579
  """The AWS IAM role configuration."""
@@ -2578,7 +2594,8 @@ class CreateStorageCredential:
2578
2594
  """The Databricks managed GCP service account configuration."""
2579
2595
 
2580
2596
  read_only: Optional[bool] = None
2581
- """Whether the storage credential is only usable for read operations."""
2597
+ """Whether the credential is usable only for read operations. Only applicable when purpose is
2598
+ **STORAGE**."""
2582
2599
 
2583
2600
  skip_validation: Optional[bool] = None
2584
2601
  """Supplying true to this argument skips validation of the created credential."""
@@ -2754,13 +2771,13 @@ class CreateVolumeRequestContent:
2754
2771
  @dataclass
2755
2772
  class CredentialInfo:
2756
2773
  aws_iam_role: Optional[AwsIamRole] = None
2757
- """The AWS IAM role configuration"""
2774
+ """The AWS IAM role configuration."""
2758
2775
 
2759
2776
  azure_managed_identity: Optional[AzureManagedIdentity] = None
2760
2777
  """The Azure managed identity configuration."""
2761
2778
 
2762
2779
  azure_service_principal: Optional[AzureServicePrincipal] = None
2763
- """The Azure service principal configuration. Only applicable when purpose is **STORAGE**."""
2780
+ """The Azure service principal configuration."""
2764
2781
 
2765
2782
  comment: Optional[str] = None
2766
2783
  """Comment associated with the credential."""
@@ -2772,7 +2789,7 @@ class CredentialInfo:
2772
2789
  """Username of credential creator."""
2773
2790
 
2774
2791
  databricks_gcp_service_account: Optional[DatabricksGcpServiceAccount] = None
2775
- """GCP long-lived credential. Databricks-created Google Cloud Storage service account."""
2792
+ """The Databricks managed GCP service account configuration."""
2776
2793
 
2777
2794
  full_name: Optional[str] = None
2778
2795
  """The full name of the credential."""
@@ -2924,9 +2941,19 @@ class CredentialPurpose(Enum):
2924
2941
 
2925
2942
 
2926
2943
  class CredentialType(Enum):
2927
- """The type of credential."""
2944
+ """Next Id: 12"""
2928
2945
 
2929
2946
  BEARER_TOKEN = "BEARER_TOKEN"
2947
+ OAUTH_ACCESS_TOKEN = "OAUTH_ACCESS_TOKEN"
2948
+ OAUTH_M2M = "OAUTH_M2M"
2949
+ OAUTH_REFRESH_TOKEN = "OAUTH_REFRESH_TOKEN"
2950
+ OAUTH_RESOURCE_OWNER_PASSWORD = "OAUTH_RESOURCE_OWNER_PASSWORD"
2951
+ OAUTH_U2M = "OAUTH_U2M"
2952
+ OAUTH_U2M_MAPPING = "OAUTH_U2M_MAPPING"
2953
+ OIDC_TOKEN = "OIDC_TOKEN"
2954
+ PEM_PRIVATE_KEY = "PEM_PRIVATE_KEY"
2955
+ SERVICE_CREDENTIAL = "SERVICE_CREDENTIAL"
2956
+ UNKNOWN_CREDENTIAL_TYPE = "UNKNOWN_CREDENTIAL_TYPE"
2930
2957
  USERNAME_PASSWORD = "USERNAME_PASSWORD"
2931
2958
 
2932
2959
 
@@ -2990,191 +3017,12 @@ class DataSourceFormat(Enum):
2990
3017
  WORKDAY_RAAS_FORMAT = "WORKDAY_RAAS_FORMAT"
2991
3018
 
2992
3019
 
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
3020
  @dataclass
3171
3021
  class DatabricksGcpServiceAccount:
3172
3022
  """GCP long-lived credential. Databricks-created Google Cloud Storage service account."""
3173
3023
 
3174
3024
  credential_id: Optional[str] = None
3175
- """The Databricks internal ID that represents this managed identity. This field is only used to
3176
- persist the credential_id once it is fetched from the credentials manager - as we only use the
3177
- protobuf serializer to store credentials, this ID gets persisted to the database"""
3025
+ """The Databricks internal ID that represents this managed identity."""
3178
3026
 
3179
3027
  email: Optional[str] = None
3180
3028
  """The email of the service account."""
@@ -3216,6 +3064,8 @@ class DatabricksGcpServiceAccount:
3216
3064
 
3217
3065
  @dataclass
3218
3066
  class DatabricksGcpServiceAccountRequest:
3067
+ """GCP long-lived credential. Databricks-created Google Cloud Storage service account."""
3068
+
3219
3069
  def as_dict(self) -> dict:
3220
3070
  """Serializes the DatabricksGcpServiceAccountRequest into a dictionary suitable for use as a JSON request body."""
3221
3071
  body = {}
@@ -3234,11 +3084,13 @@ class DatabricksGcpServiceAccountRequest:
3234
3084
 
3235
3085
  @dataclass
3236
3086
  class DatabricksGcpServiceAccountResponse:
3087
+ """GCP long-lived credential. Databricks-created Google Cloud Storage service account."""
3088
+
3237
3089
  credential_id: Optional[str] = None
3238
- """The Databricks internal ID that represents this service account. This is an output-only field."""
3090
+ """The Databricks internal ID that represents this managed identity."""
3239
3091
 
3240
3092
  email: Optional[str] = None
3241
- """The email of the service account. This is an output-only field."""
3093
+ """The email of the service account."""
3242
3094
 
3243
3095
  def as_dict(self) -> dict:
3244
3096
  """Serializes the DatabricksGcpServiceAccountResponse into a dictionary suitable for use as a JSON request body."""
@@ -3300,42 +3152,6 @@ class DeleteCredentialResponse:
3300
3152
  return cls()
3301
3153
 
3302
3154
 
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
3155
  @dataclass
3340
3156
  class DeleteResponse:
3341
3157
  def as_dict(self) -> dict:
@@ -3354,24 +3170,6 @@ class DeleteResponse:
3354
3170
  return cls()
3355
3171
 
3356
3172
 
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
3173
  @dataclass
3376
3174
  class DeltaRuntimePropertiesKvPairs:
3377
3175
  """Properties pertaining to the current state of the delta table as given by the commit server.
@@ -3400,6 +3198,12 @@ class DeltaRuntimePropertiesKvPairs:
3400
3198
  return cls(delta_runtime_properties=d.get("delta_runtime_properties", None))
3401
3199
 
3402
3200
 
3201
+ class DeltaSharingScopeEnum(Enum):
3202
+
3203
+ INTERNAL = "INTERNAL"
3204
+ INTERNAL_AND_EXTERNAL = "INTERNAL_AND_EXTERNAL"
3205
+
3206
+
3403
3207
  @dataclass
3404
3208
  class Dependency:
3405
3209
  """A dependency of a SQL object. Either the __table__ field or the __function__ field must be
@@ -3484,12 +3288,18 @@ class DisableResponse:
3484
3288
 
3485
3289
  @dataclass
3486
3290
  class EffectivePermissionsList:
3291
+ next_page_token: Optional[str] = None
3292
+ """Opaque token to retrieve the next page of results. Absent if there are no more pages.
3293
+ __page_token__ should be set to this value for the next request (for the next page of results)."""
3294
+
3487
3295
  privilege_assignments: Optional[List[EffectivePrivilegeAssignment]] = None
3488
3296
  """The privileges conveyed to each principal (either directly or via inheritance)"""
3489
3297
 
3490
3298
  def as_dict(self) -> dict:
3491
3299
  """Serializes the EffectivePermissionsList into a dictionary suitable for use as a JSON request body."""
3492
3300
  body = {}
3301
+ if self.next_page_token is not None:
3302
+ body["next_page_token"] = self.next_page_token
3493
3303
  if self.privilege_assignments:
3494
3304
  body["privilege_assignments"] = [v.as_dict() for v in self.privilege_assignments]
3495
3305
  return body
@@ -3497,6 +3307,8 @@ class EffectivePermissionsList:
3497
3307
  def as_shallow_dict(self) -> dict:
3498
3308
  """Serializes the EffectivePermissionsList into a shallow dictionary of its immediate attributes."""
3499
3309
  body = {}
3310
+ if self.next_page_token is not None:
3311
+ body["next_page_token"] = self.next_page_token
3500
3312
  if self.privilege_assignments:
3501
3313
  body["privilege_assignments"] = self.privilege_assignments
3502
3314
  return body
@@ -3504,7 +3316,10 @@ class EffectivePermissionsList:
3504
3316
  @classmethod
3505
3317
  def from_dict(cls, d: Dict[str, Any]) -> EffectivePermissionsList:
3506
3318
  """Deserializes the EffectivePermissionsList from a dictionary."""
3507
- return cls(privilege_assignments=_repeated_dict(d, "privilege_assignments", EffectivePrivilegeAssignment))
3319
+ return cls(
3320
+ next_page_token=d.get("next_page_token", None),
3321
+ privilege_assignments=_repeated_dict(d, "privilege_assignments", EffectivePrivilegeAssignment),
3322
+ )
3508
3323
 
3509
3324
 
3510
3325
  @dataclass
@@ -4847,7 +4662,7 @@ class GetMetastoreSummaryResponse:
4847
4662
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None
4848
4663
  """The lifetime of delta sharing recipient token in seconds."""
4849
4664
 
4850
- delta_sharing_scope: Optional[GetMetastoreSummaryResponseDeltaSharingScope] = None
4665
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None
4851
4666
  """The scope of Delta Sharing enabled for the metastore."""
4852
4667
 
4853
4668
  external_access_enabled: Optional[bool] = None
@@ -4988,7 +4803,7 @@ class GetMetastoreSummaryResponse:
4988
4803
  delta_sharing_recipient_token_lifetime_in_seconds=d.get(
4989
4804
  "delta_sharing_recipient_token_lifetime_in_seconds", None
4990
4805
  ),
4991
- delta_sharing_scope=_enum(d, "delta_sharing_scope", GetMetastoreSummaryResponseDeltaSharingScope),
4806
+ delta_sharing_scope=_enum(d, "delta_sharing_scope", DeltaSharingScopeEnum),
4992
4807
  external_access_enabled=d.get("external_access_enabled", None),
4993
4808
  global_metastore_id=d.get("global_metastore_id", None),
4994
4809
  metastore_id=d.get("metastore_id", None),
@@ -5004,11 +4819,40 @@ class GetMetastoreSummaryResponse:
5004
4819
  )
5005
4820
 
5006
4821
 
5007
- class GetMetastoreSummaryResponseDeltaSharingScope(Enum):
5008
- """The scope of Delta Sharing enabled for the metastore."""
4822
+ @dataclass
4823
+ class GetPermissionsResponse:
4824
+ next_page_token: Optional[str] = None
4825
+ """Opaque token to retrieve the next page of results. Absent if there are no more pages.
4826
+ __page_token__ should be set to this value for the next request (for the next page of results)."""
5009
4827
 
5010
- INTERNAL = "INTERNAL"
5011
- INTERNAL_AND_EXTERNAL = "INTERNAL_AND_EXTERNAL"
4828
+ privilege_assignments: Optional[List[PrivilegeAssignment]] = None
4829
+ """The privileges assigned to each principal"""
4830
+
4831
+ def as_dict(self) -> dict:
4832
+ """Serializes the GetPermissionsResponse into a dictionary suitable for use as a JSON request body."""
4833
+ body = {}
4834
+ if self.next_page_token is not None:
4835
+ body["next_page_token"] = self.next_page_token
4836
+ if self.privilege_assignments:
4837
+ body["privilege_assignments"] = [v.as_dict() for v in self.privilege_assignments]
4838
+ return body
4839
+
4840
+ def as_shallow_dict(self) -> dict:
4841
+ """Serializes the GetPermissionsResponse into a shallow dictionary of its immediate attributes."""
4842
+ body = {}
4843
+ if self.next_page_token is not None:
4844
+ body["next_page_token"] = self.next_page_token
4845
+ if self.privilege_assignments:
4846
+ body["privilege_assignments"] = self.privilege_assignments
4847
+ return body
4848
+
4849
+ @classmethod
4850
+ def from_dict(cls, d: Dict[str, Any]) -> GetPermissionsResponse:
4851
+ """Deserializes the GetPermissionsResponse from a dictionary."""
4852
+ return cls(
4853
+ next_page_token=d.get("next_page_token", None),
4854
+ privilege_assignments=_repeated_dict(d, "privilege_assignments", PrivilegeAssignment),
4855
+ )
5012
4856
 
5013
4857
 
5014
4858
  @dataclass
@@ -5230,41 +5074,6 @@ class ListCredentialsResponse:
5230
5074
  )
5231
5075
 
5232
5076
 
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
5077
  @dataclass
5269
5078
  class ListExternalLocationsResponse:
5270
5079
  external_locations: Optional[List[ExternalLocationInfo]] = None
@@ -5341,11 +5150,17 @@ class ListMetastoresResponse:
5341
5150
  metastores: Optional[List[MetastoreInfo]] = None
5342
5151
  """An array of metastore information objects."""
5343
5152
 
5153
+ next_page_token: Optional[str] = None
5154
+ """Opaque token to retrieve the next page of results. Absent if there are no more pages.
5155
+ __page_token__ should be set to this value for the next request (for the next page of results)."""
5156
+
5344
5157
  def as_dict(self) -> dict:
5345
5158
  """Serializes the ListMetastoresResponse into a dictionary suitable for use as a JSON request body."""
5346
5159
  body = {}
5347
5160
  if self.metastores:
5348
5161
  body["metastores"] = [v.as_dict() for v in self.metastores]
5162
+ if self.next_page_token is not None:
5163
+ body["next_page_token"] = self.next_page_token
5349
5164
  return body
5350
5165
 
5351
5166
  def as_shallow_dict(self) -> dict:
@@ -5353,12 +5168,16 @@ class ListMetastoresResponse:
5353
5168
  body = {}
5354
5169
  if self.metastores:
5355
5170
  body["metastores"] = self.metastores
5171
+ if self.next_page_token is not None:
5172
+ body["next_page_token"] = self.next_page_token
5356
5173
  return body
5357
5174
 
5358
5175
  @classmethod
5359
5176
  def from_dict(cls, d: Dict[str, Any]) -> ListMetastoresResponse:
5360
5177
  """Deserializes the ListMetastoresResponse from a dictionary."""
5361
- return cls(metastores=_repeated_dict(d, "metastores", MetastoreInfo))
5178
+ return cls(
5179
+ metastores=_repeated_dict(d, "metastores", MetastoreInfo), next_page_token=d.get("next_page_token", None)
5180
+ )
5362
5181
 
5363
5182
 
5364
5183
  @dataclass
@@ -5674,12 +5493,12 @@ class MatchType(Enum):
5674
5493
 
5675
5494
  @dataclass
5676
5495
  class MetastoreAssignment:
5677
- metastore_id: str
5678
- """The unique ID of the metastore."""
5679
-
5680
5496
  workspace_id: int
5681
5497
  """The unique ID of the Databricks workspace."""
5682
5498
 
5499
+ metastore_id: str
5500
+ """The unique ID of the metastore."""
5501
+
5683
5502
  default_catalog_name: Optional[str] = None
5684
5503
  """The name of the default catalog in the metastore."""
5685
5504
 
@@ -5736,7 +5555,7 @@ class MetastoreInfo:
5736
5555
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None
5737
5556
  """The lifetime of delta sharing recipient token in seconds."""
5738
5557
 
5739
- delta_sharing_scope: Optional[MetastoreInfoDeltaSharingScope] = None
5558
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None
5740
5559
  """The scope of Delta Sharing enabled for the metastore."""
5741
5560
 
5742
5561
  external_access_enabled: Optional[bool] = None
@@ -5877,7 +5696,7 @@ class MetastoreInfo:
5877
5696
  delta_sharing_recipient_token_lifetime_in_seconds=d.get(
5878
5697
  "delta_sharing_recipient_token_lifetime_in_seconds", None
5879
5698
  ),
5880
- delta_sharing_scope=_enum(d, "delta_sharing_scope", MetastoreInfoDeltaSharingScope),
5699
+ delta_sharing_scope=_enum(d, "delta_sharing_scope", DeltaSharingScopeEnum),
5881
5700
  external_access_enabled=d.get("external_access_enabled", None),
5882
5701
  global_metastore_id=d.get("global_metastore_id", None),
5883
5702
  metastore_id=d.get("metastore_id", None),
@@ -5893,13 +5712,6 @@ class MetastoreInfo:
5893
5712
  )
5894
5713
 
5895
5714
 
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
5715
  @dataclass
5904
5716
  class ModelVersionInfo:
5905
5717
  aliases: Optional[List[RegisteredModelAlias]] = None
@@ -6770,48 +6582,11 @@ class NamedTableConstraint:
6770
6582
 
6771
6583
 
6772
6584
  @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"""
6585
+ class OnlineTable:
6586
+ """Online Table information."""
6776
6587
 
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
- @dataclass
6810
- class OnlineTable:
6811
- """Online Table information."""
6812
-
6813
- name: Optional[str] = None
6814
- """Full three-part (catalog, schema, table) name of the table."""
6588
+ name: Optional[str] = None
6589
+ """Full three-part (catalog, schema, table) name of the table."""
6815
6590
 
6816
6591
  spec: Optional[OnlineTableSpec] = None
6817
6592
  """Specification of the online table."""
@@ -7120,31 +6895,6 @@ class PermissionsChange:
7120
6895
  )
7121
6896
 
7122
6897
 
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
6898
  @dataclass
7149
6899
  class PipelineProgress:
7150
6900
  """Progress information of the Online Table data synchronization pipeline."""
@@ -7335,9 +7085,6 @@ class PrivilegeAssignment:
7335
7085
  return cls(principal=d.get("principal", None), privileges=_repeated_enum(d, "privileges", Privilege))
7336
7086
 
7337
7087
 
7338
- PropertiesKvPairs = Dict[str, str]
7339
-
7340
-
7341
7088
  @dataclass
7342
7089
  class ProvisioningInfo:
7343
7090
  """Status of an asynchronously provisioned resource."""
@@ -7750,6 +7497,8 @@ class RegisteredModelInfo:
7750
7497
 
7751
7498
  @dataclass
7752
7499
  class SchemaInfo:
7500
+ """Next ID: 40"""
7501
+
7753
7502
  browse_only: Optional[bool] = None
7754
7503
  """Indicates whether the principal is limited to retrieving metadata for the associated object
7755
7504
  through the BROWSE privilege when include_browse is enabled in the request."""
@@ -7757,7 +7506,7 @@ class SchemaInfo:
7757
7506
  catalog_name: Optional[str] = None
7758
7507
  """Name of parent catalog."""
7759
7508
 
7760
- catalog_type: Optional[str] = None
7509
+ catalog_type: Optional[CatalogType] = None
7761
7510
  """The type of the parent catalog."""
7762
7511
 
7763
7512
  comment: Optional[str] = None
@@ -7772,6 +7521,7 @@ class SchemaInfo:
7772
7521
  effective_predictive_optimization_flag: Optional[EffectivePredictiveOptimizationFlag] = None
7773
7522
 
7774
7523
  enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None
7524
+ """Whether predictive optimization should be enabled for this object and objects under it."""
7775
7525
 
7776
7526
  full_name: Optional[str] = None
7777
7527
  """Full name of schema, in form of __catalog_name__.__schema_name__."""
@@ -7811,7 +7561,7 @@ class SchemaInfo:
7811
7561
  if self.catalog_name is not None:
7812
7562
  body["catalog_name"] = self.catalog_name
7813
7563
  if self.catalog_type is not None:
7814
- body["catalog_type"] = self.catalog_type
7564
+ body["catalog_type"] = self.catalog_type.value
7815
7565
  if self.comment is not None:
7816
7566
  body["comment"] = self.comment
7817
7567
  if self.created_at is not None:
@@ -7891,7 +7641,7 @@ class SchemaInfo:
7891
7641
  return cls(
7892
7642
  browse_only=d.get("browse_only", None),
7893
7643
  catalog_name=d.get("catalog_name", None),
7894
- catalog_type=d.get("catalog_type", None),
7644
+ catalog_type=_enum(d, "catalog_type", CatalogType),
7895
7645
  comment=d.get("comment", None),
7896
7646
  created_at=d.get("created_at", None),
7897
7647
  created_by=d.get("created_by", None),
@@ -7912,12 +7662,6 @@ class SchemaInfo:
7912
7662
  )
7913
7663
 
7914
7664
 
7915
- SecurableOptionsMap = Dict[str, str]
7916
-
7917
-
7918
- SecurablePropertiesMap = Dict[str, str]
7919
-
7920
-
7921
7665
  class SecurableType(Enum):
7922
7666
  """The type of Unity Catalog securable."""
7923
7667
 
@@ -8103,7 +7847,7 @@ class StorageCredentialInfo:
8103
7847
  """Comment associated with the credential."""
8104
7848
 
8105
7849
  created_at: Optional[int] = None
8106
- """Time at which this Credential was created, in epoch milliseconds."""
7850
+ """Time at which this credential was created, in epoch milliseconds."""
8107
7851
 
8108
7852
  created_by: Optional[str] = None
8109
7853
  """Username of credential creator."""
@@ -8118,18 +7862,21 @@ class StorageCredentialInfo:
8118
7862
  """The unique identifier of the credential."""
8119
7863
 
8120
7864
  isolation_mode: Optional[IsolationMode] = None
7865
+ """Whether the current securable is accessible from all workspaces or a specific set of workspaces."""
8121
7866
 
8122
7867
  metastore_id: Optional[str] = None
8123
- """Unique identifier of parent metastore."""
7868
+ """Unique identifier of the parent metastore."""
8124
7869
 
8125
7870
  name: Optional[str] = None
8126
- """The credential name. The name must be unique within the metastore."""
7871
+ """The credential name. The name must be unique among storage and service credentials within the
7872
+ metastore."""
8127
7873
 
8128
7874
  owner: Optional[str] = None
8129
7875
  """Username of current owner of credential."""
8130
7876
 
8131
7877
  read_only: Optional[bool] = None
8132
- """Whether the storage credential is only usable for read operations."""
7878
+ """Whether the credential is usable only for read operations. Only applicable when purpose is
7879
+ **STORAGE**."""
8133
7880
 
8134
7881
  updated_at: Optional[int] = None
8135
7882
  """Time at which this credential was last modified, in epoch milliseconds."""
@@ -8138,7 +7885,8 @@ class StorageCredentialInfo:
8138
7885
  """Username of user who last modified the credential."""
8139
7886
 
8140
7887
  used_for_managed_storage: Optional[bool] = None
8141
- """Whether this credential is the current metastore's root storage credential."""
7888
+ """Whether this credential is the current metastore's root storage credential. Only applicable when
7889
+ purpose is **STORAGE**."""
8142
7890
 
8143
7891
  def as_dict(self) -> dict:
8144
7892
  """Serializes the StorageCredentialInfo into a dictionary suitable for use as a JSON request body."""
@@ -8249,184 +7997,6 @@ class StorageCredentialInfo:
8249
7997
  )
8250
7998
 
8251
7999
 
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
8000
  @dataclass
8431
8001
  class SystemSchemaInfo:
8432
8002
  schema: str
@@ -9255,19 +8825,19 @@ class UpdateConnection:
9255
8825
  @dataclass
9256
8826
  class UpdateCredentialRequest:
9257
8827
  aws_iam_role: Optional[AwsIamRole] = None
9258
- """The AWS IAM role configuration"""
8828
+ """The AWS IAM role configuration."""
9259
8829
 
9260
8830
  azure_managed_identity: Optional[AzureManagedIdentity] = None
9261
8831
  """The Azure managed identity configuration."""
9262
8832
 
9263
8833
  azure_service_principal: Optional[AzureServicePrincipal] = None
9264
- """The Azure service principal configuration. Only applicable when purpose is **STORAGE**."""
8834
+ """The Azure service principal configuration."""
9265
8835
 
9266
8836
  comment: Optional[str] = None
9267
8837
  """Comment associated with the credential."""
9268
8838
 
9269
8839
  databricks_gcp_service_account: Optional[DatabricksGcpServiceAccount] = None
9270
- """GCP long-lived credential. Databricks-created Google Cloud Storage service account."""
8840
+ """The Databricks managed GCP service account configuration."""
9271
8841
 
9272
8842
  force: Optional[bool] = None
9273
8843
  """Force an update even if there are dependent services (when purpose is **SERVICE**) or dependent
@@ -9543,7 +9113,7 @@ class UpdateMetastore:
9543
9113
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None
9544
9114
  """The lifetime of delta sharing recipient token in seconds."""
9545
9115
 
9546
- delta_sharing_scope: Optional[UpdateMetastoreDeltaSharingScope] = None
9116
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None
9547
9117
  """The scope of Delta Sharing enabled for the metastore."""
9548
9118
 
9549
9119
  id: Optional[str] = None
@@ -9615,7 +9185,7 @@ class UpdateMetastore:
9615
9185
  delta_sharing_recipient_token_lifetime_in_seconds=d.get(
9616
9186
  "delta_sharing_recipient_token_lifetime_in_seconds", None
9617
9187
  ),
9618
- delta_sharing_scope=_enum(d, "delta_sharing_scope", UpdateMetastoreDeltaSharingScope),
9188
+ delta_sharing_scope=_enum(d, "delta_sharing_scope", DeltaSharingScopeEnum),
9619
9189
  id=d.get("id", None),
9620
9190
  new_name=d.get("new_name", None),
9621
9191
  owner=d.get("owner", None),
@@ -9627,7 +9197,7 @@ class UpdateMetastore:
9627
9197
  @dataclass
9628
9198
  class UpdateMetastoreAssignment:
9629
9199
  default_catalog_name: Optional[str] = None
9630
- """The name of the default catalog in the metastore. This field is depracted. Please use "Default
9200
+ """The name of the default catalog in the metastore. This field is deprecated. Please use "Default
9631
9201
  Namespace API" to configure the default catalog for a Databricks workspace."""
9632
9202
 
9633
9203
  metastore_id: Optional[str] = None
@@ -9668,13 +9238,6 @@ class UpdateMetastoreAssignment:
9668
9238
  )
9669
9239
 
9670
9240
 
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
9241
  @dataclass
9679
9242
  class UpdateModelVersionRequest:
9680
9243
  comment: Optional[str] = None
@@ -9843,7 +9406,7 @@ class UpdatePermissions:
9843
9406
  full_name: Optional[str] = None
9844
9407
  """Full name of securable."""
9845
9408
 
9846
- securable_type: Optional[SecurableType] = None
9409
+ securable_type: Optional[str] = None
9847
9410
  """Type of securable."""
9848
9411
 
9849
9412
  def as_dict(self) -> dict:
@@ -9854,7 +9417,7 @@ class UpdatePermissions:
9854
9417
  if self.full_name is not None:
9855
9418
  body["full_name"] = self.full_name
9856
9419
  if self.securable_type is not None:
9857
- body["securable_type"] = self.securable_type.value
9420
+ body["securable_type"] = self.securable_type
9858
9421
  return body
9859
9422
 
9860
9423
  def as_shallow_dict(self) -> dict:
@@ -9874,10 +9437,35 @@ class UpdatePermissions:
9874
9437
  return cls(
9875
9438
  changes=_repeated_dict(d, "changes", PermissionsChange),
9876
9439
  full_name=d.get("full_name", None),
9877
- securable_type=_enum(d, "securable_type", SecurableType),
9440
+ securable_type=d.get("securable_type", None),
9878
9441
  )
9879
9442
 
9880
9443
 
9444
+ @dataclass
9445
+ class UpdatePermissionsResponse:
9446
+ privilege_assignments: Optional[List[PrivilegeAssignment]] = None
9447
+ """The privileges assigned to each principal"""
9448
+
9449
+ def as_dict(self) -> dict:
9450
+ """Serializes the UpdatePermissionsResponse into a dictionary suitable for use as a JSON request body."""
9451
+ body = {}
9452
+ if self.privilege_assignments:
9453
+ body["privilege_assignments"] = [v.as_dict() for v in self.privilege_assignments]
9454
+ return body
9455
+
9456
+ def as_shallow_dict(self) -> dict:
9457
+ """Serializes the UpdatePermissionsResponse into a shallow dictionary of its immediate attributes."""
9458
+ body = {}
9459
+ if self.privilege_assignments:
9460
+ body["privilege_assignments"] = self.privilege_assignments
9461
+ return body
9462
+
9463
+ @classmethod
9464
+ def from_dict(cls, d: Dict[str, Any]) -> UpdatePermissionsResponse:
9465
+ """Deserializes the UpdatePermissionsResponse from a dictionary."""
9466
+ return cls(privilege_assignments=_repeated_dict(d, "privilege_assignments", PrivilegeAssignment))
9467
+
9468
+
9881
9469
  @dataclass
9882
9470
  class UpdateRegisteredModelRequest:
9883
9471
  comment: Optional[str] = None
@@ -9953,6 +9541,7 @@ class UpdateSchema:
9953
9541
  """User-provided free-form text description."""
9954
9542
 
9955
9543
  enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None
9544
+ """Whether predictive optimization should be enabled for this object and objects under it."""
9956
9545
 
9957
9546
  full_name: Optional[str] = None
9958
9547
  """Full name of the schema."""
@@ -10037,6 +9626,7 @@ class UpdateStorageCredential:
10037
9626
  """Force update even if there are dependent external locations or external tables."""
10038
9627
 
10039
9628
  isolation_mode: Optional[IsolationMode] = None
9629
+ """Whether the current securable is accessible from all workspaces or a specific set of workspaces."""
10040
9630
 
10041
9631
  name: Optional[str] = None
10042
9632
  """Name of the storage credential."""
@@ -10048,7 +9638,8 @@ class UpdateStorageCredential:
10048
9638
  """Username of current owner of credential."""
10049
9639
 
10050
9640
  read_only: Optional[bool] = None
10051
- """Whether the storage credential is only usable for read operations."""
9641
+ """Whether the credential is usable only for read operations. Only applicable when purpose is
9642
+ **STORAGE**."""
10052
9643
 
10053
9644
  skip_validation: Optional[bool] = None
10054
9645
  """Supplying true to this argument skips validation of the updated credential."""
@@ -10137,6 +9728,39 @@ class UpdateStorageCredential:
10137
9728
  )
10138
9729
 
10139
9730
 
9731
+ @dataclass
9732
+ class UpdateTableRequest:
9733
+ """Update a table owner."""
9734
+
9735
+ full_name: Optional[str] = None
9736
+ """Full name of the table."""
9737
+
9738
+ owner: Optional[str] = None
9739
+
9740
+ def as_dict(self) -> dict:
9741
+ """Serializes the UpdateTableRequest into a dictionary suitable for use as a JSON request body."""
9742
+ body = {}
9743
+ if self.full_name is not None:
9744
+ body["full_name"] = self.full_name
9745
+ if self.owner is not None:
9746
+ body["owner"] = self.owner
9747
+ return body
9748
+
9749
+ def as_shallow_dict(self) -> dict:
9750
+ """Serializes the UpdateTableRequest into a shallow dictionary of its immediate attributes."""
9751
+ body = {}
9752
+ if self.full_name is not None:
9753
+ body["full_name"] = self.full_name
9754
+ if self.owner is not None:
9755
+ body["owner"] = self.owner
9756
+ return body
9757
+
9758
+ @classmethod
9759
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateTableRequest:
9760
+ """Deserializes the UpdateTableRequest from a dictionary."""
9761
+ return cls(full_name=d.get("full_name", None), owner=d.get("owner", None))
9762
+
9763
+
10140
9764
  @dataclass
10141
9765
  class UpdateVolumeRequestContent:
10142
9766
  comment: Optional[str] = None
@@ -10462,7 +10086,7 @@ class ValidateStorageCredential:
10462
10086
  """Whether the storage credential is only usable for read operations."""
10463
10087
 
10464
10088
  storage_credential_name: Optional[str] = None
10465
- """The name of the storage credential to validate."""
10089
+ """Required. The name of an existing credential or long-lived cloud credential to validate."""
10466
10090
 
10467
10091
  url: Optional[str] = None
10468
10092
  """The external location url to validate."""
@@ -10607,7 +10231,8 @@ class ValidationResult:
10607
10231
 
10608
10232
 
10609
10233
  class ValidationResultOperation(Enum):
10610
- """The operation tested."""
10234
+ """A enum represents the file operation performed on the external location with the storage
10235
+ credential"""
10611
10236
 
10612
10237
  DELETE = "DELETE"
10613
10238
  LIST = "LIST"
@@ -10617,7 +10242,7 @@ class ValidationResultOperation(Enum):
10617
10242
 
10618
10243
 
10619
10244
  class ValidationResultResult(Enum):
10620
- """The results of the tested operation."""
10245
+ """A enum represents the result of the file operation"""
10621
10246
 
10622
10247
  FAIL = "FAIL"
10623
10248
  PASS = "PASS"
@@ -10844,9 +10469,7 @@ class AccountMetastoreAssignmentsAPI:
10844
10469
  def create(
10845
10470
  self, workspace_id: int, metastore_id: str, *, metastore_assignment: Optional[CreateMetastoreAssignment] = None
10846
10471
  ):
10847
- """Assigns a workspace to a metastore.
10848
-
10849
- Creates an assignment to a metastore for a workspace
10472
+ """Creates an assignment to a metastore for a workspace
10850
10473
 
10851
10474
  :param workspace_id: int
10852
10475
  Workspace ID.
@@ -10872,9 +10495,7 @@ class AccountMetastoreAssignmentsAPI:
10872
10495
  )
10873
10496
 
10874
10497
  def delete(self, workspace_id: int, metastore_id: str):
10875
- """Delete a metastore assignment.
10876
-
10877
- Deletes a metastore assignment to a workspace, leaving the workspace with no metastore.
10498
+ """Deletes a metastore assignment to a workspace, leaving the workspace with no metastore.
10878
10499
 
10879
10500
  :param workspace_id: int
10880
10501
  Workspace ID.
@@ -10895,9 +10516,7 @@ class AccountMetastoreAssignmentsAPI:
10895
10516
  )
10896
10517
 
10897
10518
  def get(self, workspace_id: int) -> AccountsMetastoreAssignment:
10898
- """Gets the metastore assignment for a workspace.
10899
-
10900
- Gets the metastore assignment, if any, for the workspace specified by ID. If the workspace is assigned
10519
+ """Gets the metastore assignment, if any, for the workspace specified by ID. If the workspace is assigned
10901
10520
  a metastore, the mappig will be returned. If no metastore is assigned to the workspace, the assignment
10902
10521
  will not be found and a 404 returned.
10903
10522
 
@@ -10917,9 +10536,7 @@ class AccountMetastoreAssignmentsAPI:
10917
10536
  return AccountsMetastoreAssignment.from_dict(res)
10918
10537
 
10919
10538
  def list(self, metastore_id: str) -> Iterator[int]:
10920
- """Get all workspaces assigned to a metastore.
10921
-
10922
- Gets a list of all Databricks workspace IDs that have been assigned to given metastore.
10539
+ """Gets a list of all Databricks workspace IDs that have been assigned to given metastore.
10923
10540
 
10924
10541
  :param metastore_id: str
10925
10542
  Unity Catalog metastore ID
@@ -10940,9 +10557,7 @@ class AccountMetastoreAssignmentsAPI:
10940
10557
  def update(
10941
10558
  self, workspace_id: int, metastore_id: str, *, metastore_assignment: Optional[UpdateMetastoreAssignment] = None
10942
10559
  ):
10943
- """Updates a metastore assignment to a workspaces.
10944
-
10945
- Updates an assignment to a metastore for a workspace. Currently, only the default catalog may be
10560
+ """Updates an assignment to a metastore for a workspace. Currently, only the default catalog may be
10946
10561
  updated.
10947
10562
 
10948
10563
  :param workspace_id: int
@@ -10977,9 +10592,7 @@ class AccountMetastoresAPI:
10977
10592
  self._api = api_client
10978
10593
 
10979
10594
  def create(self, *, metastore_info: Optional[CreateMetastore] = None) -> AccountsMetastoreInfo:
10980
- """Create metastore.
10981
-
10982
- Creates a Unity Catalog metastore.
10595
+ """Creates a Unity Catalog metastore.
10983
10596
 
10984
10597
  :param metastore_info: :class:`CreateMetastore` (optional)
10985
10598
 
@@ -10997,9 +10610,7 @@ class AccountMetastoresAPI:
10997
10610
  return AccountsMetastoreInfo.from_dict(res)
10998
10611
 
10999
10612
  def delete(self, metastore_id: str, *, force: Optional[bool] = None):
11000
- """Delete a metastore.
11001
-
11002
- Deletes a Unity Catalog metastore for an account, both specified by ID.
10613
+ """Deletes a Unity Catalog metastore for an account, both specified by ID.
11003
10614
 
11004
10615
  :param metastore_id: str
11005
10616
  Unity Catalog metastore ID
@@ -11024,9 +10635,7 @@ class AccountMetastoresAPI:
11024
10635
  )
11025
10636
 
11026
10637
  def get(self, metastore_id: str) -> AccountsMetastoreInfo:
11027
- """Get a metastore.
11028
-
11029
- Gets a Unity Catalog metastore from an account, both specified by ID.
10638
+ """Gets a Unity Catalog metastore from an account, both specified by ID.
11030
10639
 
11031
10640
  :param metastore_id: str
11032
10641
  Unity Catalog metastore ID
@@ -11044,9 +10653,7 @@ class AccountMetastoresAPI:
11044
10653
  return AccountsMetastoreInfo.from_dict(res)
11045
10654
 
11046
10655
  def list(self) -> Iterator[MetastoreInfo]:
11047
- """Get all metastores associated with an account.
11048
-
11049
- Gets all Unity Catalog metastores associated with an account specified by ID.
10656
+ """Gets all Unity Catalog metastores associated with an account specified by ID.
11050
10657
 
11051
10658
  :returns: Iterator over :class:`MetastoreInfo`
11052
10659
  """
@@ -11060,9 +10667,7 @@ class AccountMetastoresAPI:
11060
10667
  return parsed if parsed is not None else []
11061
10668
 
11062
10669
  def update(self, metastore_id: str, *, metastore_info: Optional[UpdateMetastore] = None) -> AccountsMetastoreInfo:
11063
- """Update a metastore.
11064
-
11065
- Updates an existing Unity Catalog metastore.
10670
+ """Updates an existing Unity Catalog metastore.
11066
10671
 
11067
10672
  :param metastore_id: str
11068
10673
  Unity Catalog metastore ID
@@ -11093,9 +10698,7 @@ class AccountStorageCredentialsAPI:
11093
10698
  def create(
11094
10699
  self, metastore_id: str, *, credential_info: Optional[CreateStorageCredential] = None
11095
10700
  ) -> AccountsStorageCredentialInfo:
11096
- """Create a storage credential.
11097
-
11098
- Creates a new storage credential. The request object is specific to the cloud:
10701
+ """Creates a new storage credential. The request object is specific to the cloud:
11099
10702
 
11100
10703
  * **AwsIamRole** for AWS credentials * **AzureServicePrincipal** for Azure credentials *
11101
10704
  **GcpServiceAcountKey** for GCP credentials.
@@ -11126,9 +10729,7 @@ class AccountStorageCredentialsAPI:
11126
10729
  return AccountsStorageCredentialInfo.from_dict(res)
11127
10730
 
11128
10731
  def delete(self, metastore_id: str, storage_credential_name: str, *, force: Optional[bool] = None):
11129
- """Delete a storage credential.
11130
-
11131
- Deletes a storage credential from the metastore. The caller must be an owner of the storage
10732
+ """Deletes a storage credential from the metastore. The caller must be an owner of the storage
11132
10733
  credential.
11133
10734
 
11134
10735
  :param metastore_id: str
@@ -11156,9 +10757,7 @@ class AccountStorageCredentialsAPI:
11156
10757
  )
11157
10758
 
11158
10759
  def get(self, metastore_id: str, storage_credential_name: str) -> AccountsStorageCredentialInfo:
11159
- """Gets the named storage credential.
11160
-
11161
- Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the
10760
+ """Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the
11162
10761
  storage credential, or have a level of privilege on the storage credential.
11163
10762
 
11164
10763
  :param metastore_id: str
@@ -11181,9 +10780,7 @@ class AccountStorageCredentialsAPI:
11181
10780
  return AccountsStorageCredentialInfo.from_dict(res)
11182
10781
 
11183
10782
  def list(self, metastore_id: str) -> Iterator[StorageCredentialInfo]:
11184
- """Get all storage credentials assigned to a metastore.
11185
-
11186
- Gets a list of all storage credentials that have been assigned to given metastore.
10783
+ """Gets a list of all storage credentials that have been assigned to given metastore.
11187
10784
 
11188
10785
  :param metastore_id: str
11189
10786
  Unity Catalog metastore ID
@@ -11210,9 +10807,7 @@ class AccountStorageCredentialsAPI:
11210
10807
  *,
11211
10808
  credential_info: Optional[UpdateStorageCredential] = None,
11212
10809
  ) -> AccountsStorageCredentialInfo:
11213
- """Updates a storage credential.
11214
-
11215
- Updates a storage credential on the metastore. The caller must be the owner of the storage credential.
10810
+ """Updates a storage credential on the metastore. The caller must be the owner of the storage credential.
11216
10811
  If the caller is a metastore admin, only the __owner__ credential can be changed.
11217
10812
 
11218
10813
  :param metastore_id: str
@@ -11248,9 +10843,7 @@ class ArtifactAllowlistsAPI:
11248
10843
  self._api = api_client
11249
10844
 
11250
10845
  def get(self, artifact_type: ArtifactType) -> ArtifactAllowlistInfo:
11251
- """Get an artifact allowlist.
11252
-
11253
- Get the artifact allowlist of a certain artifact type. The caller must be a metastore admin or have
10846
+ """Get the artifact allowlist of a certain artifact type. The caller must be a metastore admin or have
11254
10847
  the **MANAGE ALLOWLIST** privilege on the metastore.
11255
10848
 
11256
10849
  :param artifact_type: :class:`ArtifactType`
@@ -11275,9 +10868,7 @@ class ArtifactAllowlistsAPI:
11275
10868
  created_by: Optional[str] = None,
11276
10869
  metastore_id: Optional[str] = None,
11277
10870
  ) -> ArtifactAllowlistInfo:
11278
- """Set an artifact allowlist.
11279
-
11280
- Set the artifact allowlist of a certain artifact type. The whole artifact allowlist is replaced with
10871
+ """Set the artifact allowlist of a certain artifact type. The whole artifact allowlist is replaced with
11281
10872
  the new allowlist. The caller must be a metastore admin or have the **MANAGE ALLOWLIST** privilege on
11282
10873
  the metastore.
11283
10874
 
@@ -11337,9 +10928,7 @@ class CatalogsAPI:
11337
10928
  share_name: Optional[str] = None,
11338
10929
  storage_root: Optional[str] = None,
11339
10930
  ) -> CatalogInfo:
11340
- """Create a catalog.
11341
-
11342
- Creates a new catalog instance in the parent metastore if the caller is a metastore admin or has the
10931
+ """Creates a new catalog instance in the parent metastore if the caller is a metastore admin or has the
11343
10932
  **CREATE_CATALOG** privilege.
11344
10933
 
11345
10934
  :param name: str
@@ -11389,9 +10978,7 @@ class CatalogsAPI:
11389
10978
  return CatalogInfo.from_dict(res)
11390
10979
 
11391
10980
  def delete(self, name: str, *, force: Optional[bool] = None):
11392
- """Delete a catalog.
11393
-
11394
- Deletes the catalog that matches the supplied name. The caller must be a metastore admin or the owner
10981
+ """Deletes the catalog that matches the supplied name. The caller must be a metastore admin or the owner
11395
10982
  of the catalog.
11396
10983
 
11397
10984
  :param name: str
@@ -11412,9 +10999,7 @@ class CatalogsAPI:
11412
10999
  self._api.do("DELETE", f"/api/2.1/unity-catalog/catalogs/{name}", query=query, headers=headers)
11413
11000
 
11414
11001
  def get(self, name: str, *, include_browse: Optional[bool] = None) -> CatalogInfo:
11415
- """Get a catalog.
11416
-
11417
- Gets the specified catalog in a metastore. The caller must be a metastore admin, the owner of the
11002
+ """Gets the specified catalog in a metastore. The caller must be a metastore admin, the owner of the
11418
11003
  catalog, or a user that has the **USE_CATALOG** privilege set for their account.
11419
11004
 
11420
11005
  :param name: str
@@ -11443,9 +11028,7 @@ class CatalogsAPI:
11443
11028
  max_results: Optional[int] = None,
11444
11029
  page_token: Optional[str] = None,
11445
11030
  ) -> Iterator[CatalogInfo]:
11446
- """List catalogs.
11447
-
11448
- Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be
11031
+ """Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be
11449
11032
  retrieved. Otherwise, only catalogs owned by the caller (or for which the caller has the
11450
11033
  **USE_CATALOG** privilege) will be retrieved. There is no guarantee of a specific ordering of the
11451
11034
  elements in the array.
@@ -11499,9 +11082,7 @@ class CatalogsAPI:
11499
11082
  owner: Optional[str] = None,
11500
11083
  properties: Optional[Dict[str, str]] = None,
11501
11084
  ) -> CatalogInfo:
11502
- """Update a catalog.
11503
-
11504
- Updates the catalog that matches the supplied name. The caller must be either the owner of the
11085
+ """Updates the catalog that matches the supplied name. The caller must be either the owner of the
11505
11086
  catalog, or a metastore admin (when changing the owner field of the catalog).
11506
11087
 
11507
11088
  :param name: str
@@ -11570,9 +11151,7 @@ class ConnectionsAPI:
11570
11151
  properties: Optional[Dict[str, str]] = None,
11571
11152
  read_only: Optional[bool] = None,
11572
11153
  ) -> ConnectionInfo:
11573
- """Create a connection.
11574
-
11575
- Creates a new connection
11154
+ """Creates a new connection
11576
11155
 
11577
11156
  Creates a new connection to an external data source. It allows users to specify connection details and
11578
11157
  configurations for interaction with the external server.
@@ -11586,7 +11165,7 @@ class ConnectionsAPI:
11586
11165
  :param comment: str (optional)
11587
11166
  User-provided free-form text description.
11588
11167
  :param properties: Dict[str,str] (optional)
11589
- An object containing map of key-value properties attached to the connection.
11168
+ A map of key-value properties attached to the securable.
11590
11169
  :param read_only: bool (optional)
11591
11170
  If the connection is read only.
11592
11171
 
@@ -11614,9 +11193,7 @@ class ConnectionsAPI:
11614
11193
  return ConnectionInfo.from_dict(res)
11615
11194
 
11616
11195
  def delete(self, name: str):
11617
- """Delete a connection.
11618
-
11619
- Deletes the connection that matches the supplied name.
11196
+ """Deletes the connection that matches the supplied name.
11620
11197
 
11621
11198
  :param name: str
11622
11199
  The name of the connection to be deleted.
@@ -11631,9 +11208,7 @@ class ConnectionsAPI:
11631
11208
  self._api.do("DELETE", f"/api/2.1/unity-catalog/connections/{name}", headers=headers)
11632
11209
 
11633
11210
  def get(self, name: str) -> ConnectionInfo:
11634
- """Get a connection.
11635
-
11636
- Gets a connection from it's name.
11211
+ """Gets a connection from it's name.
11637
11212
 
11638
11213
  :param name: str
11639
11214
  Name of the connection.
@@ -11649,9 +11224,7 @@ class ConnectionsAPI:
11649
11224
  return ConnectionInfo.from_dict(res)
11650
11225
 
11651
11226
  def list(self, *, max_results: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[ConnectionInfo]:
11652
- """List connections.
11653
-
11654
- List all connections.
11227
+ """List all connections.
11655
11228
 
11656
11229
  :param max_results: int (optional)
11657
11230
  Maximum number of connections to return. - If not set, all connections are returned (not
@@ -11673,8 +11246,6 @@ class ConnectionsAPI:
11673
11246
  "Accept": "application/json",
11674
11247
  }
11675
11248
 
11676
- if "max_results" not in query:
11677
- query["max_results"] = 0
11678
11249
  while True:
11679
11250
  json = self._api.do("GET", "/api/2.1/unity-catalog/connections", query=query, headers=headers)
11680
11251
  if "connections" in json:
@@ -11687,9 +11258,7 @@ class ConnectionsAPI:
11687
11258
  def update(
11688
11259
  self, name: str, options: Dict[str, str], *, new_name: Optional[str] = None, owner: Optional[str] = None
11689
11260
  ) -> ConnectionInfo:
11690
- """Update a connection.
11691
-
11692
- Updates the connection that matches the supplied name.
11261
+ """Updates the connection that matches the supplied name.
11693
11262
 
11694
11263
  :param name: str
11695
11264
  Name of the connection.
@@ -11743,9 +11312,7 @@ class CredentialsAPI:
11743
11312
  read_only: Optional[bool] = None,
11744
11313
  skip_validation: Optional[bool] = None,
11745
11314
  ) -> CredentialInfo:
11746
- """Create a credential.
11747
-
11748
- Creates a new credential. The type of credential to be created is determined by the **purpose** field,
11315
+ """Creates a new credential. The type of credential to be created is determined by the **purpose** field,
11749
11316
  which should be either **SERVICE** or **STORAGE**.
11750
11317
 
11751
11318
  The caller must be a metastore admin or have the metastore privilege **CREATE_STORAGE_CREDENTIAL** for
@@ -11755,15 +11322,15 @@ class CredentialsAPI:
11755
11322
  The credential name. The name must be unique among storage and service credentials within the
11756
11323
  metastore.
11757
11324
  :param aws_iam_role: :class:`AwsIamRole` (optional)
11758
- The AWS IAM role configuration
11325
+ The AWS IAM role configuration.
11759
11326
  :param azure_managed_identity: :class:`AzureManagedIdentity` (optional)
11760
11327
  The Azure managed identity configuration.
11761
11328
  :param azure_service_principal: :class:`AzureServicePrincipal` (optional)
11762
- The Azure service principal configuration. Only applicable when purpose is **STORAGE**.
11329
+ The Azure service principal configuration.
11763
11330
  :param comment: str (optional)
11764
11331
  Comment associated with the credential.
11765
11332
  :param databricks_gcp_service_account: :class:`DatabricksGcpServiceAccount` (optional)
11766
- GCP long-lived credential. Databricks-created Google Cloud Storage service account.
11333
+ The Databricks managed GCP service account configuration.
11767
11334
  :param purpose: :class:`CredentialPurpose` (optional)
11768
11335
  Indicates the purpose of the credential.
11769
11336
  :param read_only: bool (optional)
@@ -11802,9 +11369,7 @@ class CredentialsAPI:
11802
11369
  return CredentialInfo.from_dict(res)
11803
11370
 
11804
11371
  def delete_credential(self, name_arg: str, *, force: Optional[bool] = None):
11805
- """Delete a credential.
11806
-
11807
- Deletes a service or storage credential from the metastore. The caller must be an owner of the
11372
+ """Deletes a service or storage credential from the metastore. The caller must be an owner of the
11808
11373
  credential.
11809
11374
 
11810
11375
  :param name_arg: str
@@ -11832,9 +11397,7 @@ class CredentialsAPI:
11832
11397
  azure_options: Optional[GenerateTemporaryServiceCredentialAzureOptions] = None,
11833
11398
  gcp_options: Optional[GenerateTemporaryServiceCredentialGcpOptions] = None,
11834
11399
  ) -> TemporaryCredentials:
11835
- """Generate a temporary service credential.
11836
-
11837
- Returns a set of temporary credentials generated using the specified service credential. The caller
11400
+ """Returns a set of temporary credentials generated using the specified service credential. The caller
11838
11401
  must be a metastore admin or have the metastore privilege **ACCESS** on the service credential.
11839
11402
 
11840
11403
  :param credential_name: str
@@ -11862,9 +11425,7 @@ class CredentialsAPI:
11862
11425
  return TemporaryCredentials.from_dict(res)
11863
11426
 
11864
11427
  def get_credential(self, name_arg: str) -> CredentialInfo:
11865
- """Get a credential.
11866
-
11867
- Gets a service or storage credential from the metastore. The caller must be a metastore admin, the
11428
+ """Gets a service or storage credential from the metastore. The caller must be a metastore admin, the
11868
11429
  owner of the credential, or have any permission on the credential.
11869
11430
 
11870
11431
  :param name_arg: str
@@ -11887,9 +11448,7 @@ class CredentialsAPI:
11887
11448
  page_token: Optional[str] = None,
11888
11449
  purpose: Optional[CredentialPurpose] = None,
11889
11450
  ) -> Iterator[CredentialInfo]:
11890
- """List credentials.
11891
-
11892
- Gets an array of credentials (as __CredentialInfo__ objects).
11451
+ """Gets an array of credentials (as __CredentialInfo__ objects).
11893
11452
 
11894
11453
  The array is limited to only the credentials that the caller has permission to access. If the caller
11895
11454
  is a metastore admin, retrieval of credentials is unrestricted. There is no guarantee of a specific
@@ -11944,9 +11503,7 @@ class CredentialsAPI:
11944
11503
  read_only: Optional[bool] = None,
11945
11504
  skip_validation: Optional[bool] = None,
11946
11505
  ) -> CredentialInfo:
11947
- """Update a credential.
11948
-
11949
- Updates a service or storage credential on the metastore.
11506
+ """Updates a service or storage credential on the metastore.
11950
11507
 
11951
11508
  The caller must be the owner of the credential or a metastore admin or have the `MANAGE` permission.
11952
11509
  If the caller is a metastore admin, only the __owner__ field can be changed.
@@ -11954,15 +11511,15 @@ class CredentialsAPI:
11954
11511
  :param name_arg: str
11955
11512
  Name of the credential.
11956
11513
  :param aws_iam_role: :class:`AwsIamRole` (optional)
11957
- The AWS IAM role configuration
11514
+ The AWS IAM role configuration.
11958
11515
  :param azure_managed_identity: :class:`AzureManagedIdentity` (optional)
11959
11516
  The Azure managed identity configuration.
11960
11517
  :param azure_service_principal: :class:`AzureServicePrincipal` (optional)
11961
- The Azure service principal configuration. Only applicable when purpose is **STORAGE**.
11518
+ The Azure service principal configuration.
11962
11519
  :param comment: str (optional)
11963
11520
  Comment associated with the credential.
11964
11521
  :param databricks_gcp_service_account: :class:`DatabricksGcpServiceAccount` (optional)
11965
- GCP long-lived credential. Databricks-created Google Cloud Storage service account.
11522
+ The Databricks managed GCP service account configuration.
11966
11523
  :param force: bool (optional)
11967
11524
  Force an update even if there are dependent services (when purpose is **SERVICE**) or dependent
11968
11525
  external locations and external tables (when purpose is **STORAGE**).
@@ -12023,9 +11580,7 @@ class CredentialsAPI:
12023
11580
  read_only: Optional[bool] = None,
12024
11581
  url: Optional[str] = None,
12025
11582
  ) -> ValidateCredentialResponse:
12026
- """Validate a credential.
12027
-
12028
- Validates a credential.
11583
+ """Validates a credential.
12029
11584
 
12030
11585
  For service credentials (purpose is **SERVICE**), either the __credential_name__ or the cloud-specific
12031
11586
  credential must be provided.
@@ -12086,241 +11641,6 @@ class CredentialsAPI:
12086
11641
  return ValidateCredentialResponse.from_dict(res)
12087
11642
 
12088
11643
 
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
11644
  class ExternalLocationsAPI:
12325
11645
  """An external location is an object that combines a cloud storage path with a storage credential that
12326
11646
  authorizes access to the cloud storage path. Each external location is subject to Unity Catalog
@@ -12350,9 +11670,7 @@ class ExternalLocationsAPI:
12350
11670
  read_only: Optional[bool] = None,
12351
11671
  skip_validation: Optional[bool] = None,
12352
11672
  ) -> ExternalLocationInfo:
12353
- """Create an external location.
12354
-
12355
- Creates a new external location entry in the metastore. The caller must be a metastore admin or have
11673
+ """Creates a new external location entry in the metastore. The caller must be a metastore admin or have
12356
11674
  the **CREATE_EXTERNAL_LOCATION** privilege on both the metastore and the associated storage
12357
11675
  credential.
12358
11676
 
@@ -12411,9 +11729,7 @@ class ExternalLocationsAPI:
12411
11729
  return ExternalLocationInfo.from_dict(res)
12412
11730
 
12413
11731
  def delete(self, name: str, *, force: Optional[bool] = None):
12414
- """Delete an external location.
12415
-
12416
- Deletes the specified external location from the metastore. The caller must be the owner of the
11732
+ """Deletes the specified external location from the metastore. The caller must be the owner of the
12417
11733
  external location.
12418
11734
 
12419
11735
  :param name: str
@@ -12434,9 +11750,7 @@ class ExternalLocationsAPI:
12434
11750
  self._api.do("DELETE", f"/api/2.1/unity-catalog/external-locations/{name}", query=query, headers=headers)
12435
11751
 
12436
11752
  def get(self, name: str, *, include_browse: Optional[bool] = None) -> ExternalLocationInfo:
12437
- """Get an external location.
12438
-
12439
- Gets an external location from the metastore. The caller must be either a metastore admin, the owner
11753
+ """Gets an external location from the metastore. The caller must be either a metastore admin, the owner
12440
11754
  of the external location, or a user that has some privilege on the external location.
12441
11755
 
12442
11756
  :param name: str
@@ -12465,9 +11779,7 @@ class ExternalLocationsAPI:
12465
11779
  max_results: Optional[int] = None,
12466
11780
  page_token: Optional[str] = None,
12467
11781
  ) -> Iterator[ExternalLocationInfo]:
12468
- """List external locations.
12469
-
12470
- Gets an array of external locations (__ExternalLocationInfo__ objects) from the metastore. The caller
11782
+ """Gets an array of external locations (__ExternalLocationInfo__ objects) from the metastore. The caller
12471
11783
  must be a metastore admin, the owner of the external location, or a user that has some privilege on
12472
11784
  the external location. There is no guarantee of a specific ordering of the elements in the array.
12473
11785
 
@@ -12523,9 +11835,7 @@ class ExternalLocationsAPI:
12523
11835
  skip_validation: Optional[bool] = None,
12524
11836
  url: Optional[str] = None,
12525
11837
  ) -> ExternalLocationInfo:
12526
- """Update an external location.
12527
-
12528
- Updates an external location in the metastore. The caller must be the owner of the external location,
11838
+ """Updates an external location in the metastore. The caller must be the owner of the external location,
12529
11839
  or be a metastore admin. In the second case, the admin can only update the name of the external
12530
11840
  location.
12531
11841
 
@@ -12608,9 +11918,7 @@ class FunctionsAPI:
12608
11918
  self._api = api_client
12609
11919
 
12610
11920
  def create(self, function_info: CreateFunction) -> FunctionInfo:
12611
- """Create a function.
12612
-
12613
- **WARNING: This API is experimental and will change in future versions**
11921
+ """**WARNING: This API is experimental and will change in future versions**
12614
11922
 
12615
11923
  Creates a new function
12616
11924
 
@@ -12635,9 +11943,7 @@ class FunctionsAPI:
12635
11943
  return FunctionInfo.from_dict(res)
12636
11944
 
12637
11945
  def delete(self, name: str, *, force: Optional[bool] = None):
12638
- """Delete a function.
12639
-
12640
- Deletes the function that matches the supplied name. For the deletion to succeed, the user must
11946
+ """Deletes the function that matches the supplied name. For the deletion to succeed, the user must
12641
11947
  satisfy one of the following conditions: - Is the owner of the function's parent catalog - Is the
12642
11948
  owner of the function's parent schema and have the **USE_CATALOG** privilege on its parent catalog -
12643
11949
  Is the owner of the function itself and have both the **USE_CATALOG** privilege on its parent catalog
@@ -12662,9 +11968,7 @@ class FunctionsAPI:
12662
11968
  self._api.do("DELETE", f"/api/2.1/unity-catalog/functions/{name}", query=query, headers=headers)
12663
11969
 
12664
11970
  def get(self, name: str, *, include_browse: Optional[bool] = None) -> FunctionInfo:
12665
- """Get a function.
12666
-
12667
- Gets a function from within a parent catalog and schema. For the fetch to succeed, the user must
11971
+ """Gets a function from within a parent catalog and schema. For the fetch to succeed, the user must
12668
11972
  satisfy one of the following requirements: - Is a metastore admin - Is an owner of the function's
12669
11973
  parent catalog - Have the **USE_CATALOG** privilege on the function's parent catalog and be the owner
12670
11974
  of the function - Have the **USE_CATALOG** privilege on the function's parent catalog, the
@@ -12700,9 +12004,7 @@ class FunctionsAPI:
12700
12004
  max_results: Optional[int] = None,
12701
12005
  page_token: Optional[str] = None,
12702
12006
  ) -> Iterator[FunctionInfo]:
12703
- """List functions.
12704
-
12705
- List functions within the specified parent catalog and schema. If the user is a metastore admin, all
12007
+ """List functions within the specified parent catalog and schema. If the user is a metastore admin, all
12706
12008
  functions are returned in the output list. Otherwise, the user must have the **USE_CATALOG** privilege
12707
12009
  on the catalog and the **USE_SCHEMA** privilege on the schema, and the output list contains only
12708
12010
  functions for which either the user has the **EXECUTE** privilege or the user is the owner. There is
@@ -12751,9 +12053,7 @@ class FunctionsAPI:
12751
12053
  query["page_token"] = json["next_page_token"]
12752
12054
 
12753
12055
  def update(self, name: str, *, owner: Optional[str] = None) -> FunctionInfo:
12754
- """Update a function.
12755
-
12756
- Updates the function that matches the supplied name. Only the owner of the function can be updated. If
12056
+ """Updates the function that matches the supplied name. Only the owner of the function can be updated. If
12757
12057
  the user is not a metastore admin, the user must be a member of the group that is the new function
12758
12058
  owner. - Is a metastore admin - Is the owner of the function's parent catalog - Is the owner of the
12759
12059
  function's parent schema and has the **USE_CATALOG** privilege on its parent catalog - Is the owner of
@@ -12794,22 +12094,44 @@ class GrantsAPI:
12794
12094
  def __init__(self, api_client):
12795
12095
  self._api = api_client
12796
12096
 
12797
- def get(self, securable_type: SecurableType, full_name: str, *, principal: Optional[str] = None) -> PermissionsList:
12798
- """Get permissions.
12799
-
12800
- Gets the permissions for a securable.
12097
+ def get(
12098
+ self,
12099
+ securable_type: str,
12100
+ full_name: str,
12101
+ *,
12102
+ max_results: Optional[int] = None,
12103
+ page_token: Optional[str] = None,
12104
+ principal: Optional[str] = None,
12105
+ ) -> GetPermissionsResponse:
12106
+ """Gets the permissions for a securable. Does not include inherited permissions.
12801
12107
 
12802
- :param securable_type: :class:`SecurableType`
12108
+ :param securable_type: str
12803
12109
  Type of securable.
12804
12110
  :param full_name: str
12805
12111
  Full name of securable.
12112
+ :param max_results: int (optional)
12113
+ Specifies the maximum number of privileges to return (page length). Every PrivilegeAssignment
12114
+ present in a single page response is guaranteed to contain all the privileges granted on the
12115
+ requested Securable for the respective principal.
12116
+
12117
+ If not set, all the permissions are returned. If set to - lesser than 0: invalid parameter error -
12118
+ 0: page length is set to a server configured value - lesser than 150 but greater than 0: invalid
12119
+ parameter error (this is to ensure that server is able to return at least one complete
12120
+ PrivilegeAssignment in a single page response) - greater than (or equal to) 150: page length is the
12121
+ minimum of this value and a server configured value
12122
+ :param page_token: str (optional)
12123
+ Opaque pagination token to go to next page based on previous query.
12806
12124
  :param principal: str (optional)
12807
12125
  If provided, only the permissions for the specified principal (user or group) are returned.
12808
12126
 
12809
- :returns: :class:`PermissionsList`
12127
+ :returns: :class:`GetPermissionsResponse`
12810
12128
  """
12811
12129
 
12812
12130
  query = {}
12131
+ if max_results is not None:
12132
+ query["max_results"] = max_results
12133
+ if page_token is not None:
12134
+ query["page_token"] = page_token
12813
12135
  if principal is not None:
12814
12136
  query["principal"] = principal
12815
12137
  headers = {
@@ -12817,24 +12139,39 @@ class GrantsAPI:
12817
12139
  }
12818
12140
 
12819
12141
  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,
12142
+ "GET", f"/api/2.1/unity-catalog/permissions/{securable_type}/{full_name}", query=query, headers=headers
12824
12143
  )
12825
- return PermissionsList.from_dict(res)
12144
+ return GetPermissionsResponse.from_dict(res)
12826
12145
 
12827
12146
  def get_effective(
12828
- self, securable_type: SecurableType, full_name: str, *, principal: Optional[str] = None
12147
+ self,
12148
+ securable_type: str,
12149
+ full_name: str,
12150
+ *,
12151
+ max_results: Optional[int] = None,
12152
+ page_token: Optional[str] = None,
12153
+ principal: Optional[str] = None,
12829
12154
  ) -> EffectivePermissionsList:
12830
- """Get effective permissions.
12831
-
12832
- Gets the effective permissions for a securable.
12155
+ """Gets the effective permissions for a securable. Includes inherited permissions from any parent
12156
+ securables.
12833
12157
 
12834
- :param securable_type: :class:`SecurableType`
12158
+ :param securable_type: str
12835
12159
  Type of securable.
12836
12160
  :param full_name: str
12837
12161
  Full name of securable.
12162
+ :param max_results: int (optional)
12163
+ Specifies the maximum number of privileges to return (page length). Every
12164
+ EffectivePrivilegeAssignment present in a single page response is guaranteed to contain all the
12165
+ effective privileges granted on (or inherited by) the requested Securable for the respective
12166
+ principal.
12167
+
12168
+ If not set, all the effective permissions are returned. If set to - lesser than 0: invalid parameter
12169
+ error - 0: page length is set to a server configured value - lesser than 150 but greater than 0:
12170
+ invalid parameter error (this is to ensure that server is able to return at least one complete
12171
+ EffectivePrivilegeAssignment in a single page response) - greater than (or equal to) 150: page
12172
+ length is the minimum of this value and a server configured value
12173
+ :param page_token: str (optional)
12174
+ Opaque token for the next page of results (pagination).
12838
12175
  :param principal: str (optional)
12839
12176
  If provided, only the effective permissions for the specified principal (user or group) are
12840
12177
  returned.
@@ -12843,6 +12180,10 @@ class GrantsAPI:
12843
12180
  """
12844
12181
 
12845
12182
  query = {}
12183
+ if max_results is not None:
12184
+ query["max_results"] = max_results
12185
+ if page_token is not None:
12186
+ query["page_token"] = page_token
12846
12187
  if principal is not None:
12847
12188
  query["principal"] = principal
12848
12189
  headers = {
@@ -12851,27 +12192,25 @@ class GrantsAPI:
12851
12192
 
12852
12193
  res = self._api.do(
12853
12194
  "GET",
12854
- f"/api/2.1/unity-catalog/effective-permissions/{securable_type.value}/{full_name}",
12195
+ f"/api/2.1/unity-catalog/effective-permissions/{securable_type}/{full_name}",
12855
12196
  query=query,
12856
12197
  headers=headers,
12857
12198
  )
12858
12199
  return EffectivePermissionsList.from_dict(res)
12859
12200
 
12860
12201
  def update(
12861
- self, securable_type: SecurableType, full_name: str, *, changes: Optional[List[PermissionsChange]] = None
12862
- ) -> PermissionsList:
12863
- """Update permissions.
12864
-
12865
- Updates the permissions for a securable.
12202
+ self, securable_type: str, full_name: str, *, changes: Optional[List[PermissionsChange]] = None
12203
+ ) -> UpdatePermissionsResponse:
12204
+ """Updates the permissions for a securable.
12866
12205
 
12867
- :param securable_type: :class:`SecurableType`
12206
+ :param securable_type: str
12868
12207
  Type of securable.
12869
12208
  :param full_name: str
12870
12209
  Full name of securable.
12871
12210
  :param changes: List[:class:`PermissionsChange`] (optional)
12872
12211
  Array of permissions change objects.
12873
12212
 
12874
- :returns: :class:`PermissionsList`
12213
+ :returns: :class:`UpdatePermissionsResponse`
12875
12214
  """
12876
12215
  body = {}
12877
12216
  if changes is not None:
@@ -12882,12 +12221,9 @@ class GrantsAPI:
12882
12221
  }
12883
12222
 
12884
12223
  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,
12224
+ "PATCH", f"/api/2.1/unity-catalog/permissions/{securable_type}/{full_name}", body=body, headers=headers
12889
12225
  )
12890
- return PermissionsList.from_dict(res)
12226
+ return UpdatePermissionsResponse.from_dict(res)
12891
12227
 
12892
12228
 
12893
12229
  class MetastoresAPI:
@@ -12907,9 +12243,7 @@ class MetastoresAPI:
12907
12243
  self._api = api_client
12908
12244
 
12909
12245
  def assign(self, workspace_id: int, metastore_id: str, default_catalog_name: str):
12910
- """Create an assignment.
12911
-
12912
- Creates a new metastore assignment. If an assignment for the same __workspace_id__ exists, it will be
12246
+ """Creates a new metastore assignment. If an assignment for the same __workspace_id__ exists, it will be
12913
12247
  overwritten by the new __metastore_id__ and __default_catalog_name__. The caller must be an account
12914
12248
  admin.
12915
12249
 
@@ -12918,7 +12252,7 @@ class MetastoresAPI:
12918
12252
  :param metastore_id: str
12919
12253
  The unique ID of the metastore.
12920
12254
  :param default_catalog_name: str
12921
- The name of the default catalog in the metastore. This field is depracted. Please use "Default
12255
+ The name of the default catalog in the metastore. This field is deprecated. Please use "Default
12922
12256
  Namespace API" to configure the default catalog for a Databricks workspace.
12923
12257
 
12924
12258
 
@@ -12936,9 +12270,7 @@ class MetastoresAPI:
12936
12270
  self._api.do("PUT", f"/api/2.1/unity-catalog/workspaces/{workspace_id}/metastore", body=body, headers=headers)
12937
12271
 
12938
12272
  def create(self, name: str, *, region: Optional[str] = None, storage_root: Optional[str] = None) -> MetastoreInfo:
12939
- """Create a metastore.
12940
-
12941
- Creates a new metastore based on a provided name and optional storage root path. By default (if the
12273
+ """Creates a new metastore based on a provided name and optional storage root path. By default (if the
12942
12274
  __owner__ field is not set), the owner of the new metastore is the user calling the
12943
12275
  __createMetastore__ API. If the __owner__ field is set to the empty string (**""**), the ownership is
12944
12276
  assigned to the System User instead.
@@ -12946,9 +12278,7 @@ class MetastoresAPI:
12946
12278
  :param name: str
12947
12279
  The user-specified name of the metastore.
12948
12280
  :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.
12281
+ Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
12952
12282
  :param storage_root: str (optional)
12953
12283
  The storage root URL for metastore
12954
12284
 
@@ -12970,9 +12300,7 @@ class MetastoresAPI:
12970
12300
  return MetastoreInfo.from_dict(res)
12971
12301
 
12972
12302
  def current(self) -> MetastoreAssignment:
12973
- """Get metastore assignment for workspace.
12974
-
12975
- Gets the metastore assignment for the workspace being accessed.
12303
+ """Gets the metastore assignment for the workspace being accessed.
12976
12304
 
12977
12305
  :returns: :class:`MetastoreAssignment`
12978
12306
  """
@@ -12985,9 +12313,7 @@ class MetastoresAPI:
12985
12313
  return MetastoreAssignment.from_dict(res)
12986
12314
 
12987
12315
  def delete(self, id: str, *, force: Optional[bool] = None):
12988
- """Delete a metastore.
12989
-
12990
- Deletes a metastore. The caller must be a metastore admin.
12316
+ """Deletes a metastore. The caller must be a metastore admin.
12991
12317
 
12992
12318
  :param id: str
12993
12319
  Unique ID of the metastore.
@@ -13007,9 +12333,7 @@ class MetastoresAPI:
13007
12333
  self._api.do("DELETE", f"/api/2.1/unity-catalog/metastores/{id}", query=query, headers=headers)
13008
12334
 
13009
12335
  def get(self, id: str) -> MetastoreInfo:
13010
- """Get a metastore.
13011
-
13012
- Gets a metastore that matches the supplied ID. The caller must be a metastore admin to retrieve this
12336
+ """Gets a metastore that matches the supplied ID. The caller must be a metastore admin to retrieve this
13013
12337
  info.
13014
12338
 
13015
12339
  :param id: str
@@ -13025,27 +12349,44 @@ class MetastoresAPI:
13025
12349
  res = self._api.do("GET", f"/api/2.1/unity-catalog/metastores/{id}", headers=headers)
13026
12350
  return MetastoreInfo.from_dict(res)
13027
12351
 
13028
- def list(self) -> Iterator[MetastoreInfo]:
13029
- """List metastores.
13030
-
13031
- Gets an array of the available metastores (as __MetastoreInfo__ objects). The caller must be an admin
12352
+ def list(self, *, max_results: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[MetastoreInfo]:
12353
+ """Gets an array of the available metastores (as __MetastoreInfo__ objects). The caller must be an admin
13032
12354
  to retrieve this info. There is no guarantee of a specific ordering of the elements in the array.
13033
12355
 
12356
+ :param max_results: int (optional)
12357
+ Maximum number of metastores to return. - when set to a value greater than 0, the page length is the
12358
+ minimum of this value and a server configured value; - when set to 0, the page length is set to a
12359
+ server configured value (recommended); - when set to a value less than 0, an invalid parameter error
12360
+ is returned; - If not set, all the metastores are returned (not recommended). - Note: The number of
12361
+ returned metastores might be less than the specified max_results size, even zero. The only
12362
+ definitive indication that no further metastores can be fetched is when the next_page_token is unset
12363
+ from the response.
12364
+ :param page_token: str (optional)
12365
+ Opaque pagination token to go to next page based on previous query.
12366
+
13034
12367
  :returns: Iterator over :class:`MetastoreInfo`
13035
12368
  """
13036
12369
 
12370
+ query = {}
12371
+ if max_results is not None:
12372
+ query["max_results"] = max_results
12373
+ if page_token is not None:
12374
+ query["page_token"] = page_token
13037
12375
  headers = {
13038
12376
  "Accept": "application/json",
13039
12377
  }
13040
12378
 
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 []
12379
+ while True:
12380
+ json = self._api.do("GET", "/api/2.1/unity-catalog/metastores", query=query, headers=headers)
12381
+ if "metastores" in json:
12382
+ for v in json["metastores"]:
12383
+ yield MetastoreInfo.from_dict(v)
12384
+ if "next_page_token" not in json or not json["next_page_token"]:
12385
+ return
12386
+ query["page_token"] = json["next_page_token"]
13044
12387
 
13045
12388
  def summary(self) -> GetMetastoreSummaryResponse:
13046
- """Get a metastore summary.
13047
-
13048
- Gets information about a metastore. This summary includes the storage credential, the cloud vendor,
12389
+ """Gets information about a metastore. This summary includes the storage credential, the cloud vendor,
13049
12390
  the cloud region, and the global metastore ID.
13050
12391
 
13051
12392
  :returns: :class:`GetMetastoreSummaryResponse`
@@ -13059,9 +12400,7 @@ class MetastoresAPI:
13059
12400
  return GetMetastoreSummaryResponse.from_dict(res)
13060
12401
 
13061
12402
  def unassign(self, workspace_id: int, metastore_id: str):
13062
- """Delete an assignment.
13063
-
13064
- Deletes a metastore assignment. The caller must be an account administrator.
12403
+ """Deletes a metastore assignment. The caller must be an account administrator.
13065
12404
 
13066
12405
  :param workspace_id: int
13067
12406
  A workspace ID.
@@ -13088,15 +12427,13 @@ class MetastoresAPI:
13088
12427
  *,
13089
12428
  delta_sharing_organization_name: Optional[str] = None,
13090
12429
  delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None,
13091
- delta_sharing_scope: Optional[UpdateMetastoreDeltaSharingScope] = None,
12430
+ delta_sharing_scope: Optional[DeltaSharingScopeEnum] = None,
13092
12431
  new_name: Optional[str] = None,
13093
12432
  owner: Optional[str] = None,
13094
12433
  privilege_model_version: Optional[str] = None,
13095
12434
  storage_root_credential_id: Optional[str] = None,
13096
12435
  ) -> MetastoreInfo:
13097
- """Update a metastore.
13098
-
13099
- Updates information for a specific metastore. The caller must be a metastore admin. If the __owner__
12436
+ """Updates information for a specific metastore. The caller must be a metastore admin. If the __owner__
13100
12437
  field is set to the empty string (**""**), the ownership is updated to the System User.
13101
12438
 
13102
12439
  :param id: str
@@ -13106,7 +12443,7 @@ class MetastoresAPI:
13106
12443
  Sharing as the official name.
13107
12444
  :param delta_sharing_recipient_token_lifetime_in_seconds: int (optional)
13108
12445
  The lifetime of delta sharing recipient token in seconds.
13109
- :param delta_sharing_scope: :class:`UpdateMetastoreDeltaSharingScope` (optional)
12446
+ :param delta_sharing_scope: :class:`DeltaSharingScopeEnum` (optional)
13110
12447
  The scope of Delta Sharing enabled for the metastore.
13111
12448
  :param new_name: str (optional)
13112
12449
  New name for the metastore.
@@ -13147,9 +12484,7 @@ class MetastoresAPI:
13147
12484
  def update_assignment(
13148
12485
  self, workspace_id: int, *, default_catalog_name: Optional[str] = None, metastore_id: Optional[str] = None
13149
12486
  ):
13150
- """Update an assignment.
13151
-
13152
- Updates a metastore assignment. This operation can be used to update __metastore_id__ or
12487
+ """Updates a metastore assignment. This operation can be used to update __metastore_id__ or
13153
12488
  __default_catalog_name__ for a specified Workspace, if the Workspace is already assigned a metastore.
13154
12489
  The caller must be an account admin to update __metastore_id__; otherwise, the caller can be a
13155
12490
  Workspace admin.
@@ -13157,7 +12492,7 @@ class MetastoresAPI:
13157
12492
  :param workspace_id: int
13158
12493
  A workspace ID.
13159
12494
  :param default_catalog_name: str (optional)
13160
- The name of the default catalog in the metastore. This field is depracted. Please use "Default
12495
+ The name of the default catalog in the metastore. This field is deprecated. Please use "Default
13161
12496
  Namespace API" to configure the default catalog for a Databricks workspace.
13162
12497
  :param metastore_id: str (optional)
13163
12498
  The unique ID of the metastore.
@@ -13189,9 +12524,7 @@ class ModelVersionsAPI:
13189
12524
  self._api = api_client
13190
12525
 
13191
12526
  def delete(self, full_name: str, version: int):
13192
- """Delete a Model Version.
13193
-
13194
- Deletes a model version from the specified registered model. Any aliases assigned to the model version
12527
+ """Deletes a model version from the specified registered model. Any aliases assigned to the model version
13195
12528
  will also be deleted.
13196
12529
 
13197
12530
  The caller must be a metastore admin or an owner of the parent registered model. For the latter case,
@@ -13218,9 +12551,7 @@ class ModelVersionsAPI:
13218
12551
  include_aliases: Optional[bool] = None,
13219
12552
  include_browse: Optional[bool] = None,
13220
12553
  ) -> ModelVersionInfo:
13221
- """Get a Model Version.
13222
-
13223
- Get a model version.
12554
+ """Get a model version.
13224
12555
 
13225
12556
  The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the parent
13226
12557
  registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG**
@@ -13254,9 +12585,7 @@ class ModelVersionsAPI:
13254
12585
  return ModelVersionInfo.from_dict(res)
13255
12586
 
13256
12587
  def get_by_alias(self, full_name: str, alias: str, *, include_aliases: Optional[bool] = None) -> ModelVersionInfo:
13257
- """Get Model Version By Alias.
13258
-
13259
- Get a model version by alias.
12588
+ """Get a model version by alias.
13260
12589
 
13261
12590
  The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the
13262
12591
  registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG**
@@ -13292,9 +12621,7 @@ class ModelVersionsAPI:
13292
12621
  max_results: Optional[int] = None,
13293
12622
  page_token: Optional[str] = None,
13294
12623
  ) -> Iterator[ModelVersionInfo]:
13295
- """List Model Versions.
13296
-
13297
- List model versions. You can list model versions under a particular schema, or list all model versions
12624
+ """List model versions. You can list model versions under a particular schema, or list all model versions
13298
12625
  in the current metastore.
13299
12626
 
13300
12627
  The returned models are filtered based on the privileges of the calling user. For example, the
@@ -13346,9 +12673,7 @@ class ModelVersionsAPI:
13346
12673
  query["page_token"] = json["next_page_token"]
13347
12674
 
13348
12675
  def update(self, full_name: str, version: int, *, comment: Optional[str] = None) -> ModelVersionInfo:
13349
- """Update a Model Version.
13350
-
13351
- Updates the specified model version.
12676
+ """Updates the specified model version.
13352
12677
 
13353
12678
  The caller must be a metastore admin or an owner of the parent registered model. For the latter case,
13354
12679
  the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the
@@ -13415,9 +12740,7 @@ class OnlineTablesAPI:
13415
12740
  raise TimeoutError(f"timed out after {timeout}: {status_message}")
13416
12741
 
13417
12742
  def create(self, table: OnlineTable) -> Wait[OnlineTable]:
13418
- """Create an Online Table.
13419
-
13420
- Create a new Online Table.
12743
+ """Create a new Online Table.
13421
12744
 
13422
12745
  :param table: :class:`OnlineTable`
13423
12746
  Online Table information.
@@ -13441,9 +12764,7 @@ class OnlineTablesAPI:
13441
12764
  return self.create(table=table).result(timeout=timeout)
13442
12765
 
13443
12766
  def delete(self, name: str):
13444
- """Delete an Online Table.
13445
-
13446
- Delete an online table. Warning: This will delete all the data in the online table. If the source
12767
+ """Delete an online table. Warning: This will delete all the data in the online table. If the source
13447
12768
  Delta table was deleted or modified since this Online Table was created, this will lose the data
13448
12769
  forever!
13449
12770
 
@@ -13460,9 +12781,7 @@ class OnlineTablesAPI:
13460
12781
  self._api.do("DELETE", f"/api/2.0/online-tables/{name}", headers=headers)
13461
12782
 
13462
12783
  def get(self, name: str) -> OnlineTable:
13463
- """Get an Online Table.
13464
-
13465
- Get information about an existing online table and its status.
12784
+ """Get information about an existing online table and its status.
13466
12785
 
13467
12786
  :param name: str
13468
12787
  Full three-part (catalog, schema, table) name of the table.
@@ -13490,9 +12809,7 @@ class QualityMonitorsAPI:
13490
12809
  self._api = api_client
13491
12810
 
13492
12811
  def cancel_refresh(self, table_name: str, refresh_id: str):
13493
- """Cancel refresh.
13494
-
13495
- Cancel an active monitor refresh for the given refresh ID.
12812
+ """Cancel an active monitor refresh for the given refresh ID.
13496
12813
 
13497
12814
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
13498
12815
  table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
@@ -13533,9 +12850,7 @@ class QualityMonitorsAPI:
13533
12850
  time_series: Optional[MonitorTimeSeries] = None,
13534
12851
  warehouse_id: Optional[str] = None,
13535
12852
  ) -> MonitorInfo:
13536
- """Create a table monitor.
13537
-
13538
- Creates a new monitor for the specified table.
12853
+ """Creates a new monitor for the specified table.
13539
12854
 
13540
12855
  The caller must either: 1. be an owner of the table's parent catalog, have **USE_SCHEMA** on the
13541
12856
  table's parent schema, and have **SELECT** access on the table 2. have **USE_CATALOG** on the table's
@@ -13617,9 +12932,7 @@ class QualityMonitorsAPI:
13617
12932
  return MonitorInfo.from_dict(res)
13618
12933
 
13619
12934
  def delete(self, table_name: str):
13620
- """Delete a table monitor.
13621
-
13622
- Deletes a monitor for the specified table.
12935
+ """Deletes a monitor for the specified table.
13623
12936
 
13624
12937
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
13625
12938
  table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
@@ -13642,9 +12955,7 @@ class QualityMonitorsAPI:
13642
12955
  self._api.do("DELETE", f"/api/2.1/unity-catalog/tables/{table_name}/monitor", headers=headers)
13643
12956
 
13644
12957
  def get(self, table_name: str) -> MonitorInfo:
13645
- """Get a table monitor.
13646
-
13647
- Gets a monitor for the specified table.
12958
+ """Gets a monitor for the specified table.
13648
12959
 
13649
12960
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
13650
12961
  table's parent catalog and be an owner of the table's parent schema. 3. have the following
@@ -13669,9 +12980,7 @@ class QualityMonitorsAPI:
13669
12980
  return MonitorInfo.from_dict(res)
13670
12981
 
13671
12982
  def get_refresh(self, table_name: str, refresh_id: str) -> MonitorRefreshInfo:
13672
- """Get refresh.
13673
-
13674
- Gets info about a specific monitor refresh using the given refresh ID.
12983
+ """Gets info about a specific monitor refresh using the given refresh ID.
13675
12984
 
13676
12985
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
13677
12986
  table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
@@ -13698,9 +13007,7 @@ class QualityMonitorsAPI:
13698
13007
  return MonitorRefreshInfo.from_dict(res)
13699
13008
 
13700
13009
  def list_refreshes(self, table_name: str) -> MonitorRefreshListResponse:
13701
- """List refreshes.
13702
-
13703
- Gets an array containing the history of the most recent refreshes (up to 25) for this table.
13010
+ """Gets an array containing the history of the most recent refreshes (up to 25) for this table.
13704
13011
 
13705
13012
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
13706
13013
  table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
@@ -13725,9 +13032,7 @@ class QualityMonitorsAPI:
13725
13032
  def regenerate_dashboard(
13726
13033
  self, table_name: str, *, warehouse_id: Optional[str] = None
13727
13034
  ) -> RegenerateDashboardResponse:
13728
- """Regenerate a monitoring dashboard.
13729
-
13730
- Regenerates the monitoring dashboard for the specified table.
13035
+ """Regenerates the monitoring dashboard for the specified table.
13731
13036
 
13732
13037
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
13733
13038
  table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
@@ -13759,9 +13064,7 @@ class QualityMonitorsAPI:
13759
13064
  return RegenerateDashboardResponse.from_dict(res)
13760
13065
 
13761
13066
  def run_refresh(self, table_name: str) -> MonitorRefreshInfo:
13762
- """Queue a metric refresh for a monitor.
13763
-
13764
- Queues a metric refresh on the monitor for the specified table. The refresh will execute in the
13067
+ """Queues a metric refresh on the monitor for the specified table. The refresh will execute in the
13765
13068
  background.
13766
13069
 
13767
13070
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
@@ -13800,9 +13103,7 @@ class QualityMonitorsAPI:
13800
13103
  snapshot: Optional[MonitorSnapshot] = None,
13801
13104
  time_series: Optional[MonitorTimeSeries] = None,
13802
13105
  ) -> MonitorInfo:
13803
- """Update a table monitor.
13804
-
13805
- Updates a monitor for the specified table.
13106
+ """Updates a monitor for the specified table.
13806
13107
 
13807
13108
  The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
13808
13109
  table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
@@ -13916,9 +13217,7 @@ class RegisteredModelsAPI:
13916
13217
  comment: Optional[str] = None,
13917
13218
  storage_location: Optional[str] = None,
13918
13219
  ) -> RegisteredModelInfo:
13919
- """Create a Registered Model.
13920
-
13921
- Creates a new registered model in Unity Catalog.
13220
+ """Creates a new registered model in Unity Catalog.
13922
13221
 
13923
13222
  File storage for model versions in the registered model will be located in the default location which
13924
13223
  is specified by the parent schema, or the parent catalog, or the Metastore.
@@ -13961,9 +13260,7 @@ class RegisteredModelsAPI:
13961
13260
  return RegisteredModelInfo.from_dict(res)
13962
13261
 
13963
13262
  def delete(self, full_name: str):
13964
- """Delete a Registered Model.
13965
-
13966
- Deletes a registered model and all its model versions from the specified parent catalog and schema.
13263
+ """Deletes a registered model and all its model versions from the specified parent catalog and schema.
13967
13264
 
13968
13265
  The caller must be a metastore admin or an owner of the registered model. For the latter case, the
13969
13266
  caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the
@@ -13980,9 +13277,7 @@ class RegisteredModelsAPI:
13980
13277
  self._api.do("DELETE", f"/api/2.1/unity-catalog/models/{full_name}", headers=headers)
13981
13278
 
13982
13279
  def delete_alias(self, full_name: str, alias: str):
13983
- """Delete a Registered Model Alias.
13984
-
13985
- Deletes a registered model alias.
13280
+ """Deletes a registered model alias.
13986
13281
 
13987
13282
  The caller must be a metastore admin or an owner of the registered model. For the latter case, the
13988
13283
  caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the
@@ -14003,9 +13298,7 @@ class RegisteredModelsAPI:
14003
13298
  def get(
14004
13299
  self, full_name: str, *, include_aliases: Optional[bool] = None, include_browse: Optional[bool] = None
14005
13300
  ) -> RegisteredModelInfo:
14006
- """Get a Registered Model.
14007
-
14008
- Get a registered model.
13301
+ """Get a registered model.
14009
13302
 
14010
13303
  The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the
14011
13304
  registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG**
@@ -14043,9 +13336,7 @@ class RegisteredModelsAPI:
14043
13336
  page_token: Optional[str] = None,
14044
13337
  schema_name: Optional[str] = None,
14045
13338
  ) -> Iterator[RegisteredModelInfo]:
14046
- """List Registered Models.
14047
-
14048
- List registered models. You can list registered models under a particular schema, or list all
13339
+ """List registered models. You can list registered models under a particular schema, or list all
14049
13340
  registered models in the current metastore.
14050
13341
 
14051
13342
  The returned models are filtered based on the privileges of the calling user. For example, the
@@ -14110,9 +13401,7 @@ class RegisteredModelsAPI:
14110
13401
  query["page_token"] = json["next_page_token"]
14111
13402
 
14112
13403
  def set_alias(self, full_name: str, alias: str, version_num: int) -> RegisteredModelAlias:
14113
- """Set a Registered Model Alias.
14114
-
14115
- Set an alias on the specified registered model.
13404
+ """Set an alias on the specified registered model.
14116
13405
 
14117
13406
  The caller must be a metastore admin or an owner of the registered model. For the latter case, the
14118
13407
  caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the
@@ -14148,9 +13437,7 @@ class RegisteredModelsAPI:
14148
13437
  new_name: Optional[str] = None,
14149
13438
  owner: Optional[str] = None,
14150
13439
  ) -> RegisteredModelInfo:
14151
- """Update a Registered Model.
14152
-
14153
- Updates the specified registered model.
13440
+ """Updates the specified registered model.
14154
13441
 
14155
13442
  The caller must be a metastore admin or an owner of the registered model. For the latter case, the
14156
13443
  caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the
@@ -14198,9 +13485,7 @@ class ResourceQuotasAPI:
14198
13485
  self._api = api_client
14199
13486
 
14200
13487
  def get_quota(self, parent_securable_type: str, parent_full_name: str, quota_name: str) -> GetQuotaResponse:
14201
- """Get information for a single resource quota.
14202
-
14203
- The GetQuota API returns usage information for a single resource quota, defined as a child-parent
13488
+ """The GetQuota API returns usage information for a single resource quota, defined as a child-parent
14204
13489
  pair. This API also refreshes the quota count if it is out of date. Refreshes are triggered
14205
13490
  asynchronously. The updated count might not be returned in the first call.
14206
13491
 
@@ -14228,9 +13513,7 @@ class ResourceQuotasAPI:
14228
13513
  def list_quotas(
14229
13514
  self, *, max_results: Optional[int] = None, page_token: Optional[str] = None
14230
13515
  ) -> Iterator[QuotaInfo]:
14231
- """List all resource quotas under a metastore.
14232
-
14233
- ListQuotas returns all quota values under the metastore. There are no SLAs on the freshness of the
13516
+ """ListQuotas returns all quota values under the metastore. There are no SLAs on the freshness of the
14234
13517
  counts returned. This API does not trigger a refresh of quota counts.
14235
13518
 
14236
13519
  :param max_results: int (optional)
@@ -14280,9 +13563,7 @@ class SchemasAPI:
14280
13563
  properties: Optional[Dict[str, str]] = None,
14281
13564
  storage_root: Optional[str] = None,
14282
13565
  ) -> SchemaInfo:
14283
- """Create a schema.
14284
-
14285
- Creates a new schema for catalog in the Metatastore. The caller must be a metastore admin, or have the
13566
+ """Creates a new schema for catalog in the Metatastore. The caller must be a metastore admin, or have the
14286
13567
  **CREATE_SCHEMA** privilege in the parent catalog.
14287
13568
 
14288
13569
  :param name: str
@@ -14318,9 +13599,7 @@ class SchemasAPI:
14318
13599
  return SchemaInfo.from_dict(res)
14319
13600
 
14320
13601
  def delete(self, full_name: str, *, force: Optional[bool] = None):
14321
- """Delete a schema.
14322
-
14323
- Deletes the specified schema from the parent catalog. The caller must be the owner of the schema or an
13602
+ """Deletes the specified schema from the parent catalog. The caller must be the owner of the schema or an
14324
13603
  owner of the parent catalog.
14325
13604
 
14326
13605
  :param full_name: str
@@ -14341,9 +13620,7 @@ class SchemasAPI:
14341
13620
  self._api.do("DELETE", f"/api/2.1/unity-catalog/schemas/{full_name}", query=query, headers=headers)
14342
13621
 
14343
13622
  def get(self, full_name: str, *, include_browse: Optional[bool] = None) -> SchemaInfo:
14344
- """Get a schema.
14345
-
14346
- Gets the specified schema within the metastore. The caller must be a metastore admin, the owner of the
13623
+ """Gets the specified schema within the metastore. The caller must be a metastore admin, the owner of the
14347
13624
  schema, or a user that has the **USE_SCHEMA** privilege on the schema.
14348
13625
 
14349
13626
  :param full_name: str
@@ -14373,9 +13650,7 @@ class SchemasAPI:
14373
13650
  max_results: Optional[int] = None,
14374
13651
  page_token: Optional[str] = None,
14375
13652
  ) -> Iterator[SchemaInfo]:
14376
- """List schemas.
14377
-
14378
- Gets an array of schemas for a catalog in the metastore. If the caller is the metastore admin or the
13653
+ """Gets an array of schemas for a catalog in the metastore. If the caller is the metastore admin or the
14379
13654
  owner of the parent catalog, all schemas for the catalog will be retrieved. Otherwise, only schemas
14380
13655
  owned by the caller (or for which the caller has the **USE_SCHEMA** privilege) will be retrieved.
14381
13656
  There is no guarantee of a specific ordering of the elements in the array.
@@ -14409,8 +13684,6 @@ class SchemasAPI:
14409
13684
  "Accept": "application/json",
14410
13685
  }
14411
13686
 
14412
- if "max_results" not in query:
14413
- query["max_results"] = 0
14414
13687
  while True:
14415
13688
  json = self._api.do("GET", "/api/2.1/unity-catalog/schemas", query=query, headers=headers)
14416
13689
  if "schemas" in json:
@@ -14430,9 +13703,7 @@ class SchemasAPI:
14430
13703
  owner: Optional[str] = None,
14431
13704
  properties: Optional[Dict[str, str]] = None,
14432
13705
  ) -> SchemaInfo:
14433
- """Update a schema.
14434
-
14435
- Updates a schema for a catalog. The caller must be the owner of the schema or a metastore admin. If
13706
+ """Updates a schema for a catalog. The caller must be the owner of the schema or a metastore admin. If
14436
13707
  the caller is a metastore admin, only the __owner__ field can be changed in the update. If the
14437
13708
  __name__ field must be updated, the caller must be a metastore admin or have the **CREATE_SCHEMA**
14438
13709
  privilege on the parent catalog.
@@ -14442,6 +13713,7 @@ class SchemasAPI:
14442
13713
  :param comment: str (optional)
14443
13714
  User-provided free-form text description.
14444
13715
  :param enable_predictive_optimization: :class:`EnablePredictiveOptimization` (optional)
13716
+ Whether predictive optimization should be enabled for this object and objects under it.
14445
13717
  :param new_name: str (optional)
14446
13718
  New name for the schema.
14447
13719
  :param owner: str (optional)
@@ -14499,12 +13771,14 @@ class StorageCredentialsAPI:
14499
13771
  read_only: Optional[bool] = None,
14500
13772
  skip_validation: Optional[bool] = None,
14501
13773
  ) -> StorageCredentialInfo:
14502
- """Create a storage credential.
13774
+ """Creates a new storage credential.
14503
13775
 
14504
- Creates a new storage credential.
13776
+ The caller must be a metastore admin or have the **CREATE_STORAGE_CREDENTIAL** privilege on the
13777
+ metastore.
14505
13778
 
14506
13779
  :param name: str
14507
- The credential name. The name must be unique within the metastore.
13780
+ The credential name. The name must be unique among storage and service credentials within the
13781
+ metastore.
14508
13782
  :param aws_iam_role: :class:`AwsIamRoleRequest` (optional)
14509
13783
  The AWS IAM role configuration.
14510
13784
  :param azure_managed_identity: :class:`AzureManagedIdentityRequest` (optional)
@@ -14518,7 +13792,8 @@ class StorageCredentialsAPI:
14518
13792
  :param databricks_gcp_service_account: :class:`DatabricksGcpServiceAccountRequest` (optional)
14519
13793
  The Databricks managed GCP service account configuration.
14520
13794
  :param read_only: bool (optional)
14521
- Whether the storage credential is only usable for read operations.
13795
+ Whether the credential is usable only for read operations. Only applicable when purpose is
13796
+ **STORAGE**.
14522
13797
  :param skip_validation: bool (optional)
14523
13798
  Supplying true to this argument skips validation of the created credential.
14524
13799
 
@@ -14552,15 +13827,14 @@ class StorageCredentialsAPI:
14552
13827
  return StorageCredentialInfo.from_dict(res)
14553
13828
 
14554
13829
  def delete(self, name: str, *, force: Optional[bool] = None):
14555
- """Delete a credential.
14556
-
14557
- Deletes a storage credential from the metastore. The caller must be an owner of the storage
13830
+ """Deletes a storage credential from the metastore. The caller must be an owner of the storage
14558
13831
  credential.
14559
13832
 
14560
13833
  :param name: str
14561
13834
  Name of the storage credential.
14562
13835
  :param force: bool (optional)
14563
- Force deletion even if there are dependent external locations or external tables.
13836
+ Force an update even if there are dependent external locations or external tables (when purpose is
13837
+ **STORAGE**) or dependent services (when purpose is **SERVICE**).
14564
13838
 
14565
13839
 
14566
13840
  """
@@ -14575,9 +13849,7 @@ class StorageCredentialsAPI:
14575
13849
  self._api.do("DELETE", f"/api/2.1/unity-catalog/storage-credentials/{name}", query=query, headers=headers)
14576
13850
 
14577
13851
  def get(self, name: str) -> StorageCredentialInfo:
14578
- """Get a credential.
14579
-
14580
- Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the
13852
+ """Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the
14581
13853
  storage credential, or have some permission on the storage credential.
14582
13854
 
14583
13855
  :param name: str
@@ -14596,9 +13868,7 @@ class StorageCredentialsAPI:
14596
13868
  def list(
14597
13869
  self, *, max_results: Optional[int] = None, page_token: Optional[str] = None
14598
13870
  ) -> Iterator[StorageCredentialInfo]:
14599
- """List credentials.
14600
-
14601
- Gets an array of storage credentials (as __StorageCredentialInfo__ objects). The array is limited to
13871
+ """Gets an array of storage credentials (as __StorageCredentialInfo__ objects). The array is limited to
14602
13872
  only those storage credentials the caller has permission to access. If the caller is a metastore
14603
13873
  admin, retrieval of credentials is unrestricted. There is no guarantee of a specific ordering of the
14604
13874
  elements in the array.
@@ -14624,8 +13894,6 @@ class StorageCredentialsAPI:
14624
13894
  "Accept": "application/json",
14625
13895
  }
14626
13896
 
14627
- if "max_results" not in query:
14628
- query["max_results"] = 0
14629
13897
  while True:
14630
13898
  json = self._api.do("GET", "/api/2.1/unity-catalog/storage-credentials", query=query, headers=headers)
14631
13899
  if "storage_credentials" in json:
@@ -14652,9 +13920,10 @@ class StorageCredentialsAPI:
14652
13920
  read_only: Optional[bool] = None,
14653
13921
  skip_validation: Optional[bool] = None,
14654
13922
  ) -> StorageCredentialInfo:
14655
- """Update a credential.
13923
+ """Updates a storage credential on the metastore.
14656
13924
 
14657
- Updates a storage credential on the metastore.
13925
+ The caller must be the owner of the storage credential or a metastore admin. If the caller is a
13926
+ metastore admin, only the **owner** field can be changed.
14658
13927
 
14659
13928
  :param name: str
14660
13929
  Name of the storage credential.
@@ -14673,12 +13942,14 @@ class StorageCredentialsAPI:
14673
13942
  :param force: bool (optional)
14674
13943
  Force update even if there are dependent external locations or external tables.
14675
13944
  :param isolation_mode: :class:`IsolationMode` (optional)
13945
+ Whether the current securable is accessible from all workspaces or a specific set of workspaces.
14676
13946
  :param new_name: str (optional)
14677
13947
  New name for the storage credential.
14678
13948
  :param owner: str (optional)
14679
13949
  Username of current owner of credential.
14680
13950
  :param read_only: bool (optional)
14681
- Whether the storage credential is only usable for read operations.
13951
+ Whether the credential is usable only for read operations. Only applicable when purpose is
13952
+ **STORAGE**.
14682
13953
  :param skip_validation: bool (optional)
14683
13954
  Supplying true to this argument skips validation of the updated credential.
14684
13955
 
@@ -14730,9 +14001,7 @@ class StorageCredentialsAPI:
14730
14001
  storage_credential_name: Optional[str] = None,
14731
14002
  url: Optional[str] = None,
14732
14003
  ) -> ValidateStorageCredentialResponse:
14733
- """Validate a storage credential.
14734
-
14735
- Validates a storage credential. At least one of __external_location_name__ and __url__ need to be
14004
+ """Validates a storage credential. At least one of __external_location_name__ and __url__ need to be
14736
14005
  provided. If only one of them is provided, it will be used for validation. And if both are provided,
14737
14006
  the __url__ will be used for validation, and __external_location_name__ will be ignored when checking
14738
14007
  overlapping urls.
@@ -14757,7 +14026,7 @@ class StorageCredentialsAPI:
14757
14026
  :param read_only: bool (optional)
14758
14027
  Whether the storage credential is only usable for read operations.
14759
14028
  :param storage_credential_name: str (optional)
14760
- The name of the storage credential to validate.
14029
+ Required. The name of an existing credential or long-lived cloud credential to validate.
14761
14030
  :param url: str (optional)
14762
14031
  The external location url to validate.
14763
14032
 
@@ -14799,9 +14068,7 @@ class SystemSchemasAPI:
14799
14068
  self._api = api_client
14800
14069
 
14801
14070
  def disable(self, metastore_id: str, schema_name: str):
14802
- """Disable a system schema.
14803
-
14804
- Disables the system schema and removes it from the system catalog. The caller must be an account admin
14071
+ """Disables the system schema and removes it from the system catalog. The caller must be an account admin
14805
14072
  or a metastore admin.
14806
14073
 
14807
14074
  :param metastore_id: str
@@ -14821,9 +14088,7 @@ class SystemSchemasAPI:
14821
14088
  )
14822
14089
 
14823
14090
  def enable(self, metastore_id: str, schema_name: str, *, catalog_name: Optional[str] = None):
14824
- """Enable a system schema.
14825
-
14826
- Enables the system schema and adds it to the system catalog. The caller must be an account admin or a
14091
+ """Enables the system schema and adds it to the system catalog. The caller must be an account admin or a
14827
14092
  metastore admin.
14828
14093
 
14829
14094
  :param metastore_id: str
@@ -14853,9 +14118,7 @@ class SystemSchemasAPI:
14853
14118
  def list(
14854
14119
  self, metastore_id: str, *, max_results: Optional[int] = None, page_token: Optional[str] = None
14855
14120
  ) -> Iterator[SystemSchemaInfo]:
14856
- """List system schemas.
14857
-
14858
- Gets an array of system schemas for a metastore. The caller must be an account admin or a metastore
14121
+ """Gets an array of system schemas for a metastore. The caller must be an account admin or a metastore
14859
14122
  admin.
14860
14123
 
14861
14124
  :param metastore_id: str
@@ -14908,9 +14171,7 @@ class TableConstraintsAPI:
14908
14171
  self._api = api_client
14909
14172
 
14910
14173
  def create(self, full_name_arg: str, constraint: TableConstraint) -> TableConstraint:
14911
- """Create a table constraint.
14912
-
14913
- Creates a new table constraint.
14174
+ """Creates a new table constraint.
14914
14175
 
14915
14176
  For the table constraint creation to succeed, the user must satisfy both of these conditions: - the
14916
14177
  user must have the **USE_CATALOG** privilege on the table's parent catalog, the **USE_SCHEMA**
@@ -14941,9 +14202,7 @@ class TableConstraintsAPI:
14941
14202
  return TableConstraint.from_dict(res)
14942
14203
 
14943
14204
  def delete(self, full_name: str, constraint_name: str, cascade: bool):
14944
- """Delete a table constraint.
14945
-
14946
- Deletes a table constraint.
14205
+ """Deletes a table constraint.
14947
14206
 
14948
14207
  For the table constraint deletion to succeed, the user must satisfy both of these conditions: - the
14949
14208
  user must have the **USE_CATALOG** privilege on the table's parent catalog, the **USE_SCHEMA**
@@ -14989,9 +14248,7 @@ class TablesAPI:
14989
14248
  self._api = api_client
14990
14249
 
14991
14250
  def delete(self, full_name: str):
14992
- """Delete a table.
14993
-
14994
- Deletes a table from the specified parent catalog and schema. The caller must be the owner of the
14251
+ """Deletes a table from the specified parent catalog and schema. The caller must be the owner of the
14995
14252
  parent catalog, have the **USE_CATALOG** privilege on the parent catalog and be the owner of the
14996
14253
  parent schema, or be the owner of the table and have the **USE_CATALOG** privilege on the parent
14997
14254
  catalog and the **USE_SCHEMA** privilege on the parent schema.
@@ -15009,9 +14266,7 @@ class TablesAPI:
15009
14266
  self._api.do("DELETE", f"/api/2.1/unity-catalog/tables/{full_name}", headers=headers)
15010
14267
 
15011
14268
  def exists(self, full_name: str) -> TableExistsResponse:
15012
- """Get boolean reflecting if table exists.
15013
-
15014
- Gets if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one
14269
+ """Gets if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one
15015
14270
  of the following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the
15016
14271
  owner of the parent schema and have the USE_CATALOG privilege on the parent catalog * Have the
15017
14272
  **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema,
@@ -15039,9 +14294,7 @@ class TablesAPI:
15039
14294
  include_delta_metadata: Optional[bool] = None,
15040
14295
  include_manifest_capabilities: Optional[bool] = None,
15041
14296
  ) -> TableInfo:
15042
- """Get a table.
15043
-
15044
- Gets a table from the metastore for a specific catalog and schema. The caller must satisfy one of the
14297
+ """Gets a table from the metastore for a specific catalog and schema. The caller must satisfy one of the
15045
14298
  following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the owner of
15046
14299
  the parent schema and have the USE_CATALOG privilege on the parent catalog * Have the **USE_CATALOG**
15047
14300
  privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema, and either be
@@ -15088,9 +14341,7 @@ class TablesAPI:
15088
14341
  omit_username: Optional[bool] = None,
15089
14342
  page_token: Optional[str] = None,
15090
14343
  ) -> Iterator[TableInfo]:
15091
- """List tables.
15092
-
15093
- Gets an array of all tables for the current metastore under the parent catalog and schema. The caller
14344
+ """Gets an array of all tables for the current metastore under the parent catalog and schema. The caller
15094
14345
  must be a metastore admin or an owner of (or have the **SELECT** privilege on) the table. For the
15095
14346
  latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent
15096
14347
  catalog and the **USE_SCHEMA** privilege on the parent schema. There is no guarantee of a specific
@@ -15171,9 +14422,7 @@ class TablesAPI:
15171
14422
  schema_name_pattern: Optional[str] = None,
15172
14423
  table_name_pattern: Optional[str] = None,
15173
14424
  ) -> Iterator[TableSummary]:
15174
- """List table summaries.
15175
-
15176
- Gets an array of summaries for tables for a schema and catalog within the metastore. The table
14425
+ """Gets an array of summaries for tables for a schema and catalog within the metastore. The table
15177
14426
  summaries returned are either:
15178
14427
 
15179
14428
  * summaries for tables (within the current metastore and parent catalog and schema), when the user is
@@ -15233,9 +14482,7 @@ class TablesAPI:
15233
14482
  query["page_token"] = json["next_page_token"]
15234
14483
 
15235
14484
  def update(self, full_name: str, *, owner: Optional[str] = None):
15236
- """Update a table owner.
15237
-
15238
- Change the owner of the table. The caller must be the owner of the parent catalog, have the
14485
+ """Change the owner of the table. The caller must be the owner of the parent catalog, have the
15239
14486
  **USE_CATALOG** privilege on the parent catalog and be the owner of the parent schema, or be the owner
15240
14487
  of the table and have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
15241
14488
  privilege on the parent schema.
@@ -15277,9 +14524,7 @@ class TemporaryTableCredentialsAPI:
15277
14524
  def generate_temporary_table_credentials(
15278
14525
  self, *, operation: Optional[TableOperation] = None, table_id: Optional[str] = None
15279
14526
  ) -> GenerateTemporaryTableCredentialResponse:
15280
- """Generate a temporary table credential.
15281
-
15282
- Get a short-lived credential for directly accessing the table data on cloud storage. The metastore
14527
+ """Get a short-lived credential for directly accessing the table data on cloud storage. The metastore
15283
14528
  must have external_access_enabled flag set to true (default false). The caller must have
15284
14529
  EXTERNAL_USE_SCHEMA privilege on the parent schema and this privilege can only be granted by catalog
15285
14530
  owners.
@@ -15327,9 +14572,7 @@ class VolumesAPI:
15327
14572
  comment: Optional[str] = None,
15328
14573
  storage_location: Optional[str] = None,
15329
14574
  ) -> VolumeInfo:
15330
- """Create a Volume.
15331
-
15332
- Creates a new volume.
14575
+ """Creates a new volume.
15333
14576
 
15334
14577
  The user could create either an external volume or a managed volume. An external volume will be
15335
14578
  created in the specified external location, while a managed volume will be located in the default
@@ -15386,9 +14629,7 @@ class VolumesAPI:
15386
14629
  return VolumeInfo.from_dict(res)
15387
14630
 
15388
14631
  def delete(self, name: str):
15389
- """Delete a Volume.
15390
-
15391
- Deletes a volume from the specified parent catalog and schema.
14632
+ """Deletes a volume from the specified parent catalog and schema.
15392
14633
 
15393
14634
  The caller must be a metastore admin or an owner of the volume. For the latter case, the caller must
15394
14635
  also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
@@ -15413,9 +14654,7 @@ class VolumesAPI:
15413
14654
  max_results: Optional[int] = None,
15414
14655
  page_token: Optional[str] = None,
15415
14656
  ) -> Iterator[VolumeInfo]:
15416
- """List Volumes.
15417
-
15418
- Gets an array of volumes for the current metastore under the parent catalog and schema.
14657
+ """Gets an array of volumes for the current metastore under the parent catalog and schema.
15419
14658
 
15420
14659
  The returned volumes are filtered based on the privileges of the calling user. For example, the
15421
14660
  metastore admin is able to list all the volumes. A regular user needs to be the owner or have the
@@ -15476,9 +14715,7 @@ class VolumesAPI:
15476
14715
  query["page_token"] = json["next_page_token"]
15477
14716
 
15478
14717
  def read(self, name: str, *, include_browse: Optional[bool] = None) -> VolumeInfo:
15479
- """Get a Volume.
15480
-
15481
- Gets a volume from the metastore for a specific catalog and schema.
14718
+ """Gets a volume from the metastore for a specific catalog and schema.
15482
14719
 
15483
14720
  The caller must be a metastore admin or an owner of (or have the **READ VOLUME** privilege on) the
15484
14721
  volume. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege
@@ -15506,9 +14743,7 @@ class VolumesAPI:
15506
14743
  def update(
15507
14744
  self, name: str, *, comment: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None
15508
14745
  ) -> VolumeInfo:
15509
- """Update a Volume.
15510
-
15511
- Updates the specified volume under the specified parent catalog and schema.
14746
+ """Updates the specified volume under the specified parent catalog and schema.
15512
14747
 
15513
14748
  The caller must be a metastore admin or an owner of the volume. For the latter case, the caller must
15514
14749
  also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
@@ -15563,9 +14798,7 @@ class WorkspaceBindingsAPI:
15563
14798
  self._api = api_client
15564
14799
 
15565
14800
  def get(self, name: str) -> GetCatalogWorkspaceBindingsResponse:
15566
- """Get catalog workspace bindings.
15567
-
15568
- Gets workspace bindings of the catalog. The caller must be a metastore admin or an owner of the
14801
+ """Gets workspace bindings of the catalog. The caller must be a metastore admin or an owner of the
15569
14802
  catalog.
15570
14803
 
15571
14804
  :param name: str
@@ -15589,9 +14822,7 @@ class WorkspaceBindingsAPI:
15589
14822
  max_results: Optional[int] = None,
15590
14823
  page_token: Optional[str] = None,
15591
14824
  ) -> Iterator[WorkspaceBinding]:
15592
- """Get securable workspace bindings.
15593
-
15594
- Gets workspace bindings of the securable. The caller must be a metastore admin or an owner of the
14825
+ """Gets workspace bindings of the securable. The caller must be a metastore admin or an owner of the
15595
14826
  securable.
15596
14827
 
15597
14828
  :param securable_type: str
@@ -15640,9 +14871,7 @@ class WorkspaceBindingsAPI:
15640
14871
  assign_workspaces: Optional[List[int]] = None,
15641
14872
  unassign_workspaces: Optional[List[int]] = None,
15642
14873
  ) -> UpdateCatalogWorkspaceBindingsResponse:
15643
- """Update catalog workspace bindings.
15644
-
15645
- Updates workspace bindings of the catalog. The caller must be a metastore admin or an owner of the
14874
+ """Updates workspace bindings of the catalog. The caller must be a metastore admin or an owner of the
15646
14875
  catalog.
15647
14876
 
15648
14877
  :param name: str
@@ -15677,9 +14906,7 @@ class WorkspaceBindingsAPI:
15677
14906
  add: Optional[List[WorkspaceBinding]] = None,
15678
14907
  remove: Optional[List[WorkspaceBinding]] = None,
15679
14908
  ) -> UpdateWorkspaceBindingsResponse:
15680
- """Update securable workspace bindings.
15681
-
15682
- Updates workspace bindings of the securable. The caller must be a metastore admin or an owner of the
14909
+ """Updates workspace bindings of the securable. The caller must be a metastore admin or an owner of the
15683
14910
  securable.
15684
14911
 
15685
14912
  :param securable_type: str