# StatusPageV3AutomationRule Construct - Checkly Docs

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

Source: https://www.checklyhq.com/docs/constructs/status-page-v3-automation-rule/

---

- Configuration StatusPageV3AutomationRule Options

Status Pages

# 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.

```
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

​

StatusPageV3 | StatusPageV3Ref

required

The page this rule belongs to.

​

string

required

Name of the rule.

​

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:**

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

​

string

required

Body of the status update that opens the incident.

​

string

required

Body of the status update that resolves the incident.

​

array

required

The components an automated incident impacts, with the impact each one gets. **Parameters:** Show components entry

​

StatusPageV3Component | StatusPageV3ComponentRef

required

The component the automated incident impacts.

​

string

required

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

**Usage:**

```
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.",
})
```

​

boolean

default: "true"

A disabled rule never opens incidents.

​

boolean

default: "true"

Whether subscribers are notified of the automated updates.

​

number

default: "5"

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

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

Was this page helpful?

[Suggest edits](https://github.com/checkly/docs/edit/main/constructs/status-page-v3-automation-rule.mdx)[Raise issue](https://github.com/checkly/docs/issues/new?title=Issue%20on%20docs&body=Path:%20/constructs/status-page-v3-automation-rule)

[StatusPageV3Component Construct Previous](https://www.checklyhq.com/docs/constructs/status-page-v3-component)[StatusPage Construct Next](https://www.checklyhq.com/docs/constructs/status-page)

[x](https://x.com/checklyhq)[github](https://github.com/checkly)[linkedin](https://linkedin.com/company/checkly)

[Powered by This documentation is built and hosted on Mintlify, a developer documentation platform](https://www.mintlify.com/?utm_campaign=poweredBy&utm_medium=referral&utm_source=checkly-422f444a)
