/// <summary> /// Backups a site on-demand. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.IWebSiteOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the web space. /// </param> /// <param name='webSiteName'> /// Required. The name of the web site. /// </param> /// <param name='slotName'> /// Optional. The name of the slot. /// </param> /// <param name='backupRequestEnvelope'> /// Required. A backup specification. /// </param> /// <returns> /// The backup record created based on the backup request. /// </returns> public static WebSiteBackupResponse Backup(this IWebSiteOperations operations, string resourceGroupName, string webSiteName, string slotName, BackupRequestEnvelope backupRequestEnvelope) { return Task.Factory.StartNew((object s) => { return ((IWebSiteOperations)s).BackupAsync(resourceGroupName, webSiteName, slotName, backupRequestEnvelope); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Backups a site on-demand. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.IWebSiteOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the web space. /// </param> /// <param name='webSiteName'> /// Required. The name of the web site. /// </param> /// <param name='slotName'> /// Optional. The name of the slot. /// </param> /// <param name='backupRequestEnvelope'> /// Required. A backup specification. /// </param> /// <returns> /// The backup record created based on the backup request. /// </returns> public static Task<WebSiteBackupResponse> BackupAsync(this IWebSiteOperations operations, string resourceGroupName, string webSiteName, string slotName, BackupRequestEnvelope backupRequestEnvelope) { return operations.BackupAsync(resourceGroupName, webSiteName, slotName, backupRequestEnvelope, CancellationToken.None); }
/// <summary> /// Updates a backup schedule for a site. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.IWebSiteOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the web space. /// </param> /// <param name='webSiteName'> /// Required. The name of the web site. /// </param> /// <param name='backupRequestEnvelope'> /// Required. A backup schedule specification. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task<OperationResponse> UpdateBackupConfigurationAsync(this IWebSiteOperations operations, string resourceGroupName, string webSiteName, BackupRequestEnvelope backupRequestEnvelope) { return operations.UpdateBackupConfigurationAsync(resourceGroupName, webSiteName, backupRequestEnvelope, CancellationToken.None); }