I created a form where I can add but also delete a custom domain and certificate.I delete the domain in the following way:
var hostBinding = hostnameBindings.Get(_customDomain);if (hostBinding != null){ SiteHostNameBindingResource siteHostNameBinding = hostBinding.Value; await siteHostNameBinding.DeleteAsync(WaitUntil.Completed);}But I don't know how to delete the certificate:
AppCertificateCollection certcollection = _resourceGroupResource.GetAppCertificates();If I know the name of the certificate, I can do it like this:
var certificate = certcollection.Exists("name");certificate.Delete();