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.
- microsoft_cdktfconstructs/__init__.py +217 -0
- microsoft_cdktfconstructs/_jsii/__init__.py +31 -0
- microsoft_cdktfconstructs/_jsii/terraform-cdk-constructs@0.0.3-pre.11.jsii.tgz +0 -0
- microsoft_cdktfconstructs/azure_applicationgateway/__init__.py +823 -0
- microsoft_cdktfconstructs/azure_applicationinsights/__init__.py +397 -0
- microsoft_cdktfconstructs/azure_containerregistry/__init__.py +320 -0
- microsoft_cdktfconstructs/azure_eventhub/__init__.py +2213 -0
- microsoft_cdktfconstructs/azure_functionapp/__init__.py +908 -0
- microsoft_cdktfconstructs/azure_keyvault/__init__.py +1982 -0
- microsoft_cdktfconstructs/azure_kubernetes/__init__.py +400 -0
- microsoft_cdktfconstructs/azure_kusto/__init__.py +2485 -0
- microsoft_cdktfconstructs/azure_loganalytics/__init__.py +652 -0
- microsoft_cdktfconstructs/azure_metricalert/__init__.py +1260 -0
- microsoft_cdktfconstructs/azure_networksecuritygroup/__init__.py +1742 -0
- microsoft_cdktfconstructs/azure_queryrulealert/__init__.py +1189 -0
- microsoft_cdktfconstructs/azure_resourcegroup/__init__.py +320 -0
- microsoft_cdktfconstructs/azure_storageaccount/__init__.py +1910 -0
- microsoft_cdktfconstructs/azure_virtualmachine/__init__.py +1460 -0
- microsoft_cdktfconstructs/azure_virtualmachinescaleset/__init__.py +1185 -0
- microsoft_cdktfconstructs/azure_virtualnetwork/__init__.py +707 -0
- microsoft_cdktfconstructs/core_azure/__init__.py +931 -0
- microsoft_cdktfconstructs/py.typed +1 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/LICENSE +19 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/METADATA +188 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/RECORD +27 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/WHEEL +5 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
'''
|
|
2
|
+
# Azure Container Registry Construct
|
|
3
|
+
|
|
4
|
+
This class represents an Azure Container Registry resource. It provides a way to manage Azure Container Registry resources conveniently.
|
|
5
|
+
|
|
6
|
+
## What is Azure Container Registry?
|
|
7
|
+
|
|
8
|
+
Azure Container Registry is a managed Docker registry service for building, storing, and managing container images and artifacts in a secure, scalable way. Azure Container Registry integrates well with orchestrators hosted in Azure Container Service, including Docker Swarm, Kubernetes, and DC/OS, as well as other Azure Services such as Service Fabric and Batch.
|
|
9
|
+
|
|
10
|
+
You can learn more about Azure Container Registry in the [official Azure documentation](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-intro).
|
|
11
|
+
|
|
12
|
+
## Container Registry Best Practices
|
|
13
|
+
|
|
14
|
+
* Enable the admin account only when necessary and disable it when not in use.
|
|
15
|
+
* Use role-based access control (RBAC) to manage access to your Azure Container Registry.
|
|
16
|
+
* Regularly remove untagged and unused images to manage costs.
|
|
17
|
+
|
|
18
|
+
## Container Registry Class Properties
|
|
19
|
+
|
|
20
|
+
This class has several properties that control the Azure Container Registry resource's behaviour:
|
|
21
|
+
|
|
22
|
+
* `name`: The name of the Azure Container Registry.
|
|
23
|
+
* `location`: The Azure Region where the Azure Container Registry will be deployed.
|
|
24
|
+
* `resource_group_name`: The name of the Azure Resource Group.
|
|
25
|
+
* `sku`: The SKU of the Azure Container Registry.
|
|
26
|
+
* `tags`: The tags to assign to the Azure Container Registry.
|
|
27
|
+
* `admin_enabled`: A flag to specify whether the admin account is enabled.
|
|
28
|
+
* `georeplication_locations`: The locations to configure replication.
|
|
29
|
+
|
|
30
|
+
## Deploying the Azure Container Registry
|
|
31
|
+
|
|
32
|
+
You can deploy an Azure Container Registry resource using this class like so:
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
const azureContainerRegistry = new AzureContainerRegistry(this, 'myContainerRegistry', {
|
|
36
|
+
name: 'myContainerRegistry',
|
|
37
|
+
location: 'West US',
|
|
38
|
+
resource_group_name: 'myResourceGroup',
|
|
39
|
+
sku: 'Premium',
|
|
40
|
+
admin_enabled: true,
|
|
41
|
+
georeplication_locations: ['East US', 'West Europe'],
|
|
42
|
+
tags: {
|
|
43
|
+
'env': 'production',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This code will create a new Azure Container Registry named myContainerRegistry in the West US Azure region with a production environment tag. The resource belongs to the resource group myResourceGroup, has a Premium SKU, has the admin account enabled, and has geo-replication configured for East US and West Europe.
|
|
49
|
+
'''
|
|
50
|
+
from pkgutil import extend_path
|
|
51
|
+
__path__ = extend_path(__path__, __name__)
|
|
52
|
+
|
|
53
|
+
import abc
|
|
54
|
+
import builtins
|
|
55
|
+
import datetime
|
|
56
|
+
import enum
|
|
57
|
+
import typing
|
|
58
|
+
|
|
59
|
+
import jsii
|
|
60
|
+
import publication
|
|
61
|
+
import typing_extensions
|
|
62
|
+
|
|
63
|
+
from typeguard import check_type
|
|
64
|
+
|
|
65
|
+
from .._jsii import *
|
|
66
|
+
|
|
67
|
+
import cdktf_cdktf_provider_azurerm.resource_group as _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf
|
|
68
|
+
import constructs as _constructs_77d1e7e8
|
|
69
|
+
from ..core_azure import AzureResource as _AzureResource_74eec1c4
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class Registry(
|
|
73
|
+
_AzureResource_74eec1c4,
|
|
74
|
+
metaclass=jsii.JSIIMeta,
|
|
75
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_containerregistry.Registry",
|
|
76
|
+
):
|
|
77
|
+
def __init__(
|
|
78
|
+
self,
|
|
79
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
80
|
+
id: builtins.str,
|
|
81
|
+
*,
|
|
82
|
+
location: builtins.str,
|
|
83
|
+
name: builtins.str,
|
|
84
|
+
admin_enabled: typing.Optional[builtins.bool] = None,
|
|
85
|
+
geo_replication_locations: typing.Any = None,
|
|
86
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
87
|
+
sku: typing.Optional[builtins.str] = None,
|
|
88
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
89
|
+
) -> None:
|
|
90
|
+
'''Constructs a new Azure Container Registry (ACR).
|
|
91
|
+
|
|
92
|
+
This class creates an Azure Container Registry instance, which is a managed Docker registry service based on the Docker Registry 2.0 specification.
|
|
93
|
+
This service enables you to store and manage container images across all types of Azure deployments, you can also use it to build, store, and manage images for all types of container deployments.
|
|
94
|
+
|
|
95
|
+
:param scope: - The scope in which to define this construct, typically used for managing lifecycles and creation order.
|
|
96
|
+
:param id: - The unique identifier for this construct instance.
|
|
97
|
+
:param location: The Azure Region to deploy.
|
|
98
|
+
:param name: The name of the Log Analytics Workspace.
|
|
99
|
+
:param admin_enabled: Create enable Admin user.
|
|
100
|
+
:param geo_replication_locations: Specify the locations to configure replication.
|
|
101
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Container Registry. If not provided, the Container Registry will be deployed in the default resource group.
|
|
102
|
+
:param sku: The SKU of the Log Analytics Workspace.
|
|
103
|
+
:param tags: The tags to assign to the Resource Group.
|
|
104
|
+
'''
|
|
105
|
+
if __debug__:
|
|
106
|
+
type_hints = typing.get_type_hints(_typecheckingstub__81457a31f7f2d2aeac8d8265e400e9e6cb61061a3702b9ef376cf6ecb3480e27)
|
|
107
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
108
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
109
|
+
props = RegistryProps(
|
|
110
|
+
location=location,
|
|
111
|
+
name=name,
|
|
112
|
+
admin_enabled=admin_enabled,
|
|
113
|
+
geo_replication_locations=geo_replication_locations,
|
|
114
|
+
resource_group=resource_group,
|
|
115
|
+
sku=sku,
|
|
116
|
+
tags=tags,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
120
|
+
|
|
121
|
+
@builtins.property
|
|
122
|
+
@jsii.member(jsii_name="props")
|
|
123
|
+
def props(self) -> "RegistryProps":
|
|
124
|
+
return typing.cast("RegistryProps", jsii.get(self, "props"))
|
|
125
|
+
|
|
126
|
+
@builtins.property
|
|
127
|
+
@jsii.member(jsii_name="id")
|
|
128
|
+
def id(self) -> builtins.str:
|
|
129
|
+
return typing.cast(builtins.str, jsii.get(self, "id"))
|
|
130
|
+
|
|
131
|
+
@id.setter
|
|
132
|
+
def id(self, value: builtins.str) -> None:
|
|
133
|
+
if __debug__:
|
|
134
|
+
type_hints = typing.get_type_hints(_typecheckingstub__facce4d6c62bd4e2d136615b79863636281c9a8d5602ca316304ef73ba43976f)
|
|
135
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
136
|
+
jsii.set(self, "id", value)
|
|
137
|
+
|
|
138
|
+
@builtins.property
|
|
139
|
+
@jsii.member(jsii_name="resourceGroup")
|
|
140
|
+
def resource_group(
|
|
141
|
+
self,
|
|
142
|
+
) -> _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup:
|
|
143
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup, jsii.get(self, "resourceGroup"))
|
|
144
|
+
|
|
145
|
+
@resource_group.setter
|
|
146
|
+
def resource_group(
|
|
147
|
+
self,
|
|
148
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
149
|
+
) -> None:
|
|
150
|
+
if __debug__:
|
|
151
|
+
type_hints = typing.get_type_hints(_typecheckingstub__d3116fb173101c7b2d4633824ed00b65e3fb1f8c3a4f24b05dd435912538f57c)
|
|
152
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
153
|
+
jsii.set(self, "resourceGroup", value)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
@jsii.data_type(
|
|
157
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_containerregistry.RegistryProps",
|
|
158
|
+
jsii_struct_bases=[],
|
|
159
|
+
name_mapping={
|
|
160
|
+
"location": "location",
|
|
161
|
+
"name": "name",
|
|
162
|
+
"admin_enabled": "adminEnabled",
|
|
163
|
+
"geo_replication_locations": "geoReplicationLocations",
|
|
164
|
+
"resource_group": "resourceGroup",
|
|
165
|
+
"sku": "sku",
|
|
166
|
+
"tags": "tags",
|
|
167
|
+
},
|
|
168
|
+
)
|
|
169
|
+
class RegistryProps:
|
|
170
|
+
def __init__(
|
|
171
|
+
self,
|
|
172
|
+
*,
|
|
173
|
+
location: builtins.str,
|
|
174
|
+
name: builtins.str,
|
|
175
|
+
admin_enabled: typing.Optional[builtins.bool] = None,
|
|
176
|
+
geo_replication_locations: typing.Any = None,
|
|
177
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
178
|
+
sku: typing.Optional[builtins.str] = None,
|
|
179
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
180
|
+
) -> None:
|
|
181
|
+
'''
|
|
182
|
+
:param location: The Azure Region to deploy.
|
|
183
|
+
:param name: The name of the Log Analytics Workspace.
|
|
184
|
+
:param admin_enabled: Create enable Admin user.
|
|
185
|
+
:param geo_replication_locations: Specify the locations to configure replication.
|
|
186
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Container Registry. If not provided, the Container Registry will be deployed in the default resource group.
|
|
187
|
+
:param sku: The SKU of the Log Analytics Workspace.
|
|
188
|
+
:param tags: The tags to assign to the Resource Group.
|
|
189
|
+
'''
|
|
190
|
+
if __debug__:
|
|
191
|
+
type_hints = typing.get_type_hints(_typecheckingstub__dcfdb54f0864825a579ba05e543e9dc9d1ac37714adaf9563ca40bb3353d14cd)
|
|
192
|
+
check_type(argname="argument location", value=location, expected_type=type_hints["location"])
|
|
193
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
194
|
+
check_type(argname="argument admin_enabled", value=admin_enabled, expected_type=type_hints["admin_enabled"])
|
|
195
|
+
check_type(argname="argument geo_replication_locations", value=geo_replication_locations, expected_type=type_hints["geo_replication_locations"])
|
|
196
|
+
check_type(argname="argument resource_group", value=resource_group, expected_type=type_hints["resource_group"])
|
|
197
|
+
check_type(argname="argument sku", value=sku, expected_type=type_hints["sku"])
|
|
198
|
+
check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
|
|
199
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
200
|
+
"location": location,
|
|
201
|
+
"name": name,
|
|
202
|
+
}
|
|
203
|
+
if admin_enabled is not None:
|
|
204
|
+
self._values["admin_enabled"] = admin_enabled
|
|
205
|
+
if geo_replication_locations is not None:
|
|
206
|
+
self._values["geo_replication_locations"] = geo_replication_locations
|
|
207
|
+
if resource_group is not None:
|
|
208
|
+
self._values["resource_group"] = resource_group
|
|
209
|
+
if sku is not None:
|
|
210
|
+
self._values["sku"] = sku
|
|
211
|
+
if tags is not None:
|
|
212
|
+
self._values["tags"] = tags
|
|
213
|
+
|
|
214
|
+
@builtins.property
|
|
215
|
+
def location(self) -> builtins.str:
|
|
216
|
+
'''The Azure Region to deploy.'''
|
|
217
|
+
result = self._values.get("location")
|
|
218
|
+
assert result is not None, "Required property 'location' is missing"
|
|
219
|
+
return typing.cast(builtins.str, result)
|
|
220
|
+
|
|
221
|
+
@builtins.property
|
|
222
|
+
def name(self) -> builtins.str:
|
|
223
|
+
'''The name of the Log Analytics Workspace.'''
|
|
224
|
+
result = self._values.get("name")
|
|
225
|
+
assert result is not None, "Required property 'name' is missing"
|
|
226
|
+
return typing.cast(builtins.str, result)
|
|
227
|
+
|
|
228
|
+
@builtins.property
|
|
229
|
+
def admin_enabled(self) -> typing.Optional[builtins.bool]:
|
|
230
|
+
'''Create enable Admin user.'''
|
|
231
|
+
result = self._values.get("admin_enabled")
|
|
232
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
233
|
+
|
|
234
|
+
@builtins.property
|
|
235
|
+
def geo_replication_locations(self) -> typing.Any:
|
|
236
|
+
'''Specify the locations to configure replication.'''
|
|
237
|
+
result = self._values.get("geo_replication_locations")
|
|
238
|
+
return typing.cast(typing.Any, result)
|
|
239
|
+
|
|
240
|
+
@builtins.property
|
|
241
|
+
def resource_group(
|
|
242
|
+
self,
|
|
243
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup]:
|
|
244
|
+
'''An optional reference to the resource group in which to deploy the Container Registry.
|
|
245
|
+
|
|
246
|
+
If not provided, the Container Registry will be deployed in the default resource group.
|
|
247
|
+
'''
|
|
248
|
+
result = self._values.get("resource_group")
|
|
249
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup], result)
|
|
250
|
+
|
|
251
|
+
@builtins.property
|
|
252
|
+
def sku(self) -> typing.Optional[builtins.str]:
|
|
253
|
+
'''The SKU of the Log Analytics Workspace.'''
|
|
254
|
+
result = self._values.get("sku")
|
|
255
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
256
|
+
|
|
257
|
+
@builtins.property
|
|
258
|
+
def tags(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
259
|
+
'''The tags to assign to the Resource Group.'''
|
|
260
|
+
result = self._values.get("tags")
|
|
261
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
262
|
+
|
|
263
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
264
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
265
|
+
|
|
266
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
267
|
+
return not (rhs == self)
|
|
268
|
+
|
|
269
|
+
def __repr__(self) -> str:
|
|
270
|
+
return "RegistryProps(%s)" % ", ".join(
|
|
271
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
__all__ = [
|
|
276
|
+
"Registry",
|
|
277
|
+
"RegistryProps",
|
|
278
|
+
]
|
|
279
|
+
|
|
280
|
+
publication.publish()
|
|
281
|
+
|
|
282
|
+
def _typecheckingstub__81457a31f7f2d2aeac8d8265e400e9e6cb61061a3702b9ef376cf6ecb3480e27(
|
|
283
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
284
|
+
id: builtins.str,
|
|
285
|
+
*,
|
|
286
|
+
location: builtins.str,
|
|
287
|
+
name: builtins.str,
|
|
288
|
+
admin_enabled: typing.Optional[builtins.bool] = None,
|
|
289
|
+
geo_replication_locations: typing.Any = None,
|
|
290
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
291
|
+
sku: typing.Optional[builtins.str] = None,
|
|
292
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
293
|
+
) -> None:
|
|
294
|
+
"""Type checking stubs"""
|
|
295
|
+
pass
|
|
296
|
+
|
|
297
|
+
def _typecheckingstub__facce4d6c62bd4e2d136615b79863636281c9a8d5602ca316304ef73ba43976f(
|
|
298
|
+
value: builtins.str,
|
|
299
|
+
) -> None:
|
|
300
|
+
"""Type checking stubs"""
|
|
301
|
+
pass
|
|
302
|
+
|
|
303
|
+
def _typecheckingstub__d3116fb173101c7b2d4633824ed00b65e3fb1f8c3a4f24b05dd435912538f57c(
|
|
304
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
305
|
+
) -> None:
|
|
306
|
+
"""Type checking stubs"""
|
|
307
|
+
pass
|
|
308
|
+
|
|
309
|
+
def _typecheckingstub__dcfdb54f0864825a579ba05e543e9dc9d1ac37714adaf9563ca40bb3353d14cd(
|
|
310
|
+
*,
|
|
311
|
+
location: builtins.str,
|
|
312
|
+
name: builtins.str,
|
|
313
|
+
admin_enabled: typing.Optional[builtins.bool] = None,
|
|
314
|
+
geo_replication_locations: typing.Any = None,
|
|
315
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
316
|
+
sku: typing.Optional[builtins.str] = None,
|
|
317
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
318
|
+
) -> None:
|
|
319
|
+
"""Type checking stubs"""
|
|
320
|
+
pass
|