In azure cli we have this command to import/bind certificates to azure app from keyvault.az
webapp config ssl bind --certificate-thumbprint {certificate-thumbprint} --name MyWebapp --resource-group MyResourceGroup --ssl-type SNI
I couldn't find equivalent library in .NET to do the same (I am using C#). Can anyone help in this?
Microsoft has a fluent API to access all the Azure services.
By accessing the App Service API you should be able to assign an existing certificate to it.
Thanks @john your hint was more than enough for me to look this up. The method that you pointed helps in ssl binding with the existing certificate. But I need to import the certificate in my azure web app . Any API for that?
var webApp1 = azure.WebApps
.GetById(<your resouce Id as a string>)
.Update()
.DefineSslBinding()
.ForHostname(<host name as a string>)
.WithPfxCertificateToUpload(<certificate as a string>,
<password as a string>)
.WithSniBasedSsl()
.Attach()
.Apply();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.