curl --location --request PUT 'https://api.tenbyte.io/v1/admin/scaling-rules/' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "gpu-utilization-auto-scale",
"description": "Auto scale GPU workers based on utilization",
"cloud_provider": "aws",
"region": "ap-southeast-1",
"hardware_type": "gpu",
"metric_source": "internal_prometheus",
"metric_name": "gpu_utilization",
"scale_up": {
"comparison_operator": ">=",
"threshold_value": 80,
"consecutive_breach_count": 3,
"scale_by": 2
},
"scale_down": {
"comparison_operator": "<=",
"threshold_value": 25,
"consecutive_breach_count": 5,
"scale_by": 1
},
"evaluation_period_seconds": 60,
"min_workers": 2,
"max_workers": 20,
"cooldown_seconds": 300,
"enabled": true
}'