tm-cdk-constructs 1.10.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,1009 @@
1
+ '''
2
+ # CDK construct lib
3
+
4
+ Welcome to Toumoro's AWS Service Wrapper CDK Construct Library! This library is designed to make it easy and efficient to deploy and manage AWS services within your CDK projects. Whether you're provisioning infrastructure for a simple web application or orchestrating a complex cloud-native architecture, this library aims to streamline your development process by providing high-level constructs for common AWS services.
5
+
6
+ ## Features
7
+
8
+ * Simplified Service Provisioning: Easily create and configure AWS services using intuitive CDK constructs.
9
+ * Best Practices Built-In: Leverage pre-configured settings and defaults based on AWS best practices to ensure reliable and secure deployments.
10
+ * Modular and Extensible: Compose your infrastructure using modular constructs, allowing for flexibility and reusability across projects.
11
+
12
+ # Contributing to CDK Construct Toumoro
13
+
14
+ [Contributing](CONTRIBUTING.md)
15
+
16
+ # Examples
17
+
18
+ [Examples](examples/README.md)
19
+
20
+ # Documentation API
21
+
22
+ [API](API.md)
23
+
24
+ # Developpement Guide
25
+
26
+ [AWS CDK Design Guidelines](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
27
+
28
+ ## Naming Conventions
29
+
30
+ 1. *Prefixes*:
31
+
32
+ * *Cfn* for CloudFormation resources.
33
+ * *Fn* for constructs generating CloudFormation functions.
34
+ * *As* for abstract classes.
35
+ * *I* for interfaces.
36
+ * *Vpc* for constructs related to Virtual Private Cloud.
37
+ * *Lambda* for constructs related to AWS Lambda.
38
+ * Example: CfnStack, FnSub, Aspects, IVpc, VpcNetwork, LambdaFunction.
39
+ 2. *Construct Names*:
40
+
41
+ * Use descriptive names that reflect the purpose of the construct.
42
+ * CamelCase for multi-word names.
43
+ * Avoid abbreviations unless they are widely understood.
44
+ * Example: BucketStack, RestApiConstruct, DatabaseCluster.
45
+ 3. *Property Names*:
46
+
47
+ * Follow AWS resource naming conventions where applicable.
48
+ * Use camelCase for property names.
49
+ * Use clear and concise names that reflect the purpose of the property.
50
+ * Example: bucketName, vpcId, functionName.
51
+ 4. *Method Names*:
52
+
53
+ * Use verbs or verb phrases to describe actions performed by methods.
54
+ * Use camelCase.
55
+ * Example: addBucketPolicy, createVpc, invokeLambda.
56
+ 5. *Interface Names*:
57
+
58
+ * Start with an uppercase I.
59
+ * Use clear and descriptive names.
60
+ * Example: IInstance, ISecurityGroup, IVpc.
61
+ 6. *Module Names*:
62
+
63
+ * Use lowercase with hyphens for separating words.
64
+ * Be descriptive but concise.
65
+ * Follow a hierarchy if necessary, e.g., aws-cdk.aws_s3 for S3-related constructs.
66
+ * Example: aws-cdk.aws_s3, aws-cdk.aws_ec2, aws-cdk.aws_lambda.
67
+ 7. *Variable Names*:
68
+
69
+ * Use descriptive names.
70
+ * CamelCase for multi-word names.
71
+ * Keep variable names concise but meaningful.
72
+ * Example: instanceCount, subnetIds, roleArn.
73
+ 8. *Enum and Constant Names*:
74
+
75
+ * Use uppercase for constants.
76
+ * CamelCase for multi-word names.
77
+ * Be descriptive about the purpose of the constant or enum.
78
+ * Example: MAX_RETRIES, HTTP_STATUS_CODES, VPC_CONFIG.
79
+ 9. *File Names*:
80
+
81
+ * Use lowercase with hyphens for separating words.
82
+ * Reflect the content of the file.
83
+ * Include version numbers if necessary.
84
+ * Example: s3-bucket-stack.ts, vpc-network.ts, lambda-function.ts.
85
+ 10. *Documentation Comments*:
86
+
87
+ * Use JSDoc or similar conventions to provide clear documentation for each construct, method, property, etc.
88
+ * Ensure that the documentation is up-to-date and accurately reflects the purpose and usage of the code.
89
+ '''
90
+ from pkgutil import extend_path
91
+ __path__ = extend_path(__path__, __name__)
92
+
93
+ import abc
94
+ import builtins
95
+ import datetime
96
+ import enum
97
+ import typing
98
+
99
+ import jsii
100
+ import publication
101
+ import typing_extensions
102
+
103
+ from typeguard import check_type
104
+
105
+ from ._jsii import *
106
+
107
+ import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
108
+ import aws_cdk.pipelines as _aws_cdk_pipelines_ceddda9d
109
+ import constructs as _constructs_77d1e7e8
110
+
111
+
112
+ class PipelineCdk(
113
+ _constructs_77d1e7e8.Construct,
114
+ metaclass=jsii.JSIIMeta,
115
+ jsii_type="tm-cdk-constructs.PipelineCdk",
116
+ ):
117
+ '''(experimental) A CDK construct that creates a CodePipeline.
118
+
119
+ :stability: experimental
120
+ '''
121
+
122
+ def __init__(
123
+ self,
124
+ scope: _constructs_77d1e7e8.Construct,
125
+ id: builtins.str,
126
+ *,
127
+ pipeline_name: builtins.str,
128
+ repo_branch: builtins.str,
129
+ repo_name: builtins.str,
130
+ primary_output_directory: typing.Optional[builtins.str] = None,
131
+ synth_command: typing.Optional[typing.Sequence[builtins.str]] = None,
132
+ ) -> None:
133
+ '''(experimental) Constructs a new instance of the PipelineCdk class.
134
+
135
+ :param scope: The parent construct.
136
+ :param id: The name of the construct.
137
+ :param pipeline_name: (experimental) The name of the pipeline.
138
+ :param repo_branch: (experimental) The branch of the repository to use.
139
+ :param repo_name: (experimental) The name of the repository.
140
+ :param primary_output_directory: (experimental) The primary output directory.
141
+ :param synth_command: (experimental) The command to run in the synth step.
142
+
143
+ :default: - No default properties.
144
+
145
+ :stability: experimental
146
+ '''
147
+ if __debug__:
148
+ type_hints = typing.get_type_hints(_typecheckingstub__985880a7910fd6edf5c5741ea978fbb5b0e315eb219ed47ba1e130dc12c9f678)
149
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
150
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
151
+ props = PipelineProps(
152
+ pipeline_name=pipeline_name,
153
+ repo_branch=repo_branch,
154
+ repo_name=repo_name,
155
+ primary_output_directory=primary_output_directory,
156
+ synth_command=synth_command,
157
+ )
158
+
159
+ jsii.create(self.__class__, self, [scope, id, props])
160
+
161
+ @builtins.property
162
+ @jsii.member(jsii_name="pipeline")
163
+ def pipeline(self) -> _aws_cdk_pipelines_ceddda9d.CodePipeline:
164
+ '''(experimental) The CodePipeline created by the construct.
165
+
166
+ :stability: experimental
167
+ '''
168
+ return typing.cast(_aws_cdk_pipelines_ceddda9d.CodePipeline, jsii.get(self, "pipeline"))
169
+
170
+
171
+ @jsii.data_type(
172
+ jsii_type="tm-cdk-constructs.PipelineProps",
173
+ jsii_struct_bases=[],
174
+ name_mapping={
175
+ "pipeline_name": "pipelineName",
176
+ "repo_branch": "repoBranch",
177
+ "repo_name": "repoName",
178
+ "primary_output_directory": "primaryOutputDirectory",
179
+ "synth_command": "synthCommand",
180
+ },
181
+ )
182
+ class PipelineProps:
183
+ def __init__(
184
+ self,
185
+ *,
186
+ pipeline_name: builtins.str,
187
+ repo_branch: builtins.str,
188
+ repo_name: builtins.str,
189
+ primary_output_directory: typing.Optional[builtins.str] = None,
190
+ synth_command: typing.Optional[typing.Sequence[builtins.str]] = None,
191
+ ) -> None:
192
+ '''
193
+ :param pipeline_name: (experimental) The name of the pipeline.
194
+ :param repo_branch: (experimental) The branch of the repository to use.
195
+ :param repo_name: (experimental) The name of the repository.
196
+ :param primary_output_directory: (experimental) The primary output directory.
197
+ :param synth_command: (experimental) The command to run in the synth step.
198
+
199
+ :stability: experimental
200
+ '''
201
+ if __debug__:
202
+ type_hints = typing.get_type_hints(_typecheckingstub__2ed7e76b87cf5426e873e9780076c4a5969d91577b03560bd46365cf422a074f)
203
+ check_type(argname="argument pipeline_name", value=pipeline_name, expected_type=type_hints["pipeline_name"])
204
+ check_type(argname="argument repo_branch", value=repo_branch, expected_type=type_hints["repo_branch"])
205
+ check_type(argname="argument repo_name", value=repo_name, expected_type=type_hints["repo_name"])
206
+ check_type(argname="argument primary_output_directory", value=primary_output_directory, expected_type=type_hints["primary_output_directory"])
207
+ check_type(argname="argument synth_command", value=synth_command, expected_type=type_hints["synth_command"])
208
+ self._values: typing.Dict[builtins.str, typing.Any] = {
209
+ "pipeline_name": pipeline_name,
210
+ "repo_branch": repo_branch,
211
+ "repo_name": repo_name,
212
+ }
213
+ if primary_output_directory is not None:
214
+ self._values["primary_output_directory"] = primary_output_directory
215
+ if synth_command is not None:
216
+ self._values["synth_command"] = synth_command
217
+
218
+ @builtins.property
219
+ def pipeline_name(self) -> builtins.str:
220
+ '''(experimental) The name of the pipeline.
221
+
222
+ :stability: experimental
223
+ '''
224
+ result = self._values.get("pipeline_name")
225
+ assert result is not None, "Required property 'pipeline_name' is missing"
226
+ return typing.cast(builtins.str, result)
227
+
228
+ @builtins.property
229
+ def repo_branch(self) -> builtins.str:
230
+ '''(experimental) The branch of the repository to use.
231
+
232
+ :stability: experimental
233
+ '''
234
+ result = self._values.get("repo_branch")
235
+ assert result is not None, "Required property 'repo_branch' is missing"
236
+ return typing.cast(builtins.str, result)
237
+
238
+ @builtins.property
239
+ def repo_name(self) -> builtins.str:
240
+ '''(experimental) The name of the repository.
241
+
242
+ :stability: experimental
243
+ '''
244
+ result = self._values.get("repo_name")
245
+ assert result is not None, "Required property 'repo_name' is missing"
246
+ return typing.cast(builtins.str, result)
247
+
248
+ @builtins.property
249
+ def primary_output_directory(self) -> typing.Optional[builtins.str]:
250
+ '''(experimental) The primary output directory.
251
+
252
+ :stability: experimental
253
+ '''
254
+ result = self._values.get("primary_output_directory")
255
+ return typing.cast(typing.Optional[builtins.str], result)
256
+
257
+ @builtins.property
258
+ def synth_command(self) -> typing.Optional[typing.List[builtins.str]]:
259
+ '''(experimental) The command to run in the synth step.
260
+
261
+ :stability: experimental
262
+ '''
263
+ result = self._values.get("synth_command")
264
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
265
+
266
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
267
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
268
+
269
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
270
+ return not (rhs == self)
271
+
272
+ def __repr__(self) -> str:
273
+ return "PipelineProps(%s)" % ", ".join(
274
+ k + "=" + repr(v) for k, v in self._values.items()
275
+ )
276
+
277
+
278
+ class TmVpcBase(
279
+ _aws_cdk_aws_ec2_ceddda9d.Vpc,
280
+ metaclass=jsii.JSIIMeta,
281
+ jsii_type="tm-cdk-constructs.TmVpcBase",
282
+ ):
283
+ '''(experimental) A VPC construct that creates a VPC with public and private subnets.
284
+
285
+ :stability: experimental
286
+ '''
287
+
288
+ def __init__(
289
+ self,
290
+ scope: _constructs_77d1e7e8.Construct,
291
+ id: builtins.str,
292
+ *,
293
+ range_cidr: builtins.str,
294
+ enable_endpoints: typing.Optional[typing.Sequence[builtins.str]] = None,
295
+ availability_zones: typing.Optional[typing.Sequence[builtins.str]] = None,
296
+ cidr: typing.Optional[builtins.str] = None,
297
+ create_internet_gateway: typing.Optional[builtins.bool] = None,
298
+ default_instance_tenancy: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.DefaultInstanceTenancy] = None,
299
+ enable_dns_hostnames: typing.Optional[builtins.bool] = None,
300
+ enable_dns_support: typing.Optional[builtins.bool] = None,
301
+ flow_logs: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.FlowLogOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
302
+ gateway_endpoints: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.GatewayVpcEndpointOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
303
+ ip_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpAddresses] = None,
304
+ ip_protocol: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IpProtocol] = None,
305
+ ipv6_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpv6Addresses] = None,
306
+ max_azs: typing.Optional[jsii.Number] = None,
307
+ nat_gateway_provider: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.NatProvider] = None,
308
+ nat_gateways: typing.Optional[jsii.Number] = None,
309
+ nat_gateway_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
310
+ reserved_azs: typing.Optional[jsii.Number] = None,
311
+ restrict_default_security_group: typing.Optional[builtins.bool] = None,
312
+ subnet_configuration: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
313
+ vpc_name: typing.Optional[builtins.str] = None,
314
+ vpn_connections: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpnConnectionOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
315
+ vpn_gateway: typing.Optional[builtins.bool] = None,
316
+ vpn_gateway_asn: typing.Optional[jsii.Number] = None,
317
+ vpn_route_propagation: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
318
+ ) -> None:
319
+ '''(experimental) The VPC created by the construct.
320
+
321
+ :param scope: -
322
+ :param id: -
323
+ :param range_cidr: (experimental) The CIDR block for the VPC.
324
+ :param enable_endpoints: (experimental) Indicates whether to enable the S3 endpoint for the VPC.
325
+ :param availability_zones: Availability zones this VPC spans. Specify this option only if you do not specify ``maxAzs``. Default: - a subset of AZs of the stack
326
+ :param cidr: (deprecated) The CIDR range to use for the VPC, e.g. '10.0.0.0/16'. Should be a minimum of /28 and maximum size of /16. The range will be split across all subnets per Availability Zone. Default: Vpc.DEFAULT_CIDR_RANGE
327
+ :param create_internet_gateway: If set to false then disable the creation of the default internet gateway. Default: true
328
+ :param default_instance_tenancy: The default tenancy of instances launched into the VPC. By setting this to dedicated tenancy, instances will be launched on hardware dedicated to a single AWS customer, unless specifically specified at instance launch time. Please note, not all instance types are usable with Dedicated tenancy. Default: DefaultInstanceTenancy.Default (shared) tenancy
329
+ :param enable_dns_hostnames: Indicates whether the instances launched in the VPC get public DNS hostnames. If this attribute is true, instances in the VPC get public DNS hostnames, but only if the enableDnsSupport attribute is also set to true. Default: true
330
+ :param enable_dns_support: Indicates whether the DNS resolution is supported for the VPC. If this attribute is false, the Amazon-provided DNS server in the VPC that resolves public DNS hostnames to IP addresses is not enabled. If this attribute is true, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC IPv4 network range plus two will succeed. Default: true
331
+ :param flow_logs: Flow logs to add to this VPC. Default: - No flow logs.
332
+ :param gateway_endpoints: Gateway endpoints to add to this VPC. Default: - None.
333
+ :param ip_addresses: The Provider to use to allocate IPv4 Space to your VPC. Options include static allocation or from a pool. Note this is specific to IPv4 addresses. Default: ec2.IpAddresses.cidr
334
+ :param ip_protocol: The protocol of the vpc. Options are IPv4 only or dual stack. Default: IpProtocol.IPV4_ONLY
335
+ :param ipv6_addresses: The Provider to use to allocate IPv6 Space to your VPC. Options include amazon provided CIDR block. Note this is specific to IPv6 addresses. Default: Ipv6Addresses.amazonProvided
336
+ :param max_azs: Define the maximum number of AZs to use in this region. If the region has more AZs than you want to use (for example, because of EIP limits), pick a lower number here. The AZs will be sorted and picked from the start of the list. If you pick a higher number than the number of AZs in the region, all AZs in the region will be selected. To use "all AZs" available to your account, use a high number (such as 99). Be aware that environment-agnostic stacks will be created with access to only 2 AZs, so to use more than 2 AZs, be sure to specify the account and region on your stack. Specify this option only if you do not specify ``availabilityZones``. Default: 3
337
+ :param nat_gateway_provider: What type of NAT provider to use. Select between NAT gateways or NAT instances. NAT gateways may not be available in all AWS regions. Default: NatProvider.gateway()
338
+ :param nat_gateways: The number of NAT Gateways/Instances to create. The type of NAT gateway or instance will be determined by the ``natGatewayProvider`` parameter. You can set this number lower than the number of Availability Zones in your VPC in order to save on NAT cost. Be aware you may be charged for cross-AZ data traffic instead. Default: - One NAT gateway/instance per Availability Zone
339
+ :param nat_gateway_subnets: Configures the subnets which will have NAT Gateways/Instances. You can pick a specific group of subnets by specifying the group name; the picked subnets must be public subnets. Only necessary if you have more than one public subnet group. Default: - All public subnets.
340
+ :param reserved_azs: Define the number of AZs to reserve. When specified, the IP space is reserved for the azs but no actual resources are provisioned. Default: 0
341
+ :param restrict_default_security_group: If set to true then the default inbound & outbound rules will be removed from the default security group. Default: true if '@aws-cdk/aws-ec2:restrictDefaultSecurityGroup' is enabled, false otherwise
342
+ :param subnet_configuration: Configure the subnets to build for each AZ. Each entry in this list configures a Subnet Group; each group will contain a subnet for each Availability Zone. For example, if you want 1 public subnet, 1 private subnet, and 1 isolated subnet in each AZ provide the following:: new ec2.Vpc(this, 'VPC', { subnetConfiguration: [ { cidrMask: 24, name: 'ingress', subnetType: ec2.SubnetType.PUBLIC, }, { cidrMask: 24, name: 'application', subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS, }, { cidrMask: 28, name: 'rds', subnetType: ec2.SubnetType.PRIVATE_ISOLATED, } ] }); Default: - The VPC CIDR will be evenly divided between 1 public and 1 private subnet per AZ.
343
+ :param vpc_name: The VPC name. Since the VPC resource doesn't support providing a physical name, the value provided here will be recorded in the ``Name`` tag Default: this.node.path
344
+ :param vpn_connections: VPN connections to this VPC. Default: - No connections.
345
+ :param vpn_gateway: Indicates whether a VPN gateway should be created and attached to this VPC. Default: - true when vpnGatewayAsn or vpnConnections is specified
346
+ :param vpn_gateway_asn: The private Autonomous System Number (ASN) for the VPN gateway. Default: - Amazon default ASN.
347
+ :param vpn_route_propagation: Where to propagate VPN routes. Default: - On the route tables associated with private subnets. If no private subnets exists, isolated subnets are used. If no isolated subnets exists, public subnets are used.
348
+
349
+ :stability: experimental
350
+ '''
351
+ if __debug__:
352
+ type_hints = typing.get_type_hints(_typecheckingstub__bbbf384773ee5d4094012bcdf005cac4c749df363829f0efba57bdfc122d59a1)
353
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
354
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
355
+ props = TmVpcProps(
356
+ range_cidr=range_cidr,
357
+ enable_endpoints=enable_endpoints,
358
+ availability_zones=availability_zones,
359
+ cidr=cidr,
360
+ create_internet_gateway=create_internet_gateway,
361
+ default_instance_tenancy=default_instance_tenancy,
362
+ enable_dns_hostnames=enable_dns_hostnames,
363
+ enable_dns_support=enable_dns_support,
364
+ flow_logs=flow_logs,
365
+ gateway_endpoints=gateway_endpoints,
366
+ ip_addresses=ip_addresses,
367
+ ip_protocol=ip_protocol,
368
+ ipv6_addresses=ipv6_addresses,
369
+ max_azs=max_azs,
370
+ nat_gateway_provider=nat_gateway_provider,
371
+ nat_gateways=nat_gateways,
372
+ nat_gateway_subnets=nat_gateway_subnets,
373
+ reserved_azs=reserved_azs,
374
+ restrict_default_security_group=restrict_default_security_group,
375
+ subnet_configuration=subnet_configuration,
376
+ vpc_name=vpc_name,
377
+ vpn_connections=vpn_connections,
378
+ vpn_gateway=vpn_gateway,
379
+ vpn_gateway_asn=vpn_gateway_asn,
380
+ vpn_route_propagation=vpn_route_propagation,
381
+ )
382
+
383
+ jsii.create(self.__class__, self, [scope, id, props])
384
+
385
+
386
+ @jsii.data_type(
387
+ jsii_type="tm-cdk-constructs.TmVpcProps",
388
+ jsii_struct_bases=[_aws_cdk_aws_ec2_ceddda9d.VpcProps],
389
+ name_mapping={
390
+ "availability_zones": "availabilityZones",
391
+ "cidr": "cidr",
392
+ "create_internet_gateway": "createInternetGateway",
393
+ "default_instance_tenancy": "defaultInstanceTenancy",
394
+ "enable_dns_hostnames": "enableDnsHostnames",
395
+ "enable_dns_support": "enableDnsSupport",
396
+ "flow_logs": "flowLogs",
397
+ "gateway_endpoints": "gatewayEndpoints",
398
+ "ip_addresses": "ipAddresses",
399
+ "ip_protocol": "ipProtocol",
400
+ "ipv6_addresses": "ipv6Addresses",
401
+ "max_azs": "maxAzs",
402
+ "nat_gateway_provider": "natGatewayProvider",
403
+ "nat_gateways": "natGateways",
404
+ "nat_gateway_subnets": "natGatewaySubnets",
405
+ "reserved_azs": "reservedAzs",
406
+ "restrict_default_security_group": "restrictDefaultSecurityGroup",
407
+ "subnet_configuration": "subnetConfiguration",
408
+ "vpc_name": "vpcName",
409
+ "vpn_connections": "vpnConnections",
410
+ "vpn_gateway": "vpnGateway",
411
+ "vpn_gateway_asn": "vpnGatewayAsn",
412
+ "vpn_route_propagation": "vpnRoutePropagation",
413
+ "range_cidr": "rangeCidr",
414
+ "enable_endpoints": "enableEndpoints",
415
+ },
416
+ )
417
+ class TmVpcProps(_aws_cdk_aws_ec2_ceddda9d.VpcProps):
418
+ def __init__(
419
+ self,
420
+ *,
421
+ availability_zones: typing.Optional[typing.Sequence[builtins.str]] = None,
422
+ cidr: typing.Optional[builtins.str] = None,
423
+ create_internet_gateway: typing.Optional[builtins.bool] = None,
424
+ default_instance_tenancy: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.DefaultInstanceTenancy] = None,
425
+ enable_dns_hostnames: typing.Optional[builtins.bool] = None,
426
+ enable_dns_support: typing.Optional[builtins.bool] = None,
427
+ flow_logs: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.FlowLogOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
428
+ gateway_endpoints: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.GatewayVpcEndpointOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
429
+ ip_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpAddresses] = None,
430
+ ip_protocol: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IpProtocol] = None,
431
+ ipv6_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpv6Addresses] = None,
432
+ max_azs: typing.Optional[jsii.Number] = None,
433
+ nat_gateway_provider: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.NatProvider] = None,
434
+ nat_gateways: typing.Optional[jsii.Number] = None,
435
+ nat_gateway_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
436
+ reserved_azs: typing.Optional[jsii.Number] = None,
437
+ restrict_default_security_group: typing.Optional[builtins.bool] = None,
438
+ subnet_configuration: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
439
+ vpc_name: typing.Optional[builtins.str] = None,
440
+ vpn_connections: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpnConnectionOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
441
+ vpn_gateway: typing.Optional[builtins.bool] = None,
442
+ vpn_gateway_asn: typing.Optional[jsii.Number] = None,
443
+ vpn_route_propagation: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
444
+ range_cidr: builtins.str,
445
+ enable_endpoints: typing.Optional[typing.Sequence[builtins.str]] = None,
446
+ ) -> None:
447
+ '''(experimental) Represents the configuration for a VPC.
448
+
449
+ :param availability_zones: Availability zones this VPC spans. Specify this option only if you do not specify ``maxAzs``. Default: - a subset of AZs of the stack
450
+ :param cidr: (deprecated) The CIDR range to use for the VPC, e.g. '10.0.0.0/16'. Should be a minimum of /28 and maximum size of /16. The range will be split across all subnets per Availability Zone. Default: Vpc.DEFAULT_CIDR_RANGE
451
+ :param create_internet_gateway: If set to false then disable the creation of the default internet gateway. Default: true
452
+ :param default_instance_tenancy: The default tenancy of instances launched into the VPC. By setting this to dedicated tenancy, instances will be launched on hardware dedicated to a single AWS customer, unless specifically specified at instance launch time. Please note, not all instance types are usable with Dedicated tenancy. Default: DefaultInstanceTenancy.Default (shared) tenancy
453
+ :param enable_dns_hostnames: Indicates whether the instances launched in the VPC get public DNS hostnames. If this attribute is true, instances in the VPC get public DNS hostnames, but only if the enableDnsSupport attribute is also set to true. Default: true
454
+ :param enable_dns_support: Indicates whether the DNS resolution is supported for the VPC. If this attribute is false, the Amazon-provided DNS server in the VPC that resolves public DNS hostnames to IP addresses is not enabled. If this attribute is true, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC IPv4 network range plus two will succeed. Default: true
455
+ :param flow_logs: Flow logs to add to this VPC. Default: - No flow logs.
456
+ :param gateway_endpoints: Gateway endpoints to add to this VPC. Default: - None.
457
+ :param ip_addresses: The Provider to use to allocate IPv4 Space to your VPC. Options include static allocation or from a pool. Note this is specific to IPv4 addresses. Default: ec2.IpAddresses.cidr
458
+ :param ip_protocol: The protocol of the vpc. Options are IPv4 only or dual stack. Default: IpProtocol.IPV4_ONLY
459
+ :param ipv6_addresses: The Provider to use to allocate IPv6 Space to your VPC. Options include amazon provided CIDR block. Note this is specific to IPv6 addresses. Default: Ipv6Addresses.amazonProvided
460
+ :param max_azs: Define the maximum number of AZs to use in this region. If the region has more AZs than you want to use (for example, because of EIP limits), pick a lower number here. The AZs will be sorted and picked from the start of the list. If you pick a higher number than the number of AZs in the region, all AZs in the region will be selected. To use "all AZs" available to your account, use a high number (such as 99). Be aware that environment-agnostic stacks will be created with access to only 2 AZs, so to use more than 2 AZs, be sure to specify the account and region on your stack. Specify this option only if you do not specify ``availabilityZones``. Default: 3
461
+ :param nat_gateway_provider: What type of NAT provider to use. Select between NAT gateways or NAT instances. NAT gateways may not be available in all AWS regions. Default: NatProvider.gateway()
462
+ :param nat_gateways: The number of NAT Gateways/Instances to create. The type of NAT gateway or instance will be determined by the ``natGatewayProvider`` parameter. You can set this number lower than the number of Availability Zones in your VPC in order to save on NAT cost. Be aware you may be charged for cross-AZ data traffic instead. Default: - One NAT gateway/instance per Availability Zone
463
+ :param nat_gateway_subnets: Configures the subnets which will have NAT Gateways/Instances. You can pick a specific group of subnets by specifying the group name; the picked subnets must be public subnets. Only necessary if you have more than one public subnet group. Default: - All public subnets.
464
+ :param reserved_azs: Define the number of AZs to reserve. When specified, the IP space is reserved for the azs but no actual resources are provisioned. Default: 0
465
+ :param restrict_default_security_group: If set to true then the default inbound & outbound rules will be removed from the default security group. Default: true if '@aws-cdk/aws-ec2:restrictDefaultSecurityGroup' is enabled, false otherwise
466
+ :param subnet_configuration: Configure the subnets to build for each AZ. Each entry in this list configures a Subnet Group; each group will contain a subnet for each Availability Zone. For example, if you want 1 public subnet, 1 private subnet, and 1 isolated subnet in each AZ provide the following:: new ec2.Vpc(this, 'VPC', { subnetConfiguration: [ { cidrMask: 24, name: 'ingress', subnetType: ec2.SubnetType.PUBLIC, }, { cidrMask: 24, name: 'application', subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS, }, { cidrMask: 28, name: 'rds', subnetType: ec2.SubnetType.PRIVATE_ISOLATED, } ] }); Default: - The VPC CIDR will be evenly divided between 1 public and 1 private subnet per AZ.
467
+ :param vpc_name: The VPC name. Since the VPC resource doesn't support providing a physical name, the value provided here will be recorded in the ``Name`` tag Default: this.node.path
468
+ :param vpn_connections: VPN connections to this VPC. Default: - No connections.
469
+ :param vpn_gateway: Indicates whether a VPN gateway should be created and attached to this VPC. Default: - true when vpnGatewayAsn or vpnConnections is specified
470
+ :param vpn_gateway_asn: The private Autonomous System Number (ASN) for the VPN gateway. Default: - Amazon default ASN.
471
+ :param vpn_route_propagation: Where to propagate VPN routes. Default: - On the route tables associated with private subnets. If no private subnets exists, isolated subnets are used. If no isolated subnets exists, public subnets are used.
472
+ :param range_cidr: (experimental) The CIDR block for the VPC.
473
+ :param enable_endpoints: (experimental) Indicates whether to enable the S3 endpoint for the VPC.
474
+
475
+ :stability: experimental
476
+ '''
477
+ if isinstance(nat_gateway_subnets, dict):
478
+ nat_gateway_subnets = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**nat_gateway_subnets)
479
+ if __debug__:
480
+ type_hints = typing.get_type_hints(_typecheckingstub__6215cfcb5e410d0a1155ca30efab18d6b3cf0f425461591df31e65ec5978275e)
481
+ check_type(argname="argument availability_zones", value=availability_zones, expected_type=type_hints["availability_zones"])
482
+ check_type(argname="argument cidr", value=cidr, expected_type=type_hints["cidr"])
483
+ check_type(argname="argument create_internet_gateway", value=create_internet_gateway, expected_type=type_hints["create_internet_gateway"])
484
+ check_type(argname="argument default_instance_tenancy", value=default_instance_tenancy, expected_type=type_hints["default_instance_tenancy"])
485
+ check_type(argname="argument enable_dns_hostnames", value=enable_dns_hostnames, expected_type=type_hints["enable_dns_hostnames"])
486
+ check_type(argname="argument enable_dns_support", value=enable_dns_support, expected_type=type_hints["enable_dns_support"])
487
+ check_type(argname="argument flow_logs", value=flow_logs, expected_type=type_hints["flow_logs"])
488
+ check_type(argname="argument gateway_endpoints", value=gateway_endpoints, expected_type=type_hints["gateway_endpoints"])
489
+ check_type(argname="argument ip_addresses", value=ip_addresses, expected_type=type_hints["ip_addresses"])
490
+ check_type(argname="argument ip_protocol", value=ip_protocol, expected_type=type_hints["ip_protocol"])
491
+ check_type(argname="argument ipv6_addresses", value=ipv6_addresses, expected_type=type_hints["ipv6_addresses"])
492
+ check_type(argname="argument max_azs", value=max_azs, expected_type=type_hints["max_azs"])
493
+ check_type(argname="argument nat_gateway_provider", value=nat_gateway_provider, expected_type=type_hints["nat_gateway_provider"])
494
+ check_type(argname="argument nat_gateways", value=nat_gateways, expected_type=type_hints["nat_gateways"])
495
+ check_type(argname="argument nat_gateway_subnets", value=nat_gateway_subnets, expected_type=type_hints["nat_gateway_subnets"])
496
+ check_type(argname="argument reserved_azs", value=reserved_azs, expected_type=type_hints["reserved_azs"])
497
+ check_type(argname="argument restrict_default_security_group", value=restrict_default_security_group, expected_type=type_hints["restrict_default_security_group"])
498
+ check_type(argname="argument subnet_configuration", value=subnet_configuration, expected_type=type_hints["subnet_configuration"])
499
+ check_type(argname="argument vpc_name", value=vpc_name, expected_type=type_hints["vpc_name"])
500
+ check_type(argname="argument vpn_connections", value=vpn_connections, expected_type=type_hints["vpn_connections"])
501
+ check_type(argname="argument vpn_gateway", value=vpn_gateway, expected_type=type_hints["vpn_gateway"])
502
+ check_type(argname="argument vpn_gateway_asn", value=vpn_gateway_asn, expected_type=type_hints["vpn_gateway_asn"])
503
+ check_type(argname="argument vpn_route_propagation", value=vpn_route_propagation, expected_type=type_hints["vpn_route_propagation"])
504
+ check_type(argname="argument range_cidr", value=range_cidr, expected_type=type_hints["range_cidr"])
505
+ check_type(argname="argument enable_endpoints", value=enable_endpoints, expected_type=type_hints["enable_endpoints"])
506
+ self._values: typing.Dict[builtins.str, typing.Any] = {
507
+ "range_cidr": range_cidr,
508
+ }
509
+ if availability_zones is not None:
510
+ self._values["availability_zones"] = availability_zones
511
+ if cidr is not None:
512
+ self._values["cidr"] = cidr
513
+ if create_internet_gateway is not None:
514
+ self._values["create_internet_gateway"] = create_internet_gateway
515
+ if default_instance_tenancy is not None:
516
+ self._values["default_instance_tenancy"] = default_instance_tenancy
517
+ if enable_dns_hostnames is not None:
518
+ self._values["enable_dns_hostnames"] = enable_dns_hostnames
519
+ if enable_dns_support is not None:
520
+ self._values["enable_dns_support"] = enable_dns_support
521
+ if flow_logs is not None:
522
+ self._values["flow_logs"] = flow_logs
523
+ if gateway_endpoints is not None:
524
+ self._values["gateway_endpoints"] = gateway_endpoints
525
+ if ip_addresses is not None:
526
+ self._values["ip_addresses"] = ip_addresses
527
+ if ip_protocol is not None:
528
+ self._values["ip_protocol"] = ip_protocol
529
+ if ipv6_addresses is not None:
530
+ self._values["ipv6_addresses"] = ipv6_addresses
531
+ if max_azs is not None:
532
+ self._values["max_azs"] = max_azs
533
+ if nat_gateway_provider is not None:
534
+ self._values["nat_gateway_provider"] = nat_gateway_provider
535
+ if nat_gateways is not None:
536
+ self._values["nat_gateways"] = nat_gateways
537
+ if nat_gateway_subnets is not None:
538
+ self._values["nat_gateway_subnets"] = nat_gateway_subnets
539
+ if reserved_azs is not None:
540
+ self._values["reserved_azs"] = reserved_azs
541
+ if restrict_default_security_group is not None:
542
+ self._values["restrict_default_security_group"] = restrict_default_security_group
543
+ if subnet_configuration is not None:
544
+ self._values["subnet_configuration"] = subnet_configuration
545
+ if vpc_name is not None:
546
+ self._values["vpc_name"] = vpc_name
547
+ if vpn_connections is not None:
548
+ self._values["vpn_connections"] = vpn_connections
549
+ if vpn_gateway is not None:
550
+ self._values["vpn_gateway"] = vpn_gateway
551
+ if vpn_gateway_asn is not None:
552
+ self._values["vpn_gateway_asn"] = vpn_gateway_asn
553
+ if vpn_route_propagation is not None:
554
+ self._values["vpn_route_propagation"] = vpn_route_propagation
555
+ if enable_endpoints is not None:
556
+ self._values["enable_endpoints"] = enable_endpoints
557
+
558
+ @builtins.property
559
+ def availability_zones(self) -> typing.Optional[typing.List[builtins.str]]:
560
+ '''Availability zones this VPC spans.
561
+
562
+ Specify this option only if you do not specify ``maxAzs``.
563
+
564
+ :default: - a subset of AZs of the stack
565
+ '''
566
+ result = self._values.get("availability_zones")
567
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
568
+
569
+ @builtins.property
570
+ def cidr(self) -> typing.Optional[builtins.str]:
571
+ '''(deprecated) The CIDR range to use for the VPC, e.g. '10.0.0.0/16'.
572
+
573
+ Should be a minimum of /28 and maximum size of /16. The range will be
574
+ split across all subnets per Availability Zone.
575
+
576
+ :default: Vpc.DEFAULT_CIDR_RANGE
577
+
578
+ :deprecated: Use ipAddresses instead
579
+
580
+ :stability: deprecated
581
+ '''
582
+ result = self._values.get("cidr")
583
+ return typing.cast(typing.Optional[builtins.str], result)
584
+
585
+ @builtins.property
586
+ def create_internet_gateway(self) -> typing.Optional[builtins.bool]:
587
+ '''If set to false then disable the creation of the default internet gateway.
588
+
589
+ :default: true
590
+ '''
591
+ result = self._values.get("create_internet_gateway")
592
+ return typing.cast(typing.Optional[builtins.bool], result)
593
+
594
+ @builtins.property
595
+ def default_instance_tenancy(
596
+ self,
597
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.DefaultInstanceTenancy]:
598
+ '''The default tenancy of instances launched into the VPC.
599
+
600
+ By setting this to dedicated tenancy, instances will be launched on
601
+ hardware dedicated to a single AWS customer, unless specifically specified
602
+ at instance launch time. Please note, not all instance types are usable
603
+ with Dedicated tenancy.
604
+
605
+ :default: DefaultInstanceTenancy.Default (shared) tenancy
606
+ '''
607
+ result = self._values.get("default_instance_tenancy")
608
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.DefaultInstanceTenancy], result)
609
+
610
+ @builtins.property
611
+ def enable_dns_hostnames(self) -> typing.Optional[builtins.bool]:
612
+ '''Indicates whether the instances launched in the VPC get public DNS hostnames.
613
+
614
+ If this attribute is true, instances in the VPC get public DNS hostnames,
615
+ but only if the enableDnsSupport attribute is also set to true.
616
+
617
+ :default: true
618
+ '''
619
+ result = self._values.get("enable_dns_hostnames")
620
+ return typing.cast(typing.Optional[builtins.bool], result)
621
+
622
+ @builtins.property
623
+ def enable_dns_support(self) -> typing.Optional[builtins.bool]:
624
+ '''Indicates whether the DNS resolution is supported for the VPC.
625
+
626
+ If this attribute is false, the Amazon-provided DNS server in the VPC that
627
+ resolves public DNS hostnames to IP addresses is not enabled. If this
628
+ attribute is true, queries to the Amazon provided DNS server at the
629
+ 169.254.169.253 IP address, or the reserved IP address at the base of the
630
+ VPC IPv4 network range plus two will succeed.
631
+
632
+ :default: true
633
+ '''
634
+ result = self._values.get("enable_dns_support")
635
+ return typing.cast(typing.Optional[builtins.bool], result)
636
+
637
+ @builtins.property
638
+ def flow_logs(
639
+ self,
640
+ ) -> typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_ec2_ceddda9d.FlowLogOptions]]:
641
+ '''Flow logs to add to this VPC.
642
+
643
+ :default: - No flow logs.
644
+ '''
645
+ result = self._values.get("flow_logs")
646
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_ec2_ceddda9d.FlowLogOptions]], result)
647
+
648
+ @builtins.property
649
+ def gateway_endpoints(
650
+ self,
651
+ ) -> typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_ec2_ceddda9d.GatewayVpcEndpointOptions]]:
652
+ '''Gateway endpoints to add to this VPC.
653
+
654
+ :default: - None.
655
+ '''
656
+ result = self._values.get("gateway_endpoints")
657
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_ec2_ceddda9d.GatewayVpcEndpointOptions]], result)
658
+
659
+ @builtins.property
660
+ def ip_addresses(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpAddresses]:
661
+ '''The Provider to use to allocate IPv4 Space to your VPC.
662
+
663
+ Options include static allocation or from a pool.
664
+
665
+ Note this is specific to IPv4 addresses.
666
+
667
+ :default: ec2.IpAddresses.cidr
668
+ '''
669
+ result = self._values.get("ip_addresses")
670
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpAddresses], result)
671
+
672
+ @builtins.property
673
+ def ip_protocol(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IpProtocol]:
674
+ '''The protocol of the vpc.
675
+
676
+ Options are IPv4 only or dual stack.
677
+
678
+ :default: IpProtocol.IPV4_ONLY
679
+ '''
680
+ result = self._values.get("ip_protocol")
681
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IpProtocol], result)
682
+
683
+ @builtins.property
684
+ def ipv6_addresses(
685
+ self,
686
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpv6Addresses]:
687
+ '''The Provider to use to allocate IPv6 Space to your VPC.
688
+
689
+ Options include amazon provided CIDR block.
690
+
691
+ Note this is specific to IPv6 addresses.
692
+
693
+ :default: Ipv6Addresses.amazonProvided
694
+ '''
695
+ result = self._values.get("ipv6_addresses")
696
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpv6Addresses], result)
697
+
698
+ @builtins.property
699
+ def max_azs(self) -> typing.Optional[jsii.Number]:
700
+ '''Define the maximum number of AZs to use in this region.
701
+
702
+ If the region has more AZs than you want to use (for example, because of
703
+ EIP limits), pick a lower number here. The AZs will be sorted and picked
704
+ from the start of the list.
705
+
706
+ If you pick a higher number than the number of AZs in the region, all AZs
707
+ in the region will be selected. To use "all AZs" available to your
708
+ account, use a high number (such as 99).
709
+
710
+ Be aware that environment-agnostic stacks will be created with access to
711
+ only 2 AZs, so to use more than 2 AZs, be sure to specify the account and
712
+ region on your stack.
713
+
714
+ Specify this option only if you do not specify ``availabilityZones``.
715
+
716
+ :default: 3
717
+ '''
718
+ result = self._values.get("max_azs")
719
+ return typing.cast(typing.Optional[jsii.Number], result)
720
+
721
+ @builtins.property
722
+ def nat_gateway_provider(
723
+ self,
724
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.NatProvider]:
725
+ '''What type of NAT provider to use.
726
+
727
+ Select between NAT gateways or NAT instances. NAT gateways
728
+ may not be available in all AWS regions.
729
+
730
+ :default: NatProvider.gateway()
731
+ '''
732
+ result = self._values.get("nat_gateway_provider")
733
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.NatProvider], result)
734
+
735
+ @builtins.property
736
+ def nat_gateways(self) -> typing.Optional[jsii.Number]:
737
+ '''The number of NAT Gateways/Instances to create.
738
+
739
+ The type of NAT gateway or instance will be determined by the
740
+ ``natGatewayProvider`` parameter.
741
+
742
+ You can set this number lower than the number of Availability Zones in your
743
+ VPC in order to save on NAT cost. Be aware you may be charged for
744
+ cross-AZ data traffic instead.
745
+
746
+ :default: - One NAT gateway/instance per Availability Zone
747
+ '''
748
+ result = self._values.get("nat_gateways")
749
+ return typing.cast(typing.Optional[jsii.Number], result)
750
+
751
+ @builtins.property
752
+ def nat_gateway_subnets(
753
+ self,
754
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
755
+ '''Configures the subnets which will have NAT Gateways/Instances.
756
+
757
+ You can pick a specific group of subnets by specifying the group name;
758
+ the picked subnets must be public subnets.
759
+
760
+ Only necessary if you have more than one public subnet group.
761
+
762
+ :default: - All public subnets.
763
+ '''
764
+ result = self._values.get("nat_gateway_subnets")
765
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
766
+
767
+ @builtins.property
768
+ def reserved_azs(self) -> typing.Optional[jsii.Number]:
769
+ '''Define the number of AZs to reserve.
770
+
771
+ When specified, the IP space is reserved for the azs but no actual
772
+ resources are provisioned.
773
+
774
+ :default: 0
775
+ '''
776
+ result = self._values.get("reserved_azs")
777
+ return typing.cast(typing.Optional[jsii.Number], result)
778
+
779
+ @builtins.property
780
+ def restrict_default_security_group(self) -> typing.Optional[builtins.bool]:
781
+ '''If set to true then the default inbound & outbound rules will be removed from the default security group.
782
+
783
+ :default: true if '@aws-cdk/aws-ec2:restrictDefaultSecurityGroup' is enabled, false otherwise
784
+ '''
785
+ result = self._values.get("restrict_default_security_group")
786
+ return typing.cast(typing.Optional[builtins.bool], result)
787
+
788
+ @builtins.property
789
+ def subnet_configuration(
790
+ self,
791
+ ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.SubnetConfiguration]]:
792
+ '''Configure the subnets to build for each AZ.
793
+
794
+ Each entry in this list configures a Subnet Group; each group will contain a
795
+ subnet for each Availability Zone.
796
+
797
+ For example, if you want 1 public subnet, 1 private subnet, and 1 isolated
798
+ subnet in each AZ provide the following::
799
+
800
+ new ec2.Vpc(this, 'VPC', {
801
+ subnetConfiguration: [
802
+ {
803
+ cidrMask: 24,
804
+ name: 'ingress',
805
+ subnetType: ec2.SubnetType.PUBLIC,
806
+ },
807
+ {
808
+ cidrMask: 24,
809
+ name: 'application',
810
+ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
811
+ },
812
+ {
813
+ cidrMask: 28,
814
+ name: 'rds',
815
+ subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
816
+ }
817
+ ]
818
+ });
819
+
820
+ :default:
821
+
822
+ - The VPC CIDR will be evenly divided between 1 public and 1
823
+ private subnet per AZ.
824
+ '''
825
+ result = self._values.get("subnet_configuration")
826
+ return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.SubnetConfiguration]], result)
827
+
828
+ @builtins.property
829
+ def vpc_name(self) -> typing.Optional[builtins.str]:
830
+ '''The VPC name.
831
+
832
+ Since the VPC resource doesn't support providing a physical name, the value provided here will be recorded in the ``Name`` tag
833
+
834
+ :default: this.node.path
835
+ '''
836
+ result = self._values.get("vpc_name")
837
+ return typing.cast(typing.Optional[builtins.str], result)
838
+
839
+ @builtins.property
840
+ def vpn_connections(
841
+ self,
842
+ ) -> typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_ec2_ceddda9d.VpnConnectionOptions]]:
843
+ '''VPN connections to this VPC.
844
+
845
+ :default: - No connections.
846
+ '''
847
+ result = self._values.get("vpn_connections")
848
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_ec2_ceddda9d.VpnConnectionOptions]], result)
849
+
850
+ @builtins.property
851
+ def vpn_gateway(self) -> typing.Optional[builtins.bool]:
852
+ '''Indicates whether a VPN gateway should be created and attached to this VPC.
853
+
854
+ :default: - true when vpnGatewayAsn or vpnConnections is specified
855
+ '''
856
+ result = self._values.get("vpn_gateway")
857
+ return typing.cast(typing.Optional[builtins.bool], result)
858
+
859
+ @builtins.property
860
+ def vpn_gateway_asn(self) -> typing.Optional[jsii.Number]:
861
+ '''The private Autonomous System Number (ASN) for the VPN gateway.
862
+
863
+ :default: - Amazon default ASN.
864
+ '''
865
+ result = self._values.get("vpn_gateway_asn")
866
+ return typing.cast(typing.Optional[jsii.Number], result)
867
+
868
+ @builtins.property
869
+ def vpn_route_propagation(
870
+ self,
871
+ ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]]:
872
+ '''Where to propagate VPN routes.
873
+
874
+ :default:
875
+
876
+ - On the route tables associated with private subnets. If no
877
+ private subnets exists, isolated subnets are used. If no isolated subnets
878
+ exists, public subnets are used.
879
+ '''
880
+ result = self._values.get("vpn_route_propagation")
881
+ return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]], result)
882
+
883
+ @builtins.property
884
+ def range_cidr(self) -> builtins.str:
885
+ '''(experimental) The CIDR block for the VPC.
886
+
887
+ :stability: experimental
888
+ '''
889
+ result = self._values.get("range_cidr")
890
+ assert result is not None, "Required property 'range_cidr' is missing"
891
+ return typing.cast(builtins.str, result)
892
+
893
+ @builtins.property
894
+ def enable_endpoints(self) -> typing.Optional[typing.List[builtins.str]]:
895
+ '''(experimental) Indicates whether to enable the S3 endpoint for the VPC.
896
+
897
+ :stability: experimental
898
+ '''
899
+ result = self._values.get("enable_endpoints")
900
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
901
+
902
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
903
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
904
+
905
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
906
+ return not (rhs == self)
907
+
908
+ def __repr__(self) -> str:
909
+ return "TmVpcProps(%s)" % ", ".join(
910
+ k + "=" + repr(v) for k, v in self._values.items()
911
+ )
912
+
913
+
914
+ __all__ = [
915
+ "PipelineCdk",
916
+ "PipelineProps",
917
+ "TmVpcBase",
918
+ "TmVpcProps",
919
+ ]
920
+
921
+ publication.publish()
922
+
923
+ def _typecheckingstub__985880a7910fd6edf5c5741ea978fbb5b0e315eb219ed47ba1e130dc12c9f678(
924
+ scope: _constructs_77d1e7e8.Construct,
925
+ id: builtins.str,
926
+ *,
927
+ pipeline_name: builtins.str,
928
+ repo_branch: builtins.str,
929
+ repo_name: builtins.str,
930
+ primary_output_directory: typing.Optional[builtins.str] = None,
931
+ synth_command: typing.Optional[typing.Sequence[builtins.str]] = None,
932
+ ) -> None:
933
+ """Type checking stubs"""
934
+ pass
935
+
936
+ def _typecheckingstub__2ed7e76b87cf5426e873e9780076c4a5969d91577b03560bd46365cf422a074f(
937
+ *,
938
+ pipeline_name: builtins.str,
939
+ repo_branch: builtins.str,
940
+ repo_name: builtins.str,
941
+ primary_output_directory: typing.Optional[builtins.str] = None,
942
+ synth_command: typing.Optional[typing.Sequence[builtins.str]] = None,
943
+ ) -> None:
944
+ """Type checking stubs"""
945
+ pass
946
+
947
+ def _typecheckingstub__bbbf384773ee5d4094012bcdf005cac4c749df363829f0efba57bdfc122d59a1(
948
+ scope: _constructs_77d1e7e8.Construct,
949
+ id: builtins.str,
950
+ *,
951
+ range_cidr: builtins.str,
952
+ enable_endpoints: typing.Optional[typing.Sequence[builtins.str]] = None,
953
+ availability_zones: typing.Optional[typing.Sequence[builtins.str]] = None,
954
+ cidr: typing.Optional[builtins.str] = None,
955
+ create_internet_gateway: typing.Optional[builtins.bool] = None,
956
+ default_instance_tenancy: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.DefaultInstanceTenancy] = None,
957
+ enable_dns_hostnames: typing.Optional[builtins.bool] = None,
958
+ enable_dns_support: typing.Optional[builtins.bool] = None,
959
+ flow_logs: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.FlowLogOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
960
+ gateway_endpoints: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.GatewayVpcEndpointOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
961
+ ip_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpAddresses] = None,
962
+ ip_protocol: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IpProtocol] = None,
963
+ ipv6_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpv6Addresses] = None,
964
+ max_azs: typing.Optional[jsii.Number] = None,
965
+ nat_gateway_provider: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.NatProvider] = None,
966
+ nat_gateways: typing.Optional[jsii.Number] = None,
967
+ nat_gateway_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
968
+ reserved_azs: typing.Optional[jsii.Number] = None,
969
+ restrict_default_security_group: typing.Optional[builtins.bool] = None,
970
+ subnet_configuration: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
971
+ vpc_name: typing.Optional[builtins.str] = None,
972
+ vpn_connections: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpnConnectionOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
973
+ vpn_gateway: typing.Optional[builtins.bool] = None,
974
+ vpn_gateway_asn: typing.Optional[jsii.Number] = None,
975
+ vpn_route_propagation: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
976
+ ) -> None:
977
+ """Type checking stubs"""
978
+ pass
979
+
980
+ def _typecheckingstub__6215cfcb5e410d0a1155ca30efab18d6b3cf0f425461591df31e65ec5978275e(
981
+ *,
982
+ availability_zones: typing.Optional[typing.Sequence[builtins.str]] = None,
983
+ cidr: typing.Optional[builtins.str] = None,
984
+ create_internet_gateway: typing.Optional[builtins.bool] = None,
985
+ default_instance_tenancy: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.DefaultInstanceTenancy] = None,
986
+ enable_dns_hostnames: typing.Optional[builtins.bool] = None,
987
+ enable_dns_support: typing.Optional[builtins.bool] = None,
988
+ flow_logs: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.FlowLogOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
989
+ gateway_endpoints: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.GatewayVpcEndpointOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
990
+ ip_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpAddresses] = None,
991
+ ip_protocol: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IpProtocol] = None,
992
+ ipv6_addresses: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IIpv6Addresses] = None,
993
+ max_azs: typing.Optional[jsii.Number] = None,
994
+ nat_gateway_provider: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.NatProvider] = None,
995
+ nat_gateways: typing.Optional[jsii.Number] = None,
996
+ nat_gateway_subnets: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
997
+ reserved_azs: typing.Optional[jsii.Number] = None,
998
+ restrict_default_security_group: typing.Optional[builtins.bool] = None,
999
+ subnet_configuration: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
1000
+ vpc_name: typing.Optional[builtins.str] = None,
1001
+ vpn_connections: typing.Optional[typing.Mapping[builtins.str, typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpnConnectionOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
1002
+ vpn_gateway: typing.Optional[builtins.bool] = None,
1003
+ vpn_gateway_asn: typing.Optional[jsii.Number] = None,
1004
+ vpn_route_propagation: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
1005
+ range_cidr: builtins.str,
1006
+ enable_endpoints: typing.Optional[typing.Sequence[builtins.str]] = None,
1007
+ ) -> None:
1008
+ """Type checking stubs"""
1009
+ pass