/// <summary> /// Gets a Recovery Point using recoveryPointId 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='recoveryPointId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AzureBackupRecoveryPointResource> GetAsync(this IRecoveryPointOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, string recoveryPointId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, recoveryPointId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public SiteRecoveryManagementClient(HttpClient httpClient) : base(httpClient) { this._alertSettings = new AlertSettingsOperations(this); this._events = new EventOperations(this); this._fabrics = new FabricOperations(this); this._jobs = new JobOperations(this); this._logicalNetwork = new LogicalNetworkOperations(this); this._networkMapping = new NetworkMappingOperations(this); this._network = new NetworkOperations(this); this._policies = new PolicyOperations(this); this._protectableItem = new ProtectableItemOperations(this); this._protectionContainerMapping = new ProtectionContainerMappingOperations(this); this._protectionContainer = new ProtectionContainerOperations(this); this._recoveryPlan = new RecoveryPlanOperations(this); this._recoveryPoint = new RecoveryPointOperations(this); this._recoveryServicesProvider = new RecoveryServicesProviderOperations(this); this._replicationProtectedItem = new ReplicationProtectedItemOperations(this); this._storageClassificationMapping = new StorageClassificationMappingOperations(this); this._storageClassification = new StorageClassificationOperations(this); this._vCenters = new VCenterOperations(this); this._apiVersion = "2015-01-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Get the recovery point. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.BackupServices.IRecoveryPointOperations. /// </param> /// <param name='resourceGroupName'> /// Required. /// </param> /// <param name='resourceName'> /// Required. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <param name='containerName'> /// Optional. /// </param> /// <param name='itemName'> /// Optional. /// </param> /// <param name='recoveryPointName'> /// Optional. /// </param> /// <returns> /// The definition of a CSMRecoveryPointGetOperationResponse. /// </returns> public static CSMRecoveryPointGetOperationResponse Get(this IRecoveryPointOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string containerName, string itemName, string recoveryPointName) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryPointOperations)s).GetAsync(resourceGroupName, resourceName, customRequestHeaders, containerName, itemName, recoveryPointName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Lists all the recovery points of the given item protected by your /// Recovery Services Vault according to the query filter supplied in /// the arguments. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryPointOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name of your recovery services vault. /// </param> /// <param name='resourceName'> /// Required. Name of your recovery services vault. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <param name='fabricName'> /// Optional. Fabric name of the protected item. /// </param> /// <param name='containerName'> /// Optional. Name of the container where the protected item belongs to. /// </param> /// <param name='protectedItemName'> /// Optional. Name of the protected item whose recovery points are to /// be fetched. /// </param> /// <param name='queryFilter'> /// Optional. Query parameters for listing recovery points. /// </param> /// <returns> /// List of recovery points as returned by the service with the list /// recovery points call. /// </returns> public static RecoveryPointListResponse List(this IRecoveryPointOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, RecoveryPointQueryParameters queryFilter) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryPointOperations)s).ListAsync(resourceGroupName, resourceName, customRequestHeaders, fabricName, containerName, protectedItemName, queryFilter); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get a specific recovery point for a replication protected item. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IRecoveryPointOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric unique name. /// </param> /// <param name='protectionContainerName'> /// Required. Protection container unique name. /// </param> /// <param name='replicationProtectedItemName'> /// Required. Replication protected item's name. /// </param> /// <param name='recoveryPointName'> /// Required. Recovery point name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for recovery point object. /// </returns> public static RecoveryPointResponse Get(this IRecoveryPointOperations operations, string fabricName, string protectionContainerName, string replicationProtectedItemName, string recoveryPointName, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryPointOperations)s).GetAsync(fabricName, protectionContainerName, replicationProtectedItemName, recoveryPointName, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the BackupServicesManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public BackupServicesManagementClient(HttpClient httpClient) : base(httpClient) { this._backUp = new BackUpOperations(this); this._container = new ContainerOperations(this); this._cSMProtectionPolicy = new CSMProtectionPolicyOperations(this); this._dataSource = new DataSourceOperations(this); this._job = new JobOperations(this); this._operationStatus = new OperationStatus(this); this._protectableObject = new ProtectableObjectOperations(this); this._recoveryPoint = new RecoveryPointOperations(this); this._restore = new RestoreOperations(this); this._apiVersion = "2013-03-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets a Recovery Point using recoveryPointId 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='recoveryPointId'> /// </param> public static AzureBackupRecoveryPointResource Get(this IRecoveryPointOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, string recoveryPointId) { return(operations.GetAsync(vaultName, resourceGroupName, backupInstanceName, recoveryPointId).GetAwaiter().GetResult()); }
/// <summary> /// Get the recovery point. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.BackupServices.IRecoveryPointOperations. /// </param> /// <param name='resourceGroupName'> /// Required. /// </param> /// <param name='resourceName'> /// Required. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <param name='containerName'> /// Optional. /// </param> /// <param name='itemName'> /// Optional. /// </param> /// <param name='recoveryPointName'> /// Optional. /// </param> /// <returns> /// The definition of a CSMRecoveryPointGetOperationResponse. /// </returns> public static Task <CSMRecoveryPointGetOperationResponse> GetAsync(this IRecoveryPointOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string containerName, string itemName, string recoveryPointName) { return(operations.GetAsync(resourceGroupName, resourceName, customRequestHeaders, containerName, itemName, recoveryPointName, CancellationToken.None)); }
/// <summary> /// Lists all the recovery points of the given item protected by your /// Recovery Services Vault according to the query filter supplied in /// the arguments. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryPointOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name of your recovery services vault. /// </param> /// <param name='resourceName'> /// Required. Name of your recovery services vault. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <param name='fabricName'> /// Optional. Fabric name of the protected item. /// </param> /// <param name='containerName'> /// Optional. Name of the container where the protected item belongs to. /// </param> /// <param name='protectedItemName'> /// Optional. Name of the protected item whose recovery points are to /// be fetched. /// </param> /// <param name='queryFilter'> /// Optional. Query parameters for listing recovery points. /// </param> /// <returns> /// List of recovery points as returned by the service with the list /// recovery points call. /// </returns> public static Task <RecoveryPointListResponse> ListAsync(this IRecoveryPointOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, RecoveryPointQueryParameters queryFilter) { return(operations.ListAsync(resourceGroupName, resourceName, customRequestHeaders, fabricName, containerName, protectedItemName, queryFilter, CancellationToken.None)); }
/// <summary> /// Gets Info for the given recovery point of the given item protected /// by your Recovery Services Vault as specified by the recovery point /// ID passed in the arguments.This is an asynchronous operation. To /// determine whether the backend service has finished processing the /// request, call the Get Protected Item Operation Result API. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryPointOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name of your recovery services vault. /// </param> /// <param name='resourceName'> /// Required. Name of your recovery services vault. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <param name='fabricName'> /// Optional. Fabric name of the protected item. /// </param> /// <param name='containerName'> /// Optional. Name of the container where the protected item belongs to. /// </param> /// <param name='protectedItemName'> /// Optional. Name of the protected item whose recovery points are to /// be fetched. /// </param> /// <param name='recoveryPointId'> /// Optional. ID of the recovery point whose details are to be fetched. /// </param> /// <returns> /// A single instance of a recovery point response as returned by the /// service in the list recovery points call. /// </returns> public static Task <RecoveryPointResponse> GetAsync(this IRecoveryPointOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, string recoveryPointId) { return(operations.GetAsync(resourceGroupName, resourceName, customRequestHeaders, fabricName, containerName, protectedItemName, recoveryPointId, CancellationToken.None)); }
/// <summary> /// Get a specific recovery point for a replication protected item. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IRecoveryPointOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric unique name. /// </param> /// <param name='protectionContainerName'> /// Required. Protection container unique name. /// </param> /// <param name='replicationProtectedItemName'> /// Required. Replication protected item's name. /// </param> /// <param name='recoveryPointName'> /// Required. Recovery point name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for recovery point object. /// </returns> public static Task <RecoveryPointResponse> GetAsync(this IRecoveryPointOperations operations, string fabricName, string protectionContainerName, string replicationProtectedItemName, string recoveryPointName, CustomRequestHeaders customRequestHeaders) { return(operations.GetAsync(fabricName, protectionContainerName, replicationProtectedItemName, recoveryPointName, customRequestHeaders, CancellationToken.None)); }