databricks-sdk 0.19.1__py3-none-any.whl → 0.21.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 +28 -6
- databricks/sdk/_widgets/__init__.py +2 -2
- databricks/sdk/config.py +3 -2
- databricks/sdk/core.py +4 -2
- databricks/sdk/mixins/workspace.py +2 -1
- databricks/sdk/oauth.py +1 -1
- databricks/sdk/runtime/__init__.py +85 -11
- databricks/sdk/runtime/dbutils_stub.py +1 -1
- databricks/sdk/service/_internal.py +1 -1
- databricks/sdk/service/billing.py +64 -1
- databricks/sdk/service/catalog.py +796 -84
- databricks/sdk/service/compute.py +391 -13
- databricks/sdk/service/dashboards.py +15 -0
- databricks/sdk/service/files.py +289 -15
- databricks/sdk/service/iam.py +214 -0
- databricks/sdk/service/jobs.py +242 -143
- databricks/sdk/service/ml.py +407 -0
- databricks/sdk/service/oauth2.py +83 -0
- databricks/sdk/service/pipelines.py +78 -8
- databricks/sdk/service/provisioning.py +108 -36
- databricks/sdk/service/serving.py +101 -35
- databricks/sdk/service/settings.py +1316 -186
- databricks/sdk/service/sharing.py +94 -18
- databricks/sdk/service/sql.py +230 -13
- databricks/sdk/service/vectorsearch.py +105 -60
- databricks/sdk/service/workspace.py +175 -1
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/METADATA +3 -1
- databricks_sdk-0.21.0.dist-info/RECORD +53 -0
- databricks/sdk/runtime/stub.py +0 -48
- databricks_sdk-0.19.1.dist-info/RECORD +0 -54
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/oauth2.py
CHANGED
|
@@ -160,6 +160,48 @@ class CreateServicePrincipalSecretResponse:
|
|
|
160
160
|
update_time=d.get('update_time', None))
|
|
161
161
|
|
|
162
162
|
|
|
163
|
+
@dataclass
|
|
164
|
+
class DeleteCustomAppIntegrationOutput:
|
|
165
|
+
|
|
166
|
+
def as_dict(self) -> dict:
|
|
167
|
+
"""Serializes the DeleteCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
168
|
+
body = {}
|
|
169
|
+
return body
|
|
170
|
+
|
|
171
|
+
@classmethod
|
|
172
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteCustomAppIntegrationOutput:
|
|
173
|
+
"""Deserializes the DeleteCustomAppIntegrationOutput from a dictionary."""
|
|
174
|
+
return cls()
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@dataclass
|
|
178
|
+
class DeletePublishedAppIntegrationOutput:
|
|
179
|
+
|
|
180
|
+
def as_dict(self) -> dict:
|
|
181
|
+
"""Serializes the DeletePublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
182
|
+
body = {}
|
|
183
|
+
return body
|
|
184
|
+
|
|
185
|
+
@classmethod
|
|
186
|
+
def from_dict(cls, d: Dict[str, any]) -> DeletePublishedAppIntegrationOutput:
|
|
187
|
+
"""Deserializes the DeletePublishedAppIntegrationOutput from a dictionary."""
|
|
188
|
+
return cls()
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@dataclass
|
|
192
|
+
class DeleteResponse:
|
|
193
|
+
|
|
194
|
+
def as_dict(self) -> dict:
|
|
195
|
+
"""Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body."""
|
|
196
|
+
body = {}
|
|
197
|
+
return body
|
|
198
|
+
|
|
199
|
+
@classmethod
|
|
200
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
|
|
201
|
+
"""Deserializes the DeleteResponse from a dictionary."""
|
|
202
|
+
return cls()
|
|
203
|
+
|
|
204
|
+
|
|
163
205
|
@dataclass
|
|
164
206
|
class GetCustomAppIntegrationOutput:
|
|
165
207
|
client_id: Optional[str] = None
|
|
@@ -445,6 +487,20 @@ class UpdateCustomAppIntegration:
|
|
|
445
487
|
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy))
|
|
446
488
|
|
|
447
489
|
|
|
490
|
+
@dataclass
|
|
491
|
+
class UpdateCustomAppIntegrationOutput:
|
|
492
|
+
|
|
493
|
+
def as_dict(self) -> dict:
|
|
494
|
+
"""Serializes the UpdateCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
495
|
+
body = {}
|
|
496
|
+
return body
|
|
497
|
+
|
|
498
|
+
@classmethod
|
|
499
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateCustomAppIntegrationOutput:
|
|
500
|
+
"""Deserializes the UpdateCustomAppIntegrationOutput from a dictionary."""
|
|
501
|
+
return cls()
|
|
502
|
+
|
|
503
|
+
|
|
448
504
|
@dataclass
|
|
449
505
|
class UpdatePublishedAppIntegration:
|
|
450
506
|
integration_id: Optional[str] = None
|
|
@@ -467,6 +523,20 @@ class UpdatePublishedAppIntegration:
|
|
|
467
523
|
token_access_policy=_from_dict(d, 'token_access_policy', TokenAccessPolicy))
|
|
468
524
|
|
|
469
525
|
|
|
526
|
+
@dataclass
|
|
527
|
+
class UpdatePublishedAppIntegrationOutput:
|
|
528
|
+
|
|
529
|
+
def as_dict(self) -> dict:
|
|
530
|
+
"""Serializes the UpdatePublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body."""
|
|
531
|
+
body = {}
|
|
532
|
+
return body
|
|
533
|
+
|
|
534
|
+
@classmethod
|
|
535
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdatePublishedAppIntegrationOutput:
|
|
536
|
+
"""Deserializes the UpdatePublishedAppIntegrationOutput from a dictionary."""
|
|
537
|
+
return cls()
|
|
538
|
+
|
|
539
|
+
|
|
470
540
|
class CustomAppIntegrationAPI:
|
|
471
541
|
"""These APIs enable administrators to manage custom oauth app integrations, which is required for
|
|
472
542
|
adding/using Custom OAuth App Integration like Tableau Cloud for Databricks in AWS cloud."""
|
|
@@ -508,6 +578,7 @@ class CustomAppIntegrationAPI:
|
|
|
508
578
|
if scopes is not None: body['scopes'] = [v for v in scopes]
|
|
509
579
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
510
580
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
581
|
+
|
|
511
582
|
res = self._api.do('POST',
|
|
512
583
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations',
|
|
513
584
|
body=body,
|
|
@@ -527,6 +598,7 @@ class CustomAppIntegrationAPI:
|
|
|
527
598
|
"""
|
|
528
599
|
|
|
529
600
|
headers = {'Accept': 'application/json', }
|
|
601
|
+
|
|
530
602
|
self._api.do(
|
|
531
603
|
'DELETE',
|
|
532
604
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations/{integration_id}',
|
|
@@ -544,6 +616,7 @@ class CustomAppIntegrationAPI:
|
|
|
544
616
|
"""
|
|
545
617
|
|
|
546
618
|
headers = {'Accept': 'application/json', }
|
|
619
|
+
|
|
547
620
|
res = self._api.do(
|
|
548
621
|
'GET',
|
|
549
622
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations/{integration_id}',
|
|
@@ -559,6 +632,7 @@ class CustomAppIntegrationAPI:
|
|
|
559
632
|
"""
|
|
560
633
|
|
|
561
634
|
headers = {'Accept': 'application/json', }
|
|
635
|
+
|
|
562
636
|
json = self._api.do('GET',
|
|
563
637
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations',
|
|
564
638
|
headers=headers)
|
|
@@ -588,6 +662,7 @@ class CustomAppIntegrationAPI:
|
|
|
588
662
|
if redirect_urls is not None: body['redirect_urls'] = [v for v in redirect_urls]
|
|
589
663
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
590
664
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
665
|
+
|
|
591
666
|
self._api.do(
|
|
592
667
|
'PATCH',
|
|
593
668
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations/{integration_id}',
|
|
@@ -666,6 +741,7 @@ class PublishedAppIntegrationAPI:
|
|
|
666
741
|
if app_id is not None: body['app_id'] = app_id
|
|
667
742
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
668
743
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
744
|
+
|
|
669
745
|
res = self._api.do('POST',
|
|
670
746
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations',
|
|
671
747
|
body=body,
|
|
@@ -685,6 +761,7 @@ class PublishedAppIntegrationAPI:
|
|
|
685
761
|
"""
|
|
686
762
|
|
|
687
763
|
headers = {'Accept': 'application/json', }
|
|
764
|
+
|
|
688
765
|
self._api.do(
|
|
689
766
|
'DELETE',
|
|
690
767
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations/{integration_id}',
|
|
@@ -702,6 +779,7 @@ class PublishedAppIntegrationAPI:
|
|
|
702
779
|
"""
|
|
703
780
|
|
|
704
781
|
headers = {'Accept': 'application/json', }
|
|
782
|
+
|
|
705
783
|
res = self._api.do(
|
|
706
784
|
'GET',
|
|
707
785
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations/{integration_id}',
|
|
@@ -717,6 +795,7 @@ class PublishedAppIntegrationAPI:
|
|
|
717
795
|
"""
|
|
718
796
|
|
|
719
797
|
headers = {'Accept': 'application/json', }
|
|
798
|
+
|
|
720
799
|
json = self._api.do('GET',
|
|
721
800
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations',
|
|
722
801
|
headers=headers)
|
|
@@ -739,6 +818,7 @@ class PublishedAppIntegrationAPI:
|
|
|
739
818
|
body = {}
|
|
740
819
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
741
820
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
821
|
+
|
|
742
822
|
self._api.do(
|
|
743
823
|
'PATCH',
|
|
744
824
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations/{integration_id}',
|
|
@@ -774,6 +854,7 @@ class ServicePrincipalSecretsAPI:
|
|
|
774
854
|
"""
|
|
775
855
|
|
|
776
856
|
headers = {'Accept': 'application/json', }
|
|
857
|
+
|
|
777
858
|
res = self._api.do(
|
|
778
859
|
'POST',
|
|
779
860
|
f'/api/2.0/accounts/{self._api.account_id}/servicePrincipals/{service_principal_id}/credentials/secrets',
|
|
@@ -794,6 +875,7 @@ class ServicePrincipalSecretsAPI:
|
|
|
794
875
|
"""
|
|
795
876
|
|
|
796
877
|
headers = {}
|
|
878
|
+
|
|
797
879
|
self._api.do(
|
|
798
880
|
'DELETE',
|
|
799
881
|
f'/api/2.0/accounts/{self._api.account_id}/servicePrincipals/{service_principal_id}/credentials/secrets/{secret_id}',
|
|
@@ -812,6 +894,7 @@ class ServicePrincipalSecretsAPI:
|
|
|
812
894
|
"""
|
|
813
895
|
|
|
814
896
|
headers = {'Accept': 'application/json', }
|
|
897
|
+
|
|
815
898
|
json = self._api.do(
|
|
816
899
|
'GET',
|
|
817
900
|
f'/api/2.0/accounts/{self._api.account_id}/servicePrincipals/{service_principal_id}/credentials/secrets',
|
|
@@ -8,7 +8,7 @@ import time
|
|
|
8
8
|
from dataclasses import dataclass
|
|
9
9
|
from datetime import timedelta
|
|
10
10
|
from enum import Enum
|
|
11
|
-
from typing import
|
|
11
|
+
from typing import Callable, Dict, Iterator, List, Optional
|
|
12
12
|
|
|
13
13
|
from ..errors import OperationFailed
|
|
14
14
|
from ._internal import Wait, _enum, _from_dict, _repeated_dict
|
|
@@ -178,14 +178,14 @@ class DataPlaneId:
|
|
|
178
178
|
instance: Optional[str] = None
|
|
179
179
|
"""The instance name of the data plane emitting an event."""
|
|
180
180
|
|
|
181
|
-
seq_no: Optional[
|
|
181
|
+
seq_no: Optional[int] = None
|
|
182
182
|
"""A sequence number, unique and increasing within the data plane instance."""
|
|
183
183
|
|
|
184
184
|
def as_dict(self) -> dict:
|
|
185
185
|
"""Serializes the DataPlaneId into a dictionary suitable for use as a JSON request body."""
|
|
186
186
|
body = {}
|
|
187
187
|
if self.instance is not None: body['instance'] = self.instance
|
|
188
|
-
if self.seq_no: body['seq_no'] = self.seq_no
|
|
188
|
+
if self.seq_no is not None: body['seq_no'] = self.seq_no
|
|
189
189
|
return body
|
|
190
190
|
|
|
191
191
|
@classmethod
|
|
@@ -194,6 +194,20 @@ class DataPlaneId:
|
|
|
194
194
|
return cls(instance=d.get('instance', None), seq_no=d.get('seq_no', None))
|
|
195
195
|
|
|
196
196
|
|
|
197
|
+
@dataclass
|
|
198
|
+
class DeletePipelineResponse:
|
|
199
|
+
|
|
200
|
+
def as_dict(self) -> dict:
|
|
201
|
+
"""Serializes the DeletePipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
202
|
+
body = {}
|
|
203
|
+
return body
|
|
204
|
+
|
|
205
|
+
@classmethod
|
|
206
|
+
def from_dict(cls, d: Dict[str, any]) -> DeletePipelineResponse:
|
|
207
|
+
"""Deserializes the DeletePipelineResponse from a dictionary."""
|
|
208
|
+
return cls()
|
|
209
|
+
|
|
210
|
+
|
|
197
211
|
@dataclass
|
|
198
212
|
class EditPipeline:
|
|
199
213
|
allow_duplicate_names: Optional[bool] = None
|
|
@@ -313,6 +327,20 @@ class EditPipeline:
|
|
|
313
327
|
trigger=_from_dict(d, 'trigger', PipelineTrigger))
|
|
314
328
|
|
|
315
329
|
|
|
330
|
+
@dataclass
|
|
331
|
+
class EditPipelineResponse:
|
|
332
|
+
|
|
333
|
+
def as_dict(self) -> dict:
|
|
334
|
+
"""Serializes the EditPipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
335
|
+
body = {}
|
|
336
|
+
return body
|
|
337
|
+
|
|
338
|
+
@classmethod
|
|
339
|
+
def from_dict(cls, d: Dict[str, any]) -> EditPipelineResponse:
|
|
340
|
+
"""Deserializes the EditPipelineResponse from a dictionary."""
|
|
341
|
+
return cls()
|
|
342
|
+
|
|
343
|
+
|
|
316
344
|
@dataclass
|
|
317
345
|
class ErrorDetail:
|
|
318
346
|
exceptions: Optional[List[SerializedException]] = None
|
|
@@ -566,6 +594,20 @@ class ListUpdatesResponse:
|
|
|
566
594
|
updates=_repeated_dict(d, 'updates', UpdateInfo))
|
|
567
595
|
|
|
568
596
|
|
|
597
|
+
@dataclass
|
|
598
|
+
class ManualTrigger:
|
|
599
|
+
|
|
600
|
+
def as_dict(self) -> dict:
|
|
601
|
+
"""Serializes the ManualTrigger into a dictionary suitable for use as a JSON request body."""
|
|
602
|
+
body = {}
|
|
603
|
+
return body
|
|
604
|
+
|
|
605
|
+
@classmethod
|
|
606
|
+
def from_dict(cls, d: Dict[str, any]) -> ManualTrigger:
|
|
607
|
+
"""Deserializes the ManualTrigger from a dictionary."""
|
|
608
|
+
return cls()
|
|
609
|
+
|
|
610
|
+
|
|
569
611
|
class MaturityLevel(Enum):
|
|
570
612
|
"""Maturity level for EventDetails."""
|
|
571
613
|
|
|
@@ -1335,19 +1377,19 @@ class PipelineStateInfo:
|
|
|
1335
1377
|
class PipelineTrigger:
|
|
1336
1378
|
cron: Optional[CronTrigger] = None
|
|
1337
1379
|
|
|
1338
|
-
manual: Optional[
|
|
1380
|
+
manual: Optional[ManualTrigger] = None
|
|
1339
1381
|
|
|
1340
1382
|
def as_dict(self) -> dict:
|
|
1341
1383
|
"""Serializes the PipelineTrigger into a dictionary suitable for use as a JSON request body."""
|
|
1342
1384
|
body = {}
|
|
1343
1385
|
if self.cron: body['cron'] = self.cron.as_dict()
|
|
1344
|
-
if self.manual: body['manual'] = self.manual
|
|
1386
|
+
if self.manual: body['manual'] = self.manual.as_dict()
|
|
1345
1387
|
return body
|
|
1346
1388
|
|
|
1347
1389
|
@classmethod
|
|
1348
1390
|
def from_dict(cls, d: Dict[str, any]) -> PipelineTrigger:
|
|
1349
1391
|
"""Deserializes the PipelineTrigger from a dictionary."""
|
|
1350
|
-
return cls(cron=_from_dict(d, 'cron', CronTrigger), manual=d
|
|
1392
|
+
return cls(cron=_from_dict(d, 'cron', CronTrigger), manual=_from_dict(d, 'manual', ManualTrigger))
|
|
1351
1393
|
|
|
1352
1394
|
|
|
1353
1395
|
@dataclass
|
|
@@ -1503,6 +1545,20 @@ class StartUpdateResponse:
|
|
|
1503
1545
|
return cls(update_id=d.get('update_id', None))
|
|
1504
1546
|
|
|
1505
1547
|
|
|
1548
|
+
@dataclass
|
|
1549
|
+
class StopPipelineResponse:
|
|
1550
|
+
|
|
1551
|
+
def as_dict(self) -> dict:
|
|
1552
|
+
"""Serializes the StopPipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
1553
|
+
body = {}
|
|
1554
|
+
return body
|
|
1555
|
+
|
|
1556
|
+
@classmethod
|
|
1557
|
+
def from_dict(cls, d: Dict[str, any]) -> StopPipelineResponse:
|
|
1558
|
+
"""Deserializes the StopPipelineResponse from a dictionary."""
|
|
1559
|
+
return cls()
|
|
1560
|
+
|
|
1561
|
+
|
|
1506
1562
|
@dataclass
|
|
1507
1563
|
class UpdateInfo:
|
|
1508
1564
|
cause: Optional[UpdateInfoCause] = None
|
|
@@ -1810,6 +1866,7 @@ class PipelinesAPI:
|
|
|
1810
1866
|
if target is not None: body['target'] = target
|
|
1811
1867
|
if trigger is not None: body['trigger'] = trigger.as_dict()
|
|
1812
1868
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1869
|
+
|
|
1813
1870
|
res = self._api.do('POST', '/api/2.0/pipelines', body=body, headers=headers)
|
|
1814
1871
|
return CreatePipelineResponse.from_dict(res)
|
|
1815
1872
|
|
|
@@ -1824,6 +1881,7 @@ class PipelinesAPI:
|
|
|
1824
1881
|
"""
|
|
1825
1882
|
|
|
1826
1883
|
headers = {'Accept': 'application/json', }
|
|
1884
|
+
|
|
1827
1885
|
self._api.do('DELETE', f'/api/2.0/pipelines/{pipeline_id}', headers=headers)
|
|
1828
1886
|
|
|
1829
1887
|
def get(self, pipeline_id: str) -> GetPipelineResponse:
|
|
@@ -1835,6 +1893,7 @@ class PipelinesAPI:
|
|
|
1835
1893
|
"""
|
|
1836
1894
|
|
|
1837
1895
|
headers = {'Accept': 'application/json', }
|
|
1896
|
+
|
|
1838
1897
|
res = self._api.do('GET', f'/api/2.0/pipelines/{pipeline_id}', headers=headers)
|
|
1839
1898
|
return GetPipelineResponse.from_dict(res)
|
|
1840
1899
|
|
|
@@ -1850,6 +1909,7 @@ class PipelinesAPI:
|
|
|
1850
1909
|
"""
|
|
1851
1910
|
|
|
1852
1911
|
headers = {'Accept': 'application/json', }
|
|
1912
|
+
|
|
1853
1913
|
res = self._api.do('GET',
|
|
1854
1914
|
f'/api/2.0/permissions/pipelines/{pipeline_id}/permissionLevels',
|
|
1855
1915
|
headers=headers)
|
|
@@ -1867,6 +1927,7 @@ class PipelinesAPI:
|
|
|
1867
1927
|
"""
|
|
1868
1928
|
|
|
1869
1929
|
headers = {'Accept': 'application/json', }
|
|
1930
|
+
|
|
1870
1931
|
res = self._api.do('GET', f'/api/2.0/permissions/pipelines/{pipeline_id}', headers=headers)
|
|
1871
1932
|
return PipelinePermissions.from_dict(res)
|
|
1872
1933
|
|
|
@@ -1884,6 +1945,7 @@ class PipelinesAPI:
|
|
|
1884
1945
|
"""
|
|
1885
1946
|
|
|
1886
1947
|
headers = {'Accept': 'application/json', }
|
|
1948
|
+
|
|
1887
1949
|
res = self._api.do('GET', f'/api/2.0/pipelines/{pipeline_id}/updates/{update_id}', headers=headers)
|
|
1888
1950
|
return GetUpdateResponse.from_dict(res)
|
|
1889
1951
|
|
|
@@ -2015,6 +2077,7 @@ class PipelinesAPI:
|
|
|
2015
2077
|
if page_token is not None: query['page_token'] = page_token
|
|
2016
2078
|
if until_update_id is not None: query['until_update_id'] = until_update_id
|
|
2017
2079
|
headers = {'Accept': 'application/json', }
|
|
2080
|
+
|
|
2018
2081
|
res = self._api.do('GET', f'/api/2.0/pipelines/{pipeline_id}/updates', query=query, headers=headers)
|
|
2019
2082
|
return ListUpdatesResponse.from_dict(res)
|
|
2020
2083
|
|
|
@@ -2037,6 +2100,7 @@ class PipelinesAPI:
|
|
|
2037
2100
|
if access_control_list is not None:
|
|
2038
2101
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
2039
2102
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2103
|
+
|
|
2040
2104
|
res = self._api.do('PUT', f'/api/2.0/permissions/pipelines/{pipeline_id}', body=body, headers=headers)
|
|
2041
2105
|
return PipelinePermissions.from_dict(res)
|
|
2042
2106
|
|
|
@@ -2079,6 +2143,7 @@ class PipelinesAPI:
|
|
|
2079
2143
|
if refresh_selection is not None: body['refresh_selection'] = [v for v in refresh_selection]
|
|
2080
2144
|
if validate_only is not None: body['validate_only'] = validate_only
|
|
2081
2145
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2146
|
+
|
|
2082
2147
|
res = self._api.do('POST', f'/api/2.0/pipelines/{pipeline_id}/updates', body=body, headers=headers)
|
|
2083
2148
|
return StartUpdateResponse.from_dict(res)
|
|
2084
2149
|
|
|
@@ -2096,8 +2161,11 @@ class PipelinesAPI:
|
|
|
2096
2161
|
"""
|
|
2097
2162
|
|
|
2098
2163
|
headers = {'Accept': 'application/json', }
|
|
2099
|
-
|
|
2100
|
-
|
|
2164
|
+
|
|
2165
|
+
op_response = self._api.do('POST', f'/api/2.0/pipelines/{pipeline_id}/stop', headers=headers)
|
|
2166
|
+
return Wait(self.wait_get_pipeline_idle,
|
|
2167
|
+
response=StopPipelineResponse.from_dict(op_response),
|
|
2168
|
+
pipeline_id=pipeline_id)
|
|
2101
2169
|
|
|
2102
2170
|
def stop_and_wait(self, pipeline_id: str, timeout=timedelta(minutes=20)) -> GetPipelineResponse:
|
|
2103
2171
|
return self.stop(pipeline_id=pipeline_id).result(timeout=timeout)
|
|
@@ -2196,6 +2264,7 @@ class PipelinesAPI:
|
|
|
2196
2264
|
if target is not None: body['target'] = target
|
|
2197
2265
|
if trigger is not None: body['trigger'] = trigger.as_dict()
|
|
2198
2266
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2267
|
+
|
|
2199
2268
|
self._api.do('PUT', f'/api/2.0/pipelines/{pipeline_id}', body=body, headers=headers)
|
|
2200
2269
|
|
|
2201
2270
|
def update_permissions(
|
|
@@ -2217,6 +2286,7 @@ class PipelinesAPI:
|
|
|
2217
2286
|
if access_control_list is not None:
|
|
2218
2287
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
2219
2288
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2289
|
+
|
|
2220
2290
|
res = self._api.do('PATCH',
|
|
2221
2291
|
f'/api/2.0/permissions/pipelines/{pipeline_id}',
|
|
2222
2292
|
body=body,
|