/// <summary> /// Validates if Restore can be triggered for a DataSource /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the backup vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the backup vault is present. /// </param> /// <param name='backupInstanceName'> /// The name of the backup instance /// </param> /// <param name='restoreRequestObject'> /// Gets or sets the restore request object. /// </param> public static OperationJobExtendedInfo BeginValidateRestore(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject) { return(operations.BeginValidateRestoreAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject).GetAwaiter().GetResult()); }
/// <summary> /// Validates if Restore can be triggered for a DataSource /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the backup vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the backup vault is present. /// </param> /// <param name='backupInstanceName'> /// The name of the backup instance /// </param> /// <param name='restoreRequestObject'> /// Gets or sets the restore request object. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationJobExtendedInfo> BeginValidateRestoreAsync(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginValidateRestoreWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Triggers restore for a BackupInstance /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the backup vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the backup vault is present. /// </param> /// <param name='backupInstanceName'> /// The name of the backup instance /// </param> /// <param name='parameters'> /// Request body for operation /// </param> public static OperationJobExtendedInfo TriggerRestore(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest parameters) { return(operations.TriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters).GetAwaiter().GetResult()); }