aws-cdk-lib 2.75.1__py3-none-any.whl → 2.76.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +245 -259
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.75.1.jsii.tgz → aws-cdk-lib@2.76.0.jsii.tgz} +0 -0
- aws_cdk/aws_amplifyuibuilder/__init__.py +184 -216
- aws_cdk/aws_apigateway/__init__.py +95 -148
- aws_cdk/aws_appconfig/__init__.py +8 -4
- aws_cdk/aws_appflow/__init__.py +27 -52
- aws_cdk/aws_appmesh/__init__.py +91 -200
- aws_cdk/aws_apprunner/__init__.py +4 -16
- aws_cdk/aws_appstream/__init__.py +18 -82
- aws_cdk/aws_athena/__init__.py +18 -32
- aws_cdk/aws_backup/__init__.py +48 -86
- aws_cdk/aws_billingconductor/__init__.py +12 -7
- aws_cdk/aws_budgets/__init__.py +8 -17
- aws_cdk/aws_certificatemanager/__init__.py +7 -4
- aws_cdk/aws_cloudfront/__init__.py +14 -11
- aws_cdk/aws_cloudfront_origins/__init__.py +18 -8
- aws_cdk/aws_cloudtrail/__init__.py +7 -10
- aws_cdk/aws_cloudwatch/__init__.py +63 -35
- aws_cdk/aws_codebuild/__init__.py +10 -13
- aws_cdk/aws_codecommit/__init__.py +0 -1
- aws_cdk/aws_codedeploy/__init__.py +165 -162
- aws_cdk/aws_codepipeline/__init__.py +0 -4
- aws_cdk/aws_codepipeline_actions/__init__.py +16 -164
- aws_cdk/aws_cognito/__init__.py +195 -100
- aws_cdk/aws_config/__init__.py +28 -51
- aws_cdk/aws_connectcampaigns/__init__.py +5 -6
- aws_cdk/aws_databrew/__init__.py +5 -6
- aws_cdk/aws_dlm/__init__.py +33 -71
- aws_cdk/aws_docdb/__init__.py +20 -76
- aws_cdk/aws_dynamodb/__init__.py +7 -14
- aws_cdk/aws_ec2/__init__.py +1846 -421
- aws_cdk/aws_ecr/__init__.py +1 -2
- aws_cdk/aws_ecr_assets/__init__.py +27 -14
- aws_cdk/aws_ecs/__init__.py +241 -111
- aws_cdk/aws_ecs_patterns/__init__.py +13 -11
- aws_cdk/aws_eks/__init__.py +13 -8
- aws_cdk/aws_elasticloadbalancing/__init__.py +16 -9
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +142 -82
- aws_cdk/aws_elasticloadbalancingv2_actions/__init__.py +126 -61
- aws_cdk/aws_elasticsearch/__init__.py +0 -7
- aws_cdk/aws_emr/__init__.py +7 -16
- aws_cdk/aws_emrserverless/__init__.py +14 -18
- aws_cdk/aws_events/__init__.py +33 -29
- aws_cdk/aws_events_targets/__init__.py +248 -89
- aws_cdk/aws_frauddetector/__init__.py +3 -4
- aws_cdk/aws_fsx/__init__.py +13 -7
- aws_cdk/aws_gamelift/__init__.py +11 -20
- aws_cdk/aws_iam/__init__.py +21 -25
- aws_cdk/aws_imagebuilder/__init__.py +58 -80
- aws_cdk/aws_iot/__init__.py +16 -10
- aws_cdk/aws_iotcoredeviceadvisor/__init__.py +16 -26
- aws_cdk/aws_iotevents/__init__.py +6 -4
- aws_cdk/aws_iotfleetwise/__init__.py +27 -40
- aws_cdk/aws_iotsitewise/__init__.py +8 -5
- aws_cdk/aws_kinesisfirehose/__init__.py +21 -38
- aws_cdk/aws_lambda/__init__.py +59 -48
- aws_cdk/aws_lambda_event_sources/__init__.py +6 -21
- aws_cdk/aws_logs/__init__.py +5 -7
- aws_cdk/aws_macie/__init__.py +22 -15
- aws_cdk/aws_mediaconnect/__init__.py +5 -8
- aws_cdk/aws_medialive/__init__.py +2 -4
- aws_cdk/aws_mediapackage/__init__.py +9 -18
- aws_cdk/aws_memorydb/__init__.py +5 -10
- aws_cdk/aws_mwaa/__init__.py +8 -4
- aws_cdk/aws_nimblestudio/__init__.py +25 -45
- aws_cdk/aws_opensearchservice/__init__.py +0 -1
- aws_cdk/aws_panorama/__init__.py +11 -12
- aws_cdk/aws_personalize/__init__.py +46 -72
- aws_cdk/aws_pinpoint/__init__.py +36 -65
- aws_cdk/aws_quicksight/__init__.py +9972 -13374
- aws_cdk/aws_rds/__init__.py +23 -22
- aws_cdk/aws_route53/__init__.py +8 -16
- aws_cdk/aws_route53_targets/__init__.py +2 -4
- aws_cdk/aws_s3/__init__.py +25 -85
- aws_cdk/aws_s3_notifications/__init__.py +0 -3
- aws_cdk/aws_sagemaker/__init__.py +6 -2
- aws_cdk/aws_secretsmanager/__init__.py +17 -14
- aws_cdk/aws_servicecatalog/__init__.py +58 -82
- aws_cdk/aws_servicediscovery/__init__.py +4 -6
- aws_cdk/aws_ses/__init__.py +21 -34
- aws_cdk/aws_sns/__init__.py +4 -8
- aws_cdk/aws_ssm/__init__.py +19 -23
- aws_cdk/aws_ssmcontacts/__init__.py +10 -6
- aws_cdk/aws_stepfunctions/__init__.py +3 -12
- aws_cdk/aws_stepfunctions_tasks/__init__.py +7 -12
- aws_cdk/aws_timestream/__init__.py +22 -28
- aws_cdk/aws_xray/__init__.py +15 -22
- aws_cdk/cloud_assembly_schema/__init__.py +14 -6
- aws_cdk/custom_resources/__init__.py +2 -3
- aws_cdk/pipelines/__init__.py +84 -134
- aws_cdk/triggers/__init__.py +46 -61
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/METADATA +47 -92
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/RECORD +98 -98
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/top_level.txt +0 -0
|
@@ -270,10 +270,10 @@ In order to create this type of secret, use the `secretObjectValue` input prop.
|
|
|
270
270
|
|
|
271
271
|
```python
|
|
272
272
|
# stack: Stack
|
|
273
|
-
user = iam.User(
|
|
274
|
-
access_key = iam.AccessKey(
|
|
273
|
+
user = iam.User(self, "User")
|
|
274
|
+
access_key = iam.AccessKey(self, "AccessKey", user=user)
|
|
275
275
|
|
|
276
|
-
secretsmanager.Secret(
|
|
276
|
+
secretsmanager.Secret(self, "Secret",
|
|
277
277
|
secret_object_value={
|
|
278
278
|
"username": SecretValue.unsafe_plain_text(user.user_name),
|
|
279
279
|
"database": SecretValue.unsafe_plain_text("foo"),
|
|
@@ -3921,10 +3921,10 @@ class Secret(
|
|
|
3921
3921
|
Example::
|
|
3922
3922
|
|
|
3923
3923
|
# stack: Stack
|
|
3924
|
-
user = iam.User(
|
|
3925
|
-
access_key = iam.AccessKey(
|
|
3924
|
+
user = iam.User(self, "User")
|
|
3925
|
+
access_key = iam.AccessKey(self, "AccessKey", user=user)
|
|
3926
3926
|
|
|
3927
|
-
secretsmanager.Secret(
|
|
3927
|
+
secretsmanager.Secret(self, "Secret",
|
|
3928
3928
|
secret_object_value={
|
|
3929
3929
|
"username": SecretValue.unsafe_plain_text(user.user_name),
|
|
3930
3930
|
"database": SecretValue.unsafe_plain_text("foo"),
|
|
@@ -4378,12 +4378,15 @@ class SecretAttributes:
|
|
|
4378
4378
|
|
|
4379
4379
|
Example::
|
|
4380
4380
|
|
|
4381
|
-
|
|
4381
|
+
userpool = cognito.UserPool(self, "Pool")
|
|
4382
|
+
secret = secretsmanager.Secret.from_secret_attributes(self, "CognitoClientSecret",
|
|
4383
|
+
secret_complete_arn="arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
|
|
4384
|
+
).secret_value
|
|
4382
4385
|
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4386
|
+
provider = cognito.UserPoolIdentityProviderGoogle(self, "Google",
|
|
4387
|
+
client_id="amzn-client-id",
|
|
4388
|
+
client_secret_value=secret,
|
|
4389
|
+
user_pool=userpool
|
|
4387
4390
|
)
|
|
4388
4391
|
'''
|
|
4389
4392
|
if __debug__:
|
|
@@ -4483,10 +4486,10 @@ class SecretProps:
|
|
|
4483
4486
|
Example::
|
|
4484
4487
|
|
|
4485
4488
|
# stack: Stack
|
|
4486
|
-
user = iam.User(
|
|
4487
|
-
access_key = iam.AccessKey(
|
|
4489
|
+
user = iam.User(self, "User")
|
|
4490
|
+
access_key = iam.AccessKey(self, "AccessKey", user=user)
|
|
4488
4491
|
|
|
4489
|
-
secretsmanager.Secret(
|
|
4492
|
+
secretsmanager.Secret(self, "Secret",
|
|
4490
4493
|
secret_object_value={
|
|
4491
4494
|
"username": SecretValue.unsafe_plain_text(user.user_name),
|
|
4492
4495
|
"database": SecretValue.unsafe_plain_text("foo"),
|
|
@@ -71,8 +71,6 @@ Entities with granted access will be able to utilize the portfolios resources an
|
|
|
71
71
|
Once resources are deployed end users will be able to access them via the console or service catalog CLI.
|
|
72
72
|
|
|
73
73
|
```python
|
|
74
|
-
import aws_cdk.aws_iam as iam
|
|
75
|
-
|
|
76
74
|
# portfolio: servicecatalog.Portfolio
|
|
77
75
|
|
|
78
76
|
|
|
@@ -152,7 +150,6 @@ such as an S3 Bucket, IAM roles, and EC2 instances. This stack is passed in as a
|
|
|
152
150
|
product. This will not create a separate CloudFormation stack during deployment.
|
|
153
151
|
|
|
154
152
|
```python
|
|
155
|
-
import aws_cdk.aws_s3 as s3
|
|
156
153
|
import aws_cdk as cdk
|
|
157
154
|
|
|
158
155
|
|
|
@@ -179,15 +176,14 @@ You can reference assets in a Product Stack. For example, we can add a handler t
|
|
|
179
176
|
In this case, you must provide a S3 Bucket with a bucketName to store your assets.
|
|
180
177
|
|
|
181
178
|
```python
|
|
182
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
183
179
|
import aws_cdk.aws_lambda as lambda_
|
|
184
180
|
import aws_cdk as cdk
|
|
185
181
|
from aws_cdk.aws_s3 import Bucket
|
|
186
182
|
|
|
187
183
|
|
|
188
184
|
class LambdaProduct(servicecatalog.ProductStack):
|
|
189
|
-
def __init__(self, scope, id):
|
|
190
|
-
super().__init__(scope, id)
|
|
185
|
+
def __init__(self, scope, id, *, assetBucket=None):
|
|
186
|
+
super().__init__(scope, id, assetBucket=assetBucket)
|
|
191
187
|
|
|
192
188
|
lambda_.Function(self, "LambdaProduct",
|
|
193
189
|
runtime=lambda_.Runtime.PYTHON_3_9,
|
|
@@ -204,9 +200,9 @@ product = servicecatalog.CloudFormationProduct(self, "Product",
|
|
|
204
200
|
owner="Product Owner",
|
|
205
201
|
product_versions=[servicecatalog.CloudFormationProductVersion(
|
|
206
202
|
product_version_name="v1",
|
|
207
|
-
cloud_formation_template=servicecatalog.CloudFormationTemplate.from_product_stack(LambdaProduct(self, "LambdaFunctionProduct",
|
|
208
|
-
|
|
209
|
-
|
|
203
|
+
cloud_formation_template=servicecatalog.CloudFormationTemplate.from_product_stack(LambdaProduct(self, "LambdaFunctionProduct",
|
|
204
|
+
asset_bucket=user_defined_bucket
|
|
205
|
+
))
|
|
210
206
|
)
|
|
211
207
|
]
|
|
212
208
|
)
|
|
@@ -221,7 +217,9 @@ If you want to provide your own bucket policy or scope down your bucket policy f
|
|
|
221
217
|
reads from a specific launch role, refer to the following example policy:
|
|
222
218
|
|
|
223
219
|
```python
|
|
224
|
-
#
|
|
220
|
+
# bucket: s3.IBucket
|
|
221
|
+
|
|
222
|
+
|
|
225
223
|
iam.PolicyStatement(
|
|
226
224
|
actions=["s3:GetObject*", "s3:GetBucket*", "s3:List*"
|
|
227
225
|
],
|
|
@@ -230,20 +228,20 @@ iam.PolicyStatement(
|
|
|
230
228
|
bucket.arn_for_objects("*")
|
|
231
229
|
],
|
|
232
230
|
principals=[
|
|
233
|
-
iam.ArnPrincipal(
|
|
231
|
+
iam.ArnPrincipal(Stack.of(self).format_arn(
|
|
234
232
|
service="iam",
|
|
235
233
|
region="",
|
|
236
|
-
|
|
234
|
+
account="111111111111",
|
|
237
235
|
resource="role",
|
|
238
|
-
resource_name=
|
|
236
|
+
resource_name="MyLaunchRole"
|
|
239
237
|
))
|
|
240
238
|
],
|
|
241
239
|
conditions={
|
|
242
240
|
"ForAnyValue:StringEquals": {
|
|
243
|
-
"aws:
|
|
241
|
+
"aws:CalledVia": ["cloudformation.amazonaws.com"]
|
|
244
242
|
},
|
|
245
243
|
"Bool": {
|
|
246
|
-
"aws:
|
|
244
|
+
"aws:ViaAWSService": True
|
|
247
245
|
}
|
|
248
246
|
}
|
|
249
247
|
)
|
|
@@ -256,15 +254,15 @@ For example your launch role would need to include at least the following policy
|
|
|
256
254
|
|
|
257
255
|
```json
|
|
258
256
|
{
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
257
|
+
"Statement": [
|
|
258
|
+
{
|
|
259
|
+
"Effect": "Allow",
|
|
260
|
+
"Action": [
|
|
261
|
+
"s3:GetObject"
|
|
262
|
+
],
|
|
263
|
+
"Resource": "*"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
268
266
|
}
|
|
269
267
|
```
|
|
270
268
|
|
|
@@ -287,11 +285,6 @@ The `locked` boolean which when set to true will prevent your `currentVersionNam
|
|
|
287
285
|
from being overwritten when there is an existing snapshot for that version.
|
|
288
286
|
|
|
289
287
|
```python
|
|
290
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
291
|
-
import aws_cdk.aws_s3 as s3
|
|
292
|
-
import aws_cdk as cdk
|
|
293
|
-
|
|
294
|
-
|
|
295
288
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
296
289
|
def __init__(self, scope, id):
|
|
297
290
|
super().__init__(scope, id)
|
|
@@ -308,11 +301,6 @@ product_stack_history = servicecatalog.ProductStackHistory(self, "ProductStackHi
|
|
|
308
301
|
We can deploy the current version `v1` by using `productStackHistory.currentVersion()`
|
|
309
302
|
|
|
310
303
|
```python
|
|
311
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
312
|
-
import aws_cdk.aws_s3 as s3
|
|
313
|
-
import aws_cdk as cdk
|
|
314
|
-
|
|
315
|
-
|
|
316
304
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
317
305
|
def __init__(self, scope, id):
|
|
318
306
|
super().__init__(scope, id)
|
|
@@ -344,11 +332,6 @@ make changes to the `ProductStack` and update the `currentVersionName` to `v2`.
|
|
|
344
332
|
We still want our `v1` version to still be deployed, so we reference it by calling `productStackHistory.versionFromSnapshot('v1')`.
|
|
345
333
|
|
|
346
334
|
```python
|
|
347
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
348
|
-
import aws_cdk.aws_s3 as s3
|
|
349
|
-
import aws_cdk as cdk
|
|
350
|
-
|
|
351
|
-
|
|
352
335
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
353
336
|
def __init__(self, scope, id):
|
|
354
337
|
super().__init__(scope, id)
|
|
@@ -496,9 +479,9 @@ import aws_cdk as cdk
|
|
|
496
479
|
portfolio.constrain_cloud_formation_parameters(product,
|
|
497
480
|
rule=servicecatalog.TemplateRule(
|
|
498
481
|
rule_name="testInstanceType",
|
|
499
|
-
condition=
|
|
482
|
+
condition=Fn.condition_equals(Fn.ref("Environment"), "test"),
|
|
500
483
|
assertions=[servicecatalog.TemplateRuleAssertion(
|
|
501
|
-
assert=
|
|
484
|
+
assert=Fn.condition_contains(["t2.micro", "t2.small"], Fn.ref("InstanceType")),
|
|
502
485
|
description="For test environment, the instance type should be small"
|
|
503
486
|
)]
|
|
504
487
|
)
|
|
@@ -515,8 +498,6 @@ You can only have one launch role set for a portfolio-product association,
|
|
|
515
498
|
and you cannot set a launch role on a product that already has a StackSets deployment configured.
|
|
516
499
|
|
|
517
500
|
```python
|
|
518
|
-
import aws_cdk.aws_iam as iam
|
|
519
|
-
|
|
520
501
|
# portfolio: servicecatalog.Portfolio
|
|
521
502
|
# product: servicecatalog.CloudFormationProduct
|
|
522
503
|
|
|
@@ -536,8 +517,6 @@ as well as in any end user accounts that wish to provision a product with the la
|
|
|
536
517
|
You can do this by passing in the role with an explicitly set name:
|
|
537
518
|
|
|
538
519
|
```python
|
|
539
|
-
import aws_cdk.aws_iam as iam
|
|
540
|
-
|
|
541
520
|
# portfolio: servicecatalog.Portfolio
|
|
542
521
|
# product: servicecatalog.CloudFormationProduct
|
|
543
522
|
|
|
@@ -553,8 +532,6 @@ portfolio.set_local_launch_role(product, launch_role)
|
|
|
553
532
|
Or you can simply pass in a role name and CDK will create a role with that name that trusts service catalog in the account:
|
|
554
533
|
|
|
555
534
|
```python
|
|
556
|
-
import aws_cdk.aws_iam as iam
|
|
557
|
-
|
|
558
535
|
# portfolio: servicecatalog.Portfolio
|
|
559
536
|
# product: servicecatalog.CloudFormationProduct
|
|
560
537
|
|
|
@@ -578,8 +555,6 @@ You can only define one StackSets deployment configuration per portfolio-product
|
|
|
578
555
|
and you cannot both set a launch role and StackSets deployment configuration for an assocation.
|
|
579
556
|
|
|
580
557
|
```python
|
|
581
|
-
import aws_cdk.aws_iam as iam
|
|
582
|
-
|
|
583
558
|
# portfolio: servicecatalog.Portfolio
|
|
584
559
|
# product: servicecatalog.CloudFormationProduct
|
|
585
560
|
|
|
@@ -7009,7 +6984,6 @@ class CloudFormationProductProps:
|
|
|
7009
6984
|
|
|
7010
6985
|
Example::
|
|
7011
6986
|
|
|
7012
|
-
import aws_cdk.aws_s3 as s3
|
|
7013
6987
|
import aws_cdk as cdk
|
|
7014
6988
|
|
|
7015
6989
|
|
|
@@ -7290,7 +7264,6 @@ class CloudFormationTemplate(
|
|
|
7290
7264
|
|
|
7291
7265
|
Example::
|
|
7292
7266
|
|
|
7293
|
-
import aws_cdk.aws_s3 as s3
|
|
7294
7267
|
import aws_cdk as cdk
|
|
7295
7268
|
|
|
7296
7269
|
|
|
@@ -8950,11 +8923,6 @@ class ProductStack(
|
|
|
8950
8923
|
|
|
8951
8924
|
Example::
|
|
8952
8925
|
|
|
8953
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
8954
|
-
import aws_cdk.aws_s3 as s3
|
|
8955
|
-
import aws_cdk as cdk
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
8926
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
8959
8927
|
def __init__(self, scope, id):
|
|
8960
8928
|
super().__init__(scope, id)
|
|
@@ -8971,7 +8939,8 @@ class ProductStack(
|
|
|
8971
8939
|
product_name="My Product",
|
|
8972
8940
|
owner="Product Owner",
|
|
8973
8941
|
product_versions=[
|
|
8974
|
-
product_stack_history.current_version()
|
|
8942
|
+
product_stack_history.current_version(),
|
|
8943
|
+
product_stack_history.version_from_snapshot("v1")
|
|
8975
8944
|
]
|
|
8976
8945
|
)
|
|
8977
8946
|
'''
|
|
@@ -9017,11 +8986,6 @@ class ProductStackHistory(
|
|
|
9017
8986
|
|
|
9018
8987
|
Example::
|
|
9019
8988
|
|
|
9020
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
9021
|
-
import aws_cdk.aws_s3 as s3
|
|
9022
|
-
import aws_cdk as cdk
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
8989
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
9026
8990
|
def __init__(self, scope, id):
|
|
9027
8991
|
super().__init__(scope, id)
|
|
@@ -9136,11 +9100,6 @@ class ProductStackHistoryProps:
|
|
|
9136
9100
|
|
|
9137
9101
|
Example::
|
|
9138
9102
|
|
|
9139
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
9140
|
-
import aws_cdk.aws_s3 as s3
|
|
9141
|
-
import aws_cdk as cdk
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
9103
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
9145
9104
|
def __init__(self, scope, id):
|
|
9146
9105
|
super().__init__(scope, id)
|
|
@@ -9258,19 +9217,39 @@ class ProductStackProps:
|
|
|
9258
9217
|
|
|
9259
9218
|
:param asset_bucket: A Bucket can be passed to store assets, enabling ProductStack Asset support. Default: No Bucket provided and Assets will not be supported.
|
|
9260
9219
|
|
|
9261
|
-
:exampleMetadata:
|
|
9220
|
+
:exampleMetadata: infused
|
|
9262
9221
|
|
|
9263
9222
|
Example::
|
|
9264
9223
|
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
from aws_cdk import
|
|
9268
|
-
from aws_cdk import aws_servicecatalog as servicecatalog
|
|
9224
|
+
import aws_cdk.aws_lambda as lambda_
|
|
9225
|
+
import aws_cdk as cdk
|
|
9226
|
+
from aws_cdk.aws_s3 import Bucket
|
|
9269
9227
|
|
|
9270
|
-
# bucket: s3.Bucket
|
|
9271
9228
|
|
|
9272
|
-
|
|
9273
|
-
|
|
9229
|
+
class LambdaProduct(servicecatalog.ProductStack):
|
|
9230
|
+
def __init__(self, scope, id, *, assetBucket=None):
|
|
9231
|
+
super().__init__(scope, id, assetBucket=assetBucket)
|
|
9232
|
+
|
|
9233
|
+
lambda_.Function(self, "LambdaProduct",
|
|
9234
|
+
runtime=lambda_.Runtime.PYTHON_3_9,
|
|
9235
|
+
code=lambda_.Code.from_asset("./assets"),
|
|
9236
|
+
handler="index.handler"
|
|
9237
|
+
)
|
|
9238
|
+
|
|
9239
|
+
user_defined_bucket = Bucket(self, "UserDefinedBucket",
|
|
9240
|
+
bucket_name="user-defined-bucket-for-product-stack-assets"
|
|
9241
|
+
)
|
|
9242
|
+
|
|
9243
|
+
product = servicecatalog.CloudFormationProduct(self, "Product",
|
|
9244
|
+
product_name="My Product",
|
|
9245
|
+
owner="Product Owner",
|
|
9246
|
+
product_versions=[servicecatalog.CloudFormationProductVersion(
|
|
9247
|
+
product_version_name="v1",
|
|
9248
|
+
cloud_formation_template=servicecatalog.CloudFormationTemplate.from_product_stack(LambdaProduct(self, "LambdaFunctionProduct",
|
|
9249
|
+
asset_bucket=user_defined_bucket
|
|
9250
|
+
))
|
|
9251
|
+
)
|
|
9252
|
+
]
|
|
9274
9253
|
)
|
|
9275
9254
|
'''
|
|
9276
9255
|
if __debug__:
|
|
@@ -9340,8 +9319,6 @@ class StackSetsConstraintOptions(CommonConstraintOptions):
|
|
|
9340
9319
|
|
|
9341
9320
|
Example::
|
|
9342
9321
|
|
|
9343
|
-
import aws_cdk.aws_iam as iam
|
|
9344
|
-
|
|
9345
9322
|
# portfolio: servicecatalog.Portfolio
|
|
9346
9323
|
# product: servicecatalog.CloudFormationProduct
|
|
9347
9324
|
|
|
@@ -9701,9 +9678,9 @@ class TemplateRule:
|
|
|
9701
9678
|
portfolio.constrain_cloud_formation_parameters(product,
|
|
9702
9679
|
rule=servicecatalog.TemplateRule(
|
|
9703
9680
|
rule_name="testInstanceType",
|
|
9704
|
-
condition=
|
|
9681
|
+
condition=Fn.condition_equals(Fn.ref("Environment"), "test"),
|
|
9705
9682
|
assertions=[servicecatalog.TemplateRuleAssertion(
|
|
9706
|
-
assert=
|
|
9683
|
+
assert=Fn.condition_contains(["t2.micro", "t2.small"], Fn.ref("InstanceType")),
|
|
9707
9684
|
description="For test environment, the instance type should be small"
|
|
9708
9685
|
)]
|
|
9709
9686
|
)
|
|
@@ -9840,7 +9817,6 @@ class CloudFormationProduct(
|
|
|
9840
9817
|
|
|
9841
9818
|
Example::
|
|
9842
9819
|
|
|
9843
|
-
import aws_cdk.aws_s3 as s3
|
|
9844
9820
|
import aws_cdk as cdk
|
|
9845
9821
|
|
|
9846
9822
|
|
|
@@ -9971,9 +9947,9 @@ class CloudFormationRuleConstraintOptions(CommonConstraintOptions):
|
|
|
9971
9947
|
portfolio.constrain_cloud_formation_parameters(product,
|
|
9972
9948
|
rule=servicecatalog.TemplateRule(
|
|
9973
9949
|
rule_name="testInstanceType",
|
|
9974
|
-
condition=
|
|
9950
|
+
condition=Fn.condition_equals(Fn.ref("Environment"), "test"),
|
|
9975
9951
|
assertions=[servicecatalog.TemplateRuleAssertion(
|
|
9976
|
-
assert=
|
|
9952
|
+
assert=Fn.condition_contains(["t2.micro", "t2.small"], Fn.ref("InstanceType")),
|
|
9977
9953
|
description="For test environment, the instance type should be small"
|
|
9978
9954
|
)]
|
|
9979
9955
|
)
|
|
@@ -5024,7 +5024,6 @@ class PrivateDnsNamespace(
|
|
|
5024
5024
|
|
|
5025
5025
|
Example::
|
|
5026
5026
|
|
|
5027
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
5028
5027
|
# mesh: appmesh.Mesh
|
|
5029
5028
|
# Cloud Map service discovery is currently required for host ejection by outlier detection
|
|
5030
5029
|
vpc = ec2.Vpc(self, "vpc")
|
|
@@ -5037,8 +5036,8 @@ class PrivateDnsNamespace(
|
|
|
5037
5036
|
service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
|
|
5038
5037
|
listeners=[appmesh.VirtualNodeListener.http(
|
|
5039
5038
|
outlier_detection=appmesh.OutlierDetection(
|
|
5040
|
-
base_ejection_duration=
|
|
5041
|
-
interval=
|
|
5039
|
+
base_ejection_duration=Duration.seconds(10),
|
|
5040
|
+
interval=Duration.seconds(30),
|
|
5042
5041
|
max_ejection_percent=50,
|
|
5043
5042
|
max_server_errors=5
|
|
5044
5043
|
)
|
|
@@ -5302,7 +5301,6 @@ class PrivateDnsNamespaceProps(BaseNamespaceProps):
|
|
|
5302
5301
|
|
|
5303
5302
|
Example::
|
|
5304
5303
|
|
|
5305
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
5306
5304
|
# mesh: appmesh.Mesh
|
|
5307
5305
|
# Cloud Map service discovery is currently required for host ejection by outlier detection
|
|
5308
5306
|
vpc = ec2.Vpc(self, "vpc")
|
|
@@ -5315,8 +5313,8 @@ class PrivateDnsNamespaceProps(BaseNamespaceProps):
|
|
|
5315
5313
|
service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
|
|
5316
5314
|
listeners=[appmesh.VirtualNodeListener.http(
|
|
5317
5315
|
outlier_detection=appmesh.OutlierDetection(
|
|
5318
|
-
base_ejection_duration=
|
|
5319
|
-
interval=
|
|
5316
|
+
base_ejection_duration=Duration.seconds(10),
|
|
5317
|
+
interval=Duration.seconds(30),
|
|
5320
5318
|
max_ejection_percent=50,
|
|
5321
5319
|
max_server_errors=5
|
|
5322
5320
|
)
|
aws_cdk/aws_ses/__init__.py
CHANGED
|
@@ -139,9 +139,8 @@ ses.ConfigurationSet(self, "ConfigurationSet",
|
|
|
139
139
|
Use `addEventDestination()` to publish email sending events to Amazon SNS or Amazon CloudWatch:
|
|
140
140
|
|
|
141
141
|
```python
|
|
142
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
143
142
|
# my_configuration_set: ses.ConfigurationSet
|
|
144
|
-
# my_topic:
|
|
143
|
+
# my_topic: sns.Topic
|
|
145
144
|
|
|
146
145
|
|
|
147
146
|
my_configuration_set.add_event_destination("ToSns",
|
|
@@ -159,11 +158,10 @@ helps prevent unauthorized use.
|
|
|
159
158
|
To verify an identity for a hosted zone, you create an `EmailIdentity`:
|
|
160
159
|
|
|
161
160
|
```python
|
|
162
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
163
161
|
# my_hosted_zone: route53.IPublicHostedZone
|
|
164
162
|
|
|
165
163
|
|
|
166
|
-
identity = ses.EmailIdentity(
|
|
164
|
+
identity = ses.EmailIdentity(self, "Identity",
|
|
167
165
|
identity=ses.Identity.public_hosted_zone(my_hosted_zone),
|
|
168
166
|
mail_from_domain="mail.cdk.dev"
|
|
169
167
|
)
|
|
@@ -176,13 +174,12 @@ You can instead configure DKIM authentication by using your own public-private k
|
|
|
176
174
|
as [Bring Your Own DKIM (BYODKIM)](https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-bring-your-own.html):
|
|
177
175
|
|
|
178
176
|
```python
|
|
179
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
180
177
|
# my_hosted_zone: route53.IPublicHostedZone
|
|
181
178
|
|
|
182
179
|
|
|
183
|
-
ses.EmailIdentity(
|
|
180
|
+
ses.EmailIdentity(self, "Identity",
|
|
184
181
|
identity=ses.Identity.public_hosted_zone(my_hosted_zone),
|
|
185
|
-
dkim_identity=DkimIdentity.byo_dkim(
|
|
182
|
+
dkim_identity=ses.DkimIdentity.byo_dkim(
|
|
186
183
|
private_key=SecretValue.secrets_manager("dkim-private-key"),
|
|
187
184
|
public_key="...base64-encoded-public-key...",
|
|
188
185
|
selector="selector"
|
|
@@ -199,8 +196,7 @@ When using `publicHostedZone()` for the identity, all necessary Amazon Route 53
|
|
|
199
196
|
When working with `domain()`, records must be created manually:
|
|
200
197
|
|
|
201
198
|
```python
|
|
202
|
-
|
|
203
|
-
identity = ses.EmailIdentity(stack, "Identity",
|
|
199
|
+
identity = ses.EmailIdentity(self, "Identity",
|
|
204
200
|
identity=ses.Identity.domain("cdk.dev")
|
|
205
201
|
)
|
|
206
202
|
|
|
@@ -560,23 +556,20 @@ class ByoDkimOptions:
|
|
|
560
556
|
:param selector: A string that's used to identify a public key in the DNS configuration for a domain.
|
|
561
557
|
:param public_key: The public key. If specified, a TXT record with the public key is created. Default: - the validation TXT record with the public key is not created
|
|
562
558
|
|
|
563
|
-
:exampleMetadata:
|
|
559
|
+
:exampleMetadata: infused
|
|
564
560
|
|
|
565
561
|
Example::
|
|
566
562
|
|
|
567
|
-
#
|
|
568
|
-
# The values are placeholders you should change.
|
|
569
|
-
import aws_cdk as cdk
|
|
570
|
-
from aws_cdk import aws_ses as ses
|
|
571
|
-
|
|
572
|
-
# secret_value: cdk.SecretValue
|
|
563
|
+
# my_hosted_zone: route53.IPublicHostedZone
|
|
573
564
|
|
|
574
|
-
byo_dkim_options = ses.ByoDkimOptions(
|
|
575
|
-
private_key=secret_value,
|
|
576
|
-
selector="selector",
|
|
577
565
|
|
|
578
|
-
|
|
579
|
-
|
|
566
|
+
ses.EmailIdentity(self, "Identity",
|
|
567
|
+
identity=ses.Identity.public_hosted_zone(my_hosted_zone),
|
|
568
|
+
dkim_identity=ses.DkimIdentity.byo_dkim(
|
|
569
|
+
private_key=SecretValue.secrets_manager("dkim-private-key"),
|
|
570
|
+
public_key="...base64-encoded-public-key...",
|
|
571
|
+
selector="selector"
|
|
572
|
+
)
|
|
580
573
|
)
|
|
581
574
|
'''
|
|
582
575
|
if __debug__:
|
|
@@ -6481,9 +6474,8 @@ class ConfigurationSetEventDestinationOptions:
|
|
|
6481
6474
|
|
|
6482
6475
|
Example::
|
|
6483
6476
|
|
|
6484
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
6485
6477
|
# my_configuration_set: ses.ConfigurationSet
|
|
6486
|
-
# my_topic:
|
|
6478
|
+
# my_topic: sns.Topic
|
|
6487
6479
|
|
|
6488
6480
|
|
|
6489
6481
|
my_configuration_set.add_event_destination("ToSns",
|
|
@@ -6912,13 +6904,12 @@ class DkimIdentity(
|
|
|
6912
6904
|
|
|
6913
6905
|
Example::
|
|
6914
6906
|
|
|
6915
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
6916
6907
|
# my_hosted_zone: route53.IPublicHostedZone
|
|
6917
6908
|
|
|
6918
6909
|
|
|
6919
|
-
ses.EmailIdentity(
|
|
6910
|
+
ses.EmailIdentity(self, "Identity",
|
|
6920
6911
|
identity=ses.Identity.public_hosted_zone(my_hosted_zone),
|
|
6921
|
-
dkim_identity=DkimIdentity.byo_dkim(
|
|
6912
|
+
dkim_identity=ses.DkimIdentity.byo_dkim(
|
|
6922
6913
|
private_key=SecretValue.secrets_manager("dkim-private-key"),
|
|
6923
6914
|
public_key="...base64-encoded-public-key...",
|
|
6924
6915
|
selector="selector"
|
|
@@ -7290,11 +7281,10 @@ class EmailIdentityProps:
|
|
|
7290
7281
|
|
|
7291
7282
|
Example::
|
|
7292
7283
|
|
|
7293
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
7294
7284
|
# my_hosted_zone: route53.IPublicHostedZone
|
|
7295
7285
|
|
|
7296
7286
|
|
|
7297
|
-
identity = ses.EmailIdentity(
|
|
7287
|
+
identity = ses.EmailIdentity(self, "Identity",
|
|
7298
7288
|
identity=ses.Identity.public_hosted_zone(my_hosted_zone),
|
|
7299
7289
|
mail_from_domain="mail.cdk.dev"
|
|
7300
7290
|
)
|
|
@@ -7469,9 +7459,8 @@ class EventDestination(
|
|
|
7469
7459
|
|
|
7470
7460
|
Example::
|
|
7471
7461
|
|
|
7472
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
7473
7462
|
# my_configuration_set: ses.ConfigurationSet
|
|
7474
|
-
# my_topic:
|
|
7463
|
+
# my_topic: sns.Topic
|
|
7475
7464
|
|
|
7476
7465
|
|
|
7477
7466
|
my_configuration_set.add_event_destination("ToSns",
|
|
@@ -7908,11 +7897,10 @@ class Identity(
|
|
|
7908
7897
|
|
|
7909
7898
|
Example::
|
|
7910
7899
|
|
|
7911
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
7912
7900
|
# my_hosted_zone: route53.IPublicHostedZone
|
|
7913
7901
|
|
|
7914
7902
|
|
|
7915
|
-
identity = ses.EmailIdentity(
|
|
7903
|
+
identity = ses.EmailIdentity(self, "Identity",
|
|
7916
7904
|
identity=ses.Identity.public_hosted_zone(my_hosted_zone),
|
|
7917
7905
|
mail_from_domain="mail.cdk.dev"
|
|
7918
7906
|
)
|
|
@@ -10074,11 +10062,10 @@ class EmailIdentity(
|
|
|
10074
10062
|
|
|
10075
10063
|
Example::
|
|
10076
10064
|
|
|
10077
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
10078
10065
|
# my_hosted_zone: route53.IPublicHostedZone
|
|
10079
10066
|
|
|
10080
10067
|
|
|
10081
|
-
identity = ses.EmailIdentity(
|
|
10068
|
+
identity = ses.EmailIdentity(self, "Identity",
|
|
10082
10069
|
identity=ses.Identity.public_hosted_zone(my_hosted_zone),
|
|
10083
10070
|
mail_from_domain="mail.cdk.dev"
|
|
10084
10071
|
)
|
aws_cdk/aws_sns/__init__.py
CHANGED
|
@@ -114,8 +114,7 @@ my_topic.add_subscription(subscriptions.LambdaSubscription(fn,
|
|
|
114
114
|
### Example of Firehose Subscription
|
|
115
115
|
|
|
116
116
|
```python
|
|
117
|
-
|
|
118
|
-
from aws_cdk_lib.aws_kinesisfirehose import DeliveryStream
|
|
117
|
+
from aws_cdk.aws_kinesisfirehose_alpha import DeliveryStream
|
|
119
118
|
# stream: DeliveryStream
|
|
120
119
|
|
|
121
120
|
|
|
@@ -3070,8 +3069,7 @@ class Subscription(
|
|
|
3070
3069
|
|
|
3071
3070
|
Example::
|
|
3072
3071
|
|
|
3073
|
-
|
|
3074
|
-
from aws_cdk_lib.aws_kinesisfirehose import DeliveryStream
|
|
3072
|
+
from aws_cdk.aws_kinesisfirehose_alpha import DeliveryStream
|
|
3075
3073
|
# stream: DeliveryStream
|
|
3076
3074
|
|
|
3077
3075
|
|
|
@@ -3497,8 +3495,7 @@ class SubscriptionProps(SubscriptionOptions):
|
|
|
3497
3495
|
|
|
3498
3496
|
Example::
|
|
3499
3497
|
|
|
3500
|
-
|
|
3501
|
-
from aws_cdk_lib.aws_kinesisfirehose import DeliveryStream
|
|
3498
|
+
from aws_cdk.aws_kinesisfirehose_alpha import DeliveryStream
|
|
3502
3499
|
# stream: DeliveryStream
|
|
3503
3500
|
|
|
3504
3501
|
|
|
@@ -3654,8 +3651,7 @@ class SubscriptionProtocol(enum.Enum):
|
|
|
3654
3651
|
|
|
3655
3652
|
Example::
|
|
3656
3653
|
|
|
3657
|
-
|
|
3658
|
-
from aws_cdk_lib.aws_kinesisfirehose import DeliveryStream
|
|
3654
|
+
from aws_cdk.aws_kinesisfirehose_alpha import DeliveryStream
|
|
3659
3655
|
# stream: DeliveryStream
|
|
3660
3656
|
|
|
3661
3657
|
|