{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To update en existing policy, send a PUT request to `v2/monitoring/alerts/{alert_uuid}`.","properties":{"path":{"type":"object","properties":{"alert_uuid":{"type":"string","examples":["4de7ac8b-495b-4884-9a69-1050c6793cd6"],"description":"A unique identifier for an alert policy."}},"required":["alert_uuid"],"additionalProperties":false},"body":{"$ref":"#/definitions/alert_policy_request"}},"required":["path","body"],"additionalProperties":false,"definitions":{"alert_policy_request":{"type":"object","required":["type","description","compare","value","window","entities","tags","alerts","enabled"],"properties":{"alerts":{"$ref":"#/definitions/alerts"},"compare":{"type":"string","enum":["GreaterThan","LessThan"],"examples":["GreaterThan"]},"description":{"type":"string","examples":["CPU Alert"]},"enabled":{"type":"boolean","examples":[true]},"entities":{"type":"array","items":{"type":"string"},"examples":[["192018292"]]},"tags":{"type":"array","items":{"type":"string"},"examples":[["droplet_tag"]]},"type":{"type":"string","enum":["v1/insights/droplet/load_1","v1/insights/droplet/load_5","v1/insights/droplet/load_15","v1/insights/droplet/memory_utilization_percent","v1/insights/droplet/disk_utilization_percent","v1/insights/droplet/cpu","v1/insights/droplet/disk_read","v1/insights/droplet/disk_write","v1/insights/droplet/public_outbound_bandwidth","v1/insights/droplet/public_inbound_bandwidth","v1/insights/droplet/private_outbound_bandwidth","v1/insights/droplet/private_inbound_bandwidth","v1/insights/lbaas/avg_cpu_utilization_percent","v1/insights/lbaas/connection_utilization_percent","v1/insights/lbaas/droplet_health","v1/insights/lbaas/tls_connections_per_second_utilization_percent","v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx","v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx","v1/insights/lbaas/increase_in_http_error_rate_count_5xx","v1/insights/lbaas/increase_in_http_error_rate_count_4xx","v1/insights/lbaas/high_http_request_response_time","v1/insights/lbaas/high_http_request_response_time_50p","v1/insights/lbaas/high_http_request_response_time_95p","v1/insights/lbaas/high_http_request_response_time_99p","v1/dbaas/alerts/load_15_alerts","v1/dbaas/alerts/memory_utilization_alerts","v1/dbaas/alerts/disk_utilization_alerts","v1/dbaas/alerts/cpu_alerts","v1/droplet/autoscale_alerts/current_instances","v1/droplet/autoscale_alerts/target_instances","v1/droplet/autoscale_alerts/current_cpu_utilization","v1/droplet/autoscale_alerts/target_cpu_utilization","v1/droplet/autoscale_alerts/current_memory_utilization","v1/droplet/autoscale_alerts/target_memory_utilization","v1/droplet/autoscale_alerts/scale_up","v1/droplet/autoscale_alerts/scale_down"],"examples":["v1/insights/droplet/cpu"]},"value":{"type":"number","examples":[80]},"window":{"type":"string","enum":["5m","10m","30m","1h"],"examples":["5m"]}}},"alerts":{"type":"object","required":["slack","email"],"properties":{"email":{"description":"An email to notify on an alert trigger.","type":"array","items":{"type":"string"},"examples":[["bob@exmaple.com"]]},"slack":{"type":"array","description":"Slack integration details.","items":{"$ref":"#/definitions/slack_details"}}}},"slack_details":{"type":"object","required":["url","channel"],"properties":{"channel":{"type":"string","description":"Slack channel to notify of an alert trigger.","examples":["Production Alerts"]},"url":{"type":"string","description":"Slack Webhook URL.","examples":["https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ"]}}}}},"name":"Update an Alert Policy","id":"digitalocean.monitoring_update_alertpolicy","example":{"path":{"alert_uuid":"4de7ac8b-495b-4884-9a69-1050c6793cd6"},"body":{"type":"v1/insights/droplet/cpu","description":"CPU Alert","compare":"GreaterThan","value":80,"window":"5m","entities":["192018292"],"tags":["droplet_tag"],"alerts":{"slack":[],"email":["bob@exmaple.com"]},"enabled":true}},"maxRequests":1,"summary":false}}