private CertificateTwins AddProtectedServers(CertificateTwins twin)
 {
     twin.Updater.ProtectedServers.Clear();
     twin.Updater.ProtectedServers.Add(GetMaintenanceServer());
     twin.App.ProtectedServers.Clear();
     twin.App.ProtectedServers.Add(GetMaintenanceServer());
     twin.App.ProtectedServers.Add(GetTransServer());
     return(twin);
 }
 public async Task CreateCertificateAsync(List <CertificateTwins> twins)
 {
     try
     {
         logger.LogDebug("AzS3Service CreateCertificateAsync Start\n");
         foreach (CertificateTwins twin in twins)
         {
             CertificateTwins twinRe = AddProtectedServers(twin);
             await S3UploadFile(twinRe.Updater);
             await S3UploadFile(twinRe.App);
         }
         logger.LogDebug("AzS3Service CreateCertificateAsync End\n");
     }
     catch (Exception e)
     {
         logger.LogError("AzS3Service CreateCertificateAsync:" + e);
     }
 }