/// <summary>
 /// Regenerate redis cache's access keys. This operation requires write
 /// permission to the cache resource.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Management.Redis.IRedisOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// Required. The name of the redis cache.
 /// </param>
 /// <param name='parameters'>
 /// Required. Specifies which key to reset.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> RegenerateKeyAsync(this IRedisOperations operations, string resourceGroupName, string name, RedisRegenerateKeyParameters parameters)
 {
     return(operations.RegenerateKeyAsync(resourceGroupName, name, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Regenerate redis cache's access keys. This operation requires write
 /// permission to the cache resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// The name of the redis cache.
 /// </param>
 /// <param name='parameters'>
 /// Specifies which key to reset.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RedisListKeysResult> RegenerateKeyAsync(this IRedisOperations operations, string resourceGroupName, string name, RedisRegenerateKeyParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateKeyWithHttpMessagesAsync(resourceGroupName, name, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerate redis cache's access keys. This operation requires write
 /// permission to the cache resource.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Management.Redis.IRedisOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// Required. The name of the redis cache.
 /// </param>
 /// <param name='parameters'>
 /// Required. Specifies which key to reset.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse RegenerateKey(this IRedisOperations operations, string resourceGroupName, string name, RedisRegenerateKeyParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRedisOperations)s).RegenerateKeyAsync(resourceGroupName, name, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #4
0
 /// <summary>
 /// Regenerate Redis cache's access keys. This operation requires write
 /// permission to the cache resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// The name of the Redis cache.
 /// </param>
 /// <param name='parameters'>
 /// Specifies which key to regenerate.
 /// </param>
 public static RedisAccessKeys RegenerateKey(this IRedisOperations operations, string resourceGroupName, string name, RedisRegenerateKeyParameters parameters)
 {
     return(operations.RegenerateKeyAsync(resourceGroupName, name, parameters).GetAwaiter().GetResult());
 }