[英]How to edit service connection, authorize and run in Azure DevOps Pipeline?
[英]Azure Devops - How to reset Resource Group in Edit service connection
我們無法在 UI 中將資源組更改為空,因為它是設計使然。
有一個解決方法是使用Rest API修改服務連接。 請參閱類似案例: https://developercommunity.visualstudio.com/t/Cant-change-resource-group-to-empty-in-/1396077 。
獲取請求正文:
GET https://dev.azure.com/{organization}/{project}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1-preview.4
更新服務連接:
PUT https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1-preview.4
請將 scope 設置為空。
"authorization": {
"parameters": {
"tenantid": "",
"serviceprincipalid": "",
"authenticationType": "spnKey",
"scope": "", // this is the resource group
"serviceprincipalkey": null
},
"scheme": "ServicePrincipal"
},
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.