import type { StackEvent } from '@aws-sdk/client-cloudformation'; import type { ResourceEvent } from './stack-event-poller'; export interface ResourceError { /** * The stack this resource error occurred in * * NOTE: This will be a stack ID (which is a full ARN including the unique identifier), * not just a name. */ readonly stackArn: string; /** * IDs of parent stacks of the resource, in case of resources in nested stacks */ readonly parentStackLogicalIds: string[]; /** * Logical ID of the resource * * (May be absent in case this message is about the stack itself) */ readonly logicalId?: string; /** * Resource type */ readonly resourceType?: string; /** * Physical ID of the resource */ readonly physicalId?: string; /** * Error message of the resource */ readonly message: string; /** * Error code of the resource */ readonly errorCode?: string; } /** * Class used to send stack event errors into, to come up with root causes. */ export declare class ResourceErrors { /** * A list of all non-cancellation errors we have seen. * * By the nature of the order we see events in, will be ordered from oldest to newest. */ private readonly _errors; isEmpty(): boolean; get all(): ReadonlyArray; /** * Update the error collection with the given stack activity * * May be from a nested stack as well. * * This class expects to see all events in chronological order. */ update(...events: ResourceEvent[]): void; /** * Take our best guess at the error code of the root cause * * The first error that occurs is the root cause. */ get rootCauseErrorCode(): string | undefined; /** * Return error messages of all encountered errors (that aren't cancellations) */ get allErrorMessages(): string[]; /** * Return error codeds of all encountered errors (that aren't cancellations nor stack errors) * * We don't need to include nested stack errors because our poller will poll the nested stack, * and have returned the actual error as well. */ get allErrorCodes(): string[]; } /** * Extract an error code from the given stack event. * * Always contains the services, and includes the handler error code if available. */ export declare function extractErrorCode(event: StackEvent): string; //# sourceMappingURL=resource-errors.d.ts.map