databricks-sdk 0.65.0__py3-none-any.whl → 0.66.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.
- databricks/sdk/__init__.py +89 -28
- databricks/sdk/credentials_provider.py +6 -5
- databricks/sdk/mixins/sharing.py +44 -0
- databricks/sdk/service/catalog.py +12 -6
- databricks/sdk/service/compute.py +11 -0
- databricks/sdk/service/dashboards.py +88 -16
- databricks/sdk/service/database.py +24 -38
- databricks/sdk/service/iam.py +2557 -492
- databricks/sdk/service/iamv2.py +643 -0
- databricks/sdk/service/jobs.py +22 -59
- databricks/sdk/service/ml.py +392 -0
- databricks/sdk/service/oauth2.py +3 -3
- databricks/sdk/service/pipelines.py +105 -0
- databricks/sdk/service/settingsv2.py +13 -65
- databricks/sdk/service/sharing.py +13 -1
- databricks/sdk/service/sql.py +15 -3
- databricks/sdk/service/tags.py +25 -6
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.65.0.dist-info → databricks_sdk-0.66.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.65.0.dist-info → databricks_sdk-0.66.0.dist-info}/RECORD +24 -22
- {databricks_sdk-0.65.0.dist-info → databricks_sdk-0.66.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.65.0.dist-info → databricks_sdk-0.66.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.65.0.dist-info → databricks_sdk-0.66.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.65.0.dist-info → databricks_sdk-0.66.0.dist-info}/top_level.txt +0 -0
databricks/sdk/__init__.py
CHANGED
|
@@ -12,6 +12,7 @@ from databricks.sdk.mixins.compute import ClustersExt
|
|
|
12
12
|
from databricks.sdk.mixins.files import DbfsExt, FilesExt
|
|
13
13
|
from databricks.sdk.mixins.jobs import JobsExt
|
|
14
14
|
from databricks.sdk.mixins.open_ai_client import ServingEndpointsExt
|
|
15
|
+
from databricks.sdk.mixins.sharing import SharesExt
|
|
15
16
|
from databricks.sdk.mixins.workspace import WorkspaceExt
|
|
16
17
|
from databricks.sdk.service import agentbricks as pkg_agentbricks
|
|
17
18
|
from databricks.sdk.service import apps as pkg_apps
|
|
@@ -23,6 +24,7 @@ from databricks.sdk.service import dashboards as pkg_dashboards
|
|
|
23
24
|
from databricks.sdk.service import database as pkg_database
|
|
24
25
|
from databricks.sdk.service import files as pkg_files
|
|
25
26
|
from databricks.sdk.service import iam as pkg_iam
|
|
27
|
+
from databricks.sdk.service import iamv2 as pkg_iamv2
|
|
26
28
|
from databricks.sdk.service import jobs as pkg_jobs
|
|
27
29
|
from databricks.sdk.service import marketplace as pkg_marketplace
|
|
28
30
|
from databricks.sdk.service import ml as pkg_ml
|
|
@@ -82,12 +84,16 @@ from databricks.sdk.service.files import DbfsAPI, FilesAPI
|
|
|
82
84
|
from databricks.sdk.service.iam import (AccessControlAPI,
|
|
83
85
|
AccountAccessControlAPI,
|
|
84
86
|
AccountAccessControlProxyAPI,
|
|
85
|
-
AccountGroupsAPI,
|
|
87
|
+
AccountGroupsAPI, AccountGroupsV2API,
|
|
86
88
|
AccountServicePrincipalsAPI,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
AccountServicePrincipalsV2API,
|
|
90
|
+
AccountUsersAPI, AccountUsersV2API,
|
|
91
|
+
CurrentUserAPI, GroupsAPI, GroupsV2API,
|
|
92
|
+
PermissionMigrationAPI, PermissionsAPI,
|
|
93
|
+
ServicePrincipalsAPI,
|
|
94
|
+
ServicePrincipalsV2API, UsersAPI,
|
|
95
|
+
UsersV2API, WorkspaceAssignmentAPI)
|
|
96
|
+
from databricks.sdk.service.iamv2 import AccountIamV2API, WorkspaceIamV2API
|
|
91
97
|
from databricks.sdk.service.jobs import JobsAPI, PolicyComplianceForJobsAPI
|
|
92
98
|
from databricks.sdk.service.marketplace import (
|
|
93
99
|
ConsumerFulfillmentsAPI, ConsumerInstallationsAPI, ConsumerListingsAPI,
|
|
@@ -95,8 +101,9 @@ from databricks.sdk.service.marketplace import (
|
|
|
95
101
|
ProviderExchangeFiltersAPI, ProviderExchangesAPI, ProviderFilesAPI,
|
|
96
102
|
ProviderListingsAPI, ProviderPersonalizationRequestsAPI,
|
|
97
103
|
ProviderProviderAnalyticsDashboardsAPI, ProviderProvidersAPI)
|
|
98
|
-
from databricks.sdk.service.ml import (ExperimentsAPI,
|
|
99
|
-
|
|
104
|
+
from databricks.sdk.service.ml import (ExperimentsAPI, FeatureEngineeringAPI,
|
|
105
|
+
FeatureStoreAPI, ForecastingAPI,
|
|
106
|
+
MaterializedFeaturesAPI,
|
|
100
107
|
ModelRegistryAPI)
|
|
101
108
|
from databricks.sdk.service.oauth2 import (AccountFederationPolicyAPI,
|
|
102
109
|
CustomAppIntegrationAPI,
|
|
@@ -285,6 +292,7 @@ class WorkspaceClient:
|
|
|
285
292
|
self._external_lineage = pkg_catalog.ExternalLineageAPI(self._api_client)
|
|
286
293
|
self._external_locations = pkg_catalog.ExternalLocationsAPI(self._api_client)
|
|
287
294
|
self._external_metadata = pkg_catalog.ExternalMetadataAPI(self._api_client)
|
|
295
|
+
self._feature_engineering = pkg_ml.FeatureEngineeringAPI(self._api_client)
|
|
288
296
|
self._feature_store = pkg_ml.FeatureStoreAPI(self._api_client)
|
|
289
297
|
self._files = _make_files_client(self._api_client, self._config)
|
|
290
298
|
self._functions = pkg_catalog.FunctionsAPI(self._api_client)
|
|
@@ -292,7 +300,7 @@ class WorkspaceClient:
|
|
|
292
300
|
self._git_credentials = pkg_workspace.GitCredentialsAPI(self._api_client)
|
|
293
301
|
self._global_init_scripts = pkg_compute.GlobalInitScriptsAPI(self._api_client)
|
|
294
302
|
self._grants = pkg_catalog.GrantsAPI(self._api_client)
|
|
295
|
-
self.
|
|
303
|
+
self._groups_v2 = pkg_iam.GroupsV2API(self._api_client)
|
|
296
304
|
self._instance_pools = pkg_compute.InstancePoolsAPI(self._api_client)
|
|
297
305
|
self._instance_profiles = pkg_compute.InstanceProfilesAPI(self._api_client)
|
|
298
306
|
self._ip_access_lists = pkg_settings.IpAccessListsAPI(self._api_client)
|
|
@@ -341,7 +349,7 @@ class WorkspaceClient:
|
|
|
341
349
|
self._schemas = pkg_catalog.SchemasAPI(self._api_client)
|
|
342
350
|
self._secrets = pkg_workspace.SecretsAPI(self._api_client)
|
|
343
351
|
self._service_principal_secrets_proxy = pkg_oauth2.ServicePrincipalSecretsProxyAPI(self._api_client)
|
|
344
|
-
self.
|
|
352
|
+
self._service_principals_v2 = pkg_iam.ServicePrincipalsV2API(self._api_client)
|
|
345
353
|
self._serving_endpoints = serving_endpoints
|
|
346
354
|
serving_endpoints_data_plane_token_source = DataPlaneTokenSource(
|
|
347
355
|
self._config.host, self._config.oauth_token, self._config.disable_async_token_refresh
|
|
@@ -350,7 +358,7 @@ class WorkspaceClient:
|
|
|
350
358
|
self._api_client, serving_endpoints, serving_endpoints_data_plane_token_source
|
|
351
359
|
)
|
|
352
360
|
self._settings = pkg_settings.SettingsAPI(self._api_client)
|
|
353
|
-
self._shares =
|
|
361
|
+
self._shares = SharesExt(self._api_client)
|
|
354
362
|
self._statement_execution = pkg_sql.StatementExecutionAPI(self._api_client)
|
|
355
363
|
self._storage_credentials = pkg_catalog.StorageCredentialsAPI(self._api_client)
|
|
356
364
|
self._system_schemas = pkg_catalog.SystemSchemasAPI(self._api_client)
|
|
@@ -361,7 +369,7 @@ class WorkspaceClient:
|
|
|
361
369
|
self._temporary_table_credentials = pkg_catalog.TemporaryTableCredentialsAPI(self._api_client)
|
|
362
370
|
self._token_management = pkg_settings.TokenManagementAPI(self._api_client)
|
|
363
371
|
self._tokens = pkg_settings.TokensAPI(self._api_client)
|
|
364
|
-
self.
|
|
372
|
+
self._users_v2 = pkg_iam.UsersV2API(self._api_client)
|
|
365
373
|
self._vector_search_endpoints = pkg_vectorsearch.VectorSearchEndpointsAPI(self._api_client)
|
|
366
374
|
self._vector_search_indexes = pkg_vectorsearch.VectorSearchIndexesAPI(self._api_client)
|
|
367
375
|
self._volumes = pkg_catalog.VolumesAPI(self._api_client)
|
|
@@ -371,6 +379,10 @@ class WorkspaceClient:
|
|
|
371
379
|
self._workspace_conf = pkg_settings.WorkspaceConfAPI(self._api_client)
|
|
372
380
|
self._workspace_settings_v2 = pkg_settingsv2.WorkspaceSettingsV2API(self._api_client)
|
|
373
381
|
self._forecasting = pkg_ml.ForecastingAPI(self._api_client)
|
|
382
|
+
self._workspace_iam_v2 = pkg_iamv2.WorkspaceIamV2API(self._api_client)
|
|
383
|
+
self._groups = pkg_iam.GroupsAPI(self._api_client)
|
|
384
|
+
self._service_principals = pkg_iam.ServicePrincipalsAPI(self._api_client)
|
|
385
|
+
self._users = pkg_iam.UsersAPI(self._api_client)
|
|
374
386
|
|
|
375
387
|
@property
|
|
376
388
|
def config(self) -> client.Config:
|
|
@@ -574,6 +586,11 @@ class WorkspaceClient:
|
|
|
574
586
|
"""External Metadata objects enable customers to register and manage metadata about external systems within Unity Catalog."""
|
|
575
587
|
return self._external_metadata
|
|
576
588
|
|
|
589
|
+
@property
|
|
590
|
+
def feature_engineering(self) -> pkg_ml.FeatureEngineeringAPI:
|
|
591
|
+
"""[description]."""
|
|
592
|
+
return self._feature_engineering
|
|
593
|
+
|
|
577
594
|
@property
|
|
578
595
|
def feature_store(self) -> pkg_ml.FeatureStoreAPI:
|
|
579
596
|
"""A feature store is a centralized repository that enables data scientists to find and share features."""
|
|
@@ -610,9 +627,9 @@ class WorkspaceClient:
|
|
|
610
627
|
return self._grants
|
|
611
628
|
|
|
612
629
|
@property
|
|
613
|
-
def
|
|
630
|
+
def groups_v2(self) -> pkg_iam.GroupsV2API:
|
|
614
631
|
"""Groups simplify identity management, making it easier to assign access to Databricks workspace, data, and other securable objects."""
|
|
615
|
-
return self.
|
|
632
|
+
return self._groups_v2
|
|
616
633
|
|
|
617
634
|
@property
|
|
618
635
|
def instance_pools(self) -> pkg_compute.InstancePoolsAPI:
|
|
@@ -845,9 +862,9 @@ class WorkspaceClient:
|
|
|
845
862
|
return self._service_principal_secrets_proxy
|
|
846
863
|
|
|
847
864
|
@property
|
|
848
|
-
def
|
|
865
|
+
def service_principals_v2(self) -> pkg_iam.ServicePrincipalsV2API:
|
|
849
866
|
"""Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms."""
|
|
850
|
-
return self.
|
|
867
|
+
return self._service_principals_v2
|
|
851
868
|
|
|
852
869
|
@property
|
|
853
870
|
def serving_endpoints(self) -> ServingEndpointsExt:
|
|
@@ -865,7 +882,7 @@ class WorkspaceClient:
|
|
|
865
882
|
return self._settings
|
|
866
883
|
|
|
867
884
|
@property
|
|
868
|
-
def shares(self) ->
|
|
885
|
+
def shares(self) -> SharesExt:
|
|
869
886
|
"""A share is a container instantiated with :method:shares/create."""
|
|
870
887
|
return self._shares
|
|
871
888
|
|
|
@@ -896,7 +913,7 @@ class WorkspaceClient:
|
|
|
896
913
|
|
|
897
914
|
@property
|
|
898
915
|
def tag_policies(self) -> pkg_tags.TagPoliciesAPI:
|
|
899
|
-
"""The Tag Policy API allows you to manage
|
|
916
|
+
"""The Tag Policy API allows you to manage policies for governed tags in Databricks."""
|
|
900
917
|
return self._tag_policies
|
|
901
918
|
|
|
902
919
|
@property
|
|
@@ -920,9 +937,9 @@ class WorkspaceClient:
|
|
|
920
937
|
return self._tokens
|
|
921
938
|
|
|
922
939
|
@property
|
|
923
|
-
def
|
|
940
|
+
def users_v2(self) -> pkg_iam.UsersV2API:
|
|
924
941
|
"""User identities recognized by Databricks and represented by email addresses."""
|
|
925
|
-
return self.
|
|
942
|
+
return self._users_v2
|
|
926
943
|
|
|
927
944
|
@property
|
|
928
945
|
def vector_search_endpoints(self) -> pkg_vectorsearch.VectorSearchEndpointsAPI:
|
|
@@ -969,6 +986,26 @@ class WorkspaceClient:
|
|
|
969
986
|
"""The Forecasting API allows you to create and get serverless forecasting experiments."""
|
|
970
987
|
return self._forecasting
|
|
971
988
|
|
|
989
|
+
@property
|
|
990
|
+
def workspace_iam_v2(self) -> pkg_iamv2.WorkspaceIamV2API:
|
|
991
|
+
"""These APIs are used to manage identities and the workspace access of these identities in <Databricks>."""
|
|
992
|
+
return self._workspace_iam_v2
|
|
993
|
+
|
|
994
|
+
@property
|
|
995
|
+
def groups(self) -> pkg_iam.GroupsAPI:
|
|
996
|
+
"""Groups simplify identity management, making it easier to assign access to Databricks workspace, data, and other securable objects."""
|
|
997
|
+
return self._groups
|
|
998
|
+
|
|
999
|
+
@property
|
|
1000
|
+
def service_principals(self) -> pkg_iam.ServicePrincipalsAPI:
|
|
1001
|
+
"""Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms."""
|
|
1002
|
+
return self._service_principals
|
|
1003
|
+
|
|
1004
|
+
@property
|
|
1005
|
+
def users(self) -> pkg_iam.UsersAPI:
|
|
1006
|
+
"""User identities recognized by Databricks and represented by email addresses."""
|
|
1007
|
+
return self._users
|
|
1008
|
+
|
|
972
1009
|
def get_workspace_id(self) -> int:
|
|
973
1010
|
"""Get the workspace ID of the workspace that this client is connected to."""
|
|
974
1011
|
response = self._api_client.do("GET", "/api/2.0/preview/scim/v2/Me", response_headers=["X-Databricks-Org-Id"])
|
|
@@ -1050,7 +1087,7 @@ class AccountClient:
|
|
|
1050
1087
|
self._custom_app_integration = pkg_oauth2.CustomAppIntegrationAPI(self._api_client)
|
|
1051
1088
|
self._encryption_keys = pkg_provisioning.EncryptionKeysAPI(self._api_client)
|
|
1052
1089
|
self._federation_policy = pkg_oauth2.AccountFederationPolicyAPI(self._api_client)
|
|
1053
|
-
self.
|
|
1090
|
+
self._groups_v2 = pkg_iam.AccountGroupsV2API(self._api_client)
|
|
1054
1091
|
self._ip_access_lists = pkg_settings.AccountIpAccessListsAPI(self._api_client)
|
|
1055
1092
|
self._log_delivery = pkg_billing.LogDeliveryAPI(self._api_client)
|
|
1056
1093
|
self._metastore_assignments = pkg_catalog.AccountMetastoreAssignmentsAPI(self._api_client)
|
|
@@ -1063,18 +1100,22 @@ class AccountClient:
|
|
|
1063
1100
|
self._published_app_integration = pkg_oauth2.PublishedAppIntegrationAPI(self._api_client)
|
|
1064
1101
|
self._service_principal_federation_policy = pkg_oauth2.ServicePrincipalFederationPolicyAPI(self._api_client)
|
|
1065
1102
|
self._service_principal_secrets = pkg_oauth2.ServicePrincipalSecretsAPI(self._api_client)
|
|
1066
|
-
self.
|
|
1103
|
+
self._service_principals_v2 = pkg_iam.AccountServicePrincipalsV2API(self._api_client)
|
|
1067
1104
|
self._settings = pkg_settings.AccountSettingsAPI(self._api_client)
|
|
1068
1105
|
self._settings_v2 = pkg_settingsv2.AccountSettingsV2API(self._api_client)
|
|
1069
1106
|
self._storage = pkg_provisioning.StorageAPI(self._api_client)
|
|
1070
1107
|
self._storage_credentials = pkg_catalog.AccountStorageCredentialsAPI(self._api_client)
|
|
1071
1108
|
self._usage_dashboards = pkg_billing.UsageDashboardsAPI(self._api_client)
|
|
1072
|
-
self.
|
|
1109
|
+
self._users_v2 = pkg_iam.AccountUsersV2API(self._api_client)
|
|
1073
1110
|
self._vpc_endpoints = pkg_provisioning.VpcEndpointsAPI(self._api_client)
|
|
1074
1111
|
self._workspace_assignment = pkg_iam.WorkspaceAssignmentAPI(self._api_client)
|
|
1075
1112
|
self._workspace_network_configuration = pkg_settings.WorkspaceNetworkConfigurationAPI(self._api_client)
|
|
1076
1113
|
self._workspaces = pkg_provisioning.WorkspacesAPI(self._api_client)
|
|
1114
|
+
self._iam_v2 = pkg_iamv2.AccountIamV2API(self._api_client)
|
|
1077
1115
|
self._budgets = pkg_billing.BudgetsAPI(self._api_client)
|
|
1116
|
+
self._groups = pkg_iam.AccountGroupsAPI(self._api_client)
|
|
1117
|
+
self._service_principals = pkg_iam.AccountServicePrincipalsAPI(self._api_client)
|
|
1118
|
+
self._users = pkg_iam.AccountUsersAPI(self._api_client)
|
|
1078
1119
|
|
|
1079
1120
|
@property
|
|
1080
1121
|
def config(self) -> client.Config:
|
|
@@ -1120,9 +1161,9 @@ class AccountClient:
|
|
|
1120
1161
|
return self._federation_policy
|
|
1121
1162
|
|
|
1122
1163
|
@property
|
|
1123
|
-
def
|
|
1164
|
+
def groups_v2(self) -> pkg_iam.AccountGroupsV2API:
|
|
1124
1165
|
"""Groups simplify identity management, making it easier to assign access to Databricks account, data, and other securable objects."""
|
|
1125
|
-
return self.
|
|
1166
|
+
return self._groups_v2
|
|
1126
1167
|
|
|
1127
1168
|
@property
|
|
1128
1169
|
def ip_access_lists(self) -> pkg_settings.AccountIpAccessListsAPI:
|
|
@@ -1185,9 +1226,9 @@ class AccountClient:
|
|
|
1185
1226
|
return self._service_principal_secrets
|
|
1186
1227
|
|
|
1187
1228
|
@property
|
|
1188
|
-
def
|
|
1229
|
+
def service_principals_v2(self) -> pkg_iam.AccountServicePrincipalsV2API:
|
|
1189
1230
|
"""Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms."""
|
|
1190
|
-
return self.
|
|
1231
|
+
return self._service_principals_v2
|
|
1191
1232
|
|
|
1192
1233
|
@property
|
|
1193
1234
|
def settings(self) -> pkg_settings.AccountSettingsAPI:
|
|
@@ -1215,9 +1256,9 @@ class AccountClient:
|
|
|
1215
1256
|
return self._usage_dashboards
|
|
1216
1257
|
|
|
1217
1258
|
@property
|
|
1218
|
-
def
|
|
1259
|
+
def users_v2(self) -> pkg_iam.AccountUsersV2API:
|
|
1219
1260
|
"""User identities recognized by Databricks and represented by email addresses."""
|
|
1220
|
-
return self.
|
|
1261
|
+
return self._users_v2
|
|
1221
1262
|
|
|
1222
1263
|
@property
|
|
1223
1264
|
def vpc_endpoints(self) -> pkg_provisioning.VpcEndpointsAPI:
|
|
@@ -1239,11 +1280,31 @@ class AccountClient:
|
|
|
1239
1280
|
"""These APIs manage workspaces for this account."""
|
|
1240
1281
|
return self._workspaces
|
|
1241
1282
|
|
|
1283
|
+
@property
|
|
1284
|
+
def iam_v2(self) -> pkg_iamv2.AccountIamV2API:
|
|
1285
|
+
"""These APIs are used to manage identities and the workspace access of these identities in <Databricks>."""
|
|
1286
|
+
return self._iam_v2
|
|
1287
|
+
|
|
1242
1288
|
@property
|
|
1243
1289
|
def budgets(self) -> pkg_billing.BudgetsAPI:
|
|
1244
1290
|
"""These APIs manage budget configurations for this account."""
|
|
1245
1291
|
return self._budgets
|
|
1246
1292
|
|
|
1293
|
+
@property
|
|
1294
|
+
def groups(self) -> pkg_iam.AccountGroupsAPI:
|
|
1295
|
+
"""Groups simplify identity management, making it easier to assign access to Databricks account, data, and other securable objects."""
|
|
1296
|
+
return self._groups
|
|
1297
|
+
|
|
1298
|
+
@property
|
|
1299
|
+
def service_principals(self) -> pkg_iam.AccountServicePrincipalsAPI:
|
|
1300
|
+
"""Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms."""
|
|
1301
|
+
return self._service_principals
|
|
1302
|
+
|
|
1303
|
+
@property
|
|
1304
|
+
def users(self) -> pkg_iam.AccountUsersAPI:
|
|
1305
|
+
"""User identities recognized by Databricks and represented by email addresses."""
|
|
1306
|
+
return self._users
|
|
1307
|
+
|
|
1247
1308
|
def get_workspace_client(self, workspace: Workspace) -> WorkspaceClient:
|
|
1248
1309
|
"""Constructs a ``WorkspaceClient`` for the given workspace.
|
|
1249
1310
|
|
|
@@ -319,17 +319,18 @@ def env_oidc(cfg) -> Optional[CredentialsProvider]:
|
|
|
319
319
|
if cfg.oidc_token_env:
|
|
320
320
|
env_var = cfg.oidc_token_env
|
|
321
321
|
|
|
322
|
-
return
|
|
322
|
+
return oidc_credentials_provider(cfg, oidc.EnvIdTokenSource(env_var))
|
|
323
323
|
|
|
324
324
|
|
|
325
325
|
@credentials_strategy("file-oidc", ["host", "oidc_token_filepath"])
|
|
326
326
|
def file_oidc(cfg) -> Optional[CredentialsProvider]:
|
|
327
|
-
return
|
|
327
|
+
return oidc_credentials_provider(cfg, oidc.FileIdTokenSource(cfg.oidc_token_filepath))
|
|
328
328
|
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
def oidc_credentials_provider(cfg, id_token_source: oidc.IdTokenSource) -> Optional[CredentialsProvider]:
|
|
331
|
+
"""Creates a CredentialsProvider to sign requests with an OAuth token obtained
|
|
332
|
+
by automatically performing the token exchange using the given IdTokenSource."""
|
|
333
|
+
|
|
333
334
|
try:
|
|
334
335
|
id_token_source.id_token() # validate the id_token_source
|
|
335
336
|
except Exception as e:
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import Iterator, Optional
|
|
2
|
+
|
|
3
|
+
from databricks.sdk.service import sharing
|
|
4
|
+
from databricks.sdk.service.sharing import ShareInfo
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SharesExt(sharing.SharesAPI):
|
|
8
|
+
def list(self, *, max_results: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[ShareInfo]:
|
|
9
|
+
"""Gets an array of data object shares from the metastore. The caller must be a metastore admin or the
|
|
10
|
+
owner of the share. There is no guarantee of a specific ordering of the elements in the array.
|
|
11
|
+
|
|
12
|
+
:param max_results: int (optional)
|
|
13
|
+
Maximum number of shares to return. - when set to 0, the page length is set to a server configured
|
|
14
|
+
value (recommended); - when set to a value greater than 0, the page length is the minimum of this
|
|
15
|
+
value and a server configured value; - when set to a value less than 0, an invalid parameter error
|
|
16
|
+
is returned; - If not set, all valid shares are returned (not recommended). - Note: The number of
|
|
17
|
+
returned shares might be less than the specified max_results size, even zero. The only definitive
|
|
18
|
+
indication that no further shares can be fetched is when the next_page_token is unset from the
|
|
19
|
+
response.
|
|
20
|
+
:param page_token: str (optional)
|
|
21
|
+
Opaque pagination token to go to next page based on previous query.
|
|
22
|
+
|
|
23
|
+
:returns: Iterator over :class:`ShareInfo`
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
query = {}
|
|
27
|
+
if max_results is not None:
|
|
28
|
+
query["max_results"] = max_results
|
|
29
|
+
if page_token is not None:
|
|
30
|
+
query["page_token"] = page_token
|
|
31
|
+
headers = {
|
|
32
|
+
"Accept": "application/json",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if "max_results" not in query:
|
|
36
|
+
query["max_results"] = 0
|
|
37
|
+
while True:
|
|
38
|
+
json = self._api.do("GET", "/api/2.1/unity-catalog/shares", query=query, headers=headers)
|
|
39
|
+
if "shares" in json:
|
|
40
|
+
for v in json["shares"]:
|
|
41
|
+
yield ShareInfo.from_dict(v)
|
|
42
|
+
if "next_page_token" not in json or not json["next_page_token"]:
|
|
43
|
+
return
|
|
44
|
+
query["page_token"] = json["next_page_token"]
|
|
@@ -1505,7 +1505,7 @@ class ConnectionInfo:
|
|
|
1505
1505
|
|
|
1506
1506
|
|
|
1507
1507
|
class ConnectionType(Enum):
|
|
1508
|
-
"""Next Id:
|
|
1508
|
+
"""Next Id: 38"""
|
|
1509
1509
|
|
|
1510
1510
|
BIGQUERY = "BIGQUERY"
|
|
1511
1511
|
DATABRICKS = "DATABRICKS"
|
|
@@ -1515,6 +1515,7 @@ class ConnectionType(Enum):
|
|
|
1515
1515
|
HTTP = "HTTP"
|
|
1516
1516
|
MYSQL = "MYSQL"
|
|
1517
1517
|
ORACLE = "ORACLE"
|
|
1518
|
+
PALANTIR = "PALANTIR"
|
|
1518
1519
|
POSTGRESQL = "POSTGRESQL"
|
|
1519
1520
|
POWER_BI = "POWER_BI"
|
|
1520
1521
|
REDSHIFT = "REDSHIFT"
|
|
@@ -2892,8 +2893,6 @@ class EffectivePredictiveOptimizationFlag:
|
|
|
2892
2893
|
|
|
2893
2894
|
|
|
2894
2895
|
class EffectivePredictiveOptimizationFlagInheritedFromType(Enum):
|
|
2895
|
-
"""The type of the object from which the flag was inherited. If there was no inheritance, this
|
|
2896
|
-
field is left blank."""
|
|
2897
2896
|
|
|
2898
2897
|
CATALOG = "CATALOG"
|
|
2899
2898
|
SCHEMA = "SCHEMA"
|
|
@@ -3652,7 +3651,8 @@ class ExternalLocationInfo:
|
|
|
3652
3651
|
sufficient."""
|
|
3653
3652
|
|
|
3654
3653
|
file_event_queue: Optional[FileEventQueue] = None
|
|
3655
|
-
"""File event queue settings.
|
|
3654
|
+
"""File event queue settings. If `enable_file_events` is `true`, must be defined and have exactly
|
|
3655
|
+
one of the documented properties."""
|
|
3656
3656
|
|
|
3657
3657
|
isolation_mode: Optional[IsolationMode] = None
|
|
3658
3658
|
|
|
@@ -8539,6 +8539,7 @@ class Securable:
|
|
|
8539
8539
|
|
|
8540
8540
|
|
|
8541
8541
|
class SecurableKind(Enum):
|
|
8542
|
+
"""Latest kind: CONNECTION_PALANTIR_OAUTH_M2M = 263; Next id:264"""
|
|
8542
8543
|
|
|
8543
8544
|
TABLE_DB_STORAGE = "TABLE_DB_STORAGE"
|
|
8544
8545
|
TABLE_DELTA = "TABLE_DELTA"
|
|
@@ -8549,6 +8550,7 @@ class SecurableKind(Enum):
|
|
|
8549
8550
|
TABLE_DELTA_ICEBERG_MANAGED = "TABLE_DELTA_ICEBERG_MANAGED"
|
|
8550
8551
|
TABLE_DELTA_UNIFORM_HUDI_EXTERNAL = "TABLE_DELTA_UNIFORM_HUDI_EXTERNAL"
|
|
8551
8552
|
TABLE_DELTA_UNIFORM_ICEBERG_EXTERNAL = "TABLE_DELTA_UNIFORM_ICEBERG_EXTERNAL"
|
|
8553
|
+
TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_DELTASHARING = "TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_DELTASHARING"
|
|
8552
8554
|
TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_HIVE_METASTORE_EXTERNAL = (
|
|
8553
8555
|
"TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_HIVE_METASTORE_EXTERNAL"
|
|
8554
8556
|
)
|
|
@@ -8579,6 +8581,7 @@ class SecurableKind(Enum):
|
|
|
8579
8581
|
TABLE_FOREIGN_MYSQL = "TABLE_FOREIGN_MYSQL"
|
|
8580
8582
|
TABLE_FOREIGN_NETSUITE = "TABLE_FOREIGN_NETSUITE"
|
|
8581
8583
|
TABLE_FOREIGN_ORACLE = "TABLE_FOREIGN_ORACLE"
|
|
8584
|
+
TABLE_FOREIGN_PALANTIR = "TABLE_FOREIGN_PALANTIR"
|
|
8582
8585
|
TABLE_FOREIGN_POSTGRESQL = "TABLE_FOREIGN_POSTGRESQL"
|
|
8583
8586
|
TABLE_FOREIGN_REDSHIFT = "TABLE_FOREIGN_REDSHIFT"
|
|
8584
8587
|
TABLE_FOREIGN_SALESFORCE = "TABLE_FOREIGN_SALESFORCE"
|
|
@@ -8596,6 +8599,7 @@ class SecurableKind(Enum):
|
|
|
8596
8599
|
TABLE_MATERIALIZED_VIEW = "TABLE_MATERIALIZED_VIEW"
|
|
8597
8600
|
TABLE_MATERIALIZED_VIEW_DELTASHARING = "TABLE_MATERIALIZED_VIEW_DELTASHARING"
|
|
8598
8601
|
TABLE_METRIC_VIEW = "TABLE_METRIC_VIEW"
|
|
8602
|
+
TABLE_METRIC_VIEW_DELTASHARING = "TABLE_METRIC_VIEW_DELTASHARING"
|
|
8599
8603
|
TABLE_ONLINE_VECTOR_INDEX_DIRECT = "TABLE_ONLINE_VECTOR_INDEX_DIRECT"
|
|
8600
8604
|
TABLE_ONLINE_VECTOR_INDEX_REPLICA = "TABLE_ONLINE_VECTOR_INDEX_REPLICA"
|
|
8601
8605
|
TABLE_ONLINE_VIEW = "TABLE_ONLINE_VIEW"
|
|
@@ -11945,7 +11949,8 @@ class ExternalLocationsAPI:
|
|
|
11945
11949
|
enabled, the access to the location falls back to cluster credentials if UC credentials are not
|
|
11946
11950
|
sufficient.
|
|
11947
11951
|
:param file_event_queue: :class:`FileEventQueue` (optional)
|
|
11948
|
-
File event queue settings.
|
|
11952
|
+
File event queue settings. If `enable_file_events` is `true`, must be defined and have exactly one
|
|
11953
|
+
of the documented properties.
|
|
11949
11954
|
:param read_only: bool (optional)
|
|
11950
11955
|
Indicates whether the external location is read-only.
|
|
11951
11956
|
:param skip_validation: bool (optional)
|
|
@@ -12107,7 +12112,8 @@ class ExternalLocationsAPI:
|
|
|
12107
12112
|
enabled, the access to the location falls back to cluster credentials if UC credentials are not
|
|
12108
12113
|
sufficient.
|
|
12109
12114
|
:param file_event_queue: :class:`FileEventQueue` (optional)
|
|
12110
|
-
File event queue settings.
|
|
12115
|
+
File event queue settings. If `enable_file_events` is `true`, must be defined and have exactly one
|
|
12116
|
+
of the documented properties.
|
|
12111
12117
|
:param force: bool (optional)
|
|
12112
12118
|
Force update even if changing url invalidates dependent external tables or mounts.
|
|
12113
12119
|
:param isolation_mode: :class:`IsolationMode` (optional)
|
|
@@ -3136,6 +3136,9 @@ class Environment:
|
|
|
3136
3136
|
version and a set of Python packages. The version is a string, consisting of an integer."""
|
|
3137
3137
|
|
|
3138
3138
|
jar_dependencies: Optional[List[str]] = None
|
|
3139
|
+
"""Use `java_dependencies` instead."""
|
|
3140
|
+
|
|
3141
|
+
java_dependencies: Optional[List[str]] = None
|
|
3139
3142
|
"""List of jar dependencies, should be string representing volume paths. For example:
|
|
3140
3143
|
`/Volumes/path/to/test.jar`."""
|
|
3141
3144
|
|
|
@@ -3150,6 +3153,8 @@ class Environment:
|
|
|
3150
3153
|
body["environment_version"] = self.environment_version
|
|
3151
3154
|
if self.jar_dependencies:
|
|
3152
3155
|
body["jar_dependencies"] = [v for v in self.jar_dependencies]
|
|
3156
|
+
if self.java_dependencies:
|
|
3157
|
+
body["java_dependencies"] = [v for v in self.java_dependencies]
|
|
3153
3158
|
return body
|
|
3154
3159
|
|
|
3155
3160
|
def as_shallow_dict(self) -> dict:
|
|
@@ -3163,6 +3168,8 @@ class Environment:
|
|
|
3163
3168
|
body["environment_version"] = self.environment_version
|
|
3164
3169
|
if self.jar_dependencies:
|
|
3165
3170
|
body["jar_dependencies"] = self.jar_dependencies
|
|
3171
|
+
if self.java_dependencies:
|
|
3172
|
+
body["java_dependencies"] = self.java_dependencies
|
|
3166
3173
|
return body
|
|
3167
3174
|
|
|
3168
3175
|
@classmethod
|
|
@@ -3173,6 +3180,7 @@ class Environment:
|
|
|
3173
3180
|
dependencies=d.get("dependencies", None),
|
|
3174
3181
|
environment_version=d.get("environment_version", None),
|
|
3175
3182
|
jar_dependencies=d.get("jar_dependencies", None),
|
|
3183
|
+
java_dependencies=d.get("java_dependencies", None),
|
|
3176
3184
|
)
|
|
3177
3185
|
|
|
3178
3186
|
|
|
@@ -7151,6 +7159,8 @@ class TerminationReasonCode(Enum):
|
|
|
7151
7159
|
NETWORK_CHECK_STORAGE_FAILURE = "NETWORK_CHECK_STORAGE_FAILURE"
|
|
7152
7160
|
NETWORK_CONFIGURATION_FAILURE = "NETWORK_CONFIGURATION_FAILURE"
|
|
7153
7161
|
NFS_MOUNT_FAILURE = "NFS_MOUNT_FAILURE"
|
|
7162
|
+
NO_ACTIVATED_K8S = "NO_ACTIVATED_K8S"
|
|
7163
|
+
NO_ACTIVATED_K8S_TESTING_TAG = "NO_ACTIVATED_K8S_TESTING_TAG"
|
|
7154
7164
|
NO_MATCHED_K8S = "NO_MATCHED_K8S"
|
|
7155
7165
|
NO_MATCHED_K8S_TESTING_TAG = "NO_MATCHED_K8S_TESTING_TAG"
|
|
7156
7166
|
NPIP_TUNNEL_SETUP_FAILURE = "NPIP_TUNNEL_SETUP_FAILURE"
|
|
@@ -7189,6 +7199,7 @@ class TerminationReasonCode(Enum):
|
|
|
7189
7199
|
UNKNOWN = "UNKNOWN"
|
|
7190
7200
|
UNSUPPORTED_INSTANCE_TYPE = "UNSUPPORTED_INSTANCE_TYPE"
|
|
7191
7201
|
UPDATE_INSTANCE_PROFILE_FAILURE = "UPDATE_INSTANCE_PROFILE_FAILURE"
|
|
7202
|
+
USAGE_POLICY_ENTITLEMENT_DENIED = "USAGE_POLICY_ENTITLEMENT_DENIED"
|
|
7192
7203
|
USER_INITIATED_VM_TERMINATION = "USER_INITIATED_VM_TERMINATION"
|
|
7193
7204
|
USER_REQUEST = "USER_REQUEST"
|
|
7194
7205
|
WORKER_SETUP_FAILURE = "WORKER_SETUP_FAILURE"
|