/// <summary>
 /// Creates StorageNetworkRulesHelper.
 /// </summary>
 /// <param name="createParameters">the model representing payload for storage account create.</param>
 internal StorageNetworkRulesHelper(StorageAccountCreateParametersInner createParameters)
 {
     this.isInCreateMode   = true;
     this.createParameters = createParameters;
     this.updateParameters = null;
     this.inner            = null;
 }
 /// <summary>
 /// Creates StorageNetworkRulesHelper.
 /// </summary>
 /// <param name="updateParameters">the model representing payload for storage account update</param>
 /// <param name="inner">the current state of storage account</param>
 internal StorageNetworkRulesHelper(StorageAccountUpdateParametersInner updateParameters, StorageAccountInner inner)
 {
     this.isInCreateMode   = false;
     this.createParameters = null;
     this.updateParameters = updateParameters;
     this.inner            = inner;
 }
 /// <summary>
 /// Creates StorageEncryptionHelper.
 /// </summary>
 /// <param name="createParameters">the model representing payload for storage account create</param>
 internal StorageEncryptionHelper(StorageAccountCreateParametersInner createParameters)
 {
     this.isInCreateMode   = true;
     this.createParameters = createParameters;
     this.updateParameters = null;
     this.inner            = null;
 }
 ///GENMHASH:6BCE517E09457FF033728269C8936E64:D26CBA1CFC05445E2A90F41690FC5CB3
 public override IUpdate Update()
 {
     this.createParameters   = null;
     this.updateParameters   = new StorageAccountUpdateParametersInner();
     this.networkRulesHelper = new StorageNetworkRulesHelper(this.updateParameters, this.Inner);
     this.encryptionHelper   = new StorageEncryptionHelper(this.updateParameters, this.Inner);
     return(this);
 }
Example #5
0
 /// <summary>
 /// The update operation can be used to update the SKU, encryption, access
 /// tier, or tags for a storage account. It can also be used to map the account
 /// to a custom domain. Only one custom domain is supported per storage
 /// account; the replacement/change of custom domain is not supported. In order
 /// to replace an old custom domain, the old value must be cleared/unregistered
 /// before a new value can be set. The update of multiple properties is
 /// supported. This call does not change the storage keys for the account. If
 /// you want to change the storage account keys, use the regenerate keys
 /// operation. The location and name of the storage account cannot be changed
 /// after creation.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription. The name is
 /// case insensitive.
 /// </param>
 /// <param name='accountName'>
 /// 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'>
 /// The parameters to provide for the updated account.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StorageAccountInner> UpdateAsync(this IStorageAccountsOperations operations, string resourceGroupName, string accountName, StorageAccountUpdateParametersInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <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.
 /// In order to replace a custom domain, the old value must be cleared before a
 /// new value may be set. To clear a custom domain, simply update the custom
 /// domain with empty string. Then call update again with the new cutsom domain
 /// name. The update 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'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// 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'>
 /// The parameters to update on the account. Note that only one property can be
 /// changed at a time using this API.
 /// </param>
 public static StorageAccountInner Update(this IStorageAccountsOperations operations, string resourceGroupName, string accountName, StorageAccountUpdateParametersInner parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, accountName, parameters).GetAwaiter().GetResult());
 }
 ///GENMHASH:6BCE517E09457FF033728269C8936E64:D26CBA1CFC05445E2A90F41690FC5CB3
 public override IUpdate Update()
 {
     updateParameters = new StorageAccountUpdateParametersInner();
     return(this);
 }
 /// <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. In order to replace a custom domain, the old value must be
 /// cleared before a new value may be set. To clear a custom domain, simply
 /// update the custom domain with empty string. Then call update again with
 /// the new cutsom domain name. The update 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'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// 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'>
 /// The parameters to update on the account. Note that only one property can
 /// be changed at a time using this API.
 /// </param>
 public static StorageAccountInner Update(this IStorageAccountsOperations operations, string resourceGroupName, string accountName, StorageAccountUpdateParametersInner parameters)
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).UpdateAsync(resourceGroupName, accountName, parameters), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <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. In order to replace a custom domain, the old value must be
 /// cleared before a new value may be set. To clear a custom domain, simply
 /// update the custom domain with empty string. Then call update again with
 /// the new cutsom domain name. The update 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'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// 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'>
 /// The parameters to update on the account. Note that only one property can
 /// be changed at a time using this API.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task<StorageAccountInner> UpdateAsync(this IStorageAccountsOperations operations, string resourceGroupName, string accountName, StorageAccountUpdateParametersInner parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return _result.Body;
     }
 }
 /// <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. In order to replace a custom domain, the old value must be
 /// cleared before a new value may be set. To clear a custom domain, simply
 /// update the custom domain with empty string. Then call update again with
 /// the new cutsom domain name. The update 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'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// 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'>
 /// The parameters to update on the account. Note that only one property can
 /// be changed at a time using this API.
 /// </param>
 public static StorageAccountInner Update(this IStorageAccountsOperations operations, string resourceGroupName, string accountName, StorageAccountUpdateParametersInner parameters)
 {
     return System.Threading.Tasks.Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).UpdateAsync(resourceGroupName, accountName, parameters), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }