/// <summary> /// Returns the list of support REST operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Operation> > ListOperationsNextAsync(this IFabricOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, 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> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for fabric long running operations. /// </returns> public static FabricOperationResponse GetRenewCertificateStatus(this IFabricOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((IFabricOperations)s).GetRenewCertificateStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Renews certificates of a Fabric /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse RenewCertificate(this IFabricOperations operations, string fabricName, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IFabricOperations)s).RenewCertificateAsync(fabricName, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Performs reassociate gateway operation on a fabric. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='input'> /// Required. Input to reassociate a gateway. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse ReassociateGateway(this IFabricOperations operations, string fabricName, FailoverProcessServerRequest input, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IFabricOperations)s).ReassociateGatewayAsync(fabricName, input, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get the list of all fabrics under the vault. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list servers operation. /// </returns> public static FabricListResponse List(this IFabricOperations operations, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IFabricOperations)s).ListAsync(customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> public SiteRecoveryManagementClient() : base() { 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._recoveryServicesProvider = new RecoveryServicesProviderOperations(this); this._replicationProtectedItem = new ReplicationProtectedItemOperations(this); this._vCenters = new VCenterOperations(this); this._apiVersion = "2015-01-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for fabric long running operations. /// </returns> public static Task <FabricOperationResponse> GetRenewCertificateStatusAsync(this IFabricOperations operations, string operationStatusLink) { return(operations.GetRenewCertificateStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Creates a Fabric /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='input'> /// Required. Input to create fabric /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> BeginCreatingAsync(this IFabricOperations operations, string fabricName, FabricCreationInput input, CustomRequestHeaders customRequestHeaders) { return(operations.BeginCreatingAsync(fabricName, input, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <ReassociateGatewayOperationResponse> GetReassociateGatewayStatusAsync(this IFabricOperations operations, string operationStatusLink) { return(operations.GetReassociateGatewayStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Deploy a Process Server. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='input'> /// Required. Input to deploy a Process Server. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> DeployProcessServerAsync(this IFabricOperations operations, string fabricName, DeployProcessServerRequest input, CustomRequestHeaders customRequestHeaders) { return(operations.DeployProcessServerAsync(fabricName, input, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Returns the list of support REST operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <Operation> ListOperationsNext(this IFabricOperations operations, string nextPageLink) { return(operations.ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Returns the list of support REST operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Operation> ListOperations(this IFabricOperations operations) { return(operations.ListOperationsAsync().GetAwaiter().GetResult()); }
/// <summary> /// Deletes a fabric /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='fabricDeletionInput'> /// Required. Fabric deletion input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> DeleteAsync(this IFabricOperations operations, string fabricName, FabricDeletionInput fabricDeletionInput, CustomRequestHeaders customRequestHeaders) { return(operations.DeleteAsync(fabricName, fabricDeletionInput, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Checks consistency of a fabric. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> BeginCheckConsistencyAsync(this IFabricOperations operations, string fabricName, CustomRequestHeaders customRequestHeaders) { return(operations.BeginCheckConsistencyAsync(fabricName, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the list of all fabrics under the vault. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list servers operation. /// </returns> public static Task <FabricListResponse> ListAsync(this IFabricOperations operations, CustomRequestHeaders customRequestHeaders) { return(operations.ListAsync(customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the server object by Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the fabric object /// </returns> public static Task <FabricResponse> GetAsync(this IFabricOperations operations, string fabricName, CustomRequestHeaders customRequestHeaders) { return(operations.GetAsync(fabricName, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Performs reassociate gateway operation on a fabric. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='input'> /// Required. Input to reassociate a gateway. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> ReassociateGatewayAsync(this IFabricOperations operations, string fabricName, FailoverProcessServerRequest input, CustomRequestHeaders customRequestHeaders) { return(operations.ReassociateGatewayAsync(fabricName, input, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <DeployProcessServerOperationResponse> GetDeployProcessServerStatusAsync(this IFabricOperations operations, string operationStatusLink) { return(operations.GetDeployProcessServerStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Renews certificates of a Fabric /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> RenewCertificateAsync(this IFabricOperations operations, string fabricName, CustomRequestHeaders customRequestHeaders) { return(operations.RenewCertificateAsync(fabricName, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IFabricOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> GetPurgeStatusAsync(this IFabricOperations operations, string operationStatusLink) { return(operations.GetPurgeStatusAsync(operationStatusLink, CancellationToken.None)); }