UNPKG

aws-cdk

Version:

CDK Toolkit, the command line tool for CDK apps

36 lines (35 loc) 1.66 kB
import * as cxapi from '@aws-cdk/cx-api'; import { ISDK } from './aws-auth'; import { Template } from './util/cloudformation'; export interface TemplateWithNestedStackNames { readonly deployedTemplate: Template; readonly nestedStackNames: { [nestedStackLogicalId: string]: NestedStackNames; }; } export interface NestedStackNames { readonly nestedStackPhysicalName: string | undefined; readonly nestedChildStackNames: { [logicalId: string]: NestedStackNames; }; } export interface TemplateWithNestedStackCount { readonly deployedTemplate: Template; readonly nestedStackCount: number; } /** * Reads the currently deployed template from CloudFormation and adds a * property, `NestedTemplate`, to any nested stacks that appear in either * the deployed template or the newly synthesized template. `NestedTemplate` * is populated with contents of the nested template by mutating the * `template` property of `rootStackArtifact`. This is done for all * nested stack resources to arbitrary depths. */ export declare function loadCurrentTemplateWithNestedStacks(rootStackArtifact: cxapi.CloudFormationStackArtifact, sdk: ISDK, retrieveProcessedTemplate?: boolean): Promise<TemplateWithNestedStackNames>; export declare function flattenNestedStackNames(nestedStackNames: { [nestedStackLogicalId: string]: NestedStackNames; }): string[]; /** * Returns the currently deployed template from CloudFormation that corresponds to `stackArtifact`. */ export declare function loadCurrentTemplate(stackArtifact: cxapi.CloudFormationStackArtifact, sdk: ISDK, retrieveProcessedTemplate?: boolean): Promise<Template>;