import type { DescribeChangeSetCommandOutput } from '@aws-sdk/client-cloudformation'; import type { ICloudFormationClient } from '../aws-auth/private'; import type { Diagnosis } from '../diagnosing/diagnosis'; import type { CloudFormationStackDiagnoser } from '../diagnosing/stack-diagnoser'; import type { IoHelper } from '../io/private'; export interface ChangeSetReport { readonly changeSet: DescribeChangeSetCommandOutput; readonly diagnosis: Diagnosis; } export interface ChangeSetDescriberProps { readonly cfn: ICloudFormationClient; readonly ioHelper: IoHelper; /** * The name or ARN of the stack the change set belongs to, prefer ARN. */ readonly stackNameOrArn: string; /** * The name or ARN of the change set, prefer ARN. */ readonly changeSetNameOrArn: string; } export interface WaitForChangeSetOptions { readonly diagnoser: CloudFormationStackDiagnoser; } /** * Describes a single CloudFormation change set. * * Change sets are described with `IncludePropertyValues`, which yields the before/after property * values and resource contexts that let `diff` surface changes invisible to a pure template diff. * CloudFormation may silently drop resource changes from such a response, in which case it says so * in `StatusReason`; we then describe the change set a second time without property values and put * back what was dropped. All pages of `Changes` are always fetched, so the change list is never * truncated. See https://github.com/aws/aws-cdk-cli/issues/1780 */ export declare class ChangeSetDescriber { /** * Whether two change set change details describe the same change. * * This is the identity function for `mergeDescriptions`: a plain detail is only restored if no * detailed one matches it. Compares identifying fields only; value-carrying fields differ * between a description with and without `IncludePropertyValues`. `Target.Path` is deliberately * ignored: it only exists on detailed details, and a detailed response can carry several * path-level details for the same property name. A plain detail (which has no path) matching * any of them means the property is already covered; restoring it would duplicate the change. */ private static describesSameChange; private readonly cfn; private readonly ioHelper; private readonly stackNameOrArn; private readonly changeSetNameOrArn; private readonly stackDisplayName; private readonly changeSetDisplayName; constructor(props: ChangeSetDescriberProps); /** * Waits for the change set to reach a terminal state (it stops being created), and describes it. * * Says nothing about whether the change set was created successfully; a failed change set is a * perfectly good return value here. */ waitForSettled(): Promise; /** * Waits for the change set to settle and diagnoses the outcome, without throwing. * * Use this if you want to inspect or report the problems yourself. If you just want the * operation to fail on a problem, use `waitAndThrowOnProblem`. */ waitForReport(options: WaitForChangeSetOptions): Promise; /** * Waits for the change set to settle, and throws a `DeploymentError` if anything is wrong with it. * * Returns a change set that is either ready to be executed or that has no changes. */ waitAndThrowOnProblem(options: WaitForChangeSetOptions): Promise; /** * Describes the change set as it is right now, for the purpose of executing it. * * Like `describeCurrentState` this does not wait; unlike it, the returned report is guaranteed to * describe a change set that can actually be executed. Use it for a change set that an earlier * command already created (and that may not even be ours), where blocking on it indefinitely * would be wrong: we report that it isn't ready instead. */ describeForExecution(options: WaitForChangeSetOptions): Promise; /** * Waits for the change set to be gone (deleted, or never existed). */ waitForGone(): Promise; /** * Describe the change set as it is right now, without waiting for it to settle. * * Only use this for a change set that is already known to be in a terminal state (for example * one that has already been waited for, or one that is being diagnosed after it failed). If the * change set may still be creating, use `waitForSettled` or `waitAndThrowOnProblem` instead. */ describeCurrentState(): Promise; private describeOnce; /** * Merge two descriptions of the same change set: one described with `IncludePropertyValues` * (detailed) and one described without (plain). * * CloudFormation can silently drop a `ResourceChange` from the detailed response when it * fails to render property values (e.g. JSON-typed properties). The detailed description is * used as the base; resource changes and details only present in the plain one are restored. * * See https://github.com/aws/aws-cdk-cli/issues/1780 */ private mergeDescriptions; } //# sourceMappingURL=change-set-describer.d.ts.map