@aws-cdk/aws-imagebuilder-alpha 2.232.2-alpha.0 → 2.233.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,70 @@
1
+ import { Construct } from 'constructs';
2
+ import { IWorkflow, WorkflowType } from './workflow';
3
+ /**
4
+ * Properties for an EC2 Image Builder Amazon-managed workflow
5
+ */
6
+ export interface AmazonManagedWorkflowAttributes {
7
+ /**
8
+ * The name of the Amazon-managed workflow
9
+ */
10
+ readonly workflowName: string;
11
+ /**
12
+ * The type of the Amazon-managed workflow
13
+ */
14
+ readonly workflowType: WorkflowType;
15
+ }
16
+ /**
17
+ * Helper class for working with Amazon-managed workflows
18
+ */
19
+ export declare class AmazonManagedWorkflow {
20
+ /**
21
+ * Imports the build-container Amazon-managed workflow
22
+ *
23
+ * @param scope The construct scope
24
+ * @param id Identifier of the construct
25
+ */
26
+ static buildContainer(scope: Construct, id: string): IWorkflow;
27
+ /**
28
+ * Imports the build-image AWS-managed workflow
29
+ *
30
+ * @param scope The construct scope
31
+ * @param id Identifier of the construct
32
+ */
33
+ static buildImage(scope: Construct, id: string): IWorkflow;
34
+ /**
35
+ * Imports the distribute-container AWS-managed workflow
36
+ *
37
+ * @param scope The construct scope
38
+ * @param id Identifier of the construct
39
+ */
40
+ static distributeContainer(scope: Construct, id: string): IWorkflow;
41
+ /**
42
+ * Imports the distribute-image AWS-managed workflow
43
+ *
44
+ * @param scope The construct scope
45
+ * @param id Identifier of the construct
46
+ */
47
+ static distributeImage(scope: Construct, id: string): IWorkflow;
48
+ /**
49
+ * Imports the test-container AWS-managed workflow
50
+ *
51
+ * @param scope The construct scope
52
+ * @param id Identifier of the construct
53
+ */
54
+ static testContainer(scope: Construct, id: string): IWorkflow;
55
+ /**
56
+ * Imports the test-image AWS-managed workflow
57
+ *
58
+ * @param scope The construct scope
59
+ * @param id Identifier of the construct
60
+ */
61
+ static testImage(scope: Construct, id: string): IWorkflow;
62
+ /**
63
+ * Imports an AWS-managed workflow from its attributes
64
+ *
65
+ * @param scope The construct scope
66
+ * @param id Identifier of the construct
67
+ * @param attrs The attributes of the AWS-managed workflow
68
+ */
69
+ static fromAmazonManagedWorkflowAttributes(scope: Construct, id: string, attrs: AmazonManagedWorkflowAttributes): IWorkflow;
70
+ }
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AmazonManagedWorkflow = void 0;
4
+ const jsiiDeprecationWarnings = require("../.warnings.jsii.js");
5
+ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
6
+ const cdk = require("aws-cdk-lib");
7
+ const constants_1 = require("./private/constants");
8
+ const workflow_1 = require("./workflow");
9
+ /**
10
+ * Helper class for working with Amazon-managed workflows
11
+ */
12
+ class AmazonManagedWorkflow {
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/aws-imagebuilder-alpha.AmazonManagedWorkflow", version: "2.233.0-alpha.0" };
14
+ /**
15
+ * Imports the build-container Amazon-managed workflow
16
+ *
17
+ * @param scope The construct scope
18
+ * @param id Identifier of the construct
19
+ */
20
+ static buildContainer(scope, id) {
21
+ return this.fromAmazonManagedWorkflowAttributes(scope, id, {
22
+ workflowName: 'build-container',
23
+ workflowType: workflow_1.WorkflowType.BUILD,
24
+ });
25
+ }
26
+ /**
27
+ * Imports the build-image AWS-managed workflow
28
+ *
29
+ * @param scope The construct scope
30
+ * @param id Identifier of the construct
31
+ */
32
+ static buildImage(scope, id) {
33
+ return this.fromAmazonManagedWorkflowAttributes(scope, id, {
34
+ workflowName: 'build-image',
35
+ workflowType: workflow_1.WorkflowType.BUILD,
36
+ });
37
+ }
38
+ /**
39
+ * Imports the distribute-container AWS-managed workflow
40
+ *
41
+ * @param scope The construct scope
42
+ * @param id Identifier of the construct
43
+ */
44
+ static distributeContainer(scope, id) {
45
+ return this.fromAmazonManagedWorkflowAttributes(scope, id, {
46
+ workflowName: 'distribute-container',
47
+ workflowType: workflow_1.WorkflowType.DISTRIBUTION,
48
+ });
49
+ }
50
+ /**
51
+ * Imports the distribute-image AWS-managed workflow
52
+ *
53
+ * @param scope The construct scope
54
+ * @param id Identifier of the construct
55
+ */
56
+ static distributeImage(scope, id) {
57
+ return this.fromAmazonManagedWorkflowAttributes(scope, id, {
58
+ workflowName: 'distribute-image',
59
+ workflowType: workflow_1.WorkflowType.DISTRIBUTION,
60
+ });
61
+ }
62
+ /**
63
+ * Imports the test-container AWS-managed workflow
64
+ *
65
+ * @param scope The construct scope
66
+ * @param id Identifier of the construct
67
+ */
68
+ static testContainer(scope, id) {
69
+ return this.fromAmazonManagedWorkflowAttributes(scope, id, {
70
+ workflowName: 'test-container',
71
+ workflowType: workflow_1.WorkflowType.TEST,
72
+ });
73
+ }
74
+ /**
75
+ * Imports the test-image AWS-managed workflow
76
+ *
77
+ * @param scope The construct scope
78
+ * @param id Identifier of the construct
79
+ */
80
+ static testImage(scope, id) {
81
+ return this.fromAmazonManagedWorkflowAttributes(scope, id, {
82
+ workflowName: 'test-image',
83
+ workflowType: workflow_1.WorkflowType.TEST,
84
+ });
85
+ }
86
+ /**
87
+ * Imports an AWS-managed workflow from its attributes
88
+ *
89
+ * @param scope The construct scope
90
+ * @param id Identifier of the construct
91
+ * @param attrs The attributes of the AWS-managed workflow
92
+ */
93
+ static fromAmazonManagedWorkflowAttributes(scope, id, attrs) {
94
+ try {
95
+ jsiiDeprecationWarnings._aws_cdk_aws_imagebuilder_alpha_AmazonManagedWorkflowAttributes(attrs);
96
+ }
97
+ catch (error) {
98
+ if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
99
+ Error.captureStackTrace(error, this.fromAmazonManagedWorkflowAttributes);
100
+ }
101
+ throw error;
102
+ }
103
+ if (cdk.Token.isUnresolved(attrs.workflowType)) {
104
+ throw new cdk.ValidationError('workflowType cannot be a token', scope);
105
+ }
106
+ return workflow_1.Workflow.fromWorkflowArn(scope, id, cdk.Stack.of(scope).formatArn({
107
+ service: 'imagebuilder',
108
+ account: 'aws',
109
+ resource: 'workflow',
110
+ resourceName: `${attrs.workflowType.toLowerCase()}/${attrs.workflowName}/${constants_1.LATEST_VERSION}`,
111
+ }));
112
+ }
113
+ }
114
+ exports.AmazonManagedWorkflow = AmazonManagedWorkflow;
115
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW1hem9uLW1hbmFnZWQtd29ya2Zsb3cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhbWF6b24tbWFuYWdlZC13b3JrZmxvdy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLG1DQUFtQztBQUVuQyxtREFBcUQ7QUFDckQseUNBQStEO0FBaUIvRDs7R0FFRztBQUNILE1BQWEscUJBQXFCOztJQUNoQzs7Ozs7T0FLRztJQUNJLE1BQU0sQ0FBQyxjQUFjLENBQUMsS0FBZ0IsRUFBRSxFQUFVO1FBQ3ZELE9BQU8sSUFBSSxDQUFDLG1DQUFtQyxDQUFDLEtBQUssRUFBRSxFQUFFLEVBQUU7WUFDekQsWUFBWSxFQUFFLGlCQUFpQjtZQUMvQixZQUFZLEVBQUUsdUJBQVksQ0FBQyxLQUFLO1NBQ2pDLENBQUMsQ0FBQztLQUNKO0lBRUQ7Ozs7O09BS0c7SUFDSSxNQUFNLENBQUMsVUFBVSxDQUFDLEtBQWdCLEVBQUUsRUFBVTtRQUNuRCxPQUFPLElBQUksQ0FBQyxtQ0FBbUMsQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFO1lBQ3pELFlBQVksRUFBRSxhQUFhO1lBQzNCLFlBQVksRUFBRSx1QkFBWSxDQUFDLEtBQUs7U0FDakMsQ0FBQyxDQUFDO0tBQ0o7SUFFRDs7Ozs7T0FLRztJQUNJLE1BQU0sQ0FBQyxtQkFBbUIsQ0FBQyxLQUFnQixFQUFFLEVBQVU7UUFDNUQsT0FB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bG93QXJuKFxuICAgICAgc2NvcGUsXG4gICAgICBpZCxcbiAgICAgIGNkay5TdGFjay5vZihzY29wZSkuZm9ybWF0QXJuKHtcbiAgICAgICAgc2VydmljZTogJ2ltYWdlYnVpbGRlcicsXG4gICAgICAgIGFjY291bnQ6ICdhd3MnLFxuICAgICAgICByZXNvdXJjZTogJ3dvcmtmbG93JyxcbiAgICAgICAgcmVzb3VyY2VOYW1lOiBgJHthdHRycy53b3JrZmxvd1R5cGUudG9Mb3dlckNhc2UoKX0vJHthdHRycy53b3JrZmxvd05hbWV9LyR7TEFURVNUX1ZFUlNJT059YCxcbiAgICAgIH0pLFxuICAgICk7XG4gIH1cbn1cbiJdfQ==
package/lib/base-image.js CHANGED
@@ -7,7 +7,7 @@ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
7
7
  * Represents a base image that is used to start from in EC2 Image Builder image builds
8
8
  */
9
9
  class BaseImage {
10
- static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/aws-imagebuilder-alpha.BaseImage", version: "2.232.2-alpha.0" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/aws-imagebuilder-alpha.BaseImage", version: "2.233.0-alpha.0" };
11
11
  /**
12
12
  * The AMI ID to use as a base image in an image recipe
13
13
  *
@@ -79,7 +79,7 @@ exports.BaseImage = BaseImage;
79
79
  * Represents a base image that is used to start from in EC2 Image Builder image builds
80
80
  */
81
81
  class BaseContainerImage {
82
- static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/aws-imagebuilder-alpha.BaseContainerImage", version: "2.232.2-alpha.0" };
82
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/aws-imagebuilder-alpha.BaseContainerImage", version: "2.233.0-alpha.0" };
83
83
  /**
84
84
  * The DockerHub image to use as the base image in a container recipe
85
85
  *
@@ -148,7 +148,7 @@ exports.BaseContainerImage = BaseContainerImage;
148
148
  * EC2 Image Builder container build.
149
149
  */
150
150
  class ContainerInstanceImage {
151
- static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/aws-imagebuilder-alpha.ContainerInstanceImage", version: "2.232.2-alpha.0" };
151
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/aws-imagebuilder-alpha.ContainerInstanceImage", version: "2.233.0-alpha.0" };
152
152
  /**
153
153
  * The AMI ID to use to launch the instance for building the container image
154
154
  *
@@ -125,38 +125,6 @@ export interface ComponentAttributes {
125
125
  */
126
126
  readonly componentVersion?: string;
127
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
128
  /**
161
129
  * Properties for an EC2 Image Builder AWS Marketplace component
162
130
  */
@@ -591,6 +559,25 @@ export declare class ComponentStepIfCondition {
591
559
  readonly ifCondition: any;
592
560
  protected constructor(ifCondition: any);
593
561
  }
562
+ /**
563
+ * The rendered component data value, for use in CloudFormation.
564
+ * - For inline components, data is the component text
565
+ * - For S3-backed components, uri is the S3 URL
566
+ */
567
+ export interface ComponentDataConfig {
568
+ /**
569
+ * The rendered component data, for use in CloudFormation
570
+ *
571
+ * @default - none if uri is set
572
+ */
573
+ readonly data?: string;
574
+ /**
575
+ * The rendered component data URI, for use in CloudFormation
576
+ *
577
+ * @default - none if data is set
578
+ */
579
+ readonly uri?: string;
580
+ }
594
581
  /**
595
582
  * Helper class for referencing and uploading component data
596
583
  */
@@ -632,23 +619,23 @@ export declare abstract class ComponentData {
632
619
  */
633
620
  static fromInline(data: string): ComponentData;
634
621
  /**
635
- * Indicates that the provided component data is an S3 reference
622
+ * The rendered component data value, for use in CloudFormation.
623
+ * - For inline components, data is the component text
624
+ * - For S3-backed components, uri is the S3 URL
636
625
  */
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);
626
+ abstract render(): ComponentDataConfig;
643
627
  }
644
628
  /**
645
629
  * Helper class for S3-based component data references, containing additional permission grant methods on the S3 object
646
630
  */
647
631
  export declare abstract class S3ComponentData extends ComponentData {
648
- readonly isS3Reference = true;
649
632
  protected readonly bucket: s3.IBucket;
650
633
  protected readonly key: string;
651
634
  protected constructor(bucket: s3.IBucket, key: string);
635
+ /**
636
+ * The rendered component data text, for use in CloudFormation
637
+ */
638
+ render(): ComponentDataConfig;
652
639
  /**
653
640
  * Grant put permissions to the given grantee for the component data in S3
654
641
  *
@@ -662,78 +649,6 @@ export declare abstract class S3ComponentData extends ComponentData {
662
649
  */
663
650
  grantRead(grantee: iam.IGrantable): iam.Grant;
664
651
  }
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
652
  /**
738
653
  * Helper class for working with AWS Marketplace components
739
654
  */