问题
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