aws-cdk-lib 2.73.0__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.73.0.jsii.tgz → aws-cdk-lib@2.76.0.jsii.tgz} +0 -0
- aws_cdk/aws_amplifyuibuilder/__init__.py +182 -214
- 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_batch/__init__.py +9 -2
- 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 -14
- 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_codegurureviewer/__init__.py +4 -4
- 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 +29 -22
- aws_cdk/aws_ec2/__init__.py +2414 -603
- aws_cdk/aws_ecr/__init__.py +1 -2
- aws_cdk/aws_ecr_assets/__init__.py +27 -14
- aws_cdk/aws_ecs/__init__.py +458 -163
- 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_grafana/__init__.py +4 -4
- aws_cdk/aws_iam/__init__.py +21 -25
- aws_cdk/aws_imagebuilder/__init__.py +58 -80
- aws_cdk/aws_internetmonitor/__init__.py +18 -10
- 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_iotwireless/__init__.py +14 -9
- aws_cdk/aws_kinesisfirehose/__init__.py +21 -38
- aws_cdk/aws_lambda/__init__.py +76 -53
- aws_cdk/aws_lambda_event_sources/__init__.py +6 -21
- aws_cdk/aws_logs/__init__.py +5 -7
- aws_cdk/aws_macie/__init__.py +28 -23
- aws_cdk/aws_mediaconnect/__init__.py +5 -8
- aws_cdk/aws_mediaconvert/__init__.py +2 -2
- 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_neptune/__init__.py +4 -4
- aws_cdk/aws_networkfirewall/__init__.py +8 -4
- aws_cdk/aws_networkmanager/__init__.py +4 -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 +53 -22
- aws_cdk/aws_route53/__init__.py +8 -16
- aws_cdk/aws_route53_targets/__init__.py +2 -4
- aws_cdk/aws_s3/__init__.py +41 -90
- aws_cdk/aws_s3_notifications/__init__.py +0 -3
- aws_cdk/aws_sagemaker/__init__.py +16 -10
- aws_cdk/aws_secretsmanager/__init__.py +17 -14
- aws_cdk/aws_servicecatalog/__init__.py +60 -83
- aws_cdk/aws_servicediscovery/__init__.py +4 -6
- aws_cdk/aws_ses/__init__.py +734 -28
- 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_ssmincidents/__init__.py +2 -1
- aws_cdk/aws_sso/__init__.py +4 -4
- aws_cdk/aws_stepfunctions/__init__.py +6 -15
- aws_cdk/aws_stepfunctions_tasks/__init__.py +51 -24
- aws_cdk/aws_timestream/__init__.py +22 -28
- aws_cdk/aws_transfer/__init__.py +188 -86
- aws_cdk/aws_wafv2/__init__.py +54 -38
- 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 +104 -134
- aws_cdk/triggers/__init__.py +46 -61
- {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/METADATA +47 -92
- {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/RECORD +111 -111
- {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/top_level.txt +0 -0
|
@@ -5129,10 +5129,10 @@ class CfnDomain(
|
|
|
5129
5129
|
) -> None:
|
|
5130
5130
|
'''A collection of settings that apply to spaces created in the Domain.
|
|
5131
5131
|
|
|
5132
|
-
:param execution_role: The execution role for the space.
|
|
5132
|
+
:param execution_role: The ARN of the execution role for the space.
|
|
5133
5133
|
:param jupyter_server_app_settings: The JupyterServer app settings.
|
|
5134
5134
|
:param kernel_gateway_app_settings: The KernelGateway app settings.
|
|
5135
|
-
:param security_groups: The security
|
|
5135
|
+
:param security_groups: The security group IDs for the Amazon Virtual Private Cloud that the space uses for communication.
|
|
5136
5136
|
|
|
5137
5137
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-domain-defaultspacesettings.html
|
|
5138
5138
|
:exampleMetadata: fixture=_generated
|
|
@@ -5189,7 +5189,7 @@ class CfnDomain(
|
|
|
5189
5189
|
|
|
5190
5190
|
@builtins.property
|
|
5191
5191
|
def execution_role(self) -> typing.Optional[builtins.str]:
|
|
5192
|
-
'''The execution role for the space.
|
|
5192
|
+
'''The ARN of the execution role for the space.
|
|
5193
5193
|
|
|
5194
5194
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-domain-defaultspacesettings.html#cfn-sagemaker-domain-defaultspacesettings-executionrole
|
|
5195
5195
|
'''
|
|
@@ -5220,7 +5220,7 @@ class CfnDomain(
|
|
|
5220
5220
|
|
|
5221
5221
|
@builtins.property
|
|
5222
5222
|
def security_groups(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
5223
|
-
'''The security
|
|
5223
|
+
'''The security group IDs for the Amazon Virtual Private Cloud that the space uses for communication.
|
|
5224
5224
|
|
|
5225
5225
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-domain-defaultspacesettings.html#cfn-sagemaker-domain-defaultspacesettings-securitygroups
|
|
5226
5226
|
'''
|
|
@@ -5998,7 +5998,7 @@ class CfnDomain(
|
|
|
5998
5998
|
:param kernel_gateway_app_settings: The kernel gateway app settings.
|
|
5999
5999
|
:param r_session_app_settings: A collection of settings that configure the ``RSessionGateway`` app.
|
|
6000
6000
|
:param r_studio_server_pro_app_settings: A collection of settings that configure user interaction with the ``RStudioServerPro`` app.
|
|
6001
|
-
:param security_groups: The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication. Optional when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``PublicInternetOnly`` . Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` . Amazon SageMaker adds a security group to allow NFS traffic from SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.
|
|
6001
|
+
:param security_groups: The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication. Optional when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``PublicInternetOnly`` . Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` , unless specified as part of the ``DefaultUserSettings`` for the domain. Amazon SageMaker adds a security group to allow NFS traffic from SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.
|
|
6002
6002
|
:param sharing_settings: Specifies options for sharing SageMaker Studio notebooks.
|
|
6003
6003
|
|
|
6004
6004
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-domain-usersettings.html
|
|
@@ -6146,7 +6146,7 @@ class CfnDomain(
|
|
|
6146
6146
|
|
|
6147
6147
|
Optional when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``PublicInternetOnly`` .
|
|
6148
6148
|
|
|
6149
|
-
Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` .
|
|
6149
|
+
Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` , unless specified as part of the ``DefaultUserSettings`` for the domain.
|
|
6150
6150
|
|
|
6151
6151
|
Amazon SageMaker adds a security group to allow NFS traffic from SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.
|
|
6152
6152
|
|
|
@@ -10399,7 +10399,7 @@ class CfnFeatureGroup(
|
|
|
10399
10399
|
|
|
10400
10400
|
:param s3_storage_config: The Amazon Simple Storage (Amazon S3) location of ``OfflineStore`` .
|
|
10401
10401
|
:param data_catalog_config: The meta data of the Glue table that is autogenerated when an ``OfflineStore`` is created.
|
|
10402
|
-
:param disable_glue_table_creation: Set to ``True`` to disable the automatic creation of an AWS Glue table when configuring an ``OfflineStore`` .
|
|
10402
|
+
:param disable_glue_table_creation: Set to ``True`` to disable the automatic creation of an AWS Glue table when configuring an ``OfflineStore`` . If set to ``False`` , Feature Store will name the ``OfflineStore`` Glue table following `Athena's naming recommendations <https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html>`_ . The default value is ``False`` .
|
|
10403
10403
|
:param table_format: ``CfnFeatureGroup.OfflineStoreConfigProperty.TableFormat``.
|
|
10404
10404
|
|
|
10405
10405
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-featuregroup-offlinestoreconfig.html
|
|
@@ -10474,6 +10474,10 @@ class CfnFeatureGroup(
|
|
|
10474
10474
|
) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
|
|
10475
10475
|
'''Set to ``True`` to disable the automatic creation of an AWS Glue table when configuring an ``OfflineStore`` .
|
|
10476
10476
|
|
|
10477
|
+
If set to ``False`` , Feature Store will name the ``OfflineStore`` Glue table following `Athena's naming recommendations <https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html>`_ .
|
|
10478
|
+
|
|
10479
|
+
The default value is ``False`` .
|
|
10480
|
+
|
|
10477
10481
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-featuregroup-offlinestoreconfig.html#cfn-sagemaker-featuregroup-offlinestoreconfig-disablegluetablecreation
|
|
10478
10482
|
'''
|
|
10479
10483
|
result = self._values.get("disable_glue_table_creation")
|
|
@@ -10516,7 +10520,9 @@ class CfnFeatureGroup(
|
|
|
10516
10520
|
) -> None:
|
|
10517
10521
|
'''Use this to specify the AWS Key Management Service (KMS) Key ID, or ``KMSKeyId`` , for at rest data encryption.
|
|
10518
10522
|
|
|
10519
|
-
You can turn ``OnlineStore`` on or off by specifying the ``EnableOnlineStore`` flag at General Assembly
|
|
10523
|
+
You can turn ``OnlineStore`` on or off by specifying the ``EnableOnlineStore`` flag at General Assembly.
|
|
10524
|
+
|
|
10525
|
+
The default value is ``False`` .
|
|
10520
10526
|
|
|
10521
10527
|
:param enable_online_store: Turn ``OnlineStore`` off by specifying ``False`` for the ``EnableOnlineStore`` flag. Turn ``OnlineStore`` on by specifying ``True`` for the ``EnableOnlineStore`` flag. The default value is ``False`` .
|
|
10522
10528
|
:param security_config: Use to specify KMS Key ID ( ``KMSKeyId`` ) for at-rest encryption of your ``OnlineStore`` .
|
|
@@ -36858,7 +36864,7 @@ class CfnUserProfile(
|
|
|
36858
36864
|
:param jupyter_server_app_settings: The Jupyter server's app settings.
|
|
36859
36865
|
:param kernel_gateway_app_settings: The kernel gateway app settings.
|
|
36860
36866
|
:param r_studio_server_pro_app_settings: A collection of settings that configure user interaction with the ``RStudioServerPro`` app.
|
|
36861
|
-
:param security_groups: The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication. Optional when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``PublicInternetOnly`` . Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` . Amazon SageMaker adds a security group to allow NFS traffic from SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.
|
|
36867
|
+
:param security_groups: The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication. Optional when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``PublicInternetOnly`` . Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` , unless specified as part of the ``DefaultUserSettings`` for the domain. Amazon SageMaker adds a security group to allow NFS traffic from SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.
|
|
36862
36868
|
:param sharing_settings: Specifies options for sharing SageMaker Studio notebooks.
|
|
36863
36869
|
|
|
36864
36870
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-userprofile-usersettings.html
|
|
@@ -36975,7 +36981,7 @@ class CfnUserProfile(
|
|
|
36975
36981
|
|
|
36976
36982
|
Optional when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``PublicInternetOnly`` .
|
|
36977
36983
|
|
|
36978
|
-
Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` .
|
|
36984
|
+
Required when the ``CreateDomain.AppNetworkAccessType`` parameter is set to ``VpcOnly`` , unless specified as part of the ``DefaultUserSettings`` for the domain.
|
|
36979
36985
|
|
|
36980
36986
|
Amazon SageMaker adds a security group to allow NFS traffic from SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.
|
|
36981
36987
|
|
|
@@ -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
|
|
|
@@ -1446,7 +1421,7 @@ class CfnCloudFormationProduct(
|
|
|
1446
1421
|
:param description: The description of the provisioning artifact, including how it differs from the previous provisioning artifact.
|
|
1447
1422
|
:param disable_template_validation: If set to true, AWS Service Catalog stops validating the specified provisioning artifact even if it is invalid.
|
|
1448
1423
|
:param name: The name of the provisioning artifact (for example, v1 v2beta). No spaces are allowed.
|
|
1449
|
-
:param type: The type of provisioning artifact. - ``CLOUD_FORMATION_TEMPLATE`` - AWS CloudFormation template - ``MARKETPLACE_AMI`` - AWS Marketplace AMI - ``MARKETPLACE_CAR`` - AWS Marketplace Clusters and AWS Resources
|
|
1424
|
+
:param type: The type of provisioning artifact. - ``CLOUD_FORMATION_TEMPLATE`` - AWS CloudFormation template - ``MARKETPLACE_AMI`` - AWS Marketplace AMI - ``MARKETPLACE_CAR`` - AWS Marketplace Clusters and AWS Resources - ``TERRAFORM_OPEN_SOURCE`` - Terraform open source configuration file
|
|
1450
1425
|
|
|
1451
1426
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicecatalog-cloudformationproduct-provisioningartifactproperties.html
|
|
1452
1427
|
:exampleMetadata: fixture=_generated
|
|
@@ -1544,6 +1519,7 @@ class CfnCloudFormationProduct(
|
|
|
1544
1519
|
- ``CLOUD_FORMATION_TEMPLATE`` - AWS CloudFormation template
|
|
1545
1520
|
- ``MARKETPLACE_AMI`` - AWS Marketplace AMI
|
|
1546
1521
|
- ``MARKETPLACE_CAR`` - AWS Marketplace Clusters and AWS Resources
|
|
1522
|
+
- ``TERRAFORM_OPEN_SOURCE`` - Terraform open source configuration file
|
|
1547
1523
|
|
|
1548
1524
|
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicecatalog-cloudformationproduct-provisioningartifactproperties.html#cfn-servicecatalog-cloudformationproduct-provisioningartifactproperties-type
|
|
1549
1525
|
'''
|
|
@@ -7008,7 +6984,6 @@ class CloudFormationProductProps:
|
|
|
7008
6984
|
|
|
7009
6985
|
Example::
|
|
7010
6986
|
|
|
7011
|
-
import aws_cdk.aws_s3 as s3
|
|
7012
6987
|
import aws_cdk as cdk
|
|
7013
6988
|
|
|
7014
6989
|
|
|
@@ -7289,7 +7264,6 @@ class CloudFormationTemplate(
|
|
|
7289
7264
|
|
|
7290
7265
|
Example::
|
|
7291
7266
|
|
|
7292
|
-
import aws_cdk.aws_s3 as s3
|
|
7293
7267
|
import aws_cdk as cdk
|
|
7294
7268
|
|
|
7295
7269
|
|
|
@@ -8949,11 +8923,6 @@ class ProductStack(
|
|
|
8949
8923
|
|
|
8950
8924
|
Example::
|
|
8951
8925
|
|
|
8952
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
8953
|
-
import aws_cdk.aws_s3 as s3
|
|
8954
|
-
import aws_cdk as cdk
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
8926
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
8958
8927
|
def __init__(self, scope, id):
|
|
8959
8928
|
super().__init__(scope, id)
|
|
@@ -8970,7 +8939,8 @@ class ProductStack(
|
|
|
8970
8939
|
product_name="My Product",
|
|
8971
8940
|
owner="Product Owner",
|
|
8972
8941
|
product_versions=[
|
|
8973
|
-
product_stack_history.current_version()
|
|
8942
|
+
product_stack_history.current_version(),
|
|
8943
|
+
product_stack_history.version_from_snapshot("v1")
|
|
8974
8944
|
]
|
|
8975
8945
|
)
|
|
8976
8946
|
'''
|
|
@@ -9016,11 +8986,6 @@ class ProductStackHistory(
|
|
|
9016
8986
|
|
|
9017
8987
|
Example::
|
|
9018
8988
|
|
|
9019
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
9020
|
-
import aws_cdk.aws_s3 as s3
|
|
9021
|
-
import aws_cdk as cdk
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
8989
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
9025
8990
|
def __init__(self, scope, id):
|
|
9026
8991
|
super().__init__(scope, id)
|
|
@@ -9135,11 +9100,6 @@ class ProductStackHistoryProps:
|
|
|
9135
9100
|
|
|
9136
9101
|
Example::
|
|
9137
9102
|
|
|
9138
|
-
# Example automatically generated from non-compiling source. May contain errors.
|
|
9139
|
-
import aws_cdk.aws_s3 as s3
|
|
9140
|
-
import aws_cdk as cdk
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
9103
|
class S3BucketProduct(servicecatalog.ProductStack):
|
|
9144
9104
|
def __init__(self, scope, id):
|
|
9145
9105
|
super().__init__(scope, id)
|
|
@@ -9257,19 +9217,39 @@ class ProductStackProps:
|
|
|
9257
9217
|
|
|
9258
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.
|
|
9259
9219
|
|
|
9260
|
-
:exampleMetadata:
|
|
9220
|
+
:exampleMetadata: infused
|
|
9261
9221
|
|
|
9262
9222
|
Example::
|
|
9263
9223
|
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
from aws_cdk import
|
|
9267
|
-
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
|
|
9268
9227
|
|
|
9269
|
-
# bucket: s3.Bucket
|
|
9270
9228
|
|
|
9271
|
-
|
|
9272
|
-
|
|
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
|
+
]
|
|
9273
9253
|
)
|
|
9274
9254
|
'''
|
|
9275
9255
|
if __debug__:
|
|
@@ -9339,8 +9319,6 @@ class StackSetsConstraintOptions(CommonConstraintOptions):
|
|
|
9339
9319
|
|
|
9340
9320
|
Example::
|
|
9341
9321
|
|
|
9342
|
-
import aws_cdk.aws_iam as iam
|
|
9343
|
-
|
|
9344
9322
|
# portfolio: servicecatalog.Portfolio
|
|
9345
9323
|
# product: servicecatalog.CloudFormationProduct
|
|
9346
9324
|
|
|
@@ -9700,9 +9678,9 @@ class TemplateRule:
|
|
|
9700
9678
|
portfolio.constrain_cloud_formation_parameters(product,
|
|
9701
9679
|
rule=servicecatalog.TemplateRule(
|
|
9702
9680
|
rule_name="testInstanceType",
|
|
9703
|
-
condition=
|
|
9681
|
+
condition=Fn.condition_equals(Fn.ref("Environment"), "test"),
|
|
9704
9682
|
assertions=[servicecatalog.TemplateRuleAssertion(
|
|
9705
|
-
assert=
|
|
9683
|
+
assert=Fn.condition_contains(["t2.micro", "t2.small"], Fn.ref("InstanceType")),
|
|
9706
9684
|
description="For test environment, the instance type should be small"
|
|
9707
9685
|
)]
|
|
9708
9686
|
)
|
|
@@ -9839,7 +9817,6 @@ class CloudFormationProduct(
|
|
|
9839
9817
|
|
|
9840
9818
|
Example::
|
|
9841
9819
|
|
|
9842
|
-
import aws_cdk.aws_s3 as s3
|
|
9843
9820
|
import aws_cdk as cdk
|
|
9844
9821
|
|
|
9845
9822
|
|
|
@@ -9970,9 +9947,9 @@ class CloudFormationRuleConstraintOptions(CommonConstraintOptions):
|
|
|
9970
9947
|
portfolio.constrain_cloud_formation_parameters(product,
|
|
9971
9948
|
rule=servicecatalog.TemplateRule(
|
|
9972
9949
|
rule_name="testInstanceType",
|
|
9973
|
-
condition=
|
|
9950
|
+
condition=Fn.condition_equals(Fn.ref("Environment"), "test"),
|
|
9974
9951
|
assertions=[servicecatalog.TemplateRuleAssertion(
|
|
9975
|
-
assert=
|
|
9952
|
+
assert=Fn.condition_contains(["t2.micro", "t2.small"], Fn.ref("InstanceType")),
|
|
9976
9953
|
description="For test environment, the instance type should be small"
|
|
9977
9954
|
)]
|
|
9978
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
|
)
|