Ejemplo n.º 1
0
 /// <summary>
 /// Retrieves the access keys for the RedisEnterprise database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the RedisEnterprise cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AccessKeys> ListKeysAsync(this IRedisEnterpriseDatabaseOperations operations, string resourceGroupName, string clusterName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListKeysWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Regenerates the RedisEnterprise database's access keys.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the RedisEnterprise cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='keyType'>
 /// Which access key to regenerate. Possible values include: 'Primary',
 /// 'Secondary'
 /// </param>
 public static AccessKeys RegenerateKey(this IRedisEnterpriseDatabaseOperations operations, string resourceGroupName, string clusterName, string databaseName, AccessKeyType keyType)
 {
     return(operations.RegenerateKeyAsync(resourceGroupName, clusterName, databaseName, keyType).GetAwaiter().GetResult());
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Exports a database file from target database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the RedisEnterprise cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='sasUri'>
 /// SAS Uri for the target directory to export to
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginExportAsync(this IRedisEnterpriseDatabaseOperations operations, string resourceGroupName, string clusterName, string databaseName, string sasUri, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Retrieves the access keys for the RedisEnterprise database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the RedisEnterprise cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 public static AccessKeys ListKeys(this IRedisEnterpriseDatabaseOperations operations, string resourceGroupName, string clusterName, string databaseName)
 {
     return(operations.ListKeysAsync(resourceGroupName, clusterName, databaseName).GetAwaiter().GetResult());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Exports a database file from target database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the RedisEnterprise cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='sasUri'>
 /// SAS Uri for the target directory to export to
 /// </param>
 public static void BeginExport(this IRedisEnterpriseDatabaseOperations operations, string resourceGroupName, string clusterName, string databaseName, string sasUri)
 {
     operations.BeginExportAsync(resourceGroupName, clusterName, databaseName, sasUri).GetAwaiter().GetResult();
 }