'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.
:param resource_group_name: The name of the resource group within the
user\'s subscription. The name is case insensitive.
:type resource_group_name: str
:param account_name: 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.
:type account_name: str
:param parameters: The parameters to provide for the updated account.
:type parameters: :class:`StorageAccountUpdateParameters
<azure.mgmt.storage.v2015_06_15.models.StorageAccountUpdateParameters>`
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: :class:`StorageAccount
<azure.mgmt.storage.v2015_06_15.models.StorageAccount>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: :class:`StorageAccount
<azure.mgmt.storage.v2015_06_15.models.StorageAccount>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`'

def update(self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config):

    url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
    path_format_arguments = {'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\\w\\._\\(\\)]+$'), 'accountName': self._serialize.url('account_name', account_name, 'str', max_length=24, min_length=3), 'subscriptionId': self._serialize.url('self.config.subscription_id', self.config.subscription_id, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('self.api_version', self.api_version, 'str')
    header_parameters = {}
    header_parameters['Content-Type'] = 'application/json;    charset=utf-8'
    if self.config.generate_client_request_id:
        header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
    if custom_headers:
        header_parameters.update(custom_headers)
    if (self.config.accept_language is not None):
        header_parameters['accept-language'] = self._serialize.header('self.config.accept_language', self.config.accept_language, 'str')
    body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters')
    request = self._client.patch(url, query_parameters)
    response = self._client.send(request, header_parameters, body_content, **operation_config)
    if (response.status_code not in [200]):
        exp = CloudError(response)
        exp.request_id = response.headers.get('x-ms-request-id')
        raise exp
    deserialized = None
    if (response.status_code == 200):
        deserialized = self._deserialize('StorageAccount', response)
    if raw:
        client_raw_response = ClientRawResponse(deserialized, response)
        return client_raw_response
    return deserialized
