fbpx
PUThttps://api.spotinst.io/spectrum/metrics/alert/{ALERT_ID}?accountId={ACCOUNT_ID}

Update your alert configuration

URL Parameters

Parameter Type Description
ALERT_ID String

Metric action id, you can obtain it from List All Alerts API call

Example: al-a123e4567bc2
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc
Request - Example

Headers
{
	"Content-Type": "application/json",
	"Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "dimensions": [
    {
      "name": "balancer_id",
      "value": "lb-12ab12c946d4"
    }
  ],
  "period": "1h",
  "consecutivePeriods": 2,
  "statistics": "count",
  "conditions": {
    "warning": {
      "threshold": 2000,
      "operator": "gt"
    },
    "error": {
      "threshold": 3000,
      "operator": "ge"
    },
    "critical": {
      "threshold": 5000,
      "operator": "gt"
    }
  },
  "actionsEnabled": true,
  "actions": {
    "criticalActionIds": [
      "ac-9735cbe5fc74",
      "ac-629e55d24546",
      "ac-f2a00bbc36bc"
    ]
  }
}