import type { AwsClientLike, StackStatusRead } from "./cloudformationEventTypes.js"; /** * What one DescribeStacks says of a stack: `StackStatusRead`, whose present * stack also carries each parameter's value as the stack declares it. */ export type StackStateRead = (Extract & { readonly parameters: ReadonlyMap; }) | Exclude; type PresentStackState = Extract; /** * Read a stack's status, its reason and its parameters with one * DescribeStacks, as `fetchStackStatusRead` reads the status: absent only on * an empty stack list or CloudFormation's own not-found answer, and * unreadable for any other failure, an answer with no stack list, or a stack * with no status. */ export declare function readStackState(aws: AwsClientLike, stackName: string, abortSignal?: AbortSignal): Promise; export interface StackAtRestWait { /** How long to wait for the stack to come to rest; one read is always made. */ readonly budgetMs: number; readonly pollIntervalMs?: number; readonly abortSignal?: AbortSignal; readonly now?: () => number; readonly sleep?: (ms: number, signal?: AbortSignal) => Promise; } /** * Where a wait for a stack to come to rest got to. `in-progress` carries the * last status read when the budget ran out, and `unreadable` the last read's * reason: a read that could not be retried, or the last of the retries the * budget allowed. */ export type StackAtRest = ({ readonly kind: "at-rest"; } & Omit) | { readonly kind: "in-progress"; readonly status: string; } | { readonly kind: "unreadable"; readonly reason: string; } | { readonly kind: "absent"; } | { readonly kind: "cancelled"; }; /** * Read the stack until a status `isTerminalState` accepts, the stack is * gone, a read fails in a way asking again cannot mend, or `budgetMs` runs * out, so it ends within `budgetMs` and one read's own timeout. A status the * engine does not know is not one at rest, so the wait fails closed at the * budget rather than read it as the end. The caller's cancel is checked * before every read, ends a sleep at once, and turns a read that failed * after it into `cancelled`. */ export declare function waitForStackAtRest(aws: AwsClientLike, stackName: string, wait: StackAtRestWait): Promise; export {};