cdk-preinstalled-amazon-linux-ec2 0.0.0__py3-none-any.whl

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,843 @@
1
+ '''
2
+ # replace this
3
+ '''
4
+ from pkgutil import extend_path
5
+ __path__ = extend_path(__path__, __name__)
6
+
7
+ import abc
8
+ import builtins
9
+ import datetime
10
+ import enum
11
+ import typing
12
+
13
+ import jsii
14
+ import publication
15
+ import typing_extensions
16
+
17
+ from typeguard import check_type
18
+
19
+ from ._jsii import *
20
+
21
+ import aws_cdk as _aws_cdk_ceddda9d
22
+ import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
23
+ import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
24
+ import constructs as _constructs_77d1e7e8
25
+
26
+
27
+ class PreinstalledAmazonLinuxInstance(
28
+ _aws_cdk_aws_ec2_ceddda9d.Instance,
29
+ metaclass=jsii.JSIIMeta,
30
+ jsii_type="cdk-preinstalled-amazon-linux-ec2.PreinstalledAmazonLinuxInstance",
31
+ ):
32
+ '''Create an EC2 instance with preinstalled software.'''
33
+
34
+ def __init__(
35
+ self,
36
+ scope: _constructs_77d1e7e8.Construct,
37
+ id: builtins.str,
38
+ *,
39
+ preinstalled_software: typing.Optional[typing.Union["PreinstalledSoftware", typing.Dict[builtins.str, typing.Any]]] = None,
40
+ instance_type: _aws_cdk_aws_ec2_ceddda9d.InstanceType,
41
+ machine_image: _aws_cdk_aws_ec2_ceddda9d.IMachineImage,
42
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
43
+ allow_all_ipv6_outbound: typing.Optional[builtins.bool] = None,
44
+ allow_all_outbound: typing.Optional[builtins.bool] = None,
45
+ associate_public_ip_address: typing.Optional[builtins.bool] = None,
46
+ availability_zone: typing.Optional[builtins.str] = None,
47
+ block_devices: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.BlockDevice, typing.Dict[builtins.str, typing.Any]]]] = None,
48
+ credit_specification: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CpuCredits] = None,
49
+ detailed_monitoring: typing.Optional[builtins.bool] = None,
50
+ ebs_optimized: typing.Optional[builtins.bool] = None,
51
+ init: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CloudFormationInit] = None,
52
+ init_options: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
53
+ instance_name: typing.Optional[builtins.str] = None,
54
+ key_name: typing.Optional[builtins.str] = None,
55
+ key_pair: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IKeyPair] = None,
56
+ placement_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IPlacementGroup] = None,
57
+ private_ip_address: typing.Optional[builtins.str] = None,
58
+ propagate_tags_to_volume_on_creation: typing.Optional[builtins.bool] = None,
59
+ require_imdsv2: typing.Optional[builtins.bool] = None,
60
+ resource_signal_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
61
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
62
+ security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
63
+ source_dest_check: typing.Optional[builtins.bool] = None,
64
+ ssm_session_permissions: typing.Optional[builtins.bool] = None,
65
+ user_data: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.UserData] = None,
66
+ user_data_causes_replacement: typing.Optional[builtins.bool] = None,
67
+ vpc_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
68
+ ) -> None:
69
+ '''
70
+ :param scope: -
71
+ :param id: -
72
+ :param preinstalled_software: The software to preinstall on the instance. Default: - no software is preinstalled
73
+ :param instance_type: Type of instance to launch.
74
+ :param machine_image: AMI to launch.
75
+ :param vpc: VPC to launch the instance in.
76
+ :param allow_all_ipv6_outbound: Whether the instance could initiate IPv6 connections to anywhere by default. This property is only used when you do not provide a security group. Default: false
77
+ :param allow_all_outbound: Whether the instance could initiate connections to anywhere by default. This property is only used when you do not provide a security group. Default: true
78
+ :param associate_public_ip_address: Whether to associate a public IP address to the primary network interface attached to this instance. Default: - public IP address is automatically assigned based on default behavior
79
+ :param availability_zone: In which AZ to place the instance within the VPC. Default: - Random zone.
80
+ :param block_devices: Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes. Each instance that is launched has an associated root device volume, either an Amazon EBS volume or an instance store volume. You can use block device mappings to specify additional EBS volumes or instance store volumes to attach to an instance when it is launched. Default: - Uses the block device mapping of the AMI
81
+ :param credit_specification: Specifying the CPU credit type for burstable EC2 instance types (T2, T3, T3a, etc). The unlimited CPU credit option is not supported for T3 instances with a dedicated host. Default: - T2 instances are standard, while T3, T4g, and T3a instances are unlimited.
82
+ :param detailed_monitoring: Whether "Detailed Monitoring" is enabled for this instance Keep in mind that Detailed Monitoring results in extra charges. Default: - false
83
+ :param ebs_optimized: Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance. Default: false
84
+ :param init: Apply the given CloudFormation Init configuration to the instance at startup. Default: - no CloudFormation init
85
+ :param init_options: Use the given options for applying CloudFormation Init. Describes the configsets to use and the timeout to wait Default: - default options
86
+ :param instance_name: The name of the instance. Default: - CDK generated name
87
+ :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
88
+ :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
89
+ :param placement_group: The placement group that you want to launch the instance into. Default: - no placement group will be used for this instance.
90
+ :param private_ip_address: Defines a private IP address to associate with an instance. Private IP should be available within the VPC that the instance is build within. Default: - no association
91
+ :param propagate_tags_to_volume_on_creation: Propagate the EC2 instance tags to the EBS volumes. Default: - false
92
+ :param require_imdsv2: Whether IMDSv2 should be required on this instance. Default: - false
93
+ :param resource_signal_timeout: The length of time to wait for the resourceSignalCount. The maximum value is 43200 (12 hours). Default: Duration.minutes(5)
94
+ :param role: An IAM role to associate with the instance profile assigned to this Auto Scaling Group. The role must be assumable by the service principal ``ec2.amazonaws.com``: Default: - A role will automatically be created, it can be accessed via the ``role`` property
95
+ :param security_group: Security Group to assign to this instance. Default: - create new security group
96
+ :param source_dest_check: Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the instance to perform NAT. Default: true
97
+ :param ssm_session_permissions: Add SSM session permissions to the instance role. Setting this to ``true`` adds the necessary permissions to connect to the instance using SSM Session Manager. You can do this from the AWS Console. NOTE: Setting this flag to ``true`` may not be enough by itself. You must also use an AMI that comes with the SSM Agent, or install the SSM Agent yourself. See `Working with SSM Agent <https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html>`_ in the SSM Developer Guide. Default: false
98
+ :param user_data: Specific UserData to use. The UserData may still be mutated after creation. Default: - A UserData object appropriate for the MachineImage's Operating System is created.
99
+ :param user_data_causes_replacement: Changes to the UserData force replacement. Depending the EC2 instance type, changing UserData either restarts the instance or replaces the instance. - Instance store-backed instances are replaced. - EBS-backed instances are restarted. By default, restarting does not execute the new UserData so you will need a different mechanism to ensure the instance is restarted. Setting this to ``true`` will make the instance's Logical ID depend on the UserData, which will cause CloudFormation to replace it if the UserData changes. Default: - true iff ``initOptions`` is specified, false otherwise.
100
+ :param vpc_subnets: Where to place the instance within the VPC. Default: - Private subnets.
101
+ '''
102
+ if __debug__:
103
+ type_hints = typing.get_type_hints(_typecheckingstub__5c9a1423334dfc78f723231d72b2d552a8bf34ab8b88aebe51ca10138593a85d)
104
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
105
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
106
+ props = PreinstalledAmazonLinuxInstanceProps(
107
+ preinstalled_software=preinstalled_software,
108
+ instance_type=instance_type,
109
+ machine_image=machine_image,
110
+ vpc=vpc,
111
+ allow_all_ipv6_outbound=allow_all_ipv6_outbound,
112
+ allow_all_outbound=allow_all_outbound,
113
+ associate_public_ip_address=associate_public_ip_address,
114
+ availability_zone=availability_zone,
115
+ block_devices=block_devices,
116
+ credit_specification=credit_specification,
117
+ detailed_monitoring=detailed_monitoring,
118
+ ebs_optimized=ebs_optimized,
119
+ init=init,
120
+ init_options=init_options,
121
+ instance_name=instance_name,
122
+ key_name=key_name,
123
+ key_pair=key_pair,
124
+ placement_group=placement_group,
125
+ private_ip_address=private_ip_address,
126
+ propagate_tags_to_volume_on_creation=propagate_tags_to_volume_on_creation,
127
+ require_imdsv2=require_imdsv2,
128
+ resource_signal_timeout=resource_signal_timeout,
129
+ role=role,
130
+ security_group=security_group,
131
+ source_dest_check=source_dest_check,
132
+ ssm_session_permissions=ssm_session_permissions,
133
+ user_data=user_data,
134
+ user_data_causes_replacement=user_data_causes_replacement,
135
+ vpc_subnets=vpc_subnets,
136
+ )
137
+
138
+ jsii.create(self.__class__, self, [scope, id, props])
139
+
140
+
141
+ @jsii.data_type(
142
+ jsii_type="cdk-preinstalled-amazon-linux-ec2.PreinstalledAmazonLinuxInstanceProps",
143
+ jsii_struct_bases=[_aws_cdk_aws_ec2_ceddda9d.InstanceProps],
144
+ name_mapping={
145
+ "instance_type": "instanceType",
146
+ "machine_image": "machineImage",
147
+ "vpc": "vpc",
148
+ "allow_all_ipv6_outbound": "allowAllIpv6Outbound",
149
+ "allow_all_outbound": "allowAllOutbound",
150
+ "associate_public_ip_address": "associatePublicIpAddress",
151
+ "availability_zone": "availabilityZone",
152
+ "block_devices": "blockDevices",
153
+ "credit_specification": "creditSpecification",
154
+ "detailed_monitoring": "detailedMonitoring",
155
+ "ebs_optimized": "ebsOptimized",
156
+ "init": "init",
157
+ "init_options": "initOptions",
158
+ "instance_name": "instanceName",
159
+ "key_name": "keyName",
160
+ "key_pair": "keyPair",
161
+ "placement_group": "placementGroup",
162
+ "private_ip_address": "privateIpAddress",
163
+ "propagate_tags_to_volume_on_creation": "propagateTagsToVolumeOnCreation",
164
+ "require_imdsv2": "requireImdsv2",
165
+ "resource_signal_timeout": "resourceSignalTimeout",
166
+ "role": "role",
167
+ "security_group": "securityGroup",
168
+ "source_dest_check": "sourceDestCheck",
169
+ "ssm_session_permissions": "ssmSessionPermissions",
170
+ "user_data": "userData",
171
+ "user_data_causes_replacement": "userDataCausesReplacement",
172
+ "vpc_subnets": "vpcSubnets",
173
+ "preinstalled_software": "preinstalledSoftware",
174
+ },
175
+ )
176
+ class PreinstalledAmazonLinuxInstanceProps(_aws_cdk_aws_ec2_ceddda9d.InstanceProps):
177
+ def __init__(
178
+ self,
179
+ *,
180
+ instance_type: _aws_cdk_aws_ec2_ceddda9d.InstanceType,
181
+ machine_image: _aws_cdk_aws_ec2_ceddda9d.IMachineImage,
182
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
183
+ allow_all_ipv6_outbound: typing.Optional[builtins.bool] = None,
184
+ allow_all_outbound: typing.Optional[builtins.bool] = None,
185
+ associate_public_ip_address: typing.Optional[builtins.bool] = None,
186
+ availability_zone: typing.Optional[builtins.str] = None,
187
+ block_devices: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.BlockDevice, typing.Dict[builtins.str, typing.Any]]]] = None,
188
+ credit_specification: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CpuCredits] = None,
189
+ detailed_monitoring: typing.Optional[builtins.bool] = None,
190
+ ebs_optimized: typing.Optional[builtins.bool] = None,
191
+ init: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CloudFormationInit] = None,
192
+ init_options: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
193
+ instance_name: typing.Optional[builtins.str] = None,
194
+ key_name: typing.Optional[builtins.str] = None,
195
+ key_pair: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IKeyPair] = None,
196
+ placement_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IPlacementGroup] = None,
197
+ private_ip_address: typing.Optional[builtins.str] = None,
198
+ propagate_tags_to_volume_on_creation: typing.Optional[builtins.bool] = None,
199
+ require_imdsv2: typing.Optional[builtins.bool] = None,
200
+ resource_signal_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
201
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
202
+ security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
203
+ source_dest_check: typing.Optional[builtins.bool] = None,
204
+ ssm_session_permissions: typing.Optional[builtins.bool] = None,
205
+ user_data: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.UserData] = None,
206
+ user_data_causes_replacement: typing.Optional[builtins.bool] = None,
207
+ vpc_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
208
+ preinstalled_software: typing.Optional[typing.Union["PreinstalledSoftware", typing.Dict[builtins.str, typing.Any]]] = None,
209
+ ) -> None:
210
+ '''Properties for PreinstalledAmazonLinuxInstance.
211
+
212
+ :param instance_type: Type of instance to launch.
213
+ :param machine_image: AMI to launch.
214
+ :param vpc: VPC to launch the instance in.
215
+ :param allow_all_ipv6_outbound: Whether the instance could initiate IPv6 connections to anywhere by default. This property is only used when you do not provide a security group. Default: false
216
+ :param allow_all_outbound: Whether the instance could initiate connections to anywhere by default. This property is only used when you do not provide a security group. Default: true
217
+ :param associate_public_ip_address: Whether to associate a public IP address to the primary network interface attached to this instance. Default: - public IP address is automatically assigned based on default behavior
218
+ :param availability_zone: In which AZ to place the instance within the VPC. Default: - Random zone.
219
+ :param block_devices: Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes. Each instance that is launched has an associated root device volume, either an Amazon EBS volume or an instance store volume. You can use block device mappings to specify additional EBS volumes or instance store volumes to attach to an instance when it is launched. Default: - Uses the block device mapping of the AMI
220
+ :param credit_specification: Specifying the CPU credit type for burstable EC2 instance types (T2, T3, T3a, etc). The unlimited CPU credit option is not supported for T3 instances with a dedicated host. Default: - T2 instances are standard, while T3, T4g, and T3a instances are unlimited.
221
+ :param detailed_monitoring: Whether "Detailed Monitoring" is enabled for this instance Keep in mind that Detailed Monitoring results in extra charges. Default: - false
222
+ :param ebs_optimized: Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance. Default: false
223
+ :param init: Apply the given CloudFormation Init configuration to the instance at startup. Default: - no CloudFormation init
224
+ :param init_options: Use the given options for applying CloudFormation Init. Describes the configsets to use and the timeout to wait Default: - default options
225
+ :param instance_name: The name of the instance. Default: - CDK generated name
226
+ :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
227
+ :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
228
+ :param placement_group: The placement group that you want to launch the instance into. Default: - no placement group will be used for this instance.
229
+ :param private_ip_address: Defines a private IP address to associate with an instance. Private IP should be available within the VPC that the instance is build within. Default: - no association
230
+ :param propagate_tags_to_volume_on_creation: Propagate the EC2 instance tags to the EBS volumes. Default: - false
231
+ :param require_imdsv2: Whether IMDSv2 should be required on this instance. Default: - false
232
+ :param resource_signal_timeout: The length of time to wait for the resourceSignalCount. The maximum value is 43200 (12 hours). Default: Duration.minutes(5)
233
+ :param role: An IAM role to associate with the instance profile assigned to this Auto Scaling Group. The role must be assumable by the service principal ``ec2.amazonaws.com``: Default: - A role will automatically be created, it can be accessed via the ``role`` property
234
+ :param security_group: Security Group to assign to this instance. Default: - create new security group
235
+ :param source_dest_check: Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the instance to perform NAT. Default: true
236
+ :param ssm_session_permissions: Add SSM session permissions to the instance role. Setting this to ``true`` adds the necessary permissions to connect to the instance using SSM Session Manager. You can do this from the AWS Console. NOTE: Setting this flag to ``true`` may not be enough by itself. You must also use an AMI that comes with the SSM Agent, or install the SSM Agent yourself. See `Working with SSM Agent <https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html>`_ in the SSM Developer Guide. Default: false
237
+ :param user_data: Specific UserData to use. The UserData may still be mutated after creation. Default: - A UserData object appropriate for the MachineImage's Operating System is created.
238
+ :param user_data_causes_replacement: Changes to the UserData force replacement. Depending the EC2 instance type, changing UserData either restarts the instance or replaces the instance. - Instance store-backed instances are replaced. - EBS-backed instances are restarted. By default, restarting does not execute the new UserData so you will need a different mechanism to ensure the instance is restarted. Setting this to ``true`` will make the instance's Logical ID depend on the UserData, which will cause CloudFormation to replace it if the UserData changes. Default: - true iff ``initOptions`` is specified, false otherwise.
239
+ :param vpc_subnets: Where to place the instance within the VPC. Default: - Private subnets.
240
+ :param preinstalled_software: The software to preinstall on the instance. Default: - no software is preinstalled
241
+ '''
242
+ if isinstance(init_options, dict):
243
+ init_options = _aws_cdk_aws_ec2_ceddda9d.ApplyCloudFormationInitOptions(**init_options)
244
+ if isinstance(vpc_subnets, dict):
245
+ vpc_subnets = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**vpc_subnets)
246
+ if isinstance(preinstalled_software, dict):
247
+ preinstalled_software = PreinstalledSoftware(**preinstalled_software)
248
+ if __debug__:
249
+ type_hints = typing.get_type_hints(_typecheckingstub__334eb01c668e6ca9bfd6d599da22858b05b079eeea1e7b6a9f71ee632f092b87)
250
+ check_type(argname="argument instance_type", value=instance_type, expected_type=type_hints["instance_type"])
251
+ check_type(argname="argument machine_image", value=machine_image, expected_type=type_hints["machine_image"])
252
+ check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
253
+ check_type(argname="argument allow_all_ipv6_outbound", value=allow_all_ipv6_outbound, expected_type=type_hints["allow_all_ipv6_outbound"])
254
+ check_type(argname="argument allow_all_outbound", value=allow_all_outbound, expected_type=type_hints["allow_all_outbound"])
255
+ check_type(argname="argument associate_public_ip_address", value=associate_public_ip_address, expected_type=type_hints["associate_public_ip_address"])
256
+ check_type(argname="argument availability_zone", value=availability_zone, expected_type=type_hints["availability_zone"])
257
+ check_type(argname="argument block_devices", value=block_devices, expected_type=type_hints["block_devices"])
258
+ check_type(argname="argument credit_specification", value=credit_specification, expected_type=type_hints["credit_specification"])
259
+ check_type(argname="argument detailed_monitoring", value=detailed_monitoring, expected_type=type_hints["detailed_monitoring"])
260
+ check_type(argname="argument ebs_optimized", value=ebs_optimized, expected_type=type_hints["ebs_optimized"])
261
+ check_type(argname="argument init", value=init, expected_type=type_hints["init"])
262
+ check_type(argname="argument init_options", value=init_options, expected_type=type_hints["init_options"])
263
+ check_type(argname="argument instance_name", value=instance_name, expected_type=type_hints["instance_name"])
264
+ check_type(argname="argument key_name", value=key_name, expected_type=type_hints["key_name"])
265
+ check_type(argname="argument key_pair", value=key_pair, expected_type=type_hints["key_pair"])
266
+ check_type(argname="argument placement_group", value=placement_group, expected_type=type_hints["placement_group"])
267
+ check_type(argname="argument private_ip_address", value=private_ip_address, expected_type=type_hints["private_ip_address"])
268
+ check_type(argname="argument propagate_tags_to_volume_on_creation", value=propagate_tags_to_volume_on_creation, expected_type=type_hints["propagate_tags_to_volume_on_creation"])
269
+ check_type(argname="argument require_imdsv2", value=require_imdsv2, expected_type=type_hints["require_imdsv2"])
270
+ check_type(argname="argument resource_signal_timeout", value=resource_signal_timeout, expected_type=type_hints["resource_signal_timeout"])
271
+ check_type(argname="argument role", value=role, expected_type=type_hints["role"])
272
+ check_type(argname="argument security_group", value=security_group, expected_type=type_hints["security_group"])
273
+ check_type(argname="argument source_dest_check", value=source_dest_check, expected_type=type_hints["source_dest_check"])
274
+ check_type(argname="argument ssm_session_permissions", value=ssm_session_permissions, expected_type=type_hints["ssm_session_permissions"])
275
+ check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
276
+ check_type(argname="argument user_data_causes_replacement", value=user_data_causes_replacement, expected_type=type_hints["user_data_causes_replacement"])
277
+ check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
278
+ check_type(argname="argument preinstalled_software", value=preinstalled_software, expected_type=type_hints["preinstalled_software"])
279
+ self._values: typing.Dict[builtins.str, typing.Any] = {
280
+ "instance_type": instance_type,
281
+ "machine_image": machine_image,
282
+ "vpc": vpc,
283
+ }
284
+ if allow_all_ipv6_outbound is not None:
285
+ self._values["allow_all_ipv6_outbound"] = allow_all_ipv6_outbound
286
+ if allow_all_outbound is not None:
287
+ self._values["allow_all_outbound"] = allow_all_outbound
288
+ if associate_public_ip_address is not None:
289
+ self._values["associate_public_ip_address"] = associate_public_ip_address
290
+ if availability_zone is not None:
291
+ self._values["availability_zone"] = availability_zone
292
+ if block_devices is not None:
293
+ self._values["block_devices"] = block_devices
294
+ if credit_specification is not None:
295
+ self._values["credit_specification"] = credit_specification
296
+ if detailed_monitoring is not None:
297
+ self._values["detailed_monitoring"] = detailed_monitoring
298
+ if ebs_optimized is not None:
299
+ self._values["ebs_optimized"] = ebs_optimized
300
+ if init is not None:
301
+ self._values["init"] = init
302
+ if init_options is not None:
303
+ self._values["init_options"] = init_options
304
+ if instance_name is not None:
305
+ self._values["instance_name"] = instance_name
306
+ if key_name is not None:
307
+ self._values["key_name"] = key_name
308
+ if key_pair is not None:
309
+ self._values["key_pair"] = key_pair
310
+ if placement_group is not None:
311
+ self._values["placement_group"] = placement_group
312
+ if private_ip_address is not None:
313
+ self._values["private_ip_address"] = private_ip_address
314
+ if propagate_tags_to_volume_on_creation is not None:
315
+ self._values["propagate_tags_to_volume_on_creation"] = propagate_tags_to_volume_on_creation
316
+ if require_imdsv2 is not None:
317
+ self._values["require_imdsv2"] = require_imdsv2
318
+ if resource_signal_timeout is not None:
319
+ self._values["resource_signal_timeout"] = resource_signal_timeout
320
+ if role is not None:
321
+ self._values["role"] = role
322
+ if security_group is not None:
323
+ self._values["security_group"] = security_group
324
+ if source_dest_check is not None:
325
+ self._values["source_dest_check"] = source_dest_check
326
+ if ssm_session_permissions is not None:
327
+ self._values["ssm_session_permissions"] = ssm_session_permissions
328
+ if user_data is not None:
329
+ self._values["user_data"] = user_data
330
+ if user_data_causes_replacement is not None:
331
+ self._values["user_data_causes_replacement"] = user_data_causes_replacement
332
+ if vpc_subnets is not None:
333
+ self._values["vpc_subnets"] = vpc_subnets
334
+ if preinstalled_software is not None:
335
+ self._values["preinstalled_software"] = preinstalled_software
336
+
337
+ @builtins.property
338
+ def instance_type(self) -> _aws_cdk_aws_ec2_ceddda9d.InstanceType:
339
+ '''Type of instance to launch.'''
340
+ result = self._values.get("instance_type")
341
+ assert result is not None, "Required property 'instance_type' is missing"
342
+ return typing.cast(_aws_cdk_aws_ec2_ceddda9d.InstanceType, result)
343
+
344
+ @builtins.property
345
+ def machine_image(self) -> _aws_cdk_aws_ec2_ceddda9d.IMachineImage:
346
+ '''AMI to launch.'''
347
+ result = self._values.get("machine_image")
348
+ assert result is not None, "Required property 'machine_image' is missing"
349
+ return typing.cast(_aws_cdk_aws_ec2_ceddda9d.IMachineImage, result)
350
+
351
+ @builtins.property
352
+ def vpc(self) -> _aws_cdk_aws_ec2_ceddda9d.IVpc:
353
+ '''VPC to launch the instance in.'''
354
+ result = self._values.get("vpc")
355
+ assert result is not None, "Required property 'vpc' is missing"
356
+ return typing.cast(_aws_cdk_aws_ec2_ceddda9d.IVpc, result)
357
+
358
+ @builtins.property
359
+ def allow_all_ipv6_outbound(self) -> typing.Optional[builtins.bool]:
360
+ '''Whether the instance could initiate IPv6 connections to anywhere by default.
361
+
362
+ This property is only used when you do not provide a security group.
363
+
364
+ :default: false
365
+ '''
366
+ result = self._values.get("allow_all_ipv6_outbound")
367
+ return typing.cast(typing.Optional[builtins.bool], result)
368
+
369
+ @builtins.property
370
+ def allow_all_outbound(self) -> typing.Optional[builtins.bool]:
371
+ '''Whether the instance could initiate connections to anywhere by default.
372
+
373
+ This property is only used when you do not provide a security group.
374
+
375
+ :default: true
376
+ '''
377
+ result = self._values.get("allow_all_outbound")
378
+ return typing.cast(typing.Optional[builtins.bool], result)
379
+
380
+ @builtins.property
381
+ def associate_public_ip_address(self) -> typing.Optional[builtins.bool]:
382
+ '''Whether to associate a public IP address to the primary network interface attached to this instance.
383
+
384
+ :default: - public IP address is automatically assigned based on default behavior
385
+ '''
386
+ result = self._values.get("associate_public_ip_address")
387
+ return typing.cast(typing.Optional[builtins.bool], result)
388
+
389
+ @builtins.property
390
+ def availability_zone(self) -> typing.Optional[builtins.str]:
391
+ '''In which AZ to place the instance within the VPC.
392
+
393
+ :default: - Random zone.
394
+ '''
395
+ result = self._values.get("availability_zone")
396
+ return typing.cast(typing.Optional[builtins.str], result)
397
+
398
+ @builtins.property
399
+ def block_devices(
400
+ self,
401
+ ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.BlockDevice]]:
402
+ '''Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
403
+
404
+ Each instance that is launched has an associated root device volume,
405
+ either an Amazon EBS volume or an instance store volume.
406
+ You can use block device mappings to specify additional EBS volumes or
407
+ instance store volumes to attach to an instance when it is launched.
408
+
409
+ :default: - Uses the block device mapping of the AMI
410
+
411
+ :see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
412
+ '''
413
+ result = self._values.get("block_devices")
414
+ return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.BlockDevice]], result)
415
+
416
+ @builtins.property
417
+ def credit_specification(
418
+ self,
419
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CpuCredits]:
420
+ '''Specifying the CPU credit type for burstable EC2 instance types (T2, T3, T3a, etc).
421
+
422
+ The unlimited CPU credit option is not supported for T3 instances with a dedicated host.
423
+
424
+ :default: - T2 instances are standard, while T3, T4g, and T3a instances are unlimited.
425
+ '''
426
+ result = self._values.get("credit_specification")
427
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CpuCredits], result)
428
+
429
+ @builtins.property
430
+ def detailed_monitoring(self) -> typing.Optional[builtins.bool]:
431
+ '''Whether "Detailed Monitoring" is enabled for this instance Keep in mind that Detailed Monitoring results in extra charges.
432
+
433
+ :default: - false
434
+
435
+ :see: http://aws.amazon.com/cloudwatch/pricing/
436
+ '''
437
+ result = self._values.get("detailed_monitoring")
438
+ return typing.cast(typing.Optional[builtins.bool], result)
439
+
440
+ @builtins.property
441
+ def ebs_optimized(self) -> typing.Optional[builtins.bool]:
442
+ '''Indicates whether the instance is optimized for Amazon EBS I/O.
443
+
444
+ This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance.
445
+ This optimization isn't available with all instance types.
446
+ Additional usage charges apply when using an EBS-optimized instance.
447
+
448
+ :default: false
449
+ '''
450
+ result = self._values.get("ebs_optimized")
451
+ return typing.cast(typing.Optional[builtins.bool], result)
452
+
453
+ @builtins.property
454
+ def init(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CloudFormationInit]:
455
+ '''Apply the given CloudFormation Init configuration to the instance at startup.
456
+
457
+ :default: - no CloudFormation init
458
+ '''
459
+ result = self._values.get("init")
460
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CloudFormationInit], result)
461
+
462
+ @builtins.property
463
+ def init_options(
464
+ self,
465
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ApplyCloudFormationInitOptions]:
466
+ '''Use the given options for applying CloudFormation Init.
467
+
468
+ Describes the configsets to use and the timeout to wait
469
+
470
+ :default: - default options
471
+ '''
472
+ result = self._values.get("init_options")
473
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ApplyCloudFormationInitOptions], result)
474
+
475
+ @builtins.property
476
+ def instance_name(self) -> typing.Optional[builtins.str]:
477
+ '''The name of the instance.
478
+
479
+ :default: - CDK generated name
480
+ '''
481
+ result = self._values.get("instance_name")
482
+ return typing.cast(typing.Optional[builtins.str], result)
483
+
484
+ @builtins.property
485
+ def key_name(self) -> typing.Optional[builtins.str]:
486
+ '''(deprecated) Name of SSH keypair to grant access to instance.
487
+
488
+ :default: - No SSH access will be possible.
489
+
490
+ :deprecated: - Use ``keyPair`` instead - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#using-an-existing-ec2-key-pair
491
+
492
+ :stability: deprecated
493
+ '''
494
+ result = self._values.get("key_name")
495
+ return typing.cast(typing.Optional[builtins.str], result)
496
+
497
+ @builtins.property
498
+ def key_pair(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IKeyPair]:
499
+ '''The SSH keypair to grant access to the instance.
500
+
501
+ :default: - No SSH access will be possible.
502
+ '''
503
+ result = self._values.get("key_pair")
504
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IKeyPair], result)
505
+
506
+ @builtins.property
507
+ def placement_group(
508
+ self,
509
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IPlacementGroup]:
510
+ '''The placement group that you want to launch the instance into.
511
+
512
+ :default: - no placement group will be used for this instance.
513
+ '''
514
+ result = self._values.get("placement_group")
515
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IPlacementGroup], result)
516
+
517
+ @builtins.property
518
+ def private_ip_address(self) -> typing.Optional[builtins.str]:
519
+ '''Defines a private IP address to associate with an instance.
520
+
521
+ Private IP should be available within the VPC that the instance is build within.
522
+
523
+ :default: - no association
524
+ '''
525
+ result = self._values.get("private_ip_address")
526
+ return typing.cast(typing.Optional[builtins.str], result)
527
+
528
+ @builtins.property
529
+ def propagate_tags_to_volume_on_creation(self) -> typing.Optional[builtins.bool]:
530
+ '''Propagate the EC2 instance tags to the EBS volumes.
531
+
532
+ :default: - false
533
+ '''
534
+ result = self._values.get("propagate_tags_to_volume_on_creation")
535
+ return typing.cast(typing.Optional[builtins.bool], result)
536
+
537
+ @builtins.property
538
+ def require_imdsv2(self) -> typing.Optional[builtins.bool]:
539
+ '''Whether IMDSv2 should be required on this instance.
540
+
541
+ :default: - false
542
+ '''
543
+ result = self._values.get("require_imdsv2")
544
+ return typing.cast(typing.Optional[builtins.bool], result)
545
+
546
+ @builtins.property
547
+ def resource_signal_timeout(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
548
+ '''The length of time to wait for the resourceSignalCount.
549
+
550
+ The maximum value is 43200 (12 hours).
551
+
552
+ :default: Duration.minutes(5)
553
+ '''
554
+ result = self._values.get("resource_signal_timeout")
555
+ return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
556
+
557
+ @builtins.property
558
+ def role(self) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole]:
559
+ '''An IAM role to associate with the instance profile assigned to this Auto Scaling Group.
560
+
561
+ The role must be assumable by the service principal ``ec2.amazonaws.com``:
562
+
563
+ :default: - A role will automatically be created, it can be accessed via the ``role`` property
564
+
565
+ Example::
566
+
567
+ const role = new iam.Role(this, 'MyRole', {
568
+ assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com')
569
+ });
570
+ '''
571
+ result = self._values.get("role")
572
+ return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole], result)
573
+
574
+ @builtins.property
575
+ def security_group(
576
+ self,
577
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]:
578
+ '''Security Group to assign to this instance.
579
+
580
+ :default: - create new security group
581
+ '''
582
+ result = self._values.get("security_group")
583
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup], result)
584
+
585
+ @builtins.property
586
+ def source_dest_check(self) -> typing.Optional[builtins.bool]:
587
+ '''Specifies whether to enable an instance launched in a VPC to perform NAT.
588
+
589
+ This controls whether source/destination checking is enabled on the instance.
590
+ A value of true means that checking is enabled, and false means that checking is disabled.
591
+ The value must be false for the instance to perform NAT.
592
+
593
+ :default: true
594
+ '''
595
+ result = self._values.get("source_dest_check")
596
+ return typing.cast(typing.Optional[builtins.bool], result)
597
+
598
+ @builtins.property
599
+ def ssm_session_permissions(self) -> typing.Optional[builtins.bool]:
600
+ '''Add SSM session permissions to the instance role.
601
+
602
+ Setting this to ``true`` adds the necessary permissions to connect
603
+ to the instance using SSM Session Manager. You can do this
604
+ from the AWS Console.
605
+
606
+ NOTE: Setting this flag to ``true`` may not be enough by itself.
607
+ You must also use an AMI that comes with the SSM Agent, or install
608
+ the SSM Agent yourself. See
609
+ `Working with SSM Agent <https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html>`_
610
+ in the SSM Developer Guide.
611
+
612
+ :default: false
613
+ '''
614
+ result = self._values.get("ssm_session_permissions")
615
+ return typing.cast(typing.Optional[builtins.bool], result)
616
+
617
+ @builtins.property
618
+ def user_data(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.UserData]:
619
+ '''Specific UserData to use.
620
+
621
+ The UserData may still be mutated after creation.
622
+
623
+ :default:
624
+
625
+ - A UserData object appropriate for the MachineImage's
626
+ Operating System is created.
627
+ '''
628
+ result = self._values.get("user_data")
629
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.UserData], result)
630
+
631
+ @builtins.property
632
+ def user_data_causes_replacement(self) -> typing.Optional[builtins.bool]:
633
+ '''Changes to the UserData force replacement.
634
+
635
+ Depending the EC2 instance type, changing UserData either
636
+ restarts the instance or replaces the instance.
637
+
638
+ - Instance store-backed instances are replaced.
639
+ - EBS-backed instances are restarted.
640
+
641
+ By default, restarting does not execute the new UserData so you
642
+ will need a different mechanism to ensure the instance is restarted.
643
+
644
+ Setting this to ``true`` will make the instance's Logical ID depend on the
645
+ UserData, which will cause CloudFormation to replace it if the UserData
646
+ changes.
647
+
648
+ :default: - true iff ``initOptions`` is specified, false otherwise.
649
+ '''
650
+ result = self._values.get("user_data_causes_replacement")
651
+ return typing.cast(typing.Optional[builtins.bool], result)
652
+
653
+ @builtins.property
654
+ def vpc_subnets(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
655
+ '''Where to place the instance within the VPC.
656
+
657
+ :default: - Private subnets.
658
+ '''
659
+ result = self._values.get("vpc_subnets")
660
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
661
+
662
+ @builtins.property
663
+ def preinstalled_software(self) -> typing.Optional["PreinstalledSoftware"]:
664
+ '''The software to preinstall on the instance.
665
+
666
+ :default: - no software is preinstalled
667
+ '''
668
+ result = self._values.get("preinstalled_software")
669
+ return typing.cast(typing.Optional["PreinstalledSoftware"], result)
670
+
671
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
672
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
673
+
674
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
675
+ return not (rhs == self)
676
+
677
+ def __repr__(self) -> str:
678
+ return "PreinstalledAmazonLinuxInstanceProps(%s)" % ", ".join(
679
+ k + "=" + repr(v) for k, v in self._values.items()
680
+ )
681
+
682
+
683
+ @jsii.data_type(
684
+ jsii_type="cdk-preinstalled-amazon-linux-ec2.PreinstalledSoftware",
685
+ jsii_struct_bases=[],
686
+ name_mapping={"others": "others", "type": "type"},
687
+ )
688
+ class PreinstalledSoftware:
689
+ def __init__(
690
+ self,
691
+ *,
692
+ others: typing.Optional[typing.Sequence[builtins.str]] = None,
693
+ type: typing.Optional[typing.Sequence["PreinstalledSoftwareType"]] = None,
694
+ ) -> None:
695
+ '''The configuration for preinstalled software.
696
+
697
+ :param others: Whether to install other software. This is a list of software to install and passed to ``dnf install <software>`` Default: - no other software is preinstalled
698
+ :param type: The type of preinstalled software. Default: - no software is preinstalled
699
+ '''
700
+ if __debug__:
701
+ type_hints = typing.get_type_hints(_typecheckingstub__657dec901feded435d209f20ab5a0de458a54fdf89665912ea70cb5dfd6220fa)
702
+ check_type(argname="argument others", value=others, expected_type=type_hints["others"])
703
+ check_type(argname="argument type", value=type, expected_type=type_hints["type"])
704
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
705
+ if others is not None:
706
+ self._values["others"] = others
707
+ if type is not None:
708
+ self._values["type"] = type
709
+
710
+ @builtins.property
711
+ def others(self) -> typing.Optional[typing.List[builtins.str]]:
712
+ '''Whether to install other software.
713
+
714
+ This is a list of software to install and passed to ``dnf install <software>``
715
+
716
+ :default: - no other software is preinstalled
717
+ '''
718
+ result = self._values.get("others")
719
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
720
+
721
+ @builtins.property
722
+ def type(self) -> typing.Optional[typing.List["PreinstalledSoftwareType"]]:
723
+ '''The type of preinstalled software.
724
+
725
+ :default: - no software is preinstalled
726
+ '''
727
+ result = self._values.get("type")
728
+ return typing.cast(typing.Optional[typing.List["PreinstalledSoftwareType"]], result)
729
+
730
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
731
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
732
+
733
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
734
+ return not (rhs == self)
735
+
736
+ def __repr__(self) -> str:
737
+ return "PreinstalledSoftware(%s)" % ", ".join(
738
+ k + "=" + repr(v) for k, v in self._values.items()
739
+ )
740
+
741
+
742
+ @jsii.enum(jsii_type="cdk-preinstalled-amazon-linux-ec2.PreinstalledSoftwareType")
743
+ class PreinstalledSoftwareType(enum.Enum):
744
+ '''The type of preinstalled software.'''
745
+
746
+ NODEJS = "NODEJS"
747
+ '''Node.js.'''
748
+ DOCKER = "DOCKER"
749
+ '''Docker.'''
750
+ VSCODE = "VSCODE"
751
+ '''Visual Studio Code.'''
752
+ GIT = "GIT"
753
+ '''Git.'''
754
+
755
+
756
+ __all__ = [
757
+ "PreinstalledAmazonLinuxInstance",
758
+ "PreinstalledAmazonLinuxInstanceProps",
759
+ "PreinstalledSoftware",
760
+ "PreinstalledSoftwareType",
761
+ ]
762
+
763
+ publication.publish()
764
+
765
+ def _typecheckingstub__5c9a1423334dfc78f723231d72b2d552a8bf34ab8b88aebe51ca10138593a85d(
766
+ scope: _constructs_77d1e7e8.Construct,
767
+ id: builtins.str,
768
+ *,
769
+ preinstalled_software: typing.Optional[typing.Union[PreinstalledSoftware, typing.Dict[builtins.str, typing.Any]]] = None,
770
+ instance_type: _aws_cdk_aws_ec2_ceddda9d.InstanceType,
771
+ machine_image: _aws_cdk_aws_ec2_ceddda9d.IMachineImage,
772
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
773
+ allow_all_ipv6_outbound: typing.Optional[builtins.bool] = None,
774
+ allow_all_outbound: typing.Optional[builtins.bool] = None,
775
+ associate_public_ip_address: typing.Optional[builtins.bool] = None,
776
+ availability_zone: typing.Optional[builtins.str] = None,
777
+ block_devices: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.BlockDevice, typing.Dict[builtins.str, typing.Any]]]] = None,
778
+ credit_specification: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CpuCredits] = None,
779
+ detailed_monitoring: typing.Optional[builtins.bool] = None,
780
+ ebs_optimized: typing.Optional[builtins.bool] = None,
781
+ init: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CloudFormationInit] = None,
782
+ init_options: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
783
+ instance_name: typing.Optional[builtins.str] = None,
784
+ key_name: typing.Optional[builtins.str] = None,
785
+ key_pair: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IKeyPair] = None,
786
+ placement_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IPlacementGroup] = None,
787
+ private_ip_address: typing.Optional[builtins.str] = None,
788
+ propagate_tags_to_volume_on_creation: typing.Optional[builtins.bool] = None,
789
+ require_imdsv2: typing.Optional[builtins.bool] = None,
790
+ resource_signal_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
791
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
792
+ security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
793
+ source_dest_check: typing.Optional[builtins.bool] = None,
794
+ ssm_session_permissions: typing.Optional[builtins.bool] = None,
795
+ user_data: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.UserData] = None,
796
+ user_data_causes_replacement: typing.Optional[builtins.bool] = None,
797
+ vpc_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
798
+ ) -> None:
799
+ """Type checking stubs"""
800
+ pass
801
+
802
+ def _typecheckingstub__334eb01c668e6ca9bfd6d599da22858b05b079eeea1e7b6a9f71ee632f092b87(
803
+ *,
804
+ instance_type: _aws_cdk_aws_ec2_ceddda9d.InstanceType,
805
+ machine_image: _aws_cdk_aws_ec2_ceddda9d.IMachineImage,
806
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
807
+ allow_all_ipv6_outbound: typing.Optional[builtins.bool] = None,
808
+ allow_all_outbound: typing.Optional[builtins.bool] = None,
809
+ associate_public_ip_address: typing.Optional[builtins.bool] = None,
810
+ availability_zone: typing.Optional[builtins.str] = None,
811
+ block_devices: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.BlockDevice, typing.Dict[builtins.str, typing.Any]]]] = None,
812
+ credit_specification: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CpuCredits] = None,
813
+ detailed_monitoring: typing.Optional[builtins.bool] = None,
814
+ ebs_optimized: typing.Optional[builtins.bool] = None,
815
+ init: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CloudFormationInit] = None,
816
+ init_options: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.ApplyCloudFormationInitOptions, typing.Dict[builtins.str, typing.Any]]] = None,
817
+ instance_name: typing.Optional[builtins.str] = None,
818
+ key_name: typing.Optional[builtins.str] = None,
819
+ key_pair: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IKeyPair] = None,
820
+ placement_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IPlacementGroup] = None,
821
+ private_ip_address: typing.Optional[builtins.str] = None,
822
+ propagate_tags_to_volume_on_creation: typing.Optional[builtins.bool] = None,
823
+ require_imdsv2: typing.Optional[builtins.bool] = None,
824
+ resource_signal_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
825
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
826
+ security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
827
+ source_dest_check: typing.Optional[builtins.bool] = None,
828
+ ssm_session_permissions: typing.Optional[builtins.bool] = None,
829
+ user_data: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.UserData] = None,
830
+ user_data_causes_replacement: typing.Optional[builtins.bool] = None,
831
+ vpc_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
832
+ preinstalled_software: typing.Optional[typing.Union[PreinstalledSoftware, typing.Dict[builtins.str, typing.Any]]] = None,
833
+ ) -> None:
834
+ """Type checking stubs"""
835
+ pass
836
+
837
+ def _typecheckingstub__657dec901feded435d209f20ab5a0de458a54fdf89665912ea70cb5dfd6220fa(
838
+ *,
839
+ others: typing.Optional[typing.Sequence[builtins.str]] = None,
840
+ type: typing.Optional[typing.Sequence[PreinstalledSoftwareType]] = None,
841
+ ) -> None:
842
+ """Type checking stubs"""
843
+ pass
@@ -0,0 +1,30 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
3
+
4
+ import abc
5
+ import builtins
6
+ import datetime
7
+ import enum
8
+ import typing
9
+
10
+ import jsii
11
+ import publication
12
+ import typing_extensions
13
+
14
+ from typeguard import check_type
15
+
16
+ import aws_cdk._jsii
17
+ import constructs._jsii
18
+
19
+ __jsii_assembly__ = jsii.JSIIAssembly.load(
20
+ "cdk-preinstalled-amazon-linux-ec2",
21
+ "0.0.0",
22
+ __name__[0:-6],
23
+ "cdk-preinstalled-amazon-linux-ec2@0.0.0.jsii.tgz",
24
+ )
25
+
26
+ __all__ = [
27
+ "__jsii_assembly__",
28
+ ]
29
+
30
+ publication.publish()
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.1
2
+ Name: cdk-preinstalled-amazon-linux-ec2
3
+ Version: 0.0.0
4
+ Summary: CDK Construct for creating an Amazon Linux EC2 instance with pre-installed software
5
+ Home-page: https://github.com/badmintoncryer/cdk-preinstalled-amazon-linux-ec2.git
6
+ Author: Kazuho CryerShinozuka<malaysia.cryer@gmail.com>
7
+ License: Apache-2.0
8
+ Project-URL: Source, https://github.com/badmintoncryer/cdk-preinstalled-amazon-linux-ec2.git
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: JavaScript
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Typing :: Typed
18
+ Classifier: Development Status :: 5 - Production/Stable
19
+ Classifier: License :: OSI Approved
20
+ Requires-Python: ~=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: aws-cdk-lib <3.0.0,>=2.143.0
24
+ Requires-Dist: constructs <11.0.0,>=10.0.5
25
+ Requires-Dist: jsii <2.0.0,>=1.98.0
26
+ Requires-Dist: publication >=0.0.3
27
+ Requires-Dist: typeguard ~=2.13.3
28
+
29
+ # replace this
@@ -0,0 +1,9 @@
1
+ cdk_preinstalled_amazon_linux_ec2/__init__.py,sha256=VkgGwRKWjfj_vCPGykdwG3Gk_3zdyf4XWh-Xb7jKBoU,50605
2
+ cdk_preinstalled_amazon_linux_ec2/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ cdk_preinstalled_amazon_linux_ec2/_jsii/__init__.py,sha256=6KqpVggyI2FpFeVjyYVGrMc32yMaNSqTqBBS6VLKMI4,522
4
+ cdk_preinstalled_amazon_linux_ec2/_jsii/cdk-preinstalled-amazon-linux-ec2@0.0.0.jsii.tgz,sha256=Q6PPsN_DupqgV9qk_ZOzuHiDljNfKI9OH8ir473EBlM,24510
5
+ cdk_preinstalled_amazon_linux_ec2-0.0.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ cdk_preinstalled_amazon_linux_ec2-0.0.0.dist-info/METADATA,sha256=d0dLVeF3UFAMeWECIRIXSJysFhRLJJgbtfSGuRy6Pyo,1231
7
+ cdk_preinstalled_amazon_linux_ec2-0.0.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
8
+ cdk_preinstalled_amazon_linux_ec2-0.0.0.dist-info/top_level.txt,sha256=9-8USjq8vvN9Bm7BW8jTqhraimVCCUkpIUNhfVgADkk,34
9
+ cdk_preinstalled_amazon_linux_ec2-0.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.43.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ cdk_preinstalled_amazon_linux_ec2