interface CancelStackCredentials { accessKeyId: string; secretAccessKey: string; sessionToken?: string; } /** * What a cancel attempt did. `cancelled-update` issued a cancel, and * `cancel-unconfirmed` may have: CloudFormation's answer to it was lost. * Every other outcome issued none. Each `reason` is masked at construction. */ export type CancelInFlightOutcome = { readonly kind: "cancelled-update"; } | { readonly kind: "create-in-progress"; } | { readonly kind: "not-cancellable"; readonly status: string; } | { readonly kind: "no-stack"; } | { readonly kind: "unreadable"; readonly reason: string; } | { readonly kind: "cancel-refused"; readonly reason: string; } | { readonly kind: "cancel-unconfirmed"; readonly reason: string; }; /** * Describe the stack and, if it is mid-update, issue CancelUpdateStack. * * - `UPDATE_IN_PROGRESS` → CancelUpdateStack (CFN rolls back to last good state). * - `CREATE_IN_PROGRESS` → CancelUpdateStack is invalid for a first create; we * leave it (CFN's own create-failure default is rollback, and the next deploy's * stack-cleanup reconciles a ROLLBACK_* stack) and report so the operator can * `fjall destroy ` if they want it gone now. * - any other status → `not-cancellable` (the op already reached a terminal * or rollback state); no stack → `no-stack` (abort fired before any CFN op). * - a status that could not be read → `unreadable`, and a CancelUpdateStack * CloudFormation answered with a refusal → `cancel-refused`; neither issued * a cancel. A CancelUpdateStack whose answer was lost (a transport failure, * a timeout, a 5xx, or a refusal on an attempt the SDK retried) → * `cancel-unconfirmed`, since CloudFormation may have taken it. * * @param onOutput optional sink for an operator-facing line (already inside the * deploy output stream — caller masks at its own boundary if needed). * @param clientRequestToken sent with the CancelUpdateStack, so CloudFormation * recognises a retry of a request it already took, by the SDK or by the * caller, rather than refusing the stack's new status. */ export declare function cancelInFlightStack(stackName: string, region: string, credentials?: CancelStackCredentials, onOutput?: (message: string) => void, clientRequestToken?: string): Promise; export {};