cdk-mwaa 0.0.3__py3-none-any.whl → 0.0.5__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.
- cdk_mwaa/__init__.py +434 -256
- cdk_mwaa/_jsii/__init__.py +1 -1
- cdk_mwaa/_jsii/cdk-mwaa@0.0.5.jsii.tgz +0 -0
- {cdk_mwaa-0.0.3.dist-info → cdk_mwaa-0.0.5.dist-info}/METADATA +9 -3
- cdk_mwaa-0.0.5.dist-info/RECORD +9 -0
- cdk_mwaa/_jsii/cdk-mwaa@0.0.3.jsii.tgz +0 -0
- cdk_mwaa-0.0.3.dist-info/RECORD +0 -9
- {cdk_mwaa-0.0.3.dist-info → cdk_mwaa-0.0.5.dist-info}/LICENSE +0 -0
- {cdk_mwaa-0.0.3.dist-info → cdk_mwaa-0.0.5.dist-info}/WHEEL +0 -0
- {cdk_mwaa-0.0.3.dist-info → cdk_mwaa-0.0.5.dist-info}/top_level.txt +0 -0
cdk_mwaa/__init__.py
CHANGED
@@ -25,6 +25,7 @@ yarn add cdk-mwaa
|
|
25
25
|
Here is an example of how to use the `cdk-mwaa` construct library in your AWS CDK project:
|
26
26
|
|
27
27
|
```python
|
28
|
+
import * as path from 'node:path';
|
28
29
|
import * as cdk from 'aws-cdk-lib';
|
29
30
|
import * as mwaa from 'cdk-mwaa';
|
30
31
|
|
@@ -33,7 +34,11 @@ const stack = new cdk.Stack(app, 'MwaaStack');
|
|
33
34
|
|
34
35
|
const dagStorage = new mwaa.DagStorage(stack, 'MyMwaaDagStorage', {
|
35
36
|
bucketName: 'my-mwaa-dag-storage',
|
36
|
-
|
37
|
+
dagsOptions: {
|
38
|
+
localPath: path.join(__dirname, 'dags'),
|
39
|
+
s3Path: 'dags/',
|
40
|
+
},
|
41
|
+
// additional configuration options...
|
37
42
|
});
|
38
43
|
|
39
44
|
new mwaa.Environment(stack, 'MyMwaaEnvironment', {
|
@@ -62,7 +67,7 @@ const stack = new cdk.Stack(app, 'MwaaStack');
|
|
62
67
|
|
63
68
|
const dagStorage = new mwaa.DagStorage(stack, 'MyMwaaDagStorage', {
|
64
69
|
bucketName: 'my-mwaa-dag-storage',
|
65
|
-
|
70
|
+
// additional configuration options...
|
66
71
|
});
|
67
72
|
|
68
73
|
const environment = new mwaa.Environment(stack, 'MyMwaaEnvironment', {
|
@@ -73,6 +78,7 @@ const environment = new mwaa.Environment(stack, 'MyMwaaEnvironment', {
|
|
73
78
|
// additional configuration options...
|
74
79
|
});
|
75
80
|
|
81
|
+
// Enabling Secrets Backend
|
76
82
|
environment.enableSecretsBackend();
|
77
83
|
|
78
84
|
app.synth();
|
@@ -119,16 +125,177 @@ import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
|
|
119
125
|
import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
|
120
126
|
import aws_cdk.aws_kms as _aws_cdk_aws_kms_ceddda9d
|
121
127
|
import aws_cdk.aws_s3 as _aws_cdk_aws_s3_ceddda9d
|
122
|
-
import aws_cdk.aws_s3_deployment as _aws_cdk_aws_s3_deployment_ceddda9d
|
123
128
|
import constructs as _constructs_77d1e7e8
|
124
129
|
|
125
130
|
|
131
|
+
@jsii.data_type(
|
132
|
+
jsii_type="cdk-mwaa.ConfigFile",
|
133
|
+
jsii_struct_bases=[],
|
134
|
+
name_mapping={"name": "name", "version": "version"},
|
135
|
+
)
|
136
|
+
class ConfigFile:
|
137
|
+
def __init__(
|
138
|
+
self,
|
139
|
+
*,
|
140
|
+
name: builtins.str,
|
141
|
+
version: typing.Optional[builtins.str] = None,
|
142
|
+
) -> None:
|
143
|
+
'''Represents a configuration file stored in S3.
|
144
|
+
|
145
|
+
:param name: The name of the configuration file.
|
146
|
+
:param version: Optional S3 object version identifier.
|
147
|
+
'''
|
148
|
+
if __debug__:
|
149
|
+
type_hints = typing.get_type_hints(_typecheckingstub__18fc569fcf933a2b3ce7fe86ffe34609735a142137b7878008714403e6813a46)
|
150
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
151
|
+
check_type(argname="argument version", value=version, expected_type=type_hints["version"])
|
152
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
153
|
+
"name": name,
|
154
|
+
}
|
155
|
+
if version is not None:
|
156
|
+
self._values["version"] = version
|
157
|
+
|
158
|
+
@builtins.property
|
159
|
+
def name(self) -> builtins.str:
|
160
|
+
'''The name of the configuration file.'''
|
161
|
+
result = self._values.get("name")
|
162
|
+
assert result is not None, "Required property 'name' is missing"
|
163
|
+
return typing.cast(builtins.str, result)
|
164
|
+
|
165
|
+
@builtins.property
|
166
|
+
def version(self) -> typing.Optional[builtins.str]:
|
167
|
+
'''Optional S3 object version identifier.'''
|
168
|
+
result = self._values.get("version")
|
169
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
170
|
+
|
171
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
172
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
173
|
+
|
174
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
175
|
+
return not (rhs == self)
|
176
|
+
|
177
|
+
def __repr__(self) -> str:
|
178
|
+
return "ConfigFile(%s)" % ", ".join(
|
179
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
180
|
+
)
|
181
|
+
|
182
|
+
|
183
|
+
@jsii.data_type(
|
184
|
+
jsii_type="cdk-mwaa.ConfigsOptions",
|
185
|
+
jsii_struct_bases=[],
|
186
|
+
name_mapping={
|
187
|
+
"deploy_options": "deployOptions",
|
188
|
+
"local_path": "localPath",
|
189
|
+
"plugins": "plugins",
|
190
|
+
"requirements": "requirements",
|
191
|
+
"s3_prefix": "s3Prefix",
|
192
|
+
"startup_script": "startupScript",
|
193
|
+
},
|
194
|
+
)
|
195
|
+
class ConfigsOptions:
|
196
|
+
def __init__(
|
197
|
+
self,
|
198
|
+
*,
|
199
|
+
deploy_options: typing.Optional[typing.Union["DeployOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
200
|
+
local_path: typing.Optional[builtins.str] = None,
|
201
|
+
plugins: typing.Optional[typing.Union[ConfigFile, typing.Dict[builtins.str, typing.Any]]] = None,
|
202
|
+
requirements: typing.Optional[typing.Union[ConfigFile, typing.Dict[builtins.str, typing.Any]]] = None,
|
203
|
+
s3_prefix: typing.Optional[builtins.str] = None,
|
204
|
+
startup_script: typing.Optional[typing.Union[ConfigFile, typing.Dict[builtins.str, typing.Any]]] = None,
|
205
|
+
) -> None:
|
206
|
+
'''Configuration options for storing configuration files in S3.
|
207
|
+
|
208
|
+
:param deploy_options: Deployment options for configuration storage.
|
209
|
+
:param local_path: Optional local path for the configuration files.
|
210
|
+
:param plugins: Optional plugins file configuration.
|
211
|
+
:param requirements: Optional requirements file configuration.
|
212
|
+
:param s3_prefix: The S3 prefix where configuration files are stored.
|
213
|
+
:param startup_script: Optional startup script file configuration.
|
214
|
+
'''
|
215
|
+
if isinstance(deploy_options, dict):
|
216
|
+
deploy_options = DeployOptions(**deploy_options)
|
217
|
+
if isinstance(plugins, dict):
|
218
|
+
plugins = ConfigFile(**plugins)
|
219
|
+
if isinstance(requirements, dict):
|
220
|
+
requirements = ConfigFile(**requirements)
|
221
|
+
if isinstance(startup_script, dict):
|
222
|
+
startup_script = ConfigFile(**startup_script)
|
223
|
+
if __debug__:
|
224
|
+
type_hints = typing.get_type_hints(_typecheckingstub__21e969a6710fc7238d65620a64ca6e99674b344908eb39331069a48b8b9f6f37)
|
225
|
+
check_type(argname="argument deploy_options", value=deploy_options, expected_type=type_hints["deploy_options"])
|
226
|
+
check_type(argname="argument local_path", value=local_path, expected_type=type_hints["local_path"])
|
227
|
+
check_type(argname="argument plugins", value=plugins, expected_type=type_hints["plugins"])
|
228
|
+
check_type(argname="argument requirements", value=requirements, expected_type=type_hints["requirements"])
|
229
|
+
check_type(argname="argument s3_prefix", value=s3_prefix, expected_type=type_hints["s3_prefix"])
|
230
|
+
check_type(argname="argument startup_script", value=startup_script, expected_type=type_hints["startup_script"])
|
231
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
232
|
+
if deploy_options is not None:
|
233
|
+
self._values["deploy_options"] = deploy_options
|
234
|
+
if local_path is not None:
|
235
|
+
self._values["local_path"] = local_path
|
236
|
+
if plugins is not None:
|
237
|
+
self._values["plugins"] = plugins
|
238
|
+
if requirements is not None:
|
239
|
+
self._values["requirements"] = requirements
|
240
|
+
if s3_prefix is not None:
|
241
|
+
self._values["s3_prefix"] = s3_prefix
|
242
|
+
if startup_script is not None:
|
243
|
+
self._values["startup_script"] = startup_script
|
244
|
+
|
245
|
+
@builtins.property
|
246
|
+
def deploy_options(self) -> typing.Optional["DeployOptions"]:
|
247
|
+
'''Deployment options for configuration storage.'''
|
248
|
+
result = self._values.get("deploy_options")
|
249
|
+
return typing.cast(typing.Optional["DeployOptions"], result)
|
250
|
+
|
251
|
+
@builtins.property
|
252
|
+
def local_path(self) -> typing.Optional[builtins.str]:
|
253
|
+
'''Optional local path for the configuration files.'''
|
254
|
+
result = self._values.get("local_path")
|
255
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
256
|
+
|
257
|
+
@builtins.property
|
258
|
+
def plugins(self) -> typing.Optional[ConfigFile]:
|
259
|
+
'''Optional plugins file configuration.'''
|
260
|
+
result = self._values.get("plugins")
|
261
|
+
return typing.cast(typing.Optional[ConfigFile], result)
|
262
|
+
|
263
|
+
@builtins.property
|
264
|
+
def requirements(self) -> typing.Optional[ConfigFile]:
|
265
|
+
'''Optional requirements file configuration.'''
|
266
|
+
result = self._values.get("requirements")
|
267
|
+
return typing.cast(typing.Optional[ConfigFile], result)
|
268
|
+
|
269
|
+
@builtins.property
|
270
|
+
def s3_prefix(self) -> typing.Optional[builtins.str]:
|
271
|
+
'''The S3 prefix where configuration files are stored.'''
|
272
|
+
result = self._values.get("s3_prefix")
|
273
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
274
|
+
|
275
|
+
@builtins.property
|
276
|
+
def startup_script(self) -> typing.Optional[ConfigFile]:
|
277
|
+
'''Optional startup script file configuration.'''
|
278
|
+
result = self._values.get("startup_script")
|
279
|
+
return typing.cast(typing.Optional[ConfigFile], result)
|
280
|
+
|
281
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
282
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
283
|
+
|
284
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
285
|
+
return not (rhs == self)
|
286
|
+
|
287
|
+
def __repr__(self) -> str:
|
288
|
+
return "ConfigsOptions(%s)" % ", ".join(
|
289
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
290
|
+
)
|
291
|
+
|
292
|
+
|
126
293
|
class DagStorage(
|
127
294
|
_constructs_77d1e7e8.Construct,
|
128
295
|
metaclass=jsii.JSIIMeta,
|
129
296
|
jsii_type="cdk-mwaa.DagStorage",
|
130
297
|
):
|
131
|
-
'''Represents
|
298
|
+
'''Represents an S3 storage solution for MWAA DAGs and dependencies.'''
|
132
299
|
|
133
300
|
def __init__(
|
134
301
|
self,
|
@@ -136,27 +303,21 @@ class DagStorage(
|
|
136
303
|
id: builtins.str,
|
137
304
|
*,
|
138
305
|
bucket_name: typing.Optional[builtins.str] = None,
|
139
|
-
|
140
|
-
|
306
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
307
|
+
dags_options: typing.Optional[typing.Union["DagsOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
141
308
|
noncurrent_version_expiration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
142
|
-
plugins_config: typing.Optional[typing.Union["DagStorageConfigOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
143
309
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
144
|
-
requirements_config: typing.Optional[typing.Union["DagStorageConfigOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
145
|
-
startup_script_config: typing.Optional[typing.Union["DagStorageConfigOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
146
310
|
versioned: typing.Optional[builtins.bool] = None,
|
147
311
|
) -> None:
|
148
312
|
'''
|
149
313
|
:param scope: -
|
150
314
|
:param id: -
|
151
315
|
:param bucket_name: Optional custom bucket name.
|
152
|
-
:param
|
153
|
-
:param
|
154
|
-
:param noncurrent_version_expiration: Lifecycle rule for expiring non-current versions.
|
155
|
-
:param
|
156
|
-
:param
|
157
|
-
:param requirements_config: Configuration for requirements storage.
|
158
|
-
:param startup_script_config: Configuration for startup script storage.
|
159
|
-
:param versioned: Enable versioning for the bucket.
|
316
|
+
:param configs_options: Configuration for additional configuration files.
|
317
|
+
:param dags_options: Configuration for DAG storage.
|
318
|
+
:param noncurrent_version_expiration: Lifecycle rule for expiring non-current object versions.
|
319
|
+
:param removal_policy: Policy to determine bucket removal behavior.
|
320
|
+
:param versioned: Whether to enable versioning for the bucket.
|
160
321
|
'''
|
161
322
|
if __debug__:
|
162
323
|
type_hints = typing.get_type_hints(_typecheckingstub__95a166027e8ebcfead2708b1c3388e60862a4fb6d86763bf56854f275bdd2390)
|
@@ -164,13 +325,10 @@ class DagStorage(
|
|
164
325
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
165
326
|
props = DagStorageProps(
|
166
327
|
bucket_name=bucket_name,
|
167
|
-
|
168
|
-
|
328
|
+
configs_options=configs_options,
|
329
|
+
dags_options=dags_options,
|
169
330
|
noncurrent_version_expiration=noncurrent_version_expiration,
|
170
|
-
plugins_config=plugins_config,
|
171
331
|
removal_policy=removal_policy,
|
172
|
-
requirements_config=requirements_config,
|
173
|
-
startup_script_config=startup_script_config,
|
174
332
|
versioned=versioned,
|
175
333
|
)
|
176
334
|
|
@@ -189,63 +347,132 @@ class DagStorage(
|
|
189
347
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "dagS3Path"))
|
190
348
|
|
191
349
|
@builtins.property
|
192
|
-
@jsii.member(jsii_name="
|
193
|
-
def
|
194
|
-
|
195
|
-
return typing.cast(typing.Optional["DagStorageConfigOptions"], jsii.get(self, "pluginsConfig"))
|
350
|
+
@jsii.member(jsii_name="pluginsS3ObjectVersion")
|
351
|
+
def plugins_s3_object_version(self) -> typing.Optional[builtins.str]:
|
352
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "pluginsS3ObjectVersion"))
|
196
353
|
|
197
354
|
@builtins.property
|
198
|
-
@jsii.member(jsii_name="
|
199
|
-
def
|
200
|
-
'''
|
201
|
-
return typing.cast(typing.Optional[
|
355
|
+
@jsii.member(jsii_name="pluginsS3Path")
|
356
|
+
def plugins_s3_path(self) -> typing.Optional[builtins.str]:
|
357
|
+
'''S3 paths and object versions for configuration files.'''
|
358
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "pluginsS3Path"))
|
202
359
|
|
203
360
|
@builtins.property
|
204
|
-
@jsii.member(jsii_name="
|
205
|
-
def
|
206
|
-
|
207
|
-
|
361
|
+
@jsii.member(jsii_name="requirementsS3ObjectVersion")
|
362
|
+
def requirements_s3_object_version(self) -> typing.Optional[builtins.str]:
|
363
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "requirementsS3ObjectVersion"))
|
364
|
+
|
365
|
+
@builtins.property
|
366
|
+
@jsii.member(jsii_name="requirementsS3Path")
|
367
|
+
def requirements_s3_path(self) -> typing.Optional[builtins.str]:
|
368
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "requirementsS3Path"))
|
369
|
+
|
370
|
+
@builtins.property
|
371
|
+
@jsii.member(jsii_name="startupScriptS3ObjectVersion")
|
372
|
+
def startup_script_s3_object_version(self) -> typing.Optional[builtins.str]:
|
373
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "startupScriptS3ObjectVersion"))
|
374
|
+
|
375
|
+
@builtins.property
|
376
|
+
@jsii.member(jsii_name="startupScriptS3Path")
|
377
|
+
def startup_script_s3_path(self) -> typing.Optional[builtins.str]:
|
378
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "startupScriptS3Path"))
|
208
379
|
|
209
380
|
|
210
381
|
@jsii.data_type(
|
211
|
-
jsii_type="cdk-mwaa.
|
382
|
+
jsii_type="cdk-mwaa.DagStorageProps",
|
212
383
|
jsii_struct_bases=[],
|
213
|
-
name_mapping={
|
384
|
+
name_mapping={
|
385
|
+
"bucket_name": "bucketName",
|
386
|
+
"configs_options": "configsOptions",
|
387
|
+
"dags_options": "dagsOptions",
|
388
|
+
"noncurrent_version_expiration": "noncurrentVersionExpiration",
|
389
|
+
"removal_policy": "removalPolicy",
|
390
|
+
"versioned": "versioned",
|
391
|
+
},
|
214
392
|
)
|
215
|
-
class
|
393
|
+
class DagStorageProps:
|
216
394
|
def __init__(
|
217
395
|
self,
|
218
396
|
*,
|
219
|
-
|
220
|
-
|
397
|
+
bucket_name: typing.Optional[builtins.str] = None,
|
398
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
399
|
+
dags_options: typing.Optional[typing.Union["DagsOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
400
|
+
noncurrent_version_expiration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
401
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
402
|
+
versioned: typing.Optional[builtins.bool] = None,
|
221
403
|
) -> None:
|
222
|
-
'''
|
404
|
+
'''Properties for configuring the DAG storage bucket.
|
223
405
|
|
224
|
-
:param
|
225
|
-
:param
|
406
|
+
:param bucket_name: Optional custom bucket name.
|
407
|
+
:param configs_options: Configuration for additional configuration files.
|
408
|
+
:param dags_options: Configuration for DAG storage.
|
409
|
+
:param noncurrent_version_expiration: Lifecycle rule for expiring non-current object versions.
|
410
|
+
:param removal_policy: Policy to determine bucket removal behavior.
|
411
|
+
:param versioned: Whether to enable versioning for the bucket.
|
226
412
|
'''
|
413
|
+
if isinstance(configs_options, dict):
|
414
|
+
configs_options = ConfigsOptions(**configs_options)
|
415
|
+
if isinstance(dags_options, dict):
|
416
|
+
dags_options = DagsOptions(**dags_options)
|
227
417
|
if __debug__:
|
228
|
-
type_hints = typing.get_type_hints(
|
229
|
-
check_type(argname="argument
|
230
|
-
check_type(argname="argument
|
231
|
-
|
232
|
-
"
|
233
|
-
|
234
|
-
|
235
|
-
|
418
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6a4bace9647a9566f3af4198e17ef015306e92a6d5f673b579ba6fdfcb5231da)
|
419
|
+
check_type(argname="argument bucket_name", value=bucket_name, expected_type=type_hints["bucket_name"])
|
420
|
+
check_type(argname="argument configs_options", value=configs_options, expected_type=type_hints["configs_options"])
|
421
|
+
check_type(argname="argument dags_options", value=dags_options, expected_type=type_hints["dags_options"])
|
422
|
+
check_type(argname="argument noncurrent_version_expiration", value=noncurrent_version_expiration, expected_type=type_hints["noncurrent_version_expiration"])
|
423
|
+
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
424
|
+
check_type(argname="argument versioned", value=versioned, expected_type=type_hints["versioned"])
|
425
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
426
|
+
if bucket_name is not None:
|
427
|
+
self._values["bucket_name"] = bucket_name
|
428
|
+
if configs_options is not None:
|
429
|
+
self._values["configs_options"] = configs_options
|
430
|
+
if dags_options is not None:
|
431
|
+
self._values["dags_options"] = dags_options
|
432
|
+
if noncurrent_version_expiration is not None:
|
433
|
+
self._values["noncurrent_version_expiration"] = noncurrent_version_expiration
|
434
|
+
if removal_policy is not None:
|
435
|
+
self._values["removal_policy"] = removal_policy
|
436
|
+
if versioned is not None:
|
437
|
+
self._values["versioned"] = versioned
|
236
438
|
|
237
439
|
@builtins.property
|
238
|
-
def
|
239
|
-
'''
|
240
|
-
result = self._values.get("
|
241
|
-
|
242
|
-
return typing.cast(builtins.str, result)
|
440
|
+
def bucket_name(self) -> typing.Optional[builtins.str]:
|
441
|
+
'''Optional custom bucket name.'''
|
442
|
+
result = self._values.get("bucket_name")
|
443
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
243
444
|
|
244
445
|
@builtins.property
|
245
|
-
def
|
246
|
-
'''
|
247
|
-
result = self._values.get("
|
248
|
-
return typing.cast(typing.Optional[
|
446
|
+
def configs_options(self) -> typing.Optional[ConfigsOptions]:
|
447
|
+
'''Configuration for additional configuration files.'''
|
448
|
+
result = self._values.get("configs_options")
|
449
|
+
return typing.cast(typing.Optional[ConfigsOptions], result)
|
450
|
+
|
451
|
+
@builtins.property
|
452
|
+
def dags_options(self) -> typing.Optional["DagsOptions"]:
|
453
|
+
'''Configuration for DAG storage.'''
|
454
|
+
result = self._values.get("dags_options")
|
455
|
+
return typing.cast(typing.Optional["DagsOptions"], result)
|
456
|
+
|
457
|
+
@builtins.property
|
458
|
+
def noncurrent_version_expiration(
|
459
|
+
self,
|
460
|
+
) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
|
461
|
+
'''Lifecycle rule for expiring non-current object versions.'''
|
462
|
+
result = self._values.get("noncurrent_version_expiration")
|
463
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
464
|
+
|
465
|
+
@builtins.property
|
466
|
+
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
467
|
+
'''Policy to determine bucket removal behavior.'''
|
468
|
+
result = self._values.get("removal_policy")
|
469
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
470
|
+
|
471
|
+
@builtins.property
|
472
|
+
def versioned(self) -> typing.Optional[builtins.bool]:
|
473
|
+
'''Whether to enable versioning for the bucket.'''
|
474
|
+
result = self._values.get("versioned")
|
475
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
249
476
|
|
250
477
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
251
478
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
@@ -254,66 +481,66 @@ class DagStorageConfigOptions:
|
|
254
481
|
return not (rhs == self)
|
255
482
|
|
256
483
|
def __repr__(self) -> str:
|
257
|
-
return "
|
484
|
+
return "DagStorageProps(%s)" % ", ".join(
|
258
485
|
k + "=" + repr(v) for k, v in self._values.items()
|
259
486
|
)
|
260
487
|
|
261
488
|
|
262
489
|
@jsii.data_type(
|
263
|
-
jsii_type="cdk-mwaa.
|
490
|
+
jsii_type="cdk-mwaa.DagsOptions",
|
264
491
|
jsii_struct_bases=[],
|
265
492
|
name_mapping={
|
266
|
-
"
|
267
|
-
"
|
268
|
-
"
|
493
|
+
"deploy_options": "deployOptions",
|
494
|
+
"local_path": "localPath",
|
495
|
+
"s3_path": "s3Path",
|
269
496
|
},
|
270
497
|
)
|
271
|
-
class
|
498
|
+
class DagsOptions:
|
272
499
|
def __init__(
|
273
500
|
self,
|
274
501
|
*,
|
275
|
-
|
276
|
-
|
277
|
-
|
502
|
+
deploy_options: typing.Optional[typing.Union["DeployOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
503
|
+
local_path: typing.Optional[builtins.str] = None,
|
504
|
+
s3_path: typing.Optional[builtins.str] = None,
|
278
505
|
) -> None:
|
279
|
-
'''
|
506
|
+
'''Configuration options for DAG storage.
|
280
507
|
|
281
|
-
:param
|
282
|
-
:param
|
283
|
-
:param
|
508
|
+
:param deploy_options: Deployment options for DAG storage.
|
509
|
+
:param local_path: Optional local path for DAGs before deployment.
|
510
|
+
:param s3_path: The S3 path where the DAGs are stored.
|
284
511
|
'''
|
512
|
+
if isinstance(deploy_options, dict):
|
513
|
+
deploy_options = DeployOptions(**deploy_options)
|
285
514
|
if __debug__:
|
286
|
-
type_hints = typing.get_type_hints(
|
287
|
-
check_type(argname="argument
|
288
|
-
check_type(argname="argument
|
289
|
-
check_type(argname="argument
|
515
|
+
type_hints = typing.get_type_hints(_typecheckingstub__098c6089073cc202551294a55936ecb95864b4c571722f34012f6a90ac91ac1d)
|
516
|
+
check_type(argname="argument deploy_options", value=deploy_options, expected_type=type_hints["deploy_options"])
|
517
|
+
check_type(argname="argument local_path", value=local_path, expected_type=type_hints["local_path"])
|
518
|
+
check_type(argname="argument s3_path", value=s3_path, expected_type=type_hints["s3_path"])
|
290
519
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
291
|
-
if
|
292
|
-
self._values["
|
293
|
-
if
|
294
|
-
self._values["
|
295
|
-
if
|
296
|
-
self._values["
|
520
|
+
if deploy_options is not None:
|
521
|
+
self._values["deploy_options"] = deploy_options
|
522
|
+
if local_path is not None:
|
523
|
+
self._values["local_path"] = local_path
|
524
|
+
if s3_path is not None:
|
525
|
+
self._values["s3_path"] = s3_path
|
297
526
|
|
298
527
|
@builtins.property
|
299
|
-
def
|
300
|
-
'''
|
301
|
-
result = self._values.get("
|
302
|
-
return typing.cast(typing.Optional[
|
528
|
+
def deploy_options(self) -> typing.Optional["DeployOptions"]:
|
529
|
+
'''Deployment options for DAG storage.'''
|
530
|
+
result = self._values.get("deploy_options")
|
531
|
+
return typing.cast(typing.Optional["DeployOptions"], result)
|
303
532
|
|
304
533
|
@builtins.property
|
305
|
-
def
|
306
|
-
'''
|
307
|
-
result = self._values.get("
|
308
|
-
return typing.cast(typing.Optional[builtins.
|
534
|
+
def local_path(self) -> typing.Optional[builtins.str]:
|
535
|
+
'''Optional local path for DAGs before deployment.'''
|
536
|
+
result = self._values.get("local_path")
|
537
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
309
538
|
|
310
539
|
@builtins.property
|
311
|
-
def
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
result = self._values.get("sources")
|
316
|
-
return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_s3_deployment_ceddda9d.ISource]], result)
|
540
|
+
def s3_path(self) -> typing.Optional[builtins.str]:
|
541
|
+
'''The S3 path where the DAGs are stored.'''
|
542
|
+
result = self._values.get("s3_path")
|
543
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
317
544
|
|
318
545
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
319
546
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
@@ -322,145 +549,63 @@ class DagStorageDeployOptions:
|
|
322
549
|
return not (rhs == self)
|
323
550
|
|
324
551
|
def __repr__(self) -> str:
|
325
|
-
return "
|
552
|
+
return "DagsOptions(%s)" % ", ".join(
|
326
553
|
k + "=" + repr(v) for k, v in self._values.items()
|
327
554
|
)
|
328
555
|
|
329
556
|
|
330
557
|
@jsii.data_type(
|
331
|
-
jsii_type="cdk-mwaa.
|
558
|
+
jsii_type="cdk-mwaa.DeployOptions",
|
332
559
|
jsii_struct_bases=[],
|
333
560
|
name_mapping={
|
334
|
-
"
|
335
|
-
"
|
336
|
-
"
|
337
|
-
"noncurrent_version_expiration": "noncurrentVersionExpiration",
|
338
|
-
"plugins_config": "pluginsConfig",
|
339
|
-
"removal_policy": "removalPolicy",
|
340
|
-
"requirements_config": "requirementsConfig",
|
341
|
-
"startup_script_config": "startupScriptConfig",
|
342
|
-
"versioned": "versioned",
|
561
|
+
"exclude": "exclude",
|
562
|
+
"prune": "prune",
|
563
|
+
"retain_on_delete": "retainOnDelete",
|
343
564
|
},
|
344
565
|
)
|
345
|
-
class
|
566
|
+
class DeployOptions:
|
346
567
|
def __init__(
|
347
568
|
self,
|
348
569
|
*,
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
noncurrent_version_expiration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
353
|
-
plugins_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
354
|
-
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
355
|
-
requirements_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
356
|
-
startup_script_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
357
|
-
versioned: typing.Optional[builtins.bool] = None,
|
570
|
+
exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
|
571
|
+
prune: typing.Optional[builtins.bool] = None,
|
572
|
+
retain_on_delete: typing.Optional[builtins.bool] = None,
|
358
573
|
) -> None:
|
359
|
-
'''
|
574
|
+
'''Options for deploying files to the DAG storage bucket.
|
360
575
|
|
361
|
-
:param
|
362
|
-
:param
|
363
|
-
:param
|
364
|
-
:param noncurrent_version_expiration: Lifecycle rule for expiring non-current versions.
|
365
|
-
:param plugins_config: Configuration for plugins storage.
|
366
|
-
:param removal_policy: Policy for bucket removal.
|
367
|
-
:param requirements_config: Configuration for requirements storage.
|
368
|
-
:param startup_script_config: Configuration for startup script storage.
|
369
|
-
:param versioned: Enable versioning for the bucket.
|
576
|
+
:param exclude: Patterns to exclude from deployment.
|
577
|
+
:param prune: Whether to remove outdated file versions.
|
578
|
+
:param retain_on_delete: Whether to retain files upon stack deletion.
|
370
579
|
'''
|
371
|
-
if isinstance(deploy_options, dict):
|
372
|
-
deploy_options = DagStorageDeployOptions(**deploy_options)
|
373
|
-
if isinstance(plugins_config, dict):
|
374
|
-
plugins_config = DagStorageConfigOptions(**plugins_config)
|
375
|
-
if isinstance(requirements_config, dict):
|
376
|
-
requirements_config = DagStorageConfigOptions(**requirements_config)
|
377
|
-
if isinstance(startup_script_config, dict):
|
378
|
-
startup_script_config = DagStorageConfigOptions(**startup_script_config)
|
379
580
|
if __debug__:
|
380
|
-
type_hints = typing.get_type_hints(
|
381
|
-
check_type(argname="argument
|
382
|
-
check_type(argname="argument
|
383
|
-
check_type(argname="argument
|
384
|
-
check_type(argname="argument noncurrent_version_expiration", value=noncurrent_version_expiration, expected_type=type_hints["noncurrent_version_expiration"])
|
385
|
-
check_type(argname="argument plugins_config", value=plugins_config, expected_type=type_hints["plugins_config"])
|
386
|
-
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
387
|
-
check_type(argname="argument requirements_config", value=requirements_config, expected_type=type_hints["requirements_config"])
|
388
|
-
check_type(argname="argument startup_script_config", value=startup_script_config, expected_type=type_hints["startup_script_config"])
|
389
|
-
check_type(argname="argument versioned", value=versioned, expected_type=type_hints["versioned"])
|
581
|
+
type_hints = typing.get_type_hints(_typecheckingstub__48a44035944b9df12f94158952c1f3535c44b8ea35ed316dfb479569f4286bb0)
|
582
|
+
check_type(argname="argument exclude", value=exclude, expected_type=type_hints["exclude"])
|
583
|
+
check_type(argname="argument prune", value=prune, expected_type=type_hints["prune"])
|
584
|
+
check_type(argname="argument retain_on_delete", value=retain_on_delete, expected_type=type_hints["retain_on_delete"])
|
390
585
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
391
|
-
if
|
392
|
-
self._values["
|
393
|
-
if
|
394
|
-
self._values["
|
395
|
-
if
|
396
|
-
self._values["
|
397
|
-
if noncurrent_version_expiration is not None:
|
398
|
-
self._values["noncurrent_version_expiration"] = noncurrent_version_expiration
|
399
|
-
if plugins_config is not None:
|
400
|
-
self._values["plugins_config"] = plugins_config
|
401
|
-
if removal_policy is not None:
|
402
|
-
self._values["removal_policy"] = removal_policy
|
403
|
-
if requirements_config is not None:
|
404
|
-
self._values["requirements_config"] = requirements_config
|
405
|
-
if startup_script_config is not None:
|
406
|
-
self._values["startup_script_config"] = startup_script_config
|
407
|
-
if versioned is not None:
|
408
|
-
self._values["versioned"] = versioned
|
409
|
-
|
410
|
-
@builtins.property
|
411
|
-
def bucket_name(self) -> typing.Optional[builtins.str]:
|
412
|
-
'''Optional custom bucket name.'''
|
413
|
-
result = self._values.get("bucket_name")
|
414
|
-
return typing.cast(typing.Optional[builtins.str], result)
|
415
|
-
|
416
|
-
@builtins.property
|
417
|
-
def dag_s3_path(self) -> typing.Optional[builtins.str]:
|
418
|
-
'''Path for storing DAG files.'''
|
419
|
-
result = self._values.get("dag_s3_path")
|
420
|
-
return typing.cast(typing.Optional[builtins.str], result)
|
421
|
-
|
422
|
-
@builtins.property
|
423
|
-
def deploy_options(self) -> typing.Optional[DagStorageDeployOptions]:
|
424
|
-
'''Options for deploying files into the bucket.'''
|
425
|
-
result = self._values.get("deploy_options")
|
426
|
-
return typing.cast(typing.Optional[DagStorageDeployOptions], result)
|
427
|
-
|
428
|
-
@builtins.property
|
429
|
-
def noncurrent_version_expiration(
|
430
|
-
self,
|
431
|
-
) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
|
432
|
-
'''Lifecycle rule for expiring non-current versions.'''
|
433
|
-
result = self._values.get("noncurrent_version_expiration")
|
434
|
-
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
435
|
-
|
436
|
-
@builtins.property
|
437
|
-
def plugins_config(self) -> typing.Optional[DagStorageConfigOptions]:
|
438
|
-
'''Configuration for plugins storage.'''
|
439
|
-
result = self._values.get("plugins_config")
|
440
|
-
return typing.cast(typing.Optional[DagStorageConfigOptions], result)
|
441
|
-
|
442
|
-
@builtins.property
|
443
|
-
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
444
|
-
'''Policy for bucket removal.'''
|
445
|
-
result = self._values.get("removal_policy")
|
446
|
-
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
586
|
+
if exclude is not None:
|
587
|
+
self._values["exclude"] = exclude
|
588
|
+
if prune is not None:
|
589
|
+
self._values["prune"] = prune
|
590
|
+
if retain_on_delete is not None:
|
591
|
+
self._values["retain_on_delete"] = retain_on_delete
|
447
592
|
|
448
593
|
@builtins.property
|
449
|
-
def
|
450
|
-
'''
|
451
|
-
result = self._values.get("
|
452
|
-
return typing.cast(typing.Optional[
|
594
|
+
def exclude(self) -> typing.Optional[typing.List[builtins.str]]:
|
595
|
+
'''Patterns to exclude from deployment.'''
|
596
|
+
result = self._values.get("exclude")
|
597
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
453
598
|
|
454
599
|
@builtins.property
|
455
|
-
def
|
456
|
-
'''
|
457
|
-
result = self._values.get("
|
458
|
-
return typing.cast(typing.Optional[
|
600
|
+
def prune(self) -> typing.Optional[builtins.bool]:
|
601
|
+
'''Whether to remove outdated file versions.'''
|
602
|
+
result = self._values.get("prune")
|
603
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
459
604
|
|
460
605
|
@builtins.property
|
461
|
-
def
|
462
|
-
'''
|
463
|
-
result = self._values.get("
|
606
|
+
def retain_on_delete(self) -> typing.Optional[builtins.bool]:
|
607
|
+
'''Whether to retain files upon stack deletion.'''
|
608
|
+
result = self._values.get("retain_on_delete")
|
464
609
|
return typing.cast(typing.Optional[builtins.bool], result)
|
465
610
|
|
466
611
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
@@ -470,7 +615,7 @@ class DagStorageProps:
|
|
470
615
|
return not (rhs == self)
|
471
616
|
|
472
617
|
def __repr__(self) -> str:
|
473
|
-
return "
|
618
|
+
return "DeployOptions(%s)" % ", ".join(
|
474
619
|
k + "=" + repr(v) for k, v in self._values.items()
|
475
620
|
)
|
476
621
|
|
@@ -1079,7 +1224,8 @@ class LoggingConfigurationProperty:
|
|
1079
1224
|
"environment_name": "environmentName",
|
1080
1225
|
"airflow_configuration_options": "airflowConfigurationOptions",
|
1081
1226
|
"bucket_name": "bucketName",
|
1082
|
-
"
|
1227
|
+
"configs_options": "configsOptions",
|
1228
|
+
"dags_options": "dagsOptions",
|
1083
1229
|
"removal_policy": "removalPolicy",
|
1084
1230
|
"sizing": "sizing",
|
1085
1231
|
"vpc": "vpc",
|
@@ -1093,7 +1239,8 @@ class MWAAProps:
|
|
1093
1239
|
environment_name: builtins.str,
|
1094
1240
|
airflow_configuration_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
|
1095
1241
|
bucket_name: typing.Optional[builtins.str] = None,
|
1096
|
-
|
1242
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1243
|
+
dags_options: typing.Optional[typing.Union[DagsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1097
1244
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
1098
1245
|
sizing: typing.Optional["Sizing"] = None,
|
1099
1246
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
@@ -1104,20 +1251,24 @@ class MWAAProps:
|
|
1104
1251
|
:param environment_name: The name of the Airflow environment.
|
1105
1252
|
:param airflow_configuration_options: Airflow configuration options as key-value pairs. These configuration options are passed to the Airflow environment.
|
1106
1253
|
:param bucket_name: The name of the S3 bucket used for storing DAGs. If not provided, a default bucket is created.
|
1107
|
-
:param
|
1254
|
+
:param configs_options: Configuration for plugins storage.
|
1255
|
+
:param dags_options: Configuration for DAG storage.
|
1108
1256
|
:param removal_policy: The removal policy for the MWAA resources. Determines what happens to the resources when they are deleted. Defaults to 'RETAIN' if not specified.
|
1109
1257
|
:param sizing: Optional sizing configuration for the MWAA environment. Defines the compute resources.
|
1110
1258
|
:param vpc: The VPC in which to deploy the MWAA environment. If not provided, a default VPC will be created.
|
1111
1259
|
'''
|
1112
|
-
if isinstance(
|
1113
|
-
|
1260
|
+
if isinstance(configs_options, dict):
|
1261
|
+
configs_options = ConfigsOptions(**configs_options)
|
1262
|
+
if isinstance(dags_options, dict):
|
1263
|
+
dags_options = DagsOptions(**dags_options)
|
1114
1264
|
if __debug__:
|
1115
1265
|
type_hints = typing.get_type_hints(_typecheckingstub__e73d818937427f32bb22179ff7d13eb6aa0201131959780924f6ec21b94dd128)
|
1116
1266
|
check_type(argname="argument airflow_version", value=airflow_version, expected_type=type_hints["airflow_version"])
|
1117
1267
|
check_type(argname="argument environment_name", value=environment_name, expected_type=type_hints["environment_name"])
|
1118
1268
|
check_type(argname="argument airflow_configuration_options", value=airflow_configuration_options, expected_type=type_hints["airflow_configuration_options"])
|
1119
1269
|
check_type(argname="argument bucket_name", value=bucket_name, expected_type=type_hints["bucket_name"])
|
1120
|
-
check_type(argname="argument
|
1270
|
+
check_type(argname="argument configs_options", value=configs_options, expected_type=type_hints["configs_options"])
|
1271
|
+
check_type(argname="argument dags_options", value=dags_options, expected_type=type_hints["dags_options"])
|
1121
1272
|
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
1122
1273
|
check_type(argname="argument sizing", value=sizing, expected_type=type_hints["sizing"])
|
1123
1274
|
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
@@ -1129,8 +1280,10 @@ class MWAAProps:
|
|
1129
1280
|
self._values["airflow_configuration_options"] = airflow_configuration_options
|
1130
1281
|
if bucket_name is not None:
|
1131
1282
|
self._values["bucket_name"] = bucket_name
|
1132
|
-
if
|
1133
|
-
self._values["
|
1283
|
+
if configs_options is not None:
|
1284
|
+
self._values["configs_options"] = configs_options
|
1285
|
+
if dags_options is not None:
|
1286
|
+
self._values["dags_options"] = dags_options
|
1134
1287
|
if removal_policy is not None:
|
1135
1288
|
self._values["removal_policy"] = removal_policy
|
1136
1289
|
if sizing is not None:
|
@@ -1173,13 +1326,16 @@ class MWAAProps:
|
|
1173
1326
|
return typing.cast(typing.Optional[builtins.str], result)
|
1174
1327
|
|
1175
1328
|
@builtins.property
|
1176
|
-
def
|
1177
|
-
'''
|
1329
|
+
def configs_options(self) -> typing.Optional[ConfigsOptions]:
|
1330
|
+
'''Configuration for plugins storage.'''
|
1331
|
+
result = self._values.get("configs_options")
|
1332
|
+
return typing.cast(typing.Optional[ConfigsOptions], result)
|
1178
1333
|
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1334
|
+
@builtins.property
|
1335
|
+
def dags_options(self) -> typing.Optional[DagsOptions]:
|
1336
|
+
'''Configuration for DAG storage.'''
|
1337
|
+
result = self._values.get("dags_options")
|
1338
|
+
return typing.cast(typing.Optional[DagsOptions], result)
|
1183
1339
|
|
1184
1340
|
@builtins.property
|
1185
1341
|
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
@@ -1240,7 +1396,8 @@ class PublicRoutingMWAA(
|
|
1240
1396
|
environment_name: builtins.str,
|
1241
1397
|
airflow_configuration_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
|
1242
1398
|
bucket_name: typing.Optional[builtins.str] = None,
|
1243
|
-
|
1399
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1400
|
+
dags_options: typing.Optional[typing.Union[DagsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1244
1401
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
1245
1402
|
sizing: typing.Optional["Sizing"] = None,
|
1246
1403
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
@@ -1252,7 +1409,8 @@ class PublicRoutingMWAA(
|
|
1252
1409
|
:param environment_name: The name of the Airflow environment.
|
1253
1410
|
:param airflow_configuration_options: Airflow configuration options as key-value pairs. These configuration options are passed to the Airflow environment.
|
1254
1411
|
:param bucket_name: The name of the S3 bucket used for storing DAGs. If not provided, a default bucket is created.
|
1255
|
-
:param
|
1412
|
+
:param configs_options: Configuration for plugins storage.
|
1413
|
+
:param dags_options: Configuration for DAG storage.
|
1256
1414
|
:param removal_policy: The removal policy for the MWAA resources. Determines what happens to the resources when they are deleted. Defaults to 'RETAIN' if not specified.
|
1257
1415
|
:param sizing: Optional sizing configuration for the MWAA environment. Defines the compute resources.
|
1258
1416
|
:param vpc: The VPC in which to deploy the MWAA environment. If not provided, a default VPC will be created.
|
@@ -1266,7 +1424,8 @@ class PublicRoutingMWAA(
|
|
1266
1424
|
environment_name=environment_name,
|
1267
1425
|
airflow_configuration_options=airflow_configuration_options,
|
1268
1426
|
bucket_name=bucket_name,
|
1269
|
-
|
1427
|
+
configs_options=configs_options,
|
1428
|
+
dags_options=dags_options,
|
1270
1429
|
removal_policy=removal_policy,
|
1271
1430
|
sizing=sizing,
|
1272
1431
|
vpc=vpc,
|
@@ -1751,10 +1910,12 @@ class WebserverAccessMode(enum.Enum):
|
|
1751
1910
|
|
1752
1911
|
|
1753
1912
|
__all__ = [
|
1913
|
+
"ConfigFile",
|
1914
|
+
"ConfigsOptions",
|
1754
1915
|
"DagStorage",
|
1755
|
-
"DagStorageConfigOptions",
|
1756
|
-
"DagStorageDeployOptions",
|
1757
1916
|
"DagStorageProps",
|
1917
|
+
"DagsOptions",
|
1918
|
+
"DeployOptions",
|
1758
1919
|
"EmailBackendOptions",
|
1759
1920
|
"EndpointManagement",
|
1760
1921
|
"Environment",
|
@@ -1775,51 +1936,66 @@ __all__ = [
|
|
1775
1936
|
|
1776
1937
|
publication.publish()
|
1777
1938
|
|
1939
|
+
def _typecheckingstub__18fc569fcf933a2b3ce7fe86ffe34609735a142137b7878008714403e6813a46(
|
1940
|
+
*,
|
1941
|
+
name: builtins.str,
|
1942
|
+
version: typing.Optional[builtins.str] = None,
|
1943
|
+
) -> None:
|
1944
|
+
"""Type checking stubs"""
|
1945
|
+
pass
|
1946
|
+
|
1947
|
+
def _typecheckingstub__21e969a6710fc7238d65620a64ca6e99674b344908eb39331069a48b8b9f6f37(
|
1948
|
+
*,
|
1949
|
+
deploy_options: typing.Optional[typing.Union[DeployOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1950
|
+
local_path: typing.Optional[builtins.str] = None,
|
1951
|
+
plugins: typing.Optional[typing.Union[ConfigFile, typing.Dict[builtins.str, typing.Any]]] = None,
|
1952
|
+
requirements: typing.Optional[typing.Union[ConfigFile, typing.Dict[builtins.str, typing.Any]]] = None,
|
1953
|
+
s3_prefix: typing.Optional[builtins.str] = None,
|
1954
|
+
startup_script: typing.Optional[typing.Union[ConfigFile, typing.Dict[builtins.str, typing.Any]]] = None,
|
1955
|
+
) -> None:
|
1956
|
+
"""Type checking stubs"""
|
1957
|
+
pass
|
1958
|
+
|
1778
1959
|
def _typecheckingstub__95a166027e8ebcfead2708b1c3388e60862a4fb6d86763bf56854f275bdd2390(
|
1779
1960
|
scope: _constructs_77d1e7e8.Construct,
|
1780
1961
|
id: builtins.str,
|
1781
1962
|
*,
|
1782
1963
|
bucket_name: typing.Optional[builtins.str] = None,
|
1783
|
-
|
1784
|
-
|
1964
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1965
|
+
dags_options: typing.Optional[typing.Union[DagsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1785
1966
|
noncurrent_version_expiration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
1786
|
-
plugins_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1787
1967
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
1788
|
-
requirements_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1789
|
-
startup_script_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1790
1968
|
versioned: typing.Optional[builtins.bool] = None,
|
1791
1969
|
) -> None:
|
1792
1970
|
"""Type checking stubs"""
|
1793
1971
|
pass
|
1794
1972
|
|
1795
|
-
def
|
1973
|
+
def _typecheckingstub__6a4bace9647a9566f3af4198e17ef015306e92a6d5f673b579ba6fdfcb5231da(
|
1796
1974
|
*,
|
1797
|
-
|
1798
|
-
|
1975
|
+
bucket_name: typing.Optional[builtins.str] = None,
|
1976
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1977
|
+
dags_options: typing.Optional[typing.Union[DagsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1978
|
+
noncurrent_version_expiration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
1979
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
1980
|
+
versioned: typing.Optional[builtins.bool] = None,
|
1799
1981
|
) -> None:
|
1800
1982
|
"""Type checking stubs"""
|
1801
1983
|
pass
|
1802
1984
|
|
1803
|
-
def
|
1985
|
+
def _typecheckingstub__098c6089073cc202551294a55936ecb95864b4c571722f34012f6a90ac91ac1d(
|
1804
1986
|
*,
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1987
|
+
deploy_options: typing.Optional[typing.Union[DeployOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1988
|
+
local_path: typing.Optional[builtins.str] = None,
|
1989
|
+
s3_path: typing.Optional[builtins.str] = None,
|
1808
1990
|
) -> None:
|
1809
1991
|
"""Type checking stubs"""
|
1810
1992
|
pass
|
1811
1993
|
|
1812
|
-
def
|
1994
|
+
def _typecheckingstub__48a44035944b9df12f94158952c1f3535c44b8ea35ed316dfb479569f4286bb0(
|
1813
1995
|
*,
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
noncurrent_version_expiration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
1818
|
-
plugins_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1819
|
-
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
1820
|
-
requirements_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1821
|
-
startup_script_config: typing.Optional[typing.Union[DagStorageConfigOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1822
|
-
versioned: typing.Optional[builtins.bool] = None,
|
1996
|
+
exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
|
1997
|
+
prune: typing.Optional[builtins.bool] = None,
|
1998
|
+
retain_on_delete: typing.Optional[builtins.bool] = None,
|
1823
1999
|
) -> None:
|
1824
2000
|
"""Type checking stubs"""
|
1825
2001
|
pass
|
@@ -1910,7 +2086,8 @@ def _typecheckingstub__e73d818937427f32bb22179ff7d13eb6aa0201131959780924f6ec21b
|
|
1910
2086
|
environment_name: builtins.str,
|
1911
2087
|
airflow_configuration_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
|
1912
2088
|
bucket_name: typing.Optional[builtins.str] = None,
|
1913
|
-
|
2089
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
2090
|
+
dags_options: typing.Optional[typing.Union[DagsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1914
2091
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
1915
2092
|
sizing: typing.Optional[Sizing] = None,
|
1916
2093
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
@@ -1926,7 +2103,8 @@ def _typecheckingstub__5715af45a5664383ddb469b7bffe2c8a7d75c3dfe608847aae4c9fd79
|
|
1926
2103
|
environment_name: builtins.str,
|
1927
2104
|
airflow_configuration_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
|
1928
2105
|
bucket_name: typing.Optional[builtins.str] = None,
|
1929
|
-
|
2106
|
+
configs_options: typing.Optional[typing.Union[ConfigsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
2107
|
+
dags_options: typing.Optional[typing.Union[DagsOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
1930
2108
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
1931
2109
|
sizing: typing.Optional[Sizing] = None,
|
1932
2110
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
cdk_mwaa/_jsii/__init__.py
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cdk-mwaa
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
4
4
|
Summary: cdk-mwaa
|
5
5
|
Home-page: https://github.com/hupe1980/cdk-mwaa.git
|
6
6
|
Author: hupe1980<frankhuebner1980@gmail.com>
|
@@ -51,6 +51,7 @@ yarn add cdk-mwaa
|
|
51
51
|
Here is an example of how to use the `cdk-mwaa` construct library in your AWS CDK project:
|
52
52
|
|
53
53
|
```python
|
54
|
+
import * as path from 'node:path';
|
54
55
|
import * as cdk from 'aws-cdk-lib';
|
55
56
|
import * as mwaa from 'cdk-mwaa';
|
56
57
|
|
@@ -59,7 +60,11 @@ const stack = new cdk.Stack(app, 'MwaaStack');
|
|
59
60
|
|
60
61
|
const dagStorage = new mwaa.DagStorage(stack, 'MyMwaaDagStorage', {
|
61
62
|
bucketName: 'my-mwaa-dag-storage',
|
62
|
-
|
63
|
+
dagsOptions: {
|
64
|
+
localPath: path.join(__dirname, 'dags'),
|
65
|
+
s3Path: 'dags/',
|
66
|
+
},
|
67
|
+
// additional configuration options...
|
63
68
|
});
|
64
69
|
|
65
70
|
new mwaa.Environment(stack, 'MyMwaaEnvironment', {
|
@@ -88,7 +93,7 @@ const stack = new cdk.Stack(app, 'MwaaStack');
|
|
88
93
|
|
89
94
|
const dagStorage = new mwaa.DagStorage(stack, 'MyMwaaDagStorage', {
|
90
95
|
bucketName: 'my-mwaa-dag-storage',
|
91
|
-
|
96
|
+
// additional configuration options...
|
92
97
|
});
|
93
98
|
|
94
99
|
const environment = new mwaa.Environment(stack, 'MyMwaaEnvironment', {
|
@@ -99,6 +104,7 @@ const environment = new mwaa.Environment(stack, 'MyMwaaEnvironment', {
|
|
99
104
|
// additional configuration options...
|
100
105
|
});
|
101
106
|
|
107
|
+
// Enabling Secrets Backend
|
102
108
|
environment.enableSecretsBackend();
|
103
109
|
|
104
110
|
app.synth();
|
@@ -0,0 +1,9 @@
|
|
1
|
+
cdk_mwaa/__init__.py,sha256=7SobFC8cxsR1IlX6s7H5zyRR3u9QnZcQI8suxhzPWeo,98461
|
2
|
+
cdk_mwaa/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
+
cdk_mwaa/_jsii/__init__.py,sha256=GTukRZALNpsqPbnW61HRAzLhgjQATC5jAk00Ir4qAPA,1427
|
4
|
+
cdk_mwaa/_jsii/cdk-mwaa@0.0.5.jsii.tgz,sha256=lD-fKVxFq1PRjYmAUMJ6Qf1M_J-6NtxBKyg62Gu8SsE,53762
|
5
|
+
cdk_mwaa-0.0.5.dist-info/LICENSE,sha256=GROW7AizgUVwWcX5o-CwAIpCxKEjgB76LUYIlvm6CRc,1052
|
6
|
+
cdk_mwaa-0.0.5.dist-info/METADATA,sha256=AjBNCQf7vrOrsUSU_nRBYvnZx7MLl6WnJuORw9m8tn8,3411
|
7
|
+
cdk_mwaa-0.0.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
8
|
+
cdk_mwaa-0.0.5.dist-info/top_level.txt,sha256=z7TehVmyHoAC8t6mK5tn4TX1KD56rdyY-knSDyjfhGU,9
|
9
|
+
cdk_mwaa-0.0.5.dist-info/RECORD,,
|
Binary file
|
cdk_mwaa-0.0.3.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
cdk_mwaa/__init__.py,sha256=waOS8vrOtXPU5302o_qTP7WSuWuKqXNXXyKyiJuBqss,91892
|
2
|
-
cdk_mwaa/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
-
cdk_mwaa/_jsii/__init__.py,sha256=kxhvqddOL_5jrh1_f0t054LfbPNgUjeTZEyWpiaIlFU,1427
|
4
|
-
cdk_mwaa/_jsii/cdk-mwaa@0.0.3.jsii.tgz,sha256=lpnweU0eiBDEMLzPLhEuEJqVcZHoQ_FL3Gu8ay6znu4,51325
|
5
|
-
cdk_mwaa-0.0.3.dist-info/LICENSE,sha256=GROW7AizgUVwWcX5o-CwAIpCxKEjgB76LUYIlvm6CRc,1052
|
6
|
-
cdk_mwaa-0.0.3.dist-info/METADATA,sha256=GwG7fJrgn-bvodoINV8TJNgW4ddkxg77k6ZensHtHD0,3252
|
7
|
-
cdk_mwaa-0.0.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
8
|
-
cdk_mwaa-0.0.3.dist-info/top_level.txt,sha256=z7TehVmyHoAC8t6mK5tn4TX1KD56rdyY-knSDyjfhGU,9
|
9
|
-
cdk_mwaa-0.0.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|