CreateSettingRule() public method

Create an Autoscale setting rule based on the properties of the object
public CreateSettingRule ( ) : Microsoft.Azure.Management.Insights.Models.ScaleRule
return Microsoft.Azure.Management.Insights.Models.ScaleRule
        private ScaleRule CreateAutoscaleRule(string metricName = null)
        {
            var autocaseRuleCmd = new NewAzureRmAutoscaleRuleCommand
            {
                MetricName = metricName ?? "Requests",
                MetricResourceId = "/subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/misitiooeltuyo",
                Operator = ComparisonOperationType.GreaterThan,
                MetricStatistic = MetricStatisticType.Average,
                Threshold = 10,
                TimeGrain = TimeSpan.FromMinutes(1),
                ScaleActionCooldown = TimeSpan.FromMinutes(5),
                ScaleActionDirection = ScaleDirection.Increase,
                ScaleActionValue = "1"
            };

            return autocaseRuleCmd.CreateSettingRule();
        }