---
title: "Change an alert rule"
description: "Fields given replace the stored ones (the condition whole); null restores a default. A changed condition is checked again as for a create, content check included; an unchanged one needs only obs.alertRules.update. A body that changes nothing changes nothing. 400 invalid_request with issues[] for every validation problem, each at its field's dotted path. 412 precondition_failed. 404 while alerting isn't offered (the console hides Alerting then)."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Observability API

`PATCH /v1/organizations/{orgId}/projects/{projectId}/obs/alert-rules/{ruleId}`

Fields given replace the stored ones (the condition whole); null restores a default. A changed condition is checked again as for a create, content check included; an unchanged one needs only obs.alertRules.update. A body that changes nothing changes nothing. 400 invalid_request with issues[] for every validation problem, each at its field's dotted path. 412 precondition_failed. 404 while alerting isn't offered (the console hides Alerting then).

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `UpdateAlertRule.path.orgId` (string, required)
  - format `uuid`
- `UpdateAlertRule.path.projectId` (string, required)
  - format `uuid`
- `UpdateAlertRule.path.ruleId` (string, required)
  - format `uuid`

## Header parameters

- `UpdateAlertRule.header.Idempotency-Key` (string, optional) — Makes a retry safe: the same key and request get the stored response.
  - pattern `^[\x21-\x7e]{1,200}$`
- `UpdateAlertRule.header.If-Match` (string, optional) — *, or ETags from a GET, comma-separated. Weak tags never match.

## Request body

_Required._

- `UpdateAlertRule.annotations` (map<string>, optional) — Templates (Prometheus's alerting template language, without query, range or template; at most 4 KiB each, 16 in all), rendered per instance with $labels and $value.
- `UpdateAlertRule.condition` (object, optional) — Exactly one of promql, logs and traces.
  - `UpdateAlertRule.condition.logs` (object, optional) — A logs or traces aggregate over [t − window, t); each group whose value satisfies the threshold is an active instance.
    - `UpdateAlertRule.condition.logs.aggregate` (object, required) — One aggregation, as a dashboard panel's: {fn, field?}.
      - `UpdateAlertRule.condition.logs.aggregate.fn` (string, required)
      - `UpdateAlertRule.condition.logs.aggregate.field` (unknown, optional)
    - `UpdateAlertRule.condition.logs.dataset` (string, required)
      - format `uuid`
    - `UpdateAlertRule.condition.logs.threshold` (object, required)
      - `UpdateAlertRule.condition.logs.threshold.op` (string, required)
        - one of `">"`, `">="`, `"<"`, `"<="`, `"=="`, `"!="`
      - `UpdateAlertRule.condition.logs.threshold.value` (number, required)
    - `UpdateAlertRule.condition.logs.window` (string, required) — The aggregate's window, ending at the evaluation time: 1m to 15m in whole minutes.
    - `UpdateAlertRule.condition.logs.filter` (object, optional) — The dashboard panel's filter: logs' filters (LogFilters) or traces' (TraceFilters), kept as sent (stored as JSON: key order and number spelling may be normalized). Default {}.
    - `UpdateAlertRule.condition.logs.groupBy` (array<object>, optional) — At most 2 fields; at most 50 groups are evaluated (more is a rule error).
      - `UpdateAlertRule.condition.logs.groupBy.field` (unknown, required)
  - `UpdateAlertRule.condition.promql` (object, optional)
    - `UpdateAlertRule.condition.promql.expr` (string, required) — A PromQL expression returning an instant vector, with its comparison: every series it returns is an active instance. Ranges, subquery ranges and offsets add up to at most 1h along any path; @ isn't allowed.
      - maxLength 8192
  - `UpdateAlertRule.condition.traces` (object, optional) — A logs or traces aggregate over [t − window, t); each group whose value satisfies the threshold is an active instance.
    - `UpdateAlertRule.condition.traces.aggregate` (object, required) — One aggregation, as a dashboard panel's: {fn, field?}.
      - `UpdateAlertRule.condition.traces.aggregate.fn` (string, required)
      - `UpdateAlertRule.condition.traces.aggregate.field` (unknown, optional)
    - `UpdateAlertRule.condition.traces.dataset` (string, required)
      - format `uuid`
    - `UpdateAlertRule.condition.traces.threshold` (object, required)
      - `UpdateAlertRule.condition.traces.threshold.op` (string, required)
        - one of `">"`, `">="`, `"<"`, `"<="`, `"=="`, `"!="`
      - `UpdateAlertRule.condition.traces.threshold.value` (number, required)
    - `UpdateAlertRule.condition.traces.window` (string, required) — The aggregate's window, ending at the evaluation time: 1m to 15m in whole minutes.
    - `UpdateAlertRule.condition.traces.filter` (object, optional) — The dashboard panel's filter: logs' filters (LogFilters) or traces' (TraceFilters), kept as sent (stored as JSON: key order and number spelling may be normalized). Default {}.
    - `UpdateAlertRule.condition.traces.groupBy` (array<object>, optional) — At most 2 fields; at most 50 groups are evaluated (more is a rule error).
      - `UpdateAlertRule.condition.traces.groupBy.field` (unknown, required)
- `UpdateAlertRule.contactPoints` (array<string>, optional) — 0 to 10 contact point IDs of the project. Default none (the rule still evaluates and keeps state).
  - format `uuid`
- `UpdateAlertRule.description` (string, optional)
  - maxLength 1000
- `UpdateAlertRule.enabled` (boolean, optional) — Off: the rule isn't evaluated and has no instances. Default true.
- `UpdateAlertRule.for` (string, optional) — How long the condition must hold before an instance fires: 0 to 24h in whole minutes. Default 0.
- `UpdateAlertRule.keepFiringFor` (string, optional) — How long a firing instance keeps firing after the condition stops holding: 0 to 24h in whole minutes. Default 0.
- `UpdateAlertRule.labels` (map<string>, optional) — Static labels on every instance (at most 32). alertname, ezgh_* and __* are reserved.
- `UpdateAlertRule.name` (string, optional)
  - minLength 1; maxLength 100
- `UpdateAlertRule.noData` (string, optional) — Logs and traces conditions whose aggregate returns no groups: ok (nothing active), alerting (one active instance) or noData (one instance in the noData state). Default noData. PromQL ignores it: use absent().
  - one of `"ok"`, `"alerting"`, `"noData"`
- `UpdateAlertRule.notifyOnResolve` (boolean, optional) — Notify when instances resolve. Default true.
- `UpdateAlertRule.onError` (string, optional) — A rule error (the engine refuses the query, more than 1,000 instances, a budget exceeded): error puts the rule in the error state and notifies; ok records it without notifying. Default error. EZGH's own failures never notify.
  - one of `"error"`, `"ok"`
- `UpdateAlertRule.repeatInterval` (string, optional) — How often a still-firing rule notifies again: 5m to 7d. Default 4h.

## Example request

```json
{
  "annotations": {
    "property1": "string",
    "property2": "string"
  },
  "condition": {
    "logs": {
      "aggregate": {
        "field": null,
        "fn": "string"
      },
      "dataset": "d93f2be0-02b1-4d87-8b6e-fc5cba21ed8d",
      "filter": {},
      "groupBy": [
        {
          "field": null
        }
      ],
      "threshold": {
        "op": ">",
        "value": 0
      },
      "window": "string"
    }
  },
  "contactPoints": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "description": "string",
  "enabled": true,
  "for": "string",
  "keepFiringFor": "string",
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "name": "string",
  "noData": "ok",
  "notifyOnResolve": true,
  "onError": "error",
  "repeatInterval": "string"
}
```

## Code samples

### cURL

```curl
curl --request PATCH \
  --url https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/alert-rules/497f6eca-6276-4993-bfeb-53cbbbba6f08 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "annotations": {
    "property1": "string",
    "property2": "string"
  },
  "condition": {
    "logs": {
      "aggregate": {
        "field": null,
        "fn": "string"
      },
      "dataset": "d93f2be0-02b1-4d87-8b6e-fc5cba21ed8d",
      "filter": {},
      "groupBy": [
        {
          "field": null
        }
      ],
      "threshold": {
        "op": ">",
        "value": 0
      },
      "window": "string"
    }
  },
  "contactPoints": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "description": "string",
  "enabled": true,
  "for": "string",
  "keepFiringFor": "string",
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "name": "string",
  "noData": "ok",
  "notifyOnResolve": true,
  "onError": "error",
  "repeatInterval": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/alert-rules/497f6eca-6276-4993-bfeb-53cbbbba6f08';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    annotations: {property1: 'string', property2: 'string'},
    condition: {
      logs: {
        aggregate: {field: null, fn: 'string'},
        dataset: 'd93f2be0-02b1-4d87-8b6e-fc5cba21ed8d',
        filter: {},
        groupBy: [{field: null}],
        threshold: {op: '>', value: 0},
        window: 'string'
      }
    },
    contactPoints: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
    description: 'string',
    enabled: true,
    for: 'string',
    keepFiringFor: 'string',
    labels: {property1: 'string', property2: 'string'},
    name: 'string',
    noData: 'ok',
    notifyOnResolve: true,
    onError: 'error',
    repeatInterval: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/alert-rules/497f6eca-6276-4993-bfeb-53cbbbba6f08"

payload = {
    "annotations": {
        "property1": "string",
        "property2": "string"
    },
    "condition": { "logs": {
            "aggregate": {
                "field": None,
                "fn": "string"
            },
            "dataset": "d93f2be0-02b1-4d87-8b6e-fc5cba21ed8d",
            "filter": {},
            "groupBy": [{ "field": None }],
            "threshold": {
                "op": ">",
                "value": 0
            },
            "window": "string"
        } },
    "contactPoints": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
    "description": "string",
    "enabled": True,
    "for": "string",
    "keepFiringFor": "string",
    "labels": {
        "property1": "string",
        "property2": "string"
    },
    "name": "string",
    "noData": "ok",
    "notifyOnResolve": True,
    "onError": "error",
    "repeatInterval": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The alert rule, changed.

#### Example

```json
{
  "annotations": {
    "property1": "string",
    "property2": "string"
  },
  "condition": {
    "logs": {
      "aggregate": {
        "field": null,
        "fn": "string"
      },
      "dataset": "d93f2be0-02b1-4d87-8b6e-fc5cba21ed8d",
      "filter": {},
      "groupBy": [
        {
          "field": null
        }
      ],
      "threshold": {
        "op": ">",
        "value": 0
      },
      "window": "string"
    }
  },
  "contactPoints": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": {
    "id": "string",
    "type": "string"
  },
  "description": "string",
  "enabled": true,
  "for": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "keepFiringFor": "string",
  "kind": "string",
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "name": "string",
  "noData": "ok",
  "notifyOnResolve": true,
  "onError": "error",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "repeatInterval": "string",
  "resourceName": "string",
  "slug": "string",
  "status": {
    "counts": {
      "firing": 0,
      "noData": 0,
      "pending": 0
    },
    "degraded": true,
    "degradedSince": "2019-08-24T14:15:22Z",
    "error": "string",
    "errorSince": "2019-08-24T14:15:22Z",
    "lastDurationMs": 0,
    "lastEvaluatedAt": "2019-08-24T14:15:22Z",
    "state": "string",
    "stateSince": "2019-08-24T14:15:22Z",
    "warnings": [
      "string"
    ]
  },
  "updatedAt": "2019-08-24T14:15:22Z",
  "updatedBy": {
    "id": "string",
    "type": "string"
  },
  "version": 0,
  "warnings": [
    "string"
  ]
}
```

- `UpdateAlertRule.response.200.condition` (object, required) — Exactly one of promql, logs and traces.
  - `UpdateAlertRule.response.200.condition.logs` (object, optional) — A logs or traces aggregate over [t − window, t); each group whose value satisfies the threshold is an active instance.
    - `UpdateAlertRule.response.200.condition.logs.aggregate` (object, required) — One aggregation, as a dashboard panel's: {fn, field?}.
      - `UpdateAlertRule.response.200.condition.logs.aggregate.fn` (string, required)
      - `UpdateAlertRule.response.200.condition.logs.aggregate.field` (unknown, optional)
    - `UpdateAlertRule.response.200.condition.logs.dataset` (string, required)
      - format `uuid`
    - `UpdateAlertRule.response.200.condition.logs.threshold` (object, required)
      - `UpdateAlertRule.response.200.condition.logs.threshold.op` (string, required)
        - one of `">"`, `">="`, `"<"`, `"<="`, `"=="`, `"!="`
      - `UpdateAlertRule.response.200.condition.logs.threshold.value` (number, required)
    - `UpdateAlertRule.response.200.condition.logs.window` (string, required) — The aggregate's window, ending at the evaluation time: 1m to 15m in whole minutes.
    - `UpdateAlertRule.response.200.condition.logs.filter` (object, optional) — The dashboard panel's filter: logs' filters (LogFilters) or traces' (TraceFilters), kept as sent (stored as JSON: key order and number spelling may be normalized). Default {}.
    - `UpdateAlertRule.response.200.condition.logs.groupBy` (array<object>, optional) — At most 2 fields; at most 50 groups are evaluated (more is a rule error).
      - `UpdateAlertRule.response.200.condition.logs.groupBy.field` (unknown, required)
  - `UpdateAlertRule.response.200.condition.promql` (object, optional)
    - `UpdateAlertRule.response.200.condition.promql.expr` (string, required) — A PromQL expression returning an instant vector, with its comparison: every series it returns is an active instance. Ranges, subquery ranges and offsets add up to at most 1h along any path; @ isn't allowed.
      - maxLength 8192
  - `UpdateAlertRule.response.200.condition.traces` (object, optional) — A logs or traces aggregate over [t − window, t); each group whose value satisfies the threshold is an active instance.
    - `UpdateAlertRule.response.200.condition.traces.aggregate` (object, required) — One aggregation, as a dashboard panel's: {fn, field?}.
      - `UpdateAlertRule.response.200.condition.traces.aggregate.fn` (string, required)
      - `UpdateAlertRule.response.200.condition.traces.aggregate.field` (unknown, optional)
    - `UpdateAlertRule.response.200.condition.traces.dataset` (string, required)
      - format `uuid`
    - `UpdateAlertRule.response.200.condition.traces.threshold` (object, required)
      - `UpdateAlertRule.response.200.condition.traces.threshold.op` (string, required)
        - one of `">"`, `">="`, `"<"`, `"<="`, `"=="`, `"!="`
      - `UpdateAlertRule.response.200.condition.traces.threshold.value` (number, required)
    - `UpdateAlertRule.response.200.condition.traces.window` (string, required) — The aggregate's window, ending at the evaluation time: 1m to 15m in whole minutes.
    - `UpdateAlertRule.response.200.condition.traces.filter` (object, optional) — The dashboard panel's filter: logs' filters (LogFilters) or traces' (TraceFilters), kept as sent (stored as JSON: key order and number spelling may be normalized). Default {}.
    - `UpdateAlertRule.response.200.condition.traces.groupBy` (array<object>, optional) — At most 2 fields; at most 50 groups are evaluated (more is a rule error).
      - `UpdateAlertRule.response.200.condition.traces.groupBy.field` (unknown, required)
- `UpdateAlertRule.response.200.contactPoints` (array<string>, required) — 0 to 10 contact point IDs of the project. Default none (the rule still evaluates and keeps state).
  - format `uuid`
- `UpdateAlertRule.response.200.createdAt` (string, required) — UTC, millisecond precision: 2026-10-02T10:20:00.000Z.
  - format `date-time`
- `UpdateAlertRule.response.200.createdBy` (object, required)
  - `UpdateAlertRule.response.200.createdBy.id` (string, required)
  - `UpdateAlertRule.response.200.createdBy.type` (string, required) — user or bot (org-api's principal type).
- `UpdateAlertRule.response.200.enabled` (boolean, required) — Off: the rule isn't evaluated and has no instances. Default true.
- `UpdateAlertRule.response.200.for` (string, required) — How long the condition must hold before an instance fires: 0 to 24h in whole minutes. Default 0.
- `UpdateAlertRule.response.200.id` (string, required)
  - format `uuid`
- `UpdateAlertRule.response.200.keepFiringFor` (string, required) — How long a firing instance keeps firing after the condition stops holding: 0 to 24h in whole minutes. Default 0.
- `UpdateAlertRule.response.200.kind` (string, required) — The condition's kind: promql, logs or traces.
- `UpdateAlertRule.response.200.name` (string, required)
  - minLength 1; maxLength 100
- `UpdateAlertRule.response.200.noData` (string, required) — Logs and traces conditions whose aggregate returns no groups: ok (nothing active), alerting (one active instance) or noData (one instance in the noData state). Default noData. PromQL ignores it: use absent().
  - one of `"ok"`, `"alerting"`, `"noData"`
- `UpdateAlertRule.response.200.notifyOnResolve` (boolean, required) — Notify when instances resolve. Default true.
- `UpdateAlertRule.response.200.onError` (string, required) — A rule error (the engine refuses the query, more than 1,000 instances, a budget exceeded): error puts the rule in the error state and notifies; ok records it without notifying. Default error. EZGH's own failures never notify.
  - one of `"error"`, `"ok"`
- `UpdateAlertRule.response.200.projectId` (string, required)
  - format `uuid`
- `UpdateAlertRule.response.200.repeatInterval` (string, required) — How often a still-firing rule notifies again: 5m to 7d. Default 4h.
- `UpdateAlertRule.response.200.resourceName` (string, required)
- `UpdateAlertRule.response.200.slug` (string, required)
- `UpdateAlertRule.response.200.status` (object, required) — A rule's evaluation state.
  - `UpdateAlertRule.response.200.status.counts` (object, required)
    - `UpdateAlertRule.response.200.status.counts.firing` (integer, required)
    - `UpdateAlertRule.response.200.status.counts.noData` (integer, required)
    - `UpdateAlertRule.response.200.status.counts.pending` (integer, required)
  - `UpdateAlertRule.response.200.status.degraded` (boolean, required) — Evaluations are delayed by an EZGH issue (late data or storage unavailable): state is held and nothing resolves or notifies about it.
  - `UpdateAlertRule.response.200.status.degradedSince` (string | null, required)
    - format `date-time`
  - `UpdateAlertRule.response.200.status.error` (string | null, required) — The last evaluation's rule error, or null.
  - `UpdateAlertRule.response.200.status.errorSince` (string | null, required)
    - format `date-time`
  - `UpdateAlertRule.response.200.status.lastDurationMs` (integer | null, required)
  - `UpdateAlertRule.response.200.status.lastEvaluatedAt` (string | null, required)
    - format `date-time`
  - `UpdateAlertRule.response.200.status.state` (string, required) — ok, pending, firing, noData, error or disabled (off, or its organization is being deleted). More may be added.
  - `UpdateAlertRule.response.200.status.stateSince` (string | null, required) — When the rule entered its state (as obs-alerts recorded it); null when not known yet, or disabled.
    - format `date-time`
  - `UpdateAlertRule.response.200.status.warnings` (array<string>, required) — sampledData, noContactPoints. More codes may be added.
- `UpdateAlertRule.response.200.updatedAt` (string, required) — UTC, millisecond precision: 2026-10-02T10:20:00.000Z.
  - format `date-time`
- `UpdateAlertRule.response.200.updatedBy` (object, required)
  - `UpdateAlertRule.response.200.updatedBy.id` (string, required)
  - `UpdateAlertRule.response.200.updatedBy.type` (string, required) — user or bot (org-api's principal type).
- `UpdateAlertRule.response.200.version` (integer, required)
- `UpdateAlertRule.response.200.annotations` (map<string>, optional) — Templates (Prometheus's alerting template language, without query, range or template; at most 4 KiB each, 16 in all), rendered per instance with $labels and $value.
- `UpdateAlertRule.response.200.description` (string, optional)
  - maxLength 1000
- `UpdateAlertRule.response.200.labels` (map<string>, optional) — Static labels on every instance (at most 32). alertname, ezgh_* and __* are reserved.
- `UpdateAlertRule.response.200.warnings` (array<string>, optional) — Create and update answers only: sampledData (a traces condition on a dataset with tail sampling sees only kept spans) and noContactPoints (the rule notifies no one).

### 400

invalid_request (with issues), invalid_cursor, or the endpoint's own 400 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.400.error` (object, required)
  - `UpdateAlertRule.response.400.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.400.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.400.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.400.error.issues.message` (string, required)
    - `UpdateAlertRule.response.400.error.issues.path` (string, required)
  - `UpdateAlertRule.response.400.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.400.error.quota.id` (string, required)
    - `UpdateAlertRule.response.400.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.400.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.400.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.400.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.400.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.400.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.400.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.400.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.400.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.400.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 401

unauthenticated: no credential, or one that doesn't check out.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.401.error` (object, required)
  - `UpdateAlertRule.response.401.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.401.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.401.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.401.error.issues.message` (string, required)
    - `UpdateAlertRule.response.401.error.issues.path` (string, required)
  - `UpdateAlertRule.response.401.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.401.error.quota.id` (string, required)
    - `UpdateAlertRule.response.401.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.401.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.401.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.401.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.401.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.401.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.401.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.401.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.401.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.401.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 403

access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed; spend_limit_reached.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.403.error` (object, required)
  - `UpdateAlertRule.response.403.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.403.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.403.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.403.error.issues.message` (string, required)
    - `UpdateAlertRule.response.403.error.issues.path` (string, required)
  - `UpdateAlertRule.response.403.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.403.error.quota.id` (string, required)
    - `UpdateAlertRule.response.403.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.403.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.403.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.403.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.403.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.403.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.403.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.403.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.403.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.403.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 404

not_found: unknown, malformed, or in an organization the caller isn't in.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.404.error` (object, required)
  - `UpdateAlertRule.response.404.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.404.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.404.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.404.error.issues.message` (string, required)
    - `UpdateAlertRule.response.404.error.issues.path` (string, required)
  - `UpdateAlertRule.response.404.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.404.error.quota.id` (string, required)
    - `UpdateAlertRule.response.404.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.404.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.404.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.404.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.404.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.404.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.404.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.404.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.404.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.404.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 409

quota_exceeded (an allocation quota, with quota), idempotency_conflict, idempotency_in_progress (with Retry-After), organization_deletion_pending, operation_in_progress, or the endpoint's own 409 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.409.error` (object, required)
  - `UpdateAlertRule.response.409.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.409.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.409.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.409.error.issues.message` (string, required)
    - `UpdateAlertRule.response.409.error.issues.path` (string, required)
  - `UpdateAlertRule.response.409.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.409.error.quota.id` (string, required)
    - `UpdateAlertRule.response.409.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.409.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.409.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.409.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.409.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.409.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.409.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.409.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.409.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.409.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 412

precondition_failed: If-Match doesn't name the current ETag. Nothing changed.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.412.error` (object, required)
  - `UpdateAlertRule.response.412.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.412.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.412.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.412.error.issues.message` (string, required)
    - `UpdateAlertRule.response.412.error.issues.path` (string, required)
  - `UpdateAlertRule.response.412.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.412.error.quota.id` (string, required)
    - `UpdateAlertRule.response.412.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.412.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.412.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.412.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.412.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.412.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.412.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.412.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.412.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.412.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 413

payload_too_large: the body is over the endpoint's limit (1 MiB unless it says otherwise).

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.413.error` (object, required)
  - `UpdateAlertRule.response.413.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.413.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.413.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.413.error.issues.message` (string, required)
    - `UpdateAlertRule.response.413.error.issues.path` (string, required)
  - `UpdateAlertRule.response.413.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.413.error.quota.id` (string, required)
    - `UpdateAlertRule.response.413.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.413.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.413.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.413.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.413.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.413.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.413.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.413.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.413.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.413.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 429

too_many_requests, with Retry-After; or quota_exceeded (a rate, usage or concurrency quota, with quota), never with Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.429.error` (object, required)
  - `UpdateAlertRule.response.429.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.429.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.429.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.429.error.issues.message` (string, required)
    - `UpdateAlertRule.response.429.error.issues.path` (string, required)
  - `UpdateAlertRule.response.429.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.429.error.quota.id` (string, required)
    - `UpdateAlertRule.response.429.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.429.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.429.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.429.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.429.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.429.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.429.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.429.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.429.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.429.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.500.error` (object, required)
  - `UpdateAlertRule.response.500.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.500.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.500.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.500.error.issues.message` (string, required)
    - `UpdateAlertRule.response.500.error.issues.path` (string, required)
  - `UpdateAlertRule.response.500.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.500.error.quota.id` (string, required)
    - `UpdateAlertRule.response.500.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.500.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.500.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.500.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.500.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.500.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.500.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.500.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.500.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.500.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 503

unavailable: a dependency the request needs is down. Retry after Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateAlertRule.response.503.error` (object, required)
  - `UpdateAlertRule.response.503.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateAlertRule.response.503.error.message` (string, required)
    - maxLength 1024
  - `UpdateAlertRule.response.503.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateAlertRule.response.503.error.issues.message` (string, required)
    - `UpdateAlertRule.response.503.error.issues.path` (string, required)
  - `UpdateAlertRule.response.503.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateAlertRule.response.503.error.quota.id` (string, required)
    - `UpdateAlertRule.response.503.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateAlertRule.response.503.error.quota.limit` (integer, required)
      - min 0
    - `UpdateAlertRule.response.503.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateAlertRule.response.503.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.503.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.503.error.quota.region` (string, optional)
    - `UpdateAlertRule.response.503.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateAlertRule.response.503.error.quota.scopeResourceName` (string, optional)
    - `UpdateAlertRule.response.503.error.quota.used` (integer, optional)
      - min 0
    - `UpdateAlertRule.response.503.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.


Source: https://docs.ezghcloud.com/obs-api/UpdateAlertRule/index.md
