如何使用 Azure REST ARM 上传或更新云服务证书 API
How to upload or update the cloud service certificate with Azure REST ARM API
我要上传云服务证书。
此 URI 上的 PUT 或 POST 无效 subscriptions/%sub_Id%/resourceGroups/%rg_Name%/providers/Microsoft.ClassicCompute/domainNames/%cloudService_Name%/servicecertificates
我得到 "InvalidRequestUri",
请帮帮我。
你可以使用这样的东西:
"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
}
其中 %thumbprint% = 您证书的 sha1 指纹,%base64encodedcert% 您的 pfx 以 base64 编码。
我要上传云服务证书。
此 URI 上的PUT 或 POST 无效 subscriptions/%sub_Id%/resourceGroups/%rg_Name%/providers/Microsoft.ClassicCompute/domainNames/%cloudService_Name%/servicecertificates
我得到 "InvalidRequestUri",
请帮帮我。
你可以使用这样的东西:
"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
}
其中 %thumbprint% = 您证书的 sha1 指纹,%base64encodedcert% 您的 pfx 以 base64 编码。