Skip to content
betterstack-alchemyUnofficial

Incidents.EscalationPolicyGroup

Kind ResourceType id BetterStack.Incidents.EscalationPolicyGroupSource src/Incidents/EscalationPolicyGroup.tsLive test gated Lifecycle test runs against the offline mock; a live run exists but is gated behind BETTERSTACK_TEST_ESCALATION_POLICIES=1 because the main lifecycle runs live, but the cases that need it are gated: escalation policies need a paid plan (test/Incidents/EscalationPolicyGroup.test.ts).

A Better Stack escalation policy group: keeps related EscalationPolicy policies together. Policies join it through their escalationPolicyGroupId.

name defaults to a generated unique name; name and sortIndex update in place (removing sortIndex clears it). teamId replaces the group.

Group the payments team’s policies

const payments = yield* BetterStack.Incidents.EscalationPolicyGroup("payments", {
name: "Payments",
});
yield* BetterStack.Incidents.EscalationPolicy("payments-on-call", {
name: "Payments on-call",
escalationPolicyGroupId: payments.id,
steps: [{ type: "escalation", waitBefore: 0, stepMembers: [{ type: "current_on_call" }] }],
});

name string

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

sortIndex number | null

The group's position in your list of escalation policy groups, lower values first. null when no position was set. Requests can also name it position.

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 escalation_policy_group's id.

createdAt string

When the group was created.

name string

Group name.

sortIndex number | null

The group's position in your list of escalation policy groups, lower values first. null when no position was set.

teamId string

Team that owns this group, such as t123.

teamName string

Name of the team that owns this group.

updatedAt string

When the group was last updated.

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

id string required

The group's id.

teamId string

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