예제 #1
0
 /// <summary>
 /// The Regenerate Keys operation regenerates the primary or secondary
 /// access key for the specified storage account.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460795.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Regenerate Keys operation.
 /// </param>
 /// <returns>
 /// The primary and secondary access keys for a storage account.
 /// </returns>
 public static StorageAccountRegenerateKeysResponse RegenerateKeys(this IStorageAccountOperations operations, StorageAccountRegenerateKeysParameters parameters)
 {
     try
     {
         return(operations.RegenerateKeysAsync(parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Regenerate Keys operation regenerates the primary or secondary
 /// access key for the specified storage account.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460795.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Regenerate Keys operation.
 /// </param>
 /// <returns>
 /// The primary and secondary access keys for a storage account.
 /// </returns>
 public static Task <StorageAccountRegenerateKeysResponse> RegenerateKeysAsync(this IStorageAccountOperations operations, StorageAccountRegenerateKeysParameters parameters)
 {
     return(operations.RegenerateKeysAsync(parameters, CancellationToken.None));
 }