import * as cxapi from '@aws-cdk/cloud-assembly-api'; import type { SourceTrace } from '../types'; import type { ISourceTracer } from './source-tracing'; /** * Use a stack artifact as the root for tracing problems with this deployment * * The stack can be either the stack itself, or a nested stack inside it. * * ## Strategy * * The first thing we need to do is translate the given resource to a * construct path. * * - The construct path can be found in the target template, if that option was * enabled during synthesis; or * - We can (try to) dig it out of the `tree.json` once * https://github.com/aws/aws-cdk/pull/37630 is merged (although we still * need some information about the stack). * * Especially for nested stacks the above is hard, since this called from a * place where we only have CloudFormation information (stack name). The stack * name of a nested stack cannot be predicted in advance, and even if we have * the list of logical IDs to get to the nested stack (which we do), finding * the actual template is not easy. */ export declare class StackArtifactSourceTracer implements ISourceTracer { private readonly stack; constructor(stack: cxapi.CloudFormationStackArtifact); traceResource(_stackName: string, nestedStackLogicalIds: string[], logicalId: string, propertyName?: string): Promise; traceStack(_stackName: string, nestedStackLogicalIds: string[]): Promise; } /** * Try to find the creation stack trace for the given construct * * - This can be the 'trace' of adding the 'aws:cdk:logicalId' metadata. * - This can also be dedicated metadata (we haven't added it yet). * * The construct path in metadata ALWAYS starts with a `/` while the construct path * we have here probably doesn't, account for that as well. * * Stack's currently don't emit any stack traces. */ export declare function findCreationStackTrace(stack: cxapi.CloudFormationStackArtifact, constructPath: string): string[] | undefined; /** * Find property mutation stack traces * * These are all places in the code where a property's value is overwritten after * construct creation. */ export declare function findMutationStackTraces(stack: cxapi.CloudFormationStackArtifact, constructPath: string, propertyName: string): string[][] | undefined; //# sourceMappingURL=stack-source-tracing.d.ts.map