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

# StatusPageV3AutomationRule Construct

> Learn how to automate status page incidents with the Checkly CLI.

An automation rule opens and resolves incidents on a [`StatusPageV3`](https://www.checklyhq.com/docs/constructs/status-page-v3) page automatically. When a check whose tags overlap with the rule's tags fails, Checkly opens one incident impacting the listed components, and resolves it when the check recovers.

```ts theme={null}
import {
  StatusPageV3,
  StatusPageV3AutomationRule,
  StatusPageV3Component,
} from "checkly/constructs"

const statusPage = new StatusPageV3("company-status", {
  name: "Company Status",
  url: "company-status",
})

const api = new StatusPageV3Component("api-component", {
  statusPage,
  name: "API",
  displayOrder: 0,
})

new StatusPageV3AutomationRule("api-outage-rule", {
  statusPage,
  name: "API outage",
  tags: ["api", "production"],
  firstUpdate: "We are investigating elevated error rates on the API.",
  lastUpdate: "The API has recovered.",
  components: [{ component: api, targetImpact: "PARTIAL_OUTAGE" }],
})
```

## Configuration

### `StatusPageV3AutomationRule` Options

**statusPage** `StatusPageV3 | StatusPageV3Ref` *required*

The page this rule belongs to.

**name** `string` *required*

Name of the rule.

**tags** `string[]` *required*

A failing check matches this rule when it, or its group, carries any of these tags. At least one tag is required.

**Usage:**

```ts highlight={4} theme={null}
new StatusPageV3AutomationRule("api-outage-rule", {
  statusPage,
  name: "API outage",
  tags: ["api", "production"],
  /* More options... */
})
```

**firstUpdate** `string` *required*

Body of the status update that opens the incident.

**lastUpdate** `string` *required*

Body of the status update that resolves the incident.

**components** `array` *required*

The components an automated incident impacts, with the impact each one gets.

**Parameters:**

**components entry**

**component** `StatusPageV3Component | StatusPageV3ComponentRef` *required*

The component the automated incident impacts.

**targetImpact** `string` *required*

The impact set on the component while the incident is open: `'UNDER_MAINTENANCE'`, `'DEGRADED_PERFORMANCE'`, `'PARTIAL_OUTAGE'`, or `'MAJOR_OUTAGE'`.

**Usage:**

```ts highlight={5-8} theme={null}
new StatusPageV3AutomationRule("api-outage-rule", {
  statusPage,
  name: "API outage",
  tags: ["api"],
  components: [
    { component: api, targetImpact: "PARTIAL_OUTAGE" },
    { component: webApp, targetImpact: "DEGRADED_PERFORMANCE" },
  ],
  firstUpdate: "We are investigating elevated error rates.",
  lastUpdate: "The issue is resolved.",
})
```

**enabled** `boolean` (default: true)

A disabled rule never opens incidents.

**notifySubscribers** `boolean` (default: true)

Whether subscribers are notified of the automated updates.

**coolDownMinutes** `number` (default: 5)

Minimum minutes after an automated incident before this rule may open the next one. `0` disables the cool down.

> [!NOTE]
>
> Rules match on tags, not on individual checks. To automate incidents from a specific check, give that check a tag only the rule uses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.