Skip to content
betterstack-alchemyUnofficial

Incidents.OutgoingPagerDutyIntegration

Kind ResourceType id BetterStack.Incidents.OutgoingPagerDutyIntegrationSource src/Incidents/OutgoingPagerDutyIntegration.tsLive test gated Lifecycle test runs against the offline mock; a live run exists but is gated behind BETTERSTACK_TEST_PAID_INTEGRATIONS=1 because the test account's plan refuses this integration (test/Incidents/OutgoingPagerDutyIntegration.test.ts).

Forwards Better Stack incidents to a PagerDuty service. In PagerDuty, add an Events API V2 integration to the service and copy its integration key (the routing key) into key, a secret (Redacted). Better Stack sends incidents to that service with the PagerDuty severity you choose. Incidents without an escalation policy reach it when notifyAlongsidePrimaryResponder is on; with an escalation policy, only when a step of the policy notifies this integration.

Every prop updates in place (key included) except teamId, which replaces the integration. name defaults to a generated unique name.

A routing key from the environment

yield* BetterStack.Incidents.OutgoingPagerDutyIntegration("pagerduty", {
name: "PagerDuty (payments)",
key: Redacted.make(process.env.PAGERDUTY_ROUTING_KEY ?? ""),
severity: "critical",
notifyAlongsidePrimaryResponder: true,
});

key string | Redacted<string> required

PagerDuty integration key, also called the routing key.

severity "info" | "warning" | "error" | "critical" | string required

PagerDuty severity sent with the event.

name string

Integration name. Defaults to a unique name generated from the stack, stage and logical id.

notifyAlongsidePrimaryResponder boolean

Whether to notify this PagerDuty integration alongside the primary responder for incidents with no escalation policy. For an incident with an escalation policy, it's notified only when a step of that policy notifies it.

teamId string

Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.

id string always set

The incidents_outgoing_pagerduty_integration's id.

key string | Redacted<string>

PagerDuty integration key, also called the routing key.

name string

Integration name.

notifyAlongsidePrimaryResponder boolean

Whether to notify this PagerDuty integration alongside the primary responder for incidents with no escalation policy. For an incident with an escalation policy, it's notified only when a step of that policy notifies it.

severity "info" | "warning" | "error" | "critical"

PagerDuty severity sent with the event.

teamId string

Team that owns this integration, such as t123.

teamName string

Name of the team that owns this integration.

OutgoingPagerDutyIntegration.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.

id string required

The integration's id.

teamId string

Team that owns it, such as t123. Defaults to the credentials' team.