/// <summary>
 /// Enable Protection for the given protection entity.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='protectionProfileId'>
 /// Required. Protection Profile ID.
 /// </param>
 /// <param name='input'>
 /// Required. input.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the Job details object.
 /// </returns>
 public static JobResponse DissociateAndDelete(this IProtectionProfileOperations operations, string protectionProfileId, ProtectionProfileAssociationInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionProfileOperations)s).DissociateAndDeleteAsync(protectionProfileId, input, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get the list of all ProtectionContainers for the given server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list ProtectionProfiles operation.
 /// </returns>
 public static ProtectionProfileListResponse List(this IProtectionProfileOperations operations, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionProfileOperations)s).ListAsync(customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <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.IProtectionProfileOperations.
 /// </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 UpdateProtectionProfileOperationResponse GetUpdateStatus(this IProtectionProfileOperations operations, string operationStatusLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionProfileOperations)s).GetUpdateStatusAsync(operationStatusLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update protection profile.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='input'>
 /// Required. input.
 /// </param>
 /// <param name='protectionProfileId'>
 /// Required. Profile id.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static LongRunningOperationResponse Update(this IProtectionProfileOperations operations, UpdateProtectionProfileInput input, string protectionProfileId, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionProfileOperations)s).UpdateAsync(input, protectionProfileId, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates a profile
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='name'>
 /// Required. Input to dissociate profile
 /// </param>
 /// <param name='input'>
 /// Required. Input to dissociate profile
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static LongRunningOperationResponse BeginDissociating(this IProtectionProfileOperations operations, string name, DisassociateProtectionProfileInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionProfileOperations)s).BeginDissociatingAsync(name, input, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the SiteRecoveryManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public SiteRecoveryManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._jobs = new JobOperations(this);
     this._protectionContainer = new ProtectionContainerOperations(this);
     this._protectionEntity    = new ProtectionEntityOperations(this);
     this._protectionProfile   = new ProtectionProfileOperations(this);
     this._recoveryPlan        = new RecoveryPlanOperations(this);
     this._servers             = new ServerOperations(this);
     this._apiVersion          = "2015-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the SiteRecoveryManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public SiteRecoveryManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._jobs                = new JobOperations(this);
     this._networkMappings     = new NetworkMappingOperations(this);
     this._networks            = new NetworkOperations(this);
     this._protectionContainer = new ProtectionContainerOperations(this);
     this._protectionEntity    = new ProtectionEntityOperations(this);
     this._protectionProfile   = new ProtectionProfileOperations(this);
     this._recoveryPlan        = new RecoveryPlanOperations(this);
     this._servers             = new ServerOperations(this);
     this._sites               = new SiteOperations(this);
     this._storageMappings     = new StorageMappingOperations(this);
     this._storages            = new StorageOperations(this);
     this._vaultExtendedInfo   = new VaultExtendedInfoOperations(this);
     this._vmGroup             = new VirtualMachineGroupOperations(this);
     this._vm         = new VirtualMachineOperations(this);
     this._apiVersion = "2013-03-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Enable Protection for the given protection entity.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='input'>
 /// Required. input.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the Job details object.
 /// </returns>
 public static Task <JobResponse> CreateAndAssociateAsync(this IProtectionProfileOperations operations, CreateAndAssociateProtectionProfileInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.CreateAndAssociateAsync(input, customRequestHeaders, CancellationToken.None));
 }
 /// <summary>
 /// Update protection profile.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='input'>
 /// Required. input.
 /// </param>
 /// <param name='protectionProfileId'>
 /// Required. Profile id.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the Job details object.
 /// </returns>
 public static Task <JobResponse> UpdateAsync(this IProtectionProfileOperations operations, UpdateProtectionProfileInput input, string protectionProfileId, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.UpdateAsync(input, protectionProfileId, customRequestHeaders, CancellationToken.None));
 }
 /// <summary>
 /// Get the list of all ProtectionContainers for the given server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list ProtectionProfiles operation.
 /// </returns>
 public static Task <ProtectionProfileListResponse> ListAsync(this IProtectionProfileOperations operations, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.ListAsync(customRequestHeaders, CancellationToken.None));
 }
 /// <summary>
 /// Get the protected Profile by Id.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='protectionProfileId'>
 /// Required. Protection Profile ID.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the Protection Profile object.
 /// </returns>
 public static Task <ProtectionProfileResponse> GetAsync(this IProtectionProfileOperations operations, string protectionProfileId, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.GetAsync(protectionProfileId, customRequestHeaders, CancellationToken.None));
 }
 /// <summary>
 /// Enable Protection for the given protection entity.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='protectionProfileId'>
 /// Required. Protection Profile ID.
 /// </param>
 /// <param name='input'>
 /// Required. input.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the Job details object.
 /// </returns>
 public static Task <JobResponse> DissociateAndDeleteAsync(this IProtectionProfileOperations operations, string protectionProfileId, ProtectionProfileAssociationInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.DissociateAndDeleteAsync(protectionProfileId, input, customRequestHeaders, CancellationToken.None));
 }
 /// <summary>
 /// Creates a profile
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='name'>
 /// Required. Input to associate profile
 /// </param>
 /// <param name='input'>
 /// Required. Input to associate profile
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static Task <LongRunningOperationResponse> AssociateAsync(this IProtectionProfileOperations operations, string name, ProtectionProfileAssociationInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.AssociateAsync(name, 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.IProtectionProfileOperations.
 /// </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 <UpdateProtectionProfileOperationResponse> GetUpdateStatusAsync(this IProtectionProfileOperations operations, string operationStatusLink)
 {
     return(operations.GetUpdateStatusAsync(operationStatusLink, CancellationToken.None));
 }
 /// <summary>
 /// Deletes a ProtectionProfile
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='name'>
 /// Required. ProtectionProfile name.
 /// </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 IProtectionProfileOperations operations, string name, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.DeleteAsync(name, customRequestHeaders, CancellationToken.None));
 }
 /// <summary>
 /// Creates a profile
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='input'>
 /// Required. Input to create profile
 /// </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 IProtectionProfileOperations operations, CreateProtectionProfileInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.BeginCreatingAsync(input, customRequestHeaders, CancellationToken.None));
 }