.. versionadded:: 2015.8.0

    Update a storage account's properties

    CLI Example:

    .. code-block:: bash

        salt-cloud -f update_storage my-azure name=my_storage label=my_storage

def update_storage(kwargs=None, conn=None, call=None):
    '''
    .. versionadded:: 2015.8.0

    Update a storage account's properties

    CLI Example:

    .. code-block:: bash

        salt-cloud -f update_storage my-azure name=my_storage label=my_storage
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The show_storage function must be called with -f or --function.'
        )

    if not conn:
        conn = get_conn()

    if kwargs is None:
        kwargs = {}

    if 'name' not in kwargs:
        raise SaltCloudSystemExit('A name must be specified as "name"')

    data = conn.update_storage_account(
        service_name=kwargs['name'],
        label=kwargs.get('label', None),
        description=kwargs.get('description', None),
        extended_properties=kwargs.get('extended_properties', None),
        geo_replication_enabled=kwargs.get('geo_replication_enabled', None),
        account_type=kwargs.get('account_type', 'Standard_GRS'),
    )
    return show_storage(kwargs={'name': kwargs['name']}, call='function')