docs: def create_autoscale_setting(access_token, subscription_id, resource_group, setting_name,
                               vmss_name, location, minval, maxval, default, autoscale_rules,
                               notify=None):
      '''Create a new autoscale setting for a scale set.
  
      Args:
          access_token (str): A valid Azure authentication token.
          subscription_id (str): Azure subscription id.
          resource_group (str): Azure resource group name.
          setting_name (str): Name of the autoscale setting.
          vmss_name (str): Name of scale set to apply scale events to.
          location (str): Azure data center location. E.g. westus.
          minval (int): Minimum number of VMs.
          maxval (int): Maximum number of VMs.
          default (int): Default VM number when no data available.
          autoscale_rules (list): List of outputs from create_autoscale_rule().
          notify (str): Optional.
      Returns:
          HTTP response. JSON body of autoscale setting.
      '''
      endpoint = ''.join([get_rm_endpoint(),
                          '/subscriptions/', subscription_id,
                          '/resourceGroups/', resource_group,
                          '/providers/microsoft.insights/autoscaleSettings/', setting_name,
                          '?api-version=', INSIGHTS_API])
      autoscale_setting = {'location': location}
      profile = {'name': 'Profile1'}
      capacity = {'minimum': str(minval)}
      capacity['maximum'] = str(maxval)
      capacity['default'] = str(default)
      profile['capacity'] = capacity
      profile['rules'] = autoscale_rules
      profiles = [profile]
      properties = {'name': setting_name}
      properties['profiles'] = profiles
      properties['targetResourceUri'] = '/subscriptions/' + subscription_id + \
          '/resourceGroups/' + resource_group + \
          '/providers/Microsoft.Compute/virtualMachineScaleSets/' + vmss_name
      properties['enabled'] = True
      if notify is not None:
          notification = {'operation': 'Scale'}
          email = {'sendToSubscriptionAdministrato': False}
          email['sendToSubscriptionCoAdministrators'] = False
          email['customEmails'] = [notify]
          notification = {'email': email}
          properties['notifications'] = [notification]
      autoscale_setting['properties'] = properties
      body = json.dumps(autoscale_setting)
      return do_put(endpoint, body, access_token)