def create_autoscale_setting(access_token, subscription_id, resource_group, setting_name,<EOL>vmss_name, location, minval, maxval, default, autoscale_rules,<EOL>notify=None):
endpoint = '<STR_LIT>'.join([get_rm_endpoint(),<EOL>'<STR_LIT>', subscription_id,<EOL>'<STR_LIT>', resource_group,<EOL>'<STR_LIT>', setting_name,<EOL>'<STR_LIT>', INSIGHTS_API])<EOL>autoscale_setting = {'<STR_LIT:location>': location}<EOL>profile = {'<STR_LIT:name>': '<STR_LIT>'}<EOL>capacity = {'<STR_LIT>': str(minval)}<EOL>capacity['<STR_LIT>'] = str(maxval)<EOL>capacity['<STR_LIT:default>'] = str(default)<EOL>profile['<STR_LIT>'] = capacity<EOL>profile['<STR_LIT>'] = autoscale_rules<EOL>profiles = [profile]<EOL>properties = {'<STR_LIT:name>': setting_name}<EOL>properties['<STR_LIT>'] = profiles<EOL>properties['<STR_LIT>'] = '<STR_LIT>' + subscription_id +'<STR_LIT>' + resource_group +'<STR_LIT>' + vmss_name<EOL>properties['<STR_LIT>'] = True<EOL>if notify is not None:<EOL><INDENT>notification = {'<STR_LIT>': '<STR_LIT>'}<EOL>email = {'<STR_LIT>': False}<EOL>email['<STR_LIT>'] = False<EOL>email['<STR_LIT>'] = [notify]<EOL>notification = {'<STR_LIT:email>': email}<EOL>properties['<STR_LIT>'] = [notification]<EOL><DEDENT>autoscale_setting['<STR_LIT>'] = properties<EOL>body = json.dumps(autoscale_setting)<EOL>return do_put(endpoint, body, access_token)<EOL>
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.