azure-devops-extension-api 4.270.0 → 5.271.0
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.
- package/Accounts/Accounts.d.ts +126 -126
- package/Accounts/Accounts.js +61 -62
- package/Accounts/Accounts.min.js +1 -1
- package/Accounts/AccountsClient.d.ts +24 -24
- package/Accounts/AccountsClient.js +78 -124
- package/Accounts/AccountsClient.min.js +1 -1
- package/Accounts/index.d.ts +2 -2
- package/Accounts/index.js +18 -9
- package/Accounts/index.min.js +1 -1
- package/AdvancedSecurity.Reporting/Reporting.d.ts +717 -717
- package/AdvancedSecurity.Reporting/Reporting.js +203 -204
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +83 -83
- package/AdvancedSecurity.Reporting/ReportingClient.js +267 -343
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
- package/Alert/Alert.d.ts +1265 -1265
- package/Alert/Alert.js +425 -426
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +184 -159
- package/Alert/AlertClient.js +512 -533
- package/Alert/AlertClient.min.js +1 -1
- package/Build/Build.d.ts +3318 -3292
- package/Build/Build.js +613 -607
- package/Build/Build.min.js +1 -1
- package/Build/BuildClient.d.ts +842 -820
- package/Build/BuildClient.js +2319 -2568
- package/Build/BuildClient.min.js +1 -1
- package/Build/BuildServices.d.ts +32 -32
- package/Build/BuildServices.js +13 -14
- package/Build/BuildServices.min.js +1 -1
- package/Build/index.d.ts +3 -3
- package/Build/index.js +19 -10
- package/Build/index.min.js +1 -1
- package/Comments/Comments.d.ts +309 -309
- package/Comments/Comments.js +93 -94
- package/Comments/Comments.min.js +1 -1
- package/Comments/index.d.ts +1 -1
- package/Comments/index.js +17 -8
- package/Comments/index.min.js +1 -1
- package/Common/Client.d.ts +9 -9
- package/Common/Client.js +25 -26
- package/Common/Client.min.js +1 -1
- package/Common/CommonServices.d.ts +774 -735
- package/Common/CommonServices.js +71 -72
- package/Common/CommonServices.min.js +1 -1
- package/Common/Context.js +2 -0
- package/Common/Fetch.d.ts +95 -95
- package/Common/Fetch.js +131 -168
- package/Common/Fetch.min.js +1 -1
- package/Common/RestClientBase.d.ts +96 -96
- package/Common/RestClientBase.js +109 -139
- package/Common/RestClientBase.min.js +1 -1
- package/Common/System.d.ts +30 -30
- package/Common/System.js +39 -40
- package/Common/System.min.js +1 -1
- package/Common/SystemData.d.ts +129 -129
- package/Common/SystemData.js +138 -139
- package/Common/SystemData.min.js +1 -1
- package/Common/Util/Serialization.d.ts +15 -15
- package/Common/Util/Serialization.js +51 -53
- package/Common/Util/Serialization.min.js +1 -1
- package/Common/Util/Url.d.ts +238 -236
- package/Common/Util/Url.js +605 -626
- package/Common/Util/Url.min.js +1 -1
- package/Common/index.d.ts +3 -3
- package/Common/index.js +19 -9
- package/Common/index.min.js +1 -1
- package/Contributions/Contributions.d.ts +694 -694
- package/Contributions/Contributions.js +185 -186
- package/Contributions/Contributions.min.js +1 -1
- package/Contributions/ContributionsClient.d.ts +31 -31
- package/Contributions/ContributionsClient.js +99 -147
- package/Contributions/ContributionsClient.min.js +1 -1
- package/Contributions/index.d.ts +2 -2
- package/Contributions/index.js +18 -9
- package/Contributions/index.min.js +1 -1
- package/Core/Core.d.ts +546 -546
- package/Core/Core.js +79 -80
- package/Core/Core.min.js +1 -1
- package/Core/CoreClient.d.ts +224 -224
- package/Core/CoreClient.js +652 -777
- package/Core/CoreClient.min.js +1 -1
- package/Core/index.d.ts +2 -2
- package/Core/index.js +18 -9
- package/Core/index.min.js +1 -1
- package/Dashboard/Dashboard.d.ts +393 -393
- package/Dashboard/Dashboard.js +56 -57
- package/Dashboard/Dashboard.min.js +1 -1
- package/Dashboard/DashboardClient.d.ts +106 -106
- package/Dashboard/DashboardClient.js +317 -393
- package/Dashboard/DashboardClient.min.js +1 -1
- package/Dashboard/WidgetConfigHelpers.d.ts +34 -34
- package/Dashboard/WidgetConfigHelpers.js +41 -45
- package/Dashboard/WidgetConfigHelpers.min.js +1 -1
- package/Dashboard/WidgetContracts.d.ts +213 -213
- package/Dashboard/WidgetContracts.js +24 -25
- package/Dashboard/WidgetContracts.min.js +1 -1
- package/Dashboard/WidgetHelpers.d.ts +89 -89
- package/Dashboard/WidgetHelpers.js +135 -146
- package/Dashboard/WidgetHelpers.min.js +1 -1
- package/Dashboard/index.d.ts +5 -5
- package/Dashboard/index.js +21 -12
- package/Dashboard/index.min.js +1 -1
- package/DistributedTaskCommon/DistributedTaskCommon.d.ts +103 -103
- package/DistributedTaskCommon/DistributedTaskCommon.js +7 -9
- package/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -1
- package/DistributedTaskCommon/index.d.ts +1 -1
- package/DistributedTaskCommon/index.js +17 -4
- package/DistributedTaskCommon/index.min.js +1 -1
- package/ExtensionManagement/ExtensionManagement.d.ts +1163 -1163
- package/ExtensionManagement/ExtensionManagement.js +284 -285
- package/ExtensionManagement/ExtensionManagement.min.js +1 -1
- package/ExtensionManagement/ExtensionManagementClient.d.ts +191 -191
- package/ExtensionManagement/ExtensionManagementClient.js +551 -648
- package/ExtensionManagement/ExtensionManagementClient.min.js +1 -1
- package/ExtensionManagement/index.d.ts +2 -2
- package/ExtensionManagement/index.js +18 -9
- package/ExtensionManagement/index.min.js +1 -1
- package/Favorite/Favorite.d.ts +124 -124
- package/Favorite/Favorite.js +7 -9
- package/Favorite/Favorite.min.js +1 -1
- package/Favorite/FavoriteClient.d.ts +78 -78
- package/Favorite/FavoriteClient.js +247 -314
- package/Favorite/FavoriteClient.min.js +1 -1
- package/FeatureAvailability/FeatureAvailability.d.ts +13 -13
- package/FeatureAvailability/FeatureAvailability.js +7 -9
- package/FeatureAvailability/FeatureAvailability.min.js +1 -1
- package/FeatureAvailability/FeatureAvailabilityClient.d.ts +45 -45
- package/FeatureAvailability/FeatureAvailabilityClient.js +136 -189
- package/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -1
- package/FeatureAvailability/index.d.ts +2 -2
- package/FeatureAvailability/index.js +18 -8
- package/FeatureAvailability/index.min.js +1 -1
- package/FeatureManagement/FeatureManagement.d.ts +161 -161
- package/FeatureManagement/FeatureManagement.js +26 -27
- package/FeatureManagement/FeatureManagement.min.js +1 -1
- package/FeatureManagement/FeatureManagementClient.d.ts +78 -78
- package/FeatureManagement/FeatureManagementClient.js +214 -273
- package/FeatureManagement/FeatureManagementClient.min.js +1 -1
- package/FeatureManagement/index.d.ts +2 -2
- package/FeatureManagement/index.js +18 -9
- package/FeatureManagement/index.min.js +1 -1
- package/FileContainer/FileContainer.d.ts +193 -193
- package/FileContainer/FileContainer.js +58 -59
- package/FileContainer/FileContainer.min.js +1 -1
- package/FileContainer/FileContainerClient.d.ts +47 -47
- package/FileContainer/FileContainerClient.js +132 -182
- package/FileContainer/FileContainerClient.min.js +1 -1
- package/FileContainer/index.d.ts +2 -2
- package/FileContainer/index.js +18 -9
- package/FileContainer/index.min.js +1 -1
- package/FormInput/FormInput.d.ts +278 -278
- package/FormInput/FormInput.js +77 -78
- package/FormInput/FormInput.min.js +1 -1
- package/FormInput/index.d.ts +1 -1
- package/FormInput/index.js +17 -8
- package/FormInput/index.min.js +1 -1
- package/Gallery/Gallery.d.ts +1911 -1911
- package/Gallery/Gallery.js +788 -789
- package/Gallery/Gallery.min.js +1 -1
- package/Gallery/GalleryClient.d.ts +613 -603
- package/Gallery/GalleryClient.js +1884 -2100
- package/Gallery/GalleryClient.min.js +1 -1
- package/Gallery/index.d.ts +2 -2
- package/Gallery/index.js +18 -9
- package/Gallery/index.min.js +1 -1
- package/Git/CodeEditorTypes.d.ts +305 -305
- package/Git/CodeEditorTypes.js +27 -28
- package/Git/CodeEditorTypes.min.js +1 -1
- package/Git/Git.d.ts +3976 -4071
- package/Git/Git.js +830 -839
- package/Git/Git.min.js +1 -1
- package/Git/GitClient.d.ts +1468 -1466
- package/Git/GitClient.js +3892 -4347
- package/Git/GitClient.min.js +1 -1
- package/Git/GitServices.d.ts +16 -16
- package/Git/GitServices.js +10 -11
- package/Git/GitServices.min.js +1 -1
- package/Git/index.d.ts +4 -4
- package/Git/index.js +20 -11
- package/Git/index.min.js +1 -1
- package/Graph/Graph.d.ts +518 -518
- package/Graph/Graph.js +14 -15
- package/Graph/Graph.min.js +1 -1
- package/Graph/GraphClient.d.ts +261 -261
- package/Graph/GraphClient.js +737 -867
- package/Graph/GraphClient.min.js +1 -1
- package/Graph/index.d.ts +2 -2
- package/Graph/index.js +18 -9
- package/Graph/index.min.js +1 -1
- package/Identities/Identities.d.ts +242 -242
- package/Identities/Identities.js +49 -50
- package/Identities/Identities.min.js +1 -1
- package/Identities/IdentityProvider.d.ts +40 -40
- package/Identities/IdentityProvider.js +47 -49
- package/Identities/IdentityProvider.min.js +1 -1
- package/Identities/IdentityService.d.ts +72 -72
- package/Identities/IdentityService.js +13 -14
- package/Identities/IdentityService.min.js +1 -1
- package/Identities/index.d.ts +3 -3
- package/Identities/index.js +19 -10
- package/Identities/index.min.js +1 -1
- package/Locations/Locations.d.ts +150 -150
- package/Locations/Locations.js +28 -29
- package/Locations/Locations.min.js +1 -1
- package/Locations/LocationsClient.d.ts +65 -65
- package/Locations/LocationsClient.js +211 -276
- package/Locations/LocationsClient.min.js +1 -1
- package/Locations/index.d.ts +2 -2
- package/Locations/index.js +18 -9
- package/Locations/index.min.js +1 -1
- package/Management/Management.d.ts +424 -407
- package/Management/Management.js +27 -28
- package/Management/Management.min.js +1 -1
- package/Management/ManagementClient.d.ts +116 -105
- package/Management/ManagementClient.js +349 -398
- package/Management/ManagementClient.min.js +1 -1
- package/Notification/Notification.d.ts +1387 -1387
- package/Notification/Notification.js +385 -386
- package/Notification/Notification.min.js +1 -1
- package/Notification/NotificationClient.d.ts +149 -149
- package/Notification/NotificationClient.js +420 -511
- package/Notification/NotificationClient.min.js +1 -1
- package/Notification/index.d.ts +2 -2
- package/Notification/index.js +18 -9
- package/Notification/index.min.js +1 -1
- package/Operations/Operations.d.ts +77 -77
- package/Operations/Operations.js +38 -39
- package/Operations/Operations.min.js +1 -1
- package/Operations/OperationsClient.d.ts +13 -13
- package/Operations/OperationsClient.js +45 -86
- package/Operations/OperationsClient.min.js +1 -1
- package/Operations/index.d.ts +2 -2
- package/Operations/index.js +18 -9
- package/Operations/index.min.js +1 -1
- package/Pipelines/Pipelines.d.ts +341 -341
- package/Pipelines/Pipelines.js +82 -83
- package/Pipelines/Pipelines.min.js +1 -1
- package/Pipelines/PipelinesClient.d.ts +92 -92
- package/Pipelines/PipelinesClient.js +260 -325
- package/Pipelines/PipelinesClient.min.js +1 -1
- package/Policy/Policy.d.ts +160 -160
- package/Policy/Policy.js +38 -39
- package/Policy/Policy.min.js +1 -1
- package/Policy/PolicyClient.d.ts +99 -99
- package/Policy/PolicyClient.js +274 -346
- package/Policy/PolicyClient.min.js +1 -1
- package/Policy/index.d.ts +2 -2
- package/Policy/index.js +18 -9
- package/Policy/index.min.js +1 -1
- package/Profile/Profile.d.ts +175 -175
- package/Profile/Profile.js +35 -36
- package/Profile/Profile.min.js +1 -1
- package/Profile/ProfileClient.d.ts +86 -86
- package/Profile/ProfileClient.js +277 -347
- package/Profile/ProfileClient.min.js +1 -1
- package/Profile/index.d.ts +2 -2
- package/Profile/index.js +18 -9
- package/Profile/index.min.js +1 -1
- package/ProjectAnalysis/ProjectAnalysis.d.ts +59 -59
- package/ProjectAnalysis/ProjectAnalysis.js +18 -19
- package/ProjectAnalysis/ProjectAnalysis.min.js +1 -1
- package/ProjectAnalysis/ProjectAnalysisClient.d.ts +34 -34
- package/ProjectAnalysis/ProjectAnalysisClient.js +110 -159
- package/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -1
- package/ProjectAnalysis/index.d.ts +2 -2
- package/ProjectAnalysis/index.js +18 -9
- package/ProjectAnalysis/index.min.js +1 -1
- package/README.md +57 -1
- package/Release/Release.d.ts +4068 -4068
- package/Release/Release.js +876 -877
- package/Release/Release.min.js +1 -1
- package/Release/ReleaseClient.d.ts +720 -720
- package/Release/ReleaseClient.js +2003 -2273
- package/Release/ReleaseClient.min.js +1 -1
- package/Release/index.d.ts +2 -2
- package/Release/index.js +18 -9
- package/Release/index.min.js +1 -1
- package/ResourceUsage/ResourceUsage.d.ts +13 -13
- package/ResourceUsage/ResourceUsage.js +7 -9
- package/ResourceUsage/ResourceUsage.min.js +1 -1
- package/ResourceUsage/ResourceUsageClient.d.ts +20 -20
- package/ResourceUsage/ResourceUsageClient.js +51 -93
- package/ResourceUsage/ResourceUsageClient.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpoint.d.ts +894 -894
- package/ServiceEndpoint/ServiceEndpoint.js +84 -85
- package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpointClient.d.ts +190 -190
- package/ServiceEndpoint/ServiceEndpointClient.js +556 -669
- package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
- package/ServiceEndpoint/index.d.ts +2 -2
- package/ServiceEndpoint/index.js +18 -9
- package/ServiceEndpoint/index.min.js +1 -1
- package/ServiceHooks/ServiceHooks.d.ts +758 -758
- package/ServiceHooks/ServiceHooks.js +114 -115
- package/ServiceHooks/ServiceHooks.min.js +1 -1
- package/ServiceHooks/ServiceHooksClient.d.ts +156 -156
- package/ServiceHooks/ServiceHooksClient.js +434 -526
- package/ServiceHooks/ServiceHooksClient.min.js +1 -1
- package/ServiceHooks/index.d.ts +2 -2
- package/ServiceHooks/index.js +18 -9
- package/ServiceHooks/index.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +3777 -3777
- package/TaskAgent/TaskAgent.js +594 -594
- package/TaskAgent/TaskAgent.min.js +1 -1
- package/TaskAgent/TaskAgentClient.d.ts +1085 -1073
- package/TaskAgent/TaskAgentClient.js +3273 -3731
- package/TaskAgent/TaskAgentClient.min.js +1 -1
- package/TaskAgent/index.d.ts +2 -2
- package/TaskAgent/index.js +18 -9
- package/TaskAgent/index.min.js +1 -1
- package/Test/Test.d.ts +5918 -5874
- package/Test/Test.js +1068 -1069
- package/Test/Test.min.js +1 -1
- package/Test/TestClient.d.ts +635 -635
- package/Test/TestClient.js +1822 -2088
- package/Test/TestClient.min.js +1 -1
- package/Test/index.d.ts +2 -2
- package/Test/index.js +18 -9
- package/Test/index.min.js +1 -1
- package/TestPlan/TestPlan.d.ts +1616 -1616
- package/TestPlan/TestPlan.js +270 -271
- package/TestPlan/TestPlan.min.js +1 -1
- package/TestPlan/TestPlanClient.d.ts +408 -408
- package/TestPlan/TestPlanClient.js +1160 -1387
- package/TestPlan/TestPlanClient.min.js +1 -1
- package/TestPlan/index.d.ts +2 -2
- package/TestPlan/index.js +18 -9
- package/TestPlan/index.min.js +1 -1
- package/TestResults/TestResults.d.ts +5 -5
- package/TestResults/TestResults.js +7 -9
- package/TestResults/TestResults.min.js +1 -1
- package/TestResults/TestResultsClient.d.ts +1060 -1039
- package/TestResults/TestResultsClient.js +3099 -3491
- package/TestResults/TestResultsClient.min.js +1 -1
- package/TestResults/index.d.ts +2 -2
- package/TestResults/index.js +18 -8
- package/TestResults/index.min.js +1 -1
- package/Tfvc/Tfvc.d.ts +730 -730
- package/Tfvc/Tfvc.js +106 -107
- package/Tfvc/Tfvc.min.js +1 -1
- package/Tfvc/TfvcClient.d.ts +227 -227
- package/Tfvc/TfvcClient.js +620 -732
- package/Tfvc/TfvcClient.min.js +1 -1
- package/Tfvc/index.d.ts +2 -2
- package/Tfvc/index.js +18 -9
- package/Tfvc/index.min.js +1 -1
- package/WebApi/WebApi.d.ts +408 -408
- package/WebApi/WebApi.js +55 -56
- package/WebApi/WebApi.min.js +1 -1
- package/WebApi/index.d.ts +1 -1
- package/WebApi/index.js +17 -8
- package/WebApi/index.min.js +1 -1
- package/Wiki/Wiki.d.ts +328 -328
- package/Wiki/Wiki.js +22 -23
- package/Wiki/Wiki.min.js +1 -1
- package/Wiki/WikiClient.d.ts +218 -218
- package/Wiki/WikiClient.js +585 -684
- package/Wiki/WikiClient.min.js +1 -1
- package/Wiki/index.d.ts +2 -2
- package/Wiki/index.js +18 -9
- package/Wiki/index.min.js +1 -1
- package/Work/Work.d.ts +1298 -1298
- package/Work/Work.js +187 -188
- package/Work/Work.min.js +1 -1
- package/Work/WorkClient.d.ts +421 -421
- package/Work/WorkClient.js +1255 -1455
- package/Work/WorkClient.min.js +1 -1
- package/Work/index.d.ts +2 -2
- package/Work/index.js +18 -9
- package/Work/index.min.js +1 -1
- package/WorkItemTracking/WorkItemTracking.d.ts +2158 -2158
- package/WorkItemTracking/WorkItemTracking.js +431 -432
- package/WorkItemTracking/WorkItemTracking.min.js +1 -1
- package/WorkItemTracking/WorkItemTrackingClient.d.ts +624 -624
- package/WorkItemTracking/WorkItemTrackingClient.js +1688 -1918
- package/WorkItemTracking/WorkItemTrackingClient.min.js +1 -1
- package/WorkItemTracking/WorkItemTrackingServices.d.ts +320 -320
- package/WorkItemTracking/WorkItemTrackingServices.js +18 -19
- package/WorkItemTracking/WorkItemTrackingServices.min.js +1 -1
- package/WorkItemTracking/index.d.ts +3 -3
- package/WorkItemTracking/index.js +19 -10
- package/WorkItemTracking/index.min.js +1 -1
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +1238 -1238
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +299 -300
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -1
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.d.ts +462 -462
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1224 -1386
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -1
- package/WorkItemTrackingProcess/index.d.ts +2 -2
- package/WorkItemTrackingProcess/index.js +18 -9
- package/WorkItemTrackingProcess/index.min.js +1 -1
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +575 -575
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +96 -97
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -1
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.d.ts +376 -376
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +991 -1126
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -1
- package/WorkItemTrackingProcessDefinitions/index.d.ts +2 -2
- package/WorkItemTrackingProcessDefinitions/index.js +18 -9
- package/WorkItemTrackingProcessDefinitions/index.min.js +1 -1
- package/_manifest/Spdx2xVs3xComparisonToolOutput.json +4 -4
- package/_manifest/spdx_2.2/ESRPClientLogs0504231512019.json +1 -0
- package/_manifest/spdx_2.2/bsi.cose +0 -0
- package/_manifest/spdx_2.2/bsi.json +1 -1
- package/_manifest/spdx_2.2/manifest.cat +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.json +1 -1
- package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
- package/_manifest/spdx_3.0/manifest.spdx.json +1 -1
- package/_manifest/spdx_3.0/manifest.spdx.json.sha256 +1 -1
- package/esm/Accounts/Accounts.js +58 -0
- package/esm/Accounts/Accounts.min.js +1 -0
- package/esm/Accounts/AccountsClient.js +59 -0
- package/esm/Accounts/AccountsClient.min.js +1 -0
- package/esm/Accounts/index.js +2 -0
- package/esm/Accounts/index.min.js +1 -0
- package/esm/AdvancedSecurity.Reporting/Reporting.js +200 -0
- package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
- package/esm/AdvancedSecurity.Reporting/ReportingClient.js +228 -0
- package/esm/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -0
- package/esm/Alert/Alert.js +422 -0
- package/esm/Alert/Alert.min.js +1 -0
- package/esm/Alert/AlertClient.js +457 -0
- package/esm/Alert/AlertClient.min.js +1 -0
- package/esm/Build/Build.js +610 -0
- package/esm/Build/Build.min.js +1 -0
- package/esm/Build/BuildClient.js +2108 -0
- package/esm/Build/BuildClient.min.js +1 -0
- package/esm/Build/BuildServices.js +10 -0
- package/esm/Build/BuildServices.min.js +1 -0
- package/esm/Build/index.js +3 -0
- package/esm/Build/index.min.js +1 -0
- package/esm/Comments/Comments.js +90 -0
- package/esm/Comments/Comments.min.js +1 -0
- package/esm/Comments/index.js +1 -0
- package/esm/Comments/index.min.js +1 -0
- package/esm/Common/Client.js +22 -0
- package/esm/Common/Client.min.js +1 -0
- package/esm/Common/CommonServices.js +68 -0
- package/esm/Common/CommonServices.min.js +1 -0
- package/esm/Common/Context.js +1 -0
- package/esm/Common/Fetch.js +117 -0
- package/esm/Common/Fetch.min.js +1 -0
- package/esm/Common/RestClientBase.js +92 -0
- package/esm/Common/RestClientBase.min.js +1 -0
- package/esm/Common/System.js +36 -0
- package/esm/Common/System.min.js +1 -0
- package/esm/Common/SystemData.js +135 -0
- package/esm/Common/SystemData.min.js +1 -0
- package/esm/Common/Util/Serialization.js +48 -0
- package/esm/Common/Util/Serialization.min.js +1 -0
- package/esm/Common/Util/Url.js +595 -0
- package/esm/Common/Util/Url.min.js +1 -0
- package/esm/Common/index.js +3 -0
- package/esm/Common/index.min.js +1 -0
- package/esm/Contributions/Contributions.js +182 -0
- package/esm/Contributions/Contributions.min.js +1 -0
- package/esm/Contributions/ContributionsClient.js +78 -0
- package/esm/Contributions/ContributionsClient.min.js +1 -0
- package/esm/Contributions/index.js +2 -0
- package/esm/Contributions/index.min.js +1 -0
- package/esm/Core/Core.js +76 -0
- package/esm/Core/Core.min.js +1 -0
- package/esm/Core/CoreClient.js +573 -0
- package/esm/Core/CoreClient.min.js +1 -0
- package/esm/Core/index.js +2 -0
- package/esm/Core/index.min.js +1 -0
- package/esm/Dashboard/Dashboard.js +53 -0
- package/esm/Dashboard/Dashboard.min.js +1 -0
- package/esm/Dashboard/DashboardClient.js +278 -0
- package/esm/Dashboard/DashboardClient.min.js +1 -0
- package/esm/Dashboard/WidgetConfigHelpers.js +37 -0
- package/esm/Dashboard/WidgetConfigHelpers.min.js +1 -0
- package/esm/Dashboard/WidgetContracts.js +21 -0
- package/esm/Dashboard/WidgetContracts.min.js +1 -0
- package/esm/Dashboard/WidgetHelpers.js +129 -0
- package/esm/Dashboard/WidgetHelpers.min.js +1 -0
- package/esm/Dashboard/index.js +5 -0
- package/esm/Dashboard/index.min.js +1 -0
- package/esm/DistributedTaskCommon/DistributedTaskCommon.js +6 -0
- package/esm/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -0
- package/esm/DistributedTaskCommon/index.js +1 -0
- package/esm/DistributedTaskCommon/index.min.js +1 -0
- package/esm/ExtensionManagement/ExtensionManagement.js +281 -0
- package/esm/ExtensionManagement/ExtensionManagement.min.js +1 -0
- package/esm/ExtensionManagement/ExtensionManagementClient.js +486 -0
- package/esm/ExtensionManagement/ExtensionManagementClient.min.js +1 -0
- package/esm/ExtensionManagement/index.js +2 -0
- package/esm/ExtensionManagement/index.min.js +1 -0
- package/esm/Favorite/Favorite.js +6 -0
- package/esm/Favorite/Favorite.min.js +1 -0
- package/esm/Favorite/FavoriteClient.js +214 -0
- package/esm/Favorite/FavoriteClient.min.js +1 -0
- package/esm/FeatureAvailability/FeatureAvailability.js +6 -0
- package/esm/FeatureAvailability/FeatureAvailability.min.js +1 -0
- package/esm/FeatureAvailability/FeatureAvailabilityClient.js +113 -0
- package/esm/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -0
- package/esm/FeatureAvailability/index.js +2 -0
- package/esm/FeatureAvailability/index.min.js +1 -0
- package/esm/FeatureManagement/FeatureManagement.js +23 -0
- package/esm/FeatureManagement/FeatureManagement.min.js +1 -0
- package/esm/FeatureManagement/FeatureManagementClient.js +183 -0
- package/esm/FeatureManagement/FeatureManagementClient.min.js +1 -0
- package/esm/FeatureManagement/index.js +2 -0
- package/esm/FeatureManagement/index.min.js +1 -0
- package/esm/FileContainer/FileContainer.js +55 -0
- package/esm/FileContainer/FileContainer.min.js +1 -0
- package/esm/FileContainer/FileContainerClient.js +111 -0
- package/esm/FileContainer/FileContainerClient.min.js +1 -0
- package/esm/FileContainer/index.js +2 -0
- package/esm/FileContainer/index.min.js +1 -0
- package/esm/FormInput/FormInput.js +74 -0
- package/esm/FormInput/FormInput.min.js +1 -0
- package/esm/FormInput/index.js +1 -0
- package/esm/FormInput/index.min.js +1 -0
- package/esm/Gallery/Gallery.js +785 -0
- package/esm/Gallery/Gallery.min.js +1 -0
- package/esm/Gallery/GalleryClient.js +1701 -0
- package/esm/Gallery/GalleryClient.min.js +1 -0
- package/esm/Gallery/index.js +2 -0
- package/esm/Gallery/index.min.js +1 -0
- package/esm/Git/CodeEditorTypes.js +24 -0
- package/esm/Git/CodeEditorTypes.min.js +1 -0
- package/esm/Git/Git.js +827 -0
- package/esm/Git/Git.min.js +1 -0
- package/esm/Git/GitClient.js +3571 -0
- package/esm/Git/GitClient.min.js +1 -0
- package/esm/Git/GitServices.js +7 -0
- package/esm/Git/GitServices.min.js +1 -0
- package/esm/Git/index.js +4 -0
- package/esm/Git/index.min.js +1 -0
- package/esm/Graph/Graph.js +11 -0
- package/esm/Graph/Graph.min.js +1 -0
- package/esm/Graph/GraphClient.js +644 -0
- package/esm/Graph/GraphClient.min.js +1 -0
- package/esm/Graph/index.js +2 -0
- package/esm/Graph/index.min.js +1 -0
- package/esm/Identities/Identities.js +46 -0
- package/esm/Identities/Identities.min.js +1 -0
- package/esm/Identities/IdentityProvider.js +43 -0
- package/esm/Identities/IdentityProvider.min.js +1 -0
- package/esm/Identities/IdentityService.js +10 -0
- package/esm/Identities/IdentityService.min.js +1 -0
- package/esm/Identities/index.js +3 -0
- package/esm/Identities/index.min.js +1 -0
- package/esm/Locations/Locations.js +25 -0
- package/esm/Locations/Locations.min.js +1 -0
- package/esm/Locations/LocationsClient.js +178 -0
- package/esm/Locations/LocationsClient.min.js +1 -0
- package/esm/Locations/index.js +2 -0
- package/esm/Locations/index.min.js +1 -0
- package/esm/Management/Management.js +24 -0
- package/esm/Management/Management.min.js +1 -0
- package/esm/Management/ManagementClient.js +302 -0
- package/esm/Management/ManagementClient.min.js +1 -0
- package/esm/Notification/Notification.js +382 -0
- package/esm/Notification/Notification.min.js +1 -0
- package/esm/Notification/NotificationClient.js +359 -0
- package/esm/Notification/NotificationClient.min.js +1 -0
- package/esm/Notification/index.js +2 -0
- package/esm/Notification/index.min.js +1 -0
- package/esm/Operations/Operations.js +35 -0
- package/esm/Operations/Operations.min.js +1 -0
- package/esm/Operations/OperationsClient.js +30 -0
- package/esm/Operations/OperationsClient.min.js +1 -0
- package/esm/Operations/index.js +2 -0
- package/esm/Operations/index.min.js +1 -0
- package/esm/Pipelines/Pipelines.js +79 -0
- package/esm/Pipelines/Pipelines.min.js +1 -0
- package/esm/Pipelines/PipelinesClient.js +227 -0
- package/esm/Pipelines/PipelinesClient.min.js +1 -0
- package/esm/Policy/Policy.js +35 -0
- package/esm/Policy/Policy.min.js +1 -0
- package/esm/Policy/PolicyClient.js +237 -0
- package/esm/Policy/PolicyClient.min.js +1 -0
- package/esm/Policy/index.js +2 -0
- package/esm/Policy/index.min.js +1 -0
- package/esm/Profile/Profile.js +32 -0
- package/esm/Profile/Profile.min.js +1 -0
- package/esm/Profile/ProfileClient.js +240 -0
- package/esm/Profile/ProfileClient.min.js +1 -0
- package/esm/Profile/index.js +2 -0
- package/esm/Profile/index.min.js +1 -0
- package/esm/ProjectAnalysis/ProjectAnalysis.js +15 -0
- package/esm/ProjectAnalysis/ProjectAnalysis.min.js +1 -0
- package/esm/ProjectAnalysis/ProjectAnalysisClient.js +89 -0
- package/esm/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -0
- package/esm/ProjectAnalysis/index.js +2 -0
- package/esm/ProjectAnalysis/index.min.js +1 -0
- package/esm/Release/Release.js +873 -0
- package/esm/Release/Release.min.js +1 -0
- package/esm/Release/ReleaseClient.js +1816 -0
- package/esm/Release/ReleaseClient.min.js +1 -0
- package/esm/Release/index.js +2 -0
- package/esm/Release/index.min.js +1 -0
- package/esm/ResourceUsage/ResourceUsage.js +6 -0
- package/esm/ResourceUsage/ResourceUsage.min.js +1 -0
- package/esm/ResourceUsage/ResourceUsageClient.js +34 -0
- package/esm/ResourceUsage/ResourceUsageClient.min.js +1 -0
- package/esm/ServiceEndpoint/ServiceEndpoint.js +81 -0
- package/esm/ServiceEndpoint/ServiceEndpoint.min.js +1 -0
- package/esm/ServiceEndpoint/ServiceEndpointClient.js +489 -0
- package/esm/ServiceEndpoint/ServiceEndpointClient.min.js +1 -0
- package/esm/ServiceEndpoint/index.js +2 -0
- package/esm/ServiceEndpoint/index.min.js +1 -0
- package/esm/ServiceHooks/ServiceHooks.js +111 -0
- package/esm/ServiceHooks/ServiceHooks.min.js +1 -0
- package/esm/ServiceHooks/ServiceHooksClient.js +375 -0
- package/esm/ServiceHooks/ServiceHooksClient.min.js +1 -0
- package/esm/ServiceHooks/index.js +2 -0
- package/esm/ServiceHooks/index.min.js +1 -0
- package/esm/TaskAgent/TaskAgent.js +590 -0
- package/esm/TaskAgent/TaskAgent.min.js +1 -0
- package/esm/TaskAgent/TaskAgentClient.js +2946 -0
- package/esm/TaskAgent/TaskAgentClient.min.js +1 -0
- package/esm/TaskAgent/index.js +2 -0
- package/esm/TaskAgent/index.min.js +1 -0
- package/esm/Test/Test.js +1065 -0
- package/esm/Test/Test.min.js +1 -0
- package/esm/Test/TestClient.js +1655 -0
- package/esm/Test/TestClient.min.js +1 -0
- package/esm/Test/index.js +2 -0
- package/esm/Test/index.min.js +1 -0
- package/esm/TestPlan/TestPlan.js +267 -0
- package/esm/TestPlan/TestPlan.min.js +1 -0
- package/esm/TestPlan/TestPlanClient.js +1051 -0
- package/esm/TestPlan/TestPlanClient.min.js +1 -0
- package/esm/TestPlan/index.js +2 -0
- package/esm/TestPlan/index.min.js +1 -0
- package/esm/TestResults/TestResults.js +6 -0
- package/esm/TestResults/TestResults.min.js +1 -0
- package/esm/TestResults/TestResultsClient.js +2822 -0
- package/esm/TestResults/TestResultsClient.min.js +1 -0
- package/esm/TestResults/index.js +2 -0
- package/esm/TestResults/index.min.js +1 -0
- package/esm/Tfvc/Tfvc.js +103 -0
- package/esm/Tfvc/Tfvc.min.js +1 -0
- package/esm/Tfvc/TfvcClient.js +559 -0
- package/esm/Tfvc/TfvcClient.min.js +1 -0
- package/esm/Tfvc/index.js +2 -0
- package/esm/Tfvc/index.min.js +1 -0
- package/esm/WebApi/WebApi.js +52 -0
- package/esm/WebApi/WebApi.min.js +1 -0
- package/esm/WebApi/index.js +1 -0
- package/esm/WebApi/index.min.js +1 -0
- package/esm/Wiki/Wiki.js +19 -0
- package/esm/Wiki/Wiki.min.js +1 -0
- package/esm/Wiki/WikiClient.js +528 -0
- package/esm/Wiki/WikiClient.min.js +1 -0
- package/esm/Wiki/index.js +2 -0
- package/esm/Wiki/index.min.js +1 -0
- package/esm/Work/Work.js +184 -0
- package/esm/Work/Work.min.js +1 -0
- package/esm/Work/WorkClient.js +1128 -0
- package/esm/Work/WorkClient.min.js +1 -0
- package/esm/Work/index.js +2 -0
- package/esm/Work/index.min.js +1 -0
- package/esm/WorkItemTracking/WorkItemTracking.js +428 -0
- package/esm/WorkItemTracking/WorkItemTracking.min.js +1 -0
- package/esm/WorkItemTracking/WorkItemTrackingClient.js +1525 -0
- package/esm/WorkItemTracking/WorkItemTrackingClient.min.js +1 -0
- package/esm/WorkItemTracking/WorkItemTrackingServices.js +15 -0
- package/esm/WorkItemTracking/WorkItemTrackingServices.min.js +1 -0
- package/esm/WorkItemTracking/index.js +3 -0
- package/esm/WorkItemTracking/index.min.js +1 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.js +296 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1097 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -0
- package/esm/WorkItemTrackingProcess/index.js +2 -0
- package/esm/WorkItemTrackingProcess/index.min.js +1 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +93 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +886 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -0
- package/esm/WorkItemTrackingProcessDefinitions/index.js +2 -0
- package/esm/WorkItemTrackingProcessDefinitions/index.min.js +1 -0
- package/esm/index.js +1 -0
- package/esm/index.min.js +1 -0
- package/index.d.ts +1 -1
- package/index.js +17 -8
- package/index.min.js +1 -1
- package/package.json +232 -37
- package/Boards/Boards.d.ts +0 -631
- package/Boards/Boards.js +0 -26
- package/Boards/Boards.min.js +0 -1
- package/Boards/BoardsClient.d.ts +0 -187
- package/Boards/BoardsClient.js +0 -589
- package/Boards/BoardsClient.min.js +0 -1
- package/Boards/index.d.ts +0 -2
- package/Boards/index.js +0 -9
- package/Boards/index.min.js +0 -1
- package/_manifest/spdx_2.2/ESRPClientLogs0331143549591.json +0 -1
- package/_manifest/spdx_3.0/ESRPClientLogs0331143549461.json +0 -1
- package/_manifest/spdx_3.0/bsi.cose +0 -0
- package/_manifest/spdx_3.0/bsi.json +0 -1
- package/_manifest/spdx_3.0/manifest.cat +0 -0
- package/_manifest/spdx_3.0/manifest.spdx.cose +0 -0
|
@@ -0,0 +1,2946 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ---------------------------------------------------------
|
|
3
|
+
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* ---------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
import { RestClientBase } from "../Common/RestClientBase";
|
|
7
|
+
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
|
|
8
|
+
export class TaskAgentRestClient extends RestClientBase {
|
|
9
|
+
constructor(options) {
|
|
10
|
+
super(options);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @param agentCloud -
|
|
14
|
+
*/
|
|
15
|
+
async addAgentCloud(agentCloud) {
|
|
16
|
+
return this.beginRequest({
|
|
17
|
+
apiVersion: "7.2-preview.1",
|
|
18
|
+
method: "POST",
|
|
19
|
+
routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
|
|
20
|
+
body: agentCloud
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @param agentCloudId -
|
|
25
|
+
*/
|
|
26
|
+
async deleteAgentCloud(agentCloudId) {
|
|
27
|
+
return this.beginRequest({
|
|
28
|
+
apiVersion: "7.2-preview.1",
|
|
29
|
+
method: "DELETE",
|
|
30
|
+
routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
|
|
31
|
+
routeValues: {
|
|
32
|
+
agentCloudId: agentCloudId
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @param agentCloudId -
|
|
38
|
+
*/
|
|
39
|
+
async getAgentCloud(agentCloudId) {
|
|
40
|
+
return this.beginRequest({
|
|
41
|
+
apiVersion: "7.2-preview.1",
|
|
42
|
+
routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
|
|
43
|
+
routeValues: {
|
|
44
|
+
agentCloudId: agentCloudId
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
*/
|
|
50
|
+
async getAgentClouds() {
|
|
51
|
+
return this.beginRequest({
|
|
52
|
+
apiVersion: "7.2-preview.1",
|
|
53
|
+
routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}"
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @param updatedCloud -
|
|
58
|
+
* @param agentCloudId -
|
|
59
|
+
*/
|
|
60
|
+
async updateAgentCloud(updatedCloud, agentCloudId) {
|
|
61
|
+
return this.beginRequest({
|
|
62
|
+
apiVersion: "7.2-preview.1",
|
|
63
|
+
method: "PATCH",
|
|
64
|
+
routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
|
|
65
|
+
routeValues: {
|
|
66
|
+
agentCloudId: agentCloudId
|
|
67
|
+
},
|
|
68
|
+
body: updatedCloud
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get agent cloud types.
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
async getAgentCloudTypes() {
|
|
76
|
+
return this.beginRequest({
|
|
77
|
+
apiVersion: "7.2-preview.1",
|
|
78
|
+
routeTemplate: "_apis/distributedtask/agentcloudtypes"
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @param project - Project ID or project name
|
|
83
|
+
* @param queueId -
|
|
84
|
+
* @param top -
|
|
85
|
+
* @param continuationToken -
|
|
86
|
+
*/
|
|
87
|
+
async getAgentRequestsForQueue(project, queueId, top, continuationToken) {
|
|
88
|
+
const queryValues = {
|
|
89
|
+
'$top': top,
|
|
90
|
+
continuationToken: continuationToken
|
|
91
|
+
};
|
|
92
|
+
return this.beginRequest({
|
|
93
|
+
apiVersion: "7.2-preview.1",
|
|
94
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}/agentrequests/{requestId}",
|
|
95
|
+
routeValues: {
|
|
96
|
+
project: project,
|
|
97
|
+
queueId: queueId
|
|
98
|
+
},
|
|
99
|
+
queryParams: queryValues,
|
|
100
|
+
returnRawResponse: true
|
|
101
|
+
}).then(async (response) => {
|
|
102
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
103
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
104
|
+
return body;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @param request -
|
|
109
|
+
* @param project - Project ID or project name
|
|
110
|
+
* @param queueId -
|
|
111
|
+
*/
|
|
112
|
+
async queueAgentRequest(request, project, queueId) {
|
|
113
|
+
return this.beginRequest({
|
|
114
|
+
apiVersion: "7.2-preview.1",
|
|
115
|
+
method: "POST",
|
|
116
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}/agentrequests/{requestId}",
|
|
117
|
+
routeValues: {
|
|
118
|
+
project: project,
|
|
119
|
+
queueId: queueId
|
|
120
|
+
},
|
|
121
|
+
body: request
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package.
|
|
126
|
+
*
|
|
127
|
+
* @param agent - Details about the agent being added
|
|
128
|
+
* @param poolId - The agent pool in which to add the agent
|
|
129
|
+
*/
|
|
130
|
+
async addAgent(agent, poolId) {
|
|
131
|
+
return this.beginRequest({
|
|
132
|
+
apiVersion: "7.2-preview.1",
|
|
133
|
+
method: "POST",
|
|
134
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
|
|
135
|
+
routeValues: {
|
|
136
|
+
poolId: poolId
|
|
137
|
+
},
|
|
138
|
+
body: agent
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization.
|
|
143
|
+
*
|
|
144
|
+
* @param poolId - The pool ID to remove the agent from
|
|
145
|
+
* @param agentId - The agent ID to remove
|
|
146
|
+
*/
|
|
147
|
+
async deleteAgent(poolId, agentId) {
|
|
148
|
+
return this.beginRequest({
|
|
149
|
+
apiVersion: "7.2-preview.1",
|
|
150
|
+
method: "DELETE",
|
|
151
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
|
|
152
|
+
routeValues: {
|
|
153
|
+
poolId: poolId,
|
|
154
|
+
agentId: agentId
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Get information about an agent.
|
|
160
|
+
*
|
|
161
|
+
* @param poolId - The agent pool containing the agent
|
|
162
|
+
* @param agentId - The agent ID to get information about
|
|
163
|
+
* @param includeCapabilities - Whether to include the agent's capabilities in the response
|
|
164
|
+
* @param includeAssignedRequest - Whether to include details about the agent's current work
|
|
165
|
+
* @param includeLastCompletedRequest - Whether to include details about the agents' most recent completed work
|
|
166
|
+
* @param propertyFilters - Filter which custom properties will be returned
|
|
167
|
+
*/
|
|
168
|
+
async getAgent(poolId, agentId, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters) {
|
|
169
|
+
const queryValues = {
|
|
170
|
+
includeCapabilities: includeCapabilities,
|
|
171
|
+
includeAssignedRequest: includeAssignedRequest,
|
|
172
|
+
includeLastCompletedRequest: includeLastCompletedRequest,
|
|
173
|
+
propertyFilters: propertyFilters && propertyFilters.join(",")
|
|
174
|
+
};
|
|
175
|
+
return this.beginRequest({
|
|
176
|
+
apiVersion: "7.2-preview.1",
|
|
177
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
|
|
178
|
+
routeValues: {
|
|
179
|
+
poolId: poolId,
|
|
180
|
+
agentId: agentId
|
|
181
|
+
},
|
|
182
|
+
queryParams: queryValues
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get a list of agents.
|
|
187
|
+
*
|
|
188
|
+
* @param poolId - The agent pool containing the agents
|
|
189
|
+
* @param agentName - Filter on agent name
|
|
190
|
+
* @param includeCapabilities - Whether to include the agents' capabilities in the response
|
|
191
|
+
* @param includeAssignedRequest - Whether to include details about the agents' current work
|
|
192
|
+
* @param includeLastCompletedRequest - Whether to include details about the agents' most recent completed work
|
|
193
|
+
* @param propertyFilters - Filter which custom properties will be returned
|
|
194
|
+
* @param demands - Filter by demands the agents can satisfy
|
|
195
|
+
*/
|
|
196
|
+
async getAgents(poolId, agentName, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters, demands) {
|
|
197
|
+
const queryValues = {
|
|
198
|
+
agentName: agentName,
|
|
199
|
+
includeCapabilities: includeCapabilities,
|
|
200
|
+
includeAssignedRequest: includeAssignedRequest,
|
|
201
|
+
includeLastCompletedRequest: includeLastCompletedRequest,
|
|
202
|
+
propertyFilters: propertyFilters && propertyFilters.join(","),
|
|
203
|
+
demands: demands && demands.join(",")
|
|
204
|
+
};
|
|
205
|
+
return this.beginRequest({
|
|
206
|
+
apiVersion: "7.2-preview.1",
|
|
207
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
|
|
208
|
+
routeValues: {
|
|
209
|
+
poolId: poolId
|
|
210
|
+
},
|
|
211
|
+
queryParams: queryValues
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization.
|
|
216
|
+
*
|
|
217
|
+
* @param agent - Updated details about the replacing agent
|
|
218
|
+
* @param poolId - The agent pool to use
|
|
219
|
+
* @param agentId - The agent to replace
|
|
220
|
+
*/
|
|
221
|
+
async replaceAgent(agent, poolId, agentId) {
|
|
222
|
+
return this.beginRequest({
|
|
223
|
+
apiVersion: "7.2-preview.1",
|
|
224
|
+
method: "PUT",
|
|
225
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
|
|
226
|
+
routeValues: {
|
|
227
|
+
poolId: poolId,
|
|
228
|
+
agentId: agentId
|
|
229
|
+
},
|
|
230
|
+
body: agent
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Update agent details.
|
|
235
|
+
*
|
|
236
|
+
* @param agent - Updated details about the agent
|
|
237
|
+
* @param poolId - The agent pool to use
|
|
238
|
+
* @param agentId - The agent to update
|
|
239
|
+
*/
|
|
240
|
+
async updateAgent(agent, poolId, agentId) {
|
|
241
|
+
return this.beginRequest({
|
|
242
|
+
apiVersion: "7.2-preview.1",
|
|
243
|
+
method: "PATCH",
|
|
244
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
|
|
245
|
+
routeValues: {
|
|
246
|
+
poolId: poolId,
|
|
247
|
+
agentId: agentId
|
|
248
|
+
},
|
|
249
|
+
body: agent
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Returns list of azure subscriptions
|
|
254
|
+
*
|
|
255
|
+
*/
|
|
256
|
+
async getAzureManagementGroups() {
|
|
257
|
+
return this.beginRequest({
|
|
258
|
+
apiVersion: "7.2-preview.1",
|
|
259
|
+
routeTemplate: "_apis/distributedtask/serviceendpointproxy/azurermmanagementgroups"
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Returns list of azure subscriptions
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
266
|
+
async getAzureSubscriptions() {
|
|
267
|
+
return this.beginRequest({
|
|
268
|
+
apiVersion: "7.2-preview.1",
|
|
269
|
+
routeTemplate: "_apis/distributedtask/serviceendpointproxy/azurermsubscriptions"
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* GET a PAT token for managing (configuring, removing, tagging) deployment targets in a deployment group.
|
|
274
|
+
*
|
|
275
|
+
* @param project - Project ID or project name
|
|
276
|
+
* @param deploymentGroupId - ID of the deployment group in which deployment targets are managed.
|
|
277
|
+
*/
|
|
278
|
+
async generateDeploymentGroupAccessToken(project, deploymentGroupId) {
|
|
279
|
+
return this.beginRequest({
|
|
280
|
+
apiVersion: "7.2-preview.1",
|
|
281
|
+
method: "POST",
|
|
282
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroupaccesstoken/{deploymentGroupId}",
|
|
283
|
+
routeValues: {
|
|
284
|
+
project: project,
|
|
285
|
+
deploymentGroupId: deploymentGroupId
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Create a deployment group.
|
|
291
|
+
*
|
|
292
|
+
* @param deploymentGroup - Deployment group to create.
|
|
293
|
+
* @param project - Project ID or project name
|
|
294
|
+
*/
|
|
295
|
+
async addDeploymentGroup(deploymentGroup, project) {
|
|
296
|
+
return this.beginRequest({
|
|
297
|
+
apiVersion: "7.2-preview.1",
|
|
298
|
+
method: "POST",
|
|
299
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
|
|
300
|
+
routeValues: {
|
|
301
|
+
project: project
|
|
302
|
+
},
|
|
303
|
+
body: deploymentGroup
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Delete a deployment group.
|
|
308
|
+
*
|
|
309
|
+
* @param project - Project ID or project name
|
|
310
|
+
* @param deploymentGroupId - ID of the deployment group to be deleted.
|
|
311
|
+
*/
|
|
312
|
+
async deleteDeploymentGroup(project, deploymentGroupId) {
|
|
313
|
+
return this.beginRequest({
|
|
314
|
+
apiVersion: "7.2-preview.1",
|
|
315
|
+
method: "DELETE",
|
|
316
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
|
|
317
|
+
routeValues: {
|
|
318
|
+
project: project,
|
|
319
|
+
deploymentGroupId: deploymentGroupId
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Get a deployment group by its ID.
|
|
325
|
+
*
|
|
326
|
+
* @param project - Project ID or project name
|
|
327
|
+
* @param deploymentGroupId - ID of the deployment group.
|
|
328
|
+
* @param actionFilter - Get the deployment group only if this action can be performed on it.
|
|
329
|
+
* @param expand - Include these additional details in the returned object.
|
|
330
|
+
*/
|
|
331
|
+
async getDeploymentGroup(project, deploymentGroupId, actionFilter, expand) {
|
|
332
|
+
const queryValues = {
|
|
333
|
+
actionFilter: actionFilter,
|
|
334
|
+
'$expand': expand
|
|
335
|
+
};
|
|
336
|
+
return this.beginRequest({
|
|
337
|
+
apiVersion: "7.2-preview.1",
|
|
338
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
|
|
339
|
+
routeValues: {
|
|
340
|
+
project: project,
|
|
341
|
+
deploymentGroupId: deploymentGroupId
|
|
342
|
+
},
|
|
343
|
+
queryParams: queryValues
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Get a list of deployment groups by name or IDs.
|
|
348
|
+
*
|
|
349
|
+
* @param project - Project ID or project name
|
|
350
|
+
* @param name - Name of the deployment group.
|
|
351
|
+
* @param actionFilter - Get only deployment groups on which this action can be performed.
|
|
352
|
+
* @param expand - Include these additional details in the returned objects.
|
|
353
|
+
* @param continuationToken - Get deployment groups with names greater than this continuationToken lexicographically.
|
|
354
|
+
* @param top - Maximum number of deployment groups to return. Default is **1000**.
|
|
355
|
+
* @param ids - Comma separated list of IDs of the deployment groups.
|
|
356
|
+
*/
|
|
357
|
+
async getDeploymentGroups(project, name, actionFilter, expand, continuationToken, top, ids) {
|
|
358
|
+
const queryValues = {
|
|
359
|
+
name: name,
|
|
360
|
+
actionFilter: actionFilter,
|
|
361
|
+
'$expand': expand,
|
|
362
|
+
continuationToken: continuationToken,
|
|
363
|
+
'$top': top,
|
|
364
|
+
ids: ids && ids.join(",")
|
|
365
|
+
};
|
|
366
|
+
return this.beginRequest({
|
|
367
|
+
apiVersion: "7.2-preview.1",
|
|
368
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
|
|
369
|
+
routeValues: {
|
|
370
|
+
project: project
|
|
371
|
+
},
|
|
372
|
+
queryParams: queryValues,
|
|
373
|
+
returnRawResponse: true
|
|
374
|
+
}).then(async (response) => {
|
|
375
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
376
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
377
|
+
return body;
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Update a deployment group.
|
|
382
|
+
*
|
|
383
|
+
* @param deploymentGroup - Deployment group to update.
|
|
384
|
+
* @param project - Project ID or project name
|
|
385
|
+
* @param deploymentGroupId - ID of the deployment group.
|
|
386
|
+
*/
|
|
387
|
+
async updateDeploymentGroup(deploymentGroup, project, deploymentGroupId) {
|
|
388
|
+
return this.beginRequest({
|
|
389
|
+
apiVersion: "7.2-preview.1",
|
|
390
|
+
method: "PATCH",
|
|
391
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
|
|
392
|
+
routeValues: {
|
|
393
|
+
project: project,
|
|
394
|
+
deploymentGroupId: deploymentGroupId
|
|
395
|
+
},
|
|
396
|
+
body: deploymentGroup
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Get a list of deployment group metrics.
|
|
401
|
+
*
|
|
402
|
+
* @param project - Project ID or project name
|
|
403
|
+
* @param deploymentGroupName - Name of the deployment group.
|
|
404
|
+
* @param continuationToken - Get metrics for deployment groups with names greater than this continuationToken lexicographically.
|
|
405
|
+
* @param top - Maximum number of deployment group metrics to return. Default is **50**.
|
|
406
|
+
*/
|
|
407
|
+
async getDeploymentGroupsMetrics(project, deploymentGroupName, continuationToken, top) {
|
|
408
|
+
const queryValues = {
|
|
409
|
+
deploymentGroupName: deploymentGroupName,
|
|
410
|
+
continuationToken: continuationToken,
|
|
411
|
+
'$top': top
|
|
412
|
+
};
|
|
413
|
+
return this.beginRequest({
|
|
414
|
+
apiVersion: "7.2-preview.1",
|
|
415
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/deploymentgroupsmetrics",
|
|
416
|
+
routeValues: {
|
|
417
|
+
project: project
|
|
418
|
+
},
|
|
419
|
+
queryParams: queryValues,
|
|
420
|
+
returnRawResponse: true
|
|
421
|
+
}).then(async (response) => {
|
|
422
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
423
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
424
|
+
return body;
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* @param project - Project ID or project name
|
|
429
|
+
* @param deploymentGroupId -
|
|
430
|
+
* @param machineId -
|
|
431
|
+
* @param completedRequestCount -
|
|
432
|
+
*/
|
|
433
|
+
async getAgentRequestsForDeploymentMachine(project, deploymentGroupId, machineId, completedRequestCount) {
|
|
434
|
+
const queryValues = {
|
|
435
|
+
machineId: machineId,
|
|
436
|
+
completedRequestCount: completedRequestCount
|
|
437
|
+
};
|
|
438
|
+
return this.beginRequest({
|
|
439
|
+
apiVersion: "7.2-preview.1",
|
|
440
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",
|
|
441
|
+
routeValues: {
|
|
442
|
+
project: project,
|
|
443
|
+
deploymentGroupId: deploymentGroupId
|
|
444
|
+
},
|
|
445
|
+
queryParams: queryValues
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* @param project - Project ID or project name
|
|
450
|
+
* @param deploymentGroupId -
|
|
451
|
+
* @param machineIds -
|
|
452
|
+
* @param completedRequestCount -
|
|
453
|
+
*/
|
|
454
|
+
async getAgentRequestsForDeploymentMachines(project, deploymentGroupId, machineIds, completedRequestCount) {
|
|
455
|
+
const queryValues = {
|
|
456
|
+
machineIds: machineIds && machineIds.join(","),
|
|
457
|
+
completedRequestCount: completedRequestCount
|
|
458
|
+
};
|
|
459
|
+
return this.beginRequest({
|
|
460
|
+
apiVersion: "7.2-preview.1",
|
|
461
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",
|
|
462
|
+
routeValues: {
|
|
463
|
+
project: project,
|
|
464
|
+
deploymentGroupId: deploymentGroupId
|
|
465
|
+
},
|
|
466
|
+
queryParams: queryValues
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* @param project - Project ID or project name
|
|
471
|
+
* @param deploymentGroupId -
|
|
472
|
+
*/
|
|
473
|
+
async refreshDeploymentMachines(project, deploymentGroupId) {
|
|
474
|
+
return this.beginRequest({
|
|
475
|
+
apiVersion: "7.2-preview.1",
|
|
476
|
+
method: "POST",
|
|
477
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinemessages",
|
|
478
|
+
routeValues: {
|
|
479
|
+
project: project,
|
|
480
|
+
deploymentGroupId: deploymentGroupId
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* GET a PAT token for managing (configuring, removing, tagging) deployment agents in a deployment pool.
|
|
486
|
+
*
|
|
487
|
+
* @param poolId - ID of the deployment pool in which deployment agents are managed.
|
|
488
|
+
*/
|
|
489
|
+
async generateDeploymentPoolAccessToken(poolId) {
|
|
490
|
+
return this.beginRequest({
|
|
491
|
+
apiVersion: "7.2-preview.1",
|
|
492
|
+
method: "POST",
|
|
493
|
+
routeTemplate: "_apis/distributedtask/deploymentpoolaccesstoken/{poolId}",
|
|
494
|
+
routeValues: {
|
|
495
|
+
poolId: poolId
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Get a list of deployment pool summaries.
|
|
501
|
+
*
|
|
502
|
+
* @param poolName - Name of the deployment pool.
|
|
503
|
+
* @param expands - Include these additional details in the returned objects.
|
|
504
|
+
* @param poolIds - List of deployment pool ids.
|
|
505
|
+
*/
|
|
506
|
+
async getDeploymentPoolsSummary(poolName, expands, poolIds) {
|
|
507
|
+
const queryValues = {
|
|
508
|
+
poolName: poolName,
|
|
509
|
+
expands: expands,
|
|
510
|
+
poolIds: poolIds && poolIds.join(",")
|
|
511
|
+
};
|
|
512
|
+
return this.beginRequest({
|
|
513
|
+
apiVersion: "7.2-preview.1",
|
|
514
|
+
routeTemplate: "_apis/distributedtask/deploymentPools/deploymentPoolsSummary",
|
|
515
|
+
queryParams: queryValues
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Get agent requests for a deployment target.
|
|
520
|
+
*
|
|
521
|
+
* @param project - Project ID or project name
|
|
522
|
+
* @param deploymentGroupId - ID of the deployment group to which the target belongs.
|
|
523
|
+
* @param targetId - ID of the deployment target.
|
|
524
|
+
* @param completedRequestCount - Maximum number of completed requests to return. Default is **50**
|
|
525
|
+
*/
|
|
526
|
+
async getAgentRequestsForDeploymentTarget(project, deploymentGroupId, targetId, completedRequestCount) {
|
|
527
|
+
const queryValues = {
|
|
528
|
+
targetId: targetId,
|
|
529
|
+
completedRequestCount: completedRequestCount
|
|
530
|
+
};
|
|
531
|
+
return this.beginRequest({
|
|
532
|
+
apiVersion: "7.2-preview.1",
|
|
533
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",
|
|
534
|
+
routeValues: {
|
|
535
|
+
project: project,
|
|
536
|
+
deploymentGroupId: deploymentGroupId
|
|
537
|
+
},
|
|
538
|
+
queryParams: queryValues
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Get agent requests for a list deployment targets.
|
|
543
|
+
*
|
|
544
|
+
* @param project - Project ID or project name
|
|
545
|
+
* @param deploymentGroupId - ID of the deployment group to which the targets belong.
|
|
546
|
+
* @param targetIds - Comma separated list of IDs of the deployment targets.
|
|
547
|
+
* @param ownerId - Id of owner of agent job request.
|
|
548
|
+
* @param completedOn - Datetime to return request after this time.
|
|
549
|
+
* @param completedRequestCount - Maximum number of completed requests to return for each target. Default is **50**
|
|
550
|
+
*/
|
|
551
|
+
async getAgentRequestsForDeploymentTargets(project, deploymentGroupId, targetIds, ownerId, completedOn, completedRequestCount) {
|
|
552
|
+
const queryValues = {
|
|
553
|
+
targetIds: targetIds && targetIds.join(","),
|
|
554
|
+
ownerId: ownerId,
|
|
555
|
+
completedOn: completedOn,
|
|
556
|
+
completedRequestCount: completedRequestCount
|
|
557
|
+
};
|
|
558
|
+
return this.beginRequest({
|
|
559
|
+
apiVersion: "7.2-preview.1",
|
|
560
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",
|
|
561
|
+
routeValues: {
|
|
562
|
+
project: project,
|
|
563
|
+
deploymentGroupId: deploymentGroupId
|
|
564
|
+
},
|
|
565
|
+
queryParams: queryValues
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Upgrade the deployment targets in a deployment group.
|
|
570
|
+
*
|
|
571
|
+
* @param project - Project ID or project name
|
|
572
|
+
* @param deploymentGroupId - ID of the deployment group.
|
|
573
|
+
*/
|
|
574
|
+
async refreshDeploymentTargets(project, deploymentGroupId) {
|
|
575
|
+
return this.beginRequest({
|
|
576
|
+
apiVersion: "7.2-preview.1",
|
|
577
|
+
method: "POST",
|
|
578
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetMessages",
|
|
579
|
+
routeValues: {
|
|
580
|
+
project: project,
|
|
581
|
+
deploymentGroupId: deploymentGroupId
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector.
|
|
587
|
+
*
|
|
588
|
+
* @param endpoint - Describes the URL to fetch.
|
|
589
|
+
*/
|
|
590
|
+
async queryEndpoint(endpoint) {
|
|
591
|
+
return this.beginRequest({
|
|
592
|
+
apiVersion: "7.2-preview.1",
|
|
593
|
+
method: "POST",
|
|
594
|
+
routeTemplate: "_apis/distributedtask/endpoint",
|
|
595
|
+
body: endpoint
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Get environment deployment execution history
|
|
600
|
+
*
|
|
601
|
+
* @param project - Project ID or project name
|
|
602
|
+
* @param environmentId -
|
|
603
|
+
* @param continuationToken -
|
|
604
|
+
* @param top -
|
|
605
|
+
*/
|
|
606
|
+
async getEnvironmentDeploymentExecutionRecords(project, environmentId, continuationToken, top) {
|
|
607
|
+
const queryValues = {
|
|
608
|
+
continuationToken: continuationToken,
|
|
609
|
+
top: top
|
|
610
|
+
};
|
|
611
|
+
return this.beginRequest({
|
|
612
|
+
apiVersion: "7.2-preview.1",
|
|
613
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/environmentdeploymentRecords",
|
|
614
|
+
routeValues: {
|
|
615
|
+
project: project,
|
|
616
|
+
environmentId: environmentId
|
|
617
|
+
},
|
|
618
|
+
queryParams: queryValues,
|
|
619
|
+
returnRawResponse: true
|
|
620
|
+
}).then(async (response) => {
|
|
621
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
622
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
623
|
+
return body;
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Create an environment.
|
|
628
|
+
*
|
|
629
|
+
* @param environmentCreateParameter - Environment to create.
|
|
630
|
+
* @param project - Project ID or project name
|
|
631
|
+
*/
|
|
632
|
+
async addEnvironment(environmentCreateParameter, project) {
|
|
633
|
+
return this.beginRequest({
|
|
634
|
+
apiVersion: "7.2-preview.1",
|
|
635
|
+
method: "POST",
|
|
636
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
|
|
637
|
+
routeValues: {
|
|
638
|
+
project: project
|
|
639
|
+
},
|
|
640
|
+
body: environmentCreateParameter
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Delete the specified environment.
|
|
645
|
+
*
|
|
646
|
+
* @param project - Project ID or project name
|
|
647
|
+
* @param environmentId - ID of the environment.
|
|
648
|
+
*/
|
|
649
|
+
async deleteEnvironment(project, environmentId) {
|
|
650
|
+
return this.beginRequest({
|
|
651
|
+
apiVersion: "7.2-preview.1",
|
|
652
|
+
method: "DELETE",
|
|
653
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
|
|
654
|
+
routeValues: {
|
|
655
|
+
project: project,
|
|
656
|
+
environmentId: environmentId
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Get an environment by its ID.
|
|
662
|
+
*
|
|
663
|
+
* @param project - Project ID or project name
|
|
664
|
+
* @param environmentId - ID of the environment.
|
|
665
|
+
* @param expands - Include these additional details in the returned objects.
|
|
666
|
+
*/
|
|
667
|
+
async getEnvironmentById(project, environmentId, expands) {
|
|
668
|
+
const queryValues = {
|
|
669
|
+
expands: expands
|
|
670
|
+
};
|
|
671
|
+
return this.beginRequest({
|
|
672
|
+
apiVersion: "7.2-preview.1",
|
|
673
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
|
|
674
|
+
routeValues: {
|
|
675
|
+
project: project,
|
|
676
|
+
environmentId: environmentId
|
|
677
|
+
},
|
|
678
|
+
queryParams: queryValues
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Get all environments.
|
|
683
|
+
*
|
|
684
|
+
* @param project - Project ID or project name
|
|
685
|
+
* @param name -
|
|
686
|
+
* @param continuationToken -
|
|
687
|
+
* @param top -
|
|
688
|
+
*/
|
|
689
|
+
async getEnvironments(project, name, continuationToken, top) {
|
|
690
|
+
const queryValues = {
|
|
691
|
+
name: name,
|
|
692
|
+
continuationToken: continuationToken,
|
|
693
|
+
'$top': top
|
|
694
|
+
};
|
|
695
|
+
return this.beginRequest({
|
|
696
|
+
apiVersion: "7.2-preview.1",
|
|
697
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
|
|
698
|
+
routeValues: {
|
|
699
|
+
project: project
|
|
700
|
+
},
|
|
701
|
+
queryParams: queryValues,
|
|
702
|
+
returnRawResponse: true
|
|
703
|
+
}).then(async (response) => {
|
|
704
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
705
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
706
|
+
return body;
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Update the specified environment.
|
|
711
|
+
*
|
|
712
|
+
* @param environmentUpdateParameter - Environment data to update.
|
|
713
|
+
* @param project - Project ID or project name
|
|
714
|
+
* @param environmentId - ID of the environment.
|
|
715
|
+
*/
|
|
716
|
+
async updateEnvironment(environmentUpdateParameter, project, environmentId) {
|
|
717
|
+
return this.beginRequest({
|
|
718
|
+
apiVersion: "7.2-preview.1",
|
|
719
|
+
method: "PATCH",
|
|
720
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
|
|
721
|
+
routeValues: {
|
|
722
|
+
project: project,
|
|
723
|
+
environmentId: environmentId
|
|
724
|
+
},
|
|
725
|
+
body: environmentUpdateParameter
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* @param hubName -
|
|
730
|
+
* @param includeEnterpriseUsersCount -
|
|
731
|
+
* @param includeHostedAgentMinutesCount -
|
|
732
|
+
*/
|
|
733
|
+
async getTaskHubLicenseDetails(hubName, includeEnterpriseUsersCount, includeHostedAgentMinutesCount) {
|
|
734
|
+
const queryValues = {
|
|
735
|
+
includeEnterpriseUsersCount: includeEnterpriseUsersCount,
|
|
736
|
+
includeHostedAgentMinutesCount: includeHostedAgentMinutesCount
|
|
737
|
+
};
|
|
738
|
+
return this.beginRequest({
|
|
739
|
+
apiVersion: "7.2-preview.3",
|
|
740
|
+
routeTemplate: "_apis/distributedtask/hublicense/{hubName}",
|
|
741
|
+
routeValues: {
|
|
742
|
+
hubName: hubName
|
|
743
|
+
},
|
|
744
|
+
queryParams: queryValues
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* @param taskHubLicenseDetails -
|
|
749
|
+
* @param hubName -
|
|
750
|
+
*/
|
|
751
|
+
async updateTaskHubLicenseDetails(taskHubLicenseDetails, hubName) {
|
|
752
|
+
return this.beginRequest({
|
|
753
|
+
apiVersion: "7.2-preview.3",
|
|
754
|
+
method: "PUT",
|
|
755
|
+
routeTemplate: "_apis/distributedtask/hublicense/{hubName}",
|
|
756
|
+
routeValues: {
|
|
757
|
+
hubName: hubName
|
|
758
|
+
},
|
|
759
|
+
body: taskHubLicenseDetails
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* @param inputValidationRequest -
|
|
764
|
+
*/
|
|
765
|
+
async validateInputs(inputValidationRequest) {
|
|
766
|
+
return this.beginRequest({
|
|
767
|
+
apiVersion: "7.2-preview.1",
|
|
768
|
+
method: "POST",
|
|
769
|
+
routeTemplate: "_apis/distributedtask/inputvalidation",
|
|
770
|
+
body: inputValidationRequest
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* @param poolId -
|
|
775
|
+
* @param requestId -
|
|
776
|
+
* @param lockToken -
|
|
777
|
+
* @param result -
|
|
778
|
+
* @param agentShuttingDown -
|
|
779
|
+
*/
|
|
780
|
+
async deleteAgentRequest(poolId, requestId, lockToken, result, agentShuttingDown) {
|
|
781
|
+
const queryValues = {
|
|
782
|
+
lockToken: lockToken,
|
|
783
|
+
result: result,
|
|
784
|
+
agentShuttingDown: agentShuttingDown
|
|
785
|
+
};
|
|
786
|
+
return this.beginRequest({
|
|
787
|
+
apiVersion: "7.2-preview.1",
|
|
788
|
+
method: "DELETE",
|
|
789
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
790
|
+
routeValues: {
|
|
791
|
+
poolId: poolId,
|
|
792
|
+
requestId: requestId
|
|
793
|
+
},
|
|
794
|
+
queryParams: queryValues
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* @param poolId -
|
|
799
|
+
* @param requestId -
|
|
800
|
+
* @param includeStatus -
|
|
801
|
+
*/
|
|
802
|
+
async getAgentRequest(poolId, requestId, includeStatus) {
|
|
803
|
+
const queryValues = {
|
|
804
|
+
includeStatus: includeStatus
|
|
805
|
+
};
|
|
806
|
+
return this.beginRequest({
|
|
807
|
+
apiVersion: "7.2-preview.1",
|
|
808
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
809
|
+
routeValues: {
|
|
810
|
+
poolId: poolId,
|
|
811
|
+
requestId: requestId
|
|
812
|
+
},
|
|
813
|
+
queryParams: queryValues
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* @param poolId -
|
|
818
|
+
* @param top -
|
|
819
|
+
* @param continuationToken -
|
|
820
|
+
*/
|
|
821
|
+
async getAgentRequests(poolId, top, continuationToken) {
|
|
822
|
+
const queryValues = {
|
|
823
|
+
'$top': top,
|
|
824
|
+
continuationToken: continuationToken
|
|
825
|
+
};
|
|
826
|
+
return this.beginRequest({
|
|
827
|
+
apiVersion: "7.2-preview.1",
|
|
828
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
829
|
+
routeValues: {
|
|
830
|
+
poolId: poolId
|
|
831
|
+
},
|
|
832
|
+
queryParams: queryValues,
|
|
833
|
+
returnRawResponse: true
|
|
834
|
+
}).then(async (response) => {
|
|
835
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
836
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
837
|
+
return body;
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* @param poolId -
|
|
842
|
+
* @param agentId -
|
|
843
|
+
* @param completedRequestCount -
|
|
844
|
+
*/
|
|
845
|
+
async getAgentRequestsForAgent(poolId, agentId, completedRequestCount) {
|
|
846
|
+
const queryValues = {
|
|
847
|
+
agentId: agentId,
|
|
848
|
+
completedRequestCount: completedRequestCount
|
|
849
|
+
};
|
|
850
|
+
return this.beginRequest({
|
|
851
|
+
apiVersion: "7.2-preview.1",
|
|
852
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
853
|
+
routeValues: {
|
|
854
|
+
poolId: poolId
|
|
855
|
+
},
|
|
856
|
+
queryParams: queryValues
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* @param poolId -
|
|
861
|
+
* @param agentIds -
|
|
862
|
+
* @param completedRequestCount -
|
|
863
|
+
*/
|
|
864
|
+
async getAgentRequestsForAgents(poolId, agentIds, completedRequestCount) {
|
|
865
|
+
const queryValues = {
|
|
866
|
+
agentIds: agentIds && agentIds.join(","),
|
|
867
|
+
completedRequestCount: completedRequestCount
|
|
868
|
+
};
|
|
869
|
+
return this.beginRequest({
|
|
870
|
+
apiVersion: "7.2-preview.1",
|
|
871
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
872
|
+
routeValues: {
|
|
873
|
+
poolId: poolId
|
|
874
|
+
},
|
|
875
|
+
queryParams: queryValues
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* @param poolId -
|
|
880
|
+
* @param planId -
|
|
881
|
+
* @param jobId -
|
|
882
|
+
*/
|
|
883
|
+
async getAgentRequestsForPlan(poolId, planId, jobId) {
|
|
884
|
+
const queryValues = {
|
|
885
|
+
planId: planId,
|
|
886
|
+
jobId: jobId
|
|
887
|
+
};
|
|
888
|
+
return this.beginRequest({
|
|
889
|
+
apiVersion: "7.2-preview.1",
|
|
890
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
891
|
+
routeValues: {
|
|
892
|
+
poolId: poolId
|
|
893
|
+
},
|
|
894
|
+
queryParams: queryValues
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* @param request -
|
|
899
|
+
* @param poolId -
|
|
900
|
+
*/
|
|
901
|
+
async queueAgentRequestByPool(request, poolId) {
|
|
902
|
+
return this.beginRequest({
|
|
903
|
+
apiVersion: "7.2-preview.1",
|
|
904
|
+
method: "POST",
|
|
905
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
906
|
+
routeValues: {
|
|
907
|
+
poolId: poolId
|
|
908
|
+
},
|
|
909
|
+
body: request
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* @param request -
|
|
914
|
+
* @param poolId -
|
|
915
|
+
* @param requestId -
|
|
916
|
+
* @param lockToken -
|
|
917
|
+
* @param updateOptions -
|
|
918
|
+
*/
|
|
919
|
+
async updateAgentRequest(request, poolId, requestId, lockToken, updateOptions) {
|
|
920
|
+
const queryValues = {
|
|
921
|
+
lockToken: lockToken,
|
|
922
|
+
updateOptions: updateOptions
|
|
923
|
+
};
|
|
924
|
+
return this.beginRequest({
|
|
925
|
+
apiVersion: "7.2-preview.1",
|
|
926
|
+
method: "PATCH",
|
|
927
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
|
|
928
|
+
routeValues: {
|
|
929
|
+
poolId: poolId,
|
|
930
|
+
requestId: requestId
|
|
931
|
+
},
|
|
932
|
+
queryParams: queryValues,
|
|
933
|
+
body: request
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* @param createParameters -
|
|
938
|
+
* @param project - Project ID or project name
|
|
939
|
+
* @param environmentId -
|
|
940
|
+
*/
|
|
941
|
+
async addKubernetesResource(createParameters, project, environmentId) {
|
|
942
|
+
return this.beginRequest({
|
|
943
|
+
apiVersion: "7.2-preview.1",
|
|
944
|
+
method: "POST",
|
|
945
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}",
|
|
946
|
+
routeValues: {
|
|
947
|
+
project: project,
|
|
948
|
+
environmentId: environmentId
|
|
949
|
+
},
|
|
950
|
+
body: createParameters
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* @param project - Project ID or project name
|
|
955
|
+
* @param environmentId -
|
|
956
|
+
* @param resourceId -
|
|
957
|
+
*/
|
|
958
|
+
async deleteKubernetesResource(project, environmentId, resourceId) {
|
|
959
|
+
return this.beginRequest({
|
|
960
|
+
apiVersion: "7.2-preview.1",
|
|
961
|
+
method: "DELETE",
|
|
962
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}",
|
|
963
|
+
routeValues: {
|
|
964
|
+
project: project,
|
|
965
|
+
environmentId: environmentId,
|
|
966
|
+
resourceId: resourceId
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* @param project - Project ID or project name
|
|
972
|
+
* @param environmentId -
|
|
973
|
+
* @param resourceId -
|
|
974
|
+
*/
|
|
975
|
+
async getKubernetesResource(project, environmentId, resourceId) {
|
|
976
|
+
return this.beginRequest({
|
|
977
|
+
apiVersion: "7.2-preview.1",
|
|
978
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}",
|
|
979
|
+
routeValues: {
|
|
980
|
+
project: project,
|
|
981
|
+
environmentId: environmentId,
|
|
982
|
+
resourceId: resourceId
|
|
983
|
+
}
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* @param project - Project ID or project name
|
|
988
|
+
* @param machineGroupId -
|
|
989
|
+
*/
|
|
990
|
+
async generateDeploymentMachineGroupAccessToken(project, machineGroupId) {
|
|
991
|
+
return this.beginRequest({
|
|
992
|
+
apiVersion: "7.2-preview.1",
|
|
993
|
+
method: "POST",
|
|
994
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroupaccesstoken/{machineGroupId}",
|
|
995
|
+
routeValues: {
|
|
996
|
+
project: project,
|
|
997
|
+
machineGroupId: machineGroupId
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* @param machineGroup -
|
|
1003
|
+
* @param project - Project ID or project name
|
|
1004
|
+
*/
|
|
1005
|
+
async addDeploymentMachineGroup(machineGroup, project) {
|
|
1006
|
+
return this.beginRequest({
|
|
1007
|
+
apiVersion: "7.2-preview.1",
|
|
1008
|
+
method: "POST",
|
|
1009
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
|
|
1010
|
+
routeValues: {
|
|
1011
|
+
project: project
|
|
1012
|
+
},
|
|
1013
|
+
body: machineGroup
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* @param project - Project ID or project name
|
|
1018
|
+
* @param machineGroupId -
|
|
1019
|
+
*/
|
|
1020
|
+
async deleteDeploymentMachineGroup(project, machineGroupId) {
|
|
1021
|
+
return this.beginRequest({
|
|
1022
|
+
apiVersion: "7.2-preview.1",
|
|
1023
|
+
method: "DELETE",
|
|
1024
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
|
|
1025
|
+
routeValues: {
|
|
1026
|
+
project: project,
|
|
1027
|
+
machineGroupId: machineGroupId
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1032
|
+
* @param project - Project ID or project name
|
|
1033
|
+
* @param machineGroupId -
|
|
1034
|
+
* @param actionFilter -
|
|
1035
|
+
*/
|
|
1036
|
+
async getDeploymentMachineGroup(project, machineGroupId, actionFilter) {
|
|
1037
|
+
const queryValues = {
|
|
1038
|
+
actionFilter: actionFilter
|
|
1039
|
+
};
|
|
1040
|
+
return this.beginRequest({
|
|
1041
|
+
apiVersion: "7.2-preview.1",
|
|
1042
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
|
|
1043
|
+
routeValues: {
|
|
1044
|
+
project: project,
|
|
1045
|
+
machineGroupId: machineGroupId
|
|
1046
|
+
},
|
|
1047
|
+
queryParams: queryValues
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* @param project - Project ID or project name
|
|
1052
|
+
* @param machineGroupName -
|
|
1053
|
+
* @param actionFilter -
|
|
1054
|
+
*/
|
|
1055
|
+
async getDeploymentMachineGroups(project, machineGroupName, actionFilter) {
|
|
1056
|
+
const queryValues = {
|
|
1057
|
+
machineGroupName: machineGroupName,
|
|
1058
|
+
actionFilter: actionFilter
|
|
1059
|
+
};
|
|
1060
|
+
return this.beginRequest({
|
|
1061
|
+
apiVersion: "7.2-preview.1",
|
|
1062
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
|
|
1063
|
+
routeValues: {
|
|
1064
|
+
project: project
|
|
1065
|
+
},
|
|
1066
|
+
queryParams: queryValues
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* @param machineGroup -
|
|
1071
|
+
* @param project - Project ID or project name
|
|
1072
|
+
* @param machineGroupId -
|
|
1073
|
+
*/
|
|
1074
|
+
async updateDeploymentMachineGroup(machineGroup, project, machineGroupId) {
|
|
1075
|
+
return this.beginRequest({
|
|
1076
|
+
apiVersion: "7.2-preview.1",
|
|
1077
|
+
method: "PATCH",
|
|
1078
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
|
|
1079
|
+
routeValues: {
|
|
1080
|
+
project: project,
|
|
1081
|
+
machineGroupId: machineGroupId
|
|
1082
|
+
},
|
|
1083
|
+
body: machineGroup
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* @param project - Project ID or project name
|
|
1088
|
+
* @param machineGroupId -
|
|
1089
|
+
* @param tagFilters -
|
|
1090
|
+
*/
|
|
1091
|
+
async getDeploymentMachineGroupMachines(project, machineGroupId, tagFilters) {
|
|
1092
|
+
const queryValues = {
|
|
1093
|
+
tagFilters: tagFilters && tagFilters.join(",")
|
|
1094
|
+
};
|
|
1095
|
+
return this.beginRequest({
|
|
1096
|
+
apiVersion: "7.2-preview.1",
|
|
1097
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",
|
|
1098
|
+
routeValues: {
|
|
1099
|
+
project: project,
|
|
1100
|
+
machineGroupId: machineGroupId
|
|
1101
|
+
},
|
|
1102
|
+
queryParams: queryValues
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* @param deploymentMachines -
|
|
1107
|
+
* @param project - Project ID or project name
|
|
1108
|
+
* @param machineGroupId -
|
|
1109
|
+
*/
|
|
1110
|
+
async updateDeploymentMachineGroupMachines(deploymentMachines, project, machineGroupId) {
|
|
1111
|
+
return this.beginRequest({
|
|
1112
|
+
apiVersion: "7.2-preview.1",
|
|
1113
|
+
method: "PATCH",
|
|
1114
|
+
routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",
|
|
1115
|
+
routeValues: {
|
|
1116
|
+
project: project,
|
|
1117
|
+
machineGroupId: machineGroupId
|
|
1118
|
+
},
|
|
1119
|
+
body: deploymentMachines
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* @param machine -
|
|
1124
|
+
* @param project - Project ID or project name
|
|
1125
|
+
* @param deploymentGroupId -
|
|
1126
|
+
*/
|
|
1127
|
+
async addDeploymentMachine(machine, project, deploymentGroupId) {
|
|
1128
|
+
return this.beginRequest({
|
|
1129
|
+
apiVersion: "7.2-preview.1",
|
|
1130
|
+
method: "POST",
|
|
1131
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
|
|
1132
|
+
routeValues: {
|
|
1133
|
+
project: project,
|
|
1134
|
+
deploymentGroupId: deploymentGroupId
|
|
1135
|
+
},
|
|
1136
|
+
body: machine
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* @param project - Project ID or project name
|
|
1141
|
+
* @param deploymentGroupId -
|
|
1142
|
+
* @param machineId -
|
|
1143
|
+
*/
|
|
1144
|
+
async deleteDeploymentMachine(project, deploymentGroupId, machineId) {
|
|
1145
|
+
return this.beginRequest({
|
|
1146
|
+
apiVersion: "7.2-preview.1",
|
|
1147
|
+
method: "DELETE",
|
|
1148
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
|
|
1149
|
+
routeValues: {
|
|
1150
|
+
project: project,
|
|
1151
|
+
deploymentGroupId: deploymentGroupId,
|
|
1152
|
+
machineId: machineId
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* @param project - Project ID or project name
|
|
1158
|
+
* @param deploymentGroupId -
|
|
1159
|
+
* @param machineId -
|
|
1160
|
+
* @param expand -
|
|
1161
|
+
*/
|
|
1162
|
+
async getDeploymentMachine(project, deploymentGroupId, machineId, expand) {
|
|
1163
|
+
const queryValues = {
|
|
1164
|
+
'$expand': expand
|
|
1165
|
+
};
|
|
1166
|
+
return this.beginRequest({
|
|
1167
|
+
apiVersion: "7.2-preview.1",
|
|
1168
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
|
|
1169
|
+
routeValues: {
|
|
1170
|
+
project: project,
|
|
1171
|
+
deploymentGroupId: deploymentGroupId,
|
|
1172
|
+
machineId: machineId
|
|
1173
|
+
},
|
|
1174
|
+
queryParams: queryValues
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* @param project - Project ID or project name
|
|
1179
|
+
* @param deploymentGroupId -
|
|
1180
|
+
* @param tags -
|
|
1181
|
+
* @param name -
|
|
1182
|
+
* @param expand -
|
|
1183
|
+
*/
|
|
1184
|
+
async getDeploymentMachines(project, deploymentGroupId, tags, name, expand) {
|
|
1185
|
+
const queryValues = {
|
|
1186
|
+
tags: tags && tags.join(","),
|
|
1187
|
+
name: name,
|
|
1188
|
+
'$expand': expand
|
|
1189
|
+
};
|
|
1190
|
+
return this.beginRequest({
|
|
1191
|
+
apiVersion: "7.2-preview.1",
|
|
1192
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
|
|
1193
|
+
routeValues: {
|
|
1194
|
+
project: project,
|
|
1195
|
+
deploymentGroupId: deploymentGroupId
|
|
1196
|
+
},
|
|
1197
|
+
queryParams: queryValues
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* @param machine -
|
|
1202
|
+
* @param project - Project ID or project name
|
|
1203
|
+
* @param deploymentGroupId -
|
|
1204
|
+
* @param machineId -
|
|
1205
|
+
*/
|
|
1206
|
+
async replaceDeploymentMachine(machine, project, deploymentGroupId, machineId) {
|
|
1207
|
+
return this.beginRequest({
|
|
1208
|
+
apiVersion: "7.2-preview.1",
|
|
1209
|
+
method: "PUT",
|
|
1210
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
|
|
1211
|
+
routeValues: {
|
|
1212
|
+
project: project,
|
|
1213
|
+
deploymentGroupId: deploymentGroupId,
|
|
1214
|
+
machineId: machineId
|
|
1215
|
+
},
|
|
1216
|
+
body: machine
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* @param machine -
|
|
1221
|
+
* @param project - Project ID or project name
|
|
1222
|
+
* @param deploymentGroupId -
|
|
1223
|
+
* @param machineId -
|
|
1224
|
+
*/
|
|
1225
|
+
async updateDeploymentMachine(machine, project, deploymentGroupId, machineId) {
|
|
1226
|
+
return this.beginRequest({
|
|
1227
|
+
apiVersion: "7.2-preview.1",
|
|
1228
|
+
method: "PATCH",
|
|
1229
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
|
|
1230
|
+
routeValues: {
|
|
1231
|
+
project: project,
|
|
1232
|
+
deploymentGroupId: deploymentGroupId,
|
|
1233
|
+
machineId: machineId
|
|
1234
|
+
},
|
|
1235
|
+
body: machine
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* @param machines -
|
|
1240
|
+
* @param project - Project ID or project name
|
|
1241
|
+
* @param deploymentGroupId -
|
|
1242
|
+
*/
|
|
1243
|
+
async updateDeploymentMachines(machines, project, deploymentGroupId) {
|
|
1244
|
+
return this.beginRequest({
|
|
1245
|
+
apiVersion: "7.2-preview.1",
|
|
1246
|
+
method: "PATCH",
|
|
1247
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
|
|
1248
|
+
routeValues: {
|
|
1249
|
+
project: project,
|
|
1250
|
+
deploymentGroupId: deploymentGroupId
|
|
1251
|
+
},
|
|
1252
|
+
body: machines
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* @param definition -
|
|
1257
|
+
* @param poolId -
|
|
1258
|
+
*/
|
|
1259
|
+
async createAgentPoolMaintenanceDefinition(definition, poolId) {
|
|
1260
|
+
return this.beginRequest({
|
|
1261
|
+
apiVersion: "7.2-preview.1",
|
|
1262
|
+
method: "POST",
|
|
1263
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
|
|
1264
|
+
routeValues: {
|
|
1265
|
+
poolId: poolId
|
|
1266
|
+
},
|
|
1267
|
+
body: definition
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* @param poolId -
|
|
1272
|
+
* @param definitionId -
|
|
1273
|
+
*/
|
|
1274
|
+
async deleteAgentPoolMaintenanceDefinition(poolId, definitionId) {
|
|
1275
|
+
return this.beginRequest({
|
|
1276
|
+
apiVersion: "7.2-preview.1",
|
|
1277
|
+
method: "DELETE",
|
|
1278
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
|
|
1279
|
+
routeValues: {
|
|
1280
|
+
poolId: poolId,
|
|
1281
|
+
definitionId: definitionId
|
|
1282
|
+
}
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* @param poolId -
|
|
1287
|
+
* @param definitionId -
|
|
1288
|
+
*/
|
|
1289
|
+
async getAgentPoolMaintenanceDefinition(poolId, definitionId) {
|
|
1290
|
+
return this.beginRequest({
|
|
1291
|
+
apiVersion: "7.2-preview.1",
|
|
1292
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
|
|
1293
|
+
routeValues: {
|
|
1294
|
+
poolId: poolId,
|
|
1295
|
+
definitionId: definitionId
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* @param poolId -
|
|
1301
|
+
*/
|
|
1302
|
+
async getAgentPoolMaintenanceDefinitions(poolId) {
|
|
1303
|
+
return this.beginRequest({
|
|
1304
|
+
apiVersion: "7.2-preview.1",
|
|
1305
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
|
|
1306
|
+
routeValues: {
|
|
1307
|
+
poolId: poolId
|
|
1308
|
+
}
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* @param definition -
|
|
1313
|
+
* @param poolId -
|
|
1314
|
+
* @param definitionId -
|
|
1315
|
+
*/
|
|
1316
|
+
async updateAgentPoolMaintenanceDefinition(definition, poolId, definitionId) {
|
|
1317
|
+
return this.beginRequest({
|
|
1318
|
+
apiVersion: "7.2-preview.1",
|
|
1319
|
+
method: "PUT",
|
|
1320
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
|
|
1321
|
+
routeValues: {
|
|
1322
|
+
poolId: poolId,
|
|
1323
|
+
definitionId: definitionId
|
|
1324
|
+
},
|
|
1325
|
+
body: definition
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* @param poolId -
|
|
1330
|
+
* @param jobId -
|
|
1331
|
+
*/
|
|
1332
|
+
async deleteAgentPoolMaintenanceJob(poolId, jobId) {
|
|
1333
|
+
return this.beginRequest({
|
|
1334
|
+
apiVersion: "7.2-preview.1",
|
|
1335
|
+
method: "DELETE",
|
|
1336
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
|
|
1337
|
+
routeValues: {
|
|
1338
|
+
poolId: poolId,
|
|
1339
|
+
jobId: jobId
|
|
1340
|
+
}
|
|
1341
|
+
});
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* @param poolId -
|
|
1345
|
+
* @param jobId -
|
|
1346
|
+
*/
|
|
1347
|
+
async getAgentPoolMaintenanceJob(poolId, jobId) {
|
|
1348
|
+
return this.beginRequest({
|
|
1349
|
+
apiVersion: "7.2-preview.1",
|
|
1350
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
|
|
1351
|
+
routeValues: {
|
|
1352
|
+
poolId: poolId,
|
|
1353
|
+
jobId: jobId
|
|
1354
|
+
}
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
/**
|
|
1358
|
+
* @param poolId -
|
|
1359
|
+
* @param jobId -
|
|
1360
|
+
*/
|
|
1361
|
+
async getAgentPoolMaintenanceJobLogs(poolId, jobId) {
|
|
1362
|
+
return this.beginRequest({
|
|
1363
|
+
apiVersion: "7.2-preview.1",
|
|
1364
|
+
httpResponseType: "application/zip",
|
|
1365
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
|
|
1366
|
+
routeValues: {
|
|
1367
|
+
poolId: poolId,
|
|
1368
|
+
jobId: jobId
|
|
1369
|
+
}
|
|
1370
|
+
});
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* @param poolId -
|
|
1374
|
+
* @param definitionId -
|
|
1375
|
+
*/
|
|
1376
|
+
async getAgentPoolMaintenanceJobs(poolId, definitionId) {
|
|
1377
|
+
const queryValues = {
|
|
1378
|
+
definitionId: definitionId
|
|
1379
|
+
};
|
|
1380
|
+
return this.beginRequest({
|
|
1381
|
+
apiVersion: "7.2-preview.1",
|
|
1382
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
|
|
1383
|
+
routeValues: {
|
|
1384
|
+
poolId: poolId
|
|
1385
|
+
},
|
|
1386
|
+
queryParams: queryValues
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* @param job -
|
|
1391
|
+
* @param poolId -
|
|
1392
|
+
*/
|
|
1393
|
+
async queueAgentPoolMaintenanceJob(job, poolId) {
|
|
1394
|
+
return this.beginRequest({
|
|
1395
|
+
apiVersion: "7.2-preview.1",
|
|
1396
|
+
method: "POST",
|
|
1397
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
|
|
1398
|
+
routeValues: {
|
|
1399
|
+
poolId: poolId
|
|
1400
|
+
},
|
|
1401
|
+
body: job
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* @param job -
|
|
1406
|
+
* @param poolId -
|
|
1407
|
+
* @param jobId -
|
|
1408
|
+
*/
|
|
1409
|
+
async updateAgentPoolMaintenanceJob(job, poolId, jobId) {
|
|
1410
|
+
return this.beginRequest({
|
|
1411
|
+
apiVersion: "7.2-preview.1",
|
|
1412
|
+
method: "PATCH",
|
|
1413
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
|
|
1414
|
+
routeValues: {
|
|
1415
|
+
poolId: poolId,
|
|
1416
|
+
jobId: jobId
|
|
1417
|
+
},
|
|
1418
|
+
body: job
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* @param poolId -
|
|
1423
|
+
* @param messageId -
|
|
1424
|
+
* @param sessionId -
|
|
1425
|
+
*/
|
|
1426
|
+
async deleteMessage(poolId, messageId, sessionId) {
|
|
1427
|
+
const queryValues = {
|
|
1428
|
+
sessionId: sessionId
|
|
1429
|
+
};
|
|
1430
|
+
return this.beginRequest({
|
|
1431
|
+
apiVersion: "7.2-preview.1",
|
|
1432
|
+
method: "DELETE",
|
|
1433
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
|
|
1434
|
+
routeValues: {
|
|
1435
|
+
poolId: poolId,
|
|
1436
|
+
messageId: messageId
|
|
1437
|
+
},
|
|
1438
|
+
queryParams: queryValues
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* @param poolId -
|
|
1443
|
+
* @param sessionId -
|
|
1444
|
+
* @param lastMessageId -
|
|
1445
|
+
*/
|
|
1446
|
+
async getMessage(poolId, sessionId, lastMessageId) {
|
|
1447
|
+
const queryValues = {
|
|
1448
|
+
sessionId: sessionId,
|
|
1449
|
+
lastMessageId: lastMessageId
|
|
1450
|
+
};
|
|
1451
|
+
return this.beginRequest({
|
|
1452
|
+
apiVersion: "7.2-preview.1",
|
|
1453
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
|
|
1454
|
+
routeValues: {
|
|
1455
|
+
poolId: poolId
|
|
1456
|
+
},
|
|
1457
|
+
queryParams: queryValues
|
|
1458
|
+
});
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
* @param poolId -
|
|
1462
|
+
* @param agentId -
|
|
1463
|
+
*/
|
|
1464
|
+
async refreshAgent(poolId, agentId) {
|
|
1465
|
+
const queryValues = {
|
|
1466
|
+
agentId: agentId
|
|
1467
|
+
};
|
|
1468
|
+
return this.beginRequest({
|
|
1469
|
+
apiVersion: "7.2-preview.1",
|
|
1470
|
+
method: "POST",
|
|
1471
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
|
|
1472
|
+
routeValues: {
|
|
1473
|
+
poolId: poolId
|
|
1474
|
+
},
|
|
1475
|
+
queryParams: queryValues
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* @param poolId -
|
|
1480
|
+
*/
|
|
1481
|
+
async refreshAgents(poolId) {
|
|
1482
|
+
return this.beginRequest({
|
|
1483
|
+
apiVersion: "7.2-preview.1",
|
|
1484
|
+
method: "POST",
|
|
1485
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
|
|
1486
|
+
routeValues: {
|
|
1487
|
+
poolId: poolId
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* @param message -
|
|
1493
|
+
* @param poolId -
|
|
1494
|
+
* @param requestId -
|
|
1495
|
+
*/
|
|
1496
|
+
async sendMessage(message, poolId, requestId) {
|
|
1497
|
+
const queryValues = {
|
|
1498
|
+
requestId: requestId
|
|
1499
|
+
};
|
|
1500
|
+
return this.beginRequest({
|
|
1501
|
+
apiVersion: "7.2-preview.1",
|
|
1502
|
+
method: "POST",
|
|
1503
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
|
|
1504
|
+
routeValues: {
|
|
1505
|
+
poolId: poolId
|
|
1506
|
+
},
|
|
1507
|
+
queryParams: queryValues,
|
|
1508
|
+
body: message
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
/**
|
|
1512
|
+
* @param packageType -
|
|
1513
|
+
* @param platform -
|
|
1514
|
+
* @param version -
|
|
1515
|
+
*/
|
|
1516
|
+
async getPackage(packageType, platform, version) {
|
|
1517
|
+
return this.beginRequest({
|
|
1518
|
+
apiVersion: "7.2-preview.2",
|
|
1519
|
+
routeTemplate: "_apis/distributedtask/packages/{packageType}/{platform}/{version}",
|
|
1520
|
+
routeValues: {
|
|
1521
|
+
packageType: packageType,
|
|
1522
|
+
platform: platform,
|
|
1523
|
+
version: version
|
|
1524
|
+
}
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* @param packageType -
|
|
1529
|
+
* @param platform -
|
|
1530
|
+
* @param top -
|
|
1531
|
+
*/
|
|
1532
|
+
async getPackages(packageType, platform, top) {
|
|
1533
|
+
const queryValues = {
|
|
1534
|
+
'$top': top
|
|
1535
|
+
};
|
|
1536
|
+
return this.beginRequest({
|
|
1537
|
+
apiVersion: "7.2-preview.2",
|
|
1538
|
+
routeTemplate: "_apis/distributedtask/packages/{packageType}/{platform}/{version}",
|
|
1539
|
+
routeValues: {
|
|
1540
|
+
packageType: packageType,
|
|
1541
|
+
platform: platform
|
|
1542
|
+
},
|
|
1543
|
+
queryParams: queryValues
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
/**
|
|
1547
|
+
* @param poolId -
|
|
1548
|
+
*/
|
|
1549
|
+
async getAgentPoolMetadata(poolId) {
|
|
1550
|
+
return this.beginRequest({
|
|
1551
|
+
apiVersion: "7.2-preview.1",
|
|
1552
|
+
httpResponseType: "text/plain",
|
|
1553
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/poolmetadata",
|
|
1554
|
+
routeValues: {
|
|
1555
|
+
poolId: poolId
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* @param agentPoolMetadata -
|
|
1561
|
+
* @param poolId -
|
|
1562
|
+
*/
|
|
1563
|
+
async setAgentPoolMetadata(agentPoolMetadata, poolId) {
|
|
1564
|
+
return this.beginRequest({
|
|
1565
|
+
apiVersion: "7.2-preview.1",
|
|
1566
|
+
method: "PUT",
|
|
1567
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/poolmetadata",
|
|
1568
|
+
routeValues: {
|
|
1569
|
+
poolId: poolId
|
|
1570
|
+
},
|
|
1571
|
+
customHeaders: {
|
|
1572
|
+
"Content-Type": "application/octet-stream",
|
|
1573
|
+
},
|
|
1574
|
+
body: agentPoolMetadata,
|
|
1575
|
+
isRawData: true
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Checks if current identity has passed permissions on a pool.
|
|
1580
|
+
*
|
|
1581
|
+
* @param poolId - Id of the pool to check
|
|
1582
|
+
* @param permissions - Permissions to check. Multiple permissions might be merged into single value using bitwise OR operator (e.g. AgentPoolPermissions.Manage | AgentPoolPermissions.View)
|
|
1583
|
+
*/
|
|
1584
|
+
async hasPoolPermissions(poolId, permissions) {
|
|
1585
|
+
return this.beginRequest({
|
|
1586
|
+
apiVersion: "7.2-preview.1",
|
|
1587
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/permissions/{permissions}",
|
|
1588
|
+
routeValues: {
|
|
1589
|
+
poolId: poolId,
|
|
1590
|
+
permissions: permissions
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* Create an agent pool.
|
|
1596
|
+
*
|
|
1597
|
+
* @param pool - Details about the new agent pool
|
|
1598
|
+
*/
|
|
1599
|
+
async addAgentPool(pool) {
|
|
1600
|
+
return this.beginRequest({
|
|
1601
|
+
apiVersion: "7.2-preview.1",
|
|
1602
|
+
method: "POST",
|
|
1603
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}",
|
|
1604
|
+
body: pool
|
|
1605
|
+
});
|
|
1606
|
+
}
|
|
1607
|
+
/**
|
|
1608
|
+
* Delete an agent pool.
|
|
1609
|
+
*
|
|
1610
|
+
* @param poolId - ID of the agent pool to delete
|
|
1611
|
+
*/
|
|
1612
|
+
async deleteAgentPool(poolId) {
|
|
1613
|
+
return this.beginRequest({
|
|
1614
|
+
apiVersion: "7.2-preview.1",
|
|
1615
|
+
method: "DELETE",
|
|
1616
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}",
|
|
1617
|
+
routeValues: {
|
|
1618
|
+
poolId: poolId
|
|
1619
|
+
}
|
|
1620
|
+
});
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* Get information about an agent pool.
|
|
1624
|
+
*
|
|
1625
|
+
* @param poolId - An agent pool ID
|
|
1626
|
+
* @param properties - Agent pool properties (comma-separated)
|
|
1627
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1628
|
+
*/
|
|
1629
|
+
async getAgentPool(poolId, properties, actionFilter) {
|
|
1630
|
+
const queryValues = {
|
|
1631
|
+
properties: properties && properties.join(","),
|
|
1632
|
+
actionFilter: actionFilter
|
|
1633
|
+
};
|
|
1634
|
+
return this.beginRequest({
|
|
1635
|
+
apiVersion: "7.2-preview.1",
|
|
1636
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}",
|
|
1637
|
+
routeValues: {
|
|
1638
|
+
poolId: poolId
|
|
1639
|
+
},
|
|
1640
|
+
queryParams: queryValues
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
/**
|
|
1644
|
+
* Get a list of agent pools.
|
|
1645
|
+
*
|
|
1646
|
+
* @param poolName - Filter by name
|
|
1647
|
+
* @param properties - Filter by agent pool properties (comma-separated)
|
|
1648
|
+
* @param poolType - Filter by pool type
|
|
1649
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1650
|
+
*/
|
|
1651
|
+
async getAgentPools(poolName, properties, poolType, actionFilter) {
|
|
1652
|
+
const queryValues = {
|
|
1653
|
+
poolName: poolName,
|
|
1654
|
+
properties: properties && properties.join(","),
|
|
1655
|
+
poolType: poolType,
|
|
1656
|
+
actionFilter: actionFilter
|
|
1657
|
+
};
|
|
1658
|
+
return this.beginRequest({
|
|
1659
|
+
apiVersion: "7.2-preview.1",
|
|
1660
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}",
|
|
1661
|
+
queryParams: queryValues
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Get a list of agent pools.
|
|
1666
|
+
*
|
|
1667
|
+
* @param poolIds - pool Ids to fetch
|
|
1668
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1669
|
+
*/
|
|
1670
|
+
async getAgentPoolsByIds(poolIds, actionFilter) {
|
|
1671
|
+
const queryValues = {
|
|
1672
|
+
poolIds: poolIds && poolIds.join(","),
|
|
1673
|
+
actionFilter: actionFilter
|
|
1674
|
+
};
|
|
1675
|
+
return this.beginRequest({
|
|
1676
|
+
apiVersion: "7.2-preview.1",
|
|
1677
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}",
|
|
1678
|
+
queryParams: queryValues
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Update properties on an agent pool
|
|
1683
|
+
*
|
|
1684
|
+
* @param pool - Updated agent pool details
|
|
1685
|
+
* @param poolId - The agent pool to update
|
|
1686
|
+
*/
|
|
1687
|
+
async updateAgentPool(pool, poolId) {
|
|
1688
|
+
return this.beginRequest({
|
|
1689
|
+
apiVersion: "7.2-preview.1",
|
|
1690
|
+
method: "PATCH",
|
|
1691
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}",
|
|
1692
|
+
routeValues: {
|
|
1693
|
+
poolId: poolId
|
|
1694
|
+
},
|
|
1695
|
+
body: pool
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* Create a new agent queue to connect a project to an agent pool.
|
|
1700
|
+
*
|
|
1701
|
+
* @param queue - Details about the queue to create
|
|
1702
|
+
* @param project - Project ID or project name
|
|
1703
|
+
* @param authorizePipelines - Automatically authorize this queue when using YAML
|
|
1704
|
+
*/
|
|
1705
|
+
async addAgentQueue(queue, project, authorizePipelines) {
|
|
1706
|
+
const queryValues = {
|
|
1707
|
+
authorizePipelines: authorizePipelines
|
|
1708
|
+
};
|
|
1709
|
+
return this.beginRequest({
|
|
1710
|
+
apiVersion: "7.2-preview.1",
|
|
1711
|
+
method: "POST",
|
|
1712
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1713
|
+
routeValues: {
|
|
1714
|
+
project: project
|
|
1715
|
+
},
|
|
1716
|
+
queryParams: queryValues,
|
|
1717
|
+
body: queue
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Create a new team project.
|
|
1722
|
+
*
|
|
1723
|
+
* @param project - Project ID or project name
|
|
1724
|
+
*/
|
|
1725
|
+
async createTeamProject(project) {
|
|
1726
|
+
return this.beginRequest({
|
|
1727
|
+
apiVersion: "7.2-preview.1",
|
|
1728
|
+
method: "PUT",
|
|
1729
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1730
|
+
routeValues: {
|
|
1731
|
+
project: project
|
|
1732
|
+
}
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
/**
|
|
1736
|
+
* Removes an agent queue from a project.
|
|
1737
|
+
*
|
|
1738
|
+
* @param queueId - The agent queue to remove
|
|
1739
|
+
* @param project - Project ID or project name
|
|
1740
|
+
*/
|
|
1741
|
+
async deleteAgentQueue(queueId, project) {
|
|
1742
|
+
return this.beginRequest({
|
|
1743
|
+
apiVersion: "7.2-preview.1",
|
|
1744
|
+
method: "DELETE",
|
|
1745
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1746
|
+
routeValues: {
|
|
1747
|
+
project: project,
|
|
1748
|
+
queueId: queueId
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Get information about an agent queue.
|
|
1754
|
+
*
|
|
1755
|
+
* @param queueId - The agent queue to get information about
|
|
1756
|
+
* @param project - Project ID or project name
|
|
1757
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1758
|
+
*/
|
|
1759
|
+
async getAgentQueue(queueId, project, actionFilter) {
|
|
1760
|
+
const queryValues = {
|
|
1761
|
+
actionFilter: actionFilter
|
|
1762
|
+
};
|
|
1763
|
+
return this.beginRequest({
|
|
1764
|
+
apiVersion: "7.2-preview.1",
|
|
1765
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1766
|
+
routeValues: {
|
|
1767
|
+
project: project,
|
|
1768
|
+
queueId: queueId
|
|
1769
|
+
},
|
|
1770
|
+
queryParams: queryValues
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
* Get a list of agent queues.
|
|
1775
|
+
*
|
|
1776
|
+
* @param project - Project ID or project name
|
|
1777
|
+
* @param queueName - Filter on the agent queue name
|
|
1778
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1779
|
+
*/
|
|
1780
|
+
async getAgentQueues(project, queueName, actionFilter) {
|
|
1781
|
+
const queryValues = {
|
|
1782
|
+
queueName: queueName,
|
|
1783
|
+
actionFilter: actionFilter
|
|
1784
|
+
};
|
|
1785
|
+
return this.beginRequest({
|
|
1786
|
+
apiVersion: "7.2-preview.1",
|
|
1787
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1788
|
+
routeValues: {
|
|
1789
|
+
project: project
|
|
1790
|
+
},
|
|
1791
|
+
queryParams: queryValues
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Get a list of agent queues by their IDs
|
|
1796
|
+
*
|
|
1797
|
+
* @param queueIds - A comma-separated list of agent queue IDs to retrieve
|
|
1798
|
+
* @param project - Project ID or project name
|
|
1799
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1800
|
+
*/
|
|
1801
|
+
async getAgentQueuesByIds(queueIds, project, actionFilter) {
|
|
1802
|
+
const queryValues = {
|
|
1803
|
+
queueIds: queueIds && queueIds.join(","),
|
|
1804
|
+
actionFilter: actionFilter
|
|
1805
|
+
};
|
|
1806
|
+
return this.beginRequest({
|
|
1807
|
+
apiVersion: "7.2-preview.1",
|
|
1808
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1809
|
+
routeValues: {
|
|
1810
|
+
project: project
|
|
1811
|
+
},
|
|
1812
|
+
queryParams: queryValues
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Get a list of agent queues by their names
|
|
1817
|
+
*
|
|
1818
|
+
* @param queueNames - A comma-separated list of agent names to retrieve
|
|
1819
|
+
* @param project - Project ID or project name
|
|
1820
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1821
|
+
*/
|
|
1822
|
+
async getAgentQueuesByNames(queueNames, project, actionFilter) {
|
|
1823
|
+
const queryValues = {
|
|
1824
|
+
queueNames: queueNames && queueNames.join(","),
|
|
1825
|
+
actionFilter: actionFilter
|
|
1826
|
+
};
|
|
1827
|
+
return this.beginRequest({
|
|
1828
|
+
apiVersion: "7.2-preview.1",
|
|
1829
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1830
|
+
routeValues: {
|
|
1831
|
+
project: project
|
|
1832
|
+
},
|
|
1833
|
+
queryParams: queryValues
|
|
1834
|
+
});
|
|
1835
|
+
}
|
|
1836
|
+
/**
|
|
1837
|
+
* Get a list of agent queues by pool ids
|
|
1838
|
+
*
|
|
1839
|
+
* @param poolIds - A comma-separated list of pool ids to get the corresponding queues for
|
|
1840
|
+
* @param project - Project ID or project name
|
|
1841
|
+
* @param actionFilter - Filter by whether the calling user has use or manage permissions
|
|
1842
|
+
*/
|
|
1843
|
+
async getAgentQueuesForPools(poolIds, project, actionFilter) {
|
|
1844
|
+
const queryValues = {
|
|
1845
|
+
poolIds: poolIds && poolIds.join(","),
|
|
1846
|
+
actionFilter: actionFilter
|
|
1847
|
+
};
|
|
1848
|
+
return this.beginRequest({
|
|
1849
|
+
apiVersion: "7.2-preview.1",
|
|
1850
|
+
routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
|
|
1851
|
+
routeValues: {
|
|
1852
|
+
project: project
|
|
1853
|
+
},
|
|
1854
|
+
queryParams: queryValues
|
|
1855
|
+
});
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* @param agentCloudId -
|
|
1859
|
+
*/
|
|
1860
|
+
async getAgentCloudRequests(agentCloudId) {
|
|
1861
|
+
return this.beginRequest({
|
|
1862
|
+
apiVersion: "7.2-preview.1",
|
|
1863
|
+
routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}/requests/{agentCloudRequestId}",
|
|
1864
|
+
routeValues: {
|
|
1865
|
+
agentCloudId: agentCloudId
|
|
1866
|
+
}
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
*/
|
|
1871
|
+
async getResourceLimits() {
|
|
1872
|
+
return this.beginRequest({
|
|
1873
|
+
apiVersion: "7.2-preview.1",
|
|
1874
|
+
routeTemplate: "_apis/distributedtask/resourcelimits"
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
/**
|
|
1878
|
+
* @param parallelismTag -
|
|
1879
|
+
* @param poolIsHosted -
|
|
1880
|
+
* @param includeRunningRequests -
|
|
1881
|
+
*/
|
|
1882
|
+
async getResourceUsage(parallelismTag, poolIsHosted, includeRunningRequests) {
|
|
1883
|
+
const queryValues = {
|
|
1884
|
+
parallelismTag: parallelismTag,
|
|
1885
|
+
poolIsHosted: poolIsHosted,
|
|
1886
|
+
includeRunningRequests: includeRunningRequests
|
|
1887
|
+
};
|
|
1888
|
+
return this.beginRequest({
|
|
1889
|
+
apiVersion: "7.2-preview.2",
|
|
1890
|
+
routeTemplate: "_apis/distributedtask/resourceusage",
|
|
1891
|
+
queryParams: queryValues
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* @param project - Project ID or project name
|
|
1896
|
+
* @param taskGroupId -
|
|
1897
|
+
*/
|
|
1898
|
+
async getTaskGroupHistory(project, taskGroupId) {
|
|
1899
|
+
return this.beginRequest({
|
|
1900
|
+
apiVersion: "7.2-preview.1",
|
|
1901
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}/revisions",
|
|
1902
|
+
routeValues: {
|
|
1903
|
+
project: project,
|
|
1904
|
+
taskGroupId: taskGroupId
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* Delete a secure file
|
|
1910
|
+
*
|
|
1911
|
+
* @param project - Project ID or project name
|
|
1912
|
+
* @param secureFileId - The unique secure file Id
|
|
1913
|
+
*/
|
|
1914
|
+
async deleteSecureFile(project, secureFileId) {
|
|
1915
|
+
return this.beginRequest({
|
|
1916
|
+
apiVersion: "7.2-preview.1",
|
|
1917
|
+
method: "DELETE",
|
|
1918
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
1919
|
+
routeValues: {
|
|
1920
|
+
project: project,
|
|
1921
|
+
secureFileId: secureFileId
|
|
1922
|
+
}
|
|
1923
|
+
});
|
|
1924
|
+
}
|
|
1925
|
+
/**
|
|
1926
|
+
* Download a secure file by Id
|
|
1927
|
+
*
|
|
1928
|
+
* @param project - Project ID or project name
|
|
1929
|
+
* @param secureFileId - The unique secure file Id
|
|
1930
|
+
* @param ticket - A valid download ticket
|
|
1931
|
+
* @param download - If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream.
|
|
1932
|
+
*/
|
|
1933
|
+
async downloadSecureFile(project, secureFileId, ticket, download) {
|
|
1934
|
+
const queryValues = {
|
|
1935
|
+
ticket: ticket,
|
|
1936
|
+
download: download
|
|
1937
|
+
};
|
|
1938
|
+
return this.beginRequest({
|
|
1939
|
+
apiVersion: "7.2-preview.1",
|
|
1940
|
+
httpResponseType: "application/octet-stream",
|
|
1941
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
1942
|
+
routeValues: {
|
|
1943
|
+
project: project,
|
|
1944
|
+
secureFileId: secureFileId
|
|
1945
|
+
},
|
|
1946
|
+
queryParams: queryValues
|
|
1947
|
+
});
|
|
1948
|
+
}
|
|
1949
|
+
/**
|
|
1950
|
+
* Get a secure file
|
|
1951
|
+
*
|
|
1952
|
+
* @param project - Project ID or project name
|
|
1953
|
+
* @param secureFileId - The unique secure file Id
|
|
1954
|
+
* @param includeDownloadTicket - If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response.
|
|
1955
|
+
* @param actionFilter -
|
|
1956
|
+
*/
|
|
1957
|
+
async getSecureFile(project, secureFileId, includeDownloadTicket, actionFilter) {
|
|
1958
|
+
const queryValues = {
|
|
1959
|
+
includeDownloadTicket: includeDownloadTicket,
|
|
1960
|
+
actionFilter: actionFilter
|
|
1961
|
+
};
|
|
1962
|
+
return this.beginRequest({
|
|
1963
|
+
apiVersion: "7.2-preview.1",
|
|
1964
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
1965
|
+
routeValues: {
|
|
1966
|
+
project: project,
|
|
1967
|
+
secureFileId: secureFileId
|
|
1968
|
+
},
|
|
1969
|
+
queryParams: queryValues
|
|
1970
|
+
});
|
|
1971
|
+
}
|
|
1972
|
+
/**
|
|
1973
|
+
* Get secure files
|
|
1974
|
+
*
|
|
1975
|
+
* @param project - Project ID or project name
|
|
1976
|
+
* @param namePattern - Name of the secure file to match. Can include wildcards to match multiple files.
|
|
1977
|
+
* @param includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response.
|
|
1978
|
+
* @param actionFilter - Filter by secure file permissions for View, Manage or Use action. Defaults to View.
|
|
1979
|
+
*/
|
|
1980
|
+
async getSecureFiles(project, namePattern, includeDownloadTickets, actionFilter) {
|
|
1981
|
+
const queryValues = {
|
|
1982
|
+
namePattern: namePattern,
|
|
1983
|
+
includeDownloadTickets: includeDownloadTickets,
|
|
1984
|
+
actionFilter: actionFilter
|
|
1985
|
+
};
|
|
1986
|
+
return this.beginRequest({
|
|
1987
|
+
apiVersion: "7.2-preview.1",
|
|
1988
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
1989
|
+
routeValues: {
|
|
1990
|
+
project: project
|
|
1991
|
+
},
|
|
1992
|
+
queryParams: queryValues
|
|
1993
|
+
});
|
|
1994
|
+
}
|
|
1995
|
+
/**
|
|
1996
|
+
* Get secure files
|
|
1997
|
+
*
|
|
1998
|
+
* @param project - Project ID or project name
|
|
1999
|
+
* @param secureFileIds - A list of secure file Ids
|
|
2000
|
+
* @param includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response.
|
|
2001
|
+
* @param actionFilter -
|
|
2002
|
+
*/
|
|
2003
|
+
async getSecureFilesByIds(project, secureFileIds, includeDownloadTickets, actionFilter) {
|
|
2004
|
+
const queryValues = {
|
|
2005
|
+
secureFileIds: secureFileIds && secureFileIds.join(","),
|
|
2006
|
+
includeDownloadTickets: includeDownloadTickets,
|
|
2007
|
+
actionFilter: actionFilter
|
|
2008
|
+
};
|
|
2009
|
+
return this.beginRequest({
|
|
2010
|
+
apiVersion: "7.2-preview.1",
|
|
2011
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
2012
|
+
routeValues: {
|
|
2013
|
+
project: project
|
|
2014
|
+
},
|
|
2015
|
+
queryParams: queryValues
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
/**
|
|
2019
|
+
* Get secure files
|
|
2020
|
+
*
|
|
2021
|
+
* @param project - Project ID or project name
|
|
2022
|
+
* @param secureFileNames - A list of secure file Ids
|
|
2023
|
+
* @param includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response.
|
|
2024
|
+
* @param actionFilter -
|
|
2025
|
+
*/
|
|
2026
|
+
async getSecureFilesByNames(project, secureFileNames, includeDownloadTickets, actionFilter) {
|
|
2027
|
+
const queryValues = {
|
|
2028
|
+
secureFileNames: secureFileNames && secureFileNames.join(","),
|
|
2029
|
+
includeDownloadTickets: includeDownloadTickets,
|
|
2030
|
+
actionFilter: actionFilter
|
|
2031
|
+
};
|
|
2032
|
+
return this.beginRequest({
|
|
2033
|
+
apiVersion: "7.2-preview.1",
|
|
2034
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
2035
|
+
routeValues: {
|
|
2036
|
+
project: project
|
|
2037
|
+
},
|
|
2038
|
+
queryParams: queryValues
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
/**
|
|
2042
|
+
* Query secure files using a name pattern and a condition on file properties.
|
|
2043
|
+
*
|
|
2044
|
+
* @param condition - The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. \`\`\` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) \`\`\`
|
|
2045
|
+
* @param project - Project ID or project name
|
|
2046
|
+
* @param namePattern - Name of the secure file to match. Can include wildcards to match multiple files.
|
|
2047
|
+
*/
|
|
2048
|
+
async querySecureFilesByProperties(condition, project, namePattern) {
|
|
2049
|
+
const queryValues = {
|
|
2050
|
+
namePattern: namePattern
|
|
2051
|
+
};
|
|
2052
|
+
return this.beginRequest({
|
|
2053
|
+
apiVersion: "7.2-preview.1",
|
|
2054
|
+
method: "POST",
|
|
2055
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
2056
|
+
routeValues: {
|
|
2057
|
+
project: project
|
|
2058
|
+
},
|
|
2059
|
+
queryParams: queryValues,
|
|
2060
|
+
body: condition
|
|
2061
|
+
});
|
|
2062
|
+
}
|
|
2063
|
+
/**
|
|
2064
|
+
* Update the name or properties of an existing secure file
|
|
2065
|
+
*
|
|
2066
|
+
* @param secureFile - The secure file with updated name and/or properties
|
|
2067
|
+
* @param project - Project ID or project name
|
|
2068
|
+
* @param secureFileId - The unique secure file Id
|
|
2069
|
+
*/
|
|
2070
|
+
async updateSecureFile(secureFile, project, secureFileId) {
|
|
2071
|
+
return this.beginRequest({
|
|
2072
|
+
apiVersion: "7.2-preview.1",
|
|
2073
|
+
method: "PATCH",
|
|
2074
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
2075
|
+
routeValues: {
|
|
2076
|
+
project: project,
|
|
2077
|
+
secureFileId: secureFileId
|
|
2078
|
+
},
|
|
2079
|
+
body: secureFile
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge.
|
|
2084
|
+
*
|
|
2085
|
+
* @param secureFiles - A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored.
|
|
2086
|
+
* @param project - Project ID or project name
|
|
2087
|
+
*/
|
|
2088
|
+
async updateSecureFiles(secureFiles, project) {
|
|
2089
|
+
return this.beginRequest({
|
|
2090
|
+
apiVersion: "7.2-preview.1",
|
|
2091
|
+
method: "PATCH",
|
|
2092
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
2093
|
+
routeValues: {
|
|
2094
|
+
project: project
|
|
2095
|
+
},
|
|
2096
|
+
body: secureFiles
|
|
2097
|
+
});
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* Upload a secure file, include the file stream in the request body
|
|
2101
|
+
*
|
|
2102
|
+
* @param content - Content to upload
|
|
2103
|
+
* @param project - Project ID or project name
|
|
2104
|
+
* @param name - Name of the file to upload
|
|
2105
|
+
* @param authorizePipelines - If authorizePipelines is true, then the secure file is authorized for use by all pipelines in the project.
|
|
2106
|
+
*/
|
|
2107
|
+
async uploadSecureFile(content, project, name, authorizePipelines) {
|
|
2108
|
+
const queryValues = {
|
|
2109
|
+
name: name,
|
|
2110
|
+
authorizePipelines: authorizePipelines
|
|
2111
|
+
};
|
|
2112
|
+
return this.beginRequest({
|
|
2113
|
+
apiVersion: "7.2-preview.1",
|
|
2114
|
+
method: "POST",
|
|
2115
|
+
routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
|
|
2116
|
+
routeValues: {
|
|
2117
|
+
project: project
|
|
2118
|
+
},
|
|
2119
|
+
customHeaders: {
|
|
2120
|
+
"Content-Type": "application/octet-stream",
|
|
2121
|
+
},
|
|
2122
|
+
queryParams: queryValues,
|
|
2123
|
+
body: content,
|
|
2124
|
+
isRawData: true
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
/**
|
|
2128
|
+
* @param session -
|
|
2129
|
+
* @param poolId -
|
|
2130
|
+
*/
|
|
2131
|
+
async createAgentSession(session, poolId) {
|
|
2132
|
+
return this.beginRequest({
|
|
2133
|
+
apiVersion: "7.2-preview.1",
|
|
2134
|
+
method: "POST",
|
|
2135
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",
|
|
2136
|
+
routeValues: {
|
|
2137
|
+
poolId: poolId
|
|
2138
|
+
},
|
|
2139
|
+
body: session
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
/**
|
|
2143
|
+
* @param poolId -
|
|
2144
|
+
* @param sessionId -
|
|
2145
|
+
*/
|
|
2146
|
+
async deleteAgentSession(poolId, sessionId) {
|
|
2147
|
+
return this.beginRequest({
|
|
2148
|
+
apiVersion: "7.2-preview.1",
|
|
2149
|
+
method: "DELETE",
|
|
2150
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",
|
|
2151
|
+
routeValues: {
|
|
2152
|
+
poolId: poolId,
|
|
2153
|
+
sessionId: sessionId
|
|
2154
|
+
}
|
|
2155
|
+
});
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2158
|
+
* Register a deployment target to a deployment group. Generally this is called by agent configuration tool.
|
|
2159
|
+
*
|
|
2160
|
+
* @param machine - Deployment target to register.
|
|
2161
|
+
* @param project - Project ID or project name
|
|
2162
|
+
* @param deploymentGroupId - ID of the deployment group to which the deployment target is registered.
|
|
2163
|
+
*/
|
|
2164
|
+
async addDeploymentTarget(machine, project, deploymentGroupId) {
|
|
2165
|
+
return this.beginRequest({
|
|
2166
|
+
apiVersion: "7.2-preview.1",
|
|
2167
|
+
method: "POST",
|
|
2168
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
|
|
2169
|
+
routeValues: {
|
|
2170
|
+
project: project,
|
|
2171
|
+
deploymentGroupId: deploymentGroupId
|
|
2172
|
+
},
|
|
2173
|
+
body: machine
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
/**
|
|
2177
|
+
* Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too.
|
|
2178
|
+
*
|
|
2179
|
+
* @param project - Project ID or project name
|
|
2180
|
+
* @param deploymentGroupId - ID of the deployment group in which deployment target is deleted.
|
|
2181
|
+
* @param targetId - ID of the deployment target to delete.
|
|
2182
|
+
*/
|
|
2183
|
+
async deleteDeploymentTarget(project, deploymentGroupId, targetId) {
|
|
2184
|
+
return this.beginRequest({
|
|
2185
|
+
apiVersion: "7.2-preview.1",
|
|
2186
|
+
method: "DELETE",
|
|
2187
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
|
|
2188
|
+
routeValues: {
|
|
2189
|
+
project: project,
|
|
2190
|
+
deploymentGroupId: deploymentGroupId,
|
|
2191
|
+
targetId: targetId
|
|
2192
|
+
}
|
|
2193
|
+
});
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* Get a deployment target by its ID in a deployment group
|
|
2197
|
+
*
|
|
2198
|
+
* @param project - Project ID or project name
|
|
2199
|
+
* @param deploymentGroupId - ID of the deployment group to which deployment target belongs.
|
|
2200
|
+
* @param targetId - ID of the deployment target to return.
|
|
2201
|
+
* @param expand - Include these additional details in the returned objects.
|
|
2202
|
+
*/
|
|
2203
|
+
async getDeploymentTarget(project, deploymentGroupId, targetId, expand) {
|
|
2204
|
+
const queryValues = {
|
|
2205
|
+
'$expand': expand
|
|
2206
|
+
};
|
|
2207
|
+
return this.beginRequest({
|
|
2208
|
+
apiVersion: "7.2-preview.1",
|
|
2209
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
|
|
2210
|
+
routeValues: {
|
|
2211
|
+
project: project,
|
|
2212
|
+
deploymentGroupId: deploymentGroupId,
|
|
2213
|
+
targetId: targetId
|
|
2214
|
+
},
|
|
2215
|
+
queryParams: queryValues
|
|
2216
|
+
});
|
|
2217
|
+
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Get a list of deployment targets in a deployment group.
|
|
2220
|
+
*
|
|
2221
|
+
* @param project - Project ID or project name
|
|
2222
|
+
* @param deploymentGroupId - ID of the deployment group.
|
|
2223
|
+
* @param tags - Get only the deployment targets that contain all these comma separted list of tags.
|
|
2224
|
+
* @param name - Name pattern of the deployment targets to return.
|
|
2225
|
+
* @param partialNameMatch - When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**.
|
|
2226
|
+
* @param expand - Include these additional details in the returned objects.
|
|
2227
|
+
* @param agentStatus - Get only deployment targets that have this status.
|
|
2228
|
+
* @param agentJobResult - Get only deployment targets that have this last job result.
|
|
2229
|
+
* @param continuationToken - Get deployment targets with names greater than this continuationToken lexicographically.
|
|
2230
|
+
* @param top - Maximum number of deployment targets to return. Default is **1000**.
|
|
2231
|
+
* @param enabled - Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets.
|
|
2232
|
+
* @param propertyFilters -
|
|
2233
|
+
*/
|
|
2234
|
+
async getDeploymentTargets(project, deploymentGroupId, tags, name, partialNameMatch, expand, agentStatus, agentJobResult, continuationToken, top, enabled, propertyFilters) {
|
|
2235
|
+
const queryValues = {
|
|
2236
|
+
tags: tags && tags.join(","),
|
|
2237
|
+
name: name,
|
|
2238
|
+
partialNameMatch: partialNameMatch,
|
|
2239
|
+
'$expand': expand,
|
|
2240
|
+
agentStatus: agentStatus,
|
|
2241
|
+
agentJobResult: agentJobResult,
|
|
2242
|
+
continuationToken: continuationToken,
|
|
2243
|
+
'$top': top,
|
|
2244
|
+
enabled: enabled,
|
|
2245
|
+
propertyFilters: propertyFilters && propertyFilters.join(",")
|
|
2246
|
+
};
|
|
2247
|
+
return this.beginRequest({
|
|
2248
|
+
apiVersion: "7.2-preview.1",
|
|
2249
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
|
|
2250
|
+
routeValues: {
|
|
2251
|
+
project: project,
|
|
2252
|
+
deploymentGroupId: deploymentGroupId
|
|
2253
|
+
},
|
|
2254
|
+
queryParams: queryValues,
|
|
2255
|
+
returnRawResponse: true
|
|
2256
|
+
}).then(async (response) => {
|
|
2257
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
2258
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
2259
|
+
return body;
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
/**
|
|
2263
|
+
* Replace a deployment target in a deployment group. Generally this is called by agent configuration tool.
|
|
2264
|
+
*
|
|
2265
|
+
* @param machine - New deployment target.
|
|
2266
|
+
* @param project - Project ID or project name
|
|
2267
|
+
* @param deploymentGroupId - ID of the deployment group in which deployment target is replaced.
|
|
2268
|
+
* @param targetId - ID of the deployment target to replace.
|
|
2269
|
+
*/
|
|
2270
|
+
async replaceDeploymentTarget(machine, project, deploymentGroupId, targetId) {
|
|
2271
|
+
return this.beginRequest({
|
|
2272
|
+
apiVersion: "7.2-preview.1",
|
|
2273
|
+
method: "PUT",
|
|
2274
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
|
|
2275
|
+
routeValues: {
|
|
2276
|
+
project: project,
|
|
2277
|
+
deploymentGroupId: deploymentGroupId,
|
|
2278
|
+
targetId: targetId
|
|
2279
|
+
},
|
|
2280
|
+
body: machine
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
/**
|
|
2284
|
+
* Update a deployment target and its agent properties in a deployment group. Generally this is called by agent configuration tool.
|
|
2285
|
+
*
|
|
2286
|
+
* @param machine - Deployment target to update.
|
|
2287
|
+
* @param project - Project ID or project name
|
|
2288
|
+
* @param deploymentGroupId - ID of the deployment group in which deployment target is updated.
|
|
2289
|
+
* @param targetId - ID of the deployment target to update.
|
|
2290
|
+
*/
|
|
2291
|
+
async updateDeploymentTarget(machine, project, deploymentGroupId, targetId) {
|
|
2292
|
+
return this.beginRequest({
|
|
2293
|
+
apiVersion: "7.2-preview.1",
|
|
2294
|
+
method: "PATCH",
|
|
2295
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
|
|
2296
|
+
routeValues: {
|
|
2297
|
+
project: project,
|
|
2298
|
+
deploymentGroupId: deploymentGroupId,
|
|
2299
|
+
targetId: targetId
|
|
2300
|
+
},
|
|
2301
|
+
body: machine
|
|
2302
|
+
});
|
|
2303
|
+
}
|
|
2304
|
+
/**
|
|
2305
|
+
* Update tags of a list of deployment targets in a deployment group.
|
|
2306
|
+
*
|
|
2307
|
+
* @param machines - Deployment targets with tags to udpdate.
|
|
2308
|
+
* @param project - Project ID or project name
|
|
2309
|
+
* @param deploymentGroupId - ID of the deployment group in which deployment targets are updated.
|
|
2310
|
+
*/
|
|
2311
|
+
async updateDeploymentTargets(machines, project, deploymentGroupId) {
|
|
2312
|
+
return this.beginRequest({
|
|
2313
|
+
apiVersion: "7.2-preview.1",
|
|
2314
|
+
method: "PATCH",
|
|
2315
|
+
routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
|
|
2316
|
+
routeValues: {
|
|
2317
|
+
project: project,
|
|
2318
|
+
deploymentGroupId: deploymentGroupId
|
|
2319
|
+
},
|
|
2320
|
+
body: machines
|
|
2321
|
+
});
|
|
2322
|
+
}
|
|
2323
|
+
/**
|
|
2324
|
+
* Create a task group.
|
|
2325
|
+
*
|
|
2326
|
+
* @param taskGroup - Task group object to create.
|
|
2327
|
+
* @param project - Project ID or project name
|
|
2328
|
+
*/
|
|
2329
|
+
async addTaskGroup(taskGroup, project) {
|
|
2330
|
+
return this.beginRequest({
|
|
2331
|
+
apiVersion: "7.2-preview.1",
|
|
2332
|
+
method: "POST",
|
|
2333
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2334
|
+
routeValues: {
|
|
2335
|
+
project: project
|
|
2336
|
+
},
|
|
2337
|
+
body: taskGroup
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
/**
|
|
2341
|
+
* Delete a task group.
|
|
2342
|
+
*
|
|
2343
|
+
* @param project - Project ID or project name
|
|
2344
|
+
* @param taskGroupId - Id of the task group to be deleted.
|
|
2345
|
+
* @param comment - Comments to delete.
|
|
2346
|
+
*/
|
|
2347
|
+
async deleteTaskGroup(project, taskGroupId, comment) {
|
|
2348
|
+
const queryValues = {
|
|
2349
|
+
comment: comment
|
|
2350
|
+
};
|
|
2351
|
+
return this.beginRequest({
|
|
2352
|
+
apiVersion: "7.2-preview.1",
|
|
2353
|
+
method: "DELETE",
|
|
2354
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2355
|
+
routeValues: {
|
|
2356
|
+
project: project,
|
|
2357
|
+
taskGroupId: taskGroupId
|
|
2358
|
+
},
|
|
2359
|
+
queryParams: queryValues
|
|
2360
|
+
});
|
|
2361
|
+
}
|
|
2362
|
+
/**
|
|
2363
|
+
* Get task group.
|
|
2364
|
+
*
|
|
2365
|
+
* @param project - Project ID or project name
|
|
2366
|
+
* @param taskGroupId - Id of the task group.
|
|
2367
|
+
* @param versionSpec - version specification of the task group. examples: 1, 1.0.
|
|
2368
|
+
* @param expand - The properties that should be expanded. example $expand=Tasks will expand nested task groups.
|
|
2369
|
+
*/
|
|
2370
|
+
async getTaskGroup(project, taskGroupId, versionSpec, expand) {
|
|
2371
|
+
const queryValues = {
|
|
2372
|
+
versionSpec: versionSpec,
|
|
2373
|
+
'$expand': expand
|
|
2374
|
+
};
|
|
2375
|
+
return this.beginRequest({
|
|
2376
|
+
apiVersion: "7.2-preview.1",
|
|
2377
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2378
|
+
routeValues: {
|
|
2379
|
+
project: project,
|
|
2380
|
+
taskGroupId: taskGroupId
|
|
2381
|
+
},
|
|
2382
|
+
queryParams: queryValues
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
/**
|
|
2386
|
+
* @param project - Project ID or project name
|
|
2387
|
+
* @param taskGroupId -
|
|
2388
|
+
* @param revision -
|
|
2389
|
+
*/
|
|
2390
|
+
async getTaskGroupRevision(project, taskGroupId, revision) {
|
|
2391
|
+
const queryValues = {
|
|
2392
|
+
revision: revision
|
|
2393
|
+
};
|
|
2394
|
+
return this.beginRequest({
|
|
2395
|
+
apiVersion: "7.2-preview.1",
|
|
2396
|
+
httpResponseType: "text/plain",
|
|
2397
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2398
|
+
routeValues: {
|
|
2399
|
+
project: project,
|
|
2400
|
+
taskGroupId: taskGroupId
|
|
2401
|
+
},
|
|
2402
|
+
queryParams: queryValues
|
|
2403
|
+
});
|
|
2404
|
+
}
|
|
2405
|
+
/**
|
|
2406
|
+
* List task groups.
|
|
2407
|
+
*
|
|
2408
|
+
* @param project - Project ID or project name
|
|
2409
|
+
* @param taskGroupId - Id of the task group.
|
|
2410
|
+
* @param expanded - 'true' to recursively expand task groups. Default is 'false'.
|
|
2411
|
+
* @param taskIdFilter - Guid of the taskId to filter.
|
|
2412
|
+
* @param deleted - 'true'to include deleted task groups. Default is 'false'.
|
|
2413
|
+
* @param top - Number of task groups to get.
|
|
2414
|
+
* @param continuationToken - Gets the task groups after the continuation token provided.
|
|
2415
|
+
* @param queryOrder - Gets the results in the defined order. Default is 'CreatedOnDescending'.
|
|
2416
|
+
*/
|
|
2417
|
+
async getTaskGroups(project, taskGroupId, expanded, taskIdFilter, deleted, top, continuationToken, queryOrder) {
|
|
2418
|
+
const queryValues = {
|
|
2419
|
+
expanded: expanded,
|
|
2420
|
+
taskIdFilter: taskIdFilter,
|
|
2421
|
+
deleted: deleted,
|
|
2422
|
+
'$top': top,
|
|
2423
|
+
continuationToken: continuationToken,
|
|
2424
|
+
queryOrder: queryOrder
|
|
2425
|
+
};
|
|
2426
|
+
return this.beginRequest({
|
|
2427
|
+
apiVersion: "7.2-preview.1",
|
|
2428
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2429
|
+
routeValues: {
|
|
2430
|
+
project: project,
|
|
2431
|
+
taskGroupId: taskGroupId
|
|
2432
|
+
},
|
|
2433
|
+
queryParams: queryValues
|
|
2434
|
+
});
|
|
2435
|
+
}
|
|
2436
|
+
/**
|
|
2437
|
+
* @param taskGroupMetadata -
|
|
2438
|
+
* @param project - Project ID or project name
|
|
2439
|
+
* @param parentTaskGroupId -
|
|
2440
|
+
*/
|
|
2441
|
+
async publishTaskGroup(taskGroupMetadata, project, parentTaskGroupId) {
|
|
2442
|
+
const queryValues = {
|
|
2443
|
+
parentTaskGroupId: parentTaskGroupId
|
|
2444
|
+
};
|
|
2445
|
+
return this.beginRequest({
|
|
2446
|
+
apiVersion: "7.2-preview.1",
|
|
2447
|
+
method: "PUT",
|
|
2448
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2449
|
+
routeValues: {
|
|
2450
|
+
project: project
|
|
2451
|
+
},
|
|
2452
|
+
queryParams: queryValues,
|
|
2453
|
+
body: taskGroupMetadata
|
|
2454
|
+
});
|
|
2455
|
+
}
|
|
2456
|
+
/**
|
|
2457
|
+
* @param taskGroup -
|
|
2458
|
+
* @param project - Project ID or project name
|
|
2459
|
+
*/
|
|
2460
|
+
async undeleteTaskGroup(taskGroup, project) {
|
|
2461
|
+
return this.beginRequest({
|
|
2462
|
+
apiVersion: "7.2-preview.1",
|
|
2463
|
+
method: "PATCH",
|
|
2464
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2465
|
+
routeValues: {
|
|
2466
|
+
project: project
|
|
2467
|
+
},
|
|
2468
|
+
body: taskGroup
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
/**
|
|
2472
|
+
* Update a task group.
|
|
2473
|
+
*
|
|
2474
|
+
* @param taskGroup - Task group to update.
|
|
2475
|
+
* @param project - Project ID or project name
|
|
2476
|
+
* @param taskGroupId - Id of the task group to update.
|
|
2477
|
+
*/
|
|
2478
|
+
async updateTaskGroup(taskGroup, project, taskGroupId) {
|
|
2479
|
+
return this.beginRequest({
|
|
2480
|
+
apiVersion: "7.2-preview.1",
|
|
2481
|
+
method: "PUT",
|
|
2482
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2483
|
+
routeValues: {
|
|
2484
|
+
project: project,
|
|
2485
|
+
taskGroupId: taskGroupId
|
|
2486
|
+
},
|
|
2487
|
+
body: taskGroup
|
|
2488
|
+
});
|
|
2489
|
+
}
|
|
2490
|
+
/**
|
|
2491
|
+
* @param taskGroupUpdateProperties -
|
|
2492
|
+
* @param project - Project ID or project name
|
|
2493
|
+
* @param taskGroupId -
|
|
2494
|
+
* @param disablePriorVersions -
|
|
2495
|
+
*/
|
|
2496
|
+
async updateTaskGroupProperties(taskGroupUpdateProperties, project, taskGroupId, disablePriorVersions) {
|
|
2497
|
+
const queryValues = {
|
|
2498
|
+
disablePriorVersions: disablePriorVersions
|
|
2499
|
+
};
|
|
2500
|
+
return this.beginRequest({
|
|
2501
|
+
apiVersion: "7.2-preview.1",
|
|
2502
|
+
method: "PATCH",
|
|
2503
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
|
|
2504
|
+
routeValues: {
|
|
2505
|
+
project: project,
|
|
2506
|
+
taskGroupId: taskGroupId
|
|
2507
|
+
},
|
|
2508
|
+
queryParams: queryValues,
|
|
2509
|
+
body: taskGroupUpdateProperties
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
/**
|
|
2513
|
+
* Get task groups by their IDs and version specs.
|
|
2514
|
+
*
|
|
2515
|
+
* @param groupsVersionsMap - Group ID to versions map.
|
|
2516
|
+
* @param project - Project ID or project name
|
|
2517
|
+
* @param expand - The properties that should be expanded. example $expand=Tasks will expand nested task groups.
|
|
2518
|
+
*/
|
|
2519
|
+
async getTaskGroupsByIds(groupsVersionsMap, project, expand) {
|
|
2520
|
+
const queryValues = {
|
|
2521
|
+
'$expand': expand
|
|
2522
|
+
};
|
|
2523
|
+
return this.beginRequest({
|
|
2524
|
+
apiVersion: "7.2-preview.1",
|
|
2525
|
+
method: "POST",
|
|
2526
|
+
routeTemplate: "{project}/_apis/distributedtask/taskgroupsquery",
|
|
2527
|
+
routeValues: {
|
|
2528
|
+
project: project
|
|
2529
|
+
},
|
|
2530
|
+
queryParams: queryValues,
|
|
2531
|
+
body: groupsVersionsMap
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
/**
|
|
2535
|
+
* @param taskId -
|
|
2536
|
+
*/
|
|
2537
|
+
async deleteTaskDefinition(taskId) {
|
|
2538
|
+
return this.beginRequest({
|
|
2539
|
+
apiVersion: "7.2-preview.1",
|
|
2540
|
+
method: "DELETE",
|
|
2541
|
+
routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
|
|
2542
|
+
routeValues: {
|
|
2543
|
+
taskId: taskId
|
|
2544
|
+
}
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
/**
|
|
2548
|
+
* @param taskId -
|
|
2549
|
+
* @param versionString -
|
|
2550
|
+
* @param visibility -
|
|
2551
|
+
* @param scopeLocal -
|
|
2552
|
+
*/
|
|
2553
|
+
async getTaskContentZip(taskId, versionString, visibility, scopeLocal) {
|
|
2554
|
+
const queryValues = {
|
|
2555
|
+
versionString: versionString,
|
|
2556
|
+
visibility: visibility,
|
|
2557
|
+
scopeLocal: scopeLocal
|
|
2558
|
+
};
|
|
2559
|
+
return this.beginRequest({
|
|
2560
|
+
apiVersion: "7.2-preview.1",
|
|
2561
|
+
httpResponseType: "application/zip",
|
|
2562
|
+
routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
|
|
2563
|
+
routeValues: {
|
|
2564
|
+
taskId: taskId
|
|
2565
|
+
},
|
|
2566
|
+
queryParams: queryValues
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* @param taskId -
|
|
2571
|
+
* @param versionString -
|
|
2572
|
+
* @param visibility -
|
|
2573
|
+
* @param scopeLocal -
|
|
2574
|
+
*/
|
|
2575
|
+
async getTaskDefinition(taskId, versionString, visibility, scopeLocal) {
|
|
2576
|
+
const queryValues = {
|
|
2577
|
+
versionString: versionString,
|
|
2578
|
+
visibility: visibility,
|
|
2579
|
+
scopeLocal: scopeLocal
|
|
2580
|
+
};
|
|
2581
|
+
return this.beginRequest({
|
|
2582
|
+
apiVersion: "7.2-preview.1",
|
|
2583
|
+
routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
|
|
2584
|
+
routeValues: {
|
|
2585
|
+
taskId: taskId
|
|
2586
|
+
},
|
|
2587
|
+
queryParams: queryValues
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
/**
|
|
2591
|
+
* @param taskId -
|
|
2592
|
+
* @param visibility -
|
|
2593
|
+
* @param scopeLocal -
|
|
2594
|
+
* @param allVersions -
|
|
2595
|
+
*/
|
|
2596
|
+
async getTaskDefinitions(taskId, visibility, scopeLocal, allVersions) {
|
|
2597
|
+
const queryValues = {
|
|
2598
|
+
visibility: visibility,
|
|
2599
|
+
scopeLocal: scopeLocal,
|
|
2600
|
+
allVersions: allVersions
|
|
2601
|
+
};
|
|
2602
|
+
return this.beginRequest({
|
|
2603
|
+
apiVersion: "7.2-preview.1",
|
|
2604
|
+
routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
|
|
2605
|
+
routeValues: {
|
|
2606
|
+
taskId: taskId
|
|
2607
|
+
},
|
|
2608
|
+
queryParams: queryValues
|
|
2609
|
+
});
|
|
2610
|
+
}
|
|
2611
|
+
/**
|
|
2612
|
+
* @param poolId -
|
|
2613
|
+
* @param agentId -
|
|
2614
|
+
* @param currentState -
|
|
2615
|
+
*/
|
|
2616
|
+
async updateAgentUpdateState(poolId, agentId, currentState) {
|
|
2617
|
+
const queryValues = {
|
|
2618
|
+
currentState: currentState
|
|
2619
|
+
};
|
|
2620
|
+
return this.beginRequest({
|
|
2621
|
+
apiVersion: "7.2-preview.1",
|
|
2622
|
+
method: "PUT",
|
|
2623
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}/updates",
|
|
2624
|
+
routeValues: {
|
|
2625
|
+
poolId: poolId,
|
|
2626
|
+
agentId: agentId
|
|
2627
|
+
},
|
|
2628
|
+
queryParams: queryValues
|
|
2629
|
+
});
|
|
2630
|
+
}
|
|
2631
|
+
/**
|
|
2632
|
+
* @param userCapabilities -
|
|
2633
|
+
* @param poolId -
|
|
2634
|
+
* @param agentId -
|
|
2635
|
+
*/
|
|
2636
|
+
async updateAgentUserCapabilities(userCapabilities, poolId, agentId) {
|
|
2637
|
+
return this.beginRequest({
|
|
2638
|
+
apiVersion: "7.2-preview.1",
|
|
2639
|
+
method: "PUT",
|
|
2640
|
+
routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}/usercapabilities",
|
|
2641
|
+
routeValues: {
|
|
2642
|
+
poolId: poolId,
|
|
2643
|
+
agentId: agentId
|
|
2644
|
+
},
|
|
2645
|
+
body: userCapabilities
|
|
2646
|
+
});
|
|
2647
|
+
}
|
|
2648
|
+
/**
|
|
2649
|
+
* Add a variable group.
|
|
2650
|
+
*
|
|
2651
|
+
* @param variableGroupParameters -
|
|
2652
|
+
*/
|
|
2653
|
+
async addVariableGroup(variableGroupParameters) {
|
|
2654
|
+
return this.beginRequest({
|
|
2655
|
+
apiVersion: "7.2-preview.2",
|
|
2656
|
+
method: "POST",
|
|
2657
|
+
routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
|
|
2658
|
+
body: variableGroupParameters
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
/**
|
|
2662
|
+
* Delete a variable group
|
|
2663
|
+
*
|
|
2664
|
+
* @param groupId - Id of the variable group.
|
|
2665
|
+
* @param projectIds -
|
|
2666
|
+
*/
|
|
2667
|
+
async deleteVariableGroup(groupId, projectIds) {
|
|
2668
|
+
const queryValues = {
|
|
2669
|
+
projectIds: projectIds && projectIds.join(",")
|
|
2670
|
+
};
|
|
2671
|
+
return this.beginRequest({
|
|
2672
|
+
apiVersion: "7.2-preview.2",
|
|
2673
|
+
method: "DELETE",
|
|
2674
|
+
routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
|
|
2675
|
+
routeValues: {
|
|
2676
|
+
groupId: groupId
|
|
2677
|
+
},
|
|
2678
|
+
queryParams: queryValues
|
|
2679
|
+
});
|
|
2680
|
+
}
|
|
2681
|
+
/**
|
|
2682
|
+
* Add a variable group.
|
|
2683
|
+
*
|
|
2684
|
+
* @param variableGroupProjectReferences -
|
|
2685
|
+
* @param variableGroupId -
|
|
2686
|
+
*/
|
|
2687
|
+
async shareVariableGroup(variableGroupProjectReferences, variableGroupId) {
|
|
2688
|
+
const queryValues = {
|
|
2689
|
+
variableGroupId: variableGroupId
|
|
2690
|
+
};
|
|
2691
|
+
return this.beginRequest({
|
|
2692
|
+
apiVersion: "7.2-preview.2",
|
|
2693
|
+
method: "PATCH",
|
|
2694
|
+
routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
|
|
2695
|
+
queryParams: queryValues,
|
|
2696
|
+
body: variableGroupProjectReferences
|
|
2697
|
+
});
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* Update a variable group.
|
|
2701
|
+
*
|
|
2702
|
+
* @param variableGroupParameters -
|
|
2703
|
+
* @param groupId - Id of the variable group to update.
|
|
2704
|
+
*/
|
|
2705
|
+
async updateVariableGroup(variableGroupParameters, groupId) {
|
|
2706
|
+
return this.beginRequest({
|
|
2707
|
+
apiVersion: "7.2-preview.2",
|
|
2708
|
+
method: "PUT",
|
|
2709
|
+
routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
|
|
2710
|
+
routeValues: {
|
|
2711
|
+
groupId: groupId
|
|
2712
|
+
},
|
|
2713
|
+
body: variableGroupParameters
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
/**
|
|
2717
|
+
* Get a variable group.
|
|
2718
|
+
*
|
|
2719
|
+
* @param project - Project ID or project name
|
|
2720
|
+
* @param groupId - Id of the variable group.
|
|
2721
|
+
*/
|
|
2722
|
+
async getVariableGroup(project, groupId) {
|
|
2723
|
+
return this.beginRequest({
|
|
2724
|
+
apiVersion: "7.2-preview.2",
|
|
2725
|
+
routeTemplate: "{project}/_apis/distributedtask/variablegroups/{groupId}",
|
|
2726
|
+
routeValues: {
|
|
2727
|
+
project: project,
|
|
2728
|
+
groupId: groupId
|
|
2729
|
+
}
|
|
2730
|
+
});
|
|
2731
|
+
}
|
|
2732
|
+
/**
|
|
2733
|
+
* Get variable groups.
|
|
2734
|
+
*
|
|
2735
|
+
* @param project - Project ID or project name
|
|
2736
|
+
* @param groupName - Name of variable group.
|
|
2737
|
+
* @param actionFilter - Action filter for the variable group. It specifies the action which can be performed on the variable groups.
|
|
2738
|
+
* @param top - Number of variable groups to get.
|
|
2739
|
+
* @param continuationToken - Gets the variable groups after the continuation token provided.
|
|
2740
|
+
* @param queryOrder - Gets the results in the defined order. Default is 'IdDescending'.
|
|
2741
|
+
*/
|
|
2742
|
+
async getVariableGroups(project, groupName, actionFilter, top, continuationToken, queryOrder) {
|
|
2743
|
+
const queryValues = {
|
|
2744
|
+
groupName: groupName,
|
|
2745
|
+
actionFilter: actionFilter,
|
|
2746
|
+
'$top': top,
|
|
2747
|
+
continuationToken: continuationToken,
|
|
2748
|
+
queryOrder: queryOrder
|
|
2749
|
+
};
|
|
2750
|
+
return this.beginRequest({
|
|
2751
|
+
apiVersion: "7.2-preview.2",
|
|
2752
|
+
routeTemplate: "{project}/_apis/distributedtask/variablegroups/{groupId}",
|
|
2753
|
+
routeValues: {
|
|
2754
|
+
project: project
|
|
2755
|
+
},
|
|
2756
|
+
queryParams: queryValues
|
|
2757
|
+
});
|
|
2758
|
+
}
|
|
2759
|
+
/**
|
|
2760
|
+
* Get variable groups by ids.
|
|
2761
|
+
*
|
|
2762
|
+
* @param project - Project ID or project name
|
|
2763
|
+
* @param groupIds - Comma separated list of Ids of variable groups.
|
|
2764
|
+
* @param loadSecrets - Flag indicating if the secrets within variable groups should be loaded.
|
|
2765
|
+
*/
|
|
2766
|
+
async getVariableGroupsById(project, groupIds, loadSecrets) {
|
|
2767
|
+
const queryValues = {
|
|
2768
|
+
groupIds: groupIds && groupIds.join(","),
|
|
2769
|
+
loadSecrets: loadSecrets
|
|
2770
|
+
};
|
|
2771
|
+
return this.beginRequest({
|
|
2772
|
+
apiVersion: "7.2-preview.2",
|
|
2773
|
+
routeTemplate: "{project}/_apis/distributedtask/variablegroups/{groupId}",
|
|
2774
|
+
routeValues: {
|
|
2775
|
+
project: project
|
|
2776
|
+
},
|
|
2777
|
+
queryParams: queryValues
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2780
|
+
/**
|
|
2781
|
+
* @param createParameters -
|
|
2782
|
+
* @param project - Project ID or project name
|
|
2783
|
+
* @param environmentId -
|
|
2784
|
+
*/
|
|
2785
|
+
async addVirtualMachineGroup(createParameters, project, environmentId) {
|
|
2786
|
+
return this.beginRequest({
|
|
2787
|
+
apiVersion: "7.2-preview.1",
|
|
2788
|
+
method: "POST",
|
|
2789
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
|
|
2790
|
+
routeValues: {
|
|
2791
|
+
project: project,
|
|
2792
|
+
environmentId: environmentId
|
|
2793
|
+
},
|
|
2794
|
+
body: createParameters
|
|
2795
|
+
});
|
|
2796
|
+
}
|
|
2797
|
+
/**
|
|
2798
|
+
* @param project - Project ID or project name
|
|
2799
|
+
* @param environmentId -
|
|
2800
|
+
* @param resourceId -
|
|
2801
|
+
*/
|
|
2802
|
+
async deleteVirtualMachineGroup(project, environmentId, resourceId) {
|
|
2803
|
+
return this.beginRequest({
|
|
2804
|
+
apiVersion: "7.2-preview.1",
|
|
2805
|
+
method: "DELETE",
|
|
2806
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
|
|
2807
|
+
routeValues: {
|
|
2808
|
+
project: project,
|
|
2809
|
+
environmentId: environmentId,
|
|
2810
|
+
resourceId: resourceId
|
|
2811
|
+
}
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
/**
|
|
2815
|
+
* @param project - Project ID or project name
|
|
2816
|
+
* @param environmentId -
|
|
2817
|
+
* @param resourceId -
|
|
2818
|
+
*/
|
|
2819
|
+
async getVirtualMachineGroup(project, environmentId, resourceId) {
|
|
2820
|
+
return this.beginRequest({
|
|
2821
|
+
apiVersion: "7.2-preview.1",
|
|
2822
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
|
|
2823
|
+
routeValues: {
|
|
2824
|
+
project: project,
|
|
2825
|
+
environmentId: environmentId,
|
|
2826
|
+
resourceId: resourceId
|
|
2827
|
+
}
|
|
2828
|
+
});
|
|
2829
|
+
}
|
|
2830
|
+
/**
|
|
2831
|
+
* @param resource -
|
|
2832
|
+
* @param project - Project ID or project name
|
|
2833
|
+
* @param environmentId -
|
|
2834
|
+
*/
|
|
2835
|
+
async updateVirtualMachineGroup(resource, project, environmentId) {
|
|
2836
|
+
return this.beginRequest({
|
|
2837
|
+
apiVersion: "7.2-preview.1",
|
|
2838
|
+
method: "PATCH",
|
|
2839
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
|
|
2840
|
+
routeValues: {
|
|
2841
|
+
project: project,
|
|
2842
|
+
environmentId: environmentId
|
|
2843
|
+
},
|
|
2844
|
+
body: resource
|
|
2845
|
+
});
|
|
2846
|
+
}
|
|
2847
|
+
/**
|
|
2848
|
+
* @param project - Project ID or project name
|
|
2849
|
+
* @param environmentId -
|
|
2850
|
+
* @param resourceId -
|
|
2851
|
+
* @param continuationToken -
|
|
2852
|
+
* @param name -
|
|
2853
|
+
* @param partialNameMatch -
|
|
2854
|
+
* @param tags -
|
|
2855
|
+
* @param top -
|
|
2856
|
+
*/
|
|
2857
|
+
async getVirtualMachines(project, environmentId, resourceId, continuationToken, name, partialNameMatch, tags, top) {
|
|
2858
|
+
const queryValues = {
|
|
2859
|
+
continuationToken: continuationToken,
|
|
2860
|
+
name: name,
|
|
2861
|
+
partialNameMatch: partialNameMatch,
|
|
2862
|
+
tags: tags && tags.join(","),
|
|
2863
|
+
'$top': top
|
|
2864
|
+
};
|
|
2865
|
+
return this.beginRequest({
|
|
2866
|
+
apiVersion: "7.2-preview.1",
|
|
2867
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}/virtualmachines",
|
|
2868
|
+
routeValues: {
|
|
2869
|
+
project: project,
|
|
2870
|
+
environmentId: environmentId,
|
|
2871
|
+
resourceId: resourceId
|
|
2872
|
+
},
|
|
2873
|
+
queryParams: queryValues,
|
|
2874
|
+
returnRawResponse: true
|
|
2875
|
+
}).then(async (response) => {
|
|
2876
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
2877
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
2878
|
+
return body;
|
|
2879
|
+
});
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* @param machines -
|
|
2883
|
+
* @param project - Project ID or project name
|
|
2884
|
+
* @param environmentId -
|
|
2885
|
+
* @param resourceId -
|
|
2886
|
+
*/
|
|
2887
|
+
async updateVirtualMachines(machines, project, environmentId, resourceId) {
|
|
2888
|
+
return this.beginRequest({
|
|
2889
|
+
apiVersion: "7.2-preview.1",
|
|
2890
|
+
method: "PATCH",
|
|
2891
|
+
routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}/virtualmachines",
|
|
2892
|
+
routeValues: {
|
|
2893
|
+
project: project,
|
|
2894
|
+
environmentId: environmentId,
|
|
2895
|
+
resourceId: resourceId
|
|
2896
|
+
},
|
|
2897
|
+
body: machines
|
|
2898
|
+
});
|
|
2899
|
+
}
|
|
2900
|
+
/**
|
|
2901
|
+
* @param tenantId -
|
|
2902
|
+
* @param redirectUri -
|
|
2903
|
+
* @param promptOption -
|
|
2904
|
+
* @param completeCallbackPayload -
|
|
2905
|
+
* @param completeCallbackByAuthCode -
|
|
2906
|
+
*/
|
|
2907
|
+
async createAadOAuthRequest(tenantId, redirectUri, promptOption, completeCallbackPayload, completeCallbackByAuthCode) {
|
|
2908
|
+
const queryValues = {
|
|
2909
|
+
tenantId: tenantId,
|
|
2910
|
+
redirectUri: redirectUri,
|
|
2911
|
+
promptOption: promptOption,
|
|
2912
|
+
completeCallbackPayload: completeCallbackPayload,
|
|
2913
|
+
completeCallbackByAuthCode: completeCallbackByAuthCode
|
|
2914
|
+
};
|
|
2915
|
+
return this.beginRequest({
|
|
2916
|
+
apiVersion: "7.2-preview.1",
|
|
2917
|
+
method: "POST",
|
|
2918
|
+
routeTemplate: "_apis/distributedtask/serviceendpointproxy/vstsaadoauth",
|
|
2919
|
+
queryParams: queryValues
|
|
2920
|
+
});
|
|
2921
|
+
}
|
|
2922
|
+
/**
|
|
2923
|
+
*/
|
|
2924
|
+
async getVstsAadTenantId() {
|
|
2925
|
+
return this.beginRequest({
|
|
2926
|
+
apiVersion: "7.2-preview.1",
|
|
2927
|
+
routeTemplate: "_apis/distributedtask/serviceendpointproxy/vstsaadoauth"
|
|
2928
|
+
});
|
|
2929
|
+
}
|
|
2930
|
+
/**
|
|
2931
|
+
* GET the Yaml schema used for Yaml file validation.
|
|
2932
|
+
*
|
|
2933
|
+
* @param validateTaskNames - Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation).
|
|
2934
|
+
*/
|
|
2935
|
+
async getYamlSchema(validateTaskNames) {
|
|
2936
|
+
const queryValues = {
|
|
2937
|
+
validateTaskNames: validateTaskNames
|
|
2938
|
+
};
|
|
2939
|
+
return this.beginRequest({
|
|
2940
|
+
apiVersion: "7.2-preview.1",
|
|
2941
|
+
routeTemplate: "_apis/distributedtask/yamlschema",
|
|
2942
|
+
queryParams: queryValues
|
|
2943
|
+
});
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
TaskAgentRestClient.RESOURCE_AREA_ID = "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd";
|