databricks-sdk 0.29.0__py3-none-any.whl → 0.31.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 -21
- databricks/sdk/config.py +61 -75
- databricks/sdk/core.py +16 -9
- databricks/sdk/credentials_provider.py +15 -15
- databricks/sdk/data_plane.py +65 -0
- databricks/sdk/errors/overrides.py +8 -0
- databricks/sdk/errors/platform.py +5 -0
- databricks/sdk/mixins/files.py +12 -4
- databricks/sdk/service/apps.py +977 -0
- databricks/sdk/service/billing.py +602 -218
- databricks/sdk/service/catalog.py +324 -34
- databricks/sdk/service/compute.py +766 -81
- databricks/sdk/service/dashboards.py +628 -18
- databricks/sdk/service/iam.py +99 -88
- databricks/sdk/service/jobs.py +332 -23
- databricks/sdk/service/marketplace.py +2 -122
- databricks/sdk/service/oauth2.py +127 -70
- databricks/sdk/service/pipelines.py +72 -52
- databricks/sdk/service/serving.py +303 -750
- databricks/sdk/service/settings.py +423 -4
- databricks/sdk/service/sharing.py +235 -25
- databricks/sdk/service/sql.py +2328 -544
- databricks/sdk/useragent.py +151 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.29.0.dist-info → databricks_sdk-0.31.0.dist-info}/METADATA +36 -16
- {databricks_sdk-0.29.0.dist-info → databricks_sdk-0.31.0.dist-info}/RECORD +30 -27
- {databricks_sdk-0.29.0.dist-info → databricks_sdk-0.31.0.dist-info}/WHEEL +1 -1
- {databricks_sdk-0.29.0.dist-info → databricks_sdk-0.31.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.29.0.dist-info → databricks_sdk-0.31.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.29.0.dist-info → databricks_sdk-0.31.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/oauth2.py
CHANGED
|
@@ -15,14 +15,14 @@ _LOG = logging.getLogger('databricks.sdk')
|
|
|
15
15
|
|
|
16
16
|
@dataclass
|
|
17
17
|
class CreateCustomAppIntegration:
|
|
18
|
-
|
|
19
|
-
"""
|
|
18
|
+
confidential: Optional[bool] = None
|
|
19
|
+
"""This field indicates whether an OAuth client secret is required to authenticate this client."""
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
"""
|
|
21
|
+
name: Optional[str] = None
|
|
22
|
+
"""Name of the custom OAuth app"""
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
"""
|
|
24
|
+
redirect_urls: Optional[List[str]] = None
|
|
25
|
+
"""List of OAuth redirect urls"""
|
|
26
26
|
|
|
27
27
|
scopes: Optional[List[str]] = None
|
|
28
28
|
"""OAuth scopes granted to the application. Supported scopes: all-apis, sql, offline_access,
|
|
@@ -54,14 +54,14 @@ class CreateCustomAppIntegration:
|
|
|
54
54
|
@dataclass
|
|
55
55
|
class CreateCustomAppIntegrationOutput:
|
|
56
56
|
client_id: Optional[str] = None
|
|
57
|
-
"""
|
|
57
|
+
"""OAuth client-id generated by the Databricks"""
|
|
58
58
|
|
|
59
59
|
client_secret: Optional[str] = None
|
|
60
|
-
"""
|
|
60
|
+
"""OAuth client-secret generated by the Databricks. If this is a confidential OAuth app
|
|
61
61
|
client-secret will be generated."""
|
|
62
62
|
|
|
63
63
|
integration_id: Optional[str] = None
|
|
64
|
-
"""
|
|
64
|
+
"""Unique integration id for the custom OAuth app"""
|
|
65
65
|
|
|
66
66
|
def as_dict(self) -> dict:
|
|
67
67
|
"""Serializes the CreateCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
@@ -82,7 +82,7 @@ class CreateCustomAppIntegrationOutput:
|
|
|
82
82
|
@dataclass
|
|
83
83
|
class CreatePublishedAppIntegration:
|
|
84
84
|
app_id: Optional[str] = None
|
|
85
|
-
"""
|
|
85
|
+
"""App id of the OAuth published app integration. For example power-bi, tableau-deskop"""
|
|
86
86
|
|
|
87
87
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
88
88
|
"""Token access policy"""
|
|
@@ -104,7 +104,7 @@ class CreatePublishedAppIntegration:
|
|
|
104
104
|
@dataclass
|
|
105
105
|
class CreatePublishedAppIntegrationOutput:
|
|
106
106
|
integration_id: Optional[str] = None
|
|
107
|
-
"""
|
|
107
|
+
"""Unique integration id for the published OAuth app"""
|
|
108
108
|
|
|
109
109
|
def as_dict(self) -> dict:
|
|
110
110
|
"""Serializes the CreatePublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
@@ -227,19 +227,27 @@ class DeleteResponse:
|
|
|
227
227
|
@dataclass
|
|
228
228
|
class GetCustomAppIntegrationOutput:
|
|
229
229
|
client_id: Optional[str] = None
|
|
230
|
-
"""
|
|
230
|
+
"""The client id of the custom OAuth app"""
|
|
231
231
|
|
|
232
232
|
confidential: Optional[bool] = None
|
|
233
|
-
"""indicates
|
|
233
|
+
"""This field indicates whether an OAuth client secret is required to authenticate this client."""
|
|
234
|
+
|
|
235
|
+
create_time: Optional[str] = None
|
|
236
|
+
|
|
237
|
+
created_by: Optional[int] = None
|
|
238
|
+
|
|
239
|
+
creator_username: Optional[str] = None
|
|
234
240
|
|
|
235
241
|
integration_id: Optional[str] = None
|
|
236
242
|
"""ID of this custom app"""
|
|
237
243
|
|
|
238
244
|
name: Optional[str] = None
|
|
239
|
-
"""name of the custom
|
|
245
|
+
"""The display name of the custom OAuth app"""
|
|
240
246
|
|
|
241
247
|
redirect_urls: Optional[List[str]] = None
|
|
242
|
-
"""List of
|
|
248
|
+
"""List of OAuth redirect urls"""
|
|
249
|
+
|
|
250
|
+
scopes: Optional[List[str]] = None
|
|
243
251
|
|
|
244
252
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
245
253
|
"""Token access policy"""
|
|
@@ -249,9 +257,13 @@ class GetCustomAppIntegrationOutput:
|
|
|
249
257
|
body = {}
|
|
250
258
|
if self.client_id is not None: body['client_id'] = self.client_id
|
|
251
259
|
if self.confidential is not None: body['confidential'] = self.confidential
|
|
260
|
+
if self.create_time is not None: body['create_time'] = self.create_time
|
|
261
|
+
if self.created_by is not None: body['created_by'] = self.created_by
|
|
262
|
+
if self.creator_username is not None: body['creator_username'] = self.creator_username
|
|
252
263
|
if self.integration_id is not None: body['integration_id'] = self.integration_id
|
|
253
264
|
if self.name is not None: body['name'] = self.name
|
|
254
265
|
if self.redirect_urls: body['redirect_urls'] = [v for v in self.redirect_urls]
|
|
266
|
+
if self.scopes: body['scopes'] = [v for v in self.scopes]
|
|
255
267
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy.as_dict()
|
|
256
268
|
return body
|
|
257
269
|
|
|
@@ -260,39 +272,51 @@ class GetCustomAppIntegrationOutput:
|
|
|
260
272
|
"""Deserializes the GetCustomAppIntegrationOutput from a dictionary."""
|
|
261
273
|
return cls(client_id=d.get('client_id', None),
|
|
262
274
|
confidential=d.get('confidential', None),
|
|
275
|
+
create_time=d.get('create_time', None),
|
|
276
|
+
created_by=d.get('created_by', None),
|
|
277
|
+
creator_username=d.get('creator_username', None),
|
|
263
278
|
integration_id=d.get('integration_id', None),
|
|
264
279
|
name=d.get('name', None),
|
|
265
280
|
redirect_urls=d.get('redirect_urls', None),
|
|
281
|
+
scopes=d.get('scopes', None),
|
|
266
282
|
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy))
|
|
267
283
|
|
|
268
284
|
|
|
269
285
|
@dataclass
|
|
270
286
|
class GetCustomAppIntegrationsOutput:
|
|
271
287
|
apps: Optional[List[GetCustomAppIntegrationOutput]] = None
|
|
272
|
-
"""
|
|
288
|
+
"""List of Custom OAuth App Integrations defined for the account."""
|
|
289
|
+
|
|
290
|
+
next_page_token: Optional[str] = None
|
|
273
291
|
|
|
274
292
|
def as_dict(self) -> dict:
|
|
275
293
|
"""Serializes the GetCustomAppIntegrationsOutput into a dictionary suitable for use as a JSON request body."""
|
|
276
294
|
body = {}
|
|
277
295
|
if self.apps: body['apps'] = [v.as_dict() for v in self.apps]
|
|
296
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
278
297
|
return body
|
|
279
298
|
|
|
280
299
|
@classmethod
|
|
281
300
|
def from_dict(cls, d: Dict[str, any]) -> GetCustomAppIntegrationsOutput:
|
|
282
301
|
"""Deserializes the GetCustomAppIntegrationsOutput from a dictionary."""
|
|
283
|
-
return cls(apps=_repeated_dict(d, 'apps', GetCustomAppIntegrationOutput)
|
|
302
|
+
return cls(apps=_repeated_dict(d, 'apps', GetCustomAppIntegrationOutput),
|
|
303
|
+
next_page_token=d.get('next_page_token', None))
|
|
284
304
|
|
|
285
305
|
|
|
286
306
|
@dataclass
|
|
287
307
|
class GetPublishedAppIntegrationOutput:
|
|
288
308
|
app_id: Optional[str] = None
|
|
289
|
-
"""
|
|
309
|
+
"""App-id of the published app integration"""
|
|
310
|
+
|
|
311
|
+
create_time: Optional[str] = None
|
|
312
|
+
|
|
313
|
+
created_by: Optional[int] = None
|
|
290
314
|
|
|
291
315
|
integration_id: Optional[str] = None
|
|
292
|
-
"""
|
|
316
|
+
"""Unique integration id for the published OAuth app"""
|
|
293
317
|
|
|
294
318
|
name: Optional[str] = None
|
|
295
|
-
"""name of the published
|
|
319
|
+
"""Display name of the published OAuth app"""
|
|
296
320
|
|
|
297
321
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
298
322
|
"""Token access policy"""
|
|
@@ -301,6 +325,8 @@ class GetPublishedAppIntegrationOutput:
|
|
|
301
325
|
"""Serializes the GetPublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
302
326
|
body = {}
|
|
303
327
|
if self.app_id is not None: body['app_id'] = self.app_id
|
|
328
|
+
if self.create_time is not None: body['create_time'] = self.create_time
|
|
329
|
+
if self.created_by is not None: body['created_by'] = self.created_by
|
|
304
330
|
if self.integration_id is not None: body['integration_id'] = self.integration_id
|
|
305
331
|
if self.name is not None: body['name'] = self.name
|
|
306
332
|
if self.token_access_policy: body['token_access_policy'] = self.token_access_policy.as_dict()
|
|
@@ -310,6 +336,8 @@ class GetPublishedAppIntegrationOutput:
|
|
|
310
336
|
def from_dict(cls, d: Dict[str, any]) -> GetPublishedAppIntegrationOutput:
|
|
311
337
|
"""Deserializes the GetPublishedAppIntegrationOutput from a dictionary."""
|
|
312
338
|
return cls(app_id=d.get('app_id', None),
|
|
339
|
+
create_time=d.get('create_time', None),
|
|
340
|
+
created_by=d.get('created_by', None),
|
|
313
341
|
integration_id=d.get('integration_id', None),
|
|
314
342
|
name=d.get('name', None),
|
|
315
343
|
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy))
|
|
@@ -318,24 +346,28 @@ class GetPublishedAppIntegrationOutput:
|
|
|
318
346
|
@dataclass
|
|
319
347
|
class GetPublishedAppIntegrationsOutput:
|
|
320
348
|
apps: Optional[List[GetPublishedAppIntegrationOutput]] = None
|
|
321
|
-
"""
|
|
349
|
+
"""List of Published OAuth App Integrations defined for the account."""
|
|
350
|
+
|
|
351
|
+
next_page_token: Optional[str] = None
|
|
322
352
|
|
|
323
353
|
def as_dict(self) -> dict:
|
|
324
354
|
"""Serializes the GetPublishedAppIntegrationsOutput into a dictionary suitable for use as a JSON request body."""
|
|
325
355
|
body = {}
|
|
326
356
|
if self.apps: body['apps'] = [v.as_dict() for v in self.apps]
|
|
357
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
327
358
|
return body
|
|
328
359
|
|
|
329
360
|
@classmethod
|
|
330
361
|
def from_dict(cls, d: Dict[str, any]) -> GetPublishedAppIntegrationsOutput:
|
|
331
362
|
"""Deserializes the GetPublishedAppIntegrationsOutput from a dictionary."""
|
|
332
|
-
return cls(apps=_repeated_dict(d, 'apps', GetPublishedAppIntegrationOutput)
|
|
363
|
+
return cls(apps=_repeated_dict(d, 'apps', GetPublishedAppIntegrationOutput),
|
|
364
|
+
next_page_token=d.get('next_page_token', None))
|
|
333
365
|
|
|
334
366
|
|
|
335
367
|
@dataclass
|
|
336
368
|
class GetPublishedAppsOutput:
|
|
337
369
|
apps: Optional[List[PublishedAppOutput]] = None
|
|
338
|
-
"""
|
|
370
|
+
"""List of Published OAuth Apps."""
|
|
339
371
|
|
|
340
372
|
next_page_token: Optional[str] = None
|
|
341
373
|
"""A token that can be used to get the next page of results. If not present, there are no more
|
|
@@ -388,7 +420,7 @@ class PublishedAppOutput:
|
|
|
388
420
|
apps."""
|
|
389
421
|
|
|
390
422
|
name: Optional[str] = None
|
|
391
|
-
"""
|
|
423
|
+
"""The display name of the published OAuth app."""
|
|
392
424
|
|
|
393
425
|
redirect_urls: Optional[List[str]] = None
|
|
394
426
|
"""Redirect URLs of the published OAuth app."""
|
|
@@ -485,13 +517,12 @@ class TokenAccessPolicy:
|
|
|
485
517
|
@dataclass
|
|
486
518
|
class UpdateCustomAppIntegration:
|
|
487
519
|
integration_id: Optional[str] = None
|
|
488
|
-
"""The oauth app integration ID."""
|
|
489
520
|
|
|
490
521
|
redirect_urls: Optional[List[str]] = None
|
|
491
|
-
"""List of
|
|
522
|
+
"""List of OAuth redirect urls to be updated in the custom OAuth app integration"""
|
|
492
523
|
|
|
493
524
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
494
|
-
"""Token access policy to be updated in the custom
|
|
525
|
+
"""Token access policy to be updated in the custom OAuth app integration"""
|
|
495
526
|
|
|
496
527
|
def as_dict(self) -> dict:
|
|
497
528
|
"""Serializes the UpdateCustomAppIntegration into a dictionary suitable for use as a JSON request body."""
|
|
@@ -526,10 +557,9 @@ class UpdateCustomAppIntegrationOutput:
|
|
|
526
557
|
@dataclass
|
|
527
558
|
class UpdatePublishedAppIntegration:
|
|
528
559
|
integration_id: Optional[str] = None
|
|
529
|
-
"""The oauth app integration ID."""
|
|
530
560
|
|
|
531
561
|
token_access_policy: Optional[TokenAccessPolicy] = None
|
|
532
|
-
"""Token access policy to be updated in the published
|
|
562
|
+
"""Token access policy to be updated in the published OAuth app integration"""
|
|
533
563
|
|
|
534
564
|
def as_dict(self) -> dict:
|
|
535
565
|
"""Serializes the UpdatePublishedAppIntegration into a dictionary suitable for use as a JSON request body."""
|
|
@@ -560,31 +590,31 @@ class UpdatePublishedAppIntegrationOutput:
|
|
|
560
590
|
|
|
561
591
|
|
|
562
592
|
class CustomAppIntegrationAPI:
|
|
563
|
-
"""These APIs enable administrators to manage custom
|
|
593
|
+
"""These APIs enable administrators to manage custom OAuth app integrations, which is required for
|
|
564
594
|
adding/using Custom OAuth App Integration like Tableau Cloud for Databricks in AWS cloud."""
|
|
565
595
|
|
|
566
596
|
def __init__(self, api_client):
|
|
567
597
|
self._api = api_client
|
|
568
598
|
|
|
569
599
|
def create(self,
|
|
570
|
-
name: str,
|
|
571
|
-
redirect_urls: List[str],
|
|
572
600
|
*,
|
|
573
601
|
confidential: Optional[bool] = None,
|
|
602
|
+
name: Optional[str] = None,
|
|
603
|
+
redirect_urls: Optional[List[str]] = None,
|
|
574
604
|
scopes: Optional[List[str]] = None,
|
|
575
605
|
token_access_policy: Optional[TokenAccessPolicy] = None) -> CreateCustomAppIntegrationOutput:
|
|
576
606
|
"""Create Custom OAuth App Integration.
|
|
577
607
|
|
|
578
608
|
Create Custom OAuth App Integration.
|
|
579
609
|
|
|
580
|
-
You can retrieve the custom
|
|
610
|
+
You can retrieve the custom OAuth app integration via :method:CustomAppIntegration/get.
|
|
581
611
|
|
|
582
|
-
:param name: str
|
|
583
|
-
name of the custom oauth app
|
|
584
|
-
:param redirect_urls: List[str]
|
|
585
|
-
List of oauth redirect urls
|
|
586
612
|
:param confidential: bool (optional)
|
|
587
|
-
indicates
|
|
613
|
+
This field indicates whether an OAuth client secret is required to authenticate this client.
|
|
614
|
+
:param name: str (optional)
|
|
615
|
+
Name of the custom OAuth app
|
|
616
|
+
:param redirect_urls: List[str] (optional)
|
|
617
|
+
List of OAuth redirect urls
|
|
588
618
|
:param scopes: List[str] (optional)
|
|
589
619
|
OAuth scopes granted to the application. Supported scopes: all-apis, sql, offline_access, openid,
|
|
590
620
|
profile, email.
|
|
@@ -610,11 +640,10 @@ class CustomAppIntegrationAPI:
|
|
|
610
640
|
def delete(self, integration_id: str):
|
|
611
641
|
"""Delete Custom OAuth App Integration.
|
|
612
642
|
|
|
613
|
-
Delete an existing Custom OAuth App Integration. You can retrieve the custom
|
|
643
|
+
Delete an existing Custom OAuth App Integration. You can retrieve the custom OAuth app integration via
|
|
614
644
|
:method:CustomAppIntegration/get.
|
|
615
645
|
|
|
616
646
|
:param integration_id: str
|
|
617
|
-
The oauth app integration ID.
|
|
618
647
|
|
|
619
648
|
|
|
620
649
|
"""
|
|
@@ -632,7 +661,6 @@ class CustomAppIntegrationAPI:
|
|
|
632
661
|
Gets the Custom OAuth App Integration for the given integration id.
|
|
633
662
|
|
|
634
663
|
:param integration_id: str
|
|
635
|
-
The oauth app integration ID.
|
|
636
664
|
|
|
637
665
|
:returns: :class:`GetCustomAppIntegrationOutput`
|
|
638
666
|
"""
|
|
@@ -645,21 +673,39 @@ class CustomAppIntegrationAPI:
|
|
|
645
673
|
headers=headers)
|
|
646
674
|
return GetCustomAppIntegrationOutput.from_dict(res)
|
|
647
675
|
|
|
648
|
-
def list(self
|
|
676
|
+
def list(self,
|
|
677
|
+
*,
|
|
678
|
+
include_creator_username: Optional[bool] = None,
|
|
679
|
+
page_size: Optional[int] = None,
|
|
680
|
+
page_token: Optional[str] = None) -> Iterator[GetCustomAppIntegrationOutput]:
|
|
649
681
|
"""Get custom oauth app integrations.
|
|
650
682
|
|
|
651
|
-
Get the list of custom
|
|
683
|
+
Get the list of custom OAuth app integrations for the specified Databricks account
|
|
684
|
+
|
|
685
|
+
:param include_creator_username: bool (optional)
|
|
686
|
+
:param page_size: int (optional)
|
|
687
|
+
:param page_token: str (optional)
|
|
652
688
|
|
|
653
689
|
:returns: Iterator over :class:`GetCustomAppIntegrationOutput`
|
|
654
690
|
"""
|
|
655
691
|
|
|
692
|
+
query = {}
|
|
693
|
+
if include_creator_username is not None: query['include_creator_username'] = include_creator_username
|
|
694
|
+
if page_size is not None: query['page_size'] = page_size
|
|
695
|
+
if page_token is not None: query['page_token'] = page_token
|
|
656
696
|
headers = {'Accept': 'application/json', }
|
|
657
697
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
698
|
+
while True:
|
|
699
|
+
json = self._api.do('GET',
|
|
700
|
+
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations',
|
|
701
|
+
query=query,
|
|
702
|
+
headers=headers)
|
|
703
|
+
if 'apps' in json:
|
|
704
|
+
for v in json['apps']:
|
|
705
|
+
yield GetCustomAppIntegrationOutput.from_dict(v)
|
|
706
|
+
if 'next_page_token' not in json or not json['next_page_token']:
|
|
707
|
+
return
|
|
708
|
+
query['page_token'] = json['next_page_token']
|
|
663
709
|
|
|
664
710
|
def update(self,
|
|
665
711
|
integration_id: str,
|
|
@@ -668,15 +714,14 @@ class CustomAppIntegrationAPI:
|
|
|
668
714
|
token_access_policy: Optional[TokenAccessPolicy] = None):
|
|
669
715
|
"""Updates Custom OAuth App Integration.
|
|
670
716
|
|
|
671
|
-
Updates an existing custom OAuth App Integration. You can retrieve the custom
|
|
717
|
+
Updates an existing custom OAuth App Integration. You can retrieve the custom OAuth app integration
|
|
672
718
|
via :method:CustomAppIntegration/get.
|
|
673
719
|
|
|
674
720
|
:param integration_id: str
|
|
675
|
-
The oauth app integration ID.
|
|
676
721
|
:param redirect_urls: List[str] (optional)
|
|
677
|
-
List of
|
|
722
|
+
List of OAuth redirect urls to be updated in the custom OAuth app integration
|
|
678
723
|
:param token_access_policy: :class:`TokenAccessPolicy` (optional)
|
|
679
|
-
Token access policy to be updated in the custom
|
|
724
|
+
Token access policy to be updated in the custom OAuth app integration
|
|
680
725
|
|
|
681
726
|
|
|
682
727
|
"""
|
|
@@ -709,7 +754,7 @@ class OAuthPublishedAppsAPI:
|
|
|
709
754
|
Get all the available published OAuth apps in Databricks.
|
|
710
755
|
|
|
711
756
|
:param page_size: int (optional)
|
|
712
|
-
The max number of OAuth published apps to return.
|
|
757
|
+
The max number of OAuth published apps to return in one page.
|
|
713
758
|
:param page_token: str (optional)
|
|
714
759
|
A token that can be used to get the next page of results.
|
|
715
760
|
|
|
@@ -723,7 +768,7 @@ class OAuthPublishedAppsAPI:
|
|
|
723
768
|
|
|
724
769
|
while True:
|
|
725
770
|
json = self._api.do('GET',
|
|
726
|
-
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-apps
|
|
771
|
+
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-apps',
|
|
727
772
|
query=query,
|
|
728
773
|
headers=headers)
|
|
729
774
|
if 'apps' in json:
|
|
@@ -735,7 +780,7 @@ class OAuthPublishedAppsAPI:
|
|
|
735
780
|
|
|
736
781
|
|
|
737
782
|
class PublishedAppIntegrationAPI:
|
|
738
|
-
"""These APIs enable administrators to manage published
|
|
783
|
+
"""These APIs enable administrators to manage published OAuth app integrations, which is required for
|
|
739
784
|
adding/using Published OAuth App Integration like Tableau Desktop for Databricks in AWS cloud."""
|
|
740
785
|
|
|
741
786
|
def __init__(self, api_client):
|
|
@@ -750,10 +795,10 @@ class PublishedAppIntegrationAPI:
|
|
|
750
795
|
|
|
751
796
|
Create Published OAuth App Integration.
|
|
752
797
|
|
|
753
|
-
You can retrieve the published
|
|
798
|
+
You can retrieve the published OAuth app integration via :method:PublishedAppIntegration/get.
|
|
754
799
|
|
|
755
800
|
:param app_id: str (optional)
|
|
756
|
-
|
|
801
|
+
App id of the OAuth published app integration. For example power-bi, tableau-deskop
|
|
757
802
|
:param token_access_policy: :class:`TokenAccessPolicy` (optional)
|
|
758
803
|
Token access policy
|
|
759
804
|
|
|
@@ -773,11 +818,10 @@ class PublishedAppIntegrationAPI:
|
|
|
773
818
|
def delete(self, integration_id: str):
|
|
774
819
|
"""Delete Published OAuth App Integration.
|
|
775
820
|
|
|
776
|
-
Delete an existing Published OAuth App Integration. You can retrieve the published
|
|
821
|
+
Delete an existing Published OAuth App Integration. You can retrieve the published OAuth app
|
|
777
822
|
integration via :method:PublishedAppIntegration/get.
|
|
778
823
|
|
|
779
824
|
:param integration_id: str
|
|
780
|
-
The oauth app integration ID.
|
|
781
825
|
|
|
782
826
|
|
|
783
827
|
"""
|
|
@@ -795,7 +839,6 @@ class PublishedAppIntegrationAPI:
|
|
|
795
839
|
Gets the Published OAuth App Integration for the given integration id.
|
|
796
840
|
|
|
797
841
|
:param integration_id: str
|
|
798
|
-
The oauth app integration ID.
|
|
799
842
|
|
|
800
843
|
:returns: :class:`GetPublishedAppIntegrationOutput`
|
|
801
844
|
"""
|
|
@@ -808,32 +851,46 @@ class PublishedAppIntegrationAPI:
|
|
|
808
851
|
headers=headers)
|
|
809
852
|
return GetPublishedAppIntegrationOutput.from_dict(res)
|
|
810
853
|
|
|
811
|
-
def list(self
|
|
854
|
+
def list(self,
|
|
855
|
+
*,
|
|
856
|
+
page_size: Optional[int] = None,
|
|
857
|
+
page_token: Optional[str] = None) -> Iterator[GetPublishedAppIntegrationOutput]:
|
|
812
858
|
"""Get published oauth app integrations.
|
|
813
859
|
|
|
814
|
-
Get the list of published
|
|
860
|
+
Get the list of published OAuth app integrations for the specified Databricks account
|
|
861
|
+
|
|
862
|
+
:param page_size: int (optional)
|
|
863
|
+
:param page_token: str (optional)
|
|
815
864
|
|
|
816
865
|
:returns: Iterator over :class:`GetPublishedAppIntegrationOutput`
|
|
817
866
|
"""
|
|
818
867
|
|
|
868
|
+
query = {}
|
|
869
|
+
if page_size is not None: query['page_size'] = page_size
|
|
870
|
+
if page_token is not None: query['page_token'] = page_token
|
|
819
871
|
headers = {'Accept': 'application/json', }
|
|
820
872
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
873
|
+
while True:
|
|
874
|
+
json = self._api.do('GET',
|
|
875
|
+
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations',
|
|
876
|
+
query=query,
|
|
877
|
+
headers=headers)
|
|
878
|
+
if 'apps' in json:
|
|
879
|
+
for v in json['apps']:
|
|
880
|
+
yield GetPublishedAppIntegrationOutput.from_dict(v)
|
|
881
|
+
if 'next_page_token' not in json or not json['next_page_token']:
|
|
882
|
+
return
|
|
883
|
+
query['page_token'] = json['next_page_token']
|
|
826
884
|
|
|
827
885
|
def update(self, integration_id: str, *, token_access_policy: Optional[TokenAccessPolicy] = None):
|
|
828
886
|
"""Updates Published OAuth App Integration.
|
|
829
887
|
|
|
830
|
-
Updates an existing published OAuth App Integration. You can retrieve the published
|
|
888
|
+
Updates an existing published OAuth App Integration. You can retrieve the published OAuth app
|
|
831
889
|
integration via :method:PublishedAppIntegration/get.
|
|
832
890
|
|
|
833
891
|
:param integration_id: str
|
|
834
|
-
The oauth app integration ID.
|
|
835
892
|
:param token_access_policy: :class:`TokenAccessPolicy` (optional)
|
|
836
|
-
Token access policy to be updated in the published
|
|
893
|
+
Token access policy to be updated in the published OAuth app integration
|
|
837
894
|
|
|
838
895
|
|
|
839
896
|
"""
|