@aws-cdk/toolkit-lib 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/api-extractor.json +8 -2
  2. package/build-info.json +2 -2
  3. package/db.json.gz +0 -0
  4. package/lib/actions/bootstrap/private/helpers.js +3 -3
  5. package/lib/actions/diff/index.d.ts +2 -2
  6. package/lib/actions/diff/index.js +1 -1
  7. package/lib/actions/diff/private/helpers.js +8 -8
  8. package/lib/actions/refactor/index.d.ts +44 -0
  9. package/lib/actions/refactor/index.js +1 -1
  10. package/lib/api/aws-auth/awscli-compatible.d.ts +6 -5
  11. package/lib/api/aws-auth/awscli-compatible.js +2 -2
  12. package/lib/api/aws-auth/credential-plugins.d.ts +2 -2
  13. package/lib/api/aws-auth/credential-plugins.js +2 -2
  14. package/lib/api/aws-auth/provider-caching.d.ts +3 -3
  15. package/lib/api/aws-auth/provider-caching.js +1 -1
  16. package/lib/api/aws-auth/sdk-logger.d.ts +8 -2
  17. package/lib/api/aws-auth/sdk-logger.js +4 -4
  18. package/lib/api/aws-auth/sdk-provider.d.ts +4 -3
  19. package/lib/api/aws-auth/sdk-provider.js +2 -2
  20. package/lib/api/aws-auth/sdk.d.ts +7 -6
  21. package/lib/api/aws-auth/sdk.js +4 -4
  22. package/lib/api/aws-auth/tracing.d.ts +2 -2
  23. package/lib/api/aws-auth/tracing.js +1 -1
  24. package/lib/api/aws-auth/types.d.ts +3 -3
  25. package/lib/api/aws-auth/types.js +1 -1
  26. package/lib/api/bootstrap/bootstrap-environment.js +2 -2
  27. package/lib/api/bootstrap/bootstrap-template.yaml +12 -1
  28. package/lib/api/cloud-assembly/environment.js +1 -1
  29. package/lib/api/cloud-assembly/index.d.ts +2 -1
  30. package/lib/api/cloud-assembly/index.js +3 -2
  31. package/lib/api/cloud-assembly/private/context-aware-source.js +3 -3
  32. package/lib/api/cloud-assembly/private/exec.js +3 -3
  33. package/lib/api/cloud-assembly/private/prepare-source.js +4 -4
  34. package/lib/api/cloud-assembly/private/source-builder.d.ts +14 -12
  35. package/lib/api/cloud-assembly/private/source-builder.js +40 -23
  36. package/lib/api/cloud-assembly/private/stack-assembly.js +7 -7
  37. package/lib/api/cloud-assembly/source-builder.d.ts +19 -0
  38. package/lib/api/cloud-assembly/source-builder.js +1 -1
  39. package/lib/api/cloud-assembly/stack-collection.js +2 -2
  40. package/lib/api/cloudformation/evaluate-cloudformation-template.d.ts +1 -1
  41. package/lib/api/cloudformation/evaluate-cloudformation-template.js +2 -2
  42. package/lib/api/cloudformation/stack-helpers.js +2 -2
  43. package/lib/api/cloudformation/template-body-parameter.js +2 -2
  44. package/lib/api/context.js +2 -2
  45. package/lib/api/deployments/asset-publishing.js +2 -2
  46. package/lib/api/deployments/assets.js +5 -6
  47. package/lib/api/deployments/cfn-api.js +3 -3
  48. package/lib/api/deployments/checks.js +2 -2
  49. package/lib/api/deployments/deploy-stack.js +2 -2
  50. package/lib/api/deployments/deployment-result.js +2 -2
  51. package/lib/api/deployments/deployments.js +3 -3
  52. package/lib/api/diff/diff-formatter.js +2 -2
  53. package/lib/api/environment/environment-access.js +2 -2
  54. package/lib/api/environment/environment-resources.js +2 -2
  55. package/lib/api/environment/placeholders.js +1 -1
  56. package/lib/api/garbage-collection/garbage-collector.js +2 -2
  57. package/lib/api/garbage-collection/progress-printer.js +2 -2
  58. package/lib/api/garbage-collection/stack-refresh.js +2 -2
  59. package/lib/api/hotswap/appsync-mapping-templates.js +2 -2
  60. package/lib/api/hotswap/common.d.ts +2 -1
  61. package/lib/api/hotswap/common.js +9 -3
  62. package/lib/api/hotswap/ecs-services.js +3 -2
  63. package/lib/api/hotswap/hotswap-deployments.js +2 -2
  64. package/lib/api/hotswap/lambda-functions.js +2 -2
  65. package/lib/api/index.d.ts +0 -1
  66. package/lib/api/index.js +1 -2
  67. package/lib/api/io/private/index.d.ts +0 -1
  68. package/lib/api/io/private/index.js +1 -2
  69. package/lib/api/io/private/level-priority.js +1 -1
  70. package/lib/api/io/private/span.js +1 -1
  71. package/lib/api/logs-monitor/logs-monitor.js +2 -2
  72. package/lib/api/notices/cached-data-source.d.ts +13 -0
  73. package/lib/api/notices/cached-data-source.js +77 -0
  74. package/lib/api/notices/filter.d.ts +59 -0
  75. package/lib/api/notices/filter.js +189 -0
  76. package/lib/api/notices/index.d.ts +1 -0
  77. package/lib/api/{private.js → notices/index.js} +2 -2
  78. package/lib/api/notices/notices.d.ts +111 -0
  79. package/lib/api/notices/notices.js +131 -0
  80. package/lib/api/notices/types.d.ts +37 -0
  81. package/lib/api/notices/types.js +3 -0
  82. package/lib/api/notices/web-data-source.d.ts +9 -0
  83. package/lib/api/notices/web-data-source.js +70 -0
  84. package/lib/api/plugin/context-provider-plugin.js +1 -1
  85. package/lib/api/plugin/plugin.d.ts +4 -6
  86. package/lib/api/plugin/plugin.js +8 -13
  87. package/lib/api/refactoring/cloudformation.d.ts +23 -0
  88. package/lib/api/refactoring/cloudformation.js +54 -1
  89. package/lib/api/refactoring/exclude.d.ts +29 -0
  90. package/lib/api/refactoring/exclude.js +94 -0
  91. package/lib/api/refactoring/execution.d.ts +7 -0
  92. package/lib/api/refactoring/execution.js +43 -0
  93. package/lib/api/refactoring/index.d.ts +6 -23
  94. package/lib/api/refactoring/index.js +89 -60
  95. package/lib/api/resource-import/importer.js +2 -2
  96. package/lib/api/rwlock.js +2 -2
  97. package/lib/api/settings.js +2 -2
  98. package/lib/api/shared-private.js +31 -6186
  99. package/lib/api/toolkit-info.js +2 -2
  100. package/lib/api/work-graph/work-graph-builder.js +3 -3
  101. package/lib/api/work-graph/work-graph.js +2 -2
  102. package/lib/context-providers/ami.js +2 -2
  103. package/lib/context-providers/cc-api-provider.js +2 -2
  104. package/lib/context-providers/hosted-zones.js +2 -2
  105. package/lib/context-providers/index.js +4 -4
  106. package/lib/context-providers/keys.js +2 -2
  107. package/lib/context-providers/load-balancers.js +2 -2
  108. package/lib/context-providers/security-groups.js +2 -2
  109. package/lib/context-providers/ssm-parameters.js +2 -2
  110. package/lib/context-providers/vpcs.js +3 -3
  111. package/lib/index.d.ts +3 -1
  112. package/lib/index.js +4 -2
  113. package/lib/index_bg.wasm +0 -0
  114. package/lib/payloads/deploy.d.ts +8 -1
  115. package/lib/payloads/deploy.js +1 -1
  116. package/lib/payloads/hotswap.d.ts +1 -0
  117. package/lib/payloads/hotswap.js +1 -1
  118. package/lib/private/activity-printer/base.js +1 -1
  119. package/lib/toolkit/non-interactive-io-host.js +5 -4
  120. package/lib/toolkit/toolkit.d.ts +2 -2
  121. package/lib/toolkit/toolkit.js +82 -37
  122. package/lib/util/directories.js +2 -2
  123. package/lib/util/index.d.ts +1 -0
  124. package/lib/util/index.js +2 -1
  125. package/lib/util/json.js +1 -1
  126. package/lib/util/net.d.ts +9 -0
  127. package/lib/util/net.js +60 -0
  128. package/lib/util/objects.js +2 -2
  129. package/lib/util/types.js +1 -1
  130. package/lib/util/version-range.js +2 -2
  131. package/package.json +31 -31
  132. package/tsdoc.json +20 -0
  133. package/lib/api/io/private/sdk-logger.d.ts +0 -3
  134. package/lib/api/io/private/sdk-logger.js +0 -124
  135. package/lib/api/notices.d.ts +0 -210
  136. package/lib/api/notices.js +0 -430
  137. package/lib/api/private.d.ts +0 -1
  138. package/lib/api/shared-private.js.map +0 -7
  139. package/lib/api/shared-public.d.ts +0 -2139
  140. package/lib/api/shared-public.js +0 -3272
  141. package/lib/api/shared-public.js.map +0 -7
  142. package/lib/private/util.d.ts +0 -1
  143. package/lib/private/util.js +0 -787
  144. package/lib/private/util.js.map +0 -7
  145. /package/lib/{api → toolkit}/toolkit-error.d.ts +0 -0
  146. /package/lib/{api → toolkit}/toolkit-error.js +0 -0
@@ -1,2139 +0,0 @@
1
- import * as cxapi from '@aws-cdk/cx-api';
2
- import { CloudFormationStackArtifact } from '@aws-cdk/cx-api';
3
- import { StackEvent } from '@aws-sdk/client-cloudformation';
4
-
5
- interface BootstrapRole {
6
- /**
7
- * The ARN of the IAM role created as part of bootrapping
8
- * e.g. lookupRoleArn
9
- */
10
- readonly arn: string;
11
- /**
12
- * External ID to use when assuming the bootstrap role
13
- *
14
- * @default - No external ID
15
- */
16
- readonly assumeRoleExternalId?: string;
17
- /**
18
- * Additional options to pass to STS when assuming the role.
19
- *
20
- * - `RoleArn` should not be used. Use the dedicated `arn` property instead.
21
- * - `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead.
22
- *
23
- * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property
24
- * @default - No additional options.
25
- */
26
- readonly assumeRoleAdditionalOptions?: {
27
- [key: string]: any;
28
- };
29
- /**
30
- * Version of bootstrap stack required to use this role
31
- *
32
- * @default - No bootstrap stack required
33
- */
34
- readonly requiresBootstrapStackVersion?: number;
35
- /**
36
- * Name of SSM parameter with bootstrap stack version
37
- *
38
- * @default - Discover SSM parameter by reading stack
39
- */
40
- readonly bootstrapStackVersionSsmParameter?: string;
41
- }
42
- interface AwsCloudFormationStackProperties {
43
- /**
44
- * A file relative to the assembly root which contains the CloudFormation template for this stack.
45
- */
46
- readonly templateFile: string;
47
- /**
48
- * Values for CloudFormation stack parameters that should be passed when the stack is deployed.
49
- *
50
- * @default - No parameters
51
- */
52
- readonly parameters?: {
53
- [id: string]: string;
54
- };
55
- /**
56
- * Values for CloudFormation stack tags that should be passed when the stack is deployed.
57
- *
58
- * @default - No tags
59
- */
60
- readonly tags?: {
61
- [id: string]: string;
62
- };
63
- /**
64
- * SNS Notification ARNs that should receive CloudFormation Stack Events.
65
- *
66
- * @default - No notification arns
67
- */
68
- readonly notificationArns?: string[];
69
- /**
70
- * The name to use for the CloudFormation stack.
71
- * @default - name derived from artifact ID
72
- */
73
- readonly stackName?: string;
74
- /**
75
- * Whether to enable termination protection for this stack.
76
- *
77
- * @default false
78
- */
79
- readonly terminationProtection?: boolean;
80
- /**
81
- * The role that needs to be assumed to deploy the stack
82
- *
83
- * @default - No role is assumed (current credentials are used)
84
- */
85
- readonly assumeRoleArn?: string;
86
- /**
87
- * External ID to use when assuming role for cloudformation deployments
88
- *
89
- * @default - No external ID
90
- */
91
- readonly assumeRoleExternalId?: string;
92
- /**
93
- * Additional options to pass to STS when assuming the role.
94
- *
95
- * - `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.
96
- * - `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead.
97
- *
98
- * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property
99
- * @default - No additional options.
100
- */
101
- readonly assumeRoleAdditionalOptions?: {
102
- [key: string]: any;
103
- };
104
- /**
105
- * The role that is passed to CloudFormation to execute the change set
106
- *
107
- * @default - No role is passed (currently assumed role/credentials are used)
108
- */
109
- readonly cloudFormationExecutionRoleArn?: string;
110
- /**
111
- * The role to use to look up values from the target AWS account
112
- *
113
- * @default - No role is assumed (current credentials are used)
114
- */
115
- readonly lookupRole?: BootstrapRole;
116
- /**
117
- * If the stack template has already been included in the asset manifest, its asset URL
118
- *
119
- * @default - Not uploaded yet, upload just before deploying
120
- */
121
- readonly stackTemplateAssetObjectUrl?: string;
122
- /**
123
- * Version of bootstrap stack required to deploy this stack
124
- *
125
- * @default - No bootstrap stack required
126
- */
127
- readonly requiresBootstrapStackVersion?: number;
128
- /**
129
- * SSM parameter where the bootstrap stack version number can be found
130
- *
131
- * Only used if `requiresBootstrapStackVersion` is set.
132
- *
133
- * - If this value is not set, the bootstrap stack name must be known at
134
- * deployment time so the stack version can be looked up from the stack
135
- * outputs.
136
- * - If this value is set, the bootstrap stack can have any name because
137
- * we won't need to look it up.
138
- *
139
- * @default - Bootstrap stack version number looked up
140
- */
141
- readonly bootstrapStackVersionSsmParameter?: string;
142
- /**
143
- * Whether this stack should be validated by the CLI after synthesis
144
- *
145
- * @default - false
146
- */
147
- readonly validateOnSynth?: boolean;
148
- }
149
- interface AssetManifestOptions {
150
- /**
151
- * Version of bootstrap stack required to deploy this stack
152
- *
153
- * @default - Version 1 (basic modern bootstrap stack)
154
- */
155
- readonly requiresBootstrapStackVersion?: number;
156
- /**
157
- * SSM parameter where the bootstrap stack version number can be found
158
- *
159
- * - If this value is not set, the bootstrap stack name must be known at
160
- * deployment time so the stack version can be looked up from the stack
161
- * outputs.
162
- * - If this value is set, the bootstrap stack can have any name because
163
- * we won't need to look it up.
164
- *
165
- * @default - Bootstrap stack version number looked up
166
- */
167
- readonly bootstrapStackVersionSsmParameter?: string;
168
- }
169
- interface AssetManifestProperties extends AssetManifestOptions {
170
- /**
171
- * Filename of the asset manifest
172
- */
173
- readonly file: string;
174
- }
175
- interface TreeArtifactProperties {
176
- /**
177
- * Filename of the tree artifact
178
- */
179
- readonly file: string;
180
- }
181
- interface NestedCloudAssemblyProperties {
182
- /**
183
- * Relative path to the nested cloud assembly
184
- */
185
- readonly directoryName: string;
186
- /**
187
- * Display name for the cloud assembly
188
- *
189
- * @default - The artifact ID
190
- */
191
- readonly displayName?: string;
192
- }
193
- type ArtifactProperties = AwsCloudFormationStackProperties | AssetManifestProperties | TreeArtifactProperties | NestedCloudAssemblyProperties;
194
- interface BaseAssetMetadataEntry {
195
- /**
196
- * Requested packaging style
197
- */
198
- readonly packaging: string;
199
- /**
200
- * Logical identifier for the asset
201
- */
202
- readonly id: string;
203
- /**
204
- * The hash of the asset source.
205
- */
206
- readonly sourceHash: string;
207
- /**
208
- * Path on disk to the asset
209
- */
210
- readonly path: string;
211
- }
212
- interface FileAssetMetadataEntry extends BaseAssetMetadataEntry {
213
- /**
214
- * Requested packaging style
215
- */
216
- readonly packaging: "zip" | "file";
217
- /**
218
- * Name of parameter where S3 bucket should be passed in
219
- */
220
- readonly s3BucketParameter: string;
221
- /**
222
- * Name of parameter where S3 key should be passed in
223
- */
224
- readonly s3KeyParameter: string;
225
- /**
226
- * The name of the parameter where the hash of the bundled asset should be passed in.
227
- */
228
- readonly artifactHashParameter: string;
229
- }
230
- interface Tag {
231
- /**
232
- * Tag key.
233
- *
234
- * (In the actual file on disk this will be cased as "Key", and the structure is
235
- * patched to match this structure upon loading:
236
- * https://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)
237
- */
238
- readonly key: string;
239
- /**
240
- * Tag value.
241
- *
242
- * (In the actual file on disk this will be cased as "Value", and the structure is
243
- * patched to match this structure upon loading:
244
- * https://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)
245
- */
246
- readonly value: string;
247
- }
248
- interface ContainerImageAssetCacheOption {
249
- /**
250
- * The type of cache to use.
251
- * Refer to https://docs.docker.com/build/cache/backends/ for full list of backends.
252
- * @default - unspecified
253
- *
254
- * @example 'registry'
255
- */
256
- readonly type: string;
257
- /**
258
- * Any parameters to pass into the docker cache backend configuration.
259
- * Refer to https://docs.docker.com/build/cache/backends/ for cache backend configuration.
260
- * @default {} No options provided
261
- *
262
- * @example
263
- * declare const branch: string;
264
- *
265
- * const params = {
266
- * ref: `12345678.dkr.ecr.us-west-2.amazonaws.com/cache:${branch}`,
267
- * mode: "max",
268
- * };
269
- */
270
- readonly params?: {
271
- [key: string]: string;
272
- };
273
- }
274
- interface ContainerImageAssetMetadataEntry extends BaseAssetMetadataEntry {
275
- /**
276
- * Type of asset
277
- */
278
- readonly packaging: "container-image";
279
- /**
280
- * ECR Repository name and repo digest (separated by "@sha256:") where this
281
- * image is stored.
282
- *
283
- * @default undefined If not specified, `repositoryName` and `imageTag` are
284
- * required because otherwise how will the stack know where to find the asset,
285
- * ha?
286
- * @deprecated specify `repositoryName` and `imageTag` instead, and then you
287
- * know where the image will go.
288
- */
289
- readonly imageNameParameter?: string;
290
- /**
291
- * ECR repository name, if omitted a default name based on the asset's ID is
292
- * used instead. Specify this property if you need to statically address the
293
- * image, e.g. from a Kubernetes Pod. Note, this is only the repository name,
294
- * without the registry and the tag parts.
295
- *
296
- * @default - this parameter is REQUIRED after 1.21.0
297
- */
298
- readonly repositoryName?: string;
299
- /**
300
- * The docker image tag to use for tagging pushed images. This field is
301
- * required if `imageParameterName` is ommited (otherwise, the app won't be
302
- * able to find the image).
303
- *
304
- * @default - this parameter is REQUIRED after 1.21.0
305
- */
306
- readonly imageTag?: string;
307
- /**
308
- * Build args to pass to the `docker build` command
309
- *
310
- * @default no build args are passed
311
- */
312
- readonly buildArgs?: {
313
- [key: string]: string;
314
- };
315
- /**
316
- * SSH agent socket or keys to pass to the `docker build` command
317
- *
318
- * @default no ssh arg is passed
319
- */
320
- readonly buildSsh?: string;
321
- /**
322
- * Build secrets to pass to the `docker build` command
323
- *
324
- * @default no build secrets are passed
325
- */
326
- readonly buildSecrets?: {
327
- [key: string]: string;
328
- };
329
- /**
330
- * Docker target to build to
331
- *
332
- * @default no build target
333
- */
334
- readonly target?: string;
335
- /**
336
- * Path to the Dockerfile (relative to the directory).
337
- *
338
- * @default - no file is passed
339
- */
340
- readonly file?: string;
341
- /**
342
- * Networking mode for the RUN commands during build.
343
- *
344
- * @default - no networking mode specified
345
- */
346
- readonly networkMode?: string;
347
- /**
348
- * Platform to build for. _Requires Docker Buildx_.
349
- *
350
- * @default - current machine platform
351
- */
352
- readonly platform?: string;
353
- /**
354
- * Outputs to pass to the `docker build` command.
355
- *
356
- * @default - no outputs are passed to the build command (default outputs are used)
357
- * @see https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs
358
- */
359
- readonly outputs?: string[];
360
- /**
361
- * Cache from options to pass to the `docker build` command.
362
- *
363
- * @default - no cache from options are passed to the build command
364
- * @see https://docs.docker.com/build/cache/backends/
365
- */
366
- readonly cacheFrom?: ContainerImageAssetCacheOption[];
367
- /**
368
- * Cache to options to pass to the `docker build` command.
369
- *
370
- * @default - no cache to options are passed to the build command
371
- * @see https://docs.docker.com/build/cache/backends/
372
- */
373
- readonly cacheTo?: ContainerImageAssetCacheOption;
374
- /**
375
- * Disable the cache and pass `--no-cache` to the `docker build` command.
376
- *
377
- * @default - cache is used
378
- */
379
- readonly cacheDisabled?: boolean;
380
- }
381
- type AssetMetadataEntry = FileAssetMetadataEntry | ContainerImageAssetMetadataEntry;
382
- type LogMessageMetadataEntry = string;
383
- type LogicalIdMetadataEntry = string;
384
- type StackTagsMetadataEntry = Tag[];
385
- type PrimitiveType = boolean | number | string;
386
- type MetadataEntryData = AssetMetadataEntry | LogMessageMetadataEntry | LogicalIdMetadataEntry | StackTagsMetadataEntry | PrimitiveType;
387
- interface MetadataEntry {
388
- /**
389
- * The type of the metadata entry.
390
- */
391
- readonly type: string;
392
- /**
393
- * The data.
394
- *
395
- * @default - no data.
396
- */
397
- readonly data?: MetadataEntryData;
398
- /**
399
- * A stack trace for when the entry was created.
400
- *
401
- * @default - no trace.
402
- */
403
- readonly trace?: string[];
404
- }
405
- declare enum ContextProvider {
406
- /**
407
- * AMI provider
408
- */
409
- AMI_PROVIDER = "ami",
410
- /**
411
- * AZ provider
412
- */
413
- AVAILABILITY_ZONE_PROVIDER = "availability-zones",
414
- /**
415
- * Route53 Hosted Zone provider
416
- */
417
- HOSTED_ZONE_PROVIDER = "hosted-zone",
418
- /**
419
- * SSM Parameter Provider
420
- */
421
- SSM_PARAMETER_PROVIDER = "ssm",
422
- /**
423
- * VPC Provider
424
- */
425
- VPC_PROVIDER = "vpc-provider",
426
- /**
427
- * VPC Endpoint Service AZ Provider
428
- */
429
- ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER = "endpoint-service-availability-zones",
430
- /**
431
- * Load balancer provider
432
- */
433
- LOAD_BALANCER_PROVIDER = "load-balancer",
434
- /**
435
- * Load balancer listener provider
436
- */
437
- LOAD_BALANCER_LISTENER_PROVIDER = "load-balancer-listener",
438
- /**
439
- * Security group provider
440
- */
441
- SECURITY_GROUP_PROVIDER = "security-group",
442
- /**
443
- * KMS Key Provider
444
- */
445
- KEY_PROVIDER = "key-provider",
446
- /**
447
- * CCAPI Provider
448
- */
449
- CC_API_PROVIDER = "cc-api-provider",
450
- /**
451
- * A plugin provider (the actual plugin name will be in the properties)
452
- */
453
- PLUGIN = "plugin"
454
- }
455
- interface ContextLookupRoleOptions {
456
- /**
457
- * Query account
458
- */
459
- readonly account: string;
460
- /**
461
- * Query region
462
- */
463
- readonly region: string;
464
- /**
465
- * The ARN of the role that should be used to look up the missing values
466
- *
467
- * @default - None
468
- */
469
- readonly lookupRoleArn?: string;
470
- /**
471
- * The ExternalId that needs to be supplied while assuming this role
472
- *
473
- * @default - No ExternalId will be supplied
474
- */
475
- readonly lookupRoleExternalId?: string;
476
- /**
477
- * Additional options to pass to STS when assuming the lookup role.
478
- *
479
- * - `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.
480
- * - `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead.
481
- *
482
- * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property
483
- * @default - No additional options.
484
- */
485
- readonly assumeRoleAdditionalOptions?: {
486
- [key: string]: any;
487
- };
488
- }
489
- interface AmiContextQuery extends ContextLookupRoleOptions {
490
- /**
491
- * Owners to DescribeImages call
492
- *
493
- * @default - All owners
494
- */
495
- readonly owners?: string[];
496
- /**
497
- * Filters to DescribeImages call
498
- */
499
- readonly filters: {
500
- [key: string]: string[];
501
- };
502
- }
503
- interface AvailabilityZonesContextQuery extends ContextLookupRoleOptions {
504
- }
505
- interface HostedZoneContextQuery extends ContextLookupRoleOptions {
506
- /**
507
- * The domain name e.g. example.com to lookup
508
- */
509
- readonly domainName: string;
510
- /**
511
- * True if the zone you want to find is a private hosted zone
512
- *
513
- * @default false
514
- */
515
- readonly privateZone?: boolean;
516
- /**
517
- * The VPC ID to that the private zone must be associated with
518
- *
519
- * If you provide VPC ID and privateZone is false, this will return no results
520
- * and raise an error.
521
- *
522
- * @default - Required if privateZone=true
523
- */
524
- readonly vpcId?: string;
525
- }
526
- interface SSMParameterContextQuery extends ContextLookupRoleOptions {
527
- /**
528
- * Parameter name to query
529
- */
530
- readonly parameterName: string;
531
- }
532
- interface VpcContextQuery extends ContextLookupRoleOptions {
533
- /**
534
- * Filters to apply to the VPC
535
- *
536
- * Filter parameters are the same as passed to DescribeVpcs.
537
- *
538
- * @see https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html
539
- */
540
- readonly filter: {
541
- [key: string]: string;
542
- };
543
- /**
544
- * Whether to populate the subnetGroups field of the `VpcContextResponse`,
545
- * which contains potentially asymmetric subnet groups.
546
- *
547
- * @default false
548
- */
549
- readonly returnAsymmetricSubnets?: boolean;
550
- /**
551
- * Optional tag for subnet group name.
552
- * If not provided, we'll look at the aws-cdk:subnet-name tag.
553
- * If the subnet does not have the specified tag,
554
- * we'll use its type as the name.
555
- *
556
- * @default 'aws-cdk:subnet-name'
557
- */
558
- readonly subnetGroupNameTag?: string;
559
- /**
560
- * Whether to populate the `vpnGatewayId` field of the `VpcContextResponse`,
561
- * which contains the VPN Gateway ID, if one exists. You can explicitly
562
- * disable this in order to avoid the lookup if you know the VPC does not have
563
- * a VPN Gatway attached.
564
- *
565
- * @default true
566
- */
567
- readonly returnVpnGateways?: boolean;
568
- }
569
- interface EndpointServiceAvailabilityZonesContextQuery extends ContextLookupRoleOptions {
570
- /**
571
- * Query service name
572
- */
573
- readonly serviceName: string;
574
- }
575
- declare enum LoadBalancerType {
576
- /**
577
- * Network load balancer
578
- */
579
- NETWORK = "network",
580
- /**
581
- * Application load balancer
582
- */
583
- APPLICATION = "application"
584
- }
585
- interface LoadBalancerFilter extends ContextLookupRoleOptions {
586
- /**
587
- * Filter load balancers by their type
588
- */
589
- readonly loadBalancerType: LoadBalancerType;
590
- /**
591
- * Find by load balancer's ARN
592
- * @default - does not search by load balancer arn
593
- */
594
- readonly loadBalancerArn?: string;
595
- /**
596
- * Match load balancer tags
597
- * @default - does not match load balancers by tags
598
- */
599
- readonly loadBalancerTags?: Tag[];
600
- }
601
- interface LoadBalancerContextQuery extends LoadBalancerFilter {
602
- }
603
- declare enum LoadBalancerListenerProtocol {
604
- /**
605
- * HTTP protocol
606
- */
607
- HTTP = "HTTP",
608
- /**
609
- * HTTPS protocol
610
- */
611
- HTTPS = "HTTPS",
612
- /**
613
- * TCP protocol
614
- */
615
- TCP = "TCP",
616
- /**
617
- * TLS protocol
618
- */
619
- TLS = "TLS",
620
- /**
621
- * UDP protocol
622
- * */
623
- UDP = "UDP",
624
- /**
625
- * TCP and UDP protocol
626
- * */
627
- TCP_UDP = "TCP_UDP"
628
- }
629
- interface LoadBalancerListenerContextQuery extends LoadBalancerFilter {
630
- /**
631
- * Find by listener's arn
632
- * @default - does not find by listener arn
633
- */
634
- readonly listenerArn?: string;
635
- /**
636
- * Filter by listener protocol
637
- * @default - does not filter by listener protocol
638
- */
639
- readonly listenerProtocol?: LoadBalancerListenerProtocol;
640
- /**
641
- * Filter listeners by listener port
642
- * @default - does not filter by a listener port
643
- */
644
- readonly listenerPort?: number;
645
- }
646
- interface SecurityGroupContextQuery extends ContextLookupRoleOptions {
647
- /**
648
- * Security group id
649
- *
650
- * @default - None
651
- */
652
- readonly securityGroupId?: string;
653
- /**
654
- * Security group name
655
- *
656
- * @default - None
657
- */
658
- readonly securityGroupName?: string;
659
- /**
660
- * VPC ID
661
- *
662
- * @default - None
663
- */
664
- readonly vpcId?: string;
665
- }
666
- interface KeyContextQuery extends ContextLookupRoleOptions {
667
- /**
668
- * Alias name used to search the Key
669
- */
670
- readonly aliasName: string;
671
- }
672
- interface CcApiContextQuery extends ContextLookupRoleOptions {
673
- /**
674
- * The CloudFormation resource type.
675
- * See https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html
676
- */
677
- readonly typeName: string;
678
- /**
679
- * Identifier of the resource to look up using `GetResource`.
680
- *
681
- * Specifying exactIdentifier will return exactly one result, or throw an error
682
- * unless `ignoreErrorOnMissingContext` is set.
683
- *
684
- * @default - Either exactIdentifier or propertyMatch should be specified.
685
- */
686
- readonly exactIdentifier?: string;
687
- /**
688
- * Returns any resources matching these properties, using `ListResources`.
689
- *
690
- * By default, specifying propertyMatch will successfully return 0 or more
691
- * results. To throw an error if the number of results is unexpected (and
692
- * prevent the query results from being committed to context), specify
693
- * `expectedMatchCount`.
694
- *
695
- * ## Notes on property completeness
696
- *
697
- * CloudControl API's `ListResources` may return fewer properties than
698
- * `GetResource` would, depending on the resource implementation.
699
- *
700
- * The resources that `propertyMatch` matches against will *only ever* be the
701
- * properties returned by the `ListResources` call.
702
- *
703
- * @default - Either exactIdentifier or propertyMatch should be specified.
704
- */
705
- readonly propertyMatch?: Record<string, unknown>;
706
- /**
707
- * This is a set of properties returned from CC API that we want to return from ContextQuery.
708
- *
709
- * If any properties listed here are absent from the target resource, an error will be thrown.
710
- *
711
- * The returned object will always include the key `Identifier` with the CC-API returned
712
- * field `Identifier`.
713
- *
714
- * ## Notes on property completeness
715
- *
716
- * CloudControl API's `ListResources` may return fewer properties than
717
- * `GetResource` would, depending on the resource implementation.
718
- *
719
- * The returned properties here are *currently* selected from the response
720
- * object that CloudControl API returns to the CDK CLI.
721
- *
722
- * However, if we find there is need to do so, we may decide to change this
723
- * behavior in the future: we might change it to perform an additional
724
- * `GetResource` call for resources matched by `propertyMatch`.
725
- */
726
- readonly propertiesToReturn: string[];
727
- /**
728
- * Expected count of results if `propertyMatch` is specified.
729
- *
730
- * If the expected result count does not match the actual count,
731
- * by default an error is produced and the result is not committed to cached
732
- * context, and the user can correct the situation and try again without
733
- * having to manually clear out the context key using `cdk context --remove`
734
- *
735
- * If the value of * `ignoreErrorOnMissingContext` is `true`, the value of
736
- * `expectedMatchCount` is `at-least-one | exactly-one` and the number
737
- * of found resources is 0, `dummyValue` is returned and committed to context
738
- * instead.
739
- *
740
- * @default 'any'
741
- */
742
- readonly expectedMatchCount?: "any" | "at-least-one" | "at-most-one" | "exactly-one";
743
- /**
744
- * The value to return if the resource was not found and `ignoreErrorOnMissingContext` is true.
745
- *
746
- * If supplied, `dummyValue` should be an array of objects.
747
- *
748
- * `dummyValue` does not have to have elements, and it may have objects with
749
- * different properties than the properties in `propertiesToReturn`, but it
750
- * will be easiest for downstream code if the `dummyValue` conforms to
751
- * the expected response shape.
752
- *
753
- * @default - No dummy value available
754
- */
755
- readonly dummyValue?: any;
756
- /**
757
- * Ignore an error and return the `dummyValue` instead if the resource was not found.
758
- *
759
- * - In case of an `exactIdentifier` lookup, return the `dummyValue` if the resource with
760
- * that identifier was not found.
761
- * - In case of a `propertyMatch` lookup, return the `dummyValue` if `expectedMatchCount`
762
- * is `at-least-one | exactly-one` and the number of resources found was 0.
763
- *
764
- * if `ignoreErrorOnMissingContext` is set, `dummyValue` should be set and be an array.
765
- *
766
- * @default false
767
- */
768
- readonly ignoreErrorOnMissingContext?: boolean;
769
- }
770
- interface PluginContextQuery {
771
- /**
772
- * The name of the plugin
773
- */
774
- readonly pluginName: string;
775
- /**
776
- * Arbitrary other arguments for the plugin.
777
- *
778
- * This index signature is not usable in non-TypeScript/JavaScript languages.
779
- *
780
- * @jsii ignore
781
- */
782
- [key: string]: any;
783
- }
784
- type ContextQueryProperties = AmiContextQuery | AvailabilityZonesContextQuery | HostedZoneContextQuery | SSMParameterContextQuery | VpcContextQuery | EndpointServiceAvailabilityZonesContextQuery | LoadBalancerContextQuery | LoadBalancerListenerContextQuery | SecurityGroupContextQuery | KeyContextQuery | CcApiContextQuery | PluginContextQuery;
785
- declare enum ArtifactType {
786
- /**
787
- * Stub required because of JSII.
788
- */
789
- NONE = "none",// required due to a jsii bug
790
- /**
791
- * The artifact is an AWS CloudFormation stack.
792
- */
793
- AWS_CLOUDFORMATION_STACK = "aws:cloudformation:stack",
794
- /**
795
- * The artifact contains the CDK application's construct tree.
796
- */
797
- CDK_TREE = "cdk:tree",
798
- /**
799
- * Manifest for all assets in the Cloud Assembly
800
- */
801
- ASSET_MANIFEST = "cdk:asset-manifest",
802
- /**
803
- * Nested Cloud Assembly
804
- */
805
- NESTED_CLOUD_ASSEMBLY = "cdk:cloud-assembly"
806
- }
807
- interface RuntimeInfo {
808
- /**
809
- * The list of libraries loaded in the application, associated with their versions.
810
- */
811
- readonly libraries: {
812
- [name: string]: string;
813
- };
814
- }
815
- interface MissingContext {
816
- /**
817
- * The missing context key.
818
- */
819
- readonly key: string;
820
- /**
821
- * The provider from which we expect this context key to be obtained.
822
- */
823
- readonly provider: ContextProvider;
824
- /**
825
- * A set of provider-specific options.
826
- */
827
- readonly props: ContextQueryProperties;
828
- }
829
- interface ArtifactManifest {
830
- /**
831
- * The type of artifact.
832
- */
833
- readonly type: ArtifactType;
834
- /**
835
- * The environment into which this artifact is deployed.
836
- *
837
- * @default - no envrionment.
838
- */
839
- readonly environment?: string;
840
- /**
841
- * Associated metadata.
842
- *
843
- * @default - no metadata.
844
- */
845
- readonly metadata?: {
846
- [path: string]: MetadataEntry[];
847
- };
848
- /**
849
- * IDs of artifacts that must be deployed before this artifact.
850
- *
851
- * @default - no dependencies.
852
- */
853
- readonly dependencies?: string[];
854
- /**
855
- * The set of properties for this artifact (depends on type)
856
- *
857
- * @default - no properties.
858
- */
859
- readonly properties?: ArtifactProperties;
860
- /**
861
- * A string that can be shown to a user to uniquely identify this artifact inside a cloud assembly tree
862
- *
863
- * Is used by the CLI to present a list of stacks to the user in a way that
864
- * makes sense to them. Even though the property name "display name" doesn't
865
- * imply it, this field is used to select stacks as well, so all stacks should
866
- * have a unique display name.
867
- *
868
- * @default - no display name
869
- */
870
- readonly displayName?: string;
871
- }
872
- interface AssemblyManifest {
873
- /**
874
- * Protocol version
875
- */
876
- readonly version: string;
877
- /**
878
- * Required CLI version, if available
879
- *
880
- * If the manifest producer knows, it can put the minimum version of the CLI
881
- * here that supports reading this assembly.
882
- *
883
- * If set, it can be used to show a more informative error message to users.
884
- *
885
- * @default - Minimum CLI version unknown
886
- */
887
- readonly minimumCliVersion?: string;
888
- /**
889
- * The set of artifacts in this assembly.
890
- *
891
- * @default - no artifacts.
892
- */
893
- readonly artifacts?: {
894
- [id: string]: ArtifactManifest;
895
- };
896
- /**
897
- * Missing context information. If this field has values, it means that the
898
- * cloud assembly is not complete and should not be deployed.
899
- *
900
- * @default - no missing context.
901
- */
902
- readonly missing?: MissingContext[];
903
- /**
904
- * Runtime information.
905
- *
906
- * @default - no info.
907
- */
908
- readonly runtime?: RuntimeInfo;
909
- }
910
- interface ICloudAssembly {
911
- /**
912
- * The directory of the cloud assembly.
913
- *
914
- * This directory will be used to read the Cloud Assembly from.
915
- * Its contents (in particular `manifest.json`) must comply with the schema defined in this package.
916
- */
917
- readonly directory: string;
918
- }
919
- interface LoadManifestOptions {
920
- /**
921
- * Skip the version check
922
- *
923
- * This means you may read a newer cloud assembly than the CX API is designed
924
- * to support, and your application may not be aware of all features that in use
925
- * in the Cloud Assembly.
926
- *
927
- * @default false
928
- */
929
- readonly skipVersionCheck?: boolean;
930
- /**
931
- * Skip enum checks
932
- *
933
- * This means you may read enum values you don't know about yet. Make sure to always
934
- * check the values of enums you encounter in the manifest.
935
- *
936
- * @default false
937
- */
938
- readonly skipEnumCheck?: boolean;
939
- /**
940
- * Topologically sort all artifacts
941
- *
942
- * This parameter is only respected by the constructor of `CloudAssembly`. The
943
- * property lives here for backwards compatibility reasons.
944
- *
945
- * @default true
946
- */
947
- readonly topoSort?: boolean;
948
- }
949
- /**
950
- * Represents a general toolkit error in the AWS CDK Toolkit.
951
- */
952
- export declare class ToolkitError extends Error {
953
- /**
954
- * Determines if a given error is an instance of ToolkitError.
955
- */
956
- static isToolkitError(x: any): x is ToolkitError;
957
- /**
958
- * Determines if a given error is an instance of AuthenticationError.
959
- */
960
- static isAuthenticationError(x: any): x is AuthenticationError;
961
- /**
962
- * Determines if a given error is an instance of AssemblyError.
963
- */
964
- static isAssemblyError(x: any): x is AssemblyError;
965
- /**
966
- * Determines if a given error is an instance of AssemblyError.
967
- */
968
- static isContextProviderError(x: any): x is ContextProviderError;
969
- /**
970
- * An AssemblyError with an original error as cause
971
- */
972
- static withCause(message: string, error: unknown): ToolkitError;
973
- /**
974
- * The type of the error, defaults to "toolkit".
975
- */
976
- readonly type: string;
977
- /**
978
- * Denotes the source of the error as the toolkit.
979
- */
980
- readonly source: "toolkit" | "user";
981
- /**
982
- * The specific original cause of the error, if available
983
- */
984
- readonly cause?: unknown;
985
- constructor(message: string, type?: string, cause?: unknown);
986
- }
987
- /**
988
- * Represents an authentication-specific error in the AWS CDK Toolkit.
989
- */
990
- export declare class AuthenticationError extends ToolkitError {
991
- /**
992
- * Denotes the source of the error as user.
993
- */
994
- readonly source = "user";
995
- constructor(message: string);
996
- }
997
- /**
998
- * Represents an error causes by cloud assembly synthesis
999
- *
1000
- * This includes errors thrown during app execution, as well as failing annotations.
1001
- */
1002
- export declare class AssemblyError extends ToolkitError {
1003
- /**
1004
- * An AssemblyError with an original error as cause
1005
- */
1006
- static withCause(message: string, error: unknown): AssemblyError;
1007
- /**
1008
- * An AssemblyError with a list of stacks as cause
1009
- */
1010
- static withStacks(message: string, stacks?: cxapi.CloudFormationStackArtifact[]): AssemblyError;
1011
- /**
1012
- * Denotes the source of the error as user.
1013
- */
1014
- readonly source = "user";
1015
- /**
1016
- * The stacks that caused the error, if available
1017
- *
1018
- * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.
1019
- * Absence indicates synthesis didn't fully complete.
1020
- */
1021
- readonly stacks?: cxapi.CloudFormationStackArtifact[];
1022
- private constructor();
1023
- }
1024
- /**
1025
- * Represents an error originating from a Context Provider
1026
- */
1027
- export declare class ContextProviderError extends ToolkitError {
1028
- /**
1029
- * Denotes the source of the error as user.
1030
- */
1031
- readonly source = "user";
1032
- constructor(message: string);
1033
- }
1034
- /**
1035
- * Which stacks should be selected from a cloud assembly
1036
- */
1037
- export declare enum StackSelectionStrategy {
1038
- /**
1039
- * Returns all stacks in the app regardless of patterns,
1040
- * including stacks inside nested assemblies.
1041
- */
1042
- ALL_STACKS = "all-stacks",
1043
- /**
1044
- * Returns all stacks in the main (top level) assembly only.
1045
- */
1046
- MAIN_ASSEMBLY = "main-assembly",
1047
- /**
1048
- * If the assembly includes a single stack, returns it.
1049
- * Otherwise throws an exception.
1050
- */
1051
- ONLY_SINGLE = "only-single",
1052
- /**
1053
- * Return stacks matched by patterns.
1054
- * If no stacks are found, execution is halted successfully.
1055
- * Most likely you don't want to use this but `StackSelectionStrategy.MUST_MATCH_PATTERN`
1056
- */
1057
- PATTERN_MATCH = "pattern-match",
1058
- /**
1059
- * Return stacks matched by patterns.
1060
- * Throws an exception if the patterns don't match at least one stack in the assembly.
1061
- */
1062
- PATTERN_MUST_MATCH = "pattern-must-match",
1063
- /**
1064
- * Returns if exactly one stack is matched by the pattern(s).
1065
- * Throws an exception if no stack, or more than exactly one stack are matched.
1066
- */
1067
- PATTERN_MUST_MATCH_SINGLE = "pattern-must-match-single"
1068
- }
1069
- /**
1070
- * When selecting stacks, what other stacks to include because of dependencies
1071
- */
1072
- export declare enum ExpandStackSelection {
1073
- /**
1074
- * Don't select any extra stacks
1075
- */
1076
- NONE = "none",
1077
- /**
1078
- * Include stacks that this stack depends on
1079
- */
1080
- UPSTREAM = "upstream",
1081
- /**
1082
- * Include stacks that depend on this stack
1083
- */
1084
- DOWNSTREAM = "downstream"
1085
- }
1086
- /**
1087
- * A specification of which stacks should be selected
1088
- */
1089
- export interface StackSelector {
1090
- /**
1091
- * The behavior if if no selectors are provided.
1092
- */
1093
- strategy: StackSelectionStrategy;
1094
- /**
1095
- * A list of patterns to match the stack hierarchical ids
1096
- * Only used with `PATTERN_*` selection strategies.
1097
- */
1098
- patterns?: string[];
1099
- /**
1100
- * Expand the selection to upstream/downstream stacks.
1101
- * @default ExpandStackSelection.None only select the specified/matched stacks
1102
- */
1103
- expand?: ExpandStackSelection;
1104
- /**
1105
- * By default, we throw an exception if the assembly contains no stacks.
1106
- * Set to `false`, to halt execution for empty assemblies without error.
1107
- *
1108
- * Note that actions can still throw if a stack selection result is empty,
1109
- * but the assembly contains stacks in principle.
1110
- *
1111
- * @default true
1112
- */
1113
- failOnEmpty?: boolean;
1114
- }
1115
- /**
1116
- * Metadata entry for a resource within a CloudFormation stack
1117
- */
1118
- export interface ResourceMetadata {
1119
- /**
1120
- * The resource's metadata as declared in the cloud assembly
1121
- */
1122
- readonly entry: MetadataEntry;
1123
- /**
1124
- * The construct path of the resource
1125
- */
1126
- readonly constructPath: string;
1127
- }
1128
- /**
1129
- * The current action being performed by the CLI. 'none' represents the absence of an action.
1130
- */
1131
- export type ToolkitAction = "assembly" | "bootstrap" | "synth" | "list" | "diff" | "deploy" | "rollback" | "watch" | "destroy" | "doctor" | "gc" | "import" | "metadata" | "init" | "migrate" | "refactor";
1132
- /**
1133
- * The reporting level of the message.
1134
- * All messages are always reported, it's up to the IoHost to decide what to log.
1135
- */
1136
- export type IoMessageLevel = "error" | "result" | "warn" | "info" | "debug" | "trace";
1137
- /**
1138
- * A valid message code.
1139
- */
1140
- export type IoMessageCode = `CDK_${string}_${"E" | "W" | "I"}${number}${number}${number}${number}`;
1141
- /**
1142
- * An IO message emitted.
1143
- */
1144
- export interface IoMessage<T> {
1145
- /**
1146
- * The time the message was emitted.
1147
- */
1148
- readonly time: Date;
1149
- /**
1150
- * The recommended log level of the message.
1151
- *
1152
- * This is an indicative level and should not be used to explicitly match messages, instead match the `code`.
1153
- * The level of a message may change without notice.
1154
- */
1155
- readonly level: IoMessageLevel;
1156
- /**
1157
- * The action that triggered the message.
1158
- */
1159
- readonly action: ToolkitAction;
1160
- /**
1161
- * A short message code uniquely identifying a message type using the format CDK_[CATEGORY]_[E/W/I][0000-9999].
1162
- *
1163
- * The level indicator follows these rules:
1164
- * - 'E' for error level messages
1165
- * - 'W' for warning level messages
1166
- * - 'I' for info/debug/trace level messages
1167
- *
1168
- * Codes ending in 000 0 are generic messages, while codes ending in 0001-9999 are specific to a particular message.
1169
- * The following are examples of valid and invalid message codes:
1170
- * ```ts
1171
- * 'CDK_ASSETS_I0000' // valid: generic assets info message
1172
- * 'CDK_TOOLKIT_E0002' // valid: specific toolkit error message
1173
- * 'CDK_SDK_W0023' // valid: specific sdk warning message
1174
- * ```
1175
- *
1176
- * @see https://github.com/aws/aws-cdk-cli/blob/main/packages/%40aws-cdk/toolkit-lib/CODE_REGISTRY.md
1177
- */
1178
- readonly code: IoMessageCode;
1179
- /**
1180
- * The message text.
1181
- * This is safe to print to an end-user.
1182
- */
1183
- readonly message: string;
1184
- /**
1185
- * Identifies the message span, this message belongs to.
1186
- *
1187
- * A message span, groups multiple messages together that semantically related to the same operation.
1188
- * This is an otherwise meaningless identifier.
1189
- *
1190
- * A message without a `spanId`, does not belong to a span.
1191
- */
1192
- readonly span?: string;
1193
- /**
1194
- * The data attached to the message.
1195
- */
1196
- readonly data: T;
1197
- }
1198
- /**
1199
- * An IO request emitted.
1200
- */
1201
- export interface IoRequest<T, U> extends IoMessage<T> {
1202
- /**
1203
- * The default response that will be used if no data is returned.
1204
- */
1205
- readonly defaultResponse: U;
1206
- }
1207
- export interface IIoHost {
1208
- /**
1209
- * Notifies the host of a message.
1210
- * The caller waits until the notification completes.
1211
- */
1212
- notify(msg: IoMessage<unknown>): Promise<void>;
1213
- /**
1214
- * Notifies the host of a message that requires a response.
1215
- *
1216
- * If the host does not return a response the suggested
1217
- * default response from the input message will be used.
1218
- */
1219
- requestResponse<T, U>(msg: IoRequest<T, U>): Promise<U>;
1220
- }
1221
- type ForReading = 0;
1222
- type ForWriting = 1;
1223
- interface CredentialProviderSource {
1224
- name: string;
1225
- /**
1226
- * Whether the credential provider is even online
1227
- *
1228
- * Guaranteed to be called before any of the other functions are called.
1229
- */
1230
- isAvailable(): Promise<boolean>;
1231
- /**
1232
- * Whether the credential provider can provide credentials for the given account.
1233
- */
1234
- canProvideCredentials(accountId: string): Promise<boolean>;
1235
- /**
1236
- * Construct a credential provider for the given account and the given access mode
1237
- *
1238
- * Guaranteed to be called only if canProvideCredentials() returned true at some point.
1239
- *
1240
- * While it is possible for the plugin to return a static set of credentials, it is
1241
- * recommended to return a provider.
1242
- */
1243
- getProvider(accountId: string, mode: ForReading | ForWriting, options?: PluginProviderOptions): Promise<PluginProviderResult>;
1244
- }
1245
- interface IPluginHost {
1246
- /**
1247
- * Registers a credential provider source. If, in the authentication process,
1248
- * the CLI decides to try credentials from the plugins, it will go through the
1249
- * sources registered in this way, in the same order as they were registered.
1250
- */
1251
- registerCredentialProviderSource(source: CredentialProviderSource): void;
1252
- }
1253
- interface PluginProviderOptions {
1254
- /**
1255
- * Whether or not this implementation of the CLI will recognize the `SDKv3CompatibleCredentialProvider` return variant
1256
- *
1257
- * Unless otherwise indicated, the CLI version will only support SDKv3
1258
- * credentials, not SDKv3 providers. You should avoid returning types that the
1259
- * consuming CLI will not understand, because it will most likely crash.
1260
- *
1261
- * @default false
1262
- */
1263
- readonly supportsV3Providers?: boolean;
1264
- }
1265
- type PluginProviderResult = SDKv2CompatibleCredentials | SDKv3CompatibleCredentialProvider | SDKv3CompatibleCredentials;
1266
- interface SDKv2CompatibleCredentials {
1267
- /**
1268
- * AWS access key ID.
1269
- */
1270
- accessKeyId: string;
1271
- /**
1272
- * Time when credentials should be considered expired.
1273
- * Used in conjunction with expired.
1274
- */
1275
- expireTime?: Date | null;
1276
- /**
1277
- * AWS secret access key.
1278
- */
1279
- secretAccessKey: string;
1280
- /**
1281
- * AWS session token.
1282
- */
1283
- sessionToken?: string;
1284
- /**
1285
- * Gets the existing credentials, refreshing them if necessary, and returns
1286
- * a promise that will be fulfilled immediately (if no refresh is necessary)
1287
- * or when the refresh has completed.
1288
- */
1289
- getPromise(): Promise<void>;
1290
- }
1291
- type SDKv3CompatibleCredentialProvider = (identityProperties?: Record<string, any>) => Promise<SDKv3CompatibleCredentials>;
1292
- interface SDKv3CompatibleCredentials {
1293
- /**
1294
- * AWS access key ID
1295
- */
1296
- readonly accessKeyId: string;
1297
- /**
1298
- * AWS secret access key
1299
- */
1300
- readonly secretAccessKey: string;
1301
- /**
1302
- * A security or session token to use with these credentials. Usually
1303
- * present for temporary credentials.
1304
- */
1305
- readonly sessionToken?: string;
1306
- /**
1307
- * A `Date` when the identity or credential will no longer be accepted.
1308
- */
1309
- readonly expiration?: Date;
1310
- }
1311
- export interface ContextProviderPlugin {
1312
- getValue(args: {
1313
- [key: string]: any;
1314
- }): Promise<any>;
1315
- }
1316
- /**
1317
- * Class to manage a plugin collection
1318
- *
1319
- * It provides a `load()` function that loads a JavaScript
1320
- * module from disk, and gives it access to the `IPluginHost` interface
1321
- * to register itself.
1322
- */
1323
- export declare class PluginHost implements IPluginHost {
1324
- /**
1325
- * Access the currently registered CredentialProviderSources. New sources can
1326
- * be registered using the +registerCredentialProviderSource+ method.
1327
- */
1328
- readonly credentialProviderSources: CredentialProviderSource[];
1329
- readonly contextProviderPlugins: Record<string, ContextProviderPlugin>;
1330
- ioHost?: IIoHost;
1331
- private readonly alreadyLoaded;
1332
- /**
1333
- * Loads a plug-in into this PluginHost.
1334
- *
1335
- * Will use `require.resolve()` to get the most accurate representation of what
1336
- * code will get loaded in error messages. As such, it will not work in
1337
- * unit tests with Jest virtual modules becauase of <https://github.com/jestjs/jest/issues/9543>.
1338
- *
1339
- * @param moduleSpec the specification (path or name) of the plug-in module to be loaded.
1340
- * @param ioHost the I/O host to use for printing progress information
1341
- */
1342
- load(moduleSpec: string, ioHost?: IIoHost): void;
1343
- /**
1344
- * Allows plug-ins to register new CredentialProviderSources.
1345
- *
1346
- * @param source a new CredentialProviderSource to register.
1347
- */
1348
- registerCredentialProviderSource(source: CredentialProviderSource): void;
1349
- /**
1350
- * (EXPERIMENTAL) Allow plugins to register context providers
1351
- *
1352
- * Context providers are objects with the following method:
1353
- *
1354
- * ```ts
1355
- * getValue(args: {[key: string]: any}): Promise<any>;
1356
- * ```
1357
- *
1358
- * Currently, they cannot reuse the CDK's authentication mechanisms, so they
1359
- * must be prepared to either not make AWS calls or use their own source of
1360
- * AWS credentials.
1361
- *
1362
- * This feature is experimental, and only intended to be used internally at Amazon
1363
- * as a trial.
1364
- *
1365
- * After registering with 'my-plugin-name', the provider must be addressed as follows:
1366
- *
1367
- * ```ts
1368
- * const value = ContextProvider.getValue(this, {
1369
- * providerName: 'plugin',
1370
- * props: {
1371
- * pluginName: 'my-plugin-name',
1372
- * myParameter1: 'xyz',
1373
- * },
1374
- * includeEnvironment: true | false,
1375
- * dummyValue: 'what-to-return-on-the-first-pass',
1376
- * })
1377
- * ```
1378
- *
1379
- * @experimental
1380
- */
1381
- registerContextProviderAlpha(pluginProviderName: string, provider: ContextProviderPlugin): void;
1382
- }
1383
- export interface BootstrapEnvironmentProgress {
1384
- /**
1385
- * The total number of environments being deployed
1386
- */
1387
- readonly total: number;
1388
- /**
1389
- * The count of the environment currently bootstrapped
1390
- *
1391
- * This is counting value, not an identifier.
1392
- */
1393
- readonly current: number;
1394
- /**
1395
- * The environment that's currently being bootstrapped
1396
- */
1397
- readonly environment: cxapi.Environment;
1398
- }
1399
- interface IManifestEntry {
1400
- /**
1401
- * The identifier of the asset and its destination
1402
- */
1403
- readonly id: DestinationIdentifier;
1404
- /**
1405
- * The type of asset
1406
- */
1407
- readonly type: string;
1408
- /**
1409
- * Type-dependent source data
1410
- */
1411
- readonly genericSource: unknown;
1412
- /**
1413
- * Type-dependent destination data
1414
- */
1415
- readonly genericDestination: unknown;
1416
- /**
1417
- * Return a display name for this asset
1418
- *
1419
- * The `includeDestination` parameter controls whether or not to include the
1420
- * destination ID in the display name.
1421
- *
1422
- * - Pass `false` if you are displaying notifications about building the
1423
- * asset, or if you are describing the work of building the asset and publishing
1424
- * to all destinations at the same time.
1425
- * - Pass `true` if you are displaying notifications about publishing to a
1426
- * specific destination.
1427
- */
1428
- displayName(includeDestination: boolean): string;
1429
- }
1430
- declare class DestinationIdentifier {
1431
- /**
1432
- * Identifies the asset, by source.
1433
- *
1434
- * The assetId will be the same between assets that represent
1435
- * the same physical file or image.
1436
- */
1437
- readonly assetId: string;
1438
- /**
1439
- * Identifies the destination where this asset will be published
1440
- */
1441
- readonly destinationId: string;
1442
- constructor(assetId: string, destinationId: string);
1443
- /**
1444
- * Return a string representation for this asset identifier
1445
- */
1446
- toString(): string;
1447
- }
1448
- /**
1449
- * Assembly data returned in the payload of an IO Message.
1450
- */
1451
- export interface AssemblyData {
1452
- /**
1453
- * The path to the assembly directory
1454
- */
1455
- readonly assemblyDirectory: string;
1456
- /**
1457
- * The number of stacks actioned on
1458
- */
1459
- readonly stacksCount: number;
1460
- /**
1461
- * The stack IDs
1462
- */
1463
- readonly stackIds: string[];
1464
- }
1465
- /**
1466
- * Stack data returned in the payload of an IO Message.
1467
- */
1468
- export interface StackData {
1469
- /**
1470
- * The stack name
1471
- */
1472
- readonly stackName: string;
1473
- /**
1474
- * The stack ID
1475
- */
1476
- readonly hierarchicalId: string;
1477
- /**
1478
- * The stack template
1479
- */
1480
- readonly template: any;
1481
- /**
1482
- * The stack template converted to JSON format
1483
- */
1484
- readonly stringifiedJson: string;
1485
- /**
1486
- * The stack template converted to YAML format
1487
- */
1488
- readonly stringifiedYaml: string;
1489
- }
1490
- /**
1491
- * Stack data returned in the payload of an IO Message.
1492
- */
1493
- export interface StackAndAssemblyData extends AssemblyData {
1494
- /**
1495
- * Stack Data
1496
- */
1497
- readonly stack: StackData;
1498
- }
1499
- /**
1500
- * Duration information returned in the payload of an IO Message.
1501
- */
1502
- export interface Duration {
1503
- /**
1504
- * The duration of the action.
1505
- */
1506
- readonly duration: number;
1507
- }
1508
- /**
1509
- * Generic payload of error IoMessages that pass on an instance of `Error`
1510
- */
1511
- export interface ErrorPayload {
1512
- /**
1513
- * The error that occurred
1514
- */
1515
- readonly error: Error;
1516
- }
1517
- /**
1518
- * Generic payload of a simple yes/no question.
1519
- *
1520
- * The expectation is that 'yes' means moving on,
1521
- * and 'no' means aborting the current action.
1522
- */
1523
- export interface ConfirmationRequest {
1524
- /**
1525
- * Some additional motivation for the confirmation that may be used as context for the user.
1526
- */
1527
- readonly motivation: string;
1528
- /**
1529
- * Number of on-going concurrent operations
1530
- * If more than one operations is on-going, a client might decide that asking the user
1531
- * for input is too complex, as the confirmation might not easily be attributed to a specific request.
1532
- *
1533
- * @default - no concurrency
1534
- */
1535
- readonly concurrency?: number;
1536
- }
1537
- export interface ContextProviderMessageSource {
1538
- /**
1539
- * The name of the context provider sending the message
1540
- */
1541
- readonly provider: string;
1542
- }
1543
- /**
1544
- * Different types of permission related changes in a diff
1545
- */
1546
- export declare enum PermissionChangeType {
1547
- /**
1548
- * No permission changes
1549
- */
1550
- NONE = "none",
1551
- /**
1552
- * Permissions are broadening
1553
- */
1554
- BROADENING = "broadening",
1555
- /**
1556
- * Permissions are changed but not broadening
1557
- */
1558
- NON_BROADENING = "non-broadening"
1559
- }
1560
- /**
1561
- * Output of the diff command
1562
- */
1563
- export interface DiffResult extends Duration {
1564
- /**
1565
- * Stack diff formatted as a string
1566
- */
1567
- readonly formattedStackDiff: string;
1568
- /**
1569
- * Security diff formatted as a string
1570
- */
1571
- readonly formattedSecurityDiff: string;
1572
- }
1573
- export type DeployStackResult = SuccessfulDeployStackResult | NeedRollbackFirstDeployStackResult | ReplacementRequiresRollbackStackResult;
1574
- /** Successfully deployed a stack */
1575
- export interface SuccessfulDeployStackResult {
1576
- readonly type: "did-deploy-stack";
1577
- readonly noOp: boolean;
1578
- readonly outputs: {
1579
- [name: string]: string;
1580
- };
1581
- readonly stackArn: string;
1582
- }
1583
- /** The stack is currently in a failpaused state, and needs to be rolled back before the deployment */
1584
- export interface NeedRollbackFirstDeployStackResult {
1585
- readonly type: "failpaused-need-rollback-first";
1586
- readonly reason: "not-norollback" | "replacement";
1587
- readonly status: string;
1588
- }
1589
- /** The upcoming change has a replacement, which requires deploying with --rollback */
1590
- export interface ReplacementRequiresRollbackStackResult {
1591
- readonly type: "replacement-requires-rollback";
1592
- }
1593
- export interface StackDeployProgress {
1594
- /**
1595
- * The total number of stacks being deployed
1596
- */
1597
- readonly total: number;
1598
- /**
1599
- * The count of the stack currently attempted to be deployed
1600
- *
1601
- * This is counting value, not an identifier.
1602
- */
1603
- readonly current: number;
1604
- /**
1605
- * The stack that's currently being deployed
1606
- */
1607
- readonly stack: CloudFormationStackArtifact;
1608
- }
1609
- /**
1610
- * Payload for a yes/no confirmation in deploy. Includes information on
1611
- * what kind of change is being made.
1612
- */
1613
- export interface DeployConfirmationRequest extends ConfirmationRequest {
1614
- /**
1615
- * The type of change being made to the IAM permissions.
1616
- */
1617
- readonly permissionChangeType: PermissionChangeType;
1618
- }
1619
- export interface BuildAsset {
1620
- /**
1621
- * The asset that is build
1622
- */
1623
- readonly asset: IManifestEntry;
1624
- }
1625
- export interface PublishAsset {
1626
- /**
1627
- * The asset that is published
1628
- */
1629
- readonly asset: IManifestEntry;
1630
- }
1631
- export interface StackDestroy {
1632
- /**
1633
- * The stacks that will be destroyed
1634
- */
1635
- readonly stacks: CloudFormationStackArtifact[];
1636
- }
1637
- export interface StackDestroyProgress {
1638
- /**
1639
- * The total number of stacks being destroyed
1640
- */
1641
- readonly total: number;
1642
- /**
1643
- * The count of the stack currently attempted to be destroyed
1644
- *
1645
- * This is counting value, not an identifier.
1646
- */
1647
- readonly current: number;
1648
- /**
1649
- * The stack that's currently being destroyed
1650
- */
1651
- readonly stack: CloudFormationStackArtifact;
1652
- }
1653
- /**
1654
- * The dependencies of a stack.
1655
- */
1656
- export interface StackDependency {
1657
- id: string;
1658
- dependencies: StackDependency[];
1659
- }
1660
- /**
1661
- * Details of a stack.
1662
- */
1663
- export interface StackDetails {
1664
- id: string;
1665
- name: string;
1666
- environment: cxapi.Environment;
1667
- dependencies: StackDependency[];
1668
- }
1669
- export interface StackDetailsPayload {
1670
- readonly stacks: StackDetails[];
1671
- }
1672
- /**
1673
- * An SDK logging trace.
1674
- *
1675
- * Only info, warn and error level messages are emitted.
1676
- * SDK traces are emitted as traces to the IoHost, but contain the original SDK logging level.
1677
- */
1678
- export interface SdkTrace {
1679
- /**
1680
- * The level the SDK has emitted the original message with
1681
- */
1682
- readonly sdkLevel: "info" | "warn" | "error";
1683
- /**
1684
- * The content of the SDK trace
1685
- *
1686
- * This will include the request and response data for API calls, including potentially sensitive information.
1687
- *
1688
- * @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/logging-sdk-calls.html
1689
- */
1690
- readonly content: any;
1691
- }
1692
- interface MissingContext$1 {
1693
- missingKeys: string[];
1694
- }
1695
- export interface UpdatedContext {
1696
- contextFile: string;
1697
- context: {
1698
- [key: string]: any;
1699
- };
1700
- }
1701
- export interface StackRollbackProgress {
1702
- /**
1703
- * The total number of stacks being rolled back
1704
- */
1705
- readonly total: number;
1706
- /**
1707
- * The count of the stack currently attempted to be rolled back
1708
- *
1709
- * This is counting value, not an identifier.
1710
- */
1711
- readonly current: number;
1712
- /**
1713
- * The stack that's currently being rolled back
1714
- */
1715
- readonly stack: CloudFormationStackArtifact;
1716
- }
1717
- export interface StackProgress {
1718
- /**
1719
- * The total number of progress monitored resources.
1720
- */
1721
- readonly total?: number;
1722
- /**
1723
- * The number of completed resources.
1724
- */
1725
- readonly completed: number;
1726
- /**
1727
- * The current progress as a [34/42] string, or just [34] if the total is unknown.
1728
- */
1729
- readonly formatted: string;
1730
- }
1731
- /**
1732
- * Payload when stack monitoring is starting or stopping for a given stack deployment.
1733
- */
1734
- export interface StackMonitoringControlEvent {
1735
- /**
1736
- * A unique identifier for a specific stack deployment.
1737
- *
1738
- * Use this value to attribute stack activities received for concurrent deployments.
1739
- */
1740
- readonly deployment: string;
1741
- /**
1742
- * The stack artifact that is getting deployed
1743
- */
1744
- readonly stack: CloudFormationStackArtifact;
1745
- /**
1746
- * The name of the Stack that is getting deployed
1747
- */
1748
- readonly stackName: string;
1749
- /**
1750
- * Total number of resources taking part in this deployment
1751
- *
1752
- * The number might not always be known or accurate.
1753
- * Only use for informational purposes and handle the case when it's unavailable.
1754
- */
1755
- readonly resourcesTotal?: number;
1756
- }
1757
- export interface StackActivity {
1758
- /**
1759
- * A unique identifier for a specific stack deployment.
1760
- *
1761
- * Use this value to attribute stack activities received for concurrent deployments.
1762
- */
1763
- readonly deployment: string;
1764
- /**
1765
- * The Stack Event as received from CloudFormation
1766
- */
1767
- readonly event: StackEvent;
1768
- /**
1769
- * Additional resource metadata
1770
- *
1771
- * This information is only available if the information is available in the current cloud assembly.
1772
- * I.e. no `metadata` will not be available for resource deletion events.
1773
- */
1774
- readonly metadata?: ResourceMetadata;
1775
- /**
1776
- * The stack progress
1777
- */
1778
- readonly progress: StackProgress;
1779
- }
1780
- export interface StackSelectionDetails {
1781
- /**
1782
- * The selected stacks, if any
1783
- */
1784
- readonly stacks: StackSelector;
1785
- }
1786
- interface IDifference<ValueType> {
1787
- readonly oldValue: ValueType | undefined;
1788
- readonly newValue: ValueType | undefined;
1789
- readonly isDifferent: boolean;
1790
- readonly isAddition: boolean;
1791
- readonly isRemoval: boolean;
1792
- readonly isUpdate: boolean;
1793
- }
1794
- declare class Difference<ValueType> implements IDifference<ValueType> {
1795
- readonly oldValue: ValueType | undefined;
1796
- readonly newValue: ValueType | undefined;
1797
- /**
1798
- * Whether this is an actual different or the values are actually the same
1799
- *
1800
- * isDifferent => (isUpdate | isRemoved | isUpdate)
1801
- */
1802
- isDifferent: boolean;
1803
- /**
1804
- * @param oldValue the old value, cannot be equal (to the sense of +deepEqual+) to +newValue+.
1805
- * @param newValue the new value, cannot be equal (to the sense of +deepEqual+) to +oldValue+.
1806
- */
1807
- constructor(oldValue: ValueType | undefined, newValue: ValueType | undefined);
1808
- /** @returns +true+ if the element is new to the template. */
1809
- get isAddition(): boolean;
1810
- /** @returns +true+ if the element was removed from the template. */
1811
- get isRemoval(): boolean;
1812
- /** @returns +true+ if the element was already in the template and is updated. */
1813
- get isUpdate(): boolean;
1814
- }
1815
- declare class PropertyDifference<ValueType> extends Difference<ValueType> {
1816
- changeImpact?: ResourceImpact;
1817
- constructor(oldValue: ValueType | undefined, newValue: ValueType | undefined, args: {
1818
- changeImpact?: ResourceImpact;
1819
- });
1820
- }
1821
- declare enum ResourceImpact {
1822
- /** The existing physical resource will be updated */
1823
- WILL_UPDATE = "WILL_UPDATE",
1824
- /** A new physical resource will be created */
1825
- WILL_CREATE = "WILL_CREATE",
1826
- /** The existing physical resource will be replaced */
1827
- WILL_REPLACE = "WILL_REPLACE",
1828
- /** The existing physical resource may be replaced */
1829
- MAY_REPLACE = "MAY_REPLACE",
1830
- /** The existing physical resource will be destroyed */
1831
- WILL_DESTROY = "WILL_DESTROY",
1832
- /** The existing physical resource will be removed from CloudFormation supervision */
1833
- WILL_ORPHAN = "WILL_ORPHAN",
1834
- /** The existing physical resource will be added to CloudFormation supervision */
1835
- WILL_IMPORT = "WILL_IMPORT",
1836
- /** There is no change in this resource */
1837
- NO_CHANGE = "NO_CHANGE"
1838
- }
1839
- interface Resource {
1840
- Type: string;
1841
- Properties?: {
1842
- [name: string]: any;
1843
- };
1844
- [key: string]: any;
1845
- }
1846
- interface TypedMapping {
1847
- readonly type: string;
1848
- readonly sourcePath: string;
1849
- readonly destinationPath: string;
1850
- }
1851
- /**
1852
- * Output of the refactor command
1853
- */
1854
- export interface RefactorResult {
1855
- /**
1856
- * Mappings along with the resource type
1857
- */
1858
- readonly typedMappings?: TypedMapping[];
1859
- /**
1860
- * Ambiguous path correspondences, if any
1861
- */
1862
- readonly ambiguousPaths?: [
1863
- string[],
1864
- string[]
1865
- ][];
1866
- }
1867
- /**
1868
- * The computed file watch settings
1869
- */
1870
- export interface WatchSettings {
1871
- /**
1872
- * The directory observed for file changes
1873
- */
1874
- readonly watchDir: string;
1875
- /**
1876
- * List of include patterns for watching files
1877
- */
1878
- readonly includes: string[];
1879
- /**
1880
- * List of excludes patterns for watching files
1881
- */
1882
- readonly excludes: string[];
1883
- }
1884
- export interface FileWatchEvent {
1885
- /**
1886
- * The change to the path
1887
- */
1888
- readonly event: string;
1889
- /**
1890
- * The path that has an observed event
1891
- */
1892
- readonly path?: string;
1893
- }
1894
- /**
1895
- * Payload when stack monitoring is starting or stopping for a given stack deployment.
1896
- */
1897
- export interface CloudWatchLogMonitorControlEvent {
1898
- /**
1899
- * A unique identifier for a monitor
1900
- *
1901
- * Use this value to attribute events received for concurrent log monitoring.
1902
- */
1903
- readonly monitor: string;
1904
- /**
1905
- * The names of monitored log groups
1906
- */
1907
- readonly logGroupNames: string[];
1908
- }
1909
- /**
1910
- * Represents a CloudWatch Log Event that will be
1911
- * printed to the terminal
1912
- */
1913
- export interface CloudWatchLogEvent {
1914
- /**
1915
- * The log event message
1916
- */
1917
- readonly message: string;
1918
- /**
1919
- * The name of the log group
1920
- */
1921
- readonly logGroupName: string;
1922
- /**
1923
- * The time at which the event occurred
1924
- */
1925
- readonly timestamp: Date;
1926
- }
1927
- /**
1928
- * A resource affected by a change
1929
- */
1930
- export interface AffectedResource {
1931
- /**
1932
- * The logical ID of the affected resource in the template
1933
- */
1934
- readonly logicalId: string;
1935
- /**
1936
- * The CloudFormation type of the resource
1937
- * This could be a custom type.
1938
- */
1939
- readonly resourceType: string;
1940
- /**
1941
- * The friendly description of the affected resource
1942
- */
1943
- readonly description?: string;
1944
- /**
1945
- * The physical name of the resource when deployed.
1946
- *
1947
- * A physical name is not always available, e.g. new resources will not have one until after the deployment
1948
- */
1949
- readonly physicalName?: string;
1950
- /**
1951
- * Resource metadata attached to the logical id from the cloud assembly
1952
- *
1953
- * This is only present if the resource is present in the current Cloud Assembly,
1954
- * i.e. resource deletions will not have metadata.
1955
- */
1956
- readonly metadata?: ResourceMetadata;
1957
- }
1958
- /**
1959
- * Represents a change in a resource
1960
- */
1961
- export interface ResourceChange {
1962
- /**
1963
- * The logical ID of the resource which is being changed
1964
- */
1965
- readonly logicalId: string;
1966
- /**
1967
- * The value the resource is being updated from
1968
- */
1969
- readonly oldValue: Resource;
1970
- /**
1971
- * The value the resource is being updated to
1972
- */
1973
- readonly newValue: Resource;
1974
- /**
1975
- * The changes made to the resource properties
1976
- */
1977
- readonly propertyUpdates: Record<string, PropertyDifference<unknown>>;
1978
- /**
1979
- * Resource metadata attached to the logical id from the cloud assembly
1980
- *
1981
- * This is only present if the resource is present in the current Cloud Assembly,
1982
- * i.e. resource deletions will not have metadata.
1983
- */
1984
- readonly metadata?: ResourceMetadata;
1985
- }
1986
- /**
1987
- * A change that can be hotswapped
1988
- */
1989
- export interface HotswappableChange {
1990
- /**
1991
- * The resource change that is causing the hotswap.
1992
- */
1993
- readonly cause: ResourceChange;
1994
- /**
1995
- * A list of resources that are being hotswapped as part of the change
1996
- */
1997
- readonly resources: AffectedResource[];
1998
- }
1999
- export declare enum NonHotswappableReason {
2000
- /**
2001
- * Tags are not hotswappable
2002
- */
2003
- TAGS = "tags",
2004
- /**
2005
- * Changed resource properties are not hotswappable on this resource type
2006
- */
2007
- PROPERTIES = "properties",
2008
- /**
2009
- * A stack output has changed
2010
- */
2011
- OUTPUT = "output",
2012
- /**
2013
- * A dependant resource is not hotswappable
2014
- */
2015
- DEPENDENCY_UNSUPPORTED = "dependency-unsupported",
2016
- /**
2017
- * The resource type is not hotswappable
2018
- */
2019
- RESOURCE_UNSUPPORTED = "resource-unsupported",
2020
- /**
2021
- * The resource is created in the deployment
2022
- */
2023
- RESOURCE_CREATION = "resource-creation",
2024
- /**
2025
- * The resource is removed in the deployment
2026
- */
2027
- RESOURCE_DELETION = "resource-deletion",
2028
- /**
2029
- * The resource identified by the logical id has its type changed
2030
- */
2031
- RESOURCE_TYPE_CHANGED = "resource-type-changed",
2032
- /**
2033
- * The nested stack is created in the deployment
2034
- */
2035
- NESTED_STACK_CREATION = "nested-stack-creation"
2036
- }
2037
- export interface RejectionSubject {
2038
- /**
2039
- * The type of the rejection subject, e.g. Resource or Output
2040
- */
2041
- readonly type: string;
2042
- /**
2043
- * The logical ID of the change that is not hotswappable
2044
- */
2045
- readonly logicalId: string;
2046
- /**
2047
- * Resource metadata attached to the logical id from the cloud assembly
2048
- *
2049
- * This is only present if the resource is present in the current Cloud Assembly,
2050
- * i.e. resource deletions will not have metadata.
2051
- */
2052
- readonly metadata?: ResourceMetadata;
2053
- }
2054
- export interface ResourceSubject extends RejectionSubject {
2055
- /**
2056
- * A rejected resource
2057
- */
2058
- readonly type: "Resource";
2059
- /**
2060
- * The type of the rejected resource
2061
- */
2062
- readonly resourceType: string;
2063
- /**
2064
- * The list of properties that are cause for the rejection
2065
- */
2066
- readonly rejectedProperties?: string[];
2067
- }
2068
- export interface OutputSubject extends RejectionSubject {
2069
- /**
2070
- * A rejected output
2071
- */
2072
- readonly type: "Output";
2073
- }
2074
- /**
2075
- * A change that can not be hotswapped
2076
- */
2077
- export interface NonHotswappableChange {
2078
- /**
2079
- * The subject of the change that was rejected
2080
- */
2081
- readonly subject: ResourceSubject | OutputSubject;
2082
- /**
2083
- * Why was this change was deemed non-hotswappable
2084
- */
2085
- readonly reason: NonHotswappableReason;
2086
- /**
2087
- * Tells the user exactly why this change was deemed non-hotswappable and what its logical ID is.
2088
- * If not specified, `displayReason` default to state that the properties listed in `rejectedChanges` are not hotswappable.
2089
- */
2090
- readonly description: string;
2091
- }
2092
- export interface HotswapDeploymentAttempt {
2093
- /**
2094
- * The stack that's currently being deployed
2095
- */
2096
- readonly stack: cxapi.CloudFormationStackArtifact;
2097
- /**
2098
- * The mode the hotswap deployment was initiated with.
2099
- */
2100
- readonly mode: "hotswap-only" | "fall-back";
2101
- }
2102
- /**
2103
- * Information about a hotswap deployment
2104
- */
2105
- export interface HotswapDeploymentDetails {
2106
- /**
2107
- * The stack that's currently being deployed
2108
- */
2109
- readonly stack: cxapi.CloudFormationStackArtifact;
2110
- /**
2111
- * The mode the hotswap deployment was initiated with.
2112
- */
2113
- readonly mode: "hotswap-only" | "fall-back";
2114
- /**
2115
- * The changes that were deemed hotswappable
2116
- */
2117
- readonly hotswappableChanges: HotswappableChange[];
2118
- /**
2119
- * The changes that were deemed not hotswappable
2120
- */
2121
- readonly nonHotswappableChanges: NonHotswappableChange[];
2122
- }
2123
- /**
2124
- * The result of an attempted hotswap deployment
2125
- */
2126
- export interface HotswapResult extends Duration, HotswapDeploymentDetails {
2127
- /**
2128
- * Whether hotswapping happened or not.
2129
- *
2130
- * `false` indicates that the deployment could not be hotswapped and full deployment may be attempted as fallback.
2131
- */
2132
- readonly hotswapped: boolean;
2133
- }
2134
-
2135
- export {
2136
- MissingContext$1 as MissingContext,
2137
- };
2138
-
2139
- export {};