def create_autoscale_rule(subscription_id, resource_group, vmss_name, metric_name, operator,<EOL>threshold, direction, change_count, time_grain='<STR_LIT>',<EOL>time_window='<STR_LIT>', cool_down='<STR_LIT>'):
metric_trigger = {'<STR_LIT>': metric_name}<EOL>metric_trigger['<STR_LIT>'] = '<STR_LIT>'<EOL>metric_trigger['<STR_LIT>'] = '<STR_LIT>' + subscription_id +'<STR_LIT>' + resource_group +'<STR_LIT>' + vmss_name<EOL>metric_trigger['<STR_LIT>'] = time_grain<EOL>metric_trigger['<STR_LIT>'] = '<STR_LIT>'<EOL>metric_trigger['<STR_LIT>'] = time_window<EOL>metric_trigger['<STR_LIT>'] = '<STR_LIT>'<EOL>metric_trigger['<STR_LIT>'] = operator<EOL>metric_trigger['<STR_LIT>'] = threshold<EOL>scale_action = {'<STR_LIT>': direction}<EOL>scale_action['<STR_LIT:type>'] = '<STR_LIT>'<EOL>scale_action['<STR_LIT:value>'] = str(change_count)<EOL>scale_action['<STR_LIT>'] = cool_down<EOL>new_rule = {'<STR_LIT>': metric_trigger}<EOL>new_rule['<STR_LIT>'] = scale_action<EOL>return new_rule<EOL>
Create a new autoscale rule - pass the output in a list to create_autoscale_setting().

    Args:
        subscription_id (str): Azure subscription id.
        resource_group (str): Azure resource group name.
        vmss_name (str): Name of scale set to apply scale events to.
        metric_name (str): Name of metric being evaluated.
        operator (str): Operator to evaluate. E.g. "GreaterThan".
        threshold (str): Threshold to trigger action.
        direction (str): Direction of action. E.g. Increase.
        change_count (str): How many to increase or decrease by.
        time_grain (str): Optional. Measurement granularity. Default 'PT1M'.
        time_window (str): Optional. Range of time to collect data over. Default 'PT5M'.
        cool_down (str): Optional. Time to wait after last scaling action. ISO 8601 format.
            Default 'PT1M'.
    Returns:
        HTTP response. JSON body of autoscale setting.