/// <summary> /// Provisions a script which invokes an iSCSI connection to the backup data. /// Executing this script opens a file /// explorer displaying all the recoverable files and folders. This is an /// asynchronous operation. To know the status of /// provisioning, call GetProtectedItemOperationResult API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the recovery services vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the recovery services vault is /// present. /// </param> /// <param name='fabricName'> /// Fabric name associated with the backed up items. /// </param> /// <param name='containerName'> /// Container name associated with the backed up items. /// </param> /// <param name='protectedItemName'> /// Backed up item name whose files/folders are to be restored. /// </param> /// <param name='recoveryPointId'> /// Recovery point ID which represents backed up data. iSCSI connection will be /// provisioned /// for this backed up data. /// </param> /// <param name='parameters'> /// resource ILR request /// </param> public static void Provision(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters) { operations.ProvisionAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); }
/// <summary> /// Provisions a script which invokes an iSCSI connection to the backup data. /// Executing this script opens a file /// explorer displaying all the recoverable files and folders. This is an /// asynchronous operation. To know the status of /// provisioning, call GetProtectedItemOperationResult API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the recovery services vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the recovery services vault is /// present. /// </param> /// <param name='fabricName'> /// Fabric name associated with the backed up items. /// </param> /// <param name='containerName'> /// Container name associated with the backed up items. /// </param> /// <param name='protectedItemName'> /// Backed up item name whose files/folders are to be restored. /// </param> /// <param name='recoveryPointId'> /// Recovery point ID which represents backed up data. iSCSI connection will be /// provisioned /// for this backed up data. /// </param> /// <param name='parameters'> /// resource ILR request /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ProvisionAsync(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ProvisionWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Revokes an iSCSI connection which can be used to download a script. /// Executing this script opens a file explorer /// displaying all recoverable files and folders. This is an asynchronous /// operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the recovery services vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the recovery services vault is /// present. /// </param> /// <param name='fabricName'> /// Fabric name associated with the backed up items. /// </param> /// <param name='containerName'> /// Container name associated with the backed up items. /// </param> /// <param name='protectedItemName'> /// Backed up item name whose files/folders are to be restored. /// </param> /// <param name='recoveryPointId'> /// Recovery point ID which represents backed up data. iSCSI connection will be /// revoked for /// this backed up data. /// </param> public static void Revoke(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId) { operations.RevokeAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult(); }