/// <summary> /// The Update Storage Account operation updates the label, the /// description, and enables or disables the geo-replication status /// for a storage account in Windows Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264516.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations. /// </param> /// <param name='accountName'> /// Name of the storage account to update. /// </param> /// <param name='parameters'> /// Parameters supplied to the Update Storage Account operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse Update(this IStorageAccountOperations operations, string accountName, StorageAccountUpdateParameters parameters) { try { return(operations.UpdateAsync(accountName, parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Updates the account type or tags for a storage account. It can also /// be used to add a custom domain (note that custom domains cannot be /// added via the Create operation). Only one custom domain is /// supported per storage account. This API can only be used to update /// one of tags, accountType, or customDomain per call. To update /// multiple of these properties, call the API multiple times with one /// change per call. This call does not change the storage keys for /// the account. If you want to change storage account keys, use the /// RegenerateKey operation. The location and name of the storage /// account cannot be changed after creation. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Storage.IStorageAccountOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group within the user’s /// subscription. /// </param> /// <param name='accountName'> /// Required. The name of the storage account within the specified /// resource group. Storage account names must be between 3 and 24 /// characters in length and use numbers and lower-case letters only. /// </param> /// <param name='parameters'> /// Required. The parameters to update on the account. Note that only /// one property can be changed at a time using this API. /// </param> /// <returns> /// The Update storage account operation response. /// </returns> public static Task <StorageAccountUpdateResponse> UpdateAsync(this IStorageAccountOperations operations, string resourceGroupName, string accountName, StorageAccountUpdateParameters parameters) { return(operations.UpdateAsync(resourceGroupName, accountName, parameters, CancellationToken.None)); }
/// <summary> /// The Update Storage Account operation updates the label and the /// description, and enables or disables the geo-replication status /// for a storage account in Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264516.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations. /// </param> /// <param name='accountName'> /// Required. Name of the storage account to update. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Update Storage Account /// operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> UpdateAsync(this IStorageAccountOperations operations, string accountName, StorageAccountUpdateParameters parameters) { return(operations.UpdateAsync(accountName, parameters, CancellationToken.None)); }