@aws-cdk/aws-imagebuilder-alpha 2.226.0-alpha.0 → 2.227.0-alpha.0

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.
@@ -0,0 +1,833 @@
1
+ import * as cdk from 'aws-cdk-lib';
2
+ import * as iam from 'aws-cdk-lib/aws-iam';
3
+ import * as kms from 'aws-cdk-lib/aws-kms';
4
+ import * as s3 from 'aws-cdk-lib/aws-s3';
5
+ import * as s3assets from 'aws-cdk-lib/aws-s3-assets';
6
+ import { Construct } from 'constructs';
7
+ import { OSVersion, Platform } from './os-version';
8
+ /**
9
+ * An EC2 Image Builder Component.
10
+ */
11
+ export interface IComponent extends cdk.IResource {
12
+ /**
13
+ * The ARN of the component
14
+ *
15
+ * @attribute
16
+ */
17
+ readonly componentArn: string;
18
+ /**
19
+ * The name of the component
20
+ *
21
+ * @attribute
22
+ */
23
+ readonly componentName: string;
24
+ /**
25
+ * The version of the component
26
+ *
27
+ * @attribute
28
+ */
29
+ readonly componentVersion: string;
30
+ /**
31
+ * Grant custom actions to the given grantee for the component
32
+ *
33
+ * @param grantee The principal
34
+ * @param actions The list of actions
35
+ */
36
+ grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
37
+ /**
38
+ * Grant read permissions to the given grantee for the component
39
+ *
40
+ * @param grantee The principal
41
+ */
42
+ grantRead(grantee: iam.IGrantable): iam.Grant;
43
+ }
44
+ /**
45
+ * Properties for creating a Component resource
46
+ */
47
+ export interface ComponentProps {
48
+ /**
49
+ * The component document content that defines the build, validation, or test steps to be executed during the image
50
+ * building process.
51
+ */
52
+ readonly data: ComponentData;
53
+ /**
54
+ * The operating system platform of the component.
55
+ */
56
+ readonly platform: Platform;
57
+ /**
58
+ * The name of the component.
59
+ *
60
+ * @default - a name is generated
61
+ */
62
+ readonly componentName?: string;
63
+ /**
64
+ * The version of the component.
65
+ *
66
+ * @default 1.0.0
67
+ */
68
+ readonly componentVersion?: string;
69
+ /**
70
+ * The description of the component.
71
+ *
72
+ * @default None
73
+ */
74
+ readonly description?: string;
75
+ /**
76
+ * The change description of the component. Describes what change has been made in this version of the component, or
77
+ * what makes this version different from other versions.
78
+ *
79
+ * @default None
80
+ */
81
+ readonly changeDescription?: string;
82
+ /**
83
+ * The KMS key used to encrypt this component.
84
+ *
85
+ * @default - an Image Builder owned key will be used to encrypt the component.
86
+ */
87
+ readonly kmsKey?: kms.IKey;
88
+ /**
89
+ * The operating system versions supported by the component.
90
+ *
91
+ * @default None
92
+ */
93
+ readonly supportedOsVersions?: OSVersion[];
94
+ /**
95
+ * The tags to apply to the component
96
+ *
97
+ * @default None
98
+ */
99
+ readonly tags?: {
100
+ [key: string]: string;
101
+ };
102
+ }
103
+ /**
104
+ * Properties for an EC2 Image Builder component
105
+ */
106
+ export interface ComponentAttributes {
107
+ /**
108
+ * The ARN of the component
109
+ *
110
+ * @default - the ARN is automatically constructed if a componentName is provided, otherwise a componentArn is
111
+ * required
112
+ */
113
+ readonly componentArn?: string;
114
+ /**
115
+ * The name of the component
116
+ *
117
+ * @default - the name is automatically constructed if a componentArn is provided, otherwise a componentName is
118
+ * required
119
+ */
120
+ readonly componentName?: string;
121
+ /**
122
+ * The version of the component
123
+ *
124
+ * @default - the latest version of the component, x.x.x
125
+ */
126
+ readonly componentVersion?: string;
127
+ }
128
+ /**
129
+ * Properties for an EC2 Image Builder AWS-managed component
130
+ */
131
+ export interface AwsManagedComponentAttributes {
132
+ /**
133
+ * The name of the AWS-managed component
134
+ *
135
+ * The name of the AWS-managed component. This is a required attribute when using the
136
+ * `this.fromAwsManagedComponentAttributes()` method. This parameter should not be provided when
137
+ * using the pre-defined managed component methods, such as `AwsManagedComponent.updateOS()` and
138
+ * `AwsManagedComponent.reboot()`.
139
+ *
140
+ * @default - none if using the pre-defined managed component methods, otherwise a platform is required when using
141
+ * `this.fromAwsManagedComponentAttributes()`
142
+ */
143
+ readonly componentName?: string;
144
+ /**
145
+ * The version of the AWS-managed component
146
+ *
147
+ * @default - the latest version of the component, x.x.x
148
+ */
149
+ readonly componentVersion?: string;
150
+ /**
151
+ * The platform of the AWS-managed component. This is a required attribute when using the pre-defined managed
152
+ * component methods, such as `AwsManagedComponent.updateOS()` and `AwsManagedComponent.reboot()`. This parameter
153
+ * should not be provided when using the `this.fromAwsManagedComponentAttributes()` method.
154
+ *
155
+ * @default - none if using `this.fromAwsManagedComponentAttributes()`, otherwise a platform is
156
+ * required when using the pre-defined managed component methods
157
+ */
158
+ readonly platform?: Platform;
159
+ }
160
+ /**
161
+ * Properties for an EC2 Image Builder AWS Marketplace component
162
+ */
163
+ export interface AwsMarketplaceComponentAttributes {
164
+ /**
165
+ * The name of the AWS Marketplace component. This name should exclude the marketplace product ID from it
166
+ */
167
+ readonly componentName: string;
168
+ /**
169
+ * The marketplace product ID associated with the component
170
+ */
171
+ readonly marketplaceProductId: string;
172
+ /**
173
+ * The version of the AWS Marketplace component
174
+ *
175
+ * @default - the latest version of the component, x.x.x
176
+ */
177
+ readonly componentVersion?: string;
178
+ }
179
+ /**
180
+ * Properties of an EC2 Image Builder Component Document
181
+ */
182
+ export interface ComponentDocument {
183
+ /**
184
+ * The schema version of the component
185
+ */
186
+ readonly schemaVersion: ComponentSchemaVersion;
187
+ /**
188
+ * The phases which define the grouping of steps to run in the build and test workflows of the image build.
189
+ */
190
+ readonly phases: ComponentDocumentPhase[];
191
+ /**
192
+ * The name of the document
193
+ *
194
+ * @default None
195
+ */
196
+ readonly name?: string;
197
+ /**
198
+ * The description of the document
199
+ *
200
+ * @default None
201
+ */
202
+ readonly description?: string;
203
+ /**
204
+ * The constants to define in the document
205
+ *
206
+ * @default None
207
+ */
208
+ readonly constants?: {
209
+ [constantName: string]: ComponentConstantValue;
210
+ };
211
+ /**
212
+ * The parameters to define in the document
213
+ *
214
+ * @default None
215
+ */
216
+ readonly parameters?: {
217
+ [parameterName: string]: ComponentDocumentParameterDefinition;
218
+ };
219
+ }
220
+ /**
221
+ * The phase to run in a specific workflow in an image build, which define the steps to execute to customize or test
222
+ * the instance.
223
+ */
224
+ export interface ComponentDocumentPhase {
225
+ /**
226
+ * The name of the phase
227
+ */
228
+ readonly name: ComponentPhaseName;
229
+ /**
230
+ * The list of steps to execute to modify or test the build/test instance
231
+ */
232
+ readonly steps: ComponentDocumentStep[];
233
+ }
234
+ /**
235
+ * The step to run in a specific phase of the image build, which defines the step to execute to customize or test the
236
+ * instance.
237
+ */
238
+ export interface ComponentDocumentStep {
239
+ /**
240
+ * The name of the step
241
+ */
242
+ readonly name: string;
243
+ /**
244
+ * The action to perform in the step
245
+ */
246
+ readonly action: ComponentAction;
247
+ /**
248
+ * Contains parameters required by the action to run the step
249
+ *
250
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/userguide/toe-action-modules.html
251
+ */
252
+ readonly inputs: ComponentStepInputs;
253
+ /**
254
+ * The condition to apply to the step. If the condition is false, then the step is skipped
255
+ *
256
+ * @default - no condition is applied to the step and it gets executed
257
+ *
258
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/userguide/toe-conditional-constructs.html
259
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/userguide/toe-comparison-operators.html
260
+ */
261
+ readonly if?: ComponentStepIfCondition;
262
+ /**
263
+ * A looping construct defining a repeated sequence of instructions
264
+ *
265
+ * @default None
266
+ */
267
+ readonly loop?: ComponentDocumentLoop;
268
+ /**
269
+ * The timeout of the step
270
+ *
271
+ * @default - 120 minutes
272
+ */
273
+ readonly timeout?: cdk.Duration;
274
+ /**
275
+ * Specifies what the step should do in case of failure
276
+ *
277
+ * @default ComponentOnFailure.ABORT
278
+ */
279
+ readonly onFailure?: ComponentOnFailure;
280
+ }
281
+ /**
282
+ * The looping construct of a component defines a repeated sequence of instructions
283
+ */
284
+ export interface ComponentDocumentLoop {
285
+ /**
286
+ * The name of the loop, which can be used to reference
287
+ *
288
+ * @default loop
289
+ */
290
+ readonly name?: string;
291
+ /**
292
+ * The for loop iterates on a range of integers specified within a boundary outlined by the start and end of the
293
+ * variables
294
+ *
295
+ * @default - none if `forEach` is provided. otherwise, `for` is required.
296
+ */
297
+ readonly for?: ComponentDocumentForLoop;
298
+ /**
299
+ * The forEach loop iterates on an explicit list of values, which can be strings and chained expressions
300
+ *
301
+ * @default - none if `for` is provided. otherwise, `forEach` is required.
302
+ */
303
+ readonly forEach?: string[];
304
+ }
305
+ /**
306
+ * The for loop iterates on a range of integers specified within a boundary outlined by the start and end of the
307
+ * variables. The iterating values are in the set [start, end] and includes boundary values.
308
+ */
309
+ export interface ComponentDocumentForLoop {
310
+ /**
311
+ * Starting value of iteration. Does not accept chaining expressions.
312
+ */
313
+ readonly start: number;
314
+ /**
315
+ * Ending value of iteration. Does not accept chaining expressions.
316
+ */
317
+ readonly end: number;
318
+ /**
319
+ * Difference by which an iterating value is updated through addition. It must be a negative or positive non-zero
320
+ * value. Does not accept chaining expressions.
321
+ */
322
+ readonly updateBy: number;
323
+ }
324
+ /**
325
+ * The value of a constant in a component document
326
+ */
327
+ export declare class ComponentConstantValue {
328
+ /**
329
+ * Creates a string type constant in a component document
330
+ *
331
+ * @param value The value of the constant
332
+ */
333
+ static fromString(value: string): ComponentConstantValue;
334
+ /**
335
+ * The data type of the constant
336
+ */
337
+ readonly type: string;
338
+ /**
339
+ * The value of the constant
340
+ */
341
+ readonly value: any;
342
+ protected constructor(type: string, value: any);
343
+ }
344
+ /**
345
+ * The definition of the parameter
346
+ */
347
+ export interface ComponentDocumentParameterDefinition {
348
+ /**
349
+ * The type of the parameter
350
+ */
351
+ readonly type: ComponentParameterType;
352
+ /**
353
+ * The default value of the parameter
354
+ *
355
+ * @default - none, indicating the parameter is required
356
+ */
357
+ readonly default?: any;
358
+ /**
359
+ * The description of the parameter
360
+ *
361
+ * @default None
362
+ */
363
+ readonly description?: string;
364
+ }
365
+ /**
366
+ * The action for a step within the component document
367
+ */
368
+ export declare enum ComponentAction {
369
+ /**
370
+ * The AppendFile action adds the provided content to the pre-existing content of a file
371
+ */
372
+ APPEND_FILE = "AppendFile",
373
+ /**
374
+ * The Assert action performs value with comparison/logic operators, and succeeds/fails the step based on the outcome
375
+ * of the assertion
376
+ */
377
+ ASSERT = "Assert",
378
+ /**
379
+ * The CopyFile action copies files from a source file to a destination
380
+ */
381
+ COPY_FILE = "CopyFile",
382
+ /**
383
+ * The CopyFolder action copies folders from a source to a destination
384
+ */
385
+ COPY_FOLDER = "CopyFolder",
386
+ /**
387
+ * The CreateFile action creates a file in the provided location
388
+ */
389
+ CREATE_FILE = "CreateFile",
390
+ /**
391
+ * The CreateFolder action creates a folder in the provided location
392
+ */
393
+ CREATE_FOLDER = "CreateFolder",
394
+ /**
395
+ * The CreateSymlink action creates symbolic links from a given path to a target
396
+ */
397
+ CREATE_SYMLINK = "CreateSymlink",
398
+ /**
399
+ * The DeleteFile action deletes file(s) in the provided location
400
+ */
401
+ DELETE_FILE = "DeleteFile",
402
+ /**
403
+ * The DeleteFolder action deletes folders in the provided location
404
+ */
405
+ DELETE_FOLDER = "DeleteFolder",
406
+ /**
407
+ * The ExecuteBash action runs bash scripts with inline bash commands
408
+ */
409
+ EXECUTE_BASH = "ExecuteBash",
410
+ /**
411
+ * The ExecuteBinary action runs a provided binary executable
412
+ */
413
+ EXECUTE_BINARY = "ExecuteBinary",
414
+ /**
415
+ * The ExecuteDocument action allows running other component documents from within a given component
416
+ */
417
+ EXECUTE_DOCUMENT = "ExecuteDocument",
418
+ /**
419
+ * The ExecutePowershell action runs PowerShell scripts with inline PowerShell commands
420
+ */
421
+ EXECUTE_POWERSHELL = "ExecutePowerShell",
422
+ /**
423
+ * The InstallMSI action runs a Windows application with the provided MSI file
424
+ */
425
+ INSTALL_MSI = "InstallMSI",
426
+ /**
427
+ * The ListFiles action lists files in the provided folder
428
+ */
429
+ LIST_FILES = "ListFiles",
430
+ /**
431
+ * The MoveFile action moves files from a source to a destination
432
+ */
433
+ MOVE_FILE = "MoveFile",
434
+ /**
435
+ * The MoveFolder action moves folders from a source to a destination
436
+ */
437
+ MOVE_FOLDER = "MoveFolder",
438
+ /**
439
+ * The ReadFile action reads the content of a text file
440
+ */
441
+ READ_FILE = "ReadFile",
442
+ /**
443
+ * The Reboot action reboots the instance
444
+ */
445
+ REBOOT = "Reboot",
446
+ /**
447
+ * The SetFileEncoding action modifies the encoding property of an existing file
448
+ */
449
+ SET_FILE_ENCODING = "SetFileEncoding",
450
+ /**
451
+ * The SetFileOwner action modifies the owner and group ownership properties of an existing file
452
+ */
453
+ SET_FILE_OWNER = "SetFileOwner",
454
+ /**
455
+ * The SetFolderOwner action recursively modifies the owner and group ownership properties of an existing folder
456
+ */
457
+ SET_FOLDER_OWNER = "SetFolderOwner",
458
+ /**
459
+ * The SetFilePermissions action modifies the permission of an existing file
460
+ */
461
+ SET_FILE_PERMISSIONS = "SetFilePermissions",
462
+ /**
463
+ * The SetFolderPermissions action recursively modifies the permissions of an existing folder and all of its subfiles
464
+ * and subfolders
465
+ */
466
+ SET_FOLDER_PERMISSIONS = "SetFolderPermissions",
467
+ /**
468
+ * The SetRegistry action sets the value for the specified Windows registry key
469
+ */
470
+ SET_REGISTRY = "SetRegistry",
471
+ /**
472
+ * The S3Download action downloads an Amazon S3 object/folder to a local destination
473
+ */
474
+ S3_DOWNLOAD = "S3Download",
475
+ /**
476
+ * The S3Upload action uploads a file or folder to an Amazon S3 location
477
+ */
478
+ S3_UPLOAD = "S3Upload",
479
+ /**
480
+ * The UninstallMSI action removes a Windows application using an MSI file
481
+ */
482
+ UNINSTALL_MSI = "UninstallMSI",
483
+ /**
484
+ * The UpdateOS action installs OS updates
485
+ */
486
+ UPDATE_OS = "UpdateOS",
487
+ /**
488
+ * The WebDownload action downloads files from a URL to a local destination
489
+ */
490
+ WEB_DOWNLOAD = "WebDownload"
491
+ }
492
+ /**
493
+ * Specifies what the step should do in case of failure
494
+ */
495
+ export declare enum ComponentOnFailure {
496
+ /**
497
+ * Fails the step and document execution
498
+ */
499
+ ABORT = "Abort",
500
+ /**
501
+ * Fails the step and proceeds to execute the next step in the document
502
+ */
503
+ CONTINUE = "Continue",
504
+ /**
505
+ * Ignores the step and proceeds to execute the next step in the document
506
+ */
507
+ IGNORE = "Ignore"
508
+ }
509
+ /**
510
+ * The parameter type in a component document
511
+ */
512
+ export declare enum ComponentParameterType {
513
+ /**
514
+ * Indicates the parameter value is a string
515
+ */
516
+ STRING = "string"
517
+ }
518
+ /**
519
+ * The phases of a component document
520
+ */
521
+ export declare enum ComponentPhaseName {
522
+ /**
523
+ * Build phase of the component. This phase is run during the BUILDING phase of the image build.
524
+ */
525
+ BUILD = "build",
526
+ /**
527
+ * Test phase of the component, executed directly on the instance which is used to build the container image. This
528
+ * phase is run during the TESTING phase of the image build.
529
+ */
530
+ CONTAINER_HOST_TEST = "container-host-test",
531
+ /**
532
+ * Test phase of the component. This phase is run during the TESTING phase of the image build.
533
+ */
534
+ TEST = "test",
535
+ /**
536
+ * Validate phase of the component. This phase is run during the BUILDING phase of the image build, after the build
537
+ * step of the component is executed.
538
+ */
539
+ VALIDATE = "validate"
540
+ }
541
+ /**
542
+ * The schema version of the component
543
+ */
544
+ export declare enum ComponentSchemaVersion {
545
+ /**
546
+ * Schema version 1.0 for the component document
547
+ */
548
+ V1_0 = "1.0"
549
+ }
550
+ /**
551
+ * Represents the inputs for a step in the component document
552
+ */
553
+ export declare class ComponentStepInputs {
554
+ /**
555
+ * Creates the input value from an object, for the component step
556
+ *
557
+ * @param inputsObject The object containing the input values
558
+ */
559
+ static fromObject(inputsObject: {
560
+ [key: string]: any;
561
+ }): ComponentStepInputs;
562
+ /**
563
+ * Creates the input value from a list of input objects, for the component step
564
+ *
565
+ * @param inputsObjectList The list of objects containing the input values
566
+ */
567
+ static fromList(inputsObjectList: {
568
+ [key: string]: any;
569
+ }[]): ComponentStepInputs;
570
+ /**
571
+ * The rendered input value
572
+ */
573
+ readonly inputs: any;
574
+ protected constructor(input: any);
575
+ }
576
+ /**
577
+ * Represents an `if` condition in the component document
578
+ */
579
+ export declare class ComponentStepIfCondition {
580
+ /**
581
+ * Creates the `if` value from an object, for the component step
582
+ *
583
+ * @param ifObject The object containing the `if` condition
584
+ */
585
+ static fromObject(ifObject: {
586
+ [key: string]: any;
587
+ }): ComponentStepIfCondition;
588
+ /**
589
+ * The rendered input value
590
+ */
591
+ readonly ifCondition: any;
592
+ protected constructor(ifCondition: any);
593
+ }
594
+ /**
595
+ * Helper class for referencing and uploading component data
596
+ */
597
+ export declare abstract class ComponentData {
598
+ /**
599
+ * Uploads component data from a local file to S3 to use as the component data
600
+ *
601
+ * @param scope The construct scope
602
+ * @param id Identifier of the construct
603
+ * @param path The local path to the component data file
604
+ * @param options S3 asset upload options
605
+ */
606
+ static fromAsset(scope: Construct, id: string, path: string, options?: s3assets.AssetOptions): S3ComponentData;
607
+ /**
608
+ * References component data from a pre-existing S3 object
609
+ *
610
+ * @param bucket The S3 bucket where the component data is stored
611
+ * @param key The S3 key of the component data file
612
+ */
613
+ static fromS3(bucket: s3.IBucket, key: string): S3ComponentData;
614
+ /**
615
+ * Uses an inline JSON object as the component data
616
+ *
617
+ * @param data An inline JSON object representing the component data
618
+ */
619
+ static fromJsonObject(data: {
620
+ [key: string]: any;
621
+ }): ComponentData;
622
+ /**
623
+ * Uses an inline JSON object as the component data, using the ComponentDocument interface
624
+ *
625
+ * @param data An inline JSON object representing the component data
626
+ */
627
+ static fromComponentDocumentJsonObject(data: ComponentDocument): ComponentData;
628
+ /**
629
+ * Uses an inline JSON/YAML string as the component data
630
+ *
631
+ * @param data An inline JSON/YAML string representing the component data
632
+ */
633
+ static fromInline(data: string): ComponentData;
634
+ /**
635
+ * Indicates that the provided component data is an S3 reference
636
+ */
637
+ abstract readonly isS3Reference: boolean;
638
+ /**
639
+ * The resulting inline string or S3 URL which references the component data
640
+ */
641
+ readonly value: string;
642
+ protected constructor(value: string);
643
+ }
644
+ /**
645
+ * Helper class for S3-based component data references, containing additional permission grant methods on the S3 object
646
+ */
647
+ export declare abstract class S3ComponentData extends ComponentData {
648
+ readonly isS3Reference = true;
649
+ protected readonly bucket: s3.IBucket;
650
+ protected readonly key: string;
651
+ protected constructor(bucket: s3.IBucket, key: string);
652
+ /**
653
+ * Grant put permissions to the given grantee for the component data in S3
654
+ *
655
+ * @param grantee The principal
656
+ */
657
+ grantPut(grantee: iam.IGrantable): iam.Grant;
658
+ /**
659
+ * Grant read permissions to the given grantee for the component data in S3
660
+ *
661
+ * @param grantee The principal
662
+ */
663
+ grantRead(grantee: iam.IGrantable): iam.Grant;
664
+ }
665
+ /**
666
+ * Helper class for working with AWS-managed components
667
+ */
668
+ export declare abstract class AwsManagedComponent {
669
+ /**
670
+ * Imports the AWS CLI v2 AWS-managed component
671
+ *
672
+ * @param scope The construct scope
673
+ * @param id Identifier of the construct
674
+ * @param attrs The AWS-managed component attributes
675
+ */
676
+ static awsCliV2(scope: Construct, id: string, attrs: AwsManagedComponentAttributes): IComponent;
677
+ /**
678
+ * Imports the hello world AWS-managed component
679
+ *
680
+ * @param scope The construct scope
681
+ * @param id Identifier of the construct
682
+ * @param attrs The AWS-managed component attributes
683
+ */
684
+ static helloWorld(scope: Construct, id: string, attrs: AwsManagedComponentAttributes): IComponent;
685
+ /**
686
+ * Imports the Python 3 AWS-managed component
687
+ *
688
+ * @param scope The construct scope
689
+ * @param id Identifier of the construct
690
+ * @param attrs The AWS-managed component attributes
691
+ */
692
+ static python3(scope: Construct, id: string, attrs: AwsManagedComponentAttributes): IComponent;
693
+ /**
694
+ * Imports the reboot AWS-managed component
695
+ *
696
+ * @param scope The construct scope
697
+ * @param id Identifier of the construct
698
+ * @param attrs The AWS-managed component attributes
699
+ */
700
+ static reboot(scope: Construct, id: string, attrs: AwsManagedComponentAttributes): IComponent;
701
+ /**
702
+ * Imports the STIG hardening AWS-managed component
703
+ *
704
+ * @param scope The construct scope
705
+ * @param id Identifier of the construct
706
+ * @param attrs The AWS-managed component attributes
707
+ *
708
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/userguide/ib-stig.html
709
+ */
710
+ static stigBuild(scope: Construct, id: string, attrs: AwsManagedComponentAttributes): IComponent;
711
+ /**
712
+ * Imports the OS update AWS-managed component
713
+ *
714
+ * @param scope The construct scope
715
+ * @param id Identifier of the construct
716
+ * @param attrs The AWS-managed component attributes
717
+ */
718
+ static updateOS(scope: Construct, id: string, attrs: AwsManagedComponentAttributes): IComponent;
719
+ /**
720
+ * Imports an AWS-managed component from its attributes
721
+ *
722
+ * @param scope The construct scope
723
+ * @param id Identifier of the construct
724
+ * @param attrs The AWS-managed component attributes
725
+ */
726
+ static fromAwsManagedComponentAttributes(scope: Construct, id: string, attrs: AwsManagedComponentAttributes): IComponent;
727
+ /**
728
+ * Imports an AWS-managed component from its name
729
+ *
730
+ * @param scope The construct scope
731
+ * @param id Identifier of the construct
732
+ * @param awsManagedComponentName - The name of the AWS-managed component
733
+ */
734
+ static fromAwsManagedComponentName(scope: Construct, id: string, awsManagedComponentName: string): IComponent;
735
+ private static validatePredefinedManagedComponentMethodAttributes;
736
+ }
737
+ /**
738
+ * Helper class for working with AWS Marketplace components
739
+ */
740
+ export declare class AwsMarketplaceComponent {
741
+ /**
742
+ * Imports an AWS Marketplace component from its attributes
743
+ *
744
+ * @param scope The construct scope
745
+ * @param id Identifier of the construct
746
+ * @param attrs The AWS-managed component attributes
747
+ */
748
+ static fromAwsMarketplaceComponentAttributes(scope: Construct, id: string, attrs: AwsMarketplaceComponentAttributes): IComponent;
749
+ }
750
+ /**
751
+ * A new or imported Component
752
+ */
753
+ declare abstract class ComponentBase extends cdk.Resource implements IComponent {
754
+ /**
755
+ * The ARN of the component
756
+ */
757
+ abstract readonly componentArn: string;
758
+ /**
759
+ * The name of the component
760
+ */
761
+ abstract readonly componentName: string;
762
+ /**
763
+ * The version of the component
764
+ */
765
+ abstract readonly componentVersion: string;
766
+ /**
767
+ * Grant custom actions to the given grantee for the component
768
+ *
769
+ * @param grantee The principal
770
+ * @param actions The list of actions
771
+ */
772
+ grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
773
+ /**
774
+ * Grant read permissions to the given grantee for the component
775
+ *
776
+ * @param grantee The principal
777
+ */
778
+ grantRead(grantee: iam.IGrantable): iam.Grant;
779
+ }
780
+ /**
781
+ * Represents an EC2 Image Builder Component.
782
+ *
783
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/userguide/manage-components.html
784
+ */
785
+ export declare class Component extends ComponentBase {
786
+ /** Uniquely identifies this class. */
787
+ static readonly PROPERTY_INJECTION_ID: string;
788
+ /**
789
+ * Import an existing component given its ARN.
790
+ */
791
+ static fromComponentArn(scope: Construct, id: string, componentArn: string): IComponent;
792
+ /**
793
+ * Import an existing component given its name. The provided name must be normalized by converting all alphabetical
794
+ * characters to lowercase, and replacing all spaces and underscores with hyphens.
795
+ */
796
+ static fromComponentName(scope: Construct, id: string, componentName: string): IComponent;
797
+ /**
798
+ * Import an existing component by providing its attributes. If the component name is provided as an attribute, it
799
+ * must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores
800
+ * with hyphens.
801
+ */
802
+ static fromComponentAttributes(scope: Construct, id: string, attrs: ComponentAttributes): IComponent;
803
+ /**
804
+ * Return whether the given object is a Component.
805
+ */
806
+ static isComponent(x: any): x is Component;
807
+ /**
808
+ * The ARN of the component
809
+ */
810
+ readonly componentArn: string;
811
+ /**
812
+ * The name of the component
813
+ */
814
+ readonly componentName: string;
815
+ /**
816
+ * The version of the component
817
+ */
818
+ readonly componentVersion: string;
819
+ /**
820
+ * Whether the component is encrypted
821
+ */
822
+ readonly encrypted: boolean;
823
+ /**
824
+ * The type of the component
825
+ *
826
+ * @attribute
827
+ */
828
+ readonly componentType: string;
829
+ protected readonly kmsKey?: kms.IKey;
830
+ constructor(scope: Construct, id: string, props: ComponentProps);
831
+ private validateComponentName;
832
+ }
833
+ export {};