1 | import * as cxapi from '@aws-cdk/cx-api';
|
2 | import * as cdk_assets from 'cdk-assets';
|
3 | import { type BuildAssetsOptions, type PublishAssetsOptions } from './asset-publishing';
|
4 | import { type ResourceIdentifierSummaries, ResourcesToImport, Template } from './cloudformation';
|
5 | import { DeploymentMethod } from './deployment-method';
|
6 | import { DeployStackResult } from './deployment-result';
|
7 | import { type RootTemplateWithNestedStacks } from './nested-stack-helpers';
|
8 | import type { SdkProvider } from '../aws-auth/sdk-provider';
|
9 | import { EnvironmentAccess } from '../environment-access';
|
10 | import { HotswapMode, HotswapPropertyOverrides } from '../hotswap/common';
|
11 | import type { Tag } from '../tags';
|
12 | import { StackActivityProgress } from '../util/cloudformation/stack-activity-monitor';
|
13 | export interface DeployStackOptions {
|
14 | |
15 |
|
16 |
|
17 | readonly stack: cxapi.CloudFormationStackArtifact;
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 | readonly roleArn?: string;
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 | readonly notificationArns?: string[];
|
30 | |
31 |
|
32 |
|
33 |
|
34 |
|
35 | readonly deployName?: string;
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 | readonly quiet?: boolean;
|
42 | |
43 |
|
44 |
|
45 |
|
46 |
|
47 | readonly toolkitStackName?: string;
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 | readonly reuseAssets?: string[];
|
54 | |
55 |
|
56 |
|
57 | readonly tags?: Tag[];
|
58 | |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | readonly execute?: boolean;
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | readonly changeSetName?: string;
|
72 | |
73 |
|
74 |
|
75 |
|
76 |
|
77 | readonly deploymentMethod?: DeploymentMethod;
|
78 | |
79 |
|
80 |
|
81 |
|
82 | readonly force?: boolean;
|
83 | |
84 |
|
85 |
|
86 |
|
87 | readonly parameters?: {
|
88 | [name: string]: string | undefined;
|
89 | };
|
90 | |
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | readonly usePreviousParameters?: boolean;
|
98 | |
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 | readonly progress?: StackActivityProgress;
|
105 | |
106 |
|
107 |
|
108 |
|
109 |
|
110 | readonly ci?: boolean;
|
111 | |
112 |
|
113 |
|
114 |
|
115 |
|
116 | readonly rollback?: boolean;
|
117 | readonly hotswap?: HotswapMode;
|
118 | |
119 |
|
120 |
|
121 | readonly hotswapPropertyOverrides?: HotswapPropertyOverrides;
|
122 | |
123 |
|
124 |
|
125 |
|
126 |
|
127 | readonly extraUserAgent?: string;
|
128 | |
129 |
|
130 |
|
131 | readonly resourcesToImport?: ResourcesToImport;
|
132 | |
133 |
|
134 |
|
135 |
|
136 |
|
137 | readonly overrideTemplate?: any;
|
138 | |
139 |
|
140 |
|
141 |
|
142 |
|
143 | readonly assetParallelism?: boolean;
|
144 | |
145 |
|
146 |
|
147 |
|
148 |
|
149 | ignoreNoStacks?: boolean;
|
150 | }
|
151 | export interface RollbackStackOptions {
|
152 | |
153 |
|
154 |
|
155 | readonly stack: cxapi.CloudFormationStackArtifact;
|
156 | |
157 |
|
158 |
|
159 |
|
160 |
|
161 | readonly roleArn?: string;
|
162 | |
163 |
|
164 |
|
165 |
|
166 |
|
167 | readonly quiet?: boolean;
|
168 | |
169 |
|
170 |
|
171 |
|
172 |
|
173 | readonly ci?: boolean;
|
174 | |
175 |
|
176 |
|
177 |
|
178 |
|
179 | readonly toolkitStackName?: string;
|
180 | |
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 | readonly force?: boolean;
|
188 | |
189 |
|
190 |
|
191 |
|
192 |
|
193 | readonly orphanLogicalIds?: string[];
|
194 | |
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 | readonly progress?: StackActivityProgress;
|
201 | |
202 |
|
203 |
|
204 |
|
205 |
|
206 | readonly validateBootstrapStackVersion?: boolean;
|
207 | }
|
208 | export interface RollbackStackResult {
|
209 | readonly notInRollbackableState?: boolean;
|
210 | readonly success?: boolean;
|
211 | }
|
212 | interface AssetOptions {
|
213 | |
214 |
|
215 |
|
216 | readonly stack: cxapi.CloudFormationStackArtifact;
|
217 | |
218 |
|
219 |
|
220 |
|
221 |
|
222 | readonly roleArn?: string;
|
223 | }
|
224 | export interface BuildStackAssetsOptions extends AssetOptions {
|
225 | |
226 |
|
227 |
|
228 | readonly buildOptions?: BuildAssetsOptions;
|
229 | |
230 |
|
231 |
|
232 | readonly stackName?: string;
|
233 | }
|
234 | interface PublishStackAssetsOptions extends AssetOptions {
|
235 | |
236 |
|
237 |
|
238 | readonly publishOptions?: Omit<PublishAssetsOptions, 'buildAssets'>;
|
239 | |
240 |
|
241 |
|
242 | readonly stackName?: string;
|
243 | }
|
244 | export interface DestroyStackOptions {
|
245 | stack: cxapi.CloudFormationStackArtifact;
|
246 | deployName?: string;
|
247 | roleArn?: string;
|
248 | quiet?: boolean;
|
249 | force?: boolean;
|
250 | ci?: boolean;
|
251 | }
|
252 | export interface StackExistsOptions {
|
253 | stack: cxapi.CloudFormationStackArtifact;
|
254 | deployName?: string;
|
255 | tryLookupRole?: boolean;
|
256 | }
|
257 | export interface DeploymentsProps {
|
258 | sdkProvider: SdkProvider;
|
259 | readonly toolkitStackName?: string;
|
260 | readonly quiet?: boolean;
|
261 | }
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 | export declare class Deployments {
|
268 | private readonly props;
|
269 | readonly envs: EnvironmentAccess;
|
270 | |
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 | private readonly assetSdkProvider;
|
279 | |
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 | private readonly deployStackSdkProvider;
|
288 | private readonly publisherCache;
|
289 | private _allowCrossAccountAssetPublishing;
|
290 | constructor(props: DeploymentsProps);
|
291 | /**
|
292 | * Resolves the environment for a stack.
|
293 | */
|
294 | resolveEnvironment(stack: cxapi.CloudFormationStackArtifact): Promise<cxapi.Environment>;
|
295 | readCurrentTemplateWithNestedStacks(rootStackArtifact: cxapi.CloudFormationStackArtifact, retrieveProcessedTemplate?: boolean): Promise<RootTemplateWithNestedStacks>;
|
296 | readCurrentTemplate(stackArtifact: cxapi.CloudFormationStackArtifact): Promise<Template>;
|
297 | resourceIdentifierSummaries(stackArtifact: cxapi.CloudFormationStackArtifact): Promise<ResourceIdentifierSummaries>;
|
298 | deployStack(options: DeployStackOptions): Promise<DeployStackResult>;
|
299 | rollbackStack(options: RollbackStackOptions): Promise<RollbackStackResult>;
|
300 | destroyStack(options: DestroyStackOptions): Promise<void>;
|
301 | stackExists(options: StackExistsOptions): Promise<boolean>;
|
302 | private prepareAndValidateAssets;
|
303 | /**
|
304 | * Build all assets in a manifest
|
305 | *
|
306 | * @deprecated Use `buildSingleAsset` instead
|
307 | */
|
308 | buildAssets(asset: cxapi.AssetManifestArtifact, options: BuildStackAssetsOptions): Promise<void>;
|
309 | /**
|
310 | * Publish all assets in a manifest
|
311 | *
|
312 | * @deprecated Use `publishSingleAsset` instead
|
313 | */
|
314 | publishAssets(asset: cxapi.AssetManifestArtifact, options: PublishStackAssetsOptions): Promise<void>;
|
315 | /**
|
316 | * Build a single asset from an asset manifest
|
317 | *
|
318 | * If an assert manifest artifact is given, the bootstrap stack version
|
319 | * will be validated according to the constraints in that manifest artifact.
|
320 | * If that is not necessary, `'no-version-validation'` can be passed.
|
321 | */
|
322 | buildSingleAsset(assetArtifact: cxapi.AssetManifestArtifact | 'no-version-validation', assetManifest: cdk_assets.AssetManifest, asset: cdk_assets.IManifestEntry, options: BuildStackAssetsOptions): Promise<void>;
|
323 | /**
|
324 | * Publish a single asset from an asset manifest
|
325 | */
|
326 | publishSingleAsset(assetManifest: cdk_assets.AssetManifest, asset: cdk_assets.IManifestEntry, options: PublishStackAssetsOptions): Promise<void>;
|
327 | private allowCrossAccountAssetPublishingForEnv;
|
328 | /**
|
329 | * Return whether a single asset has been published already
|
330 | */
|
331 | isSingleAssetPublished(assetManifest: cdk_assets.AssetManifest, asset: cdk_assets.IManifestEntry, options: PublishStackAssetsOptions): Promise<boolean>;
|
332 | /**
|
333 | * Validate that the bootstrap stack has the right version for this stack
|
334 | *
|
335 | * Call into envResources.validateVersion, but prepend the stack name in case of failure.
|
336 | */
|
337 | private validateBootstrapStackVersion;
|
338 | private cachedPublisher;
|
339 | }
|
340 | export {};
|