microsoft-cdktfconstructs 0.0.3.dev11__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.
Files changed (27) hide show
  1. microsoft_cdktfconstructs/__init__.py +217 -0
  2. microsoft_cdktfconstructs/_jsii/__init__.py +31 -0
  3. microsoft_cdktfconstructs/_jsii/terraform-cdk-constructs@0.0.3-pre.11.jsii.tgz +0 -0
  4. microsoft_cdktfconstructs/azure_applicationgateway/__init__.py +823 -0
  5. microsoft_cdktfconstructs/azure_applicationinsights/__init__.py +397 -0
  6. microsoft_cdktfconstructs/azure_containerregistry/__init__.py +320 -0
  7. microsoft_cdktfconstructs/azure_eventhub/__init__.py +2213 -0
  8. microsoft_cdktfconstructs/azure_functionapp/__init__.py +908 -0
  9. microsoft_cdktfconstructs/azure_keyvault/__init__.py +1982 -0
  10. microsoft_cdktfconstructs/azure_kubernetes/__init__.py +400 -0
  11. microsoft_cdktfconstructs/azure_kusto/__init__.py +2485 -0
  12. microsoft_cdktfconstructs/azure_loganalytics/__init__.py +652 -0
  13. microsoft_cdktfconstructs/azure_metricalert/__init__.py +1260 -0
  14. microsoft_cdktfconstructs/azure_networksecuritygroup/__init__.py +1742 -0
  15. microsoft_cdktfconstructs/azure_queryrulealert/__init__.py +1189 -0
  16. microsoft_cdktfconstructs/azure_resourcegroup/__init__.py +320 -0
  17. microsoft_cdktfconstructs/azure_storageaccount/__init__.py +1910 -0
  18. microsoft_cdktfconstructs/azure_virtualmachine/__init__.py +1460 -0
  19. microsoft_cdktfconstructs/azure_virtualmachinescaleset/__init__.py +1185 -0
  20. microsoft_cdktfconstructs/azure_virtualnetwork/__init__.py +707 -0
  21. microsoft_cdktfconstructs/core_azure/__init__.py +931 -0
  22. microsoft_cdktfconstructs/py.typed +1 -0
  23. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/LICENSE +19 -0
  24. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/METADATA +188 -0
  25. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/RECORD +27 -0
  26. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/WHEEL +5 -0
  27. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/top_level.txt +1 -0
@@ -0,0 +1,707 @@
1
+ '''
2
+ # Azure Virtual Network Construct
3
+
4
+ This class represents an Azure Virtual Network. It provides a convenient way to manage Azure Virtual Networks and their associated subnets.
5
+
6
+ ## What is an Azure Virtual Network?
7
+
8
+ Azure Virtual Network (VNet) is the fundamental building block for your private network in Azure. VNet enables many types of Azure resources, such as Azure Virtual Machines (VM), to securely communicate with each other, the internet, and on-premises networks. VNet is similar to a traditional network that you'd operate in your own data center but brings with it additional benefits of Azure's infrastructure.
9
+
10
+ [Learn more about Azure Virtual Network](https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview).
11
+
12
+ ## Azure Virtual Network Best Practices
13
+
14
+ * Design your VNets with multiple subnets for better segmentation.
15
+ * Avoid overlapping IP address ranges with your on-premises network space.
16
+ * Use Network Security Groups (NSGs) to control inbound and outbound traffic to network interfaces (NIC), VMs, and subnets.
17
+ * Implement VNet peering for efficient and secure communication between VNets.
18
+ * Regularly audit and monitor network resources using Azure Monitor and Network Watcher.
19
+
20
+ ## Azure Virtual Network Class Properties
21
+
22
+ This class has several properties that control the Azure Virtual Network's behavior:
23
+
24
+ * `resourceGroupName`: The name of the Azure Resource Group.
25
+ * `name`: The name of the Virtual Network.
26
+ * `location`: The Azure Region where the Virtual Network will be deployed.
27
+ * `addressSpace`: The IP address ranges for the VNet.
28
+ * `subnets`: An array of subnet configurations, each having a `name` and `addressPrefixes`.
29
+ * `id`: The unique identifier of the Virtual Network.
30
+ * `virtualNetwork`: The underlying Virtual Network resource.
31
+
32
+ ## Deploying the Azure Virtual Network
33
+
34
+ You can deploy an Azure Virtual Network using this class like so:
35
+
36
+ ```python
37
+ const azureVNet = new AzureVirtualNetwork(this, 'myVNet', {
38
+ resourceGroupName: 'myResourceGroup',
39
+ name: 'myVNet',
40
+ location: 'East US',
41
+ addressSpace: ['10.0.0.0/16'],
42
+ subnets: [
43
+ {
44
+ name: 'default',
45
+ addressPrefixes: ['10.0.1.0/24'],
46
+ },
47
+ ],
48
+ });
49
+ ```
50
+
51
+ This code will create a new Azure Virtual Network named myVNet in the East US Azure region with a specified address space. The VNet belongs to the resource group myResourceGroup and contains a subnet named default.
52
+
53
+ ## VNet Peering
54
+
55
+ VNet peering allows for a direct network connection between two VNets in the same region. This class provides a method addVnetPeering to establish a peering connection between two VNets.
56
+
57
+ Example:
58
+
59
+ ```python
60
+ Copy code
61
+ const remoteVNet = new AzureVirtualNetwork(this, 'remoteVNet', { /* ... */ });
62
+ azureVNet.addVnetPeering(remoteVNet);
63
+ ```
64
+
65
+ This code establishes a peering connection between `myVNet` and `remoteVNet`.
66
+
67
+ ## Cost Optimization
68
+
69
+ In Azure Virtual Network, you are primarily charged based on the amount of data transferred out of the VNet. Ensure that you're only allowing necessary traffic and consider using VNet peering instead of VPNs or ExpressRoute for communication between VNets in the same region to reduce costs. Regularly review and clean up unused or unnecessary resources.
70
+ '''
71
+ from pkgutil import extend_path
72
+ __path__ = extend_path(__path__, __name__)
73
+
74
+ import abc
75
+ import builtins
76
+ import datetime
77
+ import enum
78
+ import typing
79
+
80
+ import jsii
81
+ import publication
82
+ import typing_extensions
83
+
84
+ from typeguard import check_type
85
+
86
+ from .._jsii import *
87
+
88
+ import cdktf_cdktf_provider_azurerm.resource_group as _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf
89
+ import cdktf_cdktf_provider_azurerm.subnet as _cdktf_cdktf_provider_azurerm_subnet_92bbcedf
90
+ import cdktf_cdktf_provider_azurerm.virtual_network as _cdktf_cdktf_provider_azurerm_virtual_network_92bbcedf
91
+ import constructs as _constructs_77d1e7e8
92
+ from ..core_azure import AzureResource as _AzureResource_74eec1c4
93
+
94
+
95
+ class Network(
96
+ _AzureResource_74eec1c4,
97
+ metaclass=jsii.JSIIMeta,
98
+ jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualnetwork.Network",
99
+ ):
100
+ def __init__(
101
+ self,
102
+ scope: _constructs_77d1e7e8.Construct,
103
+ id: builtins.str,
104
+ *,
105
+ address_space: typing.Optional[typing.Sequence[builtins.str]] = None,
106
+ location: typing.Optional[builtins.str] = None,
107
+ name: typing.Optional[builtins.str] = None,
108
+ resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
109
+ subnets: typing.Optional[typing.Sequence[typing.Union["SubnetConfig", typing.Dict[builtins.str, typing.Any]]]] = None,
110
+ ) -> None:
111
+ '''Represents an Azure Virtual Network (VNet) within Microsoft Azure.
112
+
113
+ This class is responsible for the creation and management of a virtual network, which provides an isolated environment
114
+ where Azure resources, such as VMs and databases, can securely communicate with each other, the internet, and on-premises
115
+ networks. It supports configurations such as multiple address spaces and subnets, enabling complex networking scenarios.
116
+
117
+ :param scope: - The scope in which to define this construct, typically representing the Cloud Development Kit (CDK) application.
118
+ :param id: - The unique identifier for this instance of the network, used within the scope for reference.
119
+ :param address_space: Optional: A list of address spaces for the virtual network, specified in CIDR notation. For example, ['10.0.0.0/16'] defines a single address space. Multiple address spaces can be provided.
120
+ :param location: Optional: The Azure region in which to create the virtual network, e.g., 'East US', 'West Europe'. If not specified, the region of the resource group will be used.
121
+ :param name: Optional: The name of the virtual network. Must be unique within the resource group. If not provided, a default name will be assigned.
122
+ :param resource_group: An optional reference to the resource group in which to deploy the Virtual Machine. If not provided, the Virtual Machine will be deployed in the default resource group.
123
+ :param subnets: Optional: An array of subnet configurations to be created within the virtual network. Each subnet is defined by its name and address prefix(es).
124
+ '''
125
+ if __debug__:
126
+ type_hints = typing.get_type_hints(_typecheckingstub__f12f6d137e512786fc356d6d64f71bd6d13a1ecf2ada88bd3d790a65643b2a85)
127
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
128
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
129
+ props = NetworkProps(
130
+ address_space=address_space,
131
+ location=location,
132
+ name=name,
133
+ resource_group=resource_group,
134
+ subnets=subnets,
135
+ )
136
+
137
+ jsii.create(self.__class__, self, [scope, id, props])
138
+
139
+ @jsii.member(jsii_name="addVnetPeering")
140
+ def add_vnet_peering(
141
+ self,
142
+ remote_virtual_network: "Network",
143
+ local_peer_settings: typing.Optional[typing.Union["PeerSettings", typing.Dict[builtins.str, typing.Any]]] = None,
144
+ *,
145
+ allow_forwarded_traffic: typing.Optional[builtins.bool] = None,
146
+ allow_gateway_transit: typing.Optional[builtins.bool] = None,
147
+ allow_virtual_network_access: typing.Optional[builtins.bool] = None,
148
+ use_remote_gateways: typing.Optional[builtins.bool] = None,
149
+ ) -> None:
150
+ '''Establishes a peering connection between this virtual network and another remote virtual network.
151
+
152
+ This method configures a two-way peering connection, allowing resources in both virtual networks to communicate
153
+ seamlessly. It sets up peering settings such as network access, traffic forwarding, and gateway transit based on
154
+ provided configurations.
155
+
156
+ :param remote_virtual_network: - The remote virtual network with which to establish a peering connection.
157
+ :param local_peer_settings: - Optional settings applied from this virtual network to the remote virtual network. Controls aspects like virtual network access, traffic forwarding, and use of gateways.
158
+ :param allow_forwarded_traffic: Indicates whether forwarded traffic is allowed. Default: false
159
+ :param allow_gateway_transit: Indicates whether gateway transit is allowed. Default: false
160
+ :param allow_virtual_network_access: Indicates whether virtual network access is allowed. Default: true
161
+ :param use_remote_gateways: Indicates whether to use remote gateways. Default: false
162
+ '''
163
+ if __debug__:
164
+ type_hints = typing.get_type_hints(_typecheckingstub__7b7b6ffdbc955084b0c25267f2fea44562735436ef7fae193a495babd8c20ba2)
165
+ check_type(argname="argument remote_virtual_network", value=remote_virtual_network, expected_type=type_hints["remote_virtual_network"])
166
+ check_type(argname="argument local_peer_settings", value=local_peer_settings, expected_type=type_hints["local_peer_settings"])
167
+ remote_peer_settings = PeerSettings(
168
+ allow_forwarded_traffic=allow_forwarded_traffic,
169
+ allow_gateway_transit=allow_gateway_transit,
170
+ allow_virtual_network_access=allow_virtual_network_access,
171
+ use_remote_gateways=use_remote_gateways,
172
+ )
173
+
174
+ return typing.cast(None, jsii.invoke(self, "addVnetPeering", [remote_virtual_network, local_peer_settings, remote_peer_settings]))
175
+
176
+ @builtins.property
177
+ @jsii.member(jsii_name="name")
178
+ def name(self) -> builtins.str:
179
+ return typing.cast(builtins.str, jsii.get(self, "name"))
180
+
181
+ @builtins.property
182
+ @jsii.member(jsii_name="props")
183
+ def props(self) -> "NetworkProps":
184
+ return typing.cast("NetworkProps", jsii.get(self, "props"))
185
+
186
+ @builtins.property
187
+ @jsii.member(jsii_name="subnets")
188
+ def subnets(
189
+ self,
190
+ ) -> typing.Mapping[builtins.str, _cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet]:
191
+ return typing.cast(typing.Mapping[builtins.str, _cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet], jsii.get(self, "subnets"))
192
+
193
+ @builtins.property
194
+ @jsii.member(jsii_name="virtualNetwork")
195
+ def virtual_network(
196
+ self,
197
+ ) -> _cdktf_cdktf_provider_azurerm_virtual_network_92bbcedf.VirtualNetwork:
198
+ return typing.cast(_cdktf_cdktf_provider_azurerm_virtual_network_92bbcedf.VirtualNetwork, jsii.get(self, "virtualNetwork"))
199
+
200
+ @builtins.property
201
+ @jsii.member(jsii_name="id")
202
+ def id(self) -> builtins.str:
203
+ return typing.cast(builtins.str, jsii.get(self, "id"))
204
+
205
+ @id.setter
206
+ def id(self, value: builtins.str) -> None:
207
+ if __debug__:
208
+ type_hints = typing.get_type_hints(_typecheckingstub__1d96a48bce2dbc238b2b7fb010fbca63fe89a92932546b56b0209cadebb00307)
209
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
210
+ jsii.set(self, "id", value)
211
+
212
+ @builtins.property
213
+ @jsii.member(jsii_name="resourceGroup")
214
+ def resource_group(
215
+ self,
216
+ ) -> _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup:
217
+ return typing.cast(_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup, jsii.get(self, "resourceGroup"))
218
+
219
+ @resource_group.setter
220
+ def resource_group(
221
+ self,
222
+ value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
223
+ ) -> None:
224
+ if __debug__:
225
+ type_hints = typing.get_type_hints(_typecheckingstub__691197cdcd375f4b7dca5e7cfa0b25bc7aaf2a593b9629e029b874c7a8228b36)
226
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
227
+ jsii.set(self, "resourceGroup", value)
228
+
229
+
230
+ @jsii.data_type(
231
+ jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualnetwork.NetworkProps",
232
+ jsii_struct_bases=[],
233
+ name_mapping={
234
+ "address_space": "addressSpace",
235
+ "location": "location",
236
+ "name": "name",
237
+ "resource_group": "resourceGroup",
238
+ "subnets": "subnets",
239
+ },
240
+ )
241
+ class NetworkProps:
242
+ def __init__(
243
+ self,
244
+ *,
245
+ address_space: typing.Optional[typing.Sequence[builtins.str]] = None,
246
+ location: typing.Optional[builtins.str] = None,
247
+ name: typing.Optional[builtins.str] = None,
248
+ resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
249
+ subnets: typing.Optional[typing.Sequence[typing.Union["SubnetConfig", typing.Dict[builtins.str, typing.Any]]]] = None,
250
+ ) -> None:
251
+ '''Properties for defining an Azure Virtual Network.
252
+
253
+ :param address_space: Optional: A list of address spaces for the virtual network, specified in CIDR notation. For example, ['10.0.0.0/16'] defines a single address space. Multiple address spaces can be provided.
254
+ :param location: Optional: The Azure region in which to create the virtual network, e.g., 'East US', 'West Europe'. If not specified, the region of the resource group will be used.
255
+ :param name: Optional: The name of the virtual network. Must be unique within the resource group. If not provided, a default name will be assigned.
256
+ :param resource_group: An optional reference to the resource group in which to deploy the Virtual Machine. If not provided, the Virtual Machine will be deployed in the default resource group.
257
+ :param subnets: Optional: An array of subnet configurations to be created within the virtual network. Each subnet is defined by its name and address prefix(es).
258
+ '''
259
+ if __debug__:
260
+ type_hints = typing.get_type_hints(_typecheckingstub__1b227c2fa6df9f699d5d59f289620a8e4da459aa770f81b9d9df0a384aec9001)
261
+ check_type(argname="argument address_space", value=address_space, expected_type=type_hints["address_space"])
262
+ check_type(argname="argument location", value=location, expected_type=type_hints["location"])
263
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
264
+ check_type(argname="argument resource_group", value=resource_group, expected_type=type_hints["resource_group"])
265
+ check_type(argname="argument subnets", value=subnets, expected_type=type_hints["subnets"])
266
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
267
+ if address_space is not None:
268
+ self._values["address_space"] = address_space
269
+ if location is not None:
270
+ self._values["location"] = location
271
+ if name is not None:
272
+ self._values["name"] = name
273
+ if resource_group is not None:
274
+ self._values["resource_group"] = resource_group
275
+ if subnets is not None:
276
+ self._values["subnets"] = subnets
277
+
278
+ @builtins.property
279
+ def address_space(self) -> typing.Optional[typing.List[builtins.str]]:
280
+ '''Optional: A list of address spaces for the virtual network, specified in CIDR notation.
281
+
282
+ For example, ['10.0.0.0/16'] defines a single address space. Multiple address spaces can be provided.
283
+ '''
284
+ result = self._values.get("address_space")
285
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
286
+
287
+ @builtins.property
288
+ def location(self) -> typing.Optional[builtins.str]:
289
+ '''Optional: The Azure region in which to create the virtual network, e.g., 'East US', 'West Europe'. If not specified, the region of the resource group will be used.'''
290
+ result = self._values.get("location")
291
+ return typing.cast(typing.Optional[builtins.str], result)
292
+
293
+ @builtins.property
294
+ def name(self) -> typing.Optional[builtins.str]:
295
+ '''Optional: The name of the virtual network.
296
+
297
+ Must be unique within the resource group.
298
+ If not provided, a default name will be assigned.
299
+ '''
300
+ result = self._values.get("name")
301
+ return typing.cast(typing.Optional[builtins.str], result)
302
+
303
+ @builtins.property
304
+ def resource_group(
305
+ self,
306
+ ) -> typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup]:
307
+ '''An optional reference to the resource group in which to deploy the Virtual Machine.
308
+
309
+ If not provided, the Virtual Machine will be deployed in the default resource group.
310
+ '''
311
+ result = self._values.get("resource_group")
312
+ return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup], result)
313
+
314
+ @builtins.property
315
+ def subnets(self) -> typing.Optional[typing.List["SubnetConfig"]]:
316
+ '''Optional: An array of subnet configurations to be created within the virtual network.
317
+
318
+ Each subnet is defined by its name and address prefix(es).
319
+ '''
320
+ result = self._values.get("subnets")
321
+ return typing.cast(typing.Optional[typing.List["SubnetConfig"]], result)
322
+
323
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
324
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
325
+
326
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
327
+ return not (rhs == self)
328
+
329
+ def __repr__(self) -> str:
330
+ return "NetworkProps(%s)" % ", ".join(
331
+ k + "=" + repr(v) for k, v in self._values.items()
332
+ )
333
+
334
+
335
+ class Peer(
336
+ _constructs_77d1e7e8.Construct,
337
+ metaclass=jsii.JSIIMeta,
338
+ jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualnetwork.Peer",
339
+ ):
340
+ def __init__(
341
+ self,
342
+ scope: _constructs_77d1e7e8.Construct,
343
+ name: builtins.str,
344
+ *,
345
+ remote_virtual_network: Network,
346
+ virtual_network: Network,
347
+ local_to_remote_settings: typing.Optional[typing.Union["PeerSettings", typing.Dict[builtins.str, typing.Any]]] = None,
348
+ remote_to_local_settings: typing.Optional[typing.Union["PeerSettings", typing.Dict[builtins.str, typing.Any]]] = None,
349
+ ) -> None:
350
+ '''Represents a Virtual Network Peering within Microsoft Azure.
351
+
352
+ This class facilitates the peering between two virtual networks, allowing resources in either network to communicate
353
+ with each other as if they were within the same network. It supports advanced configurations such as traffic forwarding,
354
+ gateway transit, and access settings. This peering does not require a VPN gateway and offers low-latency, high-bandwidth
355
+ connections between resources in different virtual networks.
356
+
357
+ :param scope: - The scope in which to define this construct, typically representing the Cloud Development Kit (CDK) application.
358
+ :param name: - The unique name for this instance of the network peering.
359
+ :param remote_virtual_network: ID of the remote virtual network.
360
+ :param virtual_network: ID of the local virtual network.
361
+ :param local_to_remote_settings: Settings applied from the local virtual network to the remote virtual network.
362
+ :param remote_to_local_settings: Settings applied from the remote virtual network to the local virtual network.
363
+ '''
364
+ if __debug__:
365
+ type_hints = typing.get_type_hints(_typecheckingstub__3243d18717ecdd159fab2cf0794b605b3b005ba5a198d8a267206e36d1767832)
366
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
367
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
368
+ props = PeerProps(
369
+ remote_virtual_network=remote_virtual_network,
370
+ virtual_network=virtual_network,
371
+ local_to_remote_settings=local_to_remote_settings,
372
+ remote_to_local_settings=remote_to_local_settings,
373
+ )
374
+
375
+ jsii.create(self.__class__, self, [scope, name, props])
376
+
377
+
378
+ @jsii.data_type(
379
+ jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualnetwork.PeerProps",
380
+ jsii_struct_bases=[],
381
+ name_mapping={
382
+ "remote_virtual_network": "remoteVirtualNetwork",
383
+ "virtual_network": "virtualNetwork",
384
+ "local_to_remote_settings": "localToRemoteSettings",
385
+ "remote_to_local_settings": "remoteToLocalSettings",
386
+ },
387
+ )
388
+ class PeerProps:
389
+ def __init__(
390
+ self,
391
+ *,
392
+ remote_virtual_network: Network,
393
+ virtual_network: Network,
394
+ local_to_remote_settings: typing.Optional[typing.Union["PeerSettings", typing.Dict[builtins.str, typing.Any]]] = None,
395
+ remote_to_local_settings: typing.Optional[typing.Union["PeerSettings", typing.Dict[builtins.str, typing.Any]]] = None,
396
+ ) -> None:
397
+ '''Interface defining the properties for virtual network peerings.
398
+
399
+ :param remote_virtual_network: ID of the remote virtual network.
400
+ :param virtual_network: ID of the local virtual network.
401
+ :param local_to_remote_settings: Settings applied from the local virtual network to the remote virtual network.
402
+ :param remote_to_local_settings: Settings applied from the remote virtual network to the local virtual network.
403
+ '''
404
+ if isinstance(local_to_remote_settings, dict):
405
+ local_to_remote_settings = PeerSettings(**local_to_remote_settings)
406
+ if isinstance(remote_to_local_settings, dict):
407
+ remote_to_local_settings = PeerSettings(**remote_to_local_settings)
408
+ if __debug__:
409
+ type_hints = typing.get_type_hints(_typecheckingstub__268f114fde1ea8d5558e85dc220bec35ed90da33cc7d10b5b07b4eac897da40d)
410
+ check_type(argname="argument remote_virtual_network", value=remote_virtual_network, expected_type=type_hints["remote_virtual_network"])
411
+ check_type(argname="argument virtual_network", value=virtual_network, expected_type=type_hints["virtual_network"])
412
+ check_type(argname="argument local_to_remote_settings", value=local_to_remote_settings, expected_type=type_hints["local_to_remote_settings"])
413
+ check_type(argname="argument remote_to_local_settings", value=remote_to_local_settings, expected_type=type_hints["remote_to_local_settings"])
414
+ self._values: typing.Dict[builtins.str, typing.Any] = {
415
+ "remote_virtual_network": remote_virtual_network,
416
+ "virtual_network": virtual_network,
417
+ }
418
+ if local_to_remote_settings is not None:
419
+ self._values["local_to_remote_settings"] = local_to_remote_settings
420
+ if remote_to_local_settings is not None:
421
+ self._values["remote_to_local_settings"] = remote_to_local_settings
422
+
423
+ @builtins.property
424
+ def remote_virtual_network(self) -> Network:
425
+ '''ID of the remote virtual network.'''
426
+ result = self._values.get("remote_virtual_network")
427
+ assert result is not None, "Required property 'remote_virtual_network' is missing"
428
+ return typing.cast(Network, result)
429
+
430
+ @builtins.property
431
+ def virtual_network(self) -> Network:
432
+ '''ID of the local virtual network.'''
433
+ result = self._values.get("virtual_network")
434
+ assert result is not None, "Required property 'virtual_network' is missing"
435
+ return typing.cast(Network, result)
436
+
437
+ @builtins.property
438
+ def local_to_remote_settings(self) -> typing.Optional["PeerSettings"]:
439
+ '''Settings applied from the local virtual network to the remote virtual network.'''
440
+ result = self._values.get("local_to_remote_settings")
441
+ return typing.cast(typing.Optional["PeerSettings"], result)
442
+
443
+ @builtins.property
444
+ def remote_to_local_settings(self) -> typing.Optional["PeerSettings"]:
445
+ '''Settings applied from the remote virtual network to the local virtual network.'''
446
+ result = self._values.get("remote_to_local_settings")
447
+ return typing.cast(typing.Optional["PeerSettings"], result)
448
+
449
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
450
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
451
+
452
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
453
+ return not (rhs == self)
454
+
455
+ def __repr__(self) -> str:
456
+ return "PeerProps(%s)" % ", ".join(
457
+ k + "=" + repr(v) for k, v in self._values.items()
458
+ )
459
+
460
+
461
+ @jsii.data_type(
462
+ jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualnetwork.PeerSettings",
463
+ jsii_struct_bases=[],
464
+ name_mapping={
465
+ "allow_forwarded_traffic": "allowForwardedTraffic",
466
+ "allow_gateway_transit": "allowGatewayTransit",
467
+ "allow_virtual_network_access": "allowVirtualNetworkAccess",
468
+ "use_remote_gateways": "useRemoteGateways",
469
+ },
470
+ )
471
+ class PeerSettings:
472
+ def __init__(
473
+ self,
474
+ *,
475
+ allow_forwarded_traffic: typing.Optional[builtins.bool] = None,
476
+ allow_gateway_transit: typing.Optional[builtins.bool] = None,
477
+ allow_virtual_network_access: typing.Optional[builtins.bool] = None,
478
+ use_remote_gateways: typing.Optional[builtins.bool] = None,
479
+ ) -> None:
480
+ '''Interface defining the settings for peer connections.
481
+
482
+ :param allow_forwarded_traffic: Indicates whether forwarded traffic is allowed. Default: false
483
+ :param allow_gateway_transit: Indicates whether gateway transit is allowed. Default: false
484
+ :param allow_virtual_network_access: Indicates whether virtual network access is allowed. Default: true
485
+ :param use_remote_gateways: Indicates whether to use remote gateways. Default: false
486
+ '''
487
+ if __debug__:
488
+ type_hints = typing.get_type_hints(_typecheckingstub__2d66255415e32311b477482b9cc3c147cec3fefee6711ca54bd422c735b625d5)
489
+ check_type(argname="argument allow_forwarded_traffic", value=allow_forwarded_traffic, expected_type=type_hints["allow_forwarded_traffic"])
490
+ check_type(argname="argument allow_gateway_transit", value=allow_gateway_transit, expected_type=type_hints["allow_gateway_transit"])
491
+ check_type(argname="argument allow_virtual_network_access", value=allow_virtual_network_access, expected_type=type_hints["allow_virtual_network_access"])
492
+ check_type(argname="argument use_remote_gateways", value=use_remote_gateways, expected_type=type_hints["use_remote_gateways"])
493
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
494
+ if allow_forwarded_traffic is not None:
495
+ self._values["allow_forwarded_traffic"] = allow_forwarded_traffic
496
+ if allow_gateway_transit is not None:
497
+ self._values["allow_gateway_transit"] = allow_gateway_transit
498
+ if allow_virtual_network_access is not None:
499
+ self._values["allow_virtual_network_access"] = allow_virtual_network_access
500
+ if use_remote_gateways is not None:
501
+ self._values["use_remote_gateways"] = use_remote_gateways
502
+
503
+ @builtins.property
504
+ def allow_forwarded_traffic(self) -> typing.Optional[builtins.bool]:
505
+ '''Indicates whether forwarded traffic is allowed.
506
+
507
+ :default: false
508
+ '''
509
+ result = self._values.get("allow_forwarded_traffic")
510
+ return typing.cast(typing.Optional[builtins.bool], result)
511
+
512
+ @builtins.property
513
+ def allow_gateway_transit(self) -> typing.Optional[builtins.bool]:
514
+ '''Indicates whether gateway transit is allowed.
515
+
516
+ :default: false
517
+ '''
518
+ result = self._values.get("allow_gateway_transit")
519
+ return typing.cast(typing.Optional[builtins.bool], result)
520
+
521
+ @builtins.property
522
+ def allow_virtual_network_access(self) -> typing.Optional[builtins.bool]:
523
+ '''Indicates whether virtual network access is allowed.
524
+
525
+ :default: true
526
+ '''
527
+ result = self._values.get("allow_virtual_network_access")
528
+ return typing.cast(typing.Optional[builtins.bool], result)
529
+
530
+ @builtins.property
531
+ def use_remote_gateways(self) -> typing.Optional[builtins.bool]:
532
+ '''Indicates whether to use remote gateways.
533
+
534
+ :default: false
535
+ '''
536
+ result = self._values.get("use_remote_gateways")
537
+ return typing.cast(typing.Optional[builtins.bool], result)
538
+
539
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
540
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
541
+
542
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
543
+ return not (rhs == self)
544
+
545
+ def __repr__(self) -> str:
546
+ return "PeerSettings(%s)" % ", ".join(
547
+ k + "=" + repr(v) for k, v in self._values.items()
548
+ )
549
+
550
+
551
+ @jsii.data_type(
552
+ jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualnetwork.SubnetConfig",
553
+ jsii_struct_bases=[],
554
+ name_mapping={"address_prefixes": "addressPrefixes", "name": "name"},
555
+ )
556
+ class SubnetConfig:
557
+ def __init__(
558
+ self,
559
+ *,
560
+ address_prefixes: typing.Sequence[builtins.str],
561
+ name: builtins.str,
562
+ ) -> None:
563
+ '''Configuration properties for defining a subnet within an Azure Virtual Network.
564
+
565
+ :param address_prefixes: A list of address prefixes for the subnet. These are expressed in CIDR notation. For example, '192.168.1.0/24' to define a subnet with a range of IP addresses.
566
+ :param name: The name of the subnet. This name must be unique within the context of the virtual network.
567
+ '''
568
+ if __debug__:
569
+ type_hints = typing.get_type_hints(_typecheckingstub__65e41345078d26347338a20a67caf2c5f80cc72e44fdc171f1455eb58c00fa66)
570
+ check_type(argname="argument address_prefixes", value=address_prefixes, expected_type=type_hints["address_prefixes"])
571
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
572
+ self._values: typing.Dict[builtins.str, typing.Any] = {
573
+ "address_prefixes": address_prefixes,
574
+ "name": name,
575
+ }
576
+
577
+ @builtins.property
578
+ def address_prefixes(self) -> typing.List[builtins.str]:
579
+ '''A list of address prefixes for the subnet.
580
+
581
+ These are expressed in CIDR notation.
582
+ For example, '192.168.1.0/24' to define a subnet with a range of IP addresses.
583
+ '''
584
+ result = self._values.get("address_prefixes")
585
+ assert result is not None, "Required property 'address_prefixes' is missing"
586
+ return typing.cast(typing.List[builtins.str], result)
587
+
588
+ @builtins.property
589
+ def name(self) -> builtins.str:
590
+ '''The name of the subnet.
591
+
592
+ This name must be unique within the context of the virtual network.
593
+ '''
594
+ result = self._values.get("name")
595
+ assert result is not None, "Required property 'name' is missing"
596
+ return typing.cast(builtins.str, result)
597
+
598
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
599
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
600
+
601
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
602
+ return not (rhs == self)
603
+
604
+ def __repr__(self) -> str:
605
+ return "SubnetConfig(%s)" % ", ".join(
606
+ k + "=" + repr(v) for k, v in self._values.items()
607
+ )
608
+
609
+
610
+ __all__ = [
611
+ "Network",
612
+ "NetworkProps",
613
+ "Peer",
614
+ "PeerProps",
615
+ "PeerSettings",
616
+ "SubnetConfig",
617
+ ]
618
+
619
+ publication.publish()
620
+
621
+ def _typecheckingstub__f12f6d137e512786fc356d6d64f71bd6d13a1ecf2ada88bd3d790a65643b2a85(
622
+ scope: _constructs_77d1e7e8.Construct,
623
+ id: builtins.str,
624
+ *,
625
+ address_space: typing.Optional[typing.Sequence[builtins.str]] = None,
626
+ location: typing.Optional[builtins.str] = None,
627
+ name: typing.Optional[builtins.str] = None,
628
+ resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
629
+ subnets: typing.Optional[typing.Sequence[typing.Union[SubnetConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
630
+ ) -> None:
631
+ """Type checking stubs"""
632
+ pass
633
+
634
+ def _typecheckingstub__7b7b6ffdbc955084b0c25267f2fea44562735436ef7fae193a495babd8c20ba2(
635
+ remote_virtual_network: Network,
636
+ local_peer_settings: typing.Optional[typing.Union[PeerSettings, typing.Dict[builtins.str, typing.Any]]] = None,
637
+ *,
638
+ allow_forwarded_traffic: typing.Optional[builtins.bool] = None,
639
+ allow_gateway_transit: typing.Optional[builtins.bool] = None,
640
+ allow_virtual_network_access: typing.Optional[builtins.bool] = None,
641
+ use_remote_gateways: typing.Optional[builtins.bool] = None,
642
+ ) -> None:
643
+ """Type checking stubs"""
644
+ pass
645
+
646
+ def _typecheckingstub__1d96a48bce2dbc238b2b7fb010fbca63fe89a92932546b56b0209cadebb00307(
647
+ value: builtins.str,
648
+ ) -> None:
649
+ """Type checking stubs"""
650
+ pass
651
+
652
+ def _typecheckingstub__691197cdcd375f4b7dca5e7cfa0b25bc7aaf2a593b9629e029b874c7a8228b36(
653
+ value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
654
+ ) -> None:
655
+ """Type checking stubs"""
656
+ pass
657
+
658
+ def _typecheckingstub__1b227c2fa6df9f699d5d59f289620a8e4da459aa770f81b9d9df0a384aec9001(
659
+ *,
660
+ address_space: typing.Optional[typing.Sequence[builtins.str]] = None,
661
+ location: typing.Optional[builtins.str] = None,
662
+ name: typing.Optional[builtins.str] = None,
663
+ resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
664
+ subnets: typing.Optional[typing.Sequence[typing.Union[SubnetConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
665
+ ) -> None:
666
+ """Type checking stubs"""
667
+ pass
668
+
669
+ def _typecheckingstub__3243d18717ecdd159fab2cf0794b605b3b005ba5a198d8a267206e36d1767832(
670
+ scope: _constructs_77d1e7e8.Construct,
671
+ name: builtins.str,
672
+ *,
673
+ remote_virtual_network: Network,
674
+ virtual_network: Network,
675
+ local_to_remote_settings: typing.Optional[typing.Union[PeerSettings, typing.Dict[builtins.str, typing.Any]]] = None,
676
+ remote_to_local_settings: typing.Optional[typing.Union[PeerSettings, typing.Dict[builtins.str, typing.Any]]] = None,
677
+ ) -> None:
678
+ """Type checking stubs"""
679
+ pass
680
+
681
+ def _typecheckingstub__268f114fde1ea8d5558e85dc220bec35ed90da33cc7d10b5b07b4eac897da40d(
682
+ *,
683
+ remote_virtual_network: Network,
684
+ virtual_network: Network,
685
+ local_to_remote_settings: typing.Optional[typing.Union[PeerSettings, typing.Dict[builtins.str, typing.Any]]] = None,
686
+ remote_to_local_settings: typing.Optional[typing.Union[PeerSettings, typing.Dict[builtins.str, typing.Any]]] = None,
687
+ ) -> None:
688
+ """Type checking stubs"""
689
+ pass
690
+
691
+ def _typecheckingstub__2d66255415e32311b477482b9cc3c147cec3fefee6711ca54bd422c735b625d5(
692
+ *,
693
+ allow_forwarded_traffic: typing.Optional[builtins.bool] = None,
694
+ allow_gateway_transit: typing.Optional[builtins.bool] = None,
695
+ allow_virtual_network_access: typing.Optional[builtins.bool] = None,
696
+ use_remote_gateways: typing.Optional[builtins.bool] = None,
697
+ ) -> None:
698
+ """Type checking stubs"""
699
+ pass
700
+
701
+ def _typecheckingstub__65e41345078d26347338a20a67caf2c5f80cc72e44fdc171f1455eb58c00fa66(
702
+ *,
703
+ address_prefixes: typing.Sequence[builtins.str],
704
+ name: builtins.str,
705
+ ) -> None:
706
+ """Type checking stubs"""
707
+ pass