How to upload or update the cloud service certificate with Azure REST ARM API

瘦欲@ 提交于 2019-12-23 04:33:16

问题


I have to upload a cloud service cert.

PUT or POST on this URI is not working subscriptions/%sub_Id%/resourceGroups/%rg_Name%/providers/Microsoft.ClassicCompute/domainNames/%cloudService_Name%/servicecertificates

I am getting "InvalidRequestUri",

Please help me .


回答1:


you can use something like this:

"path": "subscriptions/%sub_Id%/resourceGroups/%rg_Name%/providers/Microsoft.ClassicCompute/domainNames/%cloudService_Name%/servicecertificates/SHA1-%THUMBPRINT%",
"body": {
     "thumbprintAlgorithm": "SHA1",
     "thumbprint": "%THUMBPRINT%",
     "data": "%base64encodedcert%",
     "certificateFormat": "pfx",
     "password": "password" << this is in plain text I believe
}

Where %thumbprint% = sha1 thumbprint of your certificate, %base64encodedcert% your pfx encoded in base64.



来源:https://stackoverflow.com/questions/45958860/how-to-upload-or-update-the-cloud-service-certificate-with-azure-rest-arm-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!