databricks-sdk 0.28.0__py3-none-any.whl → 0.30.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 +74 -22
  2. databricks/sdk/config.py +89 -48
  3. databricks/sdk/core.py +38 -9
  4. databricks/sdk/credentials_provider.py +134 -57
  5. databricks/sdk/data_plane.py +65 -0
  6. databricks/sdk/dbutils.py +81 -3
  7. databricks/sdk/mixins/files.py +12 -4
  8. databricks/sdk/oauth.py +8 -6
  9. databricks/sdk/service/apps.py +977 -0
  10. databricks/sdk/service/billing.py +602 -218
  11. databricks/sdk/service/catalog.py +263 -62
  12. databricks/sdk/service/compute.py +515 -94
  13. databricks/sdk/service/dashboards.py +1310 -2
  14. databricks/sdk/service/iam.py +99 -88
  15. databricks/sdk/service/jobs.py +159 -166
  16. databricks/sdk/service/marketplace.py +74 -58
  17. databricks/sdk/service/oauth2.py +149 -70
  18. databricks/sdk/service/pipelines.py +73 -53
  19. databricks/sdk/service/serving.py +332 -694
  20. databricks/sdk/service/settings.py +424 -4
  21. databricks/sdk/service/sharing.py +235 -26
  22. databricks/sdk/service/sql.py +2484 -553
  23. databricks/sdk/service/vectorsearch.py +75 -0
  24. databricks/sdk/useragent.py +144 -0
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/METADATA +37 -16
  27. {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/RECORD +31 -28
  28. {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/WHEEL +1 -1
  29. {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/LICENSE +0 -0
  30. {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/NOTICE +0 -0
  31. {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.30.0.dist-info}/top_level.txt +0 -0
@@ -15,14 +15,14 @@ _LOG = logging.getLogger('databricks.sdk')
15
15
 
16
16
  @dataclass
17
17
  class CreateCustomAppIntegration:
18
- name: str
19
- """name of the custom oauth app"""
18
+ confidential: Optional[bool] = None
19
+ """This field indicates whether an OAuth client secret is required to authenticate this client."""
20
20
 
21
- redirect_urls: List[str]
22
- """List of oauth redirect urls"""
21
+ name: Optional[str] = None
22
+ """Name of the custom OAuth app"""
23
23
 
24
- confidential: Optional[bool] = None
25
- """indicates if an oauth client-secret should be generated"""
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
- """oauth client-id generated by the Databricks"""
57
+ """OAuth client-id generated by the Databricks"""
58
58
 
59
59
  client_secret: Optional[str] = None
60
- """oauth client-secret generated by the Databricks if this is a confidential oauth app
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
- """unique integration id for the custom oauth app"""
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
- """app_id of the oauth published app integration. For example power-bi, tableau-deskop"""
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
- """unique integration id for the published oauth app"""
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."""
@@ -160,6 +160,28 @@ class CreateServicePrincipalSecretResponse:
160
160
  update_time=d.get('update_time', None))
161
161
 
162
162
 
163
+ @dataclass
164
+ class DataPlaneInfo:
165
+ authorization_details: Optional[str] = None
166
+ """Authorization details as a string."""
167
+
168
+ endpoint_url: Optional[str] = None
169
+ """The URL of the endpoint for this operation in the dataplane."""
170
+
171
+ def as_dict(self) -> dict:
172
+ """Serializes the DataPlaneInfo into a dictionary suitable for use as a JSON request body."""
173
+ body = {}
174
+ if self.authorization_details is not None: body['authorization_details'] = self.authorization_details
175
+ if self.endpoint_url is not None: body['endpoint_url'] = self.endpoint_url
176
+ return body
177
+
178
+ @classmethod
179
+ def from_dict(cls, d: Dict[str, any]) -> DataPlaneInfo:
180
+ """Deserializes the DataPlaneInfo from a dictionary."""
181
+ return cls(authorization_details=d.get('authorization_details', None),
182
+ endpoint_url=d.get('endpoint_url', None))
183
+
184
+
163
185
  @dataclass
164
186
  class DeleteCustomAppIntegrationOutput:
165
187
 
@@ -205,19 +227,27 @@ class DeleteResponse:
205
227
  @dataclass
206
228
  class GetCustomAppIntegrationOutput:
207
229
  client_id: Optional[str] = None
208
- """oauth client id of the custom oauth app"""
230
+ """The client id of the custom OAuth app"""
209
231
 
210
232
  confidential: Optional[bool] = None
211
- """indicates if an oauth client-secret should be generated"""
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
212
240
 
213
241
  integration_id: Optional[str] = None
214
242
  """ID of this custom app"""
215
243
 
216
244
  name: Optional[str] = None
217
- """name of the custom oauth app"""
245
+ """The display name of the custom OAuth app"""
218
246
 
219
247
  redirect_urls: Optional[List[str]] = None
220
- """List of oauth redirect urls"""
248
+ """List of OAuth redirect urls"""
249
+
250
+ scopes: Optional[List[str]] = None
221
251
 
222
252
  token_access_policy: Optional[TokenAccessPolicy] = None
223
253
  """Token access policy"""
@@ -227,9 +257,13 @@ class GetCustomAppIntegrationOutput:
227
257
  body = {}
228
258
  if self.client_id is not None: body['client_id'] = self.client_id
229
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
230
263
  if self.integration_id is not None: body['integration_id'] = self.integration_id
231
264
  if self.name is not None: body['name'] = self.name
232
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]
233
267
  if self.token_access_policy: body['token_access_policy'] = self.token_access_policy.as_dict()
234
268
  return body
235
269
 
@@ -238,39 +272,51 @@ class GetCustomAppIntegrationOutput:
238
272
  """Deserializes the GetCustomAppIntegrationOutput from a dictionary."""
239
273
  return cls(client_id=d.get('client_id', None),
240
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),
241
278
  integration_id=d.get('integration_id', None),
242
279
  name=d.get('name', None),
243
280
  redirect_urls=d.get('redirect_urls', None),
281
+ scopes=d.get('scopes', None),
244
282
  token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy))
245
283
 
246
284
 
247
285
  @dataclass
248
286
  class GetCustomAppIntegrationsOutput:
249
287
  apps: Optional[List[GetCustomAppIntegrationOutput]] = None
250
- """Array of Custom OAuth App Integrations defined for the account."""
288
+ """List of Custom OAuth App Integrations defined for the account."""
289
+
290
+ next_page_token: Optional[str] = None
251
291
 
252
292
  def as_dict(self) -> dict:
253
293
  """Serializes the GetCustomAppIntegrationsOutput into a dictionary suitable for use as a JSON request body."""
254
294
  body = {}
255
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
256
297
  return body
257
298
 
258
299
  @classmethod
259
300
  def from_dict(cls, d: Dict[str, any]) -> GetCustomAppIntegrationsOutput:
260
301
  """Deserializes the GetCustomAppIntegrationsOutput from a dictionary."""
261
- 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))
262
304
 
263
305
 
264
306
  @dataclass
265
307
  class GetPublishedAppIntegrationOutput:
266
308
  app_id: Optional[str] = None
267
- """app-id of the published app integration"""
309
+ """App-id of the published app integration"""
310
+
311
+ create_time: Optional[str] = None
312
+
313
+ created_by: Optional[int] = None
268
314
 
269
315
  integration_id: Optional[str] = None
270
- """unique integration id for the published oauth app"""
316
+ """Unique integration id for the published OAuth app"""
271
317
 
272
318
  name: Optional[str] = None
273
- """name of the published oauth app"""
319
+ """Display name of the published OAuth app"""
274
320
 
275
321
  token_access_policy: Optional[TokenAccessPolicy] = None
276
322
  """Token access policy"""
@@ -279,6 +325,8 @@ class GetPublishedAppIntegrationOutput:
279
325
  """Serializes the GetPublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
280
326
  body = {}
281
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
282
330
  if self.integration_id is not None: body['integration_id'] = self.integration_id
283
331
  if self.name is not None: body['name'] = self.name
284
332
  if self.token_access_policy: body['token_access_policy'] = self.token_access_policy.as_dict()
@@ -288,6 +336,8 @@ class GetPublishedAppIntegrationOutput:
288
336
  def from_dict(cls, d: Dict[str, any]) -> GetPublishedAppIntegrationOutput:
289
337
  """Deserializes the GetPublishedAppIntegrationOutput from a dictionary."""
290
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),
291
341
  integration_id=d.get('integration_id', None),
292
342
  name=d.get('name', None),
293
343
  token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy))
@@ -296,24 +346,28 @@ class GetPublishedAppIntegrationOutput:
296
346
  @dataclass
297
347
  class GetPublishedAppIntegrationsOutput:
298
348
  apps: Optional[List[GetPublishedAppIntegrationOutput]] = None
299
- """Array of Published OAuth App Integrations defined for the account."""
349
+ """List of Published OAuth App Integrations defined for the account."""
350
+
351
+ next_page_token: Optional[str] = None
300
352
 
301
353
  def as_dict(self) -> dict:
302
354
  """Serializes the GetPublishedAppIntegrationsOutput into a dictionary suitable for use as a JSON request body."""
303
355
  body = {}
304
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
305
358
  return body
306
359
 
307
360
  @classmethod
308
361
  def from_dict(cls, d: Dict[str, any]) -> GetPublishedAppIntegrationsOutput:
309
362
  """Deserializes the GetPublishedAppIntegrationsOutput from a dictionary."""
310
- 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))
311
365
 
312
366
 
313
367
  @dataclass
314
368
  class GetPublishedAppsOutput:
315
369
  apps: Optional[List[PublishedAppOutput]] = None
316
- """Array of Published OAuth Apps."""
370
+ """List of Published OAuth Apps."""
317
371
 
318
372
  next_page_token: Optional[str] = None
319
373
  """A token that can be used to get the next page of results. If not present, there are no more
@@ -366,7 +420,7 @@ class PublishedAppOutput:
366
420
  apps."""
367
421
 
368
422
  name: Optional[str] = None
369
- """Name of the published OAuth app."""
423
+ """The display name of the published OAuth app."""
370
424
 
371
425
  redirect_urls: Optional[List[str]] = None
372
426
  """Redirect URLs of the published OAuth app."""
@@ -463,13 +517,12 @@ class TokenAccessPolicy:
463
517
  @dataclass
464
518
  class UpdateCustomAppIntegration:
465
519
  integration_id: Optional[str] = None
466
- """The oauth app integration ID."""
467
520
 
468
521
  redirect_urls: Optional[List[str]] = None
469
- """List of oauth redirect urls to be updated in the custom oauth app integration"""
522
+ """List of OAuth redirect urls to be updated in the custom OAuth app integration"""
470
523
 
471
524
  token_access_policy: Optional[TokenAccessPolicy] = None
472
- """Token access policy to be updated in the custom oauth app integration"""
525
+ """Token access policy to be updated in the custom OAuth app integration"""
473
526
 
474
527
  def as_dict(self) -> dict:
475
528
  """Serializes the UpdateCustomAppIntegration into a dictionary suitable for use as a JSON request body."""
@@ -504,10 +557,9 @@ class UpdateCustomAppIntegrationOutput:
504
557
  @dataclass
505
558
  class UpdatePublishedAppIntegration:
506
559
  integration_id: Optional[str] = None
507
- """The oauth app integration ID."""
508
560
 
509
561
  token_access_policy: Optional[TokenAccessPolicy] = None
510
- """Token access policy to be updated in the published oauth app integration"""
562
+ """Token access policy to be updated in the published OAuth app integration"""
511
563
 
512
564
  def as_dict(self) -> dict:
513
565
  """Serializes the UpdatePublishedAppIntegration into a dictionary suitable for use as a JSON request body."""
@@ -538,31 +590,31 @@ class UpdatePublishedAppIntegrationOutput:
538
590
 
539
591
 
540
592
  class CustomAppIntegrationAPI:
541
- """These APIs enable administrators to manage custom oauth app integrations, which is required for
593
+ """These APIs enable administrators to manage custom OAuth app integrations, which is required for
542
594
  adding/using Custom OAuth App Integration like Tableau Cloud for Databricks in AWS cloud."""
543
595
 
544
596
  def __init__(self, api_client):
545
597
  self._api = api_client
546
598
 
547
599
  def create(self,
548
- name: str,
549
- redirect_urls: List[str],
550
600
  *,
551
601
  confidential: Optional[bool] = None,
602
+ name: Optional[str] = None,
603
+ redirect_urls: Optional[List[str]] = None,
552
604
  scopes: Optional[List[str]] = None,
553
605
  token_access_policy: Optional[TokenAccessPolicy] = None) -> CreateCustomAppIntegrationOutput:
554
606
  """Create Custom OAuth App Integration.
555
607
 
556
608
  Create Custom OAuth App Integration.
557
609
 
558
- You can retrieve the custom oauth app integration via :method:CustomAppIntegration/get.
610
+ You can retrieve the custom OAuth app integration via :method:CustomAppIntegration/get.
559
611
 
560
- :param name: str
561
- name of the custom oauth app
562
- :param redirect_urls: List[str]
563
- List of oauth redirect urls
564
612
  :param confidential: bool (optional)
565
- indicates if an oauth client-secret should be generated
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
566
618
  :param scopes: List[str] (optional)
567
619
  OAuth scopes granted to the application. Supported scopes: all-apis, sql, offline_access, openid,
568
620
  profile, email.
@@ -588,11 +640,10 @@ class CustomAppIntegrationAPI:
588
640
  def delete(self, integration_id: str):
589
641
  """Delete Custom OAuth App Integration.
590
642
 
591
- Delete an existing Custom OAuth App Integration. You can retrieve the custom oauth app integration via
643
+ Delete an existing Custom OAuth App Integration. You can retrieve the custom OAuth app integration via
592
644
  :method:CustomAppIntegration/get.
593
645
 
594
646
  :param integration_id: str
595
- The oauth app integration ID.
596
647
 
597
648
 
598
649
  """
@@ -610,7 +661,6 @@ class CustomAppIntegrationAPI:
610
661
  Gets the Custom OAuth App Integration for the given integration id.
611
662
 
612
663
  :param integration_id: str
613
- The oauth app integration ID.
614
664
 
615
665
  :returns: :class:`GetCustomAppIntegrationOutput`
616
666
  """
@@ -623,21 +673,39 @@ class CustomAppIntegrationAPI:
623
673
  headers=headers)
624
674
  return GetCustomAppIntegrationOutput.from_dict(res)
625
675
 
626
- def list(self) -> Iterator[GetCustomAppIntegrationOutput]:
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]:
627
681
  """Get custom oauth app integrations.
628
682
 
629
- Get the list of custom oauth app integrations for the specified Databricks account
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)
630
688
 
631
689
  :returns: Iterator over :class:`GetCustomAppIntegrationOutput`
632
690
  """
633
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
634
696
  headers = {'Accept': 'application/json', }
635
697
 
636
- json = self._api.do('GET',
637
- f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations',
638
- headers=headers)
639
- parsed = GetCustomAppIntegrationsOutput.from_dict(json).apps
640
- return parsed if parsed is not None else []
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']
641
709
 
642
710
  def update(self,
643
711
  integration_id: str,
@@ -646,15 +714,14 @@ class CustomAppIntegrationAPI:
646
714
  token_access_policy: Optional[TokenAccessPolicy] = None):
647
715
  """Updates Custom OAuth App Integration.
648
716
 
649
- Updates an existing custom OAuth App Integration. You can retrieve the custom oauth app integration
717
+ Updates an existing custom OAuth App Integration. You can retrieve the custom OAuth app integration
650
718
  via :method:CustomAppIntegration/get.
651
719
 
652
720
  :param integration_id: str
653
- The oauth app integration ID.
654
721
  :param redirect_urls: List[str] (optional)
655
- List of oauth redirect urls to be updated in the custom oauth app integration
722
+ List of OAuth redirect urls to be updated in the custom OAuth app integration
656
723
  :param token_access_policy: :class:`TokenAccessPolicy` (optional)
657
- Token access policy to be updated in the custom oauth app integration
724
+ Token access policy to be updated in the custom OAuth app integration
658
725
 
659
726
 
660
727
  """
@@ -687,7 +754,7 @@ class OAuthPublishedAppsAPI:
687
754
  Get all the available published OAuth apps in Databricks.
688
755
 
689
756
  :param page_size: int (optional)
690
- The max number of OAuth published apps to return.
757
+ The max number of OAuth published apps to return in one page.
691
758
  :param page_token: str (optional)
692
759
  A token that can be used to get the next page of results.
693
760
 
@@ -701,7 +768,7 @@ class OAuthPublishedAppsAPI:
701
768
 
702
769
  while True:
703
770
  json = self._api.do('GET',
704
- 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',
705
772
  query=query,
706
773
  headers=headers)
707
774
  if 'apps' in json:
@@ -713,7 +780,7 @@ class OAuthPublishedAppsAPI:
713
780
 
714
781
 
715
782
  class PublishedAppIntegrationAPI:
716
- """These APIs enable administrators to manage published oauth app integrations, which is required for
783
+ """These APIs enable administrators to manage published OAuth app integrations, which is required for
717
784
  adding/using Published OAuth App Integration like Tableau Desktop for Databricks in AWS cloud."""
718
785
 
719
786
  def __init__(self, api_client):
@@ -728,10 +795,10 @@ class PublishedAppIntegrationAPI:
728
795
 
729
796
  Create Published OAuth App Integration.
730
797
 
731
- You can retrieve the published oauth app integration via :method:PublishedAppIntegration/get.
798
+ You can retrieve the published OAuth app integration via :method:PublishedAppIntegration/get.
732
799
 
733
800
  :param app_id: str (optional)
734
- app_id of the oauth published app integration. For example power-bi, tableau-deskop
801
+ App id of the OAuth published app integration. For example power-bi, tableau-deskop
735
802
  :param token_access_policy: :class:`TokenAccessPolicy` (optional)
736
803
  Token access policy
737
804
 
@@ -751,11 +818,10 @@ class PublishedAppIntegrationAPI:
751
818
  def delete(self, integration_id: str):
752
819
  """Delete Published OAuth App Integration.
753
820
 
754
- Delete an existing Published OAuth App Integration. You can retrieve the published oauth app
821
+ Delete an existing Published OAuth App Integration. You can retrieve the published OAuth app
755
822
  integration via :method:PublishedAppIntegration/get.
756
823
 
757
824
  :param integration_id: str
758
- The oauth app integration ID.
759
825
 
760
826
 
761
827
  """
@@ -773,7 +839,6 @@ class PublishedAppIntegrationAPI:
773
839
  Gets the Published OAuth App Integration for the given integration id.
774
840
 
775
841
  :param integration_id: str
776
- The oauth app integration ID.
777
842
 
778
843
  :returns: :class:`GetPublishedAppIntegrationOutput`
779
844
  """
@@ -786,32 +851,46 @@ class PublishedAppIntegrationAPI:
786
851
  headers=headers)
787
852
  return GetPublishedAppIntegrationOutput.from_dict(res)
788
853
 
789
- def list(self) -> Iterator[GetPublishedAppIntegrationOutput]:
854
+ def list(self,
855
+ *,
856
+ page_size: Optional[int] = None,
857
+ page_token: Optional[str] = None) -> Iterator[GetPublishedAppIntegrationOutput]:
790
858
  """Get published oauth app integrations.
791
859
 
792
- Get the list of published oauth app integrations for the specified Databricks account
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)
793
864
 
794
865
  :returns: Iterator over :class:`GetPublishedAppIntegrationOutput`
795
866
  """
796
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
797
871
  headers = {'Accept': 'application/json', }
798
872
 
799
- json = self._api.do('GET',
800
- f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations',
801
- headers=headers)
802
- parsed = GetPublishedAppIntegrationsOutput.from_dict(json).apps
803
- return parsed if parsed is not None else []
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']
804
884
 
805
885
  def update(self, integration_id: str, *, token_access_policy: Optional[TokenAccessPolicy] = None):
806
886
  """Updates Published OAuth App Integration.
807
887
 
808
- Updates an existing published OAuth App Integration. You can retrieve the published oauth app
888
+ Updates an existing published OAuth App Integration. You can retrieve the published OAuth app
809
889
  integration via :method:PublishedAppIntegration/get.
810
890
 
811
891
  :param integration_id: str
812
- The oauth app integration ID.
813
892
  :param token_access_policy: :class:`TokenAccessPolicy` (optional)
814
- Token access policy to be updated in the published oauth app integration
893
+ Token access policy to be updated in the published OAuth app integration
815
894
 
816
895
 
817
896
  """