@aws-cdk/aws-imagebuilder-alpha 2.224.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.
Files changed (72) hide show
  1. package/.jsii +9476 -0
  2. package/.jsii.tabl.json.gz +0 -0
  3. package/.warnings.jsii.js +71 -0
  4. package/LICENSE +201 -0
  5. package/NOTICE +19 -0
  6. package/README.md +94 -0
  7. package/awslint.json +5 -0
  8. package/lib/index.d.ts +1 -0
  9. package/lib/index.js +19 -0
  10. package/lib/infrastructure-configuration.d.ts +323 -0
  11. package/lib/infrastructure-configuration.js +341 -0
  12. package/node_modules/yaml/LICENSE +13 -0
  13. package/node_modules/yaml/README.md +127 -0
  14. package/node_modules/yaml/browser/dist/PlainValue-b8036b75.js +1275 -0
  15. package/node_modules/yaml/browser/dist/Schema-e94716c8.js +682 -0
  16. package/node_modules/yaml/browser/dist/index.js +1002 -0
  17. package/node_modules/yaml/browser/dist/legacy-exports.js +3 -0
  18. package/node_modules/yaml/browser/dist/package.json +1 -0
  19. package/node_modules/yaml/browser/dist/parse-cst.js +1904 -0
  20. package/node_modules/yaml/browser/dist/resolveSeq-492ab440.js +2419 -0
  21. package/node_modules/yaml/browser/dist/types.js +4 -0
  22. package/node_modules/yaml/browser/dist/util.js +2 -0
  23. package/node_modules/yaml/browser/dist/warnings-df54cb69.js +499 -0
  24. package/node_modules/yaml/browser/index.js +1 -0
  25. package/node_modules/yaml/browser/map.js +2 -0
  26. package/node_modules/yaml/browser/pair.js +2 -0
  27. package/node_modules/yaml/browser/parse-cst.js +1 -0
  28. package/node_modules/yaml/browser/scalar.js +2 -0
  29. package/node_modules/yaml/browser/schema.js +9 -0
  30. package/node_modules/yaml/browser/seq.js +2 -0
  31. package/node_modules/yaml/browser/types/binary.js +8 -0
  32. package/node_modules/yaml/browser/types/omap.js +3 -0
  33. package/node_modules/yaml/browser/types/pairs.js +3 -0
  34. package/node_modules/yaml/browser/types/set.js +3 -0
  35. package/node_modules/yaml/browser/types/timestamp.js +10 -0
  36. package/node_modules/yaml/browser/types.js +1 -0
  37. package/node_modules/yaml/browser/util.js +1 -0
  38. package/node_modules/yaml/dist/Document-9b4560a1.js +757 -0
  39. package/node_modules/yaml/dist/PlainValue-ec8e588e.js +876 -0
  40. package/node_modules/yaml/dist/Schema-88e323a7.js +525 -0
  41. package/node_modules/yaml/dist/index.js +79 -0
  42. package/node_modules/yaml/dist/legacy-exports.js +16 -0
  43. package/node_modules/yaml/dist/parse-cst.js +1753 -0
  44. package/node_modules/yaml/dist/resolveSeq-d03cb037.js +2161 -0
  45. package/node_modules/yaml/dist/test-events.js +162 -0
  46. package/node_modules/yaml/dist/types.js +23 -0
  47. package/node_modules/yaml/dist/util.js +19 -0
  48. package/node_modules/yaml/dist/warnings-1000a372.js +416 -0
  49. package/node_modules/yaml/index.d.ts +372 -0
  50. package/node_modules/yaml/index.js +1 -0
  51. package/node_modules/yaml/map.js +2 -0
  52. package/node_modules/yaml/package.json +106 -0
  53. package/node_modules/yaml/pair.js +2 -0
  54. package/node_modules/yaml/parse-cst.d.ts +191 -0
  55. package/node_modules/yaml/parse-cst.js +1 -0
  56. package/node_modules/yaml/scalar.js +2 -0
  57. package/node_modules/yaml/schema.js +9 -0
  58. package/node_modules/yaml/seq.js +2 -0
  59. package/node_modules/yaml/types/binary.js +8 -0
  60. package/node_modules/yaml/types/omap.js +3 -0
  61. package/node_modules/yaml/types/pairs.js +3 -0
  62. package/node_modules/yaml/types/set.js +3 -0
  63. package/node_modules/yaml/types/timestamp.js +10 -0
  64. package/node_modules/yaml/types.d.ts +407 -0
  65. package/node_modules/yaml/types.js +17 -0
  66. package/node_modules/yaml/types.mjs +17 -0
  67. package/node_modules/yaml/util.d.ts +86 -0
  68. package/node_modules/yaml/util.js +16 -0
  69. package/node_modules/yaml/util.mjs +18 -0
  70. package/package.json +122 -0
  71. package/rosetta/_generated.ts-fixture +6 -0
  72. package/rosetta/default.ts-fixture +25 -0
@@ -0,0 +1,323 @@
1
+ import * as cdk from 'aws-cdk-lib';
2
+ import * as ec2 from 'aws-cdk-lib/aws-ec2';
3
+ import * as iam from 'aws-cdk-lib/aws-iam';
4
+ import * as s3 from 'aws-cdk-lib/aws-s3';
5
+ import * as sns from 'aws-cdk-lib/aws-sns';
6
+ import { Construct } from 'constructs';
7
+ /**
8
+ * An EC2 Image Builder Infrastructure Configuration.
9
+ */
10
+ export interface IInfrastructureConfiguration extends cdk.IResource {
11
+ /**
12
+ * The ARN of the infrastructure configuration
13
+ *
14
+ * @attribute
15
+ */
16
+ readonly infrastructureConfigurationArn: string;
17
+ /**
18
+ * The name of the infrastructure configuration
19
+ *
20
+ * @attribute
21
+ */
22
+ readonly infrastructureConfigurationName: string;
23
+ /**
24
+ * Grant custom actions to the given grantee for the infrastructure configuration
25
+ *
26
+ * @param grantee - The principal
27
+ * @param actions - The list of actions
28
+ */
29
+ grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
30
+ /**
31
+ * Grant read permissions to the given grantee for the infrastructure configuration
32
+ *
33
+ * @param grantee - The principal
34
+ */
35
+ grantRead(grantee: iam.IGrantable): iam.Grant;
36
+ }
37
+ /**
38
+ * Indicates whether a signed token header is required for instance metadata retrieval requests.
39
+ *
40
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/APIReference/API_InstanceMetadataOptions.html#imagebuilder-Type-InstanceMetadataOptions-httpTokens
41
+ */
42
+ export declare enum HttpTokens {
43
+ /**
44
+ * Allows retrieval of instance metadata with or without a signed token header in the request
45
+ */
46
+ OPTIONAL = "optional",
47
+ /**
48
+ * Requires a signed token header in instance metadata retrieval requests
49
+ */
50
+ REQUIRED = "required"
51
+ }
52
+ /**
53
+ * The tenancy to use for an instance.
54
+ *
55
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/APIReference/API_Placement.html#imagebuilder-Type-Placement-tenancy
56
+ */
57
+ export declare enum Tenancy {
58
+ /**
59
+ * Instances will be launched with default tenancy
60
+ */
61
+ DEFAULT = "default",
62
+ /**
63
+ * Instances will be launched with dedicated tenancy
64
+ */
65
+ DEDICATED = "dedicated",
66
+ /**
67
+ * Instances will be launched on a dedicated host
68
+ */
69
+ HOST = "host"
70
+ }
71
+ /**
72
+ * The log settings for detailed build logging
73
+ */
74
+ export interface InfrastructureConfigurationLogging {
75
+ /**
76
+ * The S3 logging bucket to use for detailed build logging
77
+ */
78
+ readonly s3Bucket: s3.IBucket;
79
+ /**
80
+ * The S3 logging prefix to use for detailed build logging
81
+ *
82
+ * @default No prefix
83
+ */
84
+ readonly s3KeyPrefix?: string;
85
+ }
86
+ /**
87
+ * Properties for creating an Infrastructure Configuration resource
88
+ */
89
+ export interface InfrastructureConfigurationProps {
90
+ /**
91
+ * The name of the infrastructure configuration. This name must be normalized by transforming all alphabetical
92
+ * characters to lowercase, and replacing all spaces and underscores with hyphens.
93
+ *
94
+ * @default A name is generated
95
+ */
96
+ readonly infrastructureConfigurationName?: string;
97
+ /**
98
+ * The description of the infrastructure configuration.
99
+ *
100
+ * @default None
101
+ */
102
+ readonly description?: string;
103
+ /**
104
+ * The instance types to launch build and test EC2 instances with.
105
+ *
106
+ * @default Image Builder will choose from a default set of instance types compatible with the AMI
107
+ */
108
+ readonly instanceTypes?: ec2.InstanceType[];
109
+ /**
110
+ * The instance profile to associate with the instance used to customize the AMI.
111
+ *
112
+ * By default, an instance profile and role will be created with minimal permissions needed to build the image,
113
+ * attached to the EC2 instance.
114
+ *
115
+ * If an S3 logging bucket and key prefix is provided, an IAM inline policy will be attached to the instance profile's
116
+ * role, allowing s3:PutObject permissions on the bucket.
117
+ *
118
+ * @default An instance profile will be generated
119
+ */
120
+ readonly instanceProfile?: iam.IInstanceProfile;
121
+ /**
122
+ * An IAM role to associate with the instance profile used by Image Builder
123
+ *
124
+ * The role must be assumable by the service principal `ec2.amazonaws.com`:
125
+ * Note: You can provide an instanceProfile or a role, but not both.
126
+ *
127
+ * @example
128
+ * const role = new iam.Role(this, 'MyRole', {
129
+ * assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com')
130
+ * });
131
+ *
132
+ * @default A role will automatically be created, it can be accessed via the `role` property
133
+ */
134
+ readonly role?: iam.IRole;
135
+ /**
136
+ * The VPC to place the instance used to customize the AMI.
137
+ *
138
+ * @default The default VPC will be used
139
+ */
140
+ readonly vpc?: ec2.IVpc;
141
+ /**
142
+ * Select which subnet to place the instance used to customize the AMI. The first subnet that is selected will be used.
143
+ * You must specify the VPC to customize the subnet selection.
144
+ *
145
+ * @default The first subnet selected from the provided VPC will be used
146
+ */
147
+ readonly subnetSelection?: ec2.SubnetSelection;
148
+ /**
149
+ * The security groups to associate with the instance used to customize the AMI.
150
+ *
151
+ * @default The default security group for the VPC will be used
152
+ */
153
+ readonly securityGroups?: ec2.ISecurityGroup[];
154
+ /**
155
+ * The key pair used to connect to the build and test EC2 instances. The key pair can be used to log into the build
156
+ * or test instances for troubleshooting any failures.
157
+ *
158
+ * @default None
159
+ */
160
+ readonly keyPair?: ec2.IKeyPair;
161
+ /**
162
+ * Whether to terminate the EC2 instance when the build or test workflow fails.
163
+ *
164
+ * @default true
165
+ */
166
+ readonly terminateInstanceOnFailure?: boolean;
167
+ /**
168
+ * The maximum number of hops that an instance metadata request can traverse to reach its destination. By default,
169
+ * this is set to 2.
170
+ *
171
+ * @default 2
172
+ */
173
+ readonly httpPutResponseHopLimit?: number;
174
+ /**
175
+ * Indicates whether a signed token header is required for instance metadata retrieval requests. By default, this is
176
+ * set to `required` to require IMDSv2 on build and test EC2 instances.
177
+ *
178
+ * @default HttpTokens.REQUIRED
179
+ */
180
+ readonly httpTokens?: HttpTokens;
181
+ /**
182
+ * The SNS topic on which notifications are sent when an image build completes.
183
+ *
184
+ * @default No notifications are sent
185
+ */
186
+ readonly notificationTopic?: sns.ITopic;
187
+ /**
188
+ * The log settings for detailed build logging.
189
+ *
190
+ * @default None
191
+ */
192
+ readonly logging?: InfrastructureConfigurationLogging;
193
+ /**
194
+ * The availability zone to place Image Builder build and test EC2 instances.
195
+ *
196
+ * @default EC2 will select a random zone
197
+ */
198
+ readonly ec2InstanceAvailabilityZone?: string;
199
+ /**
200
+ * The ID of the Dedicated Host on which build and test instances run. This only applies if the instance tenancy is
201
+ * `host`. This cannot be used with the `ec2InstanceHostResourceGroupArn` parameter.
202
+ *
203
+ * @default None
204
+ */
205
+ readonly ec2InstanceHostId?: string;
206
+ /**
207
+ * The ARN of the host resource group on which build and test instances run. This only applies if the instance tenancy
208
+ * is `host`. This cannot be used with the `ec2InstanceHostId` parameter.
209
+ *
210
+ * @default None
211
+ */
212
+ readonly ec2InstanceHostResourceGroupArn?: string;
213
+ /**
214
+ * The tenancy of the instance. Dedicated tenancy runs instances on single-tenant hardware, while host tenancy runs
215
+ * instances on a dedicated host. Shared tenancy is used by default.
216
+ *
217
+ * @default Tenancy.DEFAULT
218
+ */
219
+ readonly ec2InstanceTenancy?: Tenancy;
220
+ /**
221
+ * The additional tags to assign to the Amazon EC2 instance that Image Builder launches during the build process.
222
+ *
223
+ * @default None
224
+ */
225
+ readonly resourceTags?: {
226
+ [key: string]: string;
227
+ };
228
+ /**
229
+ * The tags to apply to the infrastructure configuration
230
+ *
231
+ * @default None
232
+ */
233
+ readonly tags?: {
234
+ [key: string]: string;
235
+ };
236
+ }
237
+ /**
238
+ * Context information passed when an Infrastructure Configuration is being consumed
239
+ *
240
+ * @internal
241
+ */
242
+ export interface InfrastructureConfigurationBindOptions {
243
+ /**
244
+ * Indicates whether the infrastructure configuration is being consumed inside of a container build
245
+ */
246
+ readonly isContainerBuild?: boolean;
247
+ }
248
+ /**
249
+ * A new or imported Infrastructure Configuration
250
+ */
251
+ declare abstract class InfrastructureConfigurationBase extends cdk.Resource implements IInfrastructureConfiguration {
252
+ /**
253
+ * The ARN of the infrastructure configuration
254
+ */
255
+ abstract readonly infrastructureConfigurationArn: string;
256
+ /**
257
+ * The name of the infrastructure configuration
258
+ */
259
+ abstract readonly infrastructureConfigurationName: string;
260
+ /**
261
+ * Grant custom actions to the given grantee for the infrastructure configuration
262
+ *
263
+ * @param grantee - The principal
264
+ * @param actions - The list of actions
265
+ */
266
+ grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
267
+ /**
268
+ * Grant read permissions to the given grantee for the infrastructure configuration
269
+ *
270
+ * @param grantee - The principal
271
+ */
272
+ grantRead(grantee: iam.IGrantable): iam.Grant;
273
+ }
274
+ /**
275
+ * Represents an EC2 Image Builder Infrastructure Configuration.
276
+ *
277
+ * @see https://docs.aws.amazon.com/imagebuilder/latest/userguide/manage-infra-config.html
278
+ */
279
+ export declare class InfrastructureConfiguration extends InfrastructureConfigurationBase {
280
+ /** Uniquely identifies this class. */
281
+ static readonly PROPERTY_INJECTION_ID: string;
282
+ /**
283
+ * Import an existing infrastructure configuration given its ARN.
284
+ */
285
+ static fromInfrastructureConfigurationArn(scope: Construct, id: string, infrastructureConfigurationArn: string): IInfrastructureConfiguration;
286
+ /**
287
+ * Import an existing infrastructure configuration given its name. The provided name must be normalized by converting
288
+ * all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.
289
+ */
290
+ static fromInfrastructureConfigurationName(scope: Construct, id: string, infrastructureConfigurationName: string): IInfrastructureConfiguration;
291
+ /**
292
+ * Return whether the given object is an InfrastructureConfiguration.
293
+ */
294
+ static isInfrastructureConfiguration(x: any): x is InfrastructureConfiguration;
295
+ /**
296
+ * The ARN of the infrastructure configuration
297
+ */
298
+ readonly infrastructureConfigurationArn: string;
299
+ /**
300
+ * The name of the infrastructure configuration
301
+ */
302
+ readonly infrastructureConfigurationName: string;
303
+ /**
304
+ * The EC2 instance profile to use for the build
305
+ */
306
+ readonly instanceProfile: iam.IInstanceProfile;
307
+ /**
308
+ * The role associated with the EC2 instance profile used for the build
309
+ */
310
+ readonly role?: iam.IRole;
311
+ /**
312
+ * The bucket used to upload image build logs
313
+ */
314
+ readonly logBucket?: s3.IBucket;
315
+ private readonly autoGeneratedInstanceProfileRole?;
316
+ constructor(scope: Construct, id: string, props?: InfrastructureConfigurationProps);
317
+ private validateInfrastructureConfigurationName;
318
+ /**
319
+ * @internal
320
+ */
321
+ _bind(options: InfrastructureConfigurationBindOptions): void;
322
+ }
323
+ export {};