Exemple #1
0
 /// <summary>
 /// Gets the list of registered recovery services providers in the vault. This
 /// is a view only api.
 /// </summary>
 /// <remarks>
 /// Lists the registered recovery services providers in the vault
 /// </remarks>
 /// <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 <RecoveryServicesProvider> > ListNextAsync(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Adds a recovery services provider.
 /// </summary>
 /// <remarks>
 /// The operation to add a recovery services provider.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='providerName'>
 /// Recovery services provider name.
 /// </param>
 /// <param name='addProviderInput'>
 /// Add provider input.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RecoveryServicesProvider> BeginCreateAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInput addProviderInput, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, providerName, addProviderInput, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #3
0
 /// <summary>
 /// Gets the details of a recovery services provider.
 /// </summary>
 /// <remarks>
 /// Gets the details of registered recovery services provider.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='providerName'>
 /// Recovery services provider name
 /// </param>
 public static RecoveryServicesProvider Get(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName)
 {
     return(operations.GetAsync(fabricName, providerName).GetAwaiter().GetResult());
 }
Exemple #4
0
 /// <summary>
 /// Gets the list of registered recovery services providers in the vault. This
 /// is a view only api.
 /// </summary>
 /// <remarks>
 /// Lists the registered recovery services providers in the vault
 /// </remarks>
 /// <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 <RecoveryServicesProvider> ListNext(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemple #5
0
 /// <summary>
 /// Deletes provider from fabric. Note: Deleting provider for any fabric other
 /// than SingleHost is unsupported. To maintain backward compatibility for
 /// released clients the object "deleteRspInput" is used (if the object is
 /// empty we assume that it is old client and continue the old behavior).
 /// </summary>
 /// <remarks>
 /// The operation to removes/delete(unregister) a recovery services provider
 /// from the vault
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='providerName'>
 /// Recovery services provider name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #6
0
 /// <summary>
 /// Deletes provider from fabric. Note: Deleting provider for any fabric other
 /// than SingleHost is unsupported. To maintain backward compatibility for
 /// released clients the object "deleteRspInput" is used (if the object is
 /// empty we assume that it is old client and continue the old behavior).
 /// </summary>
 /// <remarks>
 /// The operation to removes/delete(unregister) a recovery services provider
 /// from the vault
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='providerName'>
 /// Recovery services provider name.
 /// </param>
 public static void BeginDelete(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName)
 {
     operations.BeginDeleteAsync(fabricName, providerName).GetAwaiter().GetResult();
 }
Exemple #7
0
 /// <summary>
 /// Adds a recovery services provider.
 /// </summary>
 /// <remarks>
 /// The operation to add a recovery services provider.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='providerName'>
 /// Recovery services provider name.
 /// </param>
 /// <param name='addProviderInput'>
 /// Add provider input.
 /// </param>
 public static RecoveryServicesProvider BeginCreate(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInput addProviderInput)
 {
     return(operations.BeginCreateAsync(fabricName, providerName, addProviderInput).GetAwaiter().GetResult());
 }
Exemple #8
0
 /// <summary>
 /// Gets the list of registered recovery services providers for the fabric.
 /// </summary>
 /// <remarks>
 /// Lists the registered recovery services providers for the specified fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name
 /// </param>
 public static IPage <RecoveryServicesProvider> ListByReplicationFabrics(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName)
 {
     return(operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult());
 }
Exemple #9
0
 /// <summary>
 /// Gets the list of registered recovery services providers in the vault. This
 /// is a view only api.
 /// </summary>
 /// <remarks>
 /// Lists the registered recovery services providers in the vault
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <RecoveryServicesProvider> List(this IReplicationRecoveryServicesProvidersOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }