diff --git a/.mergify.yml b/.mergify.yml index 49320bf2385ee..3348c3b934909 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -19,7 +19,9 @@ pull_request_rules: queue: name: default method: squash - commit_message: title+body + commit_message_template: |- + {{ title }} (#{{ number }}) + {{ body }} conditions: - base!=release - -title~=(WIP|wip) @@ -40,7 +42,9 @@ pull_request_rules: queue: name: default method: squash - commit_message: title+body + commit_message_template: |- + {{ title }} (#{{ number }}) + {{ body }} conditions: - base!=release - -title~=(WIP|wip) @@ -62,7 +66,9 @@ pull_request_rules: queue: name: default method: merge - commit_message: title+body + commit_message_template: |- + {{ title }} (#{{ number }}) + {{ body }} conditions: - -title~=(WIP|wip) - -label~=(blocked|do-not-merge) @@ -106,7 +112,9 @@ pull_request_rules: queue: name: default method: squash - commit_message: title+body + commit_message_template: |- + {{ title }} (#{{ number }}) + {{ body }} conditions: - -title~=(WIP|wip) - -label~=(blocked|do-not-merge) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc4cdd9b06af5..86e384c53adfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,124 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.135.0](https://github.com/aws/aws-cdk/compare/v1.134.0...v1.135.0) (2021-12-10) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **apigatewayv2-authorizers:** The default value for the prop `authorizerName` +in `HttpJwtAuthorizerProps` has changed. +* **apigatewayv2-authorizers:** `HttpJwtAuthorizer` now takes the + construct id and the target jwt issuer as part of its constructor. +* **apigatewayv2-authorizers:** `HttpLambdaAuthorizer` now takes + the construct id and the target lambda function handler as part of + its constructor. +* **apigatewayv2-authorizers:** The default value for the prop + `authorizerName` in `HttpUserPoolAuthorizerProps` has changed. +* **apigatewayv2:** The `HttpIntegration` and `WebSocketIntegration` +classes require an "id" parameter to be provided during its initialization. +* **apigatewayv2-integrations:** The `LambdaWebSocketIntegration` is now + renamed to `WebSocketLambdaIntegration`. The new class accepts the + handler to the target lambda function directly in its constructor. +* **apigatewayv2-integrations:** `HttpProxyIntegration` and + `HttpProxyIntegrationProps` are now renamed to `HttpUrlIntegration` + and `HttpUrlIntegrationProps` respectively. The new class accepts the + target url directly in its constructor. +* **apigatewayv2-integrations:** `LambdaProxyIntegration` and + `LambdaProxyIntegrationProps` are now renamed to + `HttpLambdaIntegration` and `HttpLambdaIntegrationProps` respectively. + The new class accepts the lambda function handler directly in its + constructor. +* **apigatewayv2-integrations:** `HttpAlbIntegration` now accepts the + ELB listener directly in its constructor. +* **apigatewayv2-integrations:** `HttpNlbIntegration` now accepts the + ELB listener directly in its constructor. +* **apigatewayv2-integrations:** `HttpServiceDiscoveryIntegration` now + accepts the service discovery Service directly in its constructor. +* **apigatewayv2-authorizers:** `UserPoolAuthorizerProps` is now + renamed to `HttpUserPoolAuthorizerProps`. +* **apigatewayv2:** The interface `IHttpRouteIntegration` is replaced by +the abstract class `HttpRouteIntegration`. +* **apigatewayv2:** The interface `IWebSocketRouteIntegration` is now + replaced by the abstract class `WebSocketRouteIntegration`. +* **apigatewayv2:** Previously, we allowed the usage of integration + classes to be used with routes defined in multiple `HttpApi` instances + (or `WebSocketApi` instances). This is now disallowed, and separate + instances must be created for each instance of `HttpApi` or + `WebSocketApi`. + +### Features + +* **apigateway:** step functions integration ([#16827](https://github.com/aws/aws-cdk/issues/16827)) ([cb31547](https://github.com/aws/aws-cdk/commit/cb3154789da52b94e4688d645adba87ef2ebf39f)), closes [#15081](https://github.com/aws/aws-cdk/issues/15081) +* **assertions:** major improvements to the capture feature ([#17713](https://github.com/aws/aws-cdk/issues/17713)) ([9a67ce7](https://github.com/aws/aws-cdk/commit/9a67ce7a1792a111e7668cbc7b7f0799314bd7d6)), closes [#17009](https://github.com/aws/aws-cdk/issues/17009) +* **aws-s3-deployment:** log retention option ([#17779](https://github.com/aws/aws-cdk/issues/17779)) ([b60dc63](https://github.com/aws/aws-cdk/commit/b60dc63f99ede0cfaa859cdef33a6f4ddd2d1d25)) +* **backup:** enable WindowsVss Backup ([#15934](https://github.com/aws/aws-cdk/issues/15934)) ([12fcb18](https://github.com/aws/aws-cdk/commit/12fcb18212c8d9e74f5292b07f42ce24cd7b02b3)), closes [#14803](https://github.com/aws/aws-cdk/issues/14803) [#14891](https://github.com/aws/aws-cdk/issues/14891) +* **cfnspec:** cloudformation spec v49.0.0 ([#17727](https://github.com/aws/aws-cdk/issues/17727)) ([7e0c9a3](https://github.com/aws/aws-cdk/commit/7e0c9a341e2bc2837d5c5d671339fe968714d9ce)) +* **cfnspec:** cloudformation spec v50.0.0 ([#17844](https://github.com/aws/aws-cdk/issues/17844)) ([cd3f24e](https://github.com/aws/aws-cdk/commit/cd3f24ec2a928e62ec538827860f936e650e8798)), closes [#17840](https://github.com/aws/aws-cdk/issues/17840) [#17858](https://github.com/aws/aws-cdk/issues/17858) +* **cloudfront:** Add support for response headers policy ([#17359](https://github.com/aws/aws-cdk/issues/17359)) ([ea0acff](https://github.com/aws/aws-cdk/commit/ea0acff28c3f64c9511fdd580f52211df9460a45)), closes [#17290](https://github.com/aws/aws-cdk/issues/17290) +* **cognito:** user pool: adds custom sender (Email/SMS) lambda triggers ([#17740](https://github.com/aws/aws-cdk/issues/17740)) ([7f45de4](https://github.com/aws/aws-cdk/commit/7f45de4ba3cdf99846ca1966549b1630929aebbe)) +* **core:** add applyRemovalPolicy to IResource ([#17746](https://github.com/aws/aws-cdk/issues/17746)) ([d64057f](https://github.com/aws/aws-cdk/commit/d64057f9462f8261f61795c6584d21ef56a9be34)), closes [#17728](https://github.com/aws/aws-cdk/issues/17728) +* **custom-resources:** fixed Lambda function name ([#17670](https://github.com/aws/aws-cdk/issues/17670)) ([5710fe5](https://github.com/aws/aws-cdk/commit/5710fe5a80cd4cc6ef415ec624a3399e86a3e603)) +* **docdb:** implement audit and profiler logs ([#17570](https://github.com/aws/aws-cdk/issues/17570)) ([4982aca](https://github.com/aws/aws-cdk/commit/4982aca6f95ca864a285ed9955a9618a20ca0415)), closes [#17478](https://github.com/aws/aws-cdk/issues/17478) +* **ec2:** add g5g instances ([#17765](https://github.com/aws/aws-cdk/issues/17765)) ([1799f7e](https://github.com/aws/aws-cdk/commit/1799f7e08d06b8846c9918f1cb130f20570a99be)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) +* **ec2:** add m5zn instances ([#17757](https://github.com/aws/aws-cdk/issues/17757)) ([845be10](https://github.com/aws/aws-cdk/commit/845be1012593a9f28457c73c9054bd98ea44d659)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) +* **ec2:** add m6a instances ([#17764](https://github.com/aws/aws-cdk/issues/17764)) ([b06f120](https://github.com/aws/aws-cdk/commit/b06f120916acd63293c020eef368401b4428ce0a)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) +* **ec2:** add mac1 instance ([#17677](https://github.com/aws/aws-cdk/issues/17677)) ([88a5204](https://github.com/aws/aws-cdk/commit/88a5204a295874e3cffcc041469d8fffbd32b57d)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) [40aws-cdk/aws-ec2/lib/instance-types.ts#L573](https://github.com/40aws-cdk/aws-ec2/lib/instance-types.ts/issues/L573) +* **ec2:** add r6i instances ([#17663](https://github.com/aws/aws-cdk/issues/17663)) ([0138292](https://github.com/aws/aws-cdk/commit/01382921f979b944df1917964f080ce311e99ad2)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) +* **ec2:** add vpcName property to the VPC ([#17940](https://github.com/aws/aws-cdk/issues/17940)) ([794e7cd](https://github.com/aws/aws-cdk/commit/794e7cd63c83aac3c6ace933f4d953fea0b909ad)) +* **ec2:** add vt1 instances ([#17756](https://github.com/aws/aws-cdk/issues/17756)) ([245c059](https://github.com/aws/aws-cdk/commit/245c059eabf59d0fb0b352dac5e49d5ab4ef9ee2)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) +* **ec2:** explicit mapPublicIpOnLaunch configuration for public subnets ([#17346](https://github.com/aws/aws-cdk/issues/17346)) ([a1685c6](https://github.com/aws/aws-cdk/commit/a1685c62071846d41eb47234fbf2c94884453c17)) +* **ec2:** extend BastionHostLinux to support CloudFormationInit ([#17507](https://github.com/aws/aws-cdk/issues/17507)) ([c62377e](https://github.com/aws/aws-cdk/commit/c62377e14caae677deb7e4eae692eaccb2020c67)) +* **ec2:** propagate EC2 tags to volumes ([#17840](https://github.com/aws/aws-cdk/issues/17840)) ([42cf186](https://github.com/aws/aws-cdk/commit/42cf1861c1b493be7fd5ec0d6d7e8fc64987cacd)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) [#17844](https://github.com/aws/aws-cdk/issues/17844) +* **ecs-service-extensions:** Auto scaling for Queue Extension ([#17430](https://github.com/aws/aws-cdk/issues/17430)) ([df7b9b4](https://github.com/aws/aws-cdk/commit/df7b9b41bd99534abb8a6becccc23320a3b6cb41)) +* **iam:** support `fromGroupName()` for IAM groups ([#17243](https://github.com/aws/aws-cdk/issues/17243)) ([29b379c](https://github.com/aws/aws-cdk/commit/29b379cdc49dd396f793782b91d3eca215446a48)) +* **iot:** add Action to capture CloudWatch metrics ([#17503](https://github.com/aws/aws-cdk/issues/17503)) ([ec4187c](https://github.com/aws/aws-cdk/commit/ec4187c26d68df970d72d0e766d7d27b42e8b784)), closes [/github.com/aws/aws-cdk/pull/16681#issuecomment-942233029](https://github.com/aws//github.com/aws/aws-cdk/pull/16681/issues/issuecomment-942233029) +* **lambda:** function construct exposes configured timeout ([#17594](https://github.com/aws/aws-cdk/issues/17594)) ([87fd60f](https://github.com/aws/aws-cdk/commit/87fd60f047e9f1994459de874b54e901d1871e6e)) +* **lambda-event-sources:** sqs: support reportBatchItemFailures ([#17733](https://github.com/aws/aws-cdk/issues/17733)) ([3623982](https://github.com/aws/aws-cdk/commit/3623982fc1a64c2c67a0dba18a6d3eeeb171e898)), closes [#17690](https://github.com/aws/aws-cdk/issues/17690) +* **neptune:** add engine version 1.1.0.0 and instance types t4g, r6g ([#17669](https://github.com/aws/aws-cdk/issues/17669)) ([83e669d](https://github.com/aws/aws-cdk/commit/83e669dcdae9390990598236c75015832af766b4)) +* **rds:** parameter group for replica instances ([#17822](https://github.com/aws/aws-cdk/issues/17822)) ([b606a23](https://github.com/aws/aws-cdk/commit/b606a2321769d5e8f15072a62848aaba35bb1d35)), closes [#17580](https://github.com/aws/aws-cdk/issues/17580) +* **s3:** add GLACIER_IR storage class ([#17829](https://github.com/aws/aws-cdk/issues/17829)) ([c291c44](https://github.com/aws/aws-cdk/commit/c291c4427480472402ef6b0a7c854ac38505ae97)) +* **s3:** support Transfer Acceleration ([#17636](https://github.com/aws/aws-cdk/issues/17636)) ([b432822](https://github.com/aws/aws-cdk/commit/b432822ae45e329a900293eb43712fa4a1d74aa5)), closes [#12570](https://github.com/aws/aws-cdk/issues/12570) +* **secretsmanager:** support secrets rotation in GovCloud ([#17673](https://github.com/aws/aws-cdk/issues/17673)) ([a01678b](https://github.com/aws/aws-cdk/commit/a01678b838a7feb2bde40c435c6c585473d35b22)), closes [#14608](https://github.com/aws/aws-cdk/issues/14608) +* **servicecatalog:** Add TagOptions to a CloudformationProduct ([#17672](https://github.com/aws/aws-cdk/issues/17672)) ([2d19e15](https://github.com/aws/aws-cdk/commit/2d19e1535586d2b006d43da787ffbb0fad8b4978)) +* **stepfunctions-tasks:** add 'Emr on Eks' tasks ([#17103](https://github.com/aws/aws-cdk/issues/17103)) ([f2bf322](https://github.com/aws/aws-cdk/commit/f2bf322e043ced0193a1b47ae4abd370b095ec1c)), closes [#15262](https://github.com/aws/aws-cdk/issues/15262) [#15234](https://github.com/aws/aws-cdk/issues/15234) + + +### Bug Fixes + +* **apigateway:** dataTraceEnabled does not default to false ([#17906](https://github.com/aws/aws-cdk/issues/17906)) ([cc3bb1f](https://github.com/aws/aws-cdk/commit/cc3bb1f1bdd1b71be41393b40353e4a103c71cf8)) +* **apigatewayv2:** integration class does not render an integration resource ([#17729](https://github.com/aws/aws-cdk/issues/17729)) ([3b5b97a](https://github.com/aws/aws-cdk/commit/3b5b97ac1f972f53240798df19af43d85ebf6f13)), closes [#13213](https://github.com/aws/aws-cdk/issues/13213) +* **apprunner:** startCommand and environment are ignored in imageConfiguration ([#16939](https://github.com/aws/aws-cdk/issues/16939)) ([d911c58](https://github.com/aws/aws-cdk/commit/d911c5878c59498a2d0e14ff536e0f8f9f503bfe)), closes [#16812](https://github.com/aws/aws-cdk/issues/16812) +* **appsync:** add caching config to AppSync resolvers ([#17815](https://github.com/aws/aws-cdk/issues/17815)) ([52b535b](https://github.com/aws/aws-cdk/commit/52b535bda5f26b07377fcdfca63a75c62eb5f883)) +* **appsync:** empty caching config is created when not provided ([#17947](https://github.com/aws/aws-cdk/issues/17947)) ([3a9f206](https://github.com/aws/aws-cdk/commit/3a9f20669cc8338d05f9ef8684aa7e50748baa3d)) +* **appsync:** remove 'id' suffix to union definition key ([#17787](https://github.com/aws/aws-cdk/issues/17787)) ([86e7780](https://github.com/aws/aws-cdk/commit/86e77806391dc3fe8cd254fec773320cdb425dec)), closes [#17771](https://github.com/aws/aws-cdk/issues/17771) +* **assert:** support multiline strings with `stringLike()` ([#17692](https://github.com/aws/aws-cdk/issues/17692)) ([37596e6](https://github.com/aws/aws-cdk/commit/37596e6be4cf05432dcba3838955484e512beca6)) +* **assets:** remove the original-path metadata ([#17901](https://github.com/aws/aws-cdk/issues/17901)) ([2b759ca](https://github.com/aws/aws-cdk/commit/2b759caddc16de9fcb41c3a0941c21ef94647cb3)), closes [#17706](https://github.com/aws/aws-cdk/issues/17706) +* **aws-cdk-migration:** Construct imports not rewritten ([#17931](https://github.com/aws/aws-cdk/issues/17931)) ([f02fcb4](https://github.com/aws/aws-cdk/commit/f02fcb4cf49e6d34f0038c4baf120ccc8dff2abe)), closes [#17826](https://github.com/aws/aws-cdk/issues/17826) +* **aws-ec2:** imported VPC subnets never recognized as PRIVATE_ISOLATED ([#17496](https://github.com/aws/aws-cdk/issues/17496)) ([ba6a8ef](https://github.com/aws/aws-cdk/commit/ba6a8efc65288bd96ebf004d81026ab61485ff06)) +* **aws-elasticloadbalancingv2:** Set stickiness.enabled unless target type is lambda ([#17271](https://github.com/aws/aws-cdk/issues/17271)) ([168a98f](https://github.com/aws/aws-cdk/commit/168a98fb213184dfef29ae38b986704b5abeb99e)), closes [#17261](https://github.com/aws/aws-cdk/issues/17261) +* **cli:** S3 asset uploads are rejected by commonly referenced encryption SCP (introduces bootstrap stack v9) ([#17668](https://github.com/aws/aws-cdk/issues/17668)) ([8191f1f](https://github.com/aws/aws-cdk/commit/8191f1f1d4072feeba74844a31c942909cee7d83)), closes [#11265](https://github.com/aws/aws-cdk/issues/11265) +* **codepipeline:** cannot trigger on all tags anymore in EcrSourceAction ([#17270](https://github.com/aws/aws-cdk/issues/17270)) ([39fe11b](https://github.com/aws/aws-cdk/commit/39fe11bc1b0d12920111331dca560150006a0733)), closes [aws#13818](https://github.com/aws/aws/issues/13818) [aws#13818](https://github.com/aws/aws/issues/13818) +* **codepipeline:** cross-env pipeline cannot be created in `Stage` ([#17730](https://github.com/aws/aws-cdk/issues/17730)) ([f17f29e](https://github.com/aws/aws-cdk/commit/f17f29e94265eb450d8f11bdbdbe719f3e511ea2)), closes [#17643](https://github.com/aws/aws-cdk/issues/17643) +* **codepipeline:** default cross-region S3 buckets allow public access ([#17722](https://github.com/aws/aws-cdk/issues/17722)) ([0b80db5](https://github.com/aws/aws-cdk/commit/0b80db54e92fb5bc0e106093b2f363f9926bd5bd)), closes [#16411](https://github.com/aws/aws-cdk/issues/16411) +* **cognito:** remove invalid SES region check ([#17868](https://github.com/aws/aws-cdk/issues/17868)) ([450f7ca](https://github.com/aws/aws-cdk/commit/450f7ca695f5f0bab758c31f3fd8390649adce51)), closes [#17795](https://github.com/aws/aws-cdk/issues/17795) +* **core:** bundling skipped with --exclusively option and stacks under stage ([#17210](https://github.com/aws/aws-cdk/issues/17210)) ([cda6601](https://github.com/aws/aws-cdk/commit/cda66013afa6f8aa16d802bb2ab08dab1e5124cf)), closes [#12898](https://github.com/aws/aws-cdk/issues/12898) [#15346](https://github.com/aws/aws-cdk/issues/15346) +* **docdb:** secret rotation ignores excluded characters in password ([#17609](https://github.com/aws/aws-cdk/issues/17609)) ([1fe2215](https://github.com/aws/aws-cdk/commit/1fe2215dc40eb58f1babc2c3fbca501a5e89b09f)), closes [#17347](https://github.com/aws/aws-cdk/issues/17347) [#17575](https://github.com/aws/aws-cdk/issues/17575) +* **dynamodb:** add missing DynamoDB operations to enum ([#17738](https://github.com/aws/aws-cdk/issues/17738)) ([f38e0ac](https://github.com/aws/aws-cdk/commit/f38e0ac5b90bd83630a5a602e9ada2556689d826)) +* **dynamodb:** changing `waitForReplicationToFinish` fails deployment ([#17842](https://github.com/aws/aws-cdk/issues/17842)) ([36b8fdb](https://github.com/aws/aws-cdk/commit/36b8fdb026c7e82eb590c1a8d604ca3b44642900)), closes [#16983](https://github.com/aws/aws-cdk/issues/16983) +* **iam:** AWS Managed Policy ARNs are not deduped ([#17623](https://github.com/aws/aws-cdk/issues/17623)) ([ed4a4b4](https://github.com/aws/aws-cdk/commit/ed4a4b4b70e72e3fa9a76af871d1d1e84447140a)), closes [#17552](https://github.com/aws/aws-cdk/issues/17552) +* **lambda-nodejs:** bundling fails with a file dependency in `nodeModules` ([#17851](https://github.com/aws/aws-cdk/issues/17851)) ([5737c33](https://github.com/aws/aws-cdk/commit/5737c336b3a2d7942196ffcad9291b4af6a23375)), closes [#17830](https://github.com/aws/aws-cdk/issues/17830) +* **lambda-nodejs:** bundling with `nodeModules` fails with paths containing spaces ([#17632](https://github.com/aws/aws-cdk/issues/17632)) ([986f291](https://github.com/aws/aws-cdk/commit/986f291a51cee46299428298ca6b39a9636d6dd2)), closes [#17631](https://github.com/aws/aws-cdk/issues/17631) +* **pipelines:** stack outputs used in stackSteps not recognized ([#17311](https://github.com/aws/aws-cdk/issues/17311)) ([5e4a219](https://github.com/aws/aws-cdk/commit/5e4a21959e67ff967d163fce6b0405a053bafdc2)), closes [#17272](https://github.com/aws/aws-cdk/issues/17272) +* **s3-deployment:** updating memoryLimit or vpc results in stack update failure ([#17530](https://github.com/aws/aws-cdk/issues/17530)) ([2ba40d1](https://github.com/aws/aws-cdk/commit/2ba40d16e0e7e59cedc723dc4f9a9a615c313309)), closes [#7128](https://github.com/aws/aws-cdk/issues/7128) +* **stepfunctions:** prefixes not appended to states in parallel branches ([#17806](https://github.com/aws/aws-cdk/issues/17806)) ([a1da772](https://github.com/aws/aws-cdk/commit/a1da77272fa35b9722694557a4d5bdc83e2ad834)), closes [#17354](https://github.com/aws/aws-cdk/issues/17354) + + +### Miscellaneous Chores + +* **apigatewayv2:** integration api re-organization ([#17752](https://github.com/aws/aws-cdk/issues/17752)) ([29039e8](https://github.com/aws/aws-cdk/commit/29039e8bd13a4fdb7f84254038b3331c179273fd)) +* **apigatewayv2-authorizers:** re-organize authorizer api ([#17772](https://github.com/aws/aws-cdk/issues/17772)) ([719f33e](https://github.com/aws/aws-cdk/commit/719f33e20c723f161fc35230fafd7e99bca66a61)) + ## [1.134.0](https://github.com/aws/aws-cdk/compare/v1.133.0...v1.134.0) (2021-11-23) diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index 127592751789b..a03c218a67304 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,26 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.2.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.1.0-alpha.0...v2.2.0-alpha.0) (2021-12-15) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **glue:** the grantRead API previously included 'glue:BatchDeletePartition', and now it does not. + + + + +### Features + +* **iotevents:** add IoT Events input L2 Construct ([#17847](https://github.com/aws/aws-cdk/issues/17847)) ([9f03dc4](https://github.com/aws/aws-cdk/commit/9f03dc4c5b75225942037fb6c8fa7d6abf35fe11)), closes [/github.com/aws/aws-cdk/issues/17711#issuecomment-986153267](https://github.com/aws//github.com/aws/aws-cdk/issues/17711/issues/issuecomment-986153267) + + +### Bug Fixes + +* **appsync:** empty caching config is created when not provided ([#17947](https://github.com/aws/aws-cdk/issues/17947)) ([3a9f206](https://github.com/aws/aws-cdk/commit/3a9f20669cc8338d05f9ef8684aa7e50748baa3d)) +* **glue:** remove `batchDeletePartition` from `grantRead()` permissions ([#17941](https://github.com/aws/aws-cdk/issues/17941)) ([3d64f9b](https://github.com/aws/aws-cdk/commit/3d64f9b8c07e83d4a085e3eaf69629a866bc20d0)), closes [#17935](https://github.com/aws/aws-cdk/issues/17935) [#15116](https://github.com/aws/aws-cdk/issues/15116) + ## [2.1.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.0.0-alpha.11...v2.1.0-alpha.0) (2021-12-08) @@ -50,7 +70,6 @@ the abstract class `HttpRouteIntegration`. ### Features -* **apigatewayv2:** constructs for http api are now stable! 🤘 ([#17773](https://github.com/aws/aws-cdk/issues/17773)) ([b25590f](https://github.com/aws/aws-cdk/commit/b25590ff15d92a8a6ddc1f3a37263f90793b15f4)) * **iot:** add Action to capture CloudWatch metrics ([#17503](https://github.com/aws/aws-cdk/issues/17503)) ([ec4187c](https://github.com/aws/aws-cdk/commit/ec4187c26d68df970d72d0e766d7d27b42e8b784)), closes [/github.com/aws/aws-cdk/pull/16681#issuecomment-942233029](https://github.com/aws//github.com/aws/aws-cdk/pull/16681/issues/issuecomment-942233029) * **neptune:** add engine version 1.1.0.0 and instance types t4g, r6g ([#17669](https://github.com/aws/aws-cdk/issues/17669)) ([83e669d](https://github.com/aws/aws-cdk/commit/83e669dcdae9390990598236c75015832af766b4)) * **servicecatalog:** Add TagOptions to a CloudformationProduct ([#17672](https://github.com/aws/aws-cdk/issues/17672)) ([2d19e15](https://github.com/aws/aws-cdk/commit/2d19e1535586d2b006d43da787ffbb0fad8b4978)) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index 2b8d7d8ef4b04..1fbe146ec1272 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,43 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.2.0](https://github.com/aws/aws-cdk/compare/v2.1.0...v2.2.0) (2021-12-15) + + +### Features + +* **apigateway:** add option to set the base path when adding a domain name to a Rest API ([#17915](https://github.com/aws/aws-cdk/issues/17915)) ([9af5b4d](https://github.com/aws/aws-cdk/commit/9af5b4dba57e816754673fc11a1246d6d4215c5e)) +* **aws-applicationautoscaling:** Allow autoscaling with "M out of N" datapoints ([#17441](https://github.com/aws/aws-cdk/issues/17441)) ([c21320d](https://github.com/aws/aws-cdk/commit/c21320d32a22b9bd5f202acbdd2626ba4d90fbca)), closes [#17433](https://github.com/aws/aws-cdk/issues/17433) +* **aws-applicationautoscaling:** enabling autoscaling for ElastiCache Redis cluster ([#17919](https://github.com/aws/aws-cdk/issues/17919)) ([7f54ed6](https://github.com/aws/aws-cdk/commit/7f54ed667607025666c714299036a6ca770065c9)) +* **aws-ecs:** expose environment from containerDefinition ([#17889](https://github.com/aws/aws-cdk/issues/17889)) ([4937cd0](https://github.com/aws/aws-cdk/commit/4937cd0d0057d7d389809f4c4ef56fc6020a954f)), closes [#17867](https://github.com/aws/aws-cdk/issues/17867) +* **aws-s3:** add support for BucketOwnerEnforced to S3 ObjectOwnershipType ([#17961](https://github.com/aws/aws-cdk/issues/17961)) ([93fafc5](https://github.com/aws/aws-cdk/commit/93fafc5c93f0a8a0a05f4c261df3918256f71e5e)), closes [#17926](https://github.com/aws/aws-cdk/issues/17926) +* **cfnspec:** cloudformation spec v50.0.0 ([#17844](https://github.com/aws/aws-cdk/issues/17844)) ([cd3f24e](https://github.com/aws/aws-cdk/commit/cd3f24ec2a928e62ec538827860f936e650e8798)), closes [#17840](https://github.com/aws/aws-cdk/issues/17840) [#17858](https://github.com/aws/aws-cdk/issues/17858) +* **cfnspec:** cloudformation spec v51.0.0 ([#17955](https://github.com/aws/aws-cdk/issues/17955)) ([c6b7a49](https://github.com/aws/aws-cdk/commit/c6b7a496122ef2e03ccc267e2cccf03ab439fdc7)), closes [#17943](https://github.com/aws/aws-cdk/issues/17943) +* **cli:** Hotswapping Support for S3 Bucket Deployments ([#17638](https://github.com/aws/aws-cdk/issues/17638)) ([1df478b](https://github.com/aws/aws-cdk/commit/1df478b9777afcdb5401df6c4a1a9708849dca42)) +* **ec2:** add d3 and d3en instances ([#17782](https://github.com/aws/aws-cdk/issues/17782)) ([8b52196](https://github.com/aws/aws-cdk/commit/8b52196d9971f0925acedf067150e1c465be7a1e)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) +* **ec2:** add high memory instances u-6tb1, u-9tb1, u-12tb1, u-18tb1, and u-24tb1 ([#17964](https://github.com/aws/aws-cdk/issues/17964)) ([5497525](https://github.com/aws/aws-cdk/commit/54975259fc2425e43cbdcb99f82341d7c0d0aa47)) +* **ec2:** add im4gn and is4gen instances ([#17780](https://github.com/aws/aws-cdk/issues/17780)) ([e057c8f](https://github.com/aws/aws-cdk/commit/e057c8fffd32d5e0ad70880f96a2adc5e1b28eea)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) +* **ec2:** add vpcName property to the VPC ([#17940](https://github.com/aws/aws-cdk/issues/17940)) ([794e7cd](https://github.com/aws/aws-cdk/commit/794e7cd63c83aac3c6ace933f4d953fea0b909ad)) +* **ec2:** propagate EC2 tags to volumes ([#17840](https://github.com/aws/aws-cdk/issues/17840)) ([42cf186](https://github.com/aws/aws-cdk/commit/42cf1861c1b493be7fd5ec0d6d7e8fc64987cacd)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2) [#17844](https://github.com/aws/aws-cdk/issues/17844) +* **lambda:** add cloudwatch lambda insights arm support ([#17665](https://github.com/aws/aws-cdk/issues/17665)) ([02749b4](https://github.com/aws/aws-cdk/commit/02749b43d5169b973e543100c5a7b0c2df04ce2b)), closes [#17133](https://github.com/aws/aws-cdk/issues/17133) + + +### Bug Fixes + +* **apigateway:** dataTraceEnabled does not default to false ([#17906](https://github.com/aws/aws-cdk/issues/17906)) ([cc3bb1f](https://github.com/aws/aws-cdk/commit/cc3bb1f1bdd1b71be41393b40353e4a103c71cf8)) +* **appmesh:** adding support with gateway route priority ([#17694](https://github.com/aws/aws-cdk/issues/17694)) ([a61576f](https://github.com/aws/aws-cdk/commit/a61576fd43fdcca44e364fc6bfa017c8aef3fc07)), closes [#16821](https://github.com/aws/aws-cdk/issues/16821) +* **assets:** remove the original-path metadata ([#17901](https://github.com/aws/aws-cdk/issues/17901)) ([2b759ca](https://github.com/aws/aws-cdk/commit/2b759caddc16de9fcb41c3a0941c21ef94647cb3)), closes [#17706](https://github.com/aws/aws-cdk/issues/17706) +* **aws-autoscaling:** notificationTargetArn should be optional in LifecycleHook ([#16187](https://github.com/aws/aws-cdk/issues/16187)) ([4e7a275](https://github.com/aws/aws-cdk/commit/4e7a2758eec6999aee5432b3e9e6bbe7626a2d6b)), closes [#14641](https://github.com/aws/aws-cdk/issues/14641) +* **aws-cdk-migration:** Construct imports not rewritten ([#17931](https://github.com/aws/aws-cdk/issues/17931)) ([f02fcb4](https://github.com/aws/aws-cdk/commit/f02fcb4cf49e6d34f0038c4baf120ccc8dff2abe)), closes [#17826](https://github.com/aws/aws-cdk/issues/17826) +* **aws-lambda-nodejs:** use closest lockfile when autodetecting ([#16629](https://github.com/aws/aws-cdk/issues/16629)) ([c4ecd96](https://github.com/aws/aws-cdk/commit/c4ecd9636087332d8ae9bc5e120d890e8c677f35)), closes [#15847](https://github.com/aws/aws-cdk/issues/15847) [40aws-cdk/aws-lambda-nodejs/lib/function.ts#L137-L139](https://github.com/40aws-cdk/aws-lambda-nodejs/lib/function.ts/issues/L137-L139) [/github.com/aws/aws-cdk/issues/15847#issuecomment-903830384](https://github.com/aws//github.com/aws/aws-cdk/issues/15847/issues/issuecomment-903830384) +* **cli:** asset publishing broken cross account ([#18007](https://github.com/aws/aws-cdk/issues/18007)) ([2fc6895](https://github.com/aws/aws-cdk/commit/2fc68954cfbc3c65694e767b00a2318f9cc4a501)), closes [#17668](https://github.com/aws/aws-cdk/issues/17668) [#17988](https://github.com/aws/aws-cdk/issues/17988) +* **cli:** hotswapping StateMachines with a name fails ([#17892](https://github.com/aws/aws-cdk/issues/17892)) ([de67aae](https://github.com/aws/aws-cdk/commit/de67aae18cfed2694e9002a10e739a56f294040f)), closes [#17716](https://github.com/aws/aws-cdk/issues/17716) +* **codepipeline:** default cross-region S3 buckets allow public access ([#17722](https://github.com/aws/aws-cdk/issues/17722)) ([0b80db5](https://github.com/aws/aws-cdk/commit/0b80db54e92fb5bc0e106093b2f363f9926bd5bd)), closes [#16411](https://github.com/aws/aws-cdk/issues/16411) +* **cognito:** remove invalid SES region check ([#17868](https://github.com/aws/aws-cdk/issues/17868)) ([450f7ca](https://github.com/aws/aws-cdk/commit/450f7ca695f5f0bab758c31f3fd8390649adce51)), closes [#17795](https://github.com/aws/aws-cdk/issues/17795) +* **custom-resources:** assumedRole from AwsCustomResource invocation leaked to next execution ([#15776](https://github.com/aws/aws-cdk/issues/15776)) ([e138188](https://github.com/aws/aws-cdk/commit/e13818854c89591606ac74496969b841f6a1fa8e)), closes [#15425](https://github.com/aws/aws-cdk/issues/15425) +* **iam:** AWS Managed Policy ARNs are not deduped ([#17623](https://github.com/aws/aws-cdk/issues/17623)) ([ed4a4b4](https://github.com/aws/aws-cdk/commit/ed4a4b4b70e72e3fa9a76af871d1d1e84447140a)), closes [#17552](https://github.com/aws/aws-cdk/issues/17552) +* **logs:** log retention fails with OperationAbortedException ([#17688](https://github.com/aws/aws-cdk/issues/17688)) ([95b8da9](https://github.com/aws/aws-cdk/commit/95b8da94a1880d8c34cab80c9b484307260047d9)), closes [#17546](https://github.com/aws/aws-cdk/issues/17546) + ## [2.1.0](https://github.com/aws/aws-cdk/compare/v2.0.0...v2.1.0) (2021-12-08) diff --git a/allowed-breaking-changes.txt b/allowed-breaking-changes.txt index 6b5d57a000a4e..fa3498335f679 100644 --- a/allowed-breaking-changes.txt +++ b/allowed-breaking-changes.txt @@ -86,3 +86,10 @@ removed:@aws-cdk/aws-stepfunctions-tasks.EmrCreateClusterProps.autoTerminationPo # Changed property securityGroupId to optional because either securityGroupId or # securityGroupName is required. Therefore securityGroupId is no longer mandatory. weakened:@aws-cdk/cloud-assembly-schema.SecurityGroupContextQuery + +# refactor autoscaling lifecycle hook target bind() methods to make role optional by +# having bind() methods create the role if it isn't passed to them +incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.FunctionHook.bind +incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.QueueHook.bind +incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.TopicHook.bind +incompatible-argument:@aws-cdk/aws-autoscaling.ILifecycleHookTarget.bind diff --git a/package.json b/package.json index 8c3721c6c04a1..fb6a3e3b82a50 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,10 @@ "fs-extra": "^9.1.0", "graceful-fs": "^4.2.8", "jest-junit": "^13.0.0", - "jsii-diff": "^1.46.0", - "jsii-pacmak": "^1.46.0", - "jsii-reflect": "^1.46.0", - "jsii-rosetta": "^1.46.0", + "jsii-diff": "^1.47.0", + "jsii-pacmak": "^1.47.0", + "jsii-reflect": "^1.47.0", + "jsii-rosetta": "^1.47.0", "lerna": "^4.0.0", "patch-package": "^6.4.7", "standard-version": "^9.3.2", diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/lambda/Pipfile.lock b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/lambda/Pipfile.lock index 0c01b1a6d6409..37b1c47e3d5e7 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/lambda/Pipfile.lock +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/lambda/Pipfile.lock @@ -19,58 +19,72 @@ "develop": { "boto3": { "hashes": [ - "sha256:5f3969dd167b787e5bc6742afbfe15e149051d8c6aa1edaa4858133384f64ec7", - "sha256:713da2b28e9e4cd77e922690c97935dd2316ab27635b6bab4745a2d42bd887ec" + "sha256:76b3ee0d1dd860c9218bc864cd29f1ee986f6e1e75e8669725dd3c411039379e", + "sha256:c39cb6ed376ba1d4689ac8f6759a2b2d8a0b0424dbec0cd3af1558079bcf06e8" ], "index": "pypi", - "version": "==1.15.11" + "version": "==1.20.23" }, "botocore": { "hashes": [ - "sha256:1531ee5d7f7d0f0d9a12ea829ef046ac52063a1948409ae19a452a3f47a07937", - "sha256:a0514ba531148af26fe36bf75c73089698a5ed8ae150695b96e7cbdf32dd232b" + "sha256:640b62110aa6d1c25553eceafb5bcd89aedeb84b191598d1f6492ad24374d285", + "sha256:7459766c4594f3b8877e8013f93f0dc6c6486acbeb7d9c9ae488396529cc2e84" ], - "version": "==1.18.11" + "markers": "python_version >= '3.6'", + "version": "==1.23.23" }, "coverage": { "hashes": [ - "sha256:0203acd33d2298e19b57451ebb0bed0ab0c602e5cf5a818591b4918b1f97d516", - "sha256:0f313707cdecd5cd3e217fc68c78a960b616604b559e9ea60cc16795c4304259", - "sha256:1c6703094c81fa55b816f5ae542c6ffc625fec769f22b053adb42ad712d086c9", - "sha256:1d44bb3a652fed01f1f2c10d5477956116e9b391320c94d36c6bf13b088a1097", - "sha256:280baa8ec489c4f542f8940f9c4c2181f0306a8ee1a54eceba071a449fb870a0", - "sha256:29a6272fec10623fcbe158fdf9abc7a5fa032048ac1d8631f14b50fbfc10d17f", - "sha256:2b31f46bf7b31e6aa690d4c7a3d51bb262438c6dcb0d528adde446531d0d3bb7", - "sha256:2d43af2be93ffbad25dd959899b5b809618a496926146ce98ee0b23683f8c51c", - "sha256:381ead10b9b9af5f64646cd27107fb27b614ee7040bb1226f9c07ba96625cbb5", - "sha256:47a11bdbd8ada9b7ee628596f9d97fbd3851bd9999d398e9436bd67376dbece7", - "sha256:4d6a42744139a7fa5b46a264874a781e8694bb32f1d76d8137b68138686f1729", - "sha256:50691e744714856f03a86df3e2bff847c2acede4c191f9a1da38f088df342978", - "sha256:530cc8aaf11cc2ac7430f3614b04645662ef20c348dce4167c22d99bec3480e9", - "sha256:582ddfbe712025448206a5bc45855d16c2e491c2dd102ee9a2841418ac1c629f", - "sha256:63808c30b41f3bbf65e29f7280bf793c79f54fb807057de7e5238ffc7cc4d7b9", - "sha256:71b69bd716698fa62cd97137d6f2fdf49f534decb23a2c6fc80813e8b7be6822", - "sha256:7858847f2d84bf6e64c7f66498e851c54de8ea06a6f96a32a1d192d846734418", - "sha256:78e93cc3571fd928a39c0b26767c986188a4118edc67bc0695bc7a284da22e82", - "sha256:7f43286f13d91a34fadf61ae252a51a130223c52bfefb50310d5b2deb062cf0f", - "sha256:86e9f8cd4b0cdd57b4ae71a9c186717daa4c5a99f3238a8723f416256e0b064d", - "sha256:8f264ba2701b8c9f815b272ad568d555ef98dfe1576802ab3149c3629a9f2221", - "sha256:9342dd70a1e151684727c9c91ea003b2fb33523bf19385d4554f7897ca0141d4", - "sha256:9361de40701666b034c59ad9e317bae95c973b9ff92513dd0eced11c6adf2e21", - "sha256:9669179786254a2e7e57f0ecf224e978471491d660aaca833f845b72a2df3709", - "sha256:aac1ba0a253e17889550ddb1b60a2063f7474155465577caa2a3b131224cfd54", - "sha256:aef72eae10b5e3116bac6957de1df4d75909fc76d1499a53fb6387434b6bcd8d", - "sha256:bd3166bb3b111e76a4f8e2980fa1addf2920a4ca9b2b8ca36a3bc3dedc618270", - "sha256:c1b78fb9700fc961f53386ad2fd86d87091e06ede5d118b8a50dea285a071c24", - "sha256:c3888a051226e676e383de03bf49eb633cd39fc829516e5334e69b8d81aae751", - "sha256:c5f17ad25d2c1286436761b462e22b5020d83316f8e8fcb5deb2b3151f8f1d3a", - "sha256:c851b35fc078389bc16b915a0a7c1d5923e12e2c5aeec58c52f4aa8085ac8237", - "sha256:cb7df71de0af56000115eafd000b867d1261f786b5eebd88a0ca6360cccfaca7", - "sha256:cedb2f9e1f990918ea061f28a0f0077a07702e3819602d3507e2ff98c8d20636", - "sha256:e8caf961e1b1a945db76f1b5fa9c91498d15f545ac0ababbe575cfab185d3bd8" + "sha256:01774a2c2c729619760320270e42cd9e797427ecfddd32c2a7b639cdc481f3c0", + "sha256:03b20e52b7d31be571c9c06b74746746d4eb82fc260e594dc662ed48145e9efd", + "sha256:0a7726f74ff63f41e95ed3a89fef002916c828bb5fcae83b505b49d81a066884", + "sha256:1219d760ccfafc03c0822ae2e06e3b1248a8e6d1a70928966bafc6838d3c9e48", + "sha256:13362889b2d46e8d9f97c421539c97c963e34031ab0cb89e8ca83a10cc71ac76", + "sha256:174cf9b4bef0db2e8244f82059a5a72bd47e1d40e71c68ab055425172b16b7d0", + "sha256:17e6c11038d4ed6e8af1407d9e89a2904d573be29d51515f14262d7f10ef0a64", + "sha256:215f8afcc02a24c2d9a10d3790b21054b58d71f4b3c6f055d4bb1b15cecce685", + "sha256:22e60a3ca5acba37d1d4a2ee66e051f5b0e1b9ac950b5b0cf4aa5366eda41d47", + "sha256:2641f803ee9f95b1f387f3e8f3bf28d83d9b69a39e9911e5bfee832bea75240d", + "sha256:276651978c94a8c5672ea60a2656e95a3cce2a3f31e9fb2d5ebd4c215d095840", + "sha256:3f7c17209eef285c86f819ff04a6d4cbee9b33ef05cbcaae4c0b4e8e06b3ec8f", + "sha256:3feac4084291642165c3a0d9eaebedf19ffa505016c4d3db15bfe235718d4971", + "sha256:49dbff64961bc9bdd2289a2bda6a3a5a331964ba5497f694e2cbd540d656dc1c", + "sha256:4e547122ca2d244f7c090fe3f4b5a5861255ff66b7ab6d98f44a0222aaf8671a", + "sha256:5829192582c0ec8ca4a2532407bc14c2f338d9878a10442f5d03804a95fac9de", + "sha256:5d6b09c972ce9200264c35a1d53d43ca55ef61836d9ec60f0d44273a31aa9f17", + "sha256:600617008aa82032ddeace2535626d1bc212dfff32b43989539deda63b3f36e4", + "sha256:619346d57c7126ae49ac95b11b0dc8e36c1dd49d148477461bb66c8cf13bb521", + "sha256:63c424e6f5b4ab1cf1e23a43b12f542b0ec2e54f99ec9f11b75382152981df57", + "sha256:6dbc1536e105adda7a6312c778f15aaabe583b0e9a0b0a324990334fd458c94b", + "sha256:6e1394d24d5938e561fbeaa0cd3d356207579c28bd1792f25a068743f2d5b282", + "sha256:86f2e78b1eff847609b1ca8050c9e1fa3bd44ce755b2ec30e70f2d3ba3844644", + "sha256:8bdfe9ff3a4ea37d17f172ac0dff1e1c383aec17a636b9b35906babc9f0f5475", + "sha256:8e2c35a4c1f269704e90888e56f794e2d9c0262fb0c1b1c8c4ee44d9b9e77b5d", + "sha256:92b8c845527eae547a2a6617d336adc56394050c3ed8a6918683646328fbb6da", + "sha256:9365ed5cce5d0cf2c10afc6add145c5037d3148585b8ae0e77cc1efdd6aa2953", + "sha256:9a29311bd6429be317c1f3fe4bc06c4c5ee45e2fa61b2a19d4d1d6111cb94af2", + "sha256:9a2b5b52be0a8626fcbffd7e689781bf8c2ac01613e77feda93d96184949a98e", + "sha256:a4bdeb0a52d1d04123b41d90a4390b096f3ef38eee35e11f0b22c2d031222c6c", + "sha256:a9c8c4283e17690ff1a7427123ffb428ad6a52ed720d550e299e8291e33184dc", + "sha256:b637c57fdb8be84e91fac60d9325a66a5981f8086c954ea2772efe28425eaf64", + "sha256:bf154ba7ee2fd613eb541c2bc03d3d9ac667080a737449d1a3fb342740eb1a74", + "sha256:c254b03032d5a06de049ce8bca8338a5185f07fb76600afff3c161e053d88617", + "sha256:c332d8f8d448ded473b97fefe4a0983265af21917d8b0cdcb8bb06b2afe632c3", + "sha256:c7912d1526299cb04c88288e148c6c87c0df600eca76efd99d84396cfe00ef1d", + "sha256:cfd9386c1d6f13b37e05a91a8583e802f8059bebfccde61a418c5808dea6bbfa", + "sha256:d5d2033d5db1d58ae2d62f095e1aefb6988af65b4b12cb8987af409587cc0739", + "sha256:dca38a21e4423f3edb821292e97cec7ad38086f84313462098568baedf4331f8", + "sha256:e2cad8093172b7d1595b4ad66f24270808658e11acf43a8f95b41276162eb5b8", + "sha256:e3db840a4dee542e37e09f30859f1612da90e1c5239a6a2498c473183a50e781", + "sha256:edcada2e24ed68f019175c2b2af2a8b481d3d084798b8c20d15d34f5c733fa58", + "sha256:f467bbb837691ab5a8ca359199d3429a11a01e6dfb3d9dcc676dc035ca93c0a9", + "sha256:f506af4f27def639ba45789fa6fde45f9a217da0be05f8910458e4557eed020c", + "sha256:f614fc9956d76d8a88a88bb41ddc12709caa755666f580af3a688899721efecd", + "sha256:f9afb5b746781fc2abce26193d1c817b7eb0e11459510fba65d2bd77fe161d9e", + "sha256:fb8b8ee99b3fffe4fd86f4c81b35a6bf7e4462cba019997af2fe679365db0c49" ], "index": "pypi", - "version": "==5.3" + "version": "==6.2" }, "jmespath": { "hashes": [ @@ -82,42 +96,43 @@ }, "python-dateutil": { "hashes": [ - "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", - "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" + "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", + "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.8.1" + "version": "==2.8.2" }, "s3transfer": { "hashes": [ - "sha256:2482b4259524933a022d59da830f51bd746db62f047d6eb213f2f8855dcb8a13", - "sha256:921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" + "sha256:50ed823e1dc5868ad40c8dc92072f757aa0e653a192845c94a3b676f4a62da4c", + "sha256:9c1dc369814391a6bda20ebbf4b70a0f34630592c9aa520856bf384916af2803" ], - "version": "==0.3.3" + "markers": "python_version >= '3.6'", + "version": "==0.5.0" }, "six": { "hashes": [ - "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", - "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" + "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", + "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.15.0" + "version": "==1.16.0" }, "urllib3": { "hashes": [ - "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", - "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" + "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece", + "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844" ], - "markers": "python_version != '3.4'", - "version": "==1.25.10" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "version": "==1.26.7" }, "yapf": { "hashes": [ - "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427", - "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9" + "sha256:408fb9a2b254c302f49db83c59f9aa0b4b0fd0ec25be3a5c51181327922ff63d", + "sha256:e3a234ba8455fe201eaa649cdac872d590089a18b661e39bbac7020978dd9c2e" ], "index": "pypi", - "version": "==0.30.0" + "version": "==0.31.0" } } } diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 2524daa53c81a..dfd514268e0ac 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -43,7 +43,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/aws-autoscaling": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/assert-internal": "0.0.0" }, diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 0c353fa25303e..a2a3adc21c14f 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -67,8 +67,8 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "fast-check": "^2.19.0", - "jest": "^27.3.1" + "fast-check": "^2.20.0", + "jest": "^27.4.3" }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/assert-internal/package.json b/packages/@aws-cdk/assert-internal/package.json index 052f02dc8729f..72db69cfcd171 100644 --- a/packages/@aws-cdk/assert-internal/package.json +++ b/packages/@aws-cdk/assert-internal/package.json @@ -27,8 +27,8 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1", - "ts-jest": "^27.0.7" + "jest": "^27.4.3", + "ts-jest": "^27.1.1" }, "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", @@ -40,7 +40,7 @@ "peerDependencies": { "@aws-cdk/core": "0.0.0", "constructs": "^10.0.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index 336d554e8e81a..660626d388928 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -42,7 +42,7 @@ "aws-cdk-migration": "0.0.0", "constructs": "^10.0.0", "jest": "^27.3.1", - "ts-jest": "^27.0.7" + "ts-jest": "^27.1.1" }, "dependencies": { "@aws-cdk/cloudformation-diff": "0.0.0" diff --git a/packages/@aws-cdk/assertions/package.json b/packages/@aws-cdk/assertions/package.json index f85e1c01436a3..8955c78f75529 100644 --- a/packages/@aws-cdk/assertions/package.json +++ b/packages/@aws-cdk/assertions/package.json @@ -67,8 +67,8 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^27.0.3", "constructs": "^10.0.0", - "jest": "^27.3.1", - "ts-jest": "^27.0.7" + "jest": "^27.4.3", + "ts-jest": "^27.1.1" }, "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 397e801cc04b5..c128613f50654 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -77,7 +77,7 @@ "@types/jest": "^27.0.3", "@types/sinon": "^9.0.11", "aws-cdk": "0.0.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "sinon": "^9.2.4", "ts-mock-imports": "^1.3.8" }, diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/.eslintrc.js b/packages/@aws-cdk/aws-amplifyuibuilder/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/.gitignore b/packages/@aws-cdk/aws-amplifyuibuilder/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/.npmignore b/packages/@aws-cdk/aws-amplifyuibuilder/.npmignore new file mode 100644 index 0000000000000..f931fede67c44 --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/LICENSE b/packages/@aws-cdk/aws-amplifyuibuilder/LICENSE new file mode 100644 index 0000000000000..28e4bdcec77ec --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/NOTICE b/packages/@aws-cdk/aws-amplifyuibuilder/NOTICE new file mode 100644 index 0000000000000..5fc3826926b5b --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/README.md b/packages/@aws-cdk/aws-amplifyuibuilder/README.md new file mode 100644 index 0000000000000..7fd5dcbd2726a --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/README.md @@ -0,0 +1,31 @@ +# AWS::AmplifyUIBuilder Construct Library + + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts nofixture +import * as amplifyuibuilder from '@aws-cdk/aws-amplifyuibuilder'; +``` + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::AmplifyUIBuilder](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AmplifyUIBuilder.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/jest.config.js b/packages/@aws-cdk/aws-amplifyuibuilder/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/lib/index.ts b/packages/@aws-cdk/aws-amplifyuibuilder/lib/index.ts new file mode 100644 index 0000000000000..0becb5a95c06d --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::AmplifyUIBuilder CloudFormation Resources: +export * from './amplifyuibuilder.generated'; diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/package.json b/packages/@aws-cdk/aws-amplifyuibuilder/package.json new file mode 100644 index 0000000000000..0a4c682515eec --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/package.json @@ -0,0 +1,113 @@ +{ + "name": "@aws-cdk/aws-amplifyuibuilder", + "version": "0.0.0", + "description": "AWS::AmplifyUIBuilder Construct Library", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.AmplifyUIBuilder", + "packageId": "Amazon.CDK.AWS.AmplifyUIBuilder", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.amplifyuibuilder", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "amplifyuibuilder" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-amplifyuibuilder", + "module": "aws_cdk.aws_amplifyuibuilder" + } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-amplifyuibuilder" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "cloudformation": "AWS::AmplifyUIBuilder", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::AmplifyUIBuilder", + "aws-amplifyuibuilder" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assertions": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cfn2ts": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^26.0.22" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "private": true +} diff --git a/packages/@aws-cdk/aws-amplifyuibuilder/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-amplifyuibuilder/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e208762bca03c --- /dev/null +++ b/packages/@aws-cdk/aws-amplifyuibuilder/rosetta/default.ts-fixture @@ -0,0 +1,8 @@ +import { Construct } from 'constructs'; +import { Stack } from '@aws-cdk/core'; + +class MyStack extends Stack { + constructor(scope: Construct, id: string) { + /// here + } +} diff --git a/packages/@aws-cdk/aws-iotevents/test/iotevents.test.ts b/packages/@aws-cdk/aws-amplifyuibuilder/test/amplifyuibuilder.test.ts similarity index 100% rename from packages/@aws-cdk/aws-iotevents/test/iotevents.test.ts rename to packages/@aws-cdk/aws-amplifyuibuilder/test/amplifyuibuilder.test.ts diff --git a/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts b/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts index c9f082121bff6..efd4b5584dbfe 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts @@ -48,6 +48,16 @@ export interface DomainNameOptions { * @default - mTLS is not configured. */ readonly mtls?: MTLSConfig; + + /** + * The base path name that callers of the API must provide in the URL after + * the domain name (e.g. `example.com/base-path`). If you specify this + * property, it can't be an empty string. + * + * @default - map requests from the domain root (e.g. `example.com`). If this + * is undefined, no additional mappings will be allowed on this domain name. + */ + readonly basePath?: string; } export interface DomainNameProps extends DomainNameOptions { @@ -104,6 +114,7 @@ export class DomainName extends Resource implements IDomainName { public readonly domainName: string; public readonly domainNameAliasDomainName: string; public readonly domainNameAliasHostedZoneId: string; + private readonly basePaths = new Set(); constructor(scope: Construct, id: string, props: DomainNameProps) { super(scope, id); @@ -136,7 +147,9 @@ export class DomainName extends Resource implements IDomainName { : resource.attrRegionalHostedZoneId; if (props.mapping) { - this.addBasePathMapping(props.mapping); + this.addBasePathMapping(props.mapping, { + basePath: props.basePath, + }); } } @@ -146,6 +159,10 @@ export class DomainName extends Resource implements IDomainName { * @param options Options for mapping to base path with or without a stage */ public addBasePathMapping(targetApi: IRestApi, options: BasePathMappingOptions = { }) { + if (this.basePaths.has(undefined)) { + throw new Error('This domain name already has an empty base path. No additional base paths are allowed.'); + } + this.basePaths.add(options.basePath); const basePath = options.basePath || '/'; const id = `Map:${basePath}=>${Names.nodeUniqueId(targetApi.node)}`; return new BasePathMapping(this, id, { diff --git a/packages/@aws-cdk/aws-apigateway/lib/stage.ts b/packages/@aws-cdk/aws-apigateway/lib/stage.ts index c8f69c3768f36..04f79ef315cde 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/stage.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/stage.ts @@ -316,7 +316,7 @@ export class Stage extends Resource implements IStage { cacheDataEncrypted: options.cacheDataEncrypted, cacheTtlInSeconds: options.cacheTtl && options.cacheTtl.toSeconds(), cachingEnabled: options.cachingEnabled, - dataTraceEnabled: options.dataTraceEnabled, + dataTraceEnabled: options.dataTraceEnabled ?? false, loggingLevel: options.loggingLevel, metricsEnabled: options.metricsEnabled, throttlingBurstLimit: options.throttlingBurstLimit, diff --git a/packages/@aws-cdk/aws-apigateway/test/domains.test.ts b/packages/@aws-cdk/aws-apigateway/test/domains.test.ts index 7b8817df48853..31c553ad9c973 100644 --- a/packages/@aws-cdk/aws-apigateway/test/domains.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/domains.test.ts @@ -259,6 +259,79 @@ describe('domains', () => { }); }); + test('a base path can be defined when adding a domain name', () => { + // GIVEN + const domainName = 'my.domain.com'; + const basePath = 'users'; + const stack = new Stack(); + const certificate = new acm.Certificate(stack, 'cert', { domainName: 'my.domain.com' }); + + // WHEN + const api = new apigw.RestApi(stack, 'api', {}); + + api.root.addMethod('GET'); + + api.addDomainName('domainId', { domainName, certificate, basePath }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { + 'BasePath': 'users', + 'RestApiId': { + 'Ref': 'apiC8550315', + }, + }); + }); + + test('additional base paths can added if addDomainName was called with a non-empty base path', () => { + // GIVEN + const domainName = 'my.domain.com'; + const basePath = 'users'; + const stack = new Stack(); + const certificate = new acm.Certificate(stack, 'cert', { domainName: 'my.domain.com' }); + + // WHEN + const api = new apigw.RestApi(stack, 'api', {}); + + api.root.addMethod('GET'); + + const dn = api.addDomainName('domainId', { domainName, certificate, basePath }); + dn.addBasePathMapping(api, { + basePath: 'books', + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { + 'BasePath': 'users', + 'RestApiId': { + 'Ref': 'apiC8550315', + }, + }); + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { + 'BasePath': 'books', + 'RestApiId': { + 'Ref': 'apiC8550315', + }, + }); + }); + + test('no additional base paths can added if addDomainName was called without a base path', () => { + // GIVEN + const domainName = 'my.domain.com'; + const stack = new Stack(); + const certificate = new acm.Certificate(stack, 'cert', { domainName: 'my.domain.com' }); + + // WHEN + const api = new apigw.RestApi(stack, 'api', {}); + + api.root.addMethod('GET'); + + const dn = api.addDomainName('domainId', { domainName, certificate }); + + expect(() => dn.addBasePathMapping(api, { basePath: 'books' })) + .toThrow(/No additional base paths are allowed/); + }); + + test('domain name cannot contain uppercase letters', () => { // GIVEN const stack = new Stack(); diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json index 606c5f2098a0d..8ea57123895eb 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json +++ b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json @@ -95,6 +95,7 @@ }, { "CachingEnabled": true, + "DataTraceEnabled": false, "HttpMethod": "GET", "ResourcePath": "/~1api~1appliances" } diff --git a/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts b/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts index 76ef808c4999e..7c5b9e60e85d6 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts @@ -9,7 +9,7 @@ describe('lambda', () => { const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api'); const handler = new lambda.Function(stack, 'Handler', { - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'boom', code: lambda.Code.fromInline('foo'), }); diff --git a/packages/@aws-cdk/aws-apigateway/test/stage.test.ts b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts index d419a3190639f..fc5f1864d8d19 100644 --- a/packages/@aws-cdk/aws-apigateway/test/stage.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts @@ -87,6 +87,7 @@ describe('stage', () => { expect(stack).toHaveResource('AWS::ApiGateway::Stage', { MethodSettings: [ { + DataTraceEnabled: false, HttpMethod: '*', LoggingLevel: 'INFO', ResourcePath: '/*', @@ -119,12 +120,14 @@ describe('stage', () => { expect(stack).toHaveResource('AWS::ApiGateway::Stage', { MethodSettings: [ { + DataTraceEnabled: false, HttpMethod: '*', LoggingLevel: 'INFO', ResourcePath: '/*', ThrottlingRateLimit: 12, }, { + DataTraceEnabled: false, HttpMethod: 'GET', LoggingLevel: 'ERROR', ResourcePath: '/~1goo~1bar', @@ -207,6 +210,7 @@ describe('stage', () => { CacheClusterSize: '0.5', MethodSettings: [ { + DataTraceEnabled: false, CachingEnabled: true, HttpMethod: '*', ResourcePath: '/*', diff --git a/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json b/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json index a6b246a9101bd..60f2717bf1c8f 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-applicationautoscaling/README.md b/packages/@aws-cdk/aws-applicationautoscaling/README.md index 77f3858b8e6f2..0870212d274a9 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/README.md +++ b/packages/@aws-cdk/aws-applicationautoscaling/README.md @@ -106,6 +106,37 @@ capacity.scaleOnMetric('ScaleToCPU', { The AutoScaling construct library will create the required CloudWatch alarms and AutoScaling policies for you. +### Scaling based on multiple datapoints + +The Step Scaling configuration above will initiate a scaling event when a single +datapoint of the scaling metric is breaching a scaling step breakpoint. In cases +where you might want to initiate scaling actions on a larger number of datapoints +(ie in order to smooth out randomness in the metric data), you can use the +optional `evaluationPeriods` and `datapointsToAlarm` properties: + +```ts +declare const capacity: ScalableAttribute; +declare const cpuUtilization: cloudwatch.Metric; + +capacity.scaleOnMetric('ScaleToCPUWithMultipleDatapoints', { + metric: cpuUtilization, + scalingSteps: [ + { upper: 10, change: -1 }, + { lower: 50, change: +1 }, + { lower: 70, change: +3 }, + ], + + // if the cpuUtilization metric has a period of 1 minute, then data points + // in the last 10 minutes will be evaluated + evaluationPeriods: 10, + + // Only trigger a scaling action when 6 datapoints out of the last 10 are + // breaching. If this is left unspecified, then ALL datapoints in the + // evaluation period must be breaching to trigger a scaling action + datapointsToAlarm: 6 +}); +``` + ## Target Tracking Scaling This type of scaling scales in and out in order to keep a metric (typically @@ -206,3 +237,20 @@ target.scaleToTrackMetric('PceTracking', { predefinedMetric: appscaling.PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION, }) ``` + +### ElastiCache Redis shards scaling with target value + +```ts +const shardsScalableTarget = new appscaling.ScalableTarget(this, 'ElastiCacheRedisShardsScalableTarget', { + serviceNamespace: appscaling.ServiceNamespace.ELASTICACHE, + scalableDimension: 'elasticache:replication-group:NodeGroups', + minCapacity: 2, + maxCapacity: 10, + resourceId: 'replication-group/main-cluster', +}); + +shardsScalableTarget.scaleToTrackMetric('ElastiCacheRedisShardsCPUUtilization', { + targetValue: 20, + predefinedMetric: appscaling.PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION, +}); +``` diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts index 7937b331c018a..a81385e411a99 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts @@ -281,4 +281,9 @@ export enum ServiceNamespace { * Kafka */ KAFKA = 'kafka', + + /** + * ElastiCache + */ + ELASTICACHE = 'elasticache', } diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.ts index 7a5082615abff..7d86e34fcaafe 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.ts @@ -54,10 +54,26 @@ export interface BasicStepScalingPolicyProps { * Raising this value can be used to smooth out the metric, at the expense * of slower response times. * + * If `datapointsToAlarm` is not set, then all data points in the evaluation period + * must meet the criteria to trigger a scaling action. + * * @default 1 */ readonly evaluationPeriods?: number; + /** + * The number of data points out of the evaluation periods that must be breaching to + * trigger a scaling action + * + * Creates an "M out of N" alarm, where this property is the M and the value set for + * `evaluationPeriods` is the N value. + * + * Only has meaning if `evaluationPeriods != 1`. + * + * @default `evaluationPeriods` + */ + readonly datapointsToAlarm?: number; + /** * Aggregation to apply to all data points over the evaluation periods * @@ -95,6 +111,10 @@ export class StepScalingPolicy extends Construct { throw new Error('You must supply at least 2 intervals for autoscaling'); } + if (props.datapointsToAlarm !== undefined && props.datapointsToAlarm < 1) { + throw new RangeError(`datapointsToAlarm cannot be less than 1, got: ${props.datapointsToAlarm}`); + } + const adjustmentType = props.adjustmentType || AdjustmentType.CHANGE_IN_CAPACITY; const changesAreAbsolute = adjustmentType === AdjustmentType.EXACT_CAPACITY; @@ -126,6 +146,7 @@ export class StepScalingPolicy extends Construct { alarmDescription: 'Lower threshold scaling alarm', comparisonOperator: cloudwatch.ComparisonOperator.LESS_THAN_OR_EQUAL_TO_THRESHOLD, evaluationPeriods: props.evaluationPeriods ?? 1, + datapointsToAlarm: props.datapointsToAlarm, threshold, }); this.lowerAlarm.addAlarmAction(new StepScalingAlarmAction(this.lowerAction)); @@ -156,6 +177,7 @@ export class StepScalingPolicy extends Construct { alarmDescription: 'Upper threshold scaling alarm', comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD, evaluationPeriods: props.evaluationPeriods ?? 1, + datapointsToAlarm: props.datapointsToAlarm, threshold, }); this.upperAlarm.addAlarmAction(new StepScalingAlarmAction(this.upperAction)); diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts index e0f235c347481..edc5913337142 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts @@ -239,4 +239,19 @@ export enum PredefinedMetric { * @see https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html */ KAFKA_BROKER_STORAGE_UTILIZATION = 'KafkaBrokerStorageUtilization', + /** + * ELASTIC_CACHE_PRIMARY_ENGINE_CPU_UTILIZATION + * @see https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html + */ + ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION = 'ElastiCachePrimaryEngineCPUUtilization', + /** + * ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION + * @see https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html + */ + ELASTICACHE_REPLICA_ENGINE_CPU_UTILIZATION = 'ElastiCacheReplicaEngineCPUUtilization', + /** + * ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION + * @see https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html + */ + ELASTICACHE_DATABASE_MEMORY_USAGE_COUNTED_FOR_EVICT_PERCENTAGE = 'ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage', } diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 8894a6badb214..736af19be2673 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -85,8 +85,8 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "fast-check": "^2.19.0", - "jest": "^27.3.1" + "fast-check": "^2.20.0", + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-autoscaling-common": "0.0.0", diff --git a/packages/@aws-cdk/aws-applicationautoscaling/test/scalable-target.test.ts b/packages/@aws-cdk/aws-applicationautoscaling/test/scalable-target.test.ts index 508ae3bb2c9e2..036fd608a5e6d 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/test/scalable-target.test.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/test/scalable-target.test.ts @@ -144,6 +144,7 @@ describe('scalable target', () => { expect(appscaling.ServiceNamespace.LAMBDA).toEqual('lambda'); expect(appscaling.ServiceNamespace.RDS).toEqual('rds'); expect(appscaling.ServiceNamespace.SAGEMAKER).toEqual('sagemaker'); + expect(appscaling.ServiceNamespace.ELASTICACHE).toEqual('elasticache'); }); test('create scalable target with negative minCapacity throws error', () => { diff --git a/packages/@aws-cdk/aws-applicationautoscaling/test/step-scaling-policy.test.ts b/packages/@aws-cdk/aws-applicationautoscaling/test/step-scaling-policy.test.ts index 528a84b997306..ca1011881ec14 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/test/step-scaling-policy.test.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/test/step-scaling-policy.test.ts @@ -227,6 +227,62 @@ describe('step scaling policy', () => { }); + + test('step scaling with evaluation period & data points to alarm configured', () => { + // GIVEN + const stack = new cdk.Stack(); + const target = createScalableTarget(stack); + + // WHEN + target.scaleOnMetric('Tracking', { + metric: new cloudwatch.Metric({ namespace: 'Test', metricName: 'Metric', statistic: 'p99' }), + scalingSteps: [ + { upper: 0, change: -1 }, + { lower: 100, change: +1 }, + { lower: 500, change: +5 }, + ], + evaluationPeriods: 10, + datapointsToAlarm: 6, + metricAggregationType: appscaling.MetricAggregationType.MAXIMUM, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::ApplicationAutoScaling::ScalingPolicy', { + PolicyType: 'StepScaling', + StepScalingPolicyConfiguration: { + AdjustmentType: 'ChangeInCapacity', + MetricAggregationType: 'Maximum', + }, + }); + expect(stack).toHaveResource('AWS::CloudWatch::Alarm', { + ComparisonOperator: 'GreaterThanOrEqualToThreshold', + EvaluationPeriods: 10, + DatapointsToAlarm: 6, + ExtendedStatistic: 'p99', + MetricName: 'Metric', + Namespace: 'Test', + Threshold: 100, + }); + }); + + test('step scaling with invalid datapointsToAlarm throws error', () => { + const stack = new cdk.Stack(); + const target = createScalableTarget(stack); + + expect(() => { + target.scaleOnMetric('Tracking', { + metric: new cloudwatch.Metric({ namespace: 'Test', metricName: 'Metric', statistic: 'p99' }), + scalingSteps: [ + { upper: 0, change: -1 }, + { lower: 100, change: +1 }, + { lower: 500, change: +5 }, + ], + evaluationPeriods: 10, + datapointsToAlarm: 0, + metricAggregationType: appscaling.MetricAggregationType.MAXIMUM, + }); + }).toThrow('datapointsToAlarm cannot be less than 1, got: 0'); + }); }); /** diff --git a/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts index 934682f2e0225..3969494138202 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts @@ -145,10 +145,24 @@ export interface GrpcGatewayRouteMatch { readonly rewriteRequestHostname?: boolean; } +/** + * Base options for all gateway route specs. + */ +export interface CommonGatewayRouteSpecOptions { + /** + * The priority for the gateway route. When a Virtual Gateway has multiple gateway routes, gateway route match + * is performed in the order of specified value, where 0 is the highest priority, + * and first matched gateway route is selected. + * + * @default - no particular priority + */ + readonly priority?: number; +} + /** * Properties specific for HTTP Based GatewayRoutes */ -export interface HttpGatewayRouteSpecOptions { +export interface HttpGatewayRouteSpecOptions extends CommonGatewayRouteSpecOptions { /** * The criterion for determining a request match for this GatewayRoute. * When path match is defined, this may optionally determine the path rewrite configuration. @@ -166,7 +180,7 @@ export interface HttpGatewayRouteSpecOptions { /** * Properties specific for a gRPC GatewayRoute */ -export interface GrpcGatewayRouteSpecOptions { +export interface GrpcGatewayRouteSpecOptions extends CommonGatewayRouteSpecOptions { /** * The criterion for determining a request match for this GatewayRoute */ @@ -202,6 +216,15 @@ export interface GatewayRouteSpecConfig { * @default - no grpc spec */ readonly grpcSpecConfig?: CfnGatewayRoute.GrpcGatewayRouteProperty; + + /** + * The priority for the gateway route. When a Virtual Gateway has multiple gateway routes, gateway route match + * is performed in the order of specified value, where 0 is the highest priority, + * and first matched gateway route is selected. + * + * @default - no particular priority + */ + readonly priority?: number; } /** @@ -254,12 +277,14 @@ class HttpGatewayRouteSpec extends GatewayRouteSpec { * Type of route you are creating */ readonly routeType: Protocol; + readonly priority?: number; constructor(options: HttpGatewayRouteSpecOptions, protocol: Protocol.HTTP | Protocol.HTTP2) { super(); this.routeTarget = options.routeTarget; this.routeType = protocol; this.match = options.match; + this.priority = options.priority; } public bind(scope: Construct): GatewayRouteSpecConfig { @@ -298,6 +323,7 @@ class HttpGatewayRouteSpec extends GatewayRouteSpec { }, }; return { + priority: this.priority, httpSpecConfig: this.routeType === Protocol.HTTP ? httpConfig : undefined, http2SpecConfig: this.routeType === Protocol.HTTP2 ? httpConfig : undefined, }; @@ -311,11 +337,13 @@ class GrpcGatewayRouteSpec extends GatewayRouteSpec { * The VirtualService this GatewayRoute directs traffic to */ readonly routeTarget: IVirtualService; + readonly priority?: number; constructor(options: GrpcGatewayRouteSpecOptions) { super(); this.match = options.match; this.routeTarget = options.routeTarget; + this.priority = options.priority; } public bind(scope: Construct): GatewayRouteSpecConfig { @@ -346,6 +374,7 @@ class GrpcGatewayRouteSpec extends GatewayRouteSpec { }, }, }, + priority: this.priority, }; } } diff --git a/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts b/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts index 088067d06763d..32a52acbe7bda 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts @@ -119,6 +119,7 @@ export class GatewayRoute extends cdk.Resource implements IGatewayRoute { httpRoute: routeSpecConfig.httpSpecConfig, http2Route: routeSpecConfig.http2SpecConfig, grpcRoute: routeSpecConfig.grpcSpecConfig, + priority: routeSpecConfig.priority, }, virtualGatewayName: this.virtualGateway.virtualGatewayName, }); diff --git a/packages/@aws-cdk/aws-appmesh/lib/route-spec.ts b/packages/@aws-cdk/aws-appmesh/lib/route-spec.ts index f5a8bdacce7b3..e5ae7d9352f58 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/route-spec.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/route-spec.ts @@ -117,8 +117,8 @@ export interface GrpcRouteMatch { */ export interface RouteSpecOptionsBase { /** - * The priority for the route. Routes are matched based on the specified - * value, where 0 is the highest priority. + * The priority for the route. When a Virtual Router has multiple routes, route match is performed in the + * order of specified value, where 0 is the highest priority, and first matched route is selected. * * @default - no particular priority */ @@ -354,8 +354,8 @@ export interface RouteSpecConfig { readonly tcpRouteSpec?: CfnRoute.TcpRouteProperty; /** - * The priority for the route. Routes are matched based on the specified - * value, where 0 is the highest priority. + * The priority for the route. When a Virtual Router has multiple routes, route match is performed in the + * order of specified value, where 0 is the highest priority, and first matched route is selected. * * @default - no particular priority */ diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index c4b151c324fd2..36298ccb1c134 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -91,7 +91,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-acmpca": "0.0.0", diff --git a/packages/@aws-cdk/aws-appmesh/test/gateway-route.test.ts b/packages/@aws-cdk/aws-appmesh/test/gateway-route.test.ts index 85eb5254b3153..6ae344e7ff297 100644 --- a/packages/@aws-cdk/aws-appmesh/test/gateway-route.test.ts +++ b/packages/@aws-cdk/aws-appmesh/test/gateway-route.test.ts @@ -1122,8 +1122,86 @@ describe('gateway route', () => { }, }, }); + }); + }); + + describe('with priority', () => { + test('should set the priority for http gateway route', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const virtualGateway = new appmesh.VirtualGateway(stack, 'gateway-1', { + listeners: [appmesh.VirtualGatewayListener.http()], + mesh: mesh, + }); + + const virtualService = new appmesh.VirtualService(stack, 'vs-1', { + virtualServiceProvider: appmesh.VirtualServiceProvider.none(mesh), + virtualServiceName: 'target.local', + }); + + // Add an HTTP Route + virtualGateway.addGatewayRoute('gateway-http-route', { + routeSpec: appmesh.GatewayRouteSpec.http({ + routeTarget: virtualService, + match: { + }, + priority: 100, + }), + gatewayRouteName: 'gateway-http-route', + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppMesh::GatewayRoute', { + Spec: { + Priority: 100, + }, + }); + }); + test('should set the priority for grpc gateway route', () => { + // GIVEN + const stack = new cdk.Stack(); + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const virtualGateway = new appmesh.VirtualGateway(stack, 'gateway-1', { + listeners: [appmesh.VirtualGatewayListener.grpc()], + mesh: mesh, + }); + + const virtualService = new appmesh.VirtualService(stack, 'vs-1', { + virtualServiceProvider: appmesh.VirtualServiceProvider.none(mesh), + virtualServiceName: 'target.local', + }); + + // Add an Grpc Route + new appmesh.GatewayRoute(stack, 'test-node', { + routeSpec: appmesh.GatewayRouteSpec.grpc({ + match: { + serviceName: virtualService.virtualServiceName, + }, + routeTarget: virtualService, + priority: 500, + }), + virtualGateway: virtualGateway, + gatewayRouteName: 'routeWithPriority', + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppMesh::GatewayRoute', { + Spec: { + Priority: 500, + }, + }); }); }); diff --git a/packages/@aws-cdk/aws-appsync/lib/key.ts b/packages/@aws-cdk/aws-appsync/lib/key.ts index d05975ce8ed16..57bfc82e1dc7f 100644 --- a/packages/@aws-cdk/aws-appsync/lib/key.ts +++ b/packages/@aws-cdk/aws-appsync/lib/key.ts @@ -68,14 +68,14 @@ export class KeyCondition { */ public renderTemplate(): string { return `"query" : { - "expression" : "${this.cond.renderCondition()}", - "expressionNames" : { + "expression" : "${this.cond.renderCondition()}", + "expressionNames" : { ${this.cond.renderExpressionNames()} - }, - "expressionValues" : { + }, + "expressionValues" : { ${this.cond.renderExpressionValues()} - } - }`; + } + }`; } } @@ -253,4 +253,4 @@ export class Values { public static attribute(attr: string): AttributeValuesStep { return new AttributeValues('{}').attribute(attr); } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-appsync/lib/resolver.ts b/packages/@aws-cdk/aws-appsync/lib/resolver.ts index bfaf0b9ade8ac..e2e2a48d8a5db 100644 --- a/packages/@aws-cdk/aws-appsync/lib/resolver.ts +++ b/packages/@aws-cdk/aws-appsync/lib/resolver.ts @@ -111,10 +111,7 @@ export class Resolver extends Construct { pipelineConfig: pipelineConfig, requestMappingTemplate: props.requestMappingTemplate ? props.requestMappingTemplate.renderTemplate() : undefined, responseMappingTemplate: props.responseMappingTemplate ? props.responseMappingTemplate.renderTemplate() : undefined, - cachingConfig: { - cachingKeys: props.cachingConfig?.cachingKeys, - ttl: props.cachingConfig?.ttl?.toSeconds(), - }, + cachingConfig: this.createCachingConfig(props.cachingConfig), }); props.api.addSchemaDependency(this.resolver); if (props.dataSource) { @@ -122,4 +119,12 @@ export class Resolver extends Construct { } this.arn = this.resolver.attrResolverArn; } + + private createCachingConfig(config?: CachingConfig) { + return config ? { + cachingKeys: config.cachingKeys, + ttl: config.ttl?.toSeconds(), + } : undefined; + } + } diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index f52266edddf29..6a1694d946c1a 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cognito": "0.0.0", diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts index 716dfb9d1bba6..5b555bac527f3 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { Template } from '@aws-cdk/assertions'; +import { Match, Template } from '@aws-cdk/assertions'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; import { Duration } from '@aws-cdk/core'; @@ -29,6 +29,23 @@ describe('Lambda caching config', () => { }); }); + test('Lambda resolver can be created without caching config', () => { + // WHEN + const lambdaDS = api.addLambdaDataSource('LambdaDS', func); + + lambdaDS.createResolver({ + typeName: 'Query', + fieldName: 'allPosts', + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::AppSync::Resolver', { + TypeName: 'Query', + FieldName: 'allPosts', + CachingConfig: Match.absent(), + }); + }); + test('Lambda resolver contains caching config with caching key and TTL', () => { // WHEN const lambdaDS = api.addLambdaDataSource('LambdaDS', func); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json index 844eca96cfb86..e4b54f04116fc 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json @@ -143,7 +143,6 @@ }, "FieldName": "getTests", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "ds", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", @@ -161,7 +160,6 @@ }, "FieldName": "addTest", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "ds", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", @@ -225,7 +223,6 @@ }, "FieldName": "version", "TypeName": "test", - "CachingConfig": {}, "Kind": "PIPELINE", "PipelineConfig": { "Functions": [ diff --git a/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.expected.json index 157cde0ccdced..f4bd20a97d90e 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.expected.json @@ -114,7 +114,6 @@ }, "FieldName": "getPost", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "LambdaDS", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"Invoke\", \"payload\": { \"field\": \"getPost\", \"arguments\": $utils.toJson($context.arguments)}}", @@ -136,7 +135,6 @@ }, "FieldName": "allPosts", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "LambdaDS", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"Invoke\", \"payload\": { \"field\": \"allPosts\"}}", @@ -158,7 +156,6 @@ }, "FieldName": "addPost", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "LambdaDS", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"Invoke\", \"payload\": { \"field\": \"addPost\", \"arguments\": $utils.toJson($context.arguments)}}", @@ -180,7 +177,6 @@ }, "FieldName": "relatedPosts", "TypeName": "Post", - "CachingConfig": {}, "DataSourceName": "LambdaDS", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"BatchInvoke\", \"payload\": { \"field\": \"relatedPosts\", \"source\": $utils.toJson($context.source)}}", diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json index 68ec8c15d8ad3..ed0307de0e72f 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json @@ -132,7 +132,6 @@ }, "FieldName": "getTests", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "testDataSource", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", @@ -154,7 +153,6 @@ }, "FieldName": "addTest", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "testDataSource", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.expected.json index c0a78de80a219..22e64957700e9 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.expected.json @@ -196,7 +196,6 @@ }, "FieldName": "getTests", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "ds", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50}}}", diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json index 268ca24ae7d13..374a89dc33d14 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json @@ -163,7 +163,6 @@ }, "FieldName": "getTest", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "testDataSource", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", @@ -185,7 +184,6 @@ }, "FieldName": "getTests", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "testDataSource", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", @@ -207,7 +205,6 @@ }, "FieldName": "addTest", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "testDataSource", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json index 9cccc3b45ef44..a6e5ff5764331 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json @@ -131,7 +131,6 @@ }, "FieldName": "getPlanets", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "planets", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", @@ -153,7 +152,6 @@ }, "FieldName": "addPlanet", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "planets", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $context.arguments)\n $util.qr($input.put(\"name\", $context.arguments.name))\n$util.qr($input.put(\"diameter\", $context.arguments.diameter))\n$util.qr($input.put(\"rotationPeriod\", $context.arguments.rotationPeriod))\n$util.qr($input.put(\"orbitalPeriod\", $context.arguments.orbitalPeriod))\n$util.qr($input.put(\"gravityPeriod\", $context.arguments.gravity))\n$util.qr($input.put(\"population\", $context.arguments.population))\n$util.qr($input.put(\"climates\", $context.arguments.climates))\n$util.qr($input.put(\"terrains\", $context.arguments.terrains))\n$util.qr($input.put(\"surfaceWater\", $context.arguments.surfaceWater))\n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json index a6acba469e336..e14c0af7a5450 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json @@ -103,7 +103,6 @@ }, "FieldName": "getServiceVersion", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "None", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\":\"2017-02-28\"}", @@ -212,7 +211,6 @@ }, "FieldName": "getCustomers", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Customer", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", @@ -234,7 +232,6 @@ }, "FieldName": "getCustomer", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Customer", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", @@ -256,7 +253,6 @@ }, "FieldName": "addCustomer", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "Customer", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", @@ -278,7 +274,6 @@ }, "FieldName": "saveCustomer", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "Customer", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($ctx.args.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", @@ -300,7 +295,6 @@ }, "FieldName": "saveCustomerWithFirstOrder", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "Customer", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $ctx.args.order)\n $util.qr($input.put(\"referral\", referral))\n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"order\" : $util.dynamodb.toDynamoDBJson($util.autoId()),\"customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", @@ -322,7 +316,6 @@ }, "FieldName": "removeCustomer", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "Customer", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"DeleteItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", @@ -442,10 +435,9 @@ }, "FieldName": "getCustomerOrdersEq", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -464,10 +456,9 @@ }, "FieldName": "getOrderCustomersEq", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -486,10 +477,9 @@ }, "FieldName": "getCustomerOrdersLt", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -508,10 +498,9 @@ }, "FieldName": "getOrderCustomersLt", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -530,10 +519,9 @@ }, "FieldName": "getCustomerOrdersLe", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -552,10 +540,9 @@ }, "FieldName": "getOrderCustomersLe", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -574,10 +561,9 @@ }, "FieldName": "getCustomerOrdersGt", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -596,10 +582,9 @@ }, "FieldName": "getOrderCustomersGt", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -618,10 +603,9 @@ }, "FieldName": "getCustomerOrdersGe", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -640,10 +624,9 @@ }, "FieldName": "getOrderCustomersGe", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -662,10 +645,9 @@ }, "FieldName": "getCustomerOrdersFilter", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -684,10 +666,9 @@ }, "FieldName": "getCustomerOrdersBetween", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -706,10 +687,9 @@ }, "FieldName": "getOrderCustomersFilter", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -728,10 +708,9 @@ }, "FieldName": "getOrderCustomersBetween", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -849,7 +828,6 @@ }, "FieldName": "getPayment", "TypeName": "Query", - "CachingConfig": {}, "DataSourceName": "Payment", "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", @@ -871,7 +849,6 @@ }, "FieldName": "savePayment", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "Payment", "Kind": "UNIT", "RequestMappingTemplate": "\n #set($input = $ctx.args.payment)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", @@ -932,7 +909,6 @@ }, "FieldName": "doPostOnAws", "TypeName": "Mutation", - "CachingConfig": {}, "DataSourceName": "http", "Kind": "UNIT", "RequestMappingTemplate": "{\n \"version\": \"2018-05-29\",\n \"method\": \"POST\",\n # if full path is https://api.xxxxxxxxx.com/posts then resourcePath would be /posts\n \"resourcePath\": \"/path/123\",\n \"params\":{\n \"body\": $util.toJson($ctx.args),\n \"headers\":{\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"$ctx.request.headers.Authorization\"\n }\n }\n }", diff --git a/packages/@aws-cdk/aws-athena/package.json b/packages/@aws-cdk/aws-athena/package.json index 097438d6ab122..cb0752a536951 100644 --- a/packages/@aws-cdk/aws-athena/package.json +++ b/packages/@aws-cdk/aws-athena/package.json @@ -79,7 +79,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index ba71be1248cde..7f33982f2f8d5 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -70,8 +70,8 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "fast-check": "^2.19.0", - "jest": "^27.3.1" + "fast-check": "^2.20.0", + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/common.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/common.ts new file mode 100644 index 0000000000000..e16530d6231ff --- /dev/null +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/common.ts @@ -0,0 +1,17 @@ +// eslint-disable-next-line import/order +import * as iam from '@aws-cdk/aws-iam'; + +// keep this import separate from other imports to reduce chance for merge conflicts with v2-main +// eslint-disable-next-line no-duplicate-imports, import/order +import * as constructs from 'constructs'; + +export function createRole(scope: constructs.Construct, _role?: iam.IRole) { + let role = _role; + if (!role) { + role = new iam.Role(scope, 'Role', { + assumedBy: new iam.ServicePrincipal('autoscaling.amazonaws.com'), + }); + } + + return role; +} diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/index.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/index.ts index 4b48b2ab6d1b7..53591e6610bd8 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/index.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/index.ts @@ -1,3 +1,4 @@ +export * from './common'; export * from './queue-hook'; export * from './topic-hook'; export * from './lambda-hook'; diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts index f48e02e8ec93e..766b4d0149a8a 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts @@ -3,6 +3,8 @@ import * as kms from '@aws-cdk/aws-kms'; import * as lambda from '@aws-cdk/aws-lambda'; import * as sns from '@aws-cdk/aws-sns'; import * as subs from '@aws-cdk/aws-sns-subscriptions'; + +import { createRole } from './common'; import { TopicHook } from './topic-hook'; // keep this import separate from other imports to reduce chance for merge conflicts with v2-main @@ -22,16 +24,23 @@ export class FunctionHook implements autoscaling.ILifecycleHookTarget { constructor(private readonly fn: lambda.IFunction, private readonly encryptionKey?: kms.IKey) { } - public bind(scope: Construct, lifecycleHook: autoscaling.ILifecycleHook): autoscaling.LifecycleHookTargetConfig { - const topic = new sns.Topic(scope, 'Topic', { + /** + * If the `IRole` does not exist in `options`, will create an `IRole` and an SNS Topic and attach both to the lifecycle hook. + * If the `IRole` does exist in `options`, will only create an SNS Topic and attach it to the lifecycle hook. + */ + public bind(_scope: Construct, options: autoscaling.BindHookTargetOptions): autoscaling.LifecycleHookTargetConfig { + const topic = new sns.Topic(_scope, 'Topic', { masterKey: this.encryptionKey, }); + + const role = createRole(_scope, options.role); + // Per: https://docs.aws.amazon.com/sns/latest/dg/sns-key-management.html#sns-what-permissions-for-sse // Topic's grantPublish() is in a base class that does not know there is a kms key, and so does not // grant appropriate permissions to the kms key. We do that here to ensure the correct permissions // are in place. - this.encryptionKey?.grant(lifecycleHook.role, 'kms:Decrypt', 'kms:GenerateDataKey'); + this.encryptionKey?.grant(role, 'kms:Decrypt', 'kms:GenerateDataKey'); topic.addSubscription(new subs.LambdaSubscription(this.fn)); - return new TopicHook(topic).bind(scope, lifecycleHook); + return new TopicHook(topic).bind(_scope, { lifecycleHook: options.lifecycleHook, role }); } } diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts index a8d97df650b3a..621c5d3be49af 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts @@ -1,5 +1,9 @@ import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as sqs from '@aws-cdk/aws-sqs'; +import { createRole } from './common'; + +// keep this import separate from other imports to reduce chance for merge conflicts with v2-main +// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** @@ -9,8 +13,19 @@ export class QueueHook implements autoscaling.ILifecycleHookTarget { constructor(private readonly queue: sqs.IQueue) { } - public bind(_scope: Construct, lifecycleHook: autoscaling.ILifecycleHook): autoscaling.LifecycleHookTargetConfig { - this.queue.grantSendMessages(lifecycleHook.role); - return { notificationTargetArn: this.queue.queueArn }; + /** + * If an `IRole` is found in `options`, grant it access to send messages. + * Otherwise, create a new `IRole` and grant it access to send messages. + * + * @returns the `IRole` with access to send messages and the ARN of the queue it has access to send messages to. + */ + public bind(_scope: Construct, options: autoscaling.BindHookTargetOptions): autoscaling.LifecycleHookTargetConfig { + const role = createRole(_scope, options.role); + this.queue.grantSendMessages(role); + + return { + notificationTargetArn: this.queue.queueArn, + createdRole: role, + }; } } diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts index 5c6571fa90dfa..168b88bba61c7 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts @@ -1,5 +1,9 @@ import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as sns from '@aws-cdk/aws-sns'; +import { createRole } from './common'; + +// keep this import separate from other imports to reduce chance for merge conflicts with v2-main +// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** @@ -9,8 +13,19 @@ export class TopicHook implements autoscaling.ILifecycleHookTarget { constructor(private readonly topic: sns.ITopic) { } - public bind(_scope: Construct, lifecycleHook: autoscaling.ILifecycleHook): autoscaling.LifecycleHookTargetConfig { - this.topic.grantPublish(lifecycleHook.role); - return { notificationTargetArn: this.topic.topicArn }; + /** + * If an `IRole` is found in `options`, grant it topic publishing permissions. + * Otherwise, create a new `IRole` and grant it topic publishing permissions. + * + * @returns the `IRole` with topic publishing permissions and the ARN of the topic it has publishing permission to. + */ + public bind(_scope: Construct, options: autoscaling.BindHookTargetOptions): autoscaling.LifecycleHookTargetConfig { + const role = createRole(_scope, options.role); + this.topic.grantPublish(role); + + return { + notificationTargetArn: this.topic.topicArn, + createdRole: role, + }; } } diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index 010daca3f8887..46c93d3d170ce 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -72,7 +72,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-autoscaling": "0.0.0", diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts index d984693280351..4615c45913b44 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts @@ -2,6 +2,7 @@ import '@aws-cdk/assert-internal/jest'; import { arrayWith } from '@aws-cdk/assert-internal'; import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as ec2 from '@aws-cdk/aws-ec2'; +import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as lambda from '@aws-cdk/aws-lambda'; import * as sns from '@aws-cdk/aws-sns'; @@ -10,7 +11,7 @@ import { Stack } from '@aws-cdk/core'; import * as hooks from '../lib'; -describe('given an AutoScalingGroup', () => { +describe('given an AutoScalingGroup and no role', () => { let stack: Stack; let asg: autoscaling.AutoScalingGroup; @@ -25,7 +26,24 @@ describe('given an AutoScalingGroup', () => { }); }); - test('can use queue as hook target', () => { + afterEach(() => { + expect(stack).toHaveResource('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Version: '2012-10-17', + Statement: [ + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { + Service: 'autoscaling.amazonaws.com', + }, + }, + ], + }, + }); + }); + + test('can use queue as hook target without providing a role', () => { // GIVEN const queue = new sqs.Queue(stack, 'Queue'); @@ -37,9 +55,36 @@ describe('given an AutoScalingGroup', () => { // THEN expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { NotificationTargetARN: { 'Fn::GetAtt': ['Queue4A7E3555', 'Arn'] } }); + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: [ + 'sqs:SendMessage', + 'sqs:GetQueueAttributes', + 'sqs:GetQueueUrl', + ], + Effect: 'Allow', + Resource: { + 'Fn::GetAtt': [ + 'Queue4A7E3555', + 'Arn', + ], + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'ASGLifecycleHookTransRoleDefaultPolicy43D7C82A', + Roles: [ + { + Ref: 'ASGLifecycleHookTransRole71E0A219', + }, + ], + }); }); - test('can use topic as hook target', () => { + test('can use topic as hook target without providing a role', () => { // GIVEN const topic = new sns.Topic(stack, 'Topic'); @@ -50,12 +95,30 @@ describe('given an AutoScalingGroup', () => { }); // THEN - expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { - NotificationTargetARN: { Ref: 'TopicBFC7AF6E' }, + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { NotificationTargetARN: { Ref: 'TopicBFC7AF6E' } }); + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'sns:Publish', + Effect: 'Allow', + Resource: { + Ref: 'TopicBFC7AF6E', + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'ASGLifecycleHookTransRoleDefaultPolicy43D7C82A', + Roles: [ + { + Ref: 'ASGLifecycleHookTransRole71E0A219', + }, + ], }); }); - test('can use Lambda function as hook target', () => { + test('can use Lambda function as hook target without providing a role', () => { // GIVEN const fn = new lambda.Function(stack, 'Fn', { code: lambda.Code.fromInline('foo'), @@ -70,14 +133,32 @@ describe('given an AutoScalingGroup', () => { }); // THEN - expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { - NotificationTargetARN: { Ref: 'ASGLifecycleHookTransTopic9B0D4842' }, - }); + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { NotificationTargetARN: { Ref: 'ASGLifecycleHookTransTopic9B0D4842' } }); expect(stack).toHaveResource('AWS::SNS::Subscription', { Protocol: 'lambda', TopicArn: { Ref: 'ASGLifecycleHookTransTopic9B0D4842' }, Endpoint: { 'Fn::GetAtt': ['Fn9270CBC0', 'Arn'] }, }); + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'sns:Publish', + Effect: 'Allow', + Resource: { + Ref: 'ASGLifecycleHookTransTopic9B0D4842', + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'ASGLifecycleHookTransRoleDefaultPolicy43D7C82A', + Roles: [ + { + Ref: 'ASGLifecycleHookTransRole71E0A219', + }, + ], + }); }); test('can use Lambda function as hook target with encrypted SNS', () => { @@ -124,5 +205,139 @@ describe('given an AutoScalingGroup', () => { }, }); }); +}); + +describe('given an AutoScalingGroup and a role', () => { + let stack: Stack; + let asg: autoscaling.AutoScalingGroup; + + beforeEach(() => { + stack = new Stack(); + + const vpc = new ec2.Vpc(stack, 'VPC'); + asg = new autoscaling.AutoScalingGroup(stack, 'ASG', { + vpc, + instanceType: new ec2.InstanceType('t2.micro'), + machineImage: new ec2.AmazonLinuxImage(), + }); + }); + + afterEach(() => { + expect(stack).toHaveResource('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Version: '2012-10-17', + Statement: [ + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { + Service: 'custom.role.domain.com', + }, + }, + ], + }, + }); + }); + test('can use queue as hook target with a role', () => { + // GIVEN + const queue = new sqs.Queue(stack, 'Queue'); + const myrole = new iam.Role(stack, 'MyRole', { + assumedBy: new iam.ServicePrincipal('custom.role.domain.com'), + }); + // WHEN + asg.addLifecycleHook('Trans', { + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING, + notificationTarget: new hooks.QueueHook(queue), + role: myrole, + }); + + // THEN + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { NotificationTargetARN: { 'Fn::GetAtt': ['Queue4A7E3555', 'Arn'] } }); + }); + + test('can use topic as hook target with a role', () => { + // GIVEN + const topic = new sns.Topic(stack, 'Topic'); + const myrole = new iam.Role(stack, 'MyRole', { + assumedBy: new iam.ServicePrincipal('custom.role.domain.com'), + }); + + // WHEN + asg.addLifecycleHook('Trans', { + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING, + notificationTarget: new hooks.TopicHook(topic), + role: myrole, + }); + + // THEN + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { NotificationTargetARN: { Ref: 'TopicBFC7AF6E' } }); + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'sns:Publish', + Effect: 'Allow', + Resource: { + Ref: 'TopicBFC7AF6E', + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'MyRoleDefaultPolicyA36BE1DD', + Roles: [ + { + Ref: 'MyRoleF48FFE04', + }, + ], + }); + }); + + test('can use Lambda function as hook target with a role', () => { + // GIVEN + const fn = new lambda.Function(stack, 'Fn', { + code: lambda.Code.fromInline('foo'), + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.index', + }); + const myrole = new iam.Role(stack, 'MyRole', { + assumedBy: new iam.ServicePrincipal('custom.role.domain.com'), + }); + + // WHEN + asg.addLifecycleHook('Trans', { + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING, + notificationTarget: new hooks.FunctionHook(fn), + role: myrole, + }); + + // THEN + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { NotificationTargetARN: { Ref: 'ASGLifecycleHookTransTopic9B0D4842' } }); + expect(stack).toHaveResource('AWS::SNS::Subscription', { + Protocol: 'lambda', + TopicArn: { Ref: 'ASGLifecycleHookTransTopic9B0D4842' }, + Endpoint: { 'Fn::GetAtt': ['Fn9270CBC0', 'Arn'] }, + }); + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'sns:Publish', + Effect: 'Allow', + Resource: { + Ref: 'ASGLifecycleHookTransTopic9B0D4842', + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'MyRoleDefaultPolicyA36BE1DD', + Roles: [ + { + Ref: 'MyRoleF48FFE04', + }, + ], + }); + }); }); diff --git a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts index a599f38c05c90..4004b5de39f67 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts @@ -1,25 +1,50 @@ -import { ILifecycleHook } from './lifecycle-hook'; +// eslint-disable-next-line import/order +import { LifecycleHook } from './lifecycle-hook'; +import * as iam from '@aws-cdk/aws-iam'; // keep this import separate from other imports to reduce chance for merge conflicts with v2-main // eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; +import * as constructs from 'constructs'; /** - * Interface for autoscaling lifecycle hook targets + * Options needed to bind a target to a lifecycle hook. + * [disable-awslint:ref-via-interface] The lifecycle hook to attach to and an IRole to use */ -export interface ILifecycleHookTarget { +export interface BindHookTargetOptions { /** - * Called when this object is used as the target of a lifecycle hook + * The lifecycle hook to attach to. + * [disable-awslint:ref-via-interface] + */ + readonly lifecycleHook: LifecycleHook; + /** + * The role to use when attaching to the lifecycle hook. + * [disable-awslint:ref-via-interface] + * @default: a role is not created unless the target arn is specified */ - bind(scope: Construct, lifecycleHook: ILifecycleHook): LifecycleHookTargetConfig; + readonly role?: iam.IRole; } /** - * Properties to add the target to a lifecycle hook + * Result of binding a lifecycle hook to a target. */ export interface LifecycleHookTargetConfig { /** - * The ARN to use as the notification target + * The IRole that was used to bind the lifecycle hook to the target + */ + readonly createdRole: iam.IRole; + /** + * The targetArn that the lifecycle hook was bound to */ readonly notificationTargetArn: string; } + +/** + * Interface for autoscaling lifecycle hook targets + */ +export interface ILifecycleHookTarget { + /** + * Called when this object is used as the target of a lifecycle hook + * @param options [disable-awslint:ref-via-interface] The lifecycle hook to attach to and a role to use + */ + bind(scope: constructs.Construct, options: BindHookTargetOptions): LifecycleHookTargetConfig; +} diff --git a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts index 4e4e8408ad326..cdcd9870ab37d 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts @@ -46,13 +46,15 @@ export interface BasicLifecycleHookProps { /** * The target of the lifecycle hook + * + * @default - No target. */ - readonly notificationTarget: ILifecycleHookTarget; + readonly notificationTarget?: ILifecycleHookTarget; /** * The role that allows publishing to the notification target * - * @default - A role is automatically created. + * @default - A role will be created if a target is provided. Otherwise, no role is created. */ readonly role?: iam.IRole; } @@ -73,6 +75,9 @@ export interface LifecycleHookProps extends BasicLifecycleHookProps { export interface ILifecycleHook extends IResource { /** * The role for the lifecycle hook to execute + * + * @default - A default role is created if 'notificationTarget' is specified. + * Otherwise, no role is created. */ readonly role: iam.IRole; } @@ -81,10 +86,21 @@ export interface ILifecycleHook extends IResource { * Define a life cycle hook */ export class LifecycleHook extends Resource implements ILifecycleHook { + private _role?: iam.IRole; + /** * The role that allows the ASG to publish to the notification target + * + * @default - A default role is created if 'notificationTarget' is specified. + * Otherwise, no role is created. */ - public readonly role: iam.IRole; + public get role() { + if (!this._role) { + throw new Error('\'role\' is undefined. Please specify a \'role\' or specify a \'notificationTarget\' to have a role provided for you.'); + } + + return this._role; + } /** * The name of this lifecycle hook @@ -97,11 +113,20 @@ export class LifecycleHook extends Resource implements ILifecycleHook { physicalName: props.lifecycleHookName, }); - this.role = props.role || new iam.Role(this, 'Role', { - assumedBy: new iam.ServicePrincipal('autoscaling.amazonaws.com'), - }); + const targetProps = props.notificationTarget ? props.notificationTarget.bind(this, { lifecycleHook: this, role: props.role }) : undefined; + + if (props.role) { + this._role = props.role; + + if (!props.notificationTarget) { + throw new Error("'notificationTarget' parameter required when 'role' parameter is specified"); + } + } else { + this._role = targetProps ? targetProps.createdRole : undefined; + } - const targetProps = props.notificationTarget.bind(this, this); + const l1NotificationTargetArn = targetProps ? targetProps.notificationTargetArn : undefined; + const l1RoleArn = this._role ? this.role.roleArn : undefined; const resource = new CfnLifecycleHook(this, 'Resource', { autoScalingGroupName: props.autoScalingGroup.autoScalingGroupName, @@ -110,14 +135,16 @@ export class LifecycleHook extends Resource implements ILifecycleHook { lifecycleHookName: this.physicalName, lifecycleTransition: props.lifecycleTransition, notificationMetadata: props.notificationMetadata, - notificationTargetArn: targetProps.notificationTargetArn, - roleArn: this.role.roleArn, + notificationTargetArn: l1NotificationTargetArn, + roleArn: l1RoleArn, }); // A LifecycleHook resource is going to do a permissions test upon creation, // so we have to make sure the role has full permissions before creating the // lifecycle hook. - resource.node.addDependency(this.role); + if (this._role) { + resource.node.addDependency(this.role); + } this.lifecycleHookName = resource.ref; } diff --git a/packages/@aws-cdk/aws-autoscaling/package.json b/packages/@aws-cdk/aws-autoscaling/package.json index 065e5abf21028..9f1f7e3a12477 100644 --- a/packages/@aws-cdk/aws-autoscaling/package.json +++ b/packages/@aws-cdk/aws-autoscaling/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-autoscaling-common": "0.0.0", diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.expected.json index af9c16803e320..f8514c807ed91 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.expected.json +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.expected.json @@ -95,15 +95,15 @@ "VPCPublicSubnet1NATGatewayE0556630": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet1EIP6AD938E8", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, "Tags": [ { "Key": "Name", @@ -192,15 +192,15 @@ "VPCPublicSubnet2NATGateway3C070193": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet2EIP4947BC00", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, "Tags": [ { "Key": "Name", diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.expected.json index 5882016a8f8b2..185201fe1f69e 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.expected.json +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.expected.json @@ -95,15 +95,15 @@ "VPCPublicSubnet1NATGatewayE0556630": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet1EIP6AD938E8", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, "Tags": [ { "Key": "Name", @@ -192,15 +192,15 @@ "VPCPublicSubnet2NATGateway3C070193": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet2EIP4947BC00", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, "Tags": [ { "Key": "Name", @@ -289,15 +289,15 @@ "VPCPublicSubnet3NATGatewayD3048F5C": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet3EIPAD4BC883", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, "Tags": [ { "Key": "Name", diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.expected.json index 21457d1ea78e6..304e554bf120d 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.expected.json +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.expected.json @@ -95,15 +95,15 @@ "VPCPublicSubnet1NATGatewayE0556630": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet1EIP6AD938E8", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, "Tags": [ { "Key": "Name", @@ -192,15 +192,15 @@ "VPCPublicSubnet2NATGateway3C070193": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet2EIP4947BC00", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, "Tags": [ { "Key": "Name", diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.external-role.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.external-role.expected.json index 49196dcc8ba93..9a01de34d1d55 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.external-role.expected.json +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.external-role.expected.json @@ -95,15 +95,15 @@ "VPCPublicSubnet1NATGatewayE0556630": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet1EIP6AD938E8", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, "Tags": [ { "Key": "Name", @@ -192,15 +192,15 @@ "VPCPublicSubnet2NATGateway3C070193": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet2EIP4947BC00", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, "Tags": [ { "Key": "Name", @@ -289,15 +289,15 @@ "VPCPublicSubnet3NATGatewayD3048F5C": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet3EIPAD4BC883", "AllocationId" ] }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, "Tags": [ { "Key": "Name", diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.expected.json new file mode 100644 index 0000000000000..54ccaf7b2e51a --- /dev/null +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.expected.json @@ -0,0 +1,788 @@ +{ + "Resources": { + "myVpcAuto1A4B61E2": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto" + } + ] + } + }, + "myVpcAutoPublicSubnet1Subnet3516098F": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" + } + ] + } + }, + "myVpcAutoPublicSubnet1RouteTable3D618310": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" + } + ] + } + }, + "myVpcAutoPublicSubnet1RouteTableAssociationB3A6EFAC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPublicSubnet1RouteTable3D618310" + }, + "SubnetId": { + "Ref": "myVpcAutoPublicSubnet1Subnet3516098F" + } + } + }, + "myVpcAutoPublicSubnet1DefaultRoute2791173D": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPublicSubnet1RouteTable3D618310" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "myVpcAutoIGW08055396" + } + }, + "DependsOn": [ + "myVpcAutoVPCGWEC42CD12" + ] + }, + "myVpcAutoPublicSubnet1EIP15D99CAF": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" + } + ] + } + }, + "myVpcAutoPublicSubnet1NATGatewayF3EA78A2": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "myVpcAutoPublicSubnet1Subnet3516098F" + }, + "AllocationId": { + "Fn::GetAtt": [ + "myVpcAutoPublicSubnet1EIP15D99CAF", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" + } + ] + } + }, + "myVpcAutoPublicSubnet2Subnet297C7839": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" + } + ] + } + }, + "myVpcAutoPublicSubnet2RouteTable17ECF2AC": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" + } + ] + } + }, + "myVpcAutoPublicSubnet2RouteTableAssociationE21B7B6C": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPublicSubnet2RouteTable17ECF2AC" + }, + "SubnetId": { + "Ref": "myVpcAutoPublicSubnet2Subnet297C7839" + } + } + }, + "myVpcAutoPublicSubnet2DefaultRouteE9454F16": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPublicSubnet2RouteTable17ECF2AC" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "myVpcAutoIGW08055396" + } + }, + "DependsOn": [ + "myVpcAutoVPCGWEC42CD12" + ] + }, + "myVpcAutoPublicSubnet2EIPA484FACE": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" + } + ] + } + }, + "myVpcAutoPublicSubnet2NATGatewayF670624F": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "myVpcAutoPublicSubnet2Subnet297C7839" + }, + "AllocationId": { + "Fn::GetAtt": [ + "myVpcAutoPublicSubnet2EIPA484FACE", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" + } + ] + } + }, + "myVpcAutoPublicSubnet3SubnetF68815E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" + } + ] + } + }, + "myVpcAutoPublicSubnet3RouteTableD3E0A17D": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" + } + ] + } + }, + "myVpcAutoPublicSubnet3RouteTableAssociationD4E51D66": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPublicSubnet3RouteTableD3E0A17D" + }, + "SubnetId": { + "Ref": "myVpcAutoPublicSubnet3SubnetF68815E0" + } + } + }, + "myVpcAutoPublicSubnet3DefaultRouteE6596C40": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPublicSubnet3RouteTableD3E0A17D" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "myVpcAutoIGW08055396" + } + }, + "DependsOn": [ + "myVpcAutoVPCGWEC42CD12" + ] + }, + "myVpcAutoPublicSubnet3EIP8D506EFA": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" + } + ] + } + }, + "myVpcAutoPublicSubnet3NATGatewayC06521CD": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "myVpcAutoPublicSubnet3SubnetF68815E0" + }, + "AllocationId": { + "Fn::GetAtt": [ + "myVpcAutoPublicSubnet3EIP8D506EFA", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" + } + ] + } + }, + "myVpcAutoPrivateSubnet1SubnetCF0D49B2": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet1" + } + ] + } + }, + "myVpcAutoPrivateSubnet1RouteTableDC61148B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet1" + } + ] + } + }, + "myVpcAutoPrivateSubnet1RouteTableAssociation9848EFFB": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPrivateSubnet1RouteTableDC61148B" + }, + "SubnetId": { + "Ref": "myVpcAutoPrivateSubnet1SubnetCF0D49B2" + } + } + }, + "myVpcAutoPrivateSubnet1DefaultRouteF007F5E7": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPrivateSubnet1RouteTableDC61148B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "myVpcAutoPublicSubnet1NATGatewayF3EA78A2" + } + } + }, + "myVpcAutoPrivateSubnet2Subnet592674AC": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet2" + } + ] + } + }, + "myVpcAutoPrivateSubnet2RouteTableE10F6006": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet2" + } + ] + } + }, + "myVpcAutoPrivateSubnet2RouteTableAssociation05CC4CEB": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPrivateSubnet2RouteTableE10F6006" + }, + "SubnetId": { + "Ref": "myVpcAutoPrivateSubnet2Subnet592674AC" + } + } + }, + "myVpcAutoPrivateSubnet2DefaultRouteDA295DF0": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPrivateSubnet2RouteTableE10F6006" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "myVpcAutoPublicSubnet2NATGatewayF670624F" + } + } + }, + "myVpcAutoPrivateSubnet3Subnet4C2A5EDE": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet3" + } + ] + } + }, + "myVpcAutoPrivateSubnet3RouteTable22C6C602": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet3" + } + ] + } + }, + "myVpcAutoPrivateSubnet3RouteTableAssociation3A3751AE": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPrivateSubnet3RouteTable22C6C602" + }, + "SubnetId": { + "Ref": "myVpcAutoPrivateSubnet3Subnet4C2A5EDE" + } + } + }, + "myVpcAutoPrivateSubnet3DefaultRouteAE484D6A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "myVpcAutoPrivateSubnet3RouteTable22C6C602" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "myVpcAutoPublicSubnet3NATGatewayC06521CD" + } + } + }, + "myVpcAutoIGW08055396": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/myVpcAuto" + } + ] + } + }, + "myVpcAutoVPCGWEC42CD12": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + }, + "InternetGatewayId": { + "Ref": "myVpcAutoIGW08055396" + } + } + }, + "MyRoleF48FFE04": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "autoscaling.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "MyRoleDefaultPolicyA36BE1DD": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "sns:Publish", + "Effect": "Allow", + "Resource": { + "Ref": "topic2A4FB547F" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyRoleDefaultPolicyA36BE1DD", + "Roles": [ + { + "Ref": "MyRoleF48FFE04" + } + ] + } + }, + "topic69831491": { + "Type": "AWS::SNS::Topic" + }, + "topic2A4FB547F": { + "Type": "AWS::SNS::Topic" + }, + "ASGInstanceSecurityGroup0525485D": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "integ-role-target-hook/ASG/InstanceSecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/ASG" + } + ], + "VpcId": { + "Ref": "myVpcAuto1A4B61E2" + } + } + }, + "ASGInstanceRoleE263A41B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "ec2.", + { + "Ref": "AWS::URLSuffix" + } + ] + ] + } + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-role-target-hook/ASG" + } + ] + } + }, + "ASGInstanceProfile0A2834D7": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Roles": [ + { + "Ref": "ASGInstanceRoleE263A41B" + } + ] + } + }, + "ASGLaunchConfigC00AF12B": { + "Type": "AWS::AutoScaling::LaunchConfiguration", + "Properties": { + "ImageId": { + "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "InstanceType": "t2.micro", + "IamInstanceProfile": { + "Ref": "ASGInstanceProfile0A2834D7" + }, + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "ASGInstanceSecurityGroup0525485D", + "GroupId" + ] + } + ], + "UserData": { + "Fn::Base64": "#!/bin/bash" + } + }, + "DependsOn": [ + "ASGInstanceRoleE263A41B" + ] + }, + "ASG46ED3070": { + "Type": "AWS::AutoScaling::AutoScalingGroup", + "Properties": { + "MaxSize": "1", + "MinSize": "1", + "HealthCheckType": "EC2", + "LaunchConfigurationName": { + "Ref": "ASGLaunchConfigC00AF12B" + }, + "Tags": [ + { + "Key": "Name", + "PropagateAtLaunch": true, + "Value": "integ-role-target-hook/ASG" + } + ], + "VPCZoneIdentifier": [ + { + "Ref": "myVpcAutoPrivateSubnet1SubnetCF0D49B2" + }, + { + "Ref": "myVpcAutoPrivateSubnet2Subnet592674AC" + }, + { + "Ref": "myVpcAutoPrivateSubnet3Subnet4C2A5EDE" + } + ] + }, + "UpdatePolicy": { + "AutoScalingScheduledAction": { + "IgnoreUnmodifiedGroupSizeProperties": true + } + } + }, + "LCHookNoRoleNoTarget1144AD75": { + "Type": "AWS::AutoScaling::LifecycleHook", + "Properties": { + "AutoScalingGroupName": { + "Ref": "ASG46ED3070" + }, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING" + } + }, + "LCHookNoRoleTargetRole35B4344D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "autoscaling.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "LCHookNoRoleTargetRoleDefaultPolicyFE681941": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "sns:Publish", + "Effect": "Allow", + "Resource": { + "Ref": "topic69831491" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "LCHookNoRoleTargetRoleDefaultPolicyFE681941", + "Roles": [ + { + "Ref": "LCHookNoRoleTargetRole35B4344D" + } + ] + } + }, + "LCHookNoRoleTarget4EF682CF": { + "Type": "AWS::AutoScaling::LifecycleHook", + "Properties": { + "AutoScalingGroupName": { + "Ref": "ASG46ED3070" + }, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", + "NotificationTargetARN": { + "Ref": "topic69831491" + }, + "RoleARN": { + "Fn::GetAtt": [ + "LCHookNoRoleTargetRole35B4344D", + "Arn" + ] + } + }, + "DependsOn": [ + "LCHookNoRoleTargetRoleDefaultPolicyFE681941", + "LCHookNoRoleTargetRole35B4344D" + ] + }, + "LCHookRoleTarget0ADB20B8": { + "Type": "AWS::AutoScaling::LifecycleHook", + "Properties": { + "AutoScalingGroupName": { + "Ref": "ASG46ED3070" + }, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", + "NotificationTargetARN": { + "Ref": "topic2A4FB547F" + }, + "RoleARN": { + "Fn::GetAtt": [ + "MyRoleF48FFE04", + "Arn" + ] + } + }, + "DependsOn": [ + "MyRoleDefaultPolicyA36BE1DD", + "MyRoleF48FFE04" + ] + } + }, + "Parameters": { + "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.ts b/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.ts new file mode 100644 index 0000000000000..42fe82d88fb6a --- /dev/null +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.ts @@ -0,0 +1,79 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as iam from '@aws-cdk/aws-iam'; +import * as sns from '@aws-cdk/aws-sns'; +import * as cdk from '@aws-cdk/core'; +import * as constructs from 'constructs'; +import * as autoscaling from '../lib'; + +export class FakeNotificationTarget implements autoscaling.ILifecycleHookTarget { + constructor(private readonly topic: sns.ITopic) { + } + + private createRole(scope: constructs.Construct, _role?: iam.IRole) { + let role = _role; + if (!role) { + role = new iam.Role(scope, 'Role', { + assumedBy: new iam.ServicePrincipal('autoscaling.amazonaws.com'), + }); + } + + return role; + } + + public bind(_scope: constructs.Construct, options: autoscaling.BindHookTargetOptions): autoscaling.LifecycleHookTargetConfig { + const role = this.createRole(options.lifecycleHook, options.role); + this.topic.grantPublish(role); + + return { + notificationTargetArn: this.topic.topicArn, + createdRole: role, + }; + } +} + +export class TestStack extends cdk.Stack { + constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + let vpc = new ec2.Vpc(this, 'myVpcAuto', {}); + const myrole = new iam.Role(this, 'MyRole', { + assumedBy: new iam.ServicePrincipal('autoscaling.amazonaws.com'), + }); + const topic = new sns.Topic(this, 'topic', {}); + const topic2 = new sns.Topic(this, 'topic2', {}); + + const asg = new autoscaling.AutoScalingGroup(this, 'ASG', { + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.MICRO), + machineImage: new ec2.AmazonLinuxImage(), // get the latest Amazon Linux image + healthCheck: autoscaling.HealthCheck.ec2(), + }); + + // no role or notificationTarget + new autoscaling.LifecycleHook(this, 'LCHookNoRoleNoTarget', { + autoScalingGroup: asg, + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_TERMINATING, + }); + + // no role with notificationTarget + new autoscaling.LifecycleHook(this, 'LCHookNoRoleTarget', { + notificationTarget: new FakeNotificationTarget(topic), + autoScalingGroup: asg, + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_TERMINATING, + }); + + // role with target + new autoscaling.LifecycleHook(this, 'LCHookRoleTarget', { + notificationTarget: new FakeNotificationTarget(topic2), + role: myrole, + autoScalingGroup: asg, + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_TERMINATING, + }); + } +} + +const app = new cdk.App(); + +new TestStack(app, 'integ-role-target-hook'); + +app.synth(); diff --git a/packages/@aws-cdk/aws-autoscaling/test/lifecyclehooks.test.ts b/packages/@aws-cdk/aws-autoscaling/test/lifecyclehooks.test.ts index 7ebf6d18cbe6e..a1f3717f91042 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/lifecyclehooks.test.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/lifecyclehooks.test.ts @@ -1,5 +1,5 @@ import '@aws-cdk/assert-internal/jest'; -import { expect, haveResource, ResourcePart } from '@aws-cdk/assert-internal'; +import { ResourcePart } from '@aws-cdk/assert-internal'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; @@ -7,15 +7,10 @@ import * as constructs from 'constructs'; import * as autoscaling from '../lib'; describe('lifecycle hooks', () => { - test('we can add a lifecycle hook to an ASG', () => { + test('we can add a lifecycle hook with no role and with a notifcationTarget to an ASG', () => { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const asg = new autoscaling.AutoScalingGroup(stack, 'ASG', { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.M4, ec2.InstanceSize.MICRO), - machineImage: new ec2.AmazonLinuxImage(), - }); + const asg = newASG(stack); // WHEN asg.addLifecycleHook('Transition', { @@ -25,21 +20,22 @@ describe('lifecycle hooks', () => { }); // THEN - expect(stack).to(haveResource('AWS::AutoScaling::LifecycleHook', { + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { LifecycleTransition: 'autoscaling:EC2_INSTANCE_LAUNCHING', DefaultResult: 'ABANDON', NotificationTargetARN: 'target:arn', - })); + }); // Lifecycle Hook has a dependency on the policy object - expect(stack).to(haveResource('AWS::AutoScaling::LifecycleHook', { + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { DependsOn: [ 'ASGLifecycleHookTransitionRoleDefaultPolicy2E50C7DB', 'ASGLifecycleHookTransitionRole3AAA6BB7', ], - }, ResourcePart.CompleteDefinition)); + }, ResourcePart.CompleteDefinition); - expect(stack).to(haveResource('AWS::IAM::Role', { + // A default role is provided + expect(stack).toHaveResource('AWS::IAM::Role', { AssumeRolePolicyDocument: { Version: '2012-10-17', Statement: [ @@ -52,9 +48,10 @@ describe('lifecycle hooks', () => { }, ], }, - })); + }); - expect(stack).to(haveResource('AWS::IAM::Policy', { + // FakeNotificationTarget.bind() was executed + expect(stack).toHaveResource('AWS::IAM::Policy', { PolicyDocument: { Version: '2012-10-17', Statement: [ @@ -65,18 +62,146 @@ describe('lifecycle hooks', () => { }, ], }, - })); + }); + }); +}); + +test('we can add a lifecycle hook to an ASG with no role and with no notificationTargetArn', ()=> { + // GIVEN + const stack = new cdk.Stack(); + const asg = newASG(stack); + + // WHEN + asg.addLifecycleHook('Transition', { + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING, + defaultResult: autoscaling.DefaultResult.ABANDON, + }); + + // THEN + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { + LifecycleTransition: 'autoscaling:EC2_INSTANCE_LAUNCHING', + DefaultResult: 'ABANDON', + }); + + // A default role is NOT provided + expect(stack).not.toHaveResource('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Version: '2012-10-17', + Statement: [ + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { + Service: 'autoscaling.amazonaws.com', + }, + }, + ], + }, + }); + + // FakeNotificationTarget.bind() was NOT executed + expect(stack).not.toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Version: '2012-10-17', + Statement: [ + { + Action: 'action:Work', + Effect: 'Allow', + Resource: '*', + }, + ], + }, + }); +}); + +test('we can add a lifecycle hook to an ASG with a role and with a notificationTargetArn', () => { + // GIVEN + const stack = new cdk.Stack(); + const asg = newASG(stack); + const myrole = new iam.Role(stack, 'MyRole', { + assumedBy: new iam.ServicePrincipal('custom.role.domain.com'), + }); + + // WHEN + asg.addLifecycleHook('Transition', { + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING, + defaultResult: autoscaling.DefaultResult.ABANDON, + notificationTarget: new FakeNotificationTarget(), + role: myrole, + }); + // THEN + expect(stack).toHaveResource('AWS::AutoScaling::LifecycleHook', { + NotificationTargetARN: 'target:arn', + LifecycleTransition: 'autoscaling:EC2_INSTANCE_LAUNCHING', + DefaultResult: 'ABANDON', + }); + // the provided role (myrole), not the default role, is used + expect(stack).toHaveResource('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Version: '2012-10-17', + Statement: [ + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { + Service: 'custom.role.domain.com', + }, + }, + ], + }, }); }); +test('adding a lifecycle hook with a role and with no notificationTarget to an ASG throws an error', () => { + // GIVEN + const stack = new cdk.Stack(); + const asg = newASG(stack); + const myrole = new iam.Role(stack, 'MyRole', { + assumedBy: new iam.ServicePrincipal('custom.role.domain.com'), + }); + + // WHEN + expect(() => { + asg.addLifecycleHook('Transition', { + lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING, + defaultResult: autoscaling.DefaultResult.ABANDON, + role: myrole, + }); + }).toThrow(/'notificationTarget' parameter required when 'role' parameter is specified/); +}); + class FakeNotificationTarget implements autoscaling.ILifecycleHookTarget { - public bind(_scope: constructs.Construct, lifecycleHook: autoscaling.ILifecycleHook): autoscaling.LifecycleHookTargetConfig { - lifecycleHook.role.addToPrincipalPolicy(new iam.PolicyStatement({ + private createRole(scope: constructs.Construct, _role?: iam.IRole) { + let role = _role; + if (!role) { + role = new iam.Role(scope, 'Role', { + assumedBy: new iam.ServicePrincipal('autoscaling.amazonaws.com'), + }); + } + + return role; + } + + public bind(_scope: constructs.Construct, options: autoscaling.BindHookTargetOptions): autoscaling.LifecycleHookTargetConfig { + const role = this.createRole(options.lifecycleHook, options.role); + + role.addToPrincipalPolicy(new iam.PolicyStatement({ actions: ['action:Work'], resources: ['*'], })); - return { notificationTargetArn: 'target:arn' }; + + return { notificationTargetArn: 'target:arn', createdRole: role }; } } + +function newASG(stack: cdk.Stack) { + const vpc = new ec2.Vpc(stack, 'VPC'); + + return new autoscaling.AutoScalingGroup(stack, 'ASG', { + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.M4, ec2.InstanceSize.MICRO), + machineImage: new ec2.AmazonLinuxImage(), + }); +} diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index 2471fc9fd6edc..181967b3fec65 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json index 287da60856a44..2da7e507b0e73 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json @@ -29,21 +29,21 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/sinon": "^9.0.11", "@aws-cdk/cdk-build-tools": "0.0.0", "aws-sdk": "^2.596.0", - "aws-sdk-mock": "^5.4.0", + "aws-sdk-mock": "^5.5.0", "eslint": "^7.32.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.25.3", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.3.1", "eslint-plugin-standard": "^4.1.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "lambda-tester": "^3.6.0", "sinon": "^9.2.4", "nock": "^13.2.1", - "ts-jest": "^27.0.7" + "ts-jest": "^27.1.1" } } diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index 3e96151c04da9..f4e9aa690ddb1 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -80,9 +80,9 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts b/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts index 7699ec0efb4fd..cb4b79ca8a2f5 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts @@ -105,7 +105,7 @@ testDeprecated('custom resource is added twice, lambda is added once', () => { 'Arn', ], }, - 'Runtime': 'python2.7', + 'Runtime': 'python3.9', 'Timeout': 300, }, 'DependsOn': [ @@ -208,7 +208,7 @@ class TestCustomResource extends Construct { const singletonLambda = new lambda.SingletonFunction(this, 'Lambda', { uuid: 'TestCustomResourceProvider', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); diff --git a/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts index 3246529401376..91fde34e9faaf 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts @@ -47,6 +47,7 @@ export class EdgeFunction extends Resource implements lambda.IVersion { public readonly permissionsNode: Node; public readonly role?: iam.IRole; public readonly version: string; + public readonly architecture: lambda.Architecture; private readonly _edgeFunction: lambda.Function; @@ -67,6 +68,7 @@ export class EdgeFunction extends Resource implements lambda.IVersion { this.grantPrincipal = this._edgeFunction.role!; this.permissionsNode = this._edgeFunction.permissionsNode; this.version = lambda.extractQualifierFromArn(this.functionArn); + this.architecture = this._edgeFunction.architecture; this.node.defaultChild = this._edgeFunction; } diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index bd2783a8b713b..07b6057a68f7d 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -87,7 +87,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 403738f1b3bb1..fb43ad9cfc4d0 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -81,7 +81,7 @@ "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", "colors": "^1.4.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-events": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index aeb12c031b1b8..e8a0aa1006e22 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -72,7 +72,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudwatch/package.json b/packages/@aws-cdk/aws-cloudwatch/package.json index cc956537ed631..8962e40c1eb99 100644 --- a/packages/@aws-cdk/aws-cloudwatch/package.json +++ b/packages/@aws-cdk/aws-cloudwatch/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 78156ccea8a1e..b2bf2c4407cb9 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -93,7 +93,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/assets": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 582e2482a4541..9bb99da70f561 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -86,7 +86,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-codestarnotifications": "0.0.0", diff --git a/packages/@aws-cdk/aws-codedeploy/package.json b/packages/@aws-cdk/aws-codedeploy/package.json index db305f191c932..e30ee33ebca4a 100644 --- a/packages/@aws-cdk/aws-codedeploy/package.json +++ b/packages/@aws-cdk/aws-codedeploy/package.json @@ -89,7 +89,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-autoscaling": "0.0.0", diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index 9b9eded638d14..355ff86ef0694 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -85,7 +85,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "@types/lodash": "^4.14.177", - "jest": "^27.3.1", + "jest": "^27.4.3", "lodash": "^4.17.21" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts b/packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts index 45d123f3b9298..b838abbe162c7 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts @@ -74,6 +74,7 @@ export class CrossRegionSupportConstruct extends Construct { bucketName: cdk.PhysicalName.GENERATE_IF_NEEDED, encryption: encryptionAlias ? s3.BucketEncryption.KMS : s3.BucketEncryption.KMS_MANAGED, encryptionKey: encryptionAlias, + blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL, }); } } diff --git a/packages/@aws-cdk/aws-codepipeline/package.json b/packages/@aws-cdk/aws-codepipeline/package.json index 2276b7f445783..a136a5964c3fe 100644 --- a/packages/@aws-cdk/aws-codepipeline/package.json +++ b/packages/@aws-cdk/aws-codepipeline/package.json @@ -92,7 +92,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-codestarnotifications": "0.0.0", diff --git a/packages/@aws-cdk/aws-codepipeline/test/cross-env.test.ts b/packages/@aws-cdk/aws-codepipeline/test/cross-env.test.ts index 337a110a35b0f..f26de209ecaf9 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/cross-env.test.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/cross-env.test.ts @@ -129,7 +129,14 @@ describe.each([ // THEN expect(supportStack).not.toHaveResource('AWS::KMS::Key'); - expect(supportStack).toHaveResource('AWS::S3::Bucket'); + expect(supportStack).toHaveResourceLike('AWS::S3::Bucket', { + PublicAccessBlockConfiguration: { + BlockPublicAcls: true, + BlockPublicPolicy: true, + IgnorePublicAcls: true, + RestrictPublicBuckets: true, + }, + }); }); test('when twiddling another stack', () => { diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 57a442512d9f6..2cb86ba2885dd 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -349,7 +349,7 @@ new cognito.UserPool(this, 'myuserpool', { }); ``` -Sending emails through SES requires that SES be configured (as described above) in one of the regions - `us-east-1`, `us-west-1`, or `eu-west-1`. +Sending emails through SES requires that SES be configured (as described above) in a valid SES region. If the UserPool is being created in a different region, `sesRegion` must be used to specify the correct SES region. ```ts diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-email.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-email.ts index 2d5b8af06447f..398a1838f2128 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-email.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-email.ts @@ -2,11 +2,6 @@ import { Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { toASCII as punycodeEncode } from 'punycode/'; -/** - * The valid Amazon SES configuration regions - */ -const REGIONS = ['us-east-1', 'us-west-2', 'eu-west-1']; - /** * Configuration for Cognito sending emails via Amazon SES */ @@ -164,12 +159,6 @@ class SESEmail extends UserPoolEmail { throw new Error('Your stack region cannot be determined so "sesRegion" is required in SESOptions'); } - if (this.options.sesRegion && !REGIONS.includes(this.options.sesRegion)) { - throw new Error(`sesRegion must be one of 'us-east-1', 'us-west-2', 'eu-west-1'. received ${this.options.sesRegion}`); - } else if (!this.options.sesRegion && !REGIONS.includes(region)) { - throw new Error(`Your stack is in ${region}, which is not a SES Region. Please provide a valid value for 'sesRegion'`); - } - let from = this.options.fromEmail; if (this.options.fromName) { from = `${this.options.fromName} <${this.options.fromEmail}>`; diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index b80c6230d5b4d..770be2d7d7313 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -80,7 +80,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "@types/punycode": "^2.1.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts index df252d401a000..1efa42aeda79b 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts @@ -1701,48 +1701,8 @@ describe('User Pool', () => { }, }); - }); - test('email withSES invalid region throws error', () => { - // GIVEN - const stack = new Stack(undefined, undefined, { - env: { - region: 'us-east-2', - account: '11111111111', - }, - }); - - // WHEN - expect(() => new UserPool(stack, 'Pool', { - email: UserPoolEmail.withSES({ - fromEmail: 'mycustomemail@example.com', - fromName: 'My Custom Email', - replyTo: 'reply@example.com', - configurationSetName: 'default', - }), - })).toThrow(/Please provide a valid value/); - }); - test('email withSES invalid sesRegion throws error', () => { - // GIVEN - const stack = new Stack(undefined, undefined, { - env: { - account: '11111111111', - }, - }); - - // WHEN - expect(() => new UserPool(stack, 'Pool', { - email: UserPoolEmail.withSES({ - sesRegion: 'us-east-2', - fromEmail: 'mycustomemail@example.com', - fromName: 'My Custom Email', - replyTo: 'reply@example.com', - configurationSetName: 'default', - }), - })).toThrow(/sesRegion must be one of/); - - }); }); test('device tracking is configured correctly', () => { diff --git a/packages/@aws-cdk/aws-config/package.json b/packages/@aws-cdk/aws-config/package.json index 6457dc601de07..03d65d89f18cc 100644 --- a/packages/@aws-cdk/aws-config/package.json +++ b/packages/@aws-cdk/aws-config/package.json @@ -80,7 +80,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-events": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json index 6e16e263c4129..3978b69d0ed2b 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json @@ -30,14 +30,14 @@ "license": "Apache-2.0", "devDependencies": { "aws-sdk": "^2.596.0", - "aws-sdk-mock": "^5.4.0", + "aws-sdk-mock": "^5.5.0", "eslint": "^7.32.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.25.3", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.3.1", "eslint-plugin-standard": "^4.1.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "lambda-tester": "^3.6.0", "nock": "^13.2.1" } diff --git a/packages/@aws-cdk/aws-dynamodb-global/package.json b/packages/@aws-cdk/aws-dynamodb-global/package.json index 48a7912b92bbf..a9ac32d2e7a53 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/package.json @@ -62,7 +62,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "peerDependencies": { "@aws-cdk/aws-dynamodb": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index b9639be7d644b..4301cbf7a6f99 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -85,14 +85,14 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", "@types/sinon": "^9.0.11", "aws-sdk": "^2.848.0", - "aws-sdk-mock": "^5.4.0", - "jest": "^27.3.1", + "aws-sdk-mock": "^5.5.0", + "jest": "^27.4.3", "sinon": "^9.2.4", - "ts-jest": "^27.0.7" + "ts-jest": "^27.1.1" }, "dependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/@aws-cdk/aws-ec2/README.md b/packages/@aws-cdk/aws-ec2/README.md index f673e24111e9f..16c999efde724 100644 --- a/packages/@aws-cdk/aws-ec2/README.md +++ b/packages/@aws-cdk/aws-ec2/README.md @@ -1073,6 +1073,23 @@ instance.userData.addCommands( ); ``` +#### Tagging Volumes + +You can configure [tag propagation on volume creation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-propagatetagstovolumeoncreation). + +```ts + declare const vpc: ec2.Vpc; + declare const instanceType: ec2.InstanceType; + declare const machineImage: ec2.IMachineImage; + + new ec2.Instance(this, 'Instance', { + vpc, + machineImage, + instanceType, + propagateTagsToVolumeOnCreation: true, + }); +``` + ### Configuring Instance Metadata Service (IMDS) #### Toggling IMDSv1 diff --git a/packages/@aws-cdk/aws-ec2/lib/instance-types.ts b/packages/@aws-cdk/aws-ec2/lib/instance-types.ts index e377b0f1edb9b..5f30f1493987a 100644 --- a/packages/@aws-cdk/aws-ec2/lib/instance-types.ts +++ b/packages/@aws-cdk/aws-ec2/lib/instance-types.ts @@ -183,6 +183,56 @@ export enum InstanceClass { */ MEMORY5_AMD_NVME_DRIVE = 'r5ad', + /** + * High memory instances (6TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + HIGH_MEMORY_6TB_1 = 'u-6tb1', + + /** + * High memory instances (6TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + U_6TB1 = 'u-6tb1', + + /** + * High memory instances (9TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + HIGH_MEMORY_9TB_1 = 'u-9tb1', + + /** + * High memory instances (9TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + U_9TB1 = 'u-9tb1', + + /** + * High memory instances (12TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + HIGH_MEMORY_12TB_1 = 'u-12tb1', + + /** + * High memory instances (12TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + U_12TB1 = 'u-12tb1', + + /** + * High memory instances (18TB) based on Intel Xeon Scalable (Cascade Lake) processors, 1st generation + */ + HIGH_MEMORY_18TB_1 = 'u-18tb1', + + /** + * High memory instances (18TB) based on Intel Xeon Scalable (Cascade Lake) processors, 1st generation + */ + U_18TB1 = 'u-18tb1', + + /** + * High memory instances (24TB) based on Intel Xeon Scalable (Cascade Lake) processors, 1st generation + */ + HIGH_MEMORY_24TB_1 = 'u-24tb1', + + /** + * High memory instances (24TB) based on Intel Xeon Scalable (Cascade Lake) processors, 1st generation + */ + U_24TB1 = 'u-24tb1', + /** * Memory optimized instances based on AMD EPYC with local NVME drive, 5th generation */ @@ -342,6 +392,26 @@ export enum InstanceClass { */ D2 = 'd2', + /** + * Storage-optimized instances, 3rd generation + */ + STORAGE3 = 'd3', + + /** + * Storage-optimized instances, 3rd generation + */ + D3 = 'd3', + + /** + * Storage-optimized instances, 3rd generation + */ + STORAGE3_ENHANCED_NETWORK = 'd3en', + + /** + * Storage-optimized instances, 3rd generation + */ + D3EN = 'd3en', + /** * Storage/compute balanced instances, 1st generation */ @@ -372,6 +442,26 @@ export enum InstanceClass { */ I3EN = 'i3en', + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + STORAGE4_GRAVITON_NETWORK_OPTIMIZED = 'im4gn', + + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + IM4GN = 'im4gn', + + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + STORAGE4_GRAVITON_NETWORK_STORAGE_OPTIMIZED = 'is4gen', + + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + IS4GEN = 'is4gen', + /** * Burstable instances, 2nd generation */ @@ -741,6 +831,16 @@ export enum InstanceSize { */ XLARGE48 = '48xlarge', + /** + * Instance size XLARGE56 (56xlarge) + */ + XLARGE56 = '56xlarge', + + /** + * Instance size XLARGE56 (112xlarge) + */ + XLARGE112 = '112xlarge', + /** * Instance size METAL (metal) */ diff --git a/packages/@aws-cdk/aws-ec2/lib/instance.ts b/packages/@aws-cdk/aws-ec2/lib/instance.ts index 85b05fc71734b..a12c3a45d6108 100644 --- a/packages/@aws-cdk/aws-ec2/lib/instance.ts +++ b/packages/@aws-cdk/aws-ec2/lib/instance.ts @@ -214,7 +214,14 @@ export interface InstanceProps { * * @default - no association */ - readonly privateIpAddress?: string + readonly privateIpAddress?: string; + + /** + * Propagate the EC2 instance tags to the EBS volumes. + * + * @default - false + */ + readonly propagateTagsToVolumeOnCreation?: boolean; /** * Apply the given CloudFormation Init configuration to the instance at startup @@ -373,6 +380,7 @@ export class Instance extends Resource implements IInstance { sourceDestCheck: props.sourceDestCheck, blockDeviceMappings: props.blockDevices !== undefined ? instanceBlockDeviceMappings(this, props.blockDevices) : undefined, privateIpAddress: props.privateIpAddress, + propagateTagsToVolumeOnCreation: props.propagateTagsToVolumeOnCreation, }); this.instance.node.addDependency(this.role); diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index 04d6769f4c07b..6bef659b08c61 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -949,6 +949,13 @@ export interface VpcProps { * @default - No flow logs. */ readonly flowLogs?: { [id: string]: FlowLogOptions } + + /** + * The VPC name. + * + * @default this.node.path + */ + readonly vpcName?: string; } /** @@ -1294,7 +1301,7 @@ export class Vpc extends VpcBase { this.vpcDefaultSecurityGroup = this.resource.attrDefaultSecurityGroup; this.vpcIpv6CidrBlocks = this.resource.attrIpv6CidrBlocks; - Tags.of(this).add(NAME_TAG, this.node.path); + Tags.of(this).add(NAME_TAG, props.vpcName || this.node.path); this.availabilityZones = stack.availabilityZones; diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index dbc35bb4d47aa..61940fe0b4b42 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -87,9 +87,9 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-ec2/test/instance.test.ts b/packages/@aws-cdk/aws-ec2/test/instance.test.ts index d239b89af9a36..6aaed58333ee0 100644 --- a/packages/@aws-cdk/aws-ec2/test/instance.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/instance.test.ts @@ -123,7 +123,7 @@ describe('instance', () => { test('instance architecture is correctly discerned for arm instances', () => { // GIVEN const sampleInstanceClasses = [ - 'a1', 't4g', 'c6g', 'c6gd', 'c6gn', 'm6g', 'm6gd', 'r6g', 'r6gd', 'g5g', // current Graviton-based instance classes + 'a1', 't4g', 'c6g', 'c6gd', 'c6gn', 'm6g', 'm6gd', 'r6g', 'r6gd', 'g5g', 'im4gn', 'is4gen', // current Graviton-based instance classes 'a13', 't11g', 'y10ng', 'z11ngd', // theoretical future Graviton-based instance classes ]; @@ -197,6 +197,20 @@ describe('instance', () => { } + }); + test('can propagate EBS volume tags', () => { + // WHEN + new Instance(stack, 'Instance', { + vpc, + machineImage: new AmazonLinuxImage(), + instanceType: InstanceType.of(InstanceClass.T3, InstanceSize.LARGE), + propagateTagsToVolumeOnCreation: true, + }); + + // THEN + expect(stack).toHaveResource('AWS::EC2::Instance', { + PropagateTagsToVolumeOnCreation: true, + }); }); describe('blockDeviceMappings', () => { test('can set blockDeviceMappings', () => { diff --git a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts index 53942f9199a50..1ef3e8094a5e7 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts @@ -510,6 +510,55 @@ describe('vpc', () => { }); }).toThrow(/subnet cannot include mapPublicIpOnLaunch parameter/); }); + test('verify the Default VPC name', () => { + const stack = getTestStack(); + const tagName = { Key: 'Name', Value: `${stack.node.path}/VPC` }; + new Vpc(stack, 'VPC', { + maxAzs: 1, + subnetConfiguration: [ + { + name: 'public', + subnetType: SubnetType.PUBLIC, + }, + { + name: 'private', + subnetType: SubnetType.PRIVATE_WITH_NAT, + }, + ], + }); + expect(stack).toCountResources('AWS::EC2::Subnet', 2); + expect(stack).toHaveResource('AWS::EC2::NatGateway'); + expect(stack).toHaveResource('AWS::EC2::Subnet', { + MapPublicIpOnLaunch: true, + }); + expect(stack).toHaveResource('AWS::EC2::VPC', hasTags([tagName])); + }); + test('verify the assigned VPC name passing the "vpcName" prop', () => { + const stack = getTestStack(); + const tagNameDefault = { Key: 'Name', Value: `${stack.node.path}/VPC` }; + const tagName = { Key: 'Name', Value: 'CustomVPCName' }; + new Vpc(stack, 'VPC', { + maxAzs: 1, + subnetConfiguration: [ + { + name: 'public', + subnetType: SubnetType.PUBLIC, + }, + { + name: 'private', + subnetType: SubnetType.PRIVATE_WITH_NAT, + }, + ], + vpcName: 'CustomVPCName', + }); + expect(stack).toCountResources('AWS::EC2::Subnet', 2); + expect(stack).toHaveResource('AWS::EC2::NatGateway'); + expect(stack).toHaveResource('AWS::EC2::Subnet', { + MapPublicIpOnLaunch: true, + }); + expect(stack).not.toHaveResource('AWS::EC2::VPC', hasTags([tagNameDefault])); + expect(stack).toHaveResource('AWS::EC2::VPC', hasTags([tagName])); + }); test('maxAZs defaults to 3 if unset', () => { const stack = getTestStack(); new Vpc(stack, 'VPC'); @@ -524,8 +573,6 @@ describe('vpc', () => { DestinationCidrBlock: '0.0.0.0/0', NatGatewayId: {}, }); - - }); test('with maxAZs set to 2', () => { diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index fc4ede9fd3047..2d2e84c162c2d 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -74,7 +74,7 @@ "@types/jest": "^27.0.3", "@types/proxyquire": "^1.3.28", "aws-cdk": "0.0.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "proxyquire": "^2.1.3" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index a6679fadc9977..73b02958e948f 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -79,7 +79,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/@aws-cdk/aws-ecs/README.md b/packages/@aws-cdk/aws-ecs/README.md index 2c4f04e64b257..602e046ba2d61 100644 --- a/packages/@aws-cdk/aws-ecs/README.md +++ b/packages/@aws-cdk/aws-ecs/README.md @@ -405,7 +405,7 @@ declare const parameter: ssm.StringParameter; declare const taskDefinition: ecs.TaskDefinition; declare const s3Bucket: s3.Bucket; -taskDefinition.addContainer('container', { +const newContainer = taskDefinition.addContainer('container', { image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"), memoryLimitMiB: 1024, environment: { // clear text, not for sensitive data @@ -421,6 +421,7 @@ taskDefinition.addContainer('container', { PARAMETER: ecs.Secret.fromSsmParameter(parameter), }, }); +newContainer.addEnvironment('QUEUE_NAME', 'MyQueue'); ``` The task execution role is automatically granted read permissions on the secrets/parameters. Support for environment diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts index cc0611f78c995..dc9a721a7893a 100644 --- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts @@ -418,6 +418,8 @@ export class ContainerDefinition extends Construct { private readonly secrets?: CfnTaskDefinition.SecretProperty[]; + private readonly environment: { [key: string]: string }; + /** * Constructs a new instance of the ContainerDefinition class. */ @@ -453,6 +455,12 @@ export class ContainerDefinition extends Construct { } } + if (props.environment) { + this.environment = { ...props.environment }; + } else { + this.environment = {}; + } + if (props.environmentFiles) { this.environmentFiles = []; @@ -543,6 +551,13 @@ export class ContainerDefinition extends Construct { })); } + /** + * This method adds an environment variable to the container. + */ + public addEnvironment(name: string, value: string) { + this.environment[name] = value; + } + /** * This method adds one or more resources to the container. */ @@ -665,7 +680,7 @@ export class ContainerDefinition extends Construct { volumesFrom: cdk.Lazy.any({ produce: () => this.volumesFrom.map(renderVolumeFrom) }, { omitEmptyArray: true }), workingDirectory: this.props.workingDirectory, logConfiguration: this.logDriverConfig, - environment: this.props.environment && renderKV(this.props.environment, 'name', 'value'), + environment: this.environment && Object.keys(this.environment).length ? renderKV(this.environment, 'name', 'value') : undefined, environmentFiles: this.environmentFiles && renderEnvironmentFiles(this.environmentFiles), secrets: this.secrets, extraHosts: this.props.extraHosts && renderKV(this.props.extraHosts, 'hostname', 'ipAddress'), diff --git a/packages/@aws-cdk/aws-ecs/package.json b/packages/@aws-cdk/aws-ecs/package.json index 6a7118ba72553..af068fa218ecc 100644 --- a/packages/@aws-cdk/aws-ecs/package.json +++ b/packages/@aws-cdk/aws-ecs/package.json @@ -89,7 +89,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "@types/proxyquire": "^1.3.28", - "jest": "^27.3.1", + "jest": "^27.4.3", "proxyquire": "^2.1.3" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts b/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts index 7e912a942f9f9..4f259929ae7c4 100644 --- a/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts +++ b/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts @@ -691,13 +691,14 @@ describe('container definition', () => { const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); // WHEN - taskDefinition.addContainer('cont', { + const container = taskDefinition.addContainer('cont', { image: ecs.ContainerImage.fromRegistry('test'), memoryLimitMiB: 1024, environment: { TEST_ENVIRONMENT_VARIABLE: 'test environment variable value', }, }); + container.addEnvironment('SECOND_ENVIRONEMENT_VARIABLE', 'second test value'); // THEN expect(stack).toHaveResourceLike('AWS::ECS::TaskDefinition', { @@ -706,6 +707,37 @@ describe('container definition', () => { Environment: [{ Name: 'TEST_ENVIRONMENT_VARIABLE', Value: 'test environment variable value', + }, + { + Name: 'SECOND_ENVIRONEMENT_VARIABLE', + Value: 'second test value', + }], + }, + ], + }); + + + }); + + test('can add environment variables to container definition with no environment', () => { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + const container = taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + }); + container.addEnvironment('SECOND_ENVIRONEMENT_VARIABLE', 'second test value'); + + // THEN + expect(stack).toHaveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + Environment: [{ + Name: 'SECOND_ENVIRONEMENT_VARIABLE', + Value: 'second test value', }], }, ], diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.expected.json new file mode 100644 index 0000000000000..8a18b3554d752 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.expected.json @@ -0,0 +1,479 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.192.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "FargateCluster7CCD5F93": { + "Type": "AWS::ECS::Cluster" + }, + "TaskDefTaskRole1EDB4A67": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "TaskDef54694570": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Environment": [ + { + "Name": "nameOne", + "Value": "valueOne" + } + ], + "Essential": true, + "Image": "nginx", + "Name": "nginx", + "PortMappings": [ + { + "ContainerPort": 80, + "Protocol": "tcp" + } + ] + } + ], + "Cpu": "512", + "Family": "awsecsintegTaskDef6FDFB69A", + "Memory": "1024", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "TaskDefTaskRole1EDB4A67", + "Arn" + ] + } + } + }, + "websvcsgA808F313": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-integ/websvc-sg", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "SecurityGroupIngress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "from 0.0.0.0/0:80", + "FromPort": 80, + "IpProtocol": "tcp", + "ToPort": 80 + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ServiceD69D759B": { + "Type": "AWS::ECS::Service", + "Properties": { + "Cluster": { + "Ref": "FargateCluster7CCD5F93" + }, + "DeploymentConfiguration": { + "MaximumPercent": 200, + "MinimumHealthyPercent": 50 + }, + "EnableECSManagedTags": false, + "LaunchType": "FARGATE", + "NetworkConfiguration": { + "AwsvpcConfiguration": { + "AssignPublicIp": "ENABLED", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "websvcsgA808F313", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + ] + } + }, + "TaskDefinition": { + "Ref": "TaskDef54694570" + } + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.ts b/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.ts new file mode 100644 index 0000000000000..d42dc6bc98a58 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.ts @@ -0,0 +1,37 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as cdk from '@aws-cdk/core'; +import * as ecs from '../../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-ecs-integ'); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); +const cluster = new ecs.Cluster(stack, 'FargateCluster', { vpc }); + +const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef', { + memoryLimitMiB: 1024, + cpu: 512, +}); + +// new container with firelens log driver, firelens log router will be created automatically. +const container = taskDefinition.addContainer('nginx', { + image: ecs.ContainerImage.fromRegistry('nginx'), +}); + +container.addPortMappings({ + containerPort: 80, + protocol: ecs.Protocol.TCP, +}); + +// Create a security group that allows tcp @ port 80 +const securityGroup = new ec2.SecurityGroup(stack, 'websvc-sg', { vpc }); +securityGroup.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcp(80)); +new ecs.FargateService(stack, 'Service', { + cluster, + taskDefinition, + securityGroup, + assignPublicIp: true, +}); + +container.addEnvironment('nameOne', 'valueOne'); + +app.synth(); diff --git a/packages/@aws-cdk/aws-eks-legacy/package.json b/packages/@aws-cdk/aws-eks-legacy/package.json index 791e3f46a3d4c..a817cd5065f54 100644 --- a/packages/@aws-cdk/aws-eks-legacy/package.json +++ b/packages/@aws-cdk/aws-eks-legacy/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-autoscaling": "0.0.0", @@ -131,7 +131,8 @@ "docs-public-apis:@aws-cdk/aws-eks-legacy.BootstrapOptions", "docs-public-apis:@aws-cdk/aws-eks-legacy.ClusterAttributes", "docs-public-apis:@aws-cdk/aws-eks-legacy.KubernetesResourceProps", - "docs-public-apis:@aws-cdk/aws-eks-legacy.Mapping" + "docs-public-apis:@aws-cdk/aws-eks-legacy.Mapping", + "resource-attribute:@aws-cdk/aws-eks-legacy.Cluster.clusterKubernetesNetworkConfigServiceIpv6Cidr" ] }, "stability": "deprecated", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 995768ca705da..c71f0136abd63 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -85,14 +85,14 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", "@types/sinon": "^9.0.11", "@types/yaml": "1.9.6", "aws-sdk": "^2.848.0", - "cdk8s": "^1.1.42", - "cdk8s-plus-21": "^1.0.0-beta.44", - "jest": "^27.3.1", + "cdk8s": "^1.2.6", + "cdk8s-plus-21": "^1.0.0-beta.54", + "jest": "^27.4.3", "sinon": "^9.2.4" }, "dependencies": { @@ -134,7 +134,9 @@ "awslint": { "exclude": [ "props-no-arn-refs:@aws-cdk/aws-eks.ClusterProps.outputMastersRoleArn", - "props-physical-name:@aws-cdk/aws-eks.OpenIdConnectProviderProps" + "props-physical-name:@aws-cdk/aws-eks.OpenIdConnectProviderProps", + "resource-attribute:@aws-cdk/aws-eks.Cluster.clusterKubernetesNetworkConfigServiceIpv6Cidr", + "resource-attribute:@aws-cdk/aws-eks.FargateCluster.clusterKubernetesNetworkConfigServiceIpv6Cidr" ] }, "stability": "stable", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index 0ea57888f4414..32e299de6fcd3 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -71,7 +71,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cognito": "0.0.0", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index f35005b357cc6..8951a036d2b35 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -71,7 +71,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1", + "jest": "^27.4.3", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-ecs-patterns": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 473e7f97b6492..40e8eadeec509 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -89,8 +89,8 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "aws-sdk-mock": "^5.4.0", - "jest": "^27.3.1" + "aws-sdk-mock": "^5.5.0", + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/test/aws-api/aws-api-handler.test.ts b/packages/@aws-cdk/aws-events-targets/test/aws-api/aws-api-handler.test.ts index 2f3f0b269e6ff..e1ace923b9f61 100644 --- a/packages/@aws-cdk/aws-events-targets/test/aws-api/aws-api-handler.test.ts +++ b/packages/@aws-cdk/aws-events-targets/test/aws-api/aws-api-handler.test.ts @@ -31,7 +31,10 @@ test('calls the SDK with the right parameters', async () => { expect(updateServiceMock).toHaveBeenCalledWith({ service: 'cool-service', forceNewDeployment: true, - }, expect.any(Function)); + // NOTE - The below (representing a callback) should be included in the output. + // However, this was broken by aws-sdk-mock@5.5.0. + // See https://github.com/dwyl/aws-sdk-mock/issues/256 for more details. + }/*, expect.any(Function)*/); expect(console.log).toHaveBeenLastCalledWith('Response: %j', { success: true, diff --git a/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts b/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts index b1222b9e178f5..904fe15c78b0f 100644 --- a/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts +++ b/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts @@ -106,7 +106,7 @@ test('adding same singleton lambda function as target mutiple times creates perm const fn = new lambda.SingletonFunction(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, uuid: 'uuid', }); const rule = new events.Rule(stack, 'Rule', { @@ -133,7 +133,7 @@ test('lambda handler and cloudwatch event across stacks', () => { const fn = new lambda.Function(lambdaStack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); const eventStack = new cdk.Stack(app, 'EventStack'); @@ -156,7 +156,7 @@ test('use a Dead Letter Queue for the rule target', () => { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); const queue = new sqs.Queue(stack, 'Queue'); @@ -248,7 +248,7 @@ test('throw an error when using a Dead Letter Queue for the rule target in a dif const fn = new lambda.Function(stack1, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); const queue = new sqs.Queue(stack2, 'Queue'); @@ -285,7 +285,7 @@ test('must display a warning when using a Dead Letter Queue from another account const fn = new lambda.Function(stack1, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); const queue = sqs.Queue.fromQueueArn(stack2, 'Queue', 'arn:aws:sqs:eu-west-1:444455556666:queue1'); @@ -334,7 +334,7 @@ test('specifying retry policy', () => { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); // WHEN @@ -375,6 +375,6 @@ function newTestLambda(scope: constructs.Construct, suffix = '') { return new lambda.Function(scope, `MyLambda${suffix}`, { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); } diff --git a/packages/@aws-cdk/aws-events/package.json b/packages/@aws-cdk/aws-events/package.json index 5fe43cc2117ed..cbb8d4f358a50 100644 --- a/packages/@aws-cdk/aws-events/package.json +++ b/packages/@aws-cdk/aws-events/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-evidently/.eslintrc.js b/packages/@aws-cdk/aws-evidently/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-evidently/.gitignore b/packages/@aws-cdk/aws-evidently/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-evidently/.npmignore b/packages/@aws-cdk/aws-evidently/.npmignore new file mode 100644 index 0000000000000..f931fede67c44 --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts diff --git a/packages/@aws-cdk/aws-evidently/LICENSE b/packages/@aws-cdk/aws-evidently/LICENSE new file mode 100644 index 0000000000000..28e4bdcec77ec --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-evidently/NOTICE b/packages/@aws-cdk/aws-evidently/NOTICE new file mode 100644 index 0000000000000..5fc3826926b5b --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-evidently/README.md b/packages/@aws-cdk/aws-evidently/README.md new file mode 100644 index 0000000000000..5cd3fc12e80e6 --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/README.md @@ -0,0 +1,31 @@ +# AWS::Evidently Construct Library + + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts nofixture +import * as evidently from '@aws-cdk/aws-evidently'; +``` + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::Evidently](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Evidently.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-evidently/jest.config.js b/packages/@aws-cdk/aws-evidently/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-evidently/lib/index.ts b/packages/@aws-cdk/aws-evidently/lib/index.ts new file mode 100644 index 0000000000000..e10fc7ad88bb7 --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::Evidently CloudFormation Resources: +export * from './evidently.generated'; diff --git a/packages/@aws-cdk/aws-evidently/package.json b/packages/@aws-cdk/aws-evidently/package.json new file mode 100644 index 0000000000000..76d0e7a6da6c5 --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/package.json @@ -0,0 +1,113 @@ +{ + "name": "@aws-cdk/aws-evidently", + "version": "0.0.0", + "description": "AWS::Evidently Construct Library", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.Evidently", + "packageId": "Amazon.CDK.AWS.Evidently", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.evidently", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "evidently" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-evidently", + "module": "aws_cdk.aws_evidently" + } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-evidently" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "cloudformation": "AWS::Evidently", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::Evidently", + "aws-evidently" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assertions": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cfn2ts": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^26.0.22" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "private": true +} diff --git a/packages/@aws-cdk/aws-evidently/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-evidently/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e208762bca03c --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/rosetta/default.ts-fixture @@ -0,0 +1,8 @@ +import { Construct } from 'constructs'; +import { Stack } from '@aws-cdk/core'; + +class MyStack extends Stack { + constructor(scope: Construct, id: string) { + /// here + } +} diff --git a/packages/@aws-cdk/aws-evidently/test/evidently.test.ts b/packages/@aws-cdk/aws-evidently/test/evidently.test.ts new file mode 100644 index 0000000000000..465c7bdea0693 --- /dev/null +++ b/packages/@aws-cdk/aws-evidently/test/evidently.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assertions'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-fsx/package.json b/packages/@aws-cdk/aws-fsx/package.json index d9e66b1e9bb49..cd5bbbd824471 100644 --- a/packages/@aws-cdk/aws-fsx/package.json +++ b/packages/@aws-cdk/aws-fsx/package.json @@ -102,7 +102,8 @@ "awslint": { "exclude": [ "props-physical-name:@aws-cdk/aws-fsx.LustreFileSystemProps", - "resource-interface:@aws-cdk/aws-fsx.LustreFileSystem" + "resource-interface:@aws-cdk/aws-fsx.LustreFileSystem", + "resource-attribute:@aws-cdk/aws-fsx.LustreFileSystem.fileSystemRootVolumeId" ] }, "stability": "stable", diff --git a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json index 4127176c56dc3..1a6095a9610d4 100644 --- a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json +++ b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json @@ -75,8 +75,8 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "aws-sdk-mock": "^5.4.0", - "jest": "^27.3.1" + "aws-sdk-mock": "^5.5.0", + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-glue/lib/table.ts b/packages/@aws-cdk/aws-glue/lib/table.ts index 0c790c5953ced..14ff98dd3b3c4 100644 --- a/packages/@aws-cdk/aws-glue/lib/table.ts +++ b/packages/@aws-cdk/aws-glue/lib/table.ts @@ -325,7 +325,10 @@ export class Table extends Resource implements ITable { return ret; } - private grant(grantee: iam.IGrantable, actions: string[]) { + /** + * Grant the given identity custom permissions. + */ + public grant(grantee: iam.IGrantable, actions: string[]) { return iam.Grant.addToPrincipal({ grantee, resourceArns: [this.tableArn], @@ -400,7 +403,6 @@ function createBucket(table: Table, props: TableProps) { } const readPermissions = [ - 'glue:BatchDeletePartition', 'glue:BatchGetPartition', 'glue:GetPartition', 'glue:GetPartitions', diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index 02e49341129b7..728425a1804bc 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/assets": "0.0.0", diff --git a/packages/@aws-cdk/aws-glue/test/integ.connection.expected.json b/packages/@aws-cdk/aws-glue/test/integ.connection.expected.json index 3422ce4ff408b..b4fa2b7b01f30 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.connection.expected.json +++ b/packages/@aws-cdk/aws-glue/test/integ.connection.expected.json @@ -95,15 +95,15 @@ "VpcPublicSubnet1NATGateway4D7517AA": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "Tags": [ { "Key": "Name", @@ -192,15 +192,15 @@ "VpcPublicSubnet2NATGateway9182C01D": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId" ] }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, "Tags": [ { "Key": "Name", @@ -289,15 +289,15 @@ "VpcPublicSubnet3NATGateway7640CD1D": { "Type": "AWS::EC2::NatGateway", "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet3EIP3A666A23", "AllocationId" ] }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, "Tags": [ { "Key": "Name", diff --git a/packages/@aws-cdk/aws-glue/test/integ.security-configuration.expected.json b/packages/@aws-cdk/aws-glue/test/integ.security-configuration.expected.json index 8d8dd30dab49d..d1df994ce660c 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.security-configuration.expected.json +++ b/packages/@aws-cdk/aws-glue/test/integ.security-configuration.expected.json @@ -158,4 +158,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/integ.table.expected.json b/packages/@aws-cdk/aws-glue/test/integ.table.expected.json index 58a72bfcf08fc..32fda38f59b0f 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.table.expected.json +++ b/packages/@aws-cdk/aws-glue/test/integ.table.expected.json @@ -433,7 +433,6 @@ "Statement": [ { "Action": [ - "glue:BatchDeletePartition", "glue:BatchGetPartition", "glue:GetPartition", "glue:GetPartitions", @@ -442,6 +441,7 @@ "glue:GetTableVersion", "glue:GetTableVersions", "glue:BatchCreatePartition", + "glue:BatchDeletePartition", "glue:CreatePartition", "glue:DeletePartition", "glue:UpdatePartition" @@ -510,7 +510,6 @@ }, { "Action": [ - "glue:BatchDeletePartition", "glue:BatchGetPartition", "glue:GetPartition", "glue:GetPartitions", @@ -519,6 +518,7 @@ "glue:GetTableVersion", "glue:GetTableVersions", "glue:BatchCreatePartition", + "glue:BatchDeletePartition", "glue:CreatePartition", "glue:DeletePartition", "glue:UpdatePartition" @@ -622,7 +622,6 @@ "Statement": [ { "Action": [ - "glue:BatchDeletePartition", "glue:BatchGetPartition", "glue:GetPartition", "glue:GetPartitions", @@ -631,6 +630,7 @@ "glue:GetTableVersion", "glue:GetTableVersions", "glue:BatchCreatePartition", + "glue:BatchDeletePartition", "glue:CreatePartition", "glue:DeletePartition", "glue:UpdatePartition" @@ -699,7 +699,6 @@ }, { "Action": [ - "glue:BatchDeletePartition", "glue:BatchGetPartition", "glue:GetPartition", "glue:GetPartitions", @@ -708,6 +707,7 @@ "glue:GetTableVersion", "glue:GetTableVersions", "glue:BatchCreatePartition", + "glue:BatchDeletePartition", "glue:CreatePartition", "glue:DeletePartition", "glue:UpdatePartition" @@ -743,7 +743,6 @@ }, { "Action": [ - "glue:BatchDeletePartition", "glue:BatchGetPartition", "glue:GetPartition", "glue:GetPartitions", @@ -752,6 +751,7 @@ "glue:GetTableVersion", "glue:GetTableVersions", "glue:BatchCreatePartition", + "glue:BatchDeletePartition", "glue:CreatePartition", "glue:DeletePartition", "glue:UpdatePartition" @@ -797,4 +797,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/table.test.ts b/packages/@aws-cdk/aws-glue/test/table.test.ts index 6afc880d41dbb..e4dac06728e19 100644 --- a/packages/@aws-cdk/aws-glue/test/table.test.ts +++ b/packages/@aws-cdk/aws-glue/test/table.test.ts @@ -2,9 +2,9 @@ import { Template } from '@aws-cdk/assertions'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as s3 from '@aws-cdk/aws-s3'; +import { testFutureBehavior } from '@aws-cdk/cdk-build-tools/lib/feature-flag'; import * as cdk from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; -import { testFutureBehavior } from '@aws-cdk/cdk-build-tools/lib/feature-flag'; import * as glue from '../lib'; import { CfnTable } from '../lib/glue.generated'; @@ -79,7 +79,6 @@ test('unpartitioned JSON table', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('partitioned JSON table', () => { @@ -157,7 +156,6 @@ test('partitioned JSON table', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('compressed table', () => { @@ -223,7 +221,6 @@ test('compressed table', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('table.node.defaultChild', () => { @@ -325,7 +322,6 @@ test('encrypted table: SSE-S3', () => { ], }, }); - }); test('encrypted table: SSE-KMS (implicitly created key)', () => { @@ -413,7 +409,6 @@ test('encrypted table: SSE-KMS (implicitly created key)', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('encrypted table: SSE-KMS (explicitly created key)', () => { @@ -506,7 +501,6 @@ test('encrypted table: SSE-KMS (explicitly created key)', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('encrypted table: SSE-KMS_MANAGED', () => { @@ -585,7 +579,6 @@ test('encrypted table: SSE-KMS_MANAGED', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('encrypted table: CSE-KMS (implicitly created key)', () => { @@ -654,7 +647,6 @@ test('encrypted table: CSE-KMS (implicitly created key)', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('encrypted table: CSE-KMS (explicitly created key)', () => { @@ -729,7 +721,6 @@ test('encrypted table: CSE-KMS (explicitly created key)', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('encrypted table: CSE-KMS (explicitly passed bucket and key)', () => { @@ -806,7 +797,6 @@ test('encrypted table: CSE-KMS (explicitly passed bucket and key)', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('explicit s3 bucket and prefix', () => { @@ -874,7 +864,6 @@ test('explicit s3 bucket and prefix', () => { TableType: 'EXTERNAL_TABLE', }, }); - }); test('explicit s3 bucket and with empty prefix', () => { @@ -942,7 +931,72 @@ test('explicit s3 bucket and with empty prefix', () => { TableType: 'EXTERNAL_TABLE', }, }); +}); + +test('grants: custom', () => { + const stack = new cdk.Stack(); + const user = new iam.User(stack, 'User'); + const database = new glue.Database(stack, 'Database', { + databaseName: 'database', + }); + const table = new glue.Table(stack, 'Table', { + database, + tableName: 'table', + columns: [{ + name: 'col', + type: glue.Schema.STRING, + }], + compressed: true, + dataFormat: glue.DataFormat.JSON, + }); + + table.grant(user, ['glue:UpdateTable']); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'glue:UpdateTable', + Effect: 'Allow', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':glue:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':table/', + { + Ref: 'DatabaseB269D8BB', + }, + '/', + { + Ref: 'Table4C2D914F', + }, + ], + ], + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'UserDefaultPolicy1F97781E', + Users: [ + { + Ref: 'User00B015A1', + }, + ], + }); }); test('grants: read only', () => { @@ -970,7 +1024,6 @@ test('grants: read only', () => { Statement: [ { Action: [ - 'glue:BatchDeletePartition', 'glue:BatchGetPartition', 'glue:GetPartition', 'glue:GetPartitions', @@ -1048,7 +1101,6 @@ test('grants: read only', () => { }, ], }); - }); testFutureBehavior('grants: write only', s3GrantWriteCtx, cdk.App, (app) => { @@ -1151,7 +1203,6 @@ testFutureBehavior('grants: write only', s3GrantWriteCtx, cdk.App, (app) => { }, ], }); - }); testFutureBehavior('grants: read and write', s3GrantWriteCtx, cdk.App, (app) => { @@ -1179,7 +1230,6 @@ testFutureBehavior('grants: read and write', s3GrantWriteCtx, cdk.App, (app) => Statement: [ { Action: [ - 'glue:BatchDeletePartition', 'glue:BatchGetPartition', 'glue:GetPartition', 'glue:GetPartitions', @@ -1188,6 +1238,7 @@ testFutureBehavior('grants: read and write', s3GrantWriteCtx, cdk.App, (app) => 'glue:GetTableVersion', 'glue:GetTableVersions', 'glue:BatchCreatePartition', + 'glue:BatchDeletePartition', 'glue:CreatePartition', 'glue:DeletePartition', 'glue:UpdatePartition', @@ -1264,7 +1315,6 @@ testFutureBehavior('grants: read and write', s3GrantWriteCtx, cdk.App, (app) => }, ], }); - }); test('validate: at least one column', () => { diff --git a/packages/@aws-cdk/aws-iam/lib/managed-policy.ts b/packages/@aws-cdk/aws-iam/lib/managed-policy.ts index 677448751ee0d..e8803ab6f0a8b 100644 --- a/packages/@aws-cdk/aws-iam/lib/managed-policy.ts +++ b/packages/@aws-cdk/aws-iam/lib/managed-policy.ts @@ -1,4 +1,4 @@ -import { ArnFormat, IResolveContext, Lazy, Resource, Stack } from '@aws-cdk/core'; +import { ArnFormat, Resource, Stack, Arn, Aws } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { IGroup } from './group'; import { CfnManagedPolicy } from './iam.generated'; @@ -156,16 +156,13 @@ export class ManagedPolicy extends Resource implements IManagedPolicy { */ public static fromAwsManagedPolicyName(managedPolicyName: string): IManagedPolicy { class AwsManagedPolicy implements IManagedPolicy { - public readonly managedPolicyArn = Lazy.uncachedString({ - produce(ctx: IResolveContext) { - return Stack.of(ctx.scope).formatArn({ - service: 'iam', - region: '', // no region for managed policy - account: 'aws', // the account for a managed policy is 'aws' - resource: 'policy', - resourceName: managedPolicyName, - }); - }, + public readonly managedPolicyArn = Arn.format({ + partition: Aws.PARTITION, + service: 'iam', + region: '', // no region for managed policy + account: 'aws', // the account for a managed policy is 'aws' + resource: 'policy', + resourceName: managedPolicyName, }); } return new AwsManagedPolicy(); diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index 0315e89e04c8c..29827c166de31 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -85,10 +85,10 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", "@types/sinon": "^9.0.11", - "jest": "^27.3.1", + "jest": "^27.4.3", "sinon": "^9.2.4" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-iam/test/managed-policy.test.ts b/packages/@aws-cdk/aws-iam/test/managed-policy.test.ts index 3561ed4f79f19..9ed969b4a0afe 100644 --- a/packages/@aws-cdk/aws-iam/test/managed-policy.test.ts +++ b/packages/@aws-cdk/aws-iam/test/managed-policy.test.ts @@ -614,3 +614,10 @@ describe('managed policy', () => { }); }); }); + +test('ARN for two instances of the same AWS Managed Policy is the same', () => { + const mp1 = ManagedPolicy.fromAwsManagedPolicyName('foo/bar'); + const mp2 = ManagedPolicy.fromAwsManagedPolicyName('foo/bar'); + + expect(mp1.managedPolicyArn).toEqual(mp2.managedPolicyArn); +}); diff --git a/packages/@aws-cdk/aws-iot-actions/package.json b/packages/@aws-cdk/aws-iot-actions/package.json index 2a54fd794ceaa..db32936bab7a7 100644 --- a/packages/@aws-cdk/aws-iot-actions/package.json +++ b/packages/@aws-cdk/aws-iot-actions/package.json @@ -77,7 +77,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "constructs": "^10.0.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-iot/package.json b/packages/@aws-cdk/aws-iot/package.json index 9b016c0dde7ef..d01d2722a6cb2 100644 --- a/packages/@aws-cdk/aws-iot/package.json +++ b/packages/@aws-cdk/aws-iot/package.json @@ -79,7 +79,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-iotevents/README.md b/packages/@aws-cdk/aws-iotevents/README.md index e9a17af332776..6dc6a681636cc 100644 --- a/packages/@aws-cdk/aws-iotevents/README.md +++ b/packages/@aws-cdk/aws-iotevents/README.md @@ -1,4 +1,5 @@ # AWS::IoTEvents Construct Library + --- @@ -9,23 +10,45 @@ > > [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + --- -This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. +AWS IoT Events enables you to monitor your equipment or device fleets for +failures or changes in operation, and to trigger actions when such events +occur. + +## Installation + +Install the module: + +```console +$ npm i @aws-cdk/aws-iotevents +``` + +Import it into your code: ```ts nofixture import * as iotevents from '@aws-cdk/aws-iotevents'; ``` - - -There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. -However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. +## `Input` -For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::IoTEvents](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_IoTEvents.html). +Add an AWS IoT Events input to your stack: -(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.) +```ts +import * as iotevents from '@aws-cdk/aws-iotevents'; - +new iotevents.Input(this, 'MyInput', { + inputName: 'my_input', + attributeJsonPaths: ['payload.temperature'], +}); +``` diff --git a/packages/@aws-cdk/aws-iotevents/lib/index.ts b/packages/@aws-cdk/aws-iotevents/lib/index.ts index 6390f9ed0b0ee..3851e30984391 100644 --- a/packages/@aws-cdk/aws-iotevents/lib/index.ts +++ b/packages/@aws-cdk/aws-iotevents/lib/index.ts @@ -1,2 +1,4 @@ +export * from './input'; + // AWS::IoTEvents CloudFormation Resources: export * from './iotevents.generated'; diff --git a/packages/@aws-cdk/aws-iotevents/lib/input.ts b/packages/@aws-cdk/aws-iotevents/lib/input.ts new file mode 100644 index 0000000000000..e4bba5684b7a4 --- /dev/null +++ b/packages/@aws-cdk/aws-iotevents/lib/input.ts @@ -0,0 +1,71 @@ +import { Resource, IResource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnInput } from './iotevents.generated'; + +/** + * Represents an AWS IoT Events input + */ +export interface IInput extends IResource { + /** + * The name of the input + * @attribute + */ + readonly inputName: string; +} + +/** + * Properties for defining an AWS IoT Events input + */ +export interface InputProps { + /** + * The name of the input + * + * @default - CloudFormation will generate a unique name of the input + */ + readonly inputName?: string, + + /** + * An expression that specifies an attribute-value pair in a JSON structure. + * Use this to specify an attribute from the JSON payload that is made available + * by the input. Inputs are derived from messages sent to AWS IoT Events (BatchPutMessage). + * Each such message contains a JSON payload. The attribute (and its paired value) + * specified here are available for use in the condition expressions used by detectors. + */ + readonly attributeJsonPaths: string[]; +} + +/** + * Defines an AWS IoT Events input in this stack. + */ +export class Input extends Resource implements IInput { + /** + * Import an existing input + */ + public static fromInputName(scope: Construct, id: string, inputName: string): IInput { + class Import extends Resource implements IInput { + public readonly inputName = inputName; + } + return new Import(scope, id); + } + + public readonly inputName: string; + + constructor(scope: Construct, id: string, props: InputProps) { + super(scope, id, { + physicalName: props.inputName, + }); + + if (props.attributeJsonPaths.length === 0) { + throw new Error('attributeJsonPaths property cannot be empty'); + } + + const resource = new CfnInput(this, 'Resource', { + inputName: this.physicalName, + inputDefinition: { + attributes: props.attributeJsonPaths.map(path => ({ jsonPath: path })), + }, + }); + + this.inputName = this.getResourceNameAttribute(resource.ref); + } +} diff --git a/packages/@aws-cdk/aws-iotevents/package.json b/packages/@aws-cdk/aws-iotevents/package.json index b5f7dadd69bb4..bc52ce259ea6c 100644 --- a/packages/@aws-cdk/aws-iotevents/package.json +++ b/packages/@aws-cdk/aws-iotevents/package.json @@ -77,9 +77,11 @@ "devDependencies": { "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.0.3" + "@types/jest": "^27.0.3", + "jest": "^27.3.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", @@ -93,7 +95,7 @@ "node": ">= 14.15.0" }, "stability": "experimental", - "maturity": "cfn-only", + "maturity": "experimental", "awscdkio": { "announce": false }, diff --git a/packages/@aws-cdk/aws-iotevents/test/input.test.ts b/packages/@aws-cdk/aws-iotevents/test/input.test.ts new file mode 100644 index 0000000000000..11b457bb0cf1b --- /dev/null +++ b/packages/@aws-cdk/aws-iotevents/test/input.test.ts @@ -0,0 +1,78 @@ +import { Template } from '@aws-cdk/assertions'; +import * as cdk from '@aws-cdk/core'; +import * as iotevents from '../lib'; + +test('Default property', () => { + const stack = new cdk.Stack(); + + // WHEN + new iotevents.Input(stack, 'MyInput', { + attributeJsonPaths: ['payload.temperature'], + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::IoTEvents::Input', { + InputDefinition: { + Attributes: [{ JsonPath: 'payload.temperature' }], + }, + }); +}); + +test('can get input name', () => { + const stack = new cdk.Stack(); + // GIVEN + const input = new iotevents.Input(stack, 'MyInput', { + attributeJsonPaths: ['payload.temperature'], + }); + + // WHEN + new cdk.CfnResource(stack, 'Res', { + type: 'Test::Resource', + properties: { + InputName: input.inputName, + }, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('Test::Resource', { + InputName: { Ref: 'MyInput08947B23' }, + }); +}); + +test('can set physical name', () => { + const stack = new cdk.Stack(); + + // WHEN + new iotevents.Input(stack, 'MyInput', { + inputName: 'test_input', + attributeJsonPaths: ['payload.temperature'], + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::IoTEvents::Input', { + InputName: 'test_input', + }); +}); + +test('can import a Input by inputName', () => { + const stack = new cdk.Stack(); + + // WHEN + const inputName = 'test-input-name'; + const topicRule = iotevents.Input.fromInputName(stack, 'InputFromInputName', inputName); + + // THEN + expect(topicRule).toMatchObject({ + inputName, + }); +}); + +test('cannot be created with an empty array of attributeJsonPaths', () => { + const stack = new cdk.Stack(); + + expect(() => { + new iotevents.Input(stack, 'MyInput', { + attributeJsonPaths: [], + }); + }).toThrow('attributeJsonPaths property cannot be empty'); +}); diff --git a/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.expected.json b/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.expected.json new file mode 100644 index 0000000000000..1f5d452b5475d --- /dev/null +++ b/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.expected.json @@ -0,0 +1,17 @@ +{ + "Resources": { + "MyInput08947B23": { + "Type": "AWS::IoTEvents::Input", + "Properties": { + "InputDefinition": { + "Attributes": [ + { + "JsonPath": "payload.temperature" + } + ] + }, + "InputName": "test_input" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.ts b/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.ts new file mode 100644 index 0000000000000..cb900c83a3f44 --- /dev/null +++ b/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.ts @@ -0,0 +1,18 @@ +import * as cdk from '@aws-cdk/core'; +import * as iotevents from '../lib'; + +const app = new cdk.App(); + +class TestStack extends cdk.Stack { + constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + new iotevents.Input(this, 'MyInput', { + inputName: 'test_input', + attributeJsonPaths: ['payload.temperature'], + }); + } +} + +new TestStack(app, 'test-stack'); +app.synth(); diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json b/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json index 1d057f5926a3a..8f54da2396ac9 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json +++ b/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json @@ -78,7 +78,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/assets": "0.0.0", diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json index 38d33c0cb08ce..6e9c14f5b5044 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json @@ -79,7 +79,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index 0b65b3ceec4b0..46c61cb964516 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -78,7 +78,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-events": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-event-sources/package.json b/packages/@aws-cdk/aws-lambda-event-sources/package.json index 1308a33c5b73e..091df92df4e83 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/package.json +++ b/packages/@aws-cdk/aws-lambda-event-sources/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts index 0d69c041fbc27..545e48f950afb 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts @@ -6,7 +6,7 @@ import { Construct } from 'constructs'; import { Bundling } from './bundling'; import { PackageManager } from './package-manager'; import { BundlingOptions } from './types'; -import { callsites, findUp } from './util'; +import { callsites, findUpMultiple } from './util'; /** * Properties for a NodejsFunction @@ -134,15 +134,20 @@ function findLockFile(depsLockFilePath?: string): string { return path.resolve(depsLockFilePath); } - const lockFile = findUp(PackageManager.PNPM.lockFile) - ?? findUp(PackageManager.YARN.lockFile) - ?? findUp(PackageManager.NPM.lockFile); + const lockFiles = findUpMultiple([ + PackageManager.PNPM.lockFile, + PackageManager.YARN.lockFile, + PackageManager.NPM.lockFile, + ]); - if (!lockFile) { + if (lockFiles.length === 0) { throw new Error('Cannot find a package lock file (`pnpm-lock.yaml`, `yarn.lock` or `package-lock.json`). Please specify it with `depsFileLockPath`.'); } + if (lockFiles.length > 1) { + throw new Error(`Multiple package lock files found: ${lockFiles.join(', ')}. Please specify the desired one with \`depsFileLockPath\`.`); + } - return lockFile; + return lockFiles[0]; } /** diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts index bc754185cf7a6..0ececb74ab95f 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts @@ -35,19 +35,34 @@ export function callsites(): CallSite[] { * Find a file by walking up parent directories */ export function findUp(name: string, directory: string = process.cwd()): string | undefined { + return findUpMultiple([name], directory)[0]; +} + +/** + * Find the lowest of multiple files by walking up parent directories. If + * multiple files exist at the same level, they will all be returned. + */ +export function findUpMultiple(names: string[], directory: string = process.cwd()): string[] { const absoluteDirectory = path.resolve(directory); - const file = path.join(directory, name); - if (fs.existsSync(file)) { - return file; + const files = []; + for (const name of names) { + const file = path.join(directory, name); + if (fs.existsSync(file)) { + files.push(file); + } + } + + if (files.length > 0) { + return files; } const { root } = path.parse(absoluteDirectory); if (absoluteDirectory === root) { - return undefined; + return []; } - return findUp(name, path.dirname(absoluteDirectory)); + return findUpMultiple(names, path.dirname(absoluteDirectory)); } /** diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 07b096d3e84e9..4fdd3c1451b87 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -79,7 +79,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "delay": "5.0.0", - "esbuild": "^0.13.15" + "esbuild": "^0.14.2" }, "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts index ea68bbffa156b..d2249f4f59118 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts @@ -1,7 +1,7 @@ import * as child_process from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; -import { callsites, exec, extractDependencies, findUp } from '../lib/util'; +import { callsites, exec, extractDependencies, findUp, findUpMultiple } from '../lib/util'; beforeEach(() => { jest.clearAllMocks(); @@ -33,6 +33,49 @@ describe('findUp', () => { }); }); +describe('findUpMultiple', () => { + test('Starting at process.cwd()', () => { + const files = findUpMultiple(['README.md', 'package.json']); + expect(files).toHaveLength(2); + expect(files[0]).toMatch(/aws-lambda-nodejs\/README\.md$/); + expect(files[1]).toMatch(/aws-lambda-nodejs\/package\.json$/); + }); + + test('Non existing files', () => { + expect(findUpMultiple(['non-existing-file.unknown', 'non-existing-file.unknown2'])).toEqual([]); + }); + + test('Existing and non existing files', () => { + const files = findUpMultiple(['non-existing-file.unknown', 'README.md']); + expect(files).toHaveLength(1); + expect(files[0]).toMatch(/aws-lambda-nodejs\/README\.md$/); + }); + + test('Starting at a specific path', () => { + const files = findUpMultiple(['util.test.ts', 'function.test.ts'], path.join(__dirname, 'integ-handlers')); + expect(files).toHaveLength(2); + expect(files[0]).toMatch(/aws-lambda-nodejs\/test\/util\.test\.ts$/); + expect(files[1]).toMatch(/aws-lambda-nodejs\/test\/function\.test\.ts$/); + }); + + test('Non existing files starting at a non existing relative path', () => { + expect(findUpMultiple(['not-to-be-found.txt', 'not-to-be-found2.txt'], 'non-existing/relative/path')).toEqual([]); + }); + + test('Starting at a relative path', () => { + const files = findUpMultiple(['util.test.ts', 'function.test.ts'], 'test/integ-handlers'); + expect(files).toHaveLength(2); + expect(files[0]).toMatch(/aws-lambda-nodejs\/test\/util\.test\.ts$/); + expect(files[1]).toMatch(/aws-lambda-nodejs\/test\/function\.test\.ts$/); + }); + + test('Files on multiple levels', () => { + const files = findUpMultiple(['README.md', 'util.test.ts'], path.join(__dirname, 'integ-handlers')); + expect(files).toHaveLength(1); + expect(files[0]).toMatch(/aws-lambda-nodejs\/test\/util\.test\.ts$/); + }); +}); + describe('exec', () => { test('normal execution', () => { const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ diff --git a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts index 01449e0cadeaa..5043a1501853e 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts @@ -96,7 +96,7 @@ test('Bundling a layer with dependencies', () => { bundle({ entry: entry, - runtime: Runtime.PYTHON_2_7, + runtime: Runtime.PYTHON_3_9, architecture: Architecture.X86_64, outputPathSuffix: 'python', }); @@ -116,7 +116,7 @@ test('Bundling a python code layer', () => { bundle({ entry: path.join(entry, '.'), - runtime: Runtime.PYTHON_2_7, + runtime: Runtime.PYTHON_3_9, architecture: Architecture.X86_64, outputPathSuffix: 'python', }); diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json index 2b64c7f650529..dc2c5477be700 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46S3Bucket84213B6F" + "Ref": "AssetParameters227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7S3BucketBE0FA4A0" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46S3VersionKeyC495D2FD" + "Ref": "AssetParameters227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7S3VersionKeyD39BB444" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46S3VersionKeyC495D2FD" + "Ref": "AssetParameters227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7S3VersionKeyD39BB444" } ] } @@ -85,91 +85,6 @@ "myhandlerinlineServiceRole10C681F6" ] }, - "myhandlerpython27ServiceRole2ED49C06": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerpython274D7465EA": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335S3Bucket1E236877" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335S3VersionKeyD0D6DBBF" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335S3VersionKeyD0D6DBBF" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerpython27ServiceRole2ED49C06", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python2.7" - }, - "DependsOn": [ - "myhandlerpython27ServiceRole2ED49C06" - ] - }, "myhandlerpython38ServiceRole2049AFF7": { "Type": "AWS::IAM::Role", "Properties": { @@ -206,7 +121,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888S3BucketC4EB0B32" + "Ref": "AssetParameters02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100S3Bucket6E69F943" }, "S3Key": { "Fn::Join": [ @@ -219,7 +134,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888S3VersionKeyB8755D2B" + "Ref": "AssetParameters02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100S3VersionKey8350D955" } ] } @@ -232,7 +147,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888S3VersionKeyB8755D2B" + "Ref": "AssetParameters02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100S3VersionKey8350D955" } ] } @@ -257,41 +172,29 @@ } }, "Parameters": { - "AssetParameters2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46S3Bucket84213B6F": { - "Type": "String", - "Description": "S3 bucket for asset \"2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46\"" - }, - "AssetParameters2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46S3VersionKeyC495D2FD": { - "Type": "String", - "Description": "S3 key for asset version \"2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46\"" - }, - "AssetParameters2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46ArtifactHashBBA8D438": { + "AssetParameters227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7S3BucketBE0FA4A0": { "Type": "String", - "Description": "Artifact hash for asset \"2f7cfa4e9b9d7c70c9af6f1820a340c116a1e139fcac4dde381f541331ba5e46\"" + "Description": "S3 bucket for asset \"227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7\"" }, - "AssetParameters7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335S3Bucket1E236877": { + "AssetParameters227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7S3VersionKeyD39BB444": { "Type": "String", - "Description": "S3 bucket for asset \"7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335\"" + "Description": "S3 key for asset version \"227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7\"" }, - "AssetParameters7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335S3VersionKeyD0D6DBBF": { + "AssetParameters227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7ArtifactHash7E65B893": { "Type": "String", - "Description": "S3 key for asset version \"7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335\"" + "Description": "Artifact hash for asset \"227b633cde31e51b833da8292d24ce0b348ba0a616dda185e8da6e0d37ff65f7\"" }, - "AssetParameters7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335ArtifactHash3C95A517": { + "AssetParameters02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100S3Bucket6E69F943": { "Type": "String", - "Description": "Artifact hash for asset \"7157876e6cb8bea4bc3b6e272edab8a4d202a0be6bdcecf33b95008fbacc2335\"" + "Description": "S3 bucket for asset \"02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100\"" }, - "AssetParameters1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888S3BucketC4EB0B32": { + "AssetParameters02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100S3VersionKey8350D955": { "Type": "String", - "Description": "S3 bucket for asset \"1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888\"" + "Description": "S3 key for asset version \"02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100\"" }, - "AssetParameters1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888S3VersionKeyB8755D2B": { + "AssetParameters02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100ArtifactHashFBCF65DE": { "Type": "String", - "Description": "S3 key for asset version \"1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888\"" - }, - "AssetParameters1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888ArtifactHash46327689": { - "Type": "String", - "Description": "Artifact hash for asset \"1d8b9cdbaaf7c36dc94604966b3b1f6fb2a972fbddc5cfd62fef7a7a8efd5888\"" + "Description": "Artifact hash for asset \"02c6c3394cc8925c65f92837c1ff8d5db16f412453a6247ffaace60e6335d100\"" } }, "Outputs": { @@ -300,11 +203,6 @@ "Ref": "myhandlerinline53D120C7" } }, - "Python27FunctionName": { - "Value": { - "Ref": "myhandlerpython274D7465EA" - } - }, "Python38FunctionName": { "Value": { "Ref": "myhandlerpython384D62BBB5" diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts index 2b51c5d1efc67..f41495f0f9419 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts @@ -22,14 +22,6 @@ class TestStack extends Stack { value: pythonFunctionInline.functionName, }); - const pythonFunction27 = new lambda.PythonFunction(this, 'my_handler_python_27', { - entry: path.join(__dirname, 'lambda-handler-pipenv'), - runtime: Runtime.PYTHON_2_7, - }); - new CfnOutput(this, 'Python27FunctionName', { - value: pythonFunction27.functionName, - }); - const pythonFunction38 = new lambda.PythonFunction(this, 'my_handler_python_38', { entry: path.join(__dirname, 'lambda-handler-pipenv'), runtime: Runtime.PYTHON_3_8, diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json index 6e305994bd801..0ed5358e2c8c3 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3S3Bucket666BD1AB" + "Ref": "AssetParameters8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302S3Bucket19CB0678" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3S3VersionKeyA31B2B4A" + "Ref": "AssetParameters8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302S3VersionKeyA2FCDE76" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3S3VersionKeyA31B2B4A" + "Ref": "AssetParameters8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302S3VersionKeyA2FCDE76" } ] } @@ -85,91 +85,6 @@ "myhandlerinlineServiceRole10C681F6" ] }, - "myhandlerpython27ServiceRole2ED49C06": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerpython274D7465EA": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764S3BucketFA6FBCEA" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764S3VersionKey55B7E38F" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764S3VersionKey55B7E38F" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerpython27ServiceRole2ED49C06", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python2.7" - }, - "DependsOn": [ - "myhandlerpython27ServiceRole2ED49C06" - ] - }, "myhandlerpython38ServiceRole2049AFF7": { "Type": "AWS::IAM::Role", "Properties": { @@ -206,7 +121,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0S3BucketC2F9D441" + "Ref": "AssetParameters40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9ebS3Bucket07693CB5" }, "S3Key": { "Fn::Join": [ @@ -219,7 +134,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0S3VersionKeyB53188B8" + "Ref": "AssetParameters40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9ebS3VersionKey453B45DF" } ] } @@ -232,7 +147,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0S3VersionKeyB53188B8" + "Ref": "AssetParameters40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9ebS3VersionKey453B45DF" } ] } @@ -257,41 +172,29 @@ } }, "Parameters": { - "AssetParameters5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3S3Bucket666BD1AB": { - "Type": "String", - "Description": "S3 bucket for asset \"5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3\"" - }, - "AssetParameters5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3S3VersionKeyA31B2B4A": { - "Type": "String", - "Description": "S3 key for asset version \"5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3\"" - }, - "AssetParameters5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3ArtifactHash8BEEBB0C": { + "AssetParameters8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302S3Bucket19CB0678": { "Type": "String", - "Description": "Artifact hash for asset \"5e3cce416e15bd5ddb77e3ffc9fa3d8f5eac73b0db8c1db7ae3d7f6197c0ecb3\"" + "Description": "S3 bucket for asset \"8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302\"" }, - "AssetParameters12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764S3BucketFA6FBCEA": { + "AssetParameters8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302S3VersionKeyA2FCDE76": { "Type": "String", - "Description": "S3 bucket for asset \"12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764\"" + "Description": "S3 key for asset version \"8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302\"" }, - "AssetParameters12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764S3VersionKey55B7E38F": { + "AssetParameters8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302ArtifactHash7948D306": { "Type": "String", - "Description": "S3 key for asset version \"12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764\"" + "Description": "Artifact hash for asset \"8c61809cd22a99ff94bd310623c77431c57aa8b1fd4d2ccfb76488d63a663302\"" }, - "AssetParameters12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764ArtifactHashF654A092": { + "AssetParameters40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9ebS3Bucket07693CB5": { "Type": "String", - "Description": "Artifact hash for asset \"12a01ed3f74f4bee61a4c67c4ca842472390f70c4b8bdd2cceb033abe16d7764\"" + "Description": "S3 bucket for asset \"40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9eb\"" }, - "AssetParameters22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0S3BucketC2F9D441": { + "AssetParameters40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9ebS3VersionKey453B45DF": { "Type": "String", - "Description": "S3 bucket for asset \"22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0\"" + "Description": "S3 key for asset version \"40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9eb\"" }, - "AssetParameters22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0S3VersionKeyB53188B8": { + "AssetParameters40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9ebArtifactHashFAE08C9B": { "Type": "String", - "Description": "S3 key for asset version \"22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0\"" - }, - "AssetParameters22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0ArtifactHash63D0E537": { - "Type": "String", - "Description": "Artifact hash for asset \"22d2bf270f7c8f776322a3bad39e8c690cbaa95a442ae2fec419b259df5632f0\"" + "Description": "Artifact hash for asset \"40c9006277807fed5dd60eb40b6160230d1966e5a491ff67e8f502b18009d9eb\"" } }, "Outputs": { @@ -300,11 +203,6 @@ "Ref": "myhandlerinline53D120C7" } }, - "Python27FunctionName": { - "Value": { - "Ref": "myhandlerpython274D7465EA" - } - }, "Python38FunctionName": { "Value": { "Ref": "myhandlerpython384D62BBB5" diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts index d3eaafe75a120..4f5060a870486 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts @@ -22,14 +22,6 @@ class TestStack extends Stack { value: pythonFunctionInline.functionName, }); - const pythonFunction27 = new lambda.PythonFunction(this, 'my_handler_python_27', { - entry: path.join(__dirname, 'lambda-handler-poetry'), - runtime: Runtime.PYTHON_2_7, - }); - new CfnOutput(this, 'Python27FunctionName', { - value: pythonFunction27.functionName, - }); - const pythonFunction38 = new lambda.PythonFunction(this, 'my_handler_python_38', { entry: path.join(__dirname, 'lambda-handler-poetry'), runtime: Runtime.PYTHON_3_8, diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.expected.json index eb7fc23f146c9..7cfe2de877c4a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.expected.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersdf0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563S3Bucket1ACC1E9E" + "Ref": "AssetParameters50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfaS3Bucket954AFCD2" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersdf0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563S3VersionKeyEA6BC868" + "Ref": "AssetParameters50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfaS3VersionKeyDC672869" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersdf0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563S3VersionKeyEA6BC868" + "Ref": "AssetParameters50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfaS3VersionKeyDC672869" } ] } @@ -79,7 +79,7 @@ ] }, "Handler": "index.handler", - "Runtime": "python2.7" + "Runtime": "python3.9" }, "DependsOn": [ "functionServiceRoleEF216095" @@ -87,17 +87,17 @@ } }, "Parameters": { - "AssetParametersdf0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563S3Bucket1ACC1E9E": { + "AssetParameters50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfaS3Bucket954AFCD2": { "Type": "String", - "Description": "S3 bucket for asset \"df0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563\"" + "Description": "S3 bucket for asset \"50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfa\"" }, - "AssetParametersdf0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563S3VersionKeyEA6BC868": { + "AssetParameters50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfaS3VersionKeyDC672869": { "Type": "String", - "Description": "S3 key for asset version \"df0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563\"" + "Description": "S3 key for asset version \"50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfa\"" }, - "AssetParametersdf0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563ArtifactHash887C8025": { + "AssetParameters50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfaArtifactHash06BB4065": { "Type": "String", - "Description": "Artifact hash for asset \"df0fb94d329926d232a09d16076d3eee0200e6a945f32ff69a97ba787087d563\"" + "Description": "Artifact hash for asset \"50b2fdbf0e4a082a383b55e783825b1158810c097a57717d8acb11b2e2db0bfa\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts index b53754a003778..ca0b62aceb950 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts @@ -20,7 +20,7 @@ class TestStack extends Stack { const fn = new lambda.PythonFunction(this, 'function', { entry: workDir, - runtime: Runtime.PYTHON_2_7, + runtime: Runtime.PYTHON_3_9, }); new CfnOutput(this, 'Function', { @@ -43,7 +43,7 @@ fs.copyFileSync(path.join(__dirname, 'lambda-handler', 'index.py'), path.join(wo const requirementsTxtPath = path.join(workDir, 'requirements.txt'); // Write a requirements.txt with an extraneous dependency (colorama) -const beforeDeps = 'certifi==2020.6.20\nchardet==3.0.4\nidna==2.10\nurllib3==1.25.11\nrequests==2.23.0\npillow==6.2.2\ncolorama==0.4.3\n'; +const beforeDeps = 'certifi==2020.6.20\nchardet==3.0.4\nidna==2.10\nurllib3==1.26.7\nrequests==2.26.0\nPillow==8.4.0\ncolorama==0.4.3\n'; fs.writeFileSync(requirementsTxtPath, beforeDeps); // Synth the first time @@ -52,7 +52,7 @@ const stack1 = new TestStack(app, 'cdk-integ-lambda-python-requirements-removed1 app.synth(); // Then, write a requirements.txt without the extraneous dependency and synth again -const afterDeps = 'certifi==2020.6.20\nchardet==3.0.4\nidna==2.10\nurllib3==1.25.11\nrequests==2.23.0\npillow==6.2.2\n'; +const afterDeps = 'certifi==2020.6.20\nchardet==3.0.4\nidna==2.10\nurllib3==1.26.7\nrequests==2.26.0\nPillow==8.4.0\n'; fs.writeFileSync(requirementsTxtPath, afterDeps); // Synth the same stack a second time with different requirements.txt contents diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile index 2d72b30bc8be8..a309b821c5801 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile @@ -4,5 +4,5 @@ url = "https://pypi.org/simple" verify_ssl = true [packages] -requests = "==2.23.0" -pillow = "==6.2.2" +requests = "==2.26.0" +Pillow = "==8.4.0" diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile.lock b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile.lock index 0113c74bf7363..f92befb9e3dd6 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile.lock +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-pipenv/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "0f782e44e69391c98999b575a7f93228f06d22716a144d955386b9c6abec2040" + "sha256": "fe29bbb3f12db421fd27678820291d33cf6b3dce6bb189274449dee89cf434e8" }, "pipfile-spec": 6, "requires": {}, @@ -16,78 +16,89 @@ "default": { "certifi": { "hashes": [ - "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", - "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" + "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872", + "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569" ], - "version": "==2020.6.20" + "version": "==2021.10.8" }, - "chardet": { + "charset-normalizer": { "hashes": [ - "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", - "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" + "sha256:1eecaa09422db5be9e29d7fc65664e6c33bd06f9ced7838578ba40d58bdf3721", + "sha256:b0b883e8e874edfdece9c28f314e3dd5badf067342e42fb162203335ae61aa2c" ], - "version": "==3.0.4" + "markers": "python_version >= '3'", + "version": "==2.0.9" }, "idna": { "hashes": [ - "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", - "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" + "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", + "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.10" + "markers": "python_version >= '3'", + "version": "==3.3" }, "pillow": { "hashes": [ - "sha256:00e0bbe9923adc5cc38a8da7d87d4ce16cde53b8d3bba8886cb928e84522d963", - "sha256:03457e439d073770d88afdd90318382084732a5b98b0eb6f49454746dbaae701", - "sha256:0d5c99f80068f13231ac206bd9b2e80ea357f5cf9ae0fa97fab21e32d5b61065", - "sha256:1a3bc8e1db5af40a81535a62a591fafdb30a8a1b319798ea8052aa65ef8f06d2", - "sha256:2b4a94be53dff02af90760c10a2e3634c3c7703410f38c98154d5ce71fe63d20", - "sha256:3ba7d8f1d962780f86aa747fef0baf3211b80cb13310fff0c375da879c0656d4", - "sha256:3e81485cec47c24f5fb27acb485a4fc97376b2b332ed633867dc68ac3077998c", - "sha256:43ef1cff7ee57f9c8c8e6fa02a62eae9fa23a7e34418c7ce88c0e3fe09d1fb38", - "sha256:4adc3302df4faf77c63ab3a83e1a3e34b94a6a992084f4aa1cb236d1deaf4b39", - "sha256:535e8e0e02c9f1fc2e307256149d6ee8ad3aa9a6e24144b7b6e6fb6126cb0e99", - "sha256:5ccfcb0a34ad9b77ad247c231edb781763198f405a5c8dc1b642449af821fb7f", - "sha256:5dcbbaa3a24d091a64560d3c439a8962866a79a033d40eb1a75f1b3413bfc2bc", - "sha256:6e2a7e74d1a626b817ecb7a28c433b471a395c010b2a1f511f976e9ea4363e64", - "sha256:82859575005408af81b3e9171ae326ff56a69af5439d3fc20e8cb76cd51c8246", - "sha256:834dd023b7f987d6b700ad93dc818098d7eb046bd445e9992b3093c6f9d7a95f", - "sha256:87ef0eca169f7f0bc050b22f05c7e174a65c36d584428431e802c0165c5856ea", - "sha256:900de1fdc93764be13f6b39dc0dd0207d9ff441d87ad7c6e97e49b81987dc0f3", - "sha256:92b83b380f9181cacc994f4c983d95a9c8b00b50bf786c66d235716b526a3332", - "sha256:aa1b0297e352007ec781a33f026afbb062a9a9895bb103c8f49af434b1666880", - "sha256:aa4792ab056f51b49e7d59ce5733155e10a918baf8ce50f64405db23d5627fa2", - "sha256:b72c39585f1837d946bd1a829a4820ccf86e361f28cbf60f5d646f06318b61e2", - "sha256:bb7861e4618a0c06c40a2e509c1bea207eea5fd4320d486e314e00745a402ca5", - "sha256:bc149dab804291a18e1186536519e5e122a2ac1316cb80f506e855a500b1cdd4", - "sha256:c424d35a5259be559b64490d0fd9e03fba81f1ce8e5b66e0a59de97547351d80", - "sha256:cbd5647097dc55e501f459dbac7f1d0402225636deeb9e0a98a8d2df649fc19d", - "sha256:ccf16fe444cc43800eeacd4f4769971200982200a71b1368f49410d0eb769543", - "sha256:d3a98444a00b4643b22b0685dbf9e0ddcaf4ebfd4ea23f84f228adf5a0765bb2", - "sha256:d6b4dc325170bee04ca8292bbd556c6f5398d52c6149ca881e67daf62215426f", - "sha256:db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950", - "sha256:e3a797a079ce289e59dbd7eac9ca3bf682d52687f718686857281475b7ca8e6a" + "sha256:066f3999cb3b070a95c3652712cffa1a748cd02d60ad7b4e485c3748a04d9d76", + "sha256:0a0956fdc5defc34462bb1c765ee88d933239f9a94bc37d132004775241a7585", + "sha256:0b052a619a8bfcf26bd8b3f48f45283f9e977890263e4571f2393ed8898d331b", + "sha256:1394a6ad5abc838c5cd8a92c5a07535648cdf6d09e8e2d6df916dfa9ea86ead8", + "sha256:1bc723b434fbc4ab50bb68e11e93ce5fb69866ad621e3c2c9bdb0cd70e345f55", + "sha256:244cf3b97802c34c41905d22810846802a3329ddcb93ccc432870243211c79fc", + "sha256:25a49dc2e2f74e65efaa32b153527fc5ac98508d502fa46e74fa4fd678ed6645", + "sha256:2e4440b8f00f504ee4b53fe30f4e381aae30b0568193be305256b1462216feff", + "sha256:3862b7256046fcd950618ed22d1d60b842e3a40a48236a5498746f21189afbbc", + "sha256:3eb1ce5f65908556c2d8685a8f0a6e989d887ec4057326f6c22b24e8a172c66b", + "sha256:3f97cfb1e5a392d75dd8b9fd274d205404729923840ca94ca45a0af57e13dbe6", + "sha256:493cb4e415f44cd601fcec11c99836f707bb714ab03f5ed46ac25713baf0ff20", + "sha256:4acc0985ddf39d1bc969a9220b51d94ed51695d455c228d8ac29fcdb25810e6e", + "sha256:5503c86916d27c2e101b7f71c2ae2cddba01a2cf55b8395b0255fd33fa4d1f1a", + "sha256:5b7bb9de00197fb4261825c15551adf7605cf14a80badf1761d61e59da347779", + "sha256:5e9ac5f66616b87d4da618a20ab0a38324dbe88d8a39b55be8964eb520021e02", + "sha256:620582db2a85b2df5f8a82ddeb52116560d7e5e6b055095f04ad828d1b0baa39", + "sha256:62cc1afda735a8d109007164714e73771b499768b9bb5afcbbee9d0ff374b43f", + "sha256:70ad9e5c6cb9b8487280a02c0ad8a51581dcbbe8484ce058477692a27c151c0a", + "sha256:72b9e656e340447f827885b8d7a15fc8c4e68d410dc2297ef6787eec0f0ea409", + "sha256:72cbcfd54df6caf85cc35264c77ede902452d6df41166010262374155947460c", + "sha256:792e5c12376594bfcb986ebf3855aa4b7c225754e9a9521298e460e92fb4a488", + "sha256:7b7017b61bbcdd7f6363aeceb881e23c46583739cb69a3ab39cb384f6ec82e5b", + "sha256:81f8d5c81e483a9442d72d182e1fb6dcb9723f289a57e8030811bac9ea3fef8d", + "sha256:82aafa8d5eb68c8463b6e9baeb4f19043bb31fefc03eb7b216b51e6a9981ae09", + "sha256:84c471a734240653a0ec91dec0996696eea227eafe72a33bd06c92697728046b", + "sha256:8c803ac3c28bbc53763e6825746f05cc407b20e4a69d0122e526a582e3b5e153", + "sha256:93ce9e955cc95959df98505e4608ad98281fff037350d8c2671c9aa86bcf10a9", + "sha256:9a3e5ddc44c14042f0844b8cf7d2cd455f6cc80fd7f5eefbe657292cf601d9ad", + "sha256:a4901622493f88b1a29bd30ec1a2f683782e57c3c16a2dbc7f2595ba01f639df", + "sha256:a5a4532a12314149d8b4e4ad8ff09dde7427731fcfa5917ff16d0291f13609df", + "sha256:b8831cb7332eda5dc89b21a7bce7ef6ad305548820595033a4b03cf3091235ed", + "sha256:b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed", + "sha256:c70e94281588ef053ae8998039610dbd71bc509e4acbc77ab59d7d2937b10698", + "sha256:c8a17b5d948f4ceeceb66384727dde11b240736fddeda54ca740b9b8b1556b29", + "sha256:d82cdb63100ef5eedb8391732375e6d05993b765f72cb34311fab92103314649", + "sha256:d89363f02658e253dbd171f7c3716a5d340a24ee82d38aab9183f7fdf0cdca49", + "sha256:d99ec152570e4196772e7a8e4ba5320d2d27bf22fdf11743dd882936ed64305b", + "sha256:ddc4d832a0f0b4c52fff973a0d44b6c99839a9d016fe4e6a1cb8f3eea96479c2", + "sha256:e3dacecfbeec9a33e932f00c6cd7996e62f53ad46fbe677577394aaa90ee419a", + "sha256:eb9fc393f3c61f9054e1ed26e6fe912c7321af2f41ff49d3f83d05bacf22cc78" ], "index": "pypi", - "version": "==6.2.2" + "version": "==8.4.0" }, "requests": { "hashes": [ - "sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee", - "sha256:5d2d0ffbb515f39417009a46c14256291061ac01ba8f875b90cad137de83beb4", - "sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" + "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24", + "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" ], "index": "pypi", - "version": "==2.23.0" + "version": "==2.26.0" }, "urllib3": { "hashes": [ - "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", - "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" + "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece", + "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", - "version": "==1.25.10" + "version": "==1.26.7" } }, "develop": {} diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock index 3d343fcf061a2..d07a92e9ef100 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock @@ -1,56 +1,59 @@ [[package]] name = "certifi" -version = "2020.11.8" +version = "2021.10.8" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false python-versions = "*" [[package]] -name = "chardet" -version = "3.0.4" -description = "Universal encoding detector for Python 2 and 3" +name = "charset-normalizer" +version = "2.0.9" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false -python-versions = "*" +python-versions = ">=3.5.0" + +[package.extras] +unicode_backport = ["unicodedata2"] [[package]] name = "idna" -version = "2.10" +version = "3.3" description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.5" [[package]] name = "pillow" -version = "6.2.2" +version = "8.4.0" description = "Python Imaging Library (Fork)" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" [[package]] name = "requests" -version = "2.23.0" +version = "2.26.0" description = "Python HTTP for Humans." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.dependencies] certifi = ">=2017.4.17" -chardet = ">=3.0.2,<4" -idna = ">=2.5,<3" -urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" +charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} +idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} +urllib3 = ">=1.21.1,<1.27" [package.extras] -security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] [[package]] name = "urllib3" -version = "1.25.11" +version = "1.26.7" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false @@ -63,60 +66,70 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [metadata] lock-version = "1.1" -python-versions = "^2.7" -content-hash = "033798f820d979d69232ab05eb36fb9d517a49e5a6887c6d0e709aea9671464d" +python-versions = "^3.6" +content-hash = "cf158be6b11f3c989228cb0acf2bbb120599853ed83b562d267bfc135eed126a" [metadata.files] certifi = [ - {file = "certifi-2020.11.8-py2.py3-none-any.whl", hash = "sha256:1f422849db327d534e3d0c5f02a263458c3955ec0aae4ff09b95f195c59f4edd"}, - {file = "certifi-2020.11.8.tar.gz", hash = "sha256:f05def092c44fbf25834a51509ef6e631dc19765ab8a57b4e7ab85531f0a9cf4"}, + {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, + {file = "certifi-2021.10.8.tar.gz", hash = "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"}, ] -chardet = [ - {file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"}, - {file = "chardet-3.0.4.tar.gz", hash = "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"}, +charset-normalizer = [ + {file = "charset-normalizer-2.0.9.tar.gz", hash = "sha256:b0b883e8e874edfdece9c28f314e3dd5badf067342e42fb162203335ae61aa2c"}, + {file = "charset_normalizer-2.0.9-py3-none-any.whl", hash = "sha256:1eecaa09422db5be9e29d7fc65664e6c33bd06f9ced7838578ba40d58bdf3721"}, ] idna = [ - {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, - {file = "idna-2.10.tar.gz", hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"}, + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, ] pillow = [ - {file = "Pillow-6.2.2-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:834dd023b7f987d6b700ad93dc818098d7eb046bd445e9992b3093c6f9d7a95f"}, - {file = "Pillow-6.2.2-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:d3a98444a00b4643b22b0685dbf9e0ddcaf4ebfd4ea23f84f228adf5a0765bb2"}, - {file = "Pillow-6.2.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2b4a94be53dff02af90760c10a2e3634c3c7703410f38c98154d5ce71fe63d20"}, - {file = "Pillow-6.2.2-cp27-cp27m-win32.whl", hash = "sha256:87ef0eca169f7f0bc050b22f05c7e174a65c36d584428431e802c0165c5856ea"}, - {file = "Pillow-6.2.2-cp27-cp27m-win_amd64.whl", hash = "sha256:cbd5647097dc55e501f459dbac7f1d0402225636deeb9e0a98a8d2df649fc19d"}, - {file = "Pillow-6.2.2-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:4adc3302df4faf77c63ab3a83e1a3e34b94a6a992084f4aa1cb236d1deaf4b39"}, - {file = "Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e3a797a079ce289e59dbd7eac9ca3bf682d52687f718686857281475b7ca8e6a"}, - {file = "Pillow-6.2.2-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:bb7861e4618a0c06c40a2e509c1bea207eea5fd4320d486e314e00745a402ca5"}, - {file = "Pillow-6.2.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:535e8e0e02c9f1fc2e307256149d6ee8ad3aa9a6e24144b7b6e6fb6126cb0e99"}, - {file = "Pillow-6.2.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:bc149dab804291a18e1186536519e5e122a2ac1316cb80f506e855a500b1cdd4"}, - {file = "Pillow-6.2.2-cp35-cp35m-win32.whl", hash = "sha256:1a3bc8e1db5af40a81535a62a591fafdb30a8a1b319798ea8052aa65ef8f06d2"}, - {file = "Pillow-6.2.2-cp35-cp35m-win_amd64.whl", hash = "sha256:d6b4dc325170bee04ca8292bbd556c6f5398d52c6149ca881e67daf62215426f"}, - {file = "Pillow-6.2.2-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:43ef1cff7ee57f9c8c8e6fa02a62eae9fa23a7e34418c7ce88c0e3fe09d1fb38"}, - {file = "Pillow-6.2.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:900de1fdc93764be13f6b39dc0dd0207d9ff441d87ad7c6e97e49b81987dc0f3"}, - {file = "Pillow-6.2.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:92b83b380f9181cacc994f4c983d95a9c8b00b50bf786c66d235716b526a3332"}, - {file = "Pillow-6.2.2-cp36-cp36m-win32.whl", hash = "sha256:00e0bbe9923adc5cc38a8da7d87d4ce16cde53b8d3bba8886cb928e84522d963"}, - {file = "Pillow-6.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:5ccfcb0a34ad9b77ad247c231edb781763198f405a5c8dc1b642449af821fb7f"}, - {file = "Pillow-6.2.2-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:5dcbbaa3a24d091a64560d3c439a8962866a79a033d40eb1a75f1b3413bfc2bc"}, - {file = "Pillow-6.2.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6e2a7e74d1a626b817ecb7a28c433b471a395c010b2a1f511f976e9ea4363e64"}, - {file = "Pillow-6.2.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:c424d35a5259be559b64490d0fd9e03fba81f1ce8e5b66e0a59de97547351d80"}, - {file = "Pillow-6.2.2-cp37-cp37m-win32.whl", hash = "sha256:aa4792ab056f51b49e7d59ce5733155e10a918baf8ce50f64405db23d5627fa2"}, - {file = "Pillow-6.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:0d5c99f80068f13231ac206bd9b2e80ea357f5cf9ae0fa97fab21e32d5b61065"}, - {file = "Pillow-6.2.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:03457e439d073770d88afdd90318382084732a5b98b0eb6f49454746dbaae701"}, - {file = "Pillow-6.2.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ccf16fe444cc43800eeacd4f4769971200982200a71b1368f49410d0eb769543"}, - {file = "Pillow-6.2.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:b72c39585f1837d946bd1a829a4820ccf86e361f28cbf60f5d646f06318b61e2"}, - {file = "Pillow-6.2.2-cp38-cp38-win32.whl", hash = "sha256:3ba7d8f1d962780f86aa747fef0baf3211b80cb13310fff0c375da879c0656d4"}, - {file = "Pillow-6.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:3e81485cec47c24f5fb27acb485a4fc97376b2b332ed633867dc68ac3077998c"}, - {file = "Pillow-6.2.2-pp273-pypy_73-win32.whl", hash = "sha256:aa1b0297e352007ec781a33f026afbb062a9a9895bb103c8f49af434b1666880"}, - {file = "Pillow-6.2.2-pp373-pypy36_pp73-win32.whl", hash = "sha256:82859575005408af81b3e9171ae326ff56a69af5439d3fc20e8cb76cd51c8246"}, - {file = "Pillow-6.2.2.tar.gz", hash = "sha256:db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950"}, + {file = "Pillow-8.4.0-cp310-cp310-macosx_10_10_universal2.whl", hash = "sha256:81f8d5c81e483a9442d72d182e1fb6dcb9723f289a57e8030811bac9ea3fef8d"}, + {file = "Pillow-8.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3f97cfb1e5a392d75dd8b9fd274d205404729923840ca94ca45a0af57e13dbe6"}, + {file = "Pillow-8.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb9fc393f3c61f9054e1ed26e6fe912c7321af2f41ff49d3f83d05bacf22cc78"}, + {file = "Pillow-8.4.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d82cdb63100ef5eedb8391732375e6d05993b765f72cb34311fab92103314649"}, + {file = "Pillow-8.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:62cc1afda735a8d109007164714e73771b499768b9bb5afcbbee9d0ff374b43f"}, + {file = "Pillow-8.4.0-cp310-cp310-win32.whl", hash = "sha256:e3dacecfbeec9a33e932f00c6cd7996e62f53ad46fbe677577394aaa90ee419a"}, + {file = "Pillow-8.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:620582db2a85b2df5f8a82ddeb52116560d7e5e6b055095f04ad828d1b0baa39"}, + {file = "Pillow-8.4.0-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:1bc723b434fbc4ab50bb68e11e93ce5fb69866ad621e3c2c9bdb0cd70e345f55"}, + {file = "Pillow-8.4.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:72cbcfd54df6caf85cc35264c77ede902452d6df41166010262374155947460c"}, + {file = "Pillow-8.4.0-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70ad9e5c6cb9b8487280a02c0ad8a51581dcbbe8484ce058477692a27c151c0a"}, + {file = "Pillow-8.4.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25a49dc2e2f74e65efaa32b153527fc5ac98508d502fa46e74fa4fd678ed6645"}, + {file = "Pillow-8.4.0-cp36-cp36m-win32.whl", hash = "sha256:93ce9e955cc95959df98505e4608ad98281fff037350d8c2671c9aa86bcf10a9"}, + {file = "Pillow-8.4.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2e4440b8f00f504ee4b53fe30f4e381aae30b0568193be305256b1462216feff"}, + {file = "Pillow-8.4.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:8c803ac3c28bbc53763e6825746f05cc407b20e4a69d0122e526a582e3b5e153"}, + {file = "Pillow-8.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c8a17b5d948f4ceeceb66384727dde11b240736fddeda54ca740b9b8b1556b29"}, + {file = "Pillow-8.4.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1394a6ad5abc838c5cd8a92c5a07535648cdf6d09e8e2d6df916dfa9ea86ead8"}, + {file = "Pillow-8.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:792e5c12376594bfcb986ebf3855aa4b7c225754e9a9521298e460e92fb4a488"}, + {file = "Pillow-8.4.0-cp37-cp37m-win32.whl", hash = "sha256:d99ec152570e4196772e7a8e4ba5320d2d27bf22fdf11743dd882936ed64305b"}, + {file = "Pillow-8.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:7b7017b61bbcdd7f6363aeceb881e23c46583739cb69a3ab39cb384f6ec82e5b"}, + {file = "Pillow-8.4.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:d89363f02658e253dbd171f7c3716a5d340a24ee82d38aab9183f7fdf0cdca49"}, + {file = "Pillow-8.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0a0956fdc5defc34462bb1c765ee88d933239f9a94bc37d132004775241a7585"}, + {file = "Pillow-8.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b7bb9de00197fb4261825c15551adf7605cf14a80badf1761d61e59da347779"}, + {file = "Pillow-8.4.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:72b9e656e340447f827885b8d7a15fc8c4e68d410dc2297ef6787eec0f0ea409"}, + {file = "Pillow-8.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5a4532a12314149d8b4e4ad8ff09dde7427731fcfa5917ff16d0291f13609df"}, + {file = "Pillow-8.4.0-cp38-cp38-win32.whl", hash = "sha256:82aafa8d5eb68c8463b6e9baeb4f19043bb31fefc03eb7b216b51e6a9981ae09"}, + {file = "Pillow-8.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:066f3999cb3b070a95c3652712cffa1a748cd02d60ad7b4e485c3748a04d9d76"}, + {file = "Pillow-8.4.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:5503c86916d27c2e101b7f71c2ae2cddba01a2cf55b8395b0255fd33fa4d1f1a"}, + {file = "Pillow-8.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4acc0985ddf39d1bc969a9220b51d94ed51695d455c228d8ac29fcdb25810e6e"}, + {file = "Pillow-8.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b052a619a8bfcf26bd8b3f48f45283f9e977890263e4571f2393ed8898d331b"}, + {file = "Pillow-8.4.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:493cb4e415f44cd601fcec11c99836f707bb714ab03f5ed46ac25713baf0ff20"}, + {file = "Pillow-8.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8831cb7332eda5dc89b21a7bce7ef6ad305548820595033a4b03cf3091235ed"}, + {file = "Pillow-8.4.0-cp39-cp39-win32.whl", hash = "sha256:5e9ac5f66616b87d4da618a20ab0a38324dbe88d8a39b55be8964eb520021e02"}, + {file = "Pillow-8.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:3eb1ce5f65908556c2d8685a8f0a6e989d887ec4057326f6c22b24e8a172c66b"}, + {file = "Pillow-8.4.0-pp36-pypy36_pp73-macosx_10_10_x86_64.whl", hash = "sha256:ddc4d832a0f0b4c52fff973a0d44b6c99839a9d016fe4e6a1cb8f3eea96479c2"}, + {file = "Pillow-8.4.0-pp36-pypy36_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9a3e5ddc44c14042f0844b8cf7d2cd455f6cc80fd7f5eefbe657292cf601d9ad"}, + {file = "Pillow-8.4.0-pp36-pypy36_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c70e94281588ef053ae8998039610dbd71bc509e4acbc77ab59d7d2937b10698"}, + {file = "Pillow-8.4.0-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:3862b7256046fcd950618ed22d1d60b842e3a40a48236a5498746f21189afbbc"}, + {file = "Pillow-8.4.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a4901622493f88b1a29bd30ec1a2f683782e57c3c16a2dbc7f2595ba01f639df"}, + {file = "Pillow-8.4.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:84c471a734240653a0ec91dec0996696eea227eafe72a33bd06c92697728046b"}, + {file = "Pillow-8.4.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:244cf3b97802c34c41905d22810846802a3329ddcb93ccc432870243211c79fc"}, + {file = "Pillow-8.4.0.tar.gz", hash = "sha256:b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed"}, ] requests = [ - {file = "requests-2.23.0-py2.7.egg", hash = "sha256:5d2d0ffbb515f39417009a46c14256291061ac01ba8f875b90cad137de83beb4"}, - {file = "requests-2.23.0-py2.py3-none-any.whl", hash = "sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee"}, - {file = "requests-2.23.0.tar.gz", hash = "sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6"}, + {file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"}, + {file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"}, ] urllib3 = [ - {file = "urllib3-1.25.11-py2.py3-none-any.whl", hash = "sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e"}, - {file = "urllib3-1.25.11.tar.gz", hash = "sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2"}, + {file = "urllib3-1.26.7-py2.py3-none-any.whl", hash = "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844"}, + {file = "urllib3-1.26.7.tar.gz", hash = "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece"}, ] diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml index 15fec8cc54bec..c4dd461c007a7 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml @@ -5,9 +5,9 @@ description = "" authors = ["Your Name "] [tool.poetry.dependencies] -python = "^2.7" -requests = "2.23.0" -pillow = "6.2.2" +python = "^3.6" +requests = "2.26.0" +Pillow = "8.4.0" [tool.poetry.dev-dependencies] diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-project/shared/requirements.txt b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-project/shared/requirements.txt index 149a1792d9cdb..d87aff1f66a75 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-project/shared/requirements.txt +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-project/shared/requirements.txt @@ -2,8 +2,7 @@ certifi==2020.6.20 chardet==3.0.4 idna==2.10 -urllib3==1.25.11 +urllib3==1.26.7 # Requests used by this lambda -requests==2.23.0 -# Pillow 6.x so that python 2.7 and 3.x can both use this fixture -pillow==8.3.2 +requests==2.26.0 +Pillow==8.4.0 diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/requirements.txt b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/requirements.txt index 149a1792d9cdb..c636db83b8c9e 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/requirements.txt +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/requirements.txt @@ -2,8 +2,8 @@ certifi==2020.6.20 chardet==3.0.4 idna==2.10 -urllib3==1.25.11 +urllib3==1.26.7 # Requests used by this lambda -requests==2.23.0 +requests==2.26.0 # Pillow 6.x so that python 2.7 and 3.x can both use this fixture -pillow==8.3.2 +Pillow==8.4.0 diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index 13a5b81dd35e0..f6c95dfe0d68f 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -411,6 +411,19 @@ new lambda.Function(this, 'MyFunction', { }); ``` +If you are deploying an ARM_64 Lambda Function, you must specify a +Lambda Insights Version >= `1_0_119_0`. + +```ts +new lambda.Function(this, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + handler: 'index.handler', + architecture: lambda.Architecture.ARM_64, + code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')), + insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_119_0, +}); +``` + ## Event Rule Target You can use an AWS Lambda function as a target for an Amazon CloudWatch event diff --git a/packages/@aws-cdk/aws-lambda/lib/alias.ts b/packages/@aws-cdk/aws-lambda/lib/alias.ts index e497ad2e29071..36fdbdfcc2eaf 100644 --- a/packages/@aws-cdk/aws-lambda/lib/alias.ts +++ b/packages/@aws-cdk/aws-lambda/lib/alias.ts @@ -3,6 +3,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; import { ArnFormat } from '@aws-cdk/core'; import { Construct } from 'constructs'; +import { Architecture } from './architecture'; import { EventInvokeConfigOptions } from './event-invoke-config'; import { IFunction, QualifiedFunctionBase } from './function-base'; import { extractQualifierFromArn, IVersion } from './lambda-version'; @@ -97,6 +98,7 @@ export class Alias extends QualifiedFunctionBase implements IAlias { public readonly functionName = `${attrs.aliasVersion.lambda.functionName}:${attrs.aliasName}`; public readonly grantPrincipal = attrs.aliasVersion.grantPrincipal; public readonly role = attrs.aliasVersion.role; + public readonly architecture = attrs.aliasVersion.lambda.architecture; protected readonly canCreatePermissions = this._isStackAccount(); protected readonly qualifier = attrs.aliasName; @@ -120,6 +122,8 @@ export class Alias extends QualifiedFunctionBase implements IAlias { public readonly lambda: IFunction; + public readonly architecture: Architecture; + public readonly version: IVersion; /** @@ -145,6 +149,7 @@ export class Alias extends QualifiedFunctionBase implements IAlias { this.lambda = props.version.lambda; this.aliasName = this.physicalName; this.version = props.version; + this.architecture = this.lambda.architecture; const alias = new CfnAlias(this, 'Resource', { name: this.aliasName, diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index 08b53b6a4cc98..373194e4a87e0 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -4,6 +4,7 @@ import * as iam from '@aws-cdk/aws-iam'; import { ArnFormat, IResource, Resource, Token } from '@aws-cdk/core'; import { Node } from 'constructs'; import { AliasOptions } from './alias'; +import { Architecture } from './architecture'; import { EventInvokeConfig, EventInvokeConfigOptions } from './event-invoke-config'; import { IEventSource } from './event-source'; import { EventSourceMapping, EventSourceMappingOptions } from './event-source-mapping'; @@ -57,6 +58,11 @@ export interface IFunction extends IResource, ec2.IConnectable, iam.IGrantable { */ readonly permissionsNode: Node; + /** + * The system architectures compatible with this lambda function. + */ + readonly architecture: Architecture; + /** * Adds an event source that maps to this AWS Lambda function. * @param id construct ID @@ -174,6 +180,12 @@ export interface FunctionAttributes { * For environment-agnostic stacks this will default to `false`. */ readonly sameEnvironment?: boolean; + + /** + * The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64). + * @default - Architecture.X86_64 + */ + readonly architecture?: Architecture; } export abstract class FunctionBase extends Resource implements IFunction, ec2.IClientVpnConnectionHandler { @@ -204,6 +216,11 @@ export abstract class FunctionBase extends Resource implements IFunction, ec2.IC */ public abstract readonly permissionsNode: Node; + /** + * The architecture of this Lambda Function. + */ + public abstract readonly architecture: Architecture; + /** * Whether the addPermission() call adds any permissions * @@ -522,6 +539,10 @@ class LatestVersion extends FunctionBase implements IVersion { return `${this.lambda.functionName}:${this.version}`; } + public get architecture() { + return this.lambda.architecture; + } + public get grantPrincipal() { return this.lambda.grantPrincipal; } diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index 564e45d5a9460..3b5df3c5c5c41 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -450,6 +450,7 @@ export class Function extends FunctionBase { public readonly grantPrincipal: iam.IPrincipal; public readonly role = role; public readonly permissionsNode = this.node; + public readonly architecture = attrs.architecture ?? Architecture.X86_64; protected readonly canCreatePermissions = attrs.sameEnvironment ?? this._isStackAccount(); @@ -576,7 +577,7 @@ export class Function extends FunctionBase { /** * The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64). */ - public readonly architecture?: Architecture; + public readonly architecture: Architecture; /** * The timeout configured for this lambda. @@ -600,6 +601,8 @@ export class Function extends FunctionBase { private readonly currentVersionOptions?: VersionOptions; private _currentVersion?: Version; + private _architecture?: Architecture; + constructor(scope: Construct, id: string, props: FunctionProps) { super(scope, id, { physicalName: props.functionName, @@ -683,7 +686,7 @@ export class Function extends FunctionBase { if (props.architectures && props.architectures.length > 1) { throw new Error('Only one architecture must be specified.'); } - const architecture = props.architecture ?? (props.architectures && props.architectures[0]); + this._architecture = props.architecture ?? (props.architectures && props.architectures[0]); const resource: CfnFunction = new CfnFunction(this, 'Resource', { functionName: this.physicalName, @@ -717,7 +720,7 @@ export class Function extends FunctionBase { kmsKeyArn: props.environmentEncryption?.keyArn, fileSystemConfigs, codeSigningConfigArn: props.codeSigningConfig?.codeSigningConfigArn, - architectures: architecture ? [architecture.name] : undefined, + architectures: this._architecture ? [this._architecture.name] : undefined, }); resource.node.addDependency(this.role); @@ -733,7 +736,7 @@ export class Function extends FunctionBase { this.runtime = props.runtime; this.timeout = props.timeout; - this.architecture = props.architecture; + this.architecture = props.architecture ?? Architecture.X86_64; if (props.layers) { if (props.runtime === Runtime.FROM_IMAGE) { @@ -935,7 +938,7 @@ Environment variables can be marked for removal when used in Lambda@Edge by sett if (props.runtime !== Runtime.FROM_IMAGE) { // Layers cannot be added to Lambda container images. The image should have the insights agent installed. // See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-Getting-Started-docker.html - this.addLayers(LayerVersion.fromLayerVersionArn(this, 'LambdaInsightsLayer', props.insightsVersion.layerVersionArn)); + this.addLayers(LayerVersion.fromLayerVersionArn(this, 'LambdaInsightsLayer', props.insightsVersion._bind(this, this).arn)); } this.role?.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('CloudWatchLambdaInsightsExecutionRolePolicy')); } diff --git a/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts b/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts index 2d2b88511786e..c4dacfbde0149 100644 --- a/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts +++ b/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts @@ -1,9 +1,23 @@ import { Aws, CfnMapping, Fn, IResolveContext, Lazy, Stack, Token } from '@aws-cdk/core'; import { FactName, RegionInfo } from '@aws-cdk/region-info'; +import { Construct } from 'constructs'; +import { Architecture } from './architecture'; +import { IFunction } from './function-base'; + // This is the name of the mapping that will be added to the CloudFormation template, if a stack is region agnostic const DEFAULT_MAPPING_PREFIX = 'LambdaInsightsVersions'; +/** + * Config returned from {@link LambdaInsightsVersion._bind} + */ +interface InsightsBindConfig { + /** + * ARN of the Lambda Insights Layer Version + */ + readonly arn: string; +} + // To add new versions, update fact-tables.ts `CLOUDWATCH_LAMBDA_INSIGHTS_ARNS` and create a new `public static readonly VERSION_A_B_C_D` /** @@ -31,6 +45,11 @@ export abstract class LambdaInsightsVersion { */ public static readonly VERSION_1_0_98_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.98.0'); + /** + * Version 1.0.119.0 + */ + public static readonly VERSION_1_0_119_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.119.0'); + /** * Use the insights extension associated with the provided ARN. Make sure the ARN is associated * with same region as your function @@ -40,6 +59,9 @@ export abstract class LambdaInsightsVersion { public static fromInsightVersionArn(arn: string): LambdaInsightsVersion { class InsightsArn extends LambdaInsightsVersion { public readonly layerVersionArn = arn; + public _bind(_scope: Construct, _function: IFunction): InsightsBindConfig { + return { arn }; + } } return new InsightsArn(); } @@ -47,16 +69,25 @@ export abstract class LambdaInsightsVersion { // Use the verison to build the object. Not meant to be called by the user -- user should use e.g. VERSION_1_0_54_0 private static fromInsightsVersion(insightsVersion: string): LambdaInsightsVersion { - // Check if insights version is valid. This should only happen if one of the public static readonly versions are set incorrectly - const versionExists = RegionInfo.regions.some(regionInfo => regionInfo.cloudwatchLambdaInsightsArn(insightsVersion)); - if (!versionExists) { - throw new Error(`Insights version ${insightsVersion} does not exist.`); - } - class InsightsVersion extends LambdaInsightsVersion { public readonly layerVersionArn = Lazy.uncachedString({ produce: (context) => getVersionArn(context, insightsVersion), }); + + public _bind(_scope: Construct, _function: IFunction): InsightsBindConfig { + const arch = _function.architecture?.name ?? Architecture.X86_64.name; + // Check if insights version is valid. This should only happen if one of the public static readonly versions are set incorrectly + // or if the version is not available for the Lambda Architecture + const versionExists = RegionInfo.regions.some(regionInfo => regionInfo.cloudwatchLambdaInsightsArn(insightsVersion, arch)); + if (!versionExists) { + throw new Error(`Insights version ${insightsVersion} does not exist.`); + } + return { + arn: Lazy.uncachedString({ + produce: (context) => getVersionArn(context, insightsVersion, arch), + }), + }; + } } return new InsightsVersion(); } @@ -65,6 +96,13 @@ export abstract class LambdaInsightsVersion { * The arn of the Lambda Insights extension */ public readonly layerVersionArn: string = ''; + + /** + * Returns the arn of the Lambda Insights extension based on the + * Lambda architecture + * @internal + */ + public abstract _bind(_scope: Construct, _function: IFunction): InsightsBindConfig; } /** @@ -73,14 +111,15 @@ export abstract class LambdaInsightsVersion { * * This function is run on CDK synthesis. */ -function getVersionArn(context: IResolveContext, insightsVersion: string): string { +function getVersionArn(context: IResolveContext, insightsVersion: string, architecture?: string): string { const scopeStack = Stack.of(context.scope); const region = scopeStack.region; + const arch = architecture ?? Architecture.X86_64.name; // Region is defined, look up the arn, or throw an error if the version isn't supported by a region if (region !== undefined && !Token.isUnresolved(region)) { - const arn = RegionInfo.get(region).cloudwatchLambdaInsightsArn(insightsVersion); + const arn = RegionInfo.get(region).cloudwatchLambdaInsightsArn(insightsVersion, arch); if (arn === undefined) { throw new Error(`Insights version ${insightsVersion} is not supported in region ${region}`); } @@ -116,19 +155,33 @@ function getVersionArn(context: IResolveContext, insightsVersion: string): strin * -- {'arn': 'arn3'}, * - us-east-2 * -- {'arn': 'arn4'} + * LambdaInsightsVersions101190arm64 // a separate mapping version 1.0.119.0 arm64 + * - us-east-1 + * -- {'arn': 'arn3'}, + * - us-east-2 + * -- {'arn': 'arn4'} */ - const mapName = DEFAULT_MAPPING_PREFIX + insightsVersion.split('.').join(''); + let mapName = DEFAULT_MAPPING_PREFIX + insightsVersion.split('.').join(''); + // if the architecture is arm64 then append that to the end of the name + // this is so that we can have a separate mapping for x86 vs arm in scenarios + // where we have Lambda functions with both architectures in the same stack + if (arch === Architecture.ARM_64.name) { + mapName += arch; + } const mapping: { [k1: string]: { [k2: string]: any } } = {}; - const region2arns = RegionInfo.regionMap(FactName.cloudwatchLambdaInsightsVersion(insightsVersion)); + const region2arns = RegionInfo.regionMap(FactName.cloudwatchLambdaInsightsVersion(insightsVersion, arch)); for (const [reg, arn] of Object.entries(region2arns)) { mapping[reg] = { arn }; } // Only create a given mapping once. If another version of insights is used elsewhere, that mapping will also exist if (!scopeStack.node.tryFindChild(mapName)) { - new CfnMapping(scopeStack, mapName, { mapping }); + // need to call findInMap here if we are going to set lazy=true, otherwise + // we get the informLazyUse info message + const map = new CfnMapping(scopeStack, mapName, { mapping, lazy: true }); + return map.findInMap(Aws.REGION, 'arn'); } // The ARN will be looked up at deployment time from the mapping we created return Fn.findInMap(mapName, Aws.REGION, 'arn'); -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts index 94f3e0b326b16..dbbd1496d8d8c 100644 --- a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts +++ b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts @@ -2,6 +2,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import { Fn, Lazy, RemovalPolicy } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { Alias, AliasOptions } from './alias'; +import { Architecture } from './architecture'; import { EventInvokeConfigOptions } from './event-invoke-config'; import { Function } from './function'; import { IFunction, QualifiedFunctionBase } from './function-base'; @@ -127,11 +128,12 @@ export class Version extends QualifiedFunctionBase implements IVersion { public readonly functionArn = versionArn; public readonly grantPrincipal = lambda.grantPrincipal; public readonly role = lambda.role; + public readonly architecture = lambda.architecture; protected readonly qualifier = version; protected readonly canCreatePermissions = this._isStackAccount(); - public addAlias(name: string, opts: AliasOptions = { }): Alias { + public addAlias(name: string, opts: AliasOptions = {}): Alias { return addAlias(this, this, name, opts); } @@ -153,11 +155,12 @@ export class Version extends QualifiedFunctionBase implements IVersion { public readonly functionArn = `${attrs.lambda.functionArn}:${attrs.version}`; public readonly grantPrincipal = attrs.lambda.grantPrincipal; public readonly role = attrs.lambda.role; + public readonly architecture = attrs.lambda.architecture; protected readonly qualifier = attrs.version; protected readonly canCreatePermissions = this._isStackAccount(); - public addAlias(name: string, opts: AliasOptions = { }): Alias { + public addAlias(name: string, opts: AliasOptions = {}): Alias { return addAlias(this, this, name, opts); } @@ -175,6 +178,7 @@ export class Version extends QualifiedFunctionBase implements IVersion { public readonly lambda: IFunction; public readonly functionArn: string; public readonly functionName: string; + public readonly architecture: Architecture; protected readonly qualifier: string; protected readonly canCreatePermissions = true; @@ -183,6 +187,7 @@ export class Version extends QualifiedFunctionBase implements IVersion { super(scope, id); this.lambda = props.lambda; + this.architecture = props.lambda.architecture; const version = new CfnVersion(this, 'Resource', { codeSha256: props.codeSha256, @@ -239,7 +244,7 @@ export class Version extends QualifiedFunctionBase implements IVersion { * @param aliasName The name of the alias (e.g. "live") * @param options Alias options */ - public addAlias(aliasName: string, options: AliasOptions = { }): Alias { + public addAlias(aliasName: string, options: AliasOptions = {}): Alias { return addAlias(this, this, aliasName, options); } diff --git a/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts b/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts index dd9f10eb8d005..99d5af21017d1 100644 --- a/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts +++ b/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts @@ -3,6 +3,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; import { Construct, IConstruct, IDependable, Node } from 'constructs'; +import { Architecture } from './architecture'; import { Function as LambdaFunction, FunctionProps, EnvironmentOptions } from './function'; import { FunctionBase } from './function-base'; import { Version } from './lambda-version'; @@ -50,6 +51,7 @@ export class SingletonFunction extends FunctionBase { public readonly functionArn: string; public readonly role?: iam.IRole; public readonly permissionsNode: Node; + public readonly architecture: Architecture; /** * The runtime environment for the Lambda function. @@ -64,6 +66,7 @@ export class SingletonFunction extends FunctionBase { this.lambdaFunction = this.ensureLambda(props); this.permissionsNode = this.lambdaFunction.node; + this.architecture = this.lambdaFunction.architecture; this.functionArn = this.lambdaFunction.functionArn; this.functionName = this.lambdaFunction.functionName; diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 453a04ea7625c..a7eeb8dc66028 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -90,10 +90,10 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cfnspec": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", "@types/lodash": "^4.14.177", - "jest": "^27.3.1", + "jest": "^27.4.3", "lodash": "^4.17.21" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda/test/code.test.ts b/packages/@aws-cdk/aws-lambda/test/code.test.ts index 8641140584dae..281ec79c7a11d 100644 --- a/packages/@aws-cdk/aws-lambda/test/code.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/code.test.ts @@ -78,7 +78,6 @@ describe('code', () => { expect(stack).toHaveResource('AWS::Lambda::Function', { Metadata: { [cxapi.ASSET_RESOURCE_METADATA_PATH_KEY]: 'asset.9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232', - [cxapi.ASSET_RESOURCE_METADATA_ORIGINAL_PATH_KEY]: location, [cxapi.ASSET_RESOURCE_METADATA_IS_BUNDLED_KEY]: false, [cxapi.ASSET_RESOURCE_METADATA_PROPERTY_KEY]: 'Code', }, @@ -440,9 +439,8 @@ describe('code', () => { stack.node.setContext(cxapi.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT, true); // when - const FunctionCodepath = path.join(__dirname, 'docker-build-lambda'); new lambda.Function(stack, 'Fn', { - code: lambda.Code.fromDockerBuild(FunctionCodepath), + code: lambda.Code.fromDockerBuild(path.join(__dirname, 'docker-build-lambda')), handler: 'index.handler', runtime: lambda.Runtime.NODEJS_12_X, }); @@ -451,7 +449,6 @@ describe('code', () => { expect(stack).toHaveResource('AWS::Lambda::Function', { Metadata: { [cxapi.ASSET_RESOURCE_METADATA_PATH_KEY]: 'asset.fbafdbb9ae8d1bae0def415b791a93c486d18ebc63270c748abecc3ac0ab9533', - [cxapi.ASSET_RESOURCE_METADATA_ORIGINAL_PATH_KEY]: FunctionCodepath, [cxapi.ASSET_RESOURCE_METADATA_IS_BUNDLED_KEY]: false, [cxapi.ASSET_RESOURCE_METADATA_PROPERTY_KEY]: 'Code', }, diff --git a/packages/@aws-cdk/aws-lambda/test/function.test.ts b/packages/@aws-cdk/aws-lambda/test/function.test.ts index ecb53adb2b234..c463e5aaadbaa 100644 --- a/packages/@aws-cdk/aws-lambda/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/function.test.ts @@ -158,7 +158,7 @@ describe('function', () => { 'Arn', ], }, - Runtime: 'python2.7', + Runtime: 'python3.9', }, DependsOn: [ 'MyLambdaServiceRole4539ECB6', @@ -2282,6 +2282,6 @@ function newTestLambda(scope: constructs.Construct) { return new lambda.Function(scope, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'bar', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); } diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.expected.json index 7c6fabf1b1fa2..e0975af7723cd 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.expected.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.expected.json @@ -67,7 +67,7 @@ ] } ], - "Runtime": "nodejs10.x" + "Runtime": "nodejs14.x" }, "DependsOn": [ "MyFunc1ServiceRoleF96C5B5C" @@ -140,7 +140,7 @@ ] } ], - "Runtime": "nodejs10.x" + "Runtime": "nodejs14.x" }, "DependsOn": [ "MyFunc2ServiceRole68E50443" @@ -213,7 +213,7 @@ ] } ], - "Runtime": "nodejs10.x" + "Runtime": "nodejs14.x" }, "DependsOn": [ "MyFunc3ServiceRoleA69795ED" @@ -286,11 +286,160 @@ ] } ], - "Runtime": "nodejs10.x" + "Runtime": "nodejs14.x" }, "DependsOn": [ "MyFunc4ServiceRole93C4DEFF" ] + }, + "MyFunc5ServiceRoleFE4CE92B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" + ] + ] + } + ] + } + }, + "MyFunc586573B53": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" + }, + "Role": { + "Fn::GetAtt": [ + "MyFunc5ServiceRoleFE4CE92B", + "Arn" + ] + }, + "Handler": "index.handler", + "Layers": [ + { + "Fn::FindInMap": [ + "LambdaInsightsVersions101190", + { + "Ref": "AWS::Region" + }, + "arn" + ] + } + ], + "Runtime": "nodejs14.x" + }, + "DependsOn": [ + "MyFunc5ServiceRoleFE4CE92B" + ] + }, + "MyFunc6ServiceRoleCDDBC2C6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" + ] + ] + } + ] + } + }, + "MyFunc60D944984": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" + }, + "Role": { + "Fn::GetAtt": [ + "MyFunc6ServiceRoleCDDBC2C6", + "Arn" + ] + }, + "Architectures": [ + "arm64" + ], + "Handler": "index.handler", + "Layers": [ + { + "Fn::FindInMap": [ + "LambdaInsightsVersions101190arm64", + { + "Ref": "AWS::Region" + }, + "arn" + ] + } + ], + "Runtime": "nodejs14.x" + }, + "DependsOn": [ + "MyFunc6ServiceRoleCDDBC2C6" + ] } }, "Mappings": { @@ -511,6 +660,106 @@ "us-west-2": { "arn": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:14" } + }, + "LambdaInsightsVersions101190": { + "af-south-1": { + "arn": "arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:9" + }, + "ap-east-1": { + "arn": "arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:9" + }, + "ap-northeast-1": { + "arn": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:23" + }, + "ap-northeast-2": { + "arn": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:16" + }, + "ap-south-1": { + "arn": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "ap-southeast-1": { + "arn": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "ap-southeast-2": { + "arn": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:16" + }, + "ca-central-1": { + "arn": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "cn-north-1": { + "arn": "arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:9" + }, + "cn-northwest-1": { + "arn": "arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:9" + }, + "eu-central-1": { + "arn": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "eu-north-1": { + "arn": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "eu-south-1": { + "arn": "arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:9" + }, + "eu-west-1": { + "arn": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "eu-west-2": { + "arn": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:16" + }, + "eu-west-3": { + "arn": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:16" + }, + "me-south-1": { + "arn": "arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:9" + }, + "sa-east-1": { + "arn": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "us-east-1": { + "arn": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "us-east-2": { + "arn": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:16" + }, + "us-west-1": { + "arn": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:16" + }, + "us-west-2": { + "arn": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:16" + } + }, + "LambdaInsightsVersions101190arm64": { + "ap-northeast-1": { + "arn": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "ap-south-1": { + "arn": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "ap-southeast-1": { + "arn": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "ap-southeast-2": { + "arn": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "eu-central-1": { + "arn": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "eu-west-1": { + "arn": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "eu-west-2": { + "arn": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "us-east-1": { + "arn": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "us-east-2": { + "arn": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:1" + }, + "us-west-2": { + "arn": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.ts b/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.ts index 78cf8d74106ed..8fce7e06fdd97 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.ts @@ -6,33 +6,48 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'stack'); new lambda.Function(stack, 'MyFunc1', { - runtime: lambda.Runtime.NODEJS_10_X, + runtime: lambda.Runtime.NODEJS_14_X, handler: 'index.handler', code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`), insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_54_0, }); new lambda.Function(stack, 'MyFunc2', { - runtime: lambda.Runtime.NODEJS_10_X, + runtime: lambda.Runtime.NODEJS_14_X, handler: 'index.handler', code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`), insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_86_0, }); new lambda.Function(stack, 'MyFunc3', { - runtime: lambda.Runtime.NODEJS_10_X, + runtime: lambda.Runtime.NODEJS_14_X, handler: 'index.handler', code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`), insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_89_0, }); new lambda.Function(stack, 'MyFunc4', { - runtime: lambda.Runtime.NODEJS_10_X, + runtime: lambda.Runtime.NODEJS_14_X, handler: 'index.handler', code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`), insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_98_0, }); +new lambda.Function(stack, 'MyFunc5', { + runtime: lambda.Runtime.NODEJS_14_X, + handler: 'index.handler', + code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`), + insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_119_0, +}); + +new lambda.Function(stack, 'MyFunc6', { + runtime: lambda.Runtime.NODEJS_14_X, + architecture: lambda.Architecture.ARM_64, + handler: 'index.handler', + code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`), + insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_119_0, +}); + app.synth(); /* eslint-disable no-console */ diff --git a/packages/@aws-cdk/aws-lambda/test/lambda-insights.test.ts b/packages/@aws-cdk/aws-lambda/test/lambda-insights.test.ts index 762df158da6f4..29bfee2f02615 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda-insights.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/lambda-insights.test.ts @@ -7,11 +7,17 @@ import * as lambda from '../lib'; /** * Boilerplate code to create a Function with a given insights version */ -function functionWithInsightsVersion(stack: cdk.Stack, id: string, insightsVersion: lambda.LambdaInsightsVersion): lambda.IFunction { +function functionWithInsightsVersion( + stack: cdk.Stack, + id: string, + insightsVersion: lambda.LambdaInsightsVersion, + architecture?: lambda.Architecture, +): lambda.IFunction { return new lambda.Function(stack, id, { code: new lambda.InlineCode('foo'), handler: 'index.handler', runtime: lambda.Runtime.NODEJS_10_X, + architecture, insightsVersion, }); } @@ -337,7 +343,7 @@ describe('lambda-insights', () => { ], }, 'ManagedPolicyArns': [ - { }, + {}, { 'Fn::Join': [ '', @@ -353,4 +359,304 @@ describe('lambda-insights', () => { ], }); }); + + test('can use with arm architecture', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack', { + env: { account: '123456789012', region: 'us-east-1' }, + }); + functionWithInsightsVersion(stack, 'MyLambda', lambda.LambdaInsightsVersion.VERSION_1_0_119_0, lambda.Architecture.ARM_64); + + expect(stack).toHaveResource('AWS::Lambda::Function', { + Layers: ['arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:1'], + }); + + // On synthesis it should not throw an error + expect(() => app.synth()).not.toThrow(); + }); + + test('throws if arm is not available in this version', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack', { + env: { account: '123456789012', region: 'us-east-1' }, + }); + expect(() => functionWithInsightsVersion(stack, 'MyLambda', lambda.LambdaInsightsVersion.VERSION_1_0_98_0, lambda.Architecture.ARM_64)).toThrow('Insights version 1.0.98.0 does not exist.'); + }); + test('throws if arm is available in this version, but not in this region', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack', { + env: { account: '123456789012', region: 'us-west-1' }, + }); + functionWithInsightsVersion(stack, 'MyLambda', lambda.LambdaInsightsVersion.VERSION_1_0_119_0, lambda.Architecture.ARM_64); + + // On synthesis it should not throw an error + expect(() => app.synth()).toThrow('Insights version 1.0.119.0 is not supported in region us-west-1'); + }); + + test('can create two functions, with different architectures in a region agnostic stack with the same version', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack', {}); + + functionWithInsightsVersion(stack, 'MyLambda1', lambda.LambdaInsightsVersion.VERSION_1_0_119_0); + functionWithInsightsVersion(stack, 'MyLambda2', lambda.LambdaInsightsVersion.VERSION_1_0_119_0, lambda.Architecture.ARM_64); + + /* eslint-disable quote-props */ + expect(stack).toMatchTemplate({ + Resources: { + MyLambda1ServiceRole69A7E1EA: { + 'Type': 'AWS::IAM::Role', + 'Properties': { + 'AssumeRolePolicyDocument': { + 'Statement': [ + { + 'Action': 'sts:AssumeRole', + 'Effect': 'Allow', + 'Principal': { + 'Service': 'lambda.amazonaws.com', + }, + }, + ], + 'Version': '2012-10-17', + }, + 'ManagedPolicyArns': [ + { + 'Fn::Join': [ + '', + [ + 'arn:', + { + 'Ref': 'AWS::Partition', + }, + ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole', + ], + ], + }, + { + 'Fn::Join': [ + '', + [ + 'arn:', + { + 'Ref': 'AWS::Partition', + }, + ':iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy', + ], + ], + }, + ], + }, + }, + MyLambda1AAFB4554: { + 'Type': 'AWS::Lambda::Function', + 'Properties': { + 'Code': { + 'ZipFile': 'foo', + }, + 'Role': { + 'Fn::GetAtt': [ + 'MyLambda1ServiceRole69A7E1EA', + 'Arn', + ], + }, + 'Handler': 'index.handler', + 'Layers': [ + { + 'Fn::FindInMap': [ + 'LambdaInsightsVersions101190', + { + 'Ref': 'AWS::Region', + }, + 'arn', + ], + }, + ], + 'Runtime': 'nodejs10.x', + }, + 'DependsOn': [ + 'MyLambda1ServiceRole69A7E1EA', + ], + }, + MyLambda2ServiceRoleD09B370C: { + 'Type': 'AWS::IAM::Role', + 'Properties': { + 'AssumeRolePolicyDocument': { + 'Statement': [ + { + 'Action': 'sts:AssumeRole', + 'Effect': 'Allow', + 'Principal': { + 'Service': 'lambda.amazonaws.com', + }, + }, + ], + 'Version': '2012-10-17', + }, + 'ManagedPolicyArns': [ + { + 'Fn::Join': [ + '', + [ + 'arn:', + { + 'Ref': 'AWS::Partition', + }, + ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole', + ], + ], + }, + { + 'Fn::Join': [ + '', + [ + 'arn:', + { + 'Ref': 'AWS::Partition', + }, + ':iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy', + ], + ], + }, + ], + }, + }, + MyLambda2254B54D5: { + 'Type': 'AWS::Lambda::Function', + 'Properties': { + 'Code': { + 'ZipFile': 'foo', + }, + 'Role': { + 'Fn::GetAtt': [ + 'MyLambda2ServiceRoleD09B370C', + 'Arn', + ], + }, + 'Architectures': [ + 'arm64', + ], + 'Handler': 'index.handler', + 'Layers': [ + { + 'Fn::FindInMap': [ + 'LambdaInsightsVersions101190arm64', + { + 'Ref': 'AWS::Region', + }, + 'arn', + ], + }, + ], + 'Runtime': 'nodejs10.x', + }, + 'DependsOn': [ + 'MyLambda2ServiceRoleD09B370C', + ], + }, + }, + Mappings: { + LambdaInsightsVersions101190: { + 'af-south-1': { + 'arn': 'arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:9', + }, + 'ap-east-1': { + 'arn': 'arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:9', + }, + 'ap-northeast-1': { + 'arn': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:23', + }, + 'ap-northeast-2': { + 'arn': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:16', + }, + 'ap-south-1': { + 'arn': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'ap-southeast-1': { + 'arn': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'ap-southeast-2': { + 'arn': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:16', + }, + 'ca-central-1': { + 'arn': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'cn-north-1': { + 'arn': 'arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:9', + }, + 'cn-northwest-1': { + 'arn': 'arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:9', + }, + 'eu-central-1': { + 'arn': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'eu-north-1': { + 'arn': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'eu-south-1': { + 'arn': 'arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:9', + }, + 'eu-west-1': { + 'arn': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'eu-west-2': { + 'arn': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:16', + }, + 'eu-west-3': { + 'arn': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:16', + }, + 'me-south-1': { + 'arn': 'arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:9', + }, + 'sa-east-1': { + 'arn': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'us-east-1': { + 'arn': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'us-east-2': { + 'arn': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:16', + }, + 'us-west-1': { + 'arn': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:16', + }, + 'us-west-2': { + 'arn': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:16', + }, + }, + 'LambdaInsightsVersions101190arm64': { + 'ap-northeast-1': { + 'arn': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'ap-south-1': { + 'arn': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'ap-southeast-1': { + 'arn': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'ap-southeast-2': { + 'arn': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'eu-central-1': { + 'arn': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'eu-west-1': { + 'arn': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'eu-west-2': { + 'arn': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'us-east-1': { + 'arn': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'us-east-2': { + 'arn': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + 'us-west-2': { + 'arn': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + }, + }, + }, MatchStyle.EXACT); + // On synthesis it should not throw an error + expect(() => app.synth()).not.toThrow(); + }); }); diff --git a/packages/@aws-cdk/aws-lambda/test/layers.test.ts b/packages/@aws-cdk/aws-lambda/test/layers.test.ts index 862544363d598..6beeaddd37fc3 100644 --- a/packages/@aws-cdk/aws-lambda/test/layers.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/layers.test.ts @@ -79,16 +79,14 @@ describe('layers', () => { stack.node.setContext(cxapi.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT, true); // WHEN - let layerCodePath = path.join(__dirname, 'layer-code'); new lambda.LayerVersion(stack, 'layer', { - code: lambda.Code.fromAsset(layerCodePath), + code: lambda.Code.fromAsset(path.join(__dirname, 'layer-code')), }); // THEN expect(canonicalizeTemplate(SynthUtils.toCloudFormation(stack))).toHaveResource('AWS::Lambda::LayerVersion', { Metadata: { 'aws:asset:path': 'asset.Asset1Hash', - 'aws:asset:original-path': layerCodePath, 'aws:asset:is-bundled': false, 'aws:asset:property': 'Content', }, diff --git a/packages/@aws-cdk/aws-lambda/test/python-lambda-handler/requirements.txt b/packages/@aws-cdk/aws-lambda/test/python-lambda-handler/requirements.txt index b4500579db515..a8ed785e41af0 100644 --- a/packages/@aws-cdk/aws-lambda/test/python-lambda-handler/requirements.txt +++ b/packages/@aws-cdk/aws-lambda/test/python-lambda-handler/requirements.txt @@ -1 +1 @@ -requests==2.23.0 +requests==2.26.0 diff --git a/packages/@aws-cdk/aws-lambda/test/singleton-lambda.test.ts b/packages/@aws-cdk/aws-lambda/test/singleton-lambda.test.ts index 4200b7a18a6e5..1e9f984b4aee5 100644 --- a/packages/@aws-cdk/aws-lambda/test/singleton-lambda.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/singleton-lambda.test.ts @@ -16,7 +16,7 @@ describe('singleton lambda', () => { new lambda.SingletonFunction(stack, `Singleton${i}`, { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); @@ -53,7 +53,7 @@ describe('singleton lambda', () => { }, Handler: 'index.hello', Role: { 'Fn::GetAtt': ['SingletonLambda84c0de93353f42179b0b45b6c993251aServiceRole26D59235', 'Arn'] }, - Runtime: 'python2.7', + Runtime: 'python3.9', Timeout: 300, }, DependsOn: ['SingletonLambda84c0de93353f42179b0b45b6c993251aServiceRole26D59235'], @@ -68,7 +68,7 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); @@ -92,7 +92,7 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); @@ -116,7 +116,7 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); @@ -140,14 +140,14 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); const bucket = new s3.Bucket(stack, 'Bucket'); const layer = new lambda.LayerVersion(stack, 'myLayer', { code: new lambda.S3Code(bucket, 'ObjectKey'), - compatibleRuntimes: [lambda.Runtime.PYTHON_2_7], + compatibleRuntimes: [lambda.Runtime.PYTHON_3_9], }); // WHEN @@ -167,7 +167,7 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', }); @@ -194,7 +194,7 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', environment: { KEY: 'value', @@ -214,7 +214,7 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); @@ -232,13 +232,13 @@ describe('singleton lambda', () => { const singleton = new lambda.SingletonFunction(stack, 'Singleton', { uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', code: new lambda.InlineCode('def hello(): pass'), - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, handler: 'index.hello', timeout: cdk.Duration.minutes(5), }); // THEN - expect(singleton.runtime).toStrictEqual(lambda.Runtime.PYTHON_2_7); + expect(singleton.runtime).toStrictEqual(lambda.Runtime.PYTHON_3_9); }); test('current version of a singleton function', () => { diff --git a/packages/@aws-cdk/aws-lex/.eslintrc.js b/packages/@aws-cdk/aws-lex/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/aws-lex/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-lex/.gitignore b/packages/@aws-cdk/aws-lex/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-lex/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-lex/.npmignore b/packages/@aws-cdk/aws-lex/.npmignore new file mode 100644 index 0000000000000..f931fede67c44 --- /dev/null +++ b/packages/@aws-cdk/aws-lex/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts diff --git a/packages/@aws-cdk/aws-lex/LICENSE b/packages/@aws-cdk/aws-lex/LICENSE new file mode 100644 index 0000000000000..28e4bdcec77ec --- /dev/null +++ b/packages/@aws-cdk/aws-lex/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-lex/NOTICE b/packages/@aws-cdk/aws-lex/NOTICE new file mode 100644 index 0000000000000..5fc3826926b5b --- /dev/null +++ b/packages/@aws-cdk/aws-lex/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-lex/README.md b/packages/@aws-cdk/aws-lex/README.md new file mode 100644 index 0000000000000..340e3cc3f113a --- /dev/null +++ b/packages/@aws-cdk/aws-lex/README.md @@ -0,0 +1,31 @@ +# AWS::Lex Construct Library + + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts nofixture +import * as lex from '@aws-cdk/aws-lex'; +``` + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::Lex](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Lex.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-lex/jest.config.js b/packages/@aws-cdk/aws-lex/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-lex/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-lex/lib/index.ts b/packages/@aws-cdk/aws-lex/lib/index.ts new file mode 100644 index 0000000000000..b8085185a8f7f --- /dev/null +++ b/packages/@aws-cdk/aws-lex/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::Lex CloudFormation Resources: +export * from './lex.generated'; diff --git a/packages/@aws-cdk/aws-lex/package.json b/packages/@aws-cdk/aws-lex/package.json new file mode 100644 index 0000000000000..bed4f8b701618 --- /dev/null +++ b/packages/@aws-cdk/aws-lex/package.json @@ -0,0 +1,113 @@ +{ + "name": "@aws-cdk/aws-lex", + "version": "0.0.0", + "description": "AWS::Lex Construct Library", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.Lex", + "packageId": "Amazon.CDK.AWS.Lex", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.lex", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "lex" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-lex", + "module": "aws_cdk.aws_lex" + } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-lex" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "cloudformation": "AWS::Lex", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::Lex", + "aws-lex" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assertions": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cfn2ts": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^26.0.22" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "private": true +} diff --git a/packages/@aws-cdk/aws-lex/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-lex/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e208762bca03c --- /dev/null +++ b/packages/@aws-cdk/aws-lex/rosetta/default.ts-fixture @@ -0,0 +1,8 @@ +import { Construct } from 'constructs'; +import { Stack } from '@aws-cdk/core'; + +class MyStack extends Stack { + constructor(scope: Construct, id: string) { + /// here + } +} diff --git a/packages/@aws-cdk/aws-lex/test/lex.test.ts b/packages/@aws-cdk/aws-lex/test/lex.test.ts new file mode 100644 index 0000000000000..465c7bdea0693 --- /dev/null +++ b/packages/@aws-cdk/aws-lex/test/lex.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assertions'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index 307910c3c8661..7d8ce35e15377 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -71,7 +71,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/lib/log-retention-provider/index.ts b/packages/@aws-cdk/aws-logs/lib/log-retention-provider/index.ts index da537c149f013..d2c14e5a72cc7 100644 --- a/packages/@aws-cdk/aws-logs/lib/log-retention-provider/index.ts +++ b/packages/@aws-cdk/aws-logs/lib/log-retention-provider/index.ts @@ -46,8 +46,6 @@ async function createLogGroupSafe(logGroupName: string, region?: string, options throw new Error('Out of attempts to create a logGroup'); } } - // Any other error - console.error(error); throw error; } } while (true); // exit happens on retry count check @@ -62,12 +60,36 @@ async function createLogGroupSafe(logGroupName: string, region?: string, options * @param retentionInDays the number of days to retain the log events in the specified log group. */ async function setRetentionPolicy(logGroupName: string, region?: string, options?: SdkRetryOptions, retentionInDays?: number) { - const cloudwatchlogs = new AWS.CloudWatchLogs({ apiVersion: '2014-03-28', region, ...options }); - if (!retentionInDays) { - await cloudwatchlogs.deleteRetentionPolicy({ logGroupName }).promise(); - } else { - await cloudwatchlogs.putRetentionPolicy({ logGroupName, retentionInDays }).promise(); - } + // The same as in createLogGroupSafe(), here we could end up with the race + // condition where a log group is either already being created or its retention + // policy is being updated. This would result in an OperationAbortedException, + // which we will try to catch and retry the command a number of times before failing + let retryCount = options?.maxRetries == undefined ? 10 : options.maxRetries; + const delay = options?.retryOptions?.base == undefined ? 10 : options.retryOptions.base; + do { + try { + const cloudwatchlogs = new AWS.CloudWatchLogs({ apiVersion: '2014-03-28', region, ...options }); + if (!retentionInDays) { + await cloudwatchlogs.deleteRetentionPolicy({ logGroupName }).promise(); + } else { + await cloudwatchlogs.putRetentionPolicy({ logGroupName, retentionInDays }).promise(); + } + return; + + } catch (error) { + if (error.code === 'OperationAbortedException') { + if (retryCount > 0) { + retryCount--; + await new Promise(resolve => setTimeout(resolve, delay)); + continue; + } else { + // The log group is still being created by another execution but we are out of retries + throw new Error('Out of attempts to create a logGroup'); + } + } + throw error; + } + } while (true); // exit happens on retry count check } export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent, context: AWSLambda.Context) { @@ -92,10 +114,10 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent // Set a retention policy of 1 day on the logs of this very function. // Due to the async nature of the log group creation, the log group for this function might // still be not created yet at this point. Therefore we attempt to create it. - // In case it is being created, createLogGroupSafe will handle the conflic. + // In case it is being created, createLogGroupSafe will handle the conflict. const region = process.env.AWS_REGION; await createLogGroupSafe(`/aws/lambda/${context.functionName}`, region, retryOptions); - // If createLogGroupSafe fails, the log group is not created even after multiple attempts + // If createLogGroupSafe fails, the log group is not created even after multiple attempts. // In this case we have nothing to set the retention policy on but an exception will skip // the next line. await setRetentionPolicy(`/aws/lambda/${context.functionName}`, region, retryOptions, 1); diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index f1427610ea939..8d6c8fd955661 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -85,12 +85,12 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", "@types/sinon": "^9.0.11", "aws-sdk": "^2.848.0", - "aws-sdk-mock": "^5.4.0", - "jest": "^27.3.1", + "aws-sdk-mock": "^5.5.0", + "jest": "^27.4.3", "nock": "^13.2.1", "sinon": "^9.2.4" }, diff --git a/packages/@aws-cdk/aws-logs/test/log-retention-provider.test.ts b/packages/@aws-cdk/aws-logs/test/log-retention-provider.test.ts index c41a05e452fcf..d1f980ac60465 100644 --- a/packages/@aws-cdk/aws-logs/test/log-retention-provider.test.ts +++ b/packages/@aws-cdk/aws-logs/test/log-retention-provider.test.ts @@ -238,7 +238,7 @@ describe('log retention provider', () => { }); - test('does not if when operations on provider log group fails', async () => { + test('succeeds when createLogGroup for provider log group returns OperationAbortedException twice', async () => { let attempt = 2; const createLogGroupFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { if (params.logGroupName === '/aws/lambda/provider') { @@ -280,7 +280,7 @@ describe('log retention provider', () => { }); - test('does not fail if operations on CDK lambda log group fails twice', async () => { + test('succeeds when createLogGroup for CDK lambda log group returns OperationAbortedException twice', async () => { let attempt = 2; const createLogGroupFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { if (params.logGroupName === 'group') { @@ -322,7 +322,7 @@ describe('log retention provider', () => { }); - test('does fail if operations on CDK lambda log group fails indefinitely', async () => { + test('fails when createLogGroup for CDK lambda log group fails with OperationAbortedException indefinitely', async () => { const createLogGroupFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { if (params.logGroupName === 'group') { return Promise.reject(new MyError( @@ -356,6 +356,204 @@ describe('log retention provider', () => { expect(request.isDone()).toEqual(true); + }); + + test('succeeds when putRetentionPolicy for provider log group returns OperationAbortedException twice', async () => { + let attempt = 2; + const putRetentionPolicyFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { + if (params.logGroupName === '/aws/lambda/provider') { + if (attempt > 0) { + attempt--; + return Promise.reject(new MyError( + 'A conflicting operation is currently in progress against this resource. Please try again.', + 'OperationAbortedException')); + } else { + return Promise.resolve({}); + } + } + return Promise.resolve({}); + }; + + const createLogGroupFake = sinon.fake.resolves({}); + const deleteRetentionPolicyFake = sinon.fake.resolves({}); + + AWS.mock('CloudWatchLogs', 'createLogGroup', createLogGroupFake); + AWS.mock('CloudWatchLogs', 'putRetentionPolicy', putRetentionPolicyFake); + AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); + + const event = { + ...eventCommon, + RequestType: 'Create', + ResourceProperties: { + ServiceToken: 'token', + RetentionInDays: '30', + LogGroupName: 'group', + }, + }; + + const request = createRequest('SUCCESS'); + + await provider.handler(event as AWSLambda.CloudFormationCustomResourceCreateEvent, context); + + expect(request.isDone()).toEqual(true); + + + }); + + test('succeeds when putRetentionPolicy for CDK lambda log group returns OperationAbortedException twice', async () => { + let attempt = 2; + const putRetentionPolicyFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { + if (params.logGroupName === 'group') { + if (attempt > 0) { + attempt--; + return Promise.reject(new MyError( + 'A conflicting operation is currently in progress against this resource. Please try again.', + 'OperationAbortedException')); + } else { + return Promise.resolve({}); + } + } + return Promise.resolve({}); + }; + + const createLogGroupFake = sinon.fake.resolves({}); + const deleteRetentionPolicyFake = sinon.fake.resolves({}); + + AWS.mock('CloudWatchLogs', 'createLogGroup', createLogGroupFake); + AWS.mock('CloudWatchLogs', 'putRetentionPolicy', putRetentionPolicyFake); + AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); + + const event = { + ...eventCommon, + RequestType: 'Create', + ResourceProperties: { + ServiceToken: 'token', + RetentionInDays: '30', + LogGroupName: 'group', + }, + }; + + const request = createRequest('SUCCESS'); + + await provider.handler(event as AWSLambda.CloudFormationCustomResourceCreateEvent, context); + + expect(request.isDone()).toEqual(true); + + + }); + + test('fails when putRetentionPolicy for CDK lambda log group fails with OperationAbortedException indefinitely', async () => { + const putRetentionPolicyFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { + if (params.logGroupName === 'group') { + return Promise.reject(new MyError( + 'A conflicting operation is currently in progress against this resource. Please try again.', + 'OperationAbortedException')); + } + return Promise.resolve({}); + }; + + const createLogGroupFake = sinon.fake.resolves({}); + const deleteRetentionPolicyFake = sinon.fake.resolves({}); + + AWS.mock('CloudWatchLogs', 'createLogGroup', createLogGroupFake); + AWS.mock('CloudWatchLogs', 'putRetentionPolicy', putRetentionPolicyFake); + AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); + + const event = { + ...eventCommon, + RequestType: 'Create', + ResourceProperties: { + ServiceToken: 'token', + RetentionInDays: '30', + LogGroupName: 'group', + }, + }; + + const request = createRequest('FAILED'); + + await provider.handler(event as AWSLambda.CloudFormationCustomResourceCreateEvent, context); + + expect(request.isDone()).toEqual(true); + + + }); + + test('succeeds when deleteRetentionPolicy for provider log group returns OperationAbortedException twice', async () => { + let attempt = 2; + const deleteRetentionPolicyFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { + if (params.logGroupName === '/aws/lambda/provider') { + if (attempt > 0) { + attempt--; + return Promise.reject(new MyError( + 'A conflicting operation is currently in progress against this resource. Please try again.', + 'OperationAbortedException')); + } else { + return Promise.resolve({}); + } + } + return Promise.resolve({}); + }; + + const createLogGroupFake = sinon.fake.resolves({}); + const putRetentionPolicyFake = sinon.fake.resolves({}); + + AWS.mock('CloudWatchLogs', 'createLogGroup', createLogGroupFake); + AWS.mock('CloudWatchLogs', 'putRetentionPolicy', putRetentionPolicyFake); + AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); + + const event = { + ...eventCommon, + RequestType: 'Create', + ResourceProperties: { + ServiceToken: 'token', + RetentionInDays: '0', // Setting this to 0 triggers the call to deleteRetentionPolicy + LogGroupName: 'group', + }, + }; + + const request = createRequest('SUCCESS'); + + await provider.handler(event as AWSLambda.CloudFormationCustomResourceCreateEvent, context); + + expect(request.isDone()).toEqual(true); + + + }); + + test('fails when deleteRetentionPolicy for provider log group fails with OperationAbortedException indefinitely', async () => { + const deleteRetentionPolicyFake = (params: AWSSDK.CloudWatchLogs.CreateLogGroupRequest) => { + if (params.logGroupName === 'group') { + return Promise.reject(new MyError( + 'A conflicting operation is currently in progress against this resource. Please try again.', + 'OperationAbortedException')); + } + return Promise.resolve({}); + }; + + const createLogGroupFake = sinon.fake.resolves({}); + const putRetentionPolicyFake = sinon.fake.resolves({}); + + AWS.mock('CloudWatchLogs', 'createLogGroup', createLogGroupFake); + AWS.mock('CloudWatchLogs', 'putRetentionPolicy', putRetentionPolicyFake); + AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); + + const event = { + ...eventCommon, + RequestType: 'Create', + ResourceProperties: { + ServiceToken: 'token', + RetentionInDays: '0', // Setting this to 0 triggers the call to deleteRetentionPolicy + LogGroupName: 'group', + }, + }; + + const request = createRequest('FAILED'); + + await provider.handler(event as AWSLambda.CloudFormationCustomResourceCreateEvent, context); + + expect(request.isDone()).toEqual(true); + + }); test('response data contains the log group name', async () => { diff --git a/packages/@aws-cdk/aws-logs/test/log-retention.test.ts b/packages/@aws-cdk/aws-logs/test/log-retention.test.ts index 8a5d1241c2f20..7fd7d6b8532bf 100644 --- a/packages/@aws-cdk/aws-logs/test/log-retention.test.ts +++ b/packages/@aws-cdk/aws-logs/test/log-retention.test.ts @@ -196,7 +196,6 @@ describe('log retention', () => { expect(stack).toHaveResource('AWS::Lambda::Function', { Metadata: { 'aws:asset:path': assetLocation, - 'aws:asset:original-path': assetLocation, 'aws:asset:is-bundled': false, 'aws:asset:property': 'Code', }, diff --git a/packages/@aws-cdk/aws-msk/package.json b/packages/@aws-cdk/aws-msk/package.json index 2971304aa4cea..7184706f41c66 100644 --- a/packages/@aws-cdk/aws-msk/package.json +++ b/packages/@aws-cdk/aws-msk/package.json @@ -81,7 +81,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-acmpca": "0.0.0", diff --git a/packages/@aws-cdk/aws-rds/lib/cluster-engine.ts b/packages/@aws-cdk/aws-rds/lib/cluster-engine.ts index dfa8a661120b5..46cf64f6ea0f9 100644 --- a/packages/@aws-cdk/aws-rds/lib/cluster-engine.ts +++ b/packages/@aws-cdk/aws-rds/lib/cluster-engine.ts @@ -335,6 +335,8 @@ export class AuroraMysqlEngineVersion { public static readonly VER_2_10_0 = AuroraMysqlEngineVersion.builtIn_5_7('2.10.0'); /** Version "5.7.mysql_aurora.2.10.1". */ public static readonly VER_2_10_1 = AuroraMysqlEngineVersion.builtIn_5_7('2.10.1'); + /** Version "8.0.mysql_aurora.3.01.0". */ + public static readonly VER_3_01_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.01.0'); /** * Create a new AuroraMysqlEngineVersion with an arbitrary version. @@ -352,6 +354,10 @@ export class AuroraMysqlEngineVersion { return new AuroraMysqlEngineVersion(`5.7.${addStandardPrefix ? 'mysql_aurora.' : ''}${minorVersion}`); } + private static builtIn_8_0(minorVersion: string): AuroraMysqlEngineVersion { + return new AuroraMysqlEngineVersion(`8.0.mysql_aurora.${minorVersion}`, '8.0'); + } + /** The full version string, for example, "5.7.mysql_aurora.1.78.3.6". */ public readonly auroraMysqlFullVersion: string; /** The major version of the engine. Currently, it's always "5.7". */ diff --git a/packages/@aws-cdk/aws-rds/lib/instance-engine.ts b/packages/@aws-cdk/aws-rds/lib/instance-engine.ts index dc6802e5ed286..0e93df5b07185 100644 --- a/packages/@aws-cdk/aws-rds/lib/instance-engine.ts +++ b/packages/@aws-cdk/aws-rds/lib/instance-engine.ts @@ -256,6 +256,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_2_39 = MariaDbEngineVersion.of('10.2.39', '10.2'); /** Version "10.2.40". */ public static readonly VER_10_2_40 = MariaDbEngineVersion.of('10.2.40', '10.2'); + /** Version "10.2.41". */ + public static readonly VER_10_2_41 = MariaDbEngineVersion.of('10.2.41', '10.2'); /** Version "10.3" (only a major version, without a specific minor version). */ public static readonly VER_10_3 = MariaDbEngineVersion.of('10.3', '10.3'); @@ -271,6 +273,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_3_28 = MariaDbEngineVersion.of('10.3.28', '10.3'); /** Version "10.3.31". */ public static readonly VER_10_3_31 = MariaDbEngineVersion.of('10.3.31', '10.3'); + /** Version "10.3.32". */ + public static readonly VER_10_3_32 = MariaDbEngineVersion.of('10.3.32', '10.3'); /** Version "10.4" (only a major version, without a specific minor version). */ public static readonly VER_10_4 = MariaDbEngineVersion.of('10.4', '10.4'); @@ -282,6 +286,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_4_18 = MariaDbEngineVersion.of('10.4.18', '10.4'); /** Version "10.4.21". */ public static readonly VER_10_4_21 = MariaDbEngineVersion.of('10.4.21', '10.4'); + /** Version "10.4.22". */ + public static readonly VER_10_4_22 = MariaDbEngineVersion.of('10.4.22', '10.4'); /** Version "10.5" (only a major version, without a specific minor version). */ public static readonly VER_10_5 = MariaDbEngineVersion.of('10.5', '10.5'); @@ -291,6 +297,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_5_9 = MariaDbEngineVersion.of('10.5.9', '10.5'); /** Version "10.5.12". */ public static readonly VER_10_5_12 = MariaDbEngineVersion.of('10.5.12', '10.5'); + /** Version "10.5.13". */ + public static readonly VER_10_5_13 = MariaDbEngineVersion.of('10.5.13', '10.5'); /** * Create a new MariaDbEngineVersion with an arbitrary version. diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index 6e6cf3c3bc8ad..5b6f9f7d1a105 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -89,7 +89,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-rds/test/cluster-engine.test.ts b/packages/@aws-cdk/aws-rds/test/cluster-engine.test.ts index 9784dfe949473..826c988688c24 100644 --- a/packages/@aws-cdk/aws-rds/test/cluster-engine.test.ts +++ b/packages/@aws-cdk/aws-rds/test/cluster-engine.test.ts @@ -71,6 +71,19 @@ describe('cluster engine', () => { }); + test('cluster parameter group correctly determined for AURORA_MYSQL and given version 3', () => { + // GIVEN + const engine = DatabaseClusterEngine.auroraMysql({ + version: AuroraMysqlEngineVersion.VER_3_01_0, + }); + + // WHEN + const family = engine.parameterGroupFamily; + + // THEN + expect(family).toEqual('aurora-mysql8.0'); + }); + test('cluster parameter group correctly determined for AURORA_POSTGRESQL and given version', () => { // GIVEN const engine = DatabaseClusterEngine.auroraPostgres({ diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index 011438b9eae32..b6e2343bf6059 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -87,7 +87,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-refactorspaces/.eslintrc.js b/packages/@aws-cdk/aws-refactorspaces/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-refactorspaces/.gitignore b/packages/@aws-cdk/aws-refactorspaces/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-refactorspaces/.npmignore b/packages/@aws-cdk/aws-refactorspaces/.npmignore new file mode 100644 index 0000000000000..f931fede67c44 --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts diff --git a/packages/@aws-cdk/aws-refactorspaces/LICENSE b/packages/@aws-cdk/aws-refactorspaces/LICENSE new file mode 100644 index 0000000000000..28e4bdcec77ec --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-refactorspaces/NOTICE b/packages/@aws-cdk/aws-refactorspaces/NOTICE new file mode 100644 index 0000000000000..5fc3826926b5b --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-refactorspaces/README.md b/packages/@aws-cdk/aws-refactorspaces/README.md new file mode 100644 index 0000000000000..fc0da71f68b18 --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/README.md @@ -0,0 +1,31 @@ +# AWS::RefactorSpaces Construct Library + + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts nofixture +import * as refactorspaces from '@aws-cdk/aws-refactorspaces'; +``` + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::RefactorSpaces](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_RefactorSpaces.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-refactorspaces/jest.config.js b/packages/@aws-cdk/aws-refactorspaces/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-refactorspaces/lib/index.ts b/packages/@aws-cdk/aws-refactorspaces/lib/index.ts new file mode 100644 index 0000000000000..aa70ca7946387 --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::RefactorSpaces CloudFormation Resources: +export * from './refactorspaces.generated'; diff --git a/packages/@aws-cdk/aws-refactorspaces/package.json b/packages/@aws-cdk/aws-refactorspaces/package.json new file mode 100644 index 0000000000000..fad63a7fc7a98 --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/package.json @@ -0,0 +1,113 @@ +{ + "name": "@aws-cdk/aws-refactorspaces", + "version": "0.0.0", + "description": "AWS::RefactorSpaces Construct Library", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.RefactorSpaces", + "packageId": "Amazon.CDK.AWS.RefactorSpaces", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.refactorspaces", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "refactorspaces" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-refactorspaces", + "module": "aws_cdk.aws_refactorspaces" + } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-refactorspaces" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "cloudformation": "AWS::RefactorSpaces", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::RefactorSpaces", + "aws-refactorspaces" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assertions": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cfn2ts": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^26.0.22" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "private": true +} diff --git a/packages/@aws-cdk/aws-refactorspaces/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-refactorspaces/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e208762bca03c --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/rosetta/default.ts-fixture @@ -0,0 +1,8 @@ +import { Construct } from 'constructs'; +import { Stack } from '@aws-cdk/core'; + +class MyStack extends Stack { + constructor(scope: Construct, id: string) { + /// here + } +} diff --git a/packages/@aws-cdk/aws-refactorspaces/test/refactorspaces.test.ts b/packages/@aws-cdk/aws-refactorspaces/test/refactorspaces.test.ts new file mode 100644 index 0000000000000..465c7bdea0693 --- /dev/null +++ b/packages/@aws-cdk/aws-refactorspaces/test/refactorspaces.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assertions'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-resiliencehub/.eslintrc.js b/packages/@aws-cdk/aws-resiliencehub/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-resiliencehub/.gitignore b/packages/@aws-cdk/aws-resiliencehub/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-resiliencehub/.npmignore b/packages/@aws-cdk/aws-resiliencehub/.npmignore new file mode 100644 index 0000000000000..f931fede67c44 --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts diff --git a/packages/@aws-cdk/aws-resiliencehub/LICENSE b/packages/@aws-cdk/aws-resiliencehub/LICENSE new file mode 100644 index 0000000000000..28e4bdcec77ec --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-resiliencehub/NOTICE b/packages/@aws-cdk/aws-resiliencehub/NOTICE new file mode 100644 index 0000000000000..5fc3826926b5b --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-resiliencehub/README.md b/packages/@aws-cdk/aws-resiliencehub/README.md new file mode 100644 index 0000000000000..3471fec78ee09 --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/README.md @@ -0,0 +1,31 @@ +# AWS::ResilienceHub Construct Library + + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts nofixture +import * as resiliencehub from '@aws-cdk/aws-resiliencehub'; +``` + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::ResilienceHub](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_ResilienceHub.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-resiliencehub/jest.config.js b/packages/@aws-cdk/aws-resiliencehub/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-resiliencehub/lib/index.ts b/packages/@aws-cdk/aws-resiliencehub/lib/index.ts new file mode 100644 index 0000000000000..e0ba4f5f043fc --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::ResilienceHub CloudFormation Resources: +export * from './resiliencehub.generated'; diff --git a/packages/@aws-cdk/aws-resiliencehub/package.json b/packages/@aws-cdk/aws-resiliencehub/package.json new file mode 100644 index 0000000000000..79d91313c0437 --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/package.json @@ -0,0 +1,113 @@ +{ + "name": "@aws-cdk/aws-resiliencehub", + "version": "0.0.0", + "description": "AWS::ResilienceHub Construct Library", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.ResilienceHub", + "packageId": "Amazon.CDK.AWS.ResilienceHub", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.resiliencehub", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "resiliencehub" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-resiliencehub", + "module": "aws_cdk.aws_resiliencehub" + } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-resiliencehub" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "cloudformation": "AWS::ResilienceHub", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::ResilienceHub", + "aws-resiliencehub" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assertions": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cfn2ts": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^26.0.22" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "private": true +} diff --git a/packages/@aws-cdk/aws-resiliencehub/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-resiliencehub/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e208762bca03c --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/rosetta/default.ts-fixture @@ -0,0 +1,8 @@ +import { Construct } from 'constructs'; +import { Stack } from '@aws-cdk/core'; + +class MyStack extends Stack { + constructor(scope: Construct, id: string) { + /// here + } +} diff --git a/packages/@aws-cdk/aws-resiliencehub/test/resiliencehub.test.ts b/packages/@aws-cdk/aws-resiliencehub/test/resiliencehub.test.ts new file mode 100644 index 0000000000000..465c7bdea0693 --- /dev/null +++ b/packages/@aws-cdk/aws-resiliencehub/test/resiliencehub.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assertions'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index f6f4a8c2e4c61..aaaaae07e0e7b 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -79,7 +79,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index 4800660f0856f..805682d2c3cb9 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -81,7 +81,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 974622be8649f..ccaa1ff2437d9 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -85,10 +85,10 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-rum/.eslintrc.js b/packages/@aws-cdk/aws-rum/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/aws-rum/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-rum/.gitignore b/packages/@aws-cdk/aws-rum/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-rum/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-rum/.npmignore b/packages/@aws-cdk/aws-rum/.npmignore new file mode 100644 index 0000000000000..f931fede67c44 --- /dev/null +++ b/packages/@aws-cdk/aws-rum/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts diff --git a/packages/@aws-cdk/aws-rum/LICENSE b/packages/@aws-cdk/aws-rum/LICENSE new file mode 100644 index 0000000000000..28e4bdcec77ec --- /dev/null +++ b/packages/@aws-cdk/aws-rum/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-rum/NOTICE b/packages/@aws-cdk/aws-rum/NOTICE new file mode 100644 index 0000000000000..5fc3826926b5b --- /dev/null +++ b/packages/@aws-cdk/aws-rum/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-rum/README.md b/packages/@aws-cdk/aws-rum/README.md new file mode 100644 index 0000000000000..fd978b11a921f --- /dev/null +++ b/packages/@aws-cdk/aws-rum/README.md @@ -0,0 +1,31 @@ +# AWS::RUM Construct Library + + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts nofixture +import * as rum from '@aws-cdk/aws-rum'; +``` + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::RUM](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_RUM.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-rum/jest.config.js b/packages/@aws-cdk/aws-rum/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-rum/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-rum/lib/index.ts b/packages/@aws-cdk/aws-rum/lib/index.ts new file mode 100644 index 0000000000000..0689c0aa0f40b --- /dev/null +++ b/packages/@aws-cdk/aws-rum/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::RUM CloudFormation Resources: +export * from './rum.generated'; diff --git a/packages/@aws-cdk/aws-rum/package.json b/packages/@aws-cdk/aws-rum/package.json new file mode 100644 index 0000000000000..49ee8017558ea --- /dev/null +++ b/packages/@aws-cdk/aws-rum/package.json @@ -0,0 +1,113 @@ +{ + "name": "@aws-cdk/aws-rum", + "version": "0.0.0", + "description": "AWS::RUM Construct Library", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.RUM", + "packageId": "Amazon.CDK.AWS.RUM", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.rum", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "rum" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-rum", + "module": "aws_cdk.aws_rum" + } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-rum" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "cloudformation": "AWS::RUM", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::RUM", + "aws-rum" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assertions": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cfn2ts": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^26.0.22" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0", + "constructs": "^10.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "private": true +} diff --git a/packages/@aws-cdk/aws-rum/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-rum/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e208762bca03c --- /dev/null +++ b/packages/@aws-cdk/aws-rum/rosetta/default.ts-fixture @@ -0,0 +1,8 @@ +import { Construct } from 'constructs'; +import { Stack } from '@aws-cdk/core'; + +class MyStack extends Stack { + constructor(scope: Construct, id: string) { + /// here + } +} diff --git a/packages/@aws-cdk/aws-rum/test/rum.test.ts b/packages/@aws-cdk/aws-rum/test/rum.test.ts new file mode 100644 index 0000000000000..465c7bdea0693 --- /dev/null +++ b/packages/@aws-cdk/aws-rum/test/rum.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assertions'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts index 187bc7612979d..74ecf6b32fd90 100644 --- a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts +++ b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts @@ -117,14 +117,6 @@ export class Asset extends Construct implements cdk.IAsset { public readonly assetHash: string; - /** - * The original Asset Path before it got staged. - * - * If asset staging is disabled, this will be same value as assetPath. - * If asset staging is enabled, it will be the Asset original path before staging. - */ - private readonly originalAssetPath: string; - /** * Indicates if this asset got bundled before staged, or not. */ @@ -133,13 +125,12 @@ export class Asset extends Construct implements cdk.IAsset { constructor(scope: Construct, id: string, props: AssetProps) { super(scope, id); - this.originalAssetPath = path.resolve(props.path); this.isBundled = props.bundling != null; // stage the asset source (conditionally). const staging = new cdk.AssetStaging(this, 'Stage', { ...props, - sourcePath: this.originalAssetPath, + sourcePath: path.resolve(props.path), follow: props.followSymlinks ?? toSymlinkFollow(props.follow), assetHash: props.assetHash ?? props.sourceHash, }); @@ -204,7 +195,6 @@ export class Asset extends Construct implements cdk.IAsset { // points to a local path in order to enable local invocation of this function. resource.cfnOptions.metadata = resource.cfnOptions.metadata || { }; resource.cfnOptions.metadata[cxapi.ASSET_RESOURCE_METADATA_PATH_KEY] = this.assetPath; - resource.cfnOptions.metadata[cxapi.ASSET_RESOURCE_METADATA_ORIGINAL_PATH_KEY] = this.originalAssetPath; resource.cfnOptions.metadata[cxapi.ASSET_RESOURCE_METADATA_IS_BUNDLED_KEY] = this.isBundled; resource.cfnOptions.metadata[cxapi.ASSET_RESOURCE_METADATA_PROPERTY_KEY] = resourceProperty; } diff --git a/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts b/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts index 49db9d52995fa..0bf0438c72231 100644 --- a/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts +++ b/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts @@ -218,7 +218,6 @@ test('addResourceMetadata can be used to add CFN metadata to resources', () => { expect(stack).toHaveResource('My::Resource::Type', { Metadata: { 'aws:asset:path': 'asset.6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2', - 'aws:asset:original-path': location, 'aws:asset:is-bundled': false, 'aws:asset:property': 'PropName', }, @@ -239,7 +238,6 @@ test('asset metadata is only emitted if ASSET_RESOURCE_METADATA_ENABLED_CONTEXT expect(stack).not.toHaveResource('My::Resource::Type', { Metadata: { 'aws:asset:path': SAMPLE_ASSET_DIR, - 'aws:asset:original-path': SAMPLE_ASSET_DIR, 'aws:asset:is-bundled': false, 'aws:asset:property': 'PropName', }, @@ -370,7 +368,6 @@ describe('staging', () => { const template = SynthUtils.synthesize(stack).template; expect(template.Resources.MyResource.Metadata).toEqual({ 'aws:asset:path': 'asset.6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2', - 'aws:asset:original-path': SAMPLE_ASSET_DIR, 'aws:asset:is-bundled': false, 'aws:asset:property': 'PropName', }); @@ -398,7 +395,6 @@ describe('staging', () => { const template = SynthUtils.synthesize(stack).template; expect(template.Resources.MyResource.Metadata).toEqual({ 'aws:asset:path': SAMPLE_ASSET_DIR, - 'aws:asset:original-path': SAMPLE_ASSET_DIR, 'aws:asset:is-bundled': false, 'aws:asset:property': 'PropName', }); diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 99d0dc29e2069..c3841b947ed63 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cloudfront": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index c247c0dcab9ab..ffc8cb6399852 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -70,7 +70,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3/README.md b/packages/@aws-cdk/aws-s3/README.md index 57d9369a274a7..6a45b1dec50ea 100644 --- a/packages/@aws-cdk/aws-s3/README.md +++ b/packages/@aws-cdk/aws-s3/README.md @@ -417,7 +417,7 @@ bucket.virtualHostedUrlForObject('objectname', { regional: false }); // Virtual ## Object Ownership -You can use the two following properties to specify the bucket [object Ownership]. +You can use one of following properties to specify the bucket [object Ownership]. [object Ownership]: https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html @@ -441,6 +441,16 @@ new s3.Bucket(this, 'MyBucket', { }); ``` +### Bucket owner enforced (recommended) + +ACLs are disabled, and the bucket owner automatically owns and has full control over every object in the bucket. ACLs no longer affect permissions to data in the S3 bucket. The bucket uses policies to define access control. + +```ts +new s3.Bucket(this, 'MyBucket', { + objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_ENFORCED, +}); +``` + ## Bucket deletion When a bucket is removed from a stack (or the stack is deleted), the S3 @@ -466,7 +476,7 @@ by deploying with CDK version `1.126.0` or later **before** switching this value ## Transfer Acceleration -[Transfer Acceleration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html) can be configured to enable fast, easy, and secure transfers of files over long distances: +[Transfer Acceleration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html) can be configured to enable fast, easy, and secure transfers of files over long distances: ```ts const bucket = new s3.Bucket(this, 'MyBucket', { diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index e9b8776d80c65..6ba84ab3a16ff 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -1202,6 +1202,13 @@ export interface Inventory { * */ export enum ObjectOwnership { + /** + * ACLs are disabled, and the bucket owner automatically owns + * and has full control over every object in the bucket. + * ACLs no longer affect permissions to data in the S3 bucket. + * The bucket uses policies to define access control. + */ + BUCKET_OWNER_ENFORCED = 'BucketOwnerEnforced', /** * Objects uploaded to the bucket change ownership to the bucket owner . */ diff --git a/packages/@aws-cdk/aws-s3/package.json b/packages/@aws-cdk/aws-s3/package.json index 0c07d28483bc2..40594f74d652d 100644 --- a/packages/@aws-cdk/aws-s3/package.json +++ b/packages/@aws-cdk/aws-s3/package.json @@ -85,9 +85,9 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-events": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3/test/bucket.test.ts b/packages/@aws-cdk/aws-s3/test/bucket.test.ts index 04f15cf302bda..ba61c03bf9eae 100644 --- a/packages/@aws-cdk/aws-s3/test/bucket.test.ts +++ b/packages/@aws-cdk/aws-s3/test/bucket.test.ts @@ -2303,6 +2303,32 @@ describe('bucket', () => { }); + test('Bucket with objectOwnership set to BUCKET_OWNER_ENFORCED', () => { + const stack = new cdk.Stack(); + new s3.Bucket(stack, 'MyBucket', { + objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_ENFORCED, + }); + expect(stack).toMatchTemplate({ + 'Resources': { + 'MyBucketF68F3FF0': { + 'Type': 'AWS::S3::Bucket', + 'Properties': { + 'OwnershipControls': { + 'Rules': [ + { + 'ObjectOwnership': 'BucketOwnerEnforced', + }, + ], + }, + }, + 'UpdateReplacePolicy': 'Retain', + 'DeletionPolicy': 'Retain', + }, + }, + }); + + }); + test('Bucket with objectOwnership set to BUCKET_OWNER_PREFERRED', () => { const stack = new cdk.Stack(); new s3.Bucket(stack, 'MyBucket', { diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 75388be0b370f..4640dee01a4f5 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -79,8 +79,8 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1", - "ts-jest": "^27.0.7" + "jest": "^27.4.3", + "ts-jest": "^27.1.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-servicediscovery/package.json b/packages/@aws-cdk/aws-servicediscovery/package.json index 36aff459bb44a..00d73392be779 100644 --- a/packages/@aws-cdk/aws-servicediscovery/package.json +++ b/packages/@aws-cdk/aws-servicediscovery/package.json @@ -82,7 +82,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index b52c024e3638f..ca9b9275c72fd 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -72,7 +72,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-ses/package.json b/packages/@aws-cdk/aws-ses/package.json index cd10e0dfce25c..803037bfe80bc 100644 --- a/packages/@aws-cdk/aws-ses/package.json +++ b/packages/@aws-cdk/aws-ses/package.json @@ -78,9 +78,9 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 507aee937eeab..912d03763d4b1 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -78,7 +78,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-sns/package.json b/packages/@aws-cdk/aws-sns/package.json index be7da3a6824f2..4e716e248d371 100644 --- a/packages/@aws-cdk/aws-sns/package.json +++ b/packages/@aws-cdk/aws-sns/package.json @@ -90,7 +90,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index dfe04e5e93c31..8061265ffc3e1 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -88,7 +88,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-ssm/package.json b/packages/@aws-cdk/aws-ssm/package.json index 9709bcc9fde4d..45b127e64e2e0 100644 --- a/packages/@aws-cdk/aws-ssm/package.json +++ b/packages/@aws-cdk/aws-ssm/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index a5e6971f1eaf7..cbe6bf523b042 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -92,7 +92,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke-function.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke-function.test.ts index 940b45bd7486b..57c36af15b234 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke-function.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke-function.test.ts @@ -12,7 +12,7 @@ beforeEach(() => { fn = new lambda.Function(stack, 'Fn', { code: lambda.Code.fromInline('hello'), handler: 'index.hello', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); }); @@ -57,4 +57,4 @@ describeDeprecated('InvokeFunction', () => { }, }); }); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/run-lambda-task.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/run-lambda-task.test.ts index 7aa2ec16dccac..5929a684485b0 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/run-lambda-task.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/run-lambda-task.test.ts @@ -11,7 +11,7 @@ beforeEach(() => { fn = new lambda.Function(stack, 'Fn', { code: lambda.Code.fromInline('hello'), handler: 'index.hello', - runtime: lambda.Runtime.PYTHON_2_7, + runtime: lambda.Runtime.PYTHON_3_9, }); }); @@ -184,4 +184,4 @@ describeDeprecated('run lambda task', () => { }); }).toThrow(/Invalid Service Integration Pattern: SYNC is not supported to call Lambda./i); }); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index 918cfc1048101..36b09b5d79d7f 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -56,7 +56,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 46c876faf346e..00bc8552e8367 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,252 @@ +# CloudFormation Resource Specification v51.0.0 + +## New Resource Types + +* AWS::AppSync::DomainName +* AWS::AppSync::DomainNameApiAssociation +* AWS::Lex::Bot +* AWS::Lex::BotAlias +* AWS::Lex::BotVersion +* AWS::Lex::ResourcePolicy + +## Attribute Changes + +* AWS::ApiGateway::Deployment DeploymentId (__added__) +* AWS::EC2::VPCEndpoint Id (__deleted__) +* AWS::EC2::VPCEndpoint DnsEntries.DuplicatesAllowed (__deleted__) +* AWS::EC2::VPCEndpoint NetworkInterfaceIds.DuplicatesAllowed (__deleted__) +* AWS::IoTAnalytics::Pipeline Id (__added__) + +## Property Changes + +* AWS::EC2::VPCEndpointService PayerResponsibility (__added__) +* AWS::Evidently::Project DataDelivery.PrimitiveType (__deleted__) +* AWS::IoTAnalytics::Pipeline PipelineActivities.DuplicatesAllowed (__added__) +* AWS::IoTAnalytics::Pipeline Tags.DuplicatesAllowed (__added__) +* AWS::Kinesis::Stream StreamModeDetails (__added__) +* AWS::Kinesis::Stream ShardCount.Required (__changed__) + * Old: true + * New: false +* AWS::WAFv2::WebACL CaptchaConfig (__added__) + +## Property Type Changes + +* AWS::Kinesis::Stream.StreamModeDetails (__added__) +* AWS::WAFv2::RuleGroup.CaptchaConfig (__added__) +* AWS::WAFv2::RuleGroup.ImmunityTimeProperty (__added__) +* AWS::WAFv2::RuleGroup.RegexMatchStatement (__added__) +* AWS::WAFv2::WebACL.CaptchaAction (__added__) +* AWS::WAFv2::WebACL.CaptchaConfig (__added__) +* AWS::WAFv2::WebACL.ImmunityTimeProperty (__added__) +* AWS::WAFv2::WebACL.RegexMatchStatement (__added__) +* AWS::ApiGateway::Deployment.CanarySetting StageVariableOverrides.DuplicatesAllowed (__deleted__) +* AWS::ApiGateway::Deployment.DeploymentCanarySettings StageVariableOverrides.DuplicatesAllowed (__deleted__) +* AWS::ApiGateway::Deployment.MethodSetting CacheDataEncrypted.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachedataencrypted + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachedataencrypted +* AWS::ApiGateway::Deployment.MethodSetting CacheTtlInSeconds.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachettlinseconds + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachettlinseconds +* AWS::ApiGateway::Deployment.MethodSetting CachingEnabled.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachingenabled + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachingenabled +* AWS::ApiGateway::Deployment.MethodSetting DataTraceEnabled.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-datatraceenabled + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-datatraceenabled +* AWS::ApiGateway::Deployment.MethodSetting HttpMethod.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-httpmethod + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-httpmethod +* AWS::ApiGateway::Deployment.MethodSetting LoggingLevel.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-logginglevel + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-logginglevel +* AWS::ApiGateway::Deployment.MethodSetting MetricsEnabled.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-metricsenabled + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-metricsenabled +* AWS::ApiGateway::Deployment.MethodSetting ResourcePath.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-resourcepath + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-resourcepath +* AWS::ApiGateway::Deployment.MethodSetting ThrottlingBurstLimit.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-throttlingburstlimit + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-throttlingburstlimit +* AWS::ApiGateway::Deployment.MethodSetting ThrottlingRateLimit.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-throttlingratelimit + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-throttlingratelimit +* AWS::ApiGateway::Deployment.StageDescription Tags.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-tags + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-tags +* AWS::ApiGateway::Deployment.StageDescription Variables.DuplicatesAllowed (__deleted__) +* AWS::Evidently::Project.DataDeliveryObject S3.PrimitiveType (__deleted__) +* AWS::IoTAnalytics::Pipeline.RemoveAttributes Attributes.DuplicatesAllowed (__added__) +* AWS::IoTAnalytics::Pipeline.SelectAttributes Attributes.DuplicatesAllowed (__added__) +* AWS::WAFv2::RuleGroup.Rule CaptchaConfig (__added__) +* AWS::WAFv2::RuleGroup.RuleAction Captcha (__added__) +* AWS::WAFv2::RuleGroup.Statement RegexMatchStatement (__added__) +* AWS::WAFv2::WebACL.Rule CaptchaConfig (__added__) +* AWS::WAFv2::WebACL.RuleAction Captcha (__added__) +* AWS::WAFv2::WebACL.Statement RegexMatchStatement (__added__) + + +# CloudFormation Resource Specification v50.0.0 + +## New Resource Types + +* AWS::AmplifyUIBuilder::Component +* AWS::AmplifyUIBuilder::Theme +* AWS::Connect::ContactFlow +* AWS::Connect::ContactFlowModule +* AWS::EC2::IPAM +* AWS::EC2::IPAMAllocation +* AWS::EC2::IPAMPool +* AWS::EC2::IPAMScope +* AWS::Evidently::Experiment +* AWS::Evidently::Feature +* AWS::Evidently::Launch +* AWS::Evidently::Project +* AWS::RUM::AppMonitor +* AWS::RefactorSpaces::Application +* AWS::RefactorSpaces::Environment +* AWS::RefactorSpaces::Route +* AWS::RefactorSpaces::Service +* AWS::ResilienceHub::App +* AWS::ResilienceHub::ResiliencyPolicy +* AWS::Timestream::ScheduledQuery +* AWS::Transfer::Workflow + +## Attribute Changes + +* AWS::EC2::NetworkInterface Id (__added__) +* AWS::EC2::NetworkInterface SecondaryPrivateIpAddresses.DuplicatesAllowed (__added__) +* AWS::EC2::NetworkInterface Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html +* AWS::EC2::SubnetRouteTableAssociation Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-route-table-assoc.html + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetroutetableassociation.html +* AWS::EC2::SubnetRouteTableAssociation Id (__added__) +* AWS::EC2::VPCEndpoint Id (__added__) +* AWS::EC2::VPCEndpoint DnsEntries.DuplicatesAllowed (__added__) +* AWS::EC2::VPCEndpoint NetworkInterfaceIds.DuplicatesAllowed (__added__) +* AWS::EKS::Cluster KubernetesNetworkConfig.ServiceIpv6Cidr (__added__) +* AWS::FSx::FileSystem RootVolumeId (__added__) + +## Property Changes + +* AWS::DynamoDB::Table TableClass (__added__) +* AWS::EC2::Instance PropagateTagsToVolumeOnCreation (__added__) +* AWS::EC2::NetworkInterface Description.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-description + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-description +* AWS::EC2::NetworkInterface GroupSet.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-groupset + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-groupset +* AWS::EC2::NetworkInterface GroupSet.DuplicatesAllowed (__changed__) + * Old: false + * New: true +* AWS::EC2::NetworkInterface InterfaceType.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-interfacetype + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-interfacetype +* AWS::EC2::NetworkInterface Ipv6AddressCount.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresscount + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6addresscount +* AWS::EC2::NetworkInterface Ipv6Addresses.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresses + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6addresses +* AWS::EC2::NetworkInterface PrivateIpAddress.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddress + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-privateipaddress +* AWS::EC2::NetworkInterface PrivateIpAddresses.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddresses + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-privateipaddresses +* AWS::EC2::NetworkInterface PrivateIpAddresses.DuplicatesAllowed (__changed__) + * Old: false + * New: true +* AWS::EC2::NetworkInterface PrivateIpAddresses.UpdateType (__changed__) + * Old: Conditional + * New: Mutable +* AWS::EC2::NetworkInterface SecondaryPrivateIpAddressCount.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-secondaryprivateipcount + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-secondaryprivateipaddresscount +* AWS::EC2::NetworkInterface SourceDestCheck.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-sourcedestcheck + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-sourcedestcheck +* AWS::EC2::NetworkInterface SubnetId.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-subnetid + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-subnetid +* AWS::EC2::NetworkInterface Tags.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-tags + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-tags +* AWS::EC2::SubnetRouteTableAssociation RouteTableId.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-route-table-assoc.html#cfn-ec2-subnetroutetableassociation-routetableid + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetroutetableassociation.html#cfn-ec2-subnetroutetableassociation-routetableid +* AWS::EC2::SubnetRouteTableAssociation RouteTableId.UpdateType (__changed__) + * Old: Mutable + * New: Immutable +* AWS::EC2::SubnetRouteTableAssociation SubnetId.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-route-table-assoc.html#cfn-ec2-subnetroutetableassociation-subnetid + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetroutetableassociation.html#cfn-ec2-subnetroutetableassociation-subnetid +* AWS::EMR::InstanceGroupConfig CustomAmiId (__added__) +* AWS::ElastiCache::ReplicationGroup DataTieringEnabled (__added__) +* AWS::FSx::FileSystem OpenZFSConfiguration (__added__) +* AWS::IoTSiteWise::Project AssetIds (__added__) + +## Property Type Changes + +* AWS::FSx::FileSystem.ClientConfigurations (__added__) +* AWS::FSx::FileSystem.NfsExports (__added__) +* AWS::FSx::FileSystem.OpenZFSConfiguration (__added__) +* AWS::FSx::FileSystem.RootVolumeConfiguration (__added__) +* AWS::FSx::FileSystem.UserAndGroupQuotas (__added__) +* AWS::MediaLive::Channel.AudioHlsRenditionSelection (__added__) +* AWS::MediaLive::Channel.AudioWatermarkSettings (__added__) +* AWS::MediaLive::Channel.NielsenCBET (__added__) +* AWS::MediaLive::Channel.NielsenNaesIiNw (__added__) +* AWS::MediaLive::Channel.NielsenWatermarksSettings (__added__) +* AWS::S3::Bucket.EventBridgeConfiguration (__added__) +* AWS::S3::Bucket.NoncurrentVersionExpiration (__added__) +* AWS::S3::StorageLens.CloudWatchMetrics (__added__) +* AWS::SageMaker::EndpointConfig.ServerlessConfig (__added__) +* AWS::EC2::NetworkInterface.PrivateIpAddressSpecification Primary.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html#cfn-ec2-networkinterface-privateipspecification-primary + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-privateipaddressspecification.html#cfn-ec2-networkinterface-privateipaddressspecification-primary +* AWS::EC2::NetworkInterface.PrivateIpAddressSpecification PrivateIpAddress.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html#cfn-ec2-networkinterface-privateipspecification-privateipaddress + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-privateipaddressspecification.html#cfn-ec2-networkinterface-privateipaddressspecification-privateipaddress +* AWS::EKS::Cluster.KubernetesNetworkConfig IpFamily (__added__) +* AWS::EKS::Cluster.KubernetesNetworkConfig ServiceIpv6Cidr (__added__) +* AWS::EMR::Cluster.InstanceGroupConfig CustomAmiId (__added__) +* AWS::EMR::Cluster.InstanceTypeConfig CustomAmiId (__added__) +* AWS::EMR::InstanceFleetConfig.InstanceTypeConfig CustomAmiId (__added__) +* AWS::FSx::FileSystem.DiskIopsConfiguration Iops.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-ontapconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-ontapconfiguration-diskiopsconfiguration-iops + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration-iops +* AWS::FSx::FileSystem.DiskIopsConfiguration Mode.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-ontapconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-ontapconfiguration-diskiopsconfiguration-mode + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration-mode +* AWS::MediaLive::Channel.AudioDescription AudioWatermarkingSettings (__added__) +* AWS::MediaLive::Channel.AudioSelectorSettings AudioHlsRenditionSelection (__added__) +* AWS::MediaLive::Channel.DvbSubSourceSettings OcrLanguage (__added__) +* AWS::MediaLive::Channel.HlsInputSettings Scte35Source (__added__) +* AWS::MediaLive::Channel.Scte27SourceSettings OcrLanguage (__added__) +* AWS::MediaLive::Channel.WebvttDestinationSettings StyleControl (__added__) +* AWS::S3::Bucket.NoncurrentVersionTransition NewerNoncurrentVersions (__added__) +* AWS::S3::Bucket.NotificationConfiguration EventBridgeConfiguration (__added__) +* AWS::S3::Bucket.Rule NoncurrentVersionExpiration (__added__) +* AWS::S3::Bucket.Rule ObjectSizeGreaterThan (__added__) +* AWS::S3::Bucket.Rule ObjectSizeLessThan (__added__) +* AWS::S3::StorageLens.DataExport CloudWatchMetrics (__added__) +* AWS::S3::StorageLens.DataExport S3BucketDestination.Required (__changed__) + * Old: true + * New: false +* AWS::SageMaker::EndpointConfig.ProductionVariant ServerlessConfig (__added__) +* AWS::SageMaker::EndpointConfig.ProductionVariant InitialInstanceCount.Required (__changed__) + * Old: true + * New: false +* AWS::SageMaker::EndpointConfig.ProductionVariant InstanceType.Required (__changed__) + * Old: true + * New: false +* AWS::SageMaker::Model.ContainerDefinition InferenceSpecificationName (__added__) + + # CloudFormation Resource Specification v49.0.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts index 260058d60d154..656d5ae16a53b 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts @@ -26,7 +26,7 @@ async function main() { // iterate over all cloudformation namespaces for (const namespace of cfnspec.namespaces()) { const module = pkglint.createModuleDefinitionFromCfnNamespace(namespace); - const lowcaseModuleName = module.moduleName.toLocaleLowerCase(); + const lowcaseModuleName = module.moduleBaseName.toLocaleLowerCase(); const packagePath = path.join(root, module.moduleName); // we already have a module for this namesapce, move on. diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index cfb3b31ea7b28..92837e4d8f0cc 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -49.0.0 +51.0.0 diff --git a/packages/@aws-cdk/cfnspec/package.json b/packages/@aws-cdk/cfnspec/package.json index 828529273ae87..8f3556d5f25b5 100644 --- a/packages/@aws-cdk/cfnspec/package.json +++ b/packages/@aws-cdk/cfnspec/package.json @@ -35,7 +35,7 @@ "@types/jest": "^27.0.3", "@types/md5": "^2.3.1", "fast-json-patch": "^2.2.1", - "jest": "^27.3.1", + "jest": "^27.4.3", "json-diff": "^0.5.4", "sort-json": "^2.0.0" }, diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json index 5dd730e2bce6d..87ffb748056f0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json +++ b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json @@ -1198,6 +1198,401 @@ } } }, + "AWS::AmplifyUIBuilder::Component.ComponentBindingPropertiesValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalue.html", + "Properties": { + "BindingProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalue.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalue-bindingproperties", + "Required": false, + "Type": "ComponentBindingPropertiesValueProperties", + "UpdateType": "Mutable" + }, + "DefaultValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalue.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalue-defaultvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalue.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalue-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentBindingPropertiesValueProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html", + "Properties": { + "Bucket": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalueproperties-bucket", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DefaultValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalueproperties-defaultvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Field": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalueproperties-field", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalueproperties-key", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Model": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalueproperties-model", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Predicates": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalueproperties-predicates", + "ItemType": "Predicate", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "UserAttribute": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentbindingpropertiesvalueproperties.html#cfn-amplifyuibuilder-component-componentbindingpropertiesvalueproperties-userattribute", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentChild": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentchild.html", + "Properties": { + "Children": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentchild.html#cfn-amplifyuibuilder-component-componentchild-children", + "ItemType": "ComponentChild", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "ComponentType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentchild.html#cfn-amplifyuibuilder-component-componentchild-componenttype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentchild.html#cfn-amplifyuibuilder-component-componentchild-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Properties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentchild.html#cfn-amplifyuibuilder-component-componentchild-properties", + "Required": true, + "Type": "ComponentProperties", + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentConditionProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentconditionproperty.html", + "Properties": { + "Else": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentconditionproperty.html#cfn-amplifyuibuilder-component-componentconditionproperty-else", + "Required": false, + "Type": "ComponentProperty", + "UpdateType": "Mutable" + }, + "Field": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentconditionproperty.html#cfn-amplifyuibuilder-component-componentconditionproperty-field", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Operand": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentconditionproperty.html#cfn-amplifyuibuilder-component-componentconditionproperty-operand", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Operator": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentconditionproperty.html#cfn-amplifyuibuilder-component-componentconditionproperty-operator", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Property": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentconditionproperty.html#cfn-amplifyuibuilder-component-componentconditionproperty-property", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Then": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentconditionproperty.html#cfn-amplifyuibuilder-component-componentconditionproperty-then", + "Required": false, + "Type": "ComponentProperty", + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentDataConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentdataconfiguration.html", + "Properties": { + "Identifiers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentdataconfiguration.html#cfn-amplifyuibuilder-component-componentdataconfiguration-identifiers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Model": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentdataconfiguration.html#cfn-amplifyuibuilder-component-componentdataconfiguration-model", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Predicate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentdataconfiguration.html#cfn-amplifyuibuilder-component-componentdataconfiguration-predicate", + "Required": false, + "Type": "Predicate", + "UpdateType": "Mutable" + }, + "Sort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentdataconfiguration.html#cfn-amplifyuibuilder-component-componentdataconfiguration-sort", + "ItemType": "SortProperty", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentOverrides": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentoverrides.html" + }, + "AWS::AmplifyUIBuilder::Component.ComponentOverridesValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentoverridesvalue.html" + }, + "AWS::AmplifyUIBuilder::Component.ComponentProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperties.html" + }, + "AWS::AmplifyUIBuilder::Component.ComponentProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html", + "Properties": { + "BindingProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-bindingproperties", + "Required": false, + "Type": "ComponentPropertyBindingProperties", + "UpdateType": "Mutable" + }, + "Bindings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-bindings", + "Required": false, + "Type": "FormBindings", + "UpdateType": "Mutable" + }, + "CollectionBindingProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-collectionbindingproperties", + "Required": false, + "Type": "ComponentPropertyBindingProperties", + "UpdateType": "Mutable" + }, + "Concat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-concat", + "ItemType": "ComponentProperty", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Condition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-condition", + "Required": false, + "Type": "ComponentConditionProperty", + "UpdateType": "Mutable" + }, + "Configured": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-configured", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "DefaultValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-defaultvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Event": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-event", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ImportedValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-importedvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Model": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-model", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "UserAttribute": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-userattribute", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentproperty.html#cfn-amplifyuibuilder-component-componentproperty-value", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentPropertyBindingProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentpropertybindingproperties.html", + "Properties": { + "Field": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentpropertybindingproperties.html#cfn-amplifyuibuilder-component-componentpropertybindingproperties-field", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Property": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentpropertybindingproperties.html#cfn-amplifyuibuilder-component-componentpropertybindingproperties-property", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentVariant": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentvariant.html", + "Properties": { + "Overrides": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentvariant.html#cfn-amplifyuibuilder-component-componentvariant-overrides", + "Required": false, + "Type": "ComponentOverrides", + "UpdateType": "Mutable" + }, + "VariantValues": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentvariant.html#cfn-amplifyuibuilder-component-componentvariant-variantvalues", + "Required": false, + "Type": "ComponentVariantValues", + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.ComponentVariantValues": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-componentvariantvalues.html" + }, + "AWS::AmplifyUIBuilder::Component.FormBindings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-formbindings.html" + }, + "AWS::AmplifyUIBuilder::Component.Predicate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html", + "Properties": { + "And": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-and", + "ItemType": "Predicate", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Field": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-field", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Operand": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-operand", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Operator": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-operator", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Or": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-or", + "ItemType": "Predicate", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Component.SortProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-sortproperty.html", + "Properties": { + "Direction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-sortproperty.html#cfn-amplifyuibuilder-component-sortproperty-direction", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Field": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-sortproperty.html#cfn-amplifyuibuilder-component-sortproperty-field", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Theme.ThemeValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-theme-themevalue.html", + "Properties": { + "Children": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-theme-themevalue.html#cfn-amplifyuibuilder-theme-themevalue-children", + "ItemType": "ThemeValues", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-theme-themevalue.html#cfn-amplifyuibuilder-theme-themevalue-value", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Theme.ThemeValues": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-theme-themevalues.html", + "Properties": { + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-theme-themevalues.html#cfn-amplifyuibuilder-theme-themevalues-key", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-theme-themevalues.html#cfn-amplifyuibuilder-theme-themevalues-value", + "Required": false, + "Type": "ThemeValue", + "UpdateType": "Mutable" + } + } + }, "AWS::ApiGateway::ApiKey.StageKey": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html", "Properties": { @@ -1243,7 +1638,6 @@ }, "StageVariableOverrides": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-canarysetting.html#cfn-apigateway-deployment-canarysetting-stagevariableoverrides", - "DuplicatesAllowed": false, "PrimitiveItemType": "String", "Required": false, "Type": "Map", @@ -1268,7 +1662,6 @@ }, "StageVariableOverrides": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-deploymentcanarysettings.html#cfn-apigateway-deployment-deploymentcanarysettings-stagevariableoverrides", - "DuplicatesAllowed": false, "PrimitiveItemType": "String", "Required": false, "Type": "Map", @@ -1283,64 +1676,64 @@ } }, "AWS::ApiGateway::Deployment.MethodSetting": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html", "Properties": { "CacheDataEncrypted": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachedataencrypted", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachedataencrypted", "PrimitiveType": "Boolean", "Required": false, "UpdateType": "Mutable" }, "CacheTtlInSeconds": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachettlinseconds", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachettlinseconds", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" }, "CachingEnabled": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachingenabled", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachingenabled", "PrimitiveType": "Boolean", "Required": false, "UpdateType": "Mutable" }, "DataTraceEnabled": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-datatraceenabled", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-datatraceenabled", "PrimitiveType": "Boolean", "Required": false, "UpdateType": "Mutable" }, "HttpMethod": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-httpmethod", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-httpmethod", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, "LoggingLevel": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-logginglevel", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-logginglevel", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, "MetricsEnabled": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-metricsenabled", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-metricsenabled", "PrimitiveType": "Boolean", "Required": false, "UpdateType": "Mutable" }, "ResourcePath": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-resourcepath", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-resourcepath", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, "ThrottlingBurstLimit": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-throttlingburstlimit", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-throttlingburstlimit", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" }, "ThrottlingRateLimit": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-throttlingratelimit", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-throttlingratelimit", "PrimitiveType": "Double", "Required": false, "UpdateType": "Mutable" @@ -1437,7 +1830,7 @@ "UpdateType": "Mutable" }, "Tags": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-tags", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-tags", "DuplicatesAllowed": true, "ItemType": "Tag", "Required": false, @@ -1464,7 +1857,6 @@ }, "Variables": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-variables", - "DuplicatesAllowed": false, "PrimitiveItemType": "String", "Required": false, "Type": "Map", @@ -21348,6 +21740,28 @@ } } }, + "AWS::EC2::IPAM.IpamOperatingRegion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ipam-ipamoperatingregion.html", + "Properties": { + "RegionName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ipam-ipamoperatingregion.html#cfn-ec2-ipam-ipamoperatingregion-regionname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::EC2::IPAMPool.ProvisionedCidr": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ipampool-provisionedcidr.html", + "Properties": { + "Cidr": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ipampool-provisionedcidr.html#cfn-ec2-ipampool-provisionedcidr-cidr", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::EC2::Instance.AssociationParameter": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations-associationparameters.html", "Properties": { @@ -23228,16 +23642,16 @@ } }, "AWS::EC2::NetworkInterface.PrivateIpAddressSpecification": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-privateipaddressspecification.html", "Properties": { "Primary": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html#cfn-ec2-networkinterface-privateipspecification-primary", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-privateipaddressspecification.html#cfn-ec2-networkinterface-privateipaddressspecification-primary", "PrimitiveType": "Boolean", "Required": true, "UpdateType": "Mutable" }, "PrivateIpAddress": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html#cfn-ec2-networkinterface-privateipspecification-privateipaddress", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-privateipaddressspecification.html#cfn-ec2-networkinterface-privateipaddressspecification-privateipaddress", "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" @@ -26067,11 +26481,23 @@ "AWS::EKS::Cluster.KubernetesNetworkConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-kubernetesnetworkconfig.html", "Properties": { + "IpFamily": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-kubernetesnetworkconfig.html#cfn-eks-cluster-kubernetesnetworkconfig-ipfamily", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "ServiceIpv4Cidr": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-kubernetesnetworkconfig.html#cfn-eks-cluster-kubernetesnetworkconfig-serviceipv4cidr", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" + }, + "ServiceIpv6Cidr": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-kubernetesnetworkconfig.html#cfn-eks-cluster-kubernetesnetworkconfig-serviceipv6cidr", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" } } }, @@ -26612,6 +27038,12 @@ "Type": "List", "UpdateType": "Immutable" }, + "CustomAmiId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-customamiid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "EbsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-ebsconfiguration", "Required": false, @@ -26667,6 +27099,12 @@ "Type": "List", "UpdateType": "Immutable" }, + "CustomAmiId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancetypeconfig.html#cfn-elasticmapreduce-cluster-instancetypeconfig-customamiid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "EbsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancetypeconfig.html#cfn-elasticmapreduce-cluster-instancetypeconfig-ebsconfiguration", "Required": false, @@ -27190,6 +27628,12 @@ "Type": "List", "UpdateType": "Immutable" }, + "CustomAmiId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancetypeconfig.html#cfn-elasticmapreduce-instancefleetconfig-instancetypeconfig-customamiid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "EbsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancetypeconfig.html#cfn-elasticmapreduce-instancefleetconfig-instancetypeconfig-ebsconfiguration", "Required": false, @@ -30081,6 +30525,298 @@ } } }, + "AWS::Evidently::Experiment.MetricGoalObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html", + "Properties": { + "DesiredChange": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html#cfn-evidently-experiment-metricgoalobject-desiredchange", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "EntityIdKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html#cfn-evidently-experiment-metricgoalobject-entityidkey", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "EventPattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html#cfn-evidently-experiment-metricgoalobject-eventpattern", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "MetricName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html#cfn-evidently-experiment-metricgoalobject-metricname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "UnitLabel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html#cfn-evidently-experiment-metricgoalobject-unitlabel", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ValueKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html#cfn-evidently-experiment-metricgoalobject-valuekey", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Experiment.OnlineAbConfigObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-onlineabconfigobject.html", + "Properties": { + "ControlTreatmentName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-onlineabconfigobject.html#cfn-evidently-experiment-onlineabconfigobject-controltreatmentname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TreatmentWeights": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-onlineabconfigobject.html#cfn-evidently-experiment-onlineabconfigobject-treatmentweights", + "DuplicatesAllowed": false, + "ItemType": "TreatmentToWeight", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Experiment.TreatmentObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmentobject.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmentobject.html#cfn-evidently-experiment-treatmentobject-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Feature": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmentobject.html#cfn-evidently-experiment-treatmentobject-feature", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TreatmentName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmentobject.html#cfn-evidently-experiment-treatmentobject-treatmentname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Variation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmentobject.html#cfn-evidently-experiment-treatmentobject-variation", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Experiment.TreatmentToWeight": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmenttoweight.html", + "Properties": { + "SplitWeight": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmenttoweight.html#cfn-evidently-experiment-treatmenttoweight-splitweight", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "Treatment": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-treatmenttoweight.html#cfn-evidently-experiment-treatmenttoweight-treatment", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Feature.EntityOverride": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-entityoverride.html", + "Properties": { + "EntityId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-entityoverride.html#cfn-evidently-feature-entityoverride-entityid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Variation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-entityoverride.html#cfn-evidently-feature-entityoverride-variation", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Feature.VariationObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-variationobject.html", + "Properties": { + "BooleanValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-variationobject.html#cfn-evidently-feature-variationobject-booleanvalue", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "DoubleValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-variationobject.html#cfn-evidently-feature-variationobject-doublevalue", + "PrimitiveType": "Double", + "Required": false, + "UpdateType": "Mutable" + }, + "LongValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-variationobject.html#cfn-evidently-feature-variationobject-longvalue", + "PrimitiveType": "Double", + "Required": false, + "UpdateType": "Mutable" + }, + "StringValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-variationobject.html#cfn-evidently-feature-variationobject-stringvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "VariationName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-feature-variationobject.html#cfn-evidently-feature-variationobject-variationname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Launch.GroupToWeight": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-grouptoweight.html", + "Properties": { + "GroupName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-grouptoweight.html#cfn-evidently-launch-grouptoweight-groupname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SplitWeight": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-grouptoweight.html#cfn-evidently-launch-grouptoweight-splitweight", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Launch.LaunchGroupObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-launchgroupobject.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-launchgroupobject.html#cfn-evidently-launch-launchgroupobject-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Feature": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-launchgroupobject.html#cfn-evidently-launch-launchgroupobject-feature", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "GroupName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-launchgroupobject.html#cfn-evidently-launch-launchgroupobject-groupname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Variation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-launchgroupobject.html#cfn-evidently-launch-launchgroupobject-variation", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Launch.MetricDefinitionObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-metricdefinitionobject.html", + "Properties": { + "EntityIdKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-metricdefinitionobject.html#cfn-evidently-launch-metricdefinitionobject-entityidkey", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "EventPattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-metricdefinitionobject.html#cfn-evidently-launch-metricdefinitionobject-eventpattern", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "MetricName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-metricdefinitionobject.html#cfn-evidently-launch-metricdefinitionobject-metricname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "UnitLabel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-metricdefinitionobject.html#cfn-evidently-launch-metricdefinitionobject-unitlabel", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ValueKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-metricdefinitionobject.html#cfn-evidently-launch-metricdefinitionobject-valuekey", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Launch.StepConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-stepconfig.html", + "Properties": { + "GroupWeights": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-stepconfig.html#cfn-evidently-launch-stepconfig-groupweights", + "DuplicatesAllowed": false, + "ItemType": "GroupToWeight", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "StartTime": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-launch-stepconfig.html#cfn-evidently-launch-stepconfig-starttime", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Project.DataDeliveryObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-project-datadeliveryobject.html", + "Properties": { + "LogGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-project-datadeliveryobject.html#cfn-evidently-project-datadeliveryobject-loggroup", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "S3": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-project-datadeliveryobject.html#cfn-evidently-project-datadeliveryobject-s3", + "Required": false, + "Type": "S3Destination", + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Project.S3Destination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-project-s3destination.html", + "Properties": { + "BucketName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-project-s3destination.html#cfn-evidently-project-s3destination-bucketname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Prefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-project-s3destination.html#cfn-evidently-project-s3destination-prefix", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::FIS::ExperimentTemplate.ExperimentTemplateAction": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fis-experimenttemplate-experimenttemplateaction.html", "Properties": { @@ -30268,17 +31004,35 @@ } } }, + "AWS::FSx::FileSystem.ClientConfigurations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports-clientconfigurations.html", + "Properties": { + "Clients": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports-clientconfigurations.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports-clientconfigurations-clients", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Options": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports-clientconfigurations.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports-clientconfigurations-options", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, "AWS::FSx::FileSystem.DiskIopsConfiguration": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-ontapconfiguration-diskiopsconfiguration.html", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration.html", "Properties": { "Iops": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-ontapconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-ontapconfiguration-diskiopsconfiguration-iops", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration-iops", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Immutable" }, "Mode": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-ontapconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-ontapconfiguration-diskiopsconfiguration-mode", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration-mode", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" @@ -30362,6 +31116,18 @@ } } }, + "AWS::FSx::FileSystem.NfsExports": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports.html", + "Properties": { + "ClientConfigurations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports-clientconfigurations", + "ItemType": "ClientConfigurations", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, "AWS::FSx::FileSystem.OntapConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-ontapconfiguration.html", "Properties": { @@ -30428,6 +31194,102 @@ } } }, + "AWS::FSx::FileSystem.OpenZFSConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html", + "Properties": { + "AutomaticBackupRetentionDays": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-automaticbackupretentiondays", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "CopyTagsToBackups": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-copytagstobackups", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "CopyTagsToVolumes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-copytagstovolumes", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "DailyAutomaticBackupStartTime": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-dailyautomaticbackupstarttime", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DeploymentType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-deploymenttype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "DiskIopsConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-diskiopsconfiguration", + "Required": false, + "Type": "DiskIopsConfiguration", + "UpdateType": "Immutable" + }, + "RootVolumeConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration", + "Required": false, + "Type": "RootVolumeConfiguration", + "UpdateType": "Mutable" + }, + "ThroughputCapacity": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-throughputcapacity", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "WeeklyMaintenanceStartTime": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-weeklymaintenancestarttime", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::FSx::FileSystem.RootVolumeConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration.html", + "Properties": { + "CopyTagsToSnapshots": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-copytagstosnapshots", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, + "DataCompressionType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-datacompressiontype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "NfsExports": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports", + "ItemType": "NfsExports", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "ReadOnly": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-readonly", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, + "UserAndGroupQuotas": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas", + "ItemType": "UserAndGroupQuotas", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, "AWS::FSx::FileSystem.SelfManagedActiveDirectoryConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html", "Properties": { @@ -30470,6 +31332,29 @@ } } }, + "AWS::FSx::FileSystem.UserAndGroupQuotas": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas.html", + "Properties": { + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas-id", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Immutable" + }, + "StorageCapacityQuotaGiB": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas-storagecapacityquotagib", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Immutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-userandgroupquotas-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::FSx::FileSystem.WindowsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html", "Properties": { @@ -38001,6 +38886,7 @@ "Properties": { "Attributes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-pipeline-removeattributes.html#cfn-iotanalytics-pipeline-removeattributes-attributes", + "DuplicatesAllowed": true, "PrimitiveItemType": "String", "Required": false, "Type": "List", @@ -38025,6 +38911,7 @@ "Properties": { "Attributes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-pipeline-selectattributes.html#cfn-iotanalytics-pipeline-selectattributes-attributes", + "DuplicatesAllowed": true, "PrimitiveItemType": "String", "Required": false, "Type": "List", @@ -41247,6 +42134,17 @@ } } }, + "AWS::Kinesis::Stream.StreamModeDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streammodedetails.html", + "Properties": { + "StreamMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streammodedetails.html#cfn-kinesis-stream-streammodedetails-streammode", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::KinesisAnalytics::Application.CSVMappingParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-csvmappingparameters.html", "Properties": { @@ -44210,6 +45108,1134 @@ } } }, + "AWS::Lex::Bot.BotLocale": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-botlocale.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-botlocale.html#cfn-lex-bot-botlocale-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Intents": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-botlocale.html#cfn-lex-bot-botlocale-intents", + "DuplicatesAllowed": false, + "ItemType": "Intent", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "LocaleId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-botlocale.html#cfn-lex-bot-botlocale-localeid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "NluConfidenceThreshold": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-botlocale.html#cfn-lex-bot-botlocale-nluconfidencethreshold", + "PrimitiveType": "Double", + "Required": true, + "UpdateType": "Mutable" + }, + "SlotTypes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-botlocale.html#cfn-lex-bot-botlocale-slottypes", + "DuplicatesAllowed": false, + "ItemType": "SlotType", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "VoiceSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-botlocale.html#cfn-lex-bot-botlocale-voicesettings", + "Required": false, + "Type": "VoiceSettings", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.Button": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-button.html", + "Properties": { + "Text": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-button.html#cfn-lex-bot-button-text", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-button.html#cfn-lex-bot-button-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.CustomPayload": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-custompayload.html", + "Properties": { + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-custompayload.html#cfn-lex-bot-custompayload-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.DialogCodeHookSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-dialogcodehooksetting.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-dialogcodehooksetting.html#cfn-lex-bot-dialogcodehooksetting-enabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.ExternalSourceSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-externalsourcesetting.html", + "Properties": { + "GrammarSlotTypeSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-externalsourcesetting.html#cfn-lex-bot-externalsourcesetting-grammarslottypesetting", + "Required": false, + "Type": "GrammarSlotTypeSetting", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.FulfillmentCodeHookSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentcodehooksetting.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentcodehooksetting.html#cfn-lex-bot-fulfillmentcodehooksetting-enabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + }, + "FulfillmentUpdatesSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentcodehooksetting.html#cfn-lex-bot-fulfillmentcodehooksetting-fulfillmentupdatesspecification", + "Required": false, + "Type": "FulfillmentUpdatesSpecification", + "UpdateType": "Mutable" + }, + "PostFulfillmentStatusSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentcodehooksetting.html#cfn-lex-bot-fulfillmentcodehooksetting-postfulfillmentstatusspecification", + "Required": false, + "Type": "PostFulfillmentStatusSpecification", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.FulfillmentStartResponseSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentstartresponsespecification.html", + "Properties": { + "AllowInterrupt": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentstartresponsespecification.html#cfn-lex-bot-fulfillmentstartresponsespecification-allowinterrupt", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "DelayInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentstartresponsespecification.html#cfn-lex-bot-fulfillmentstartresponsespecification-delayinseconds", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MessageGroups": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentstartresponsespecification.html#cfn-lex-bot-fulfillmentstartresponsespecification-messagegroups", + "ItemType": "MessageGroup", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.FulfillmentUpdateResponseSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdateresponsespecification.html", + "Properties": { + "AllowInterrupt": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdateresponsespecification.html#cfn-lex-bot-fulfillmentupdateresponsespecification-allowinterrupt", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "FrequencyInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdateresponsespecification.html#cfn-lex-bot-fulfillmentupdateresponsespecification-frequencyinseconds", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MessageGroups": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdateresponsespecification.html#cfn-lex-bot-fulfillmentupdateresponsespecification-messagegroups", + "ItemType": "MessageGroup", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.FulfillmentUpdatesSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdatesspecification.html", + "Properties": { + "Active": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdatesspecification.html#cfn-lex-bot-fulfillmentupdatesspecification-active", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + }, + "StartResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdatesspecification.html#cfn-lex-bot-fulfillmentupdatesspecification-startresponse", + "Required": false, + "Type": "FulfillmentStartResponseSpecification", + "UpdateType": "Mutable" + }, + "TimeoutInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdatesspecification.html#cfn-lex-bot-fulfillmentupdatesspecification-timeoutinseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "UpdateResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-fulfillmentupdatesspecification.html#cfn-lex-bot-fulfillmentupdatesspecification-updateresponse", + "Required": false, + "Type": "FulfillmentUpdateResponseSpecification", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.GrammarSlotTypeSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-grammarslottypesetting.html", + "Properties": { + "Source": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-grammarslottypesetting.html#cfn-lex-bot-grammarslottypesetting-source", + "Required": false, + "Type": "GrammarSlotTypeSource", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.GrammarSlotTypeSource": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-grammarslottypesource.html", + "Properties": { + "KmsKeyArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-grammarslottypesource.html#cfn-lex-bot-grammarslottypesource-kmskeyarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "S3BucketName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-grammarslottypesource.html#cfn-lex-bot-grammarslottypesource-s3bucketname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "S3ObjectKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-grammarslottypesource.html#cfn-lex-bot-grammarslottypesource-s3objectkey", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.ImageResponseCard": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-imageresponsecard.html", + "Properties": { + "Buttons": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-imageresponsecard.html#cfn-lex-bot-imageresponsecard-buttons", + "ItemType": "Button", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "ImageUrl": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-imageresponsecard.html#cfn-lex-bot-imageresponsecard-imageurl", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Subtitle": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-imageresponsecard.html#cfn-lex-bot-imageresponsecard-subtitle", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Title": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-imageresponsecard.html#cfn-lex-bot-imageresponsecard-title", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.InputContext": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-inputcontext.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-inputcontext.html#cfn-lex-bot-inputcontext-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.Intent": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DialogCodeHook": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-dialogcodehook", + "Required": false, + "Type": "DialogCodeHookSetting", + "UpdateType": "Mutable" + }, + "FulfillmentCodeHook": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-fulfillmentcodehook", + "Required": false, + "Type": "FulfillmentCodeHookSetting", + "UpdateType": "Mutable" + }, + "InputContexts": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-inputcontexts", + "ItemType": "InputContext", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "IntentClosingSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-intentclosingsetting", + "Required": false, + "Type": "IntentClosingSetting", + "UpdateType": "Mutable" + }, + "IntentConfirmationSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-intentconfirmationsetting", + "Required": false, + "Type": "IntentConfirmationSetting", + "UpdateType": "Mutable" + }, + "KendraConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-kendraconfiguration", + "Required": false, + "Type": "KendraConfiguration", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "OutputContexts": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-outputcontexts", + "ItemType": "OutputContext", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "ParentIntentSignature": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-parentintentsignature", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SampleUtterances": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-sampleutterances", + "ItemType": "SampleUtterance", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SlotPriorities": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-slotpriorities", + "ItemType": "SlotPriority", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Slots": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intent.html#cfn-lex-bot-intent-slots", + "DuplicatesAllowed": false, + "ItemType": "Slot", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.IntentClosingSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intentclosingsetting.html", + "Properties": { + "ClosingResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intentclosingsetting.html#cfn-lex-bot-intentclosingsetting-closingresponse", + "Required": true, + "Type": "ResponseSpecification", + "UpdateType": "Mutable" + }, + "IsActive": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intentclosingsetting.html#cfn-lex-bot-intentclosingsetting-isactive", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.IntentConfirmationSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intentconfirmationsetting.html", + "Properties": { + "DeclinationResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intentconfirmationsetting.html#cfn-lex-bot-intentconfirmationsetting-declinationresponse", + "Required": true, + "Type": "ResponseSpecification", + "UpdateType": "Mutable" + }, + "IsActive": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intentconfirmationsetting.html#cfn-lex-bot-intentconfirmationsetting-isactive", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "PromptSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-intentconfirmationsetting.html#cfn-lex-bot-intentconfirmationsetting-promptspecification", + "Required": true, + "Type": "PromptSpecification", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.KendraConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-kendraconfiguration.html", + "Properties": { + "KendraIndex": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-kendraconfiguration.html#cfn-lex-bot-kendraconfiguration-kendraindex", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "QueryFilterString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-kendraconfiguration.html#cfn-lex-bot-kendraconfiguration-queryfilterstring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "QueryFilterStringEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-kendraconfiguration.html#cfn-lex-bot-kendraconfiguration-queryfilterstringenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.Message": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-message.html", + "Properties": { + "CustomPayload": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-message.html#cfn-lex-bot-message-custompayload", + "Required": false, + "Type": "CustomPayload", + "UpdateType": "Mutable" + }, + "ImageResponseCard": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-message.html#cfn-lex-bot-message-imageresponsecard", + "Required": false, + "Type": "ImageResponseCard", + "UpdateType": "Mutable" + }, + "PlainTextMessage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-message.html#cfn-lex-bot-message-plaintextmessage", + "Required": false, + "Type": "PlainTextMessage", + "UpdateType": "Mutable" + }, + "SSMLMessage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-message.html#cfn-lex-bot-message-ssmlmessage", + "Required": false, + "Type": "SSMLMessage", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.MessageGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-messagegroup.html", + "Properties": { + "Message": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-messagegroup.html#cfn-lex-bot-messagegroup-message", + "Required": true, + "Type": "Message", + "UpdateType": "Mutable" + }, + "Variations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-messagegroup.html#cfn-lex-bot-messagegroup-variations", + "ItemType": "Message", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.MultipleValuesSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-multiplevaluessetting.html", + "Properties": { + "AllowMultipleValues": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-multiplevaluessetting.html#cfn-lex-bot-multiplevaluessetting-allowmultiplevalues", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.ObfuscationSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-obfuscationsetting.html", + "Properties": { + "ObfuscationSettingType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-obfuscationsetting.html#cfn-lex-bot-obfuscationsetting-obfuscationsettingtype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.OutputContext": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-outputcontext.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-outputcontext.html#cfn-lex-bot-outputcontext-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TimeToLiveInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-outputcontext.html#cfn-lex-bot-outputcontext-timetoliveinseconds", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "TurnsToLive": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-outputcontext.html#cfn-lex-bot-outputcontext-turnstolive", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.PlainTextMessage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-plaintextmessage.html", + "Properties": { + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-plaintextmessage.html#cfn-lex-bot-plaintextmessage-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.PostFulfillmentStatusSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-postfulfillmentstatusspecification.html", + "Properties": { + "FailureResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-postfulfillmentstatusspecification.html#cfn-lex-bot-postfulfillmentstatusspecification-failureresponse", + "Required": false, + "Type": "ResponseSpecification", + "UpdateType": "Mutable" + }, + "SuccessResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-postfulfillmentstatusspecification.html#cfn-lex-bot-postfulfillmentstatusspecification-successresponse", + "Required": false, + "Type": "ResponseSpecification", + "UpdateType": "Mutable" + }, + "TimeoutResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-postfulfillmentstatusspecification.html#cfn-lex-bot-postfulfillmentstatusspecification-timeoutresponse", + "Required": false, + "Type": "ResponseSpecification", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.PromptSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-promptspecification.html", + "Properties": { + "AllowInterrupt": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-promptspecification.html#cfn-lex-bot-promptspecification-allowinterrupt", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "MaxRetries": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-promptspecification.html#cfn-lex-bot-promptspecification-maxretries", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MessageGroupsList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-promptspecification.html#cfn-lex-bot-promptspecification-messagegroupslist", + "ItemType": "MessageGroup", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.ResponseSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-responsespecification.html", + "Properties": { + "AllowInterrupt": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-responsespecification.html#cfn-lex-bot-responsespecification-allowinterrupt", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "MessageGroupsList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-responsespecification.html#cfn-lex-bot-responsespecification-messagegroupslist", + "ItemType": "MessageGroup", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.S3Location": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-s3location.html", + "Properties": { + "S3Bucket": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-s3location.html#cfn-lex-bot-s3location-s3bucket", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "S3ObjectKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-s3location.html#cfn-lex-bot-s3location-s3objectkey", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "S3ObjectVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-s3location.html#cfn-lex-bot-s3location-s3objectversion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SSMLMessage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-ssmlmessage.html", + "Properties": { + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-ssmlmessage.html#cfn-lex-bot-ssmlmessage-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SampleUtterance": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-sampleutterance.html", + "Properties": { + "Utterance": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-sampleutterance.html#cfn-lex-bot-sampleutterance-utterance", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SampleValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-samplevalue.html", + "Properties": { + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-samplevalue.html#cfn-lex-bot-samplevalue-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.Slot": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slot.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slot.html#cfn-lex-bot-slot-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MultipleValuesSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slot.html#cfn-lex-bot-slot-multiplevaluessetting", + "Required": false, + "Type": "MultipleValuesSetting", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slot.html#cfn-lex-bot-slot-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ObfuscationSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slot.html#cfn-lex-bot-slot-obfuscationsetting", + "Required": false, + "Type": "ObfuscationSetting", + "UpdateType": "Mutable" + }, + "SlotTypeName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slot.html#cfn-lex-bot-slot-slottypename", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ValueElicitationSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slot.html#cfn-lex-bot-slot-valueelicitationsetting", + "Required": true, + "Type": "SlotValueElicitationSetting", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotDefaultValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotdefaultvalue.html", + "Properties": { + "DefaultValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotdefaultvalue.html#cfn-lex-bot-slotdefaultvalue-defaultvalue", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotDefaultValueSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotdefaultvaluespecification.html", + "Properties": { + "DefaultValueList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotdefaultvaluespecification.html#cfn-lex-bot-slotdefaultvaluespecification-defaultvaluelist", + "ItemType": "SlotDefaultValue", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotPriority": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotpriority.html", + "Properties": { + "Priority": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotpriority.html#cfn-lex-bot-slotpriority-priority", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "SlotName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotpriority.html#cfn-lex-bot-slotpriority-slotname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottype.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottype.html#cfn-lex-bot-slottype-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ExternalSourceSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottype.html#cfn-lex-bot-slottype-externalsourcesetting", + "Required": false, + "Type": "ExternalSourceSetting", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottype.html#cfn-lex-bot-slottype-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ParentSlotTypeSignature": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottype.html#cfn-lex-bot-slottype-parentslottypesignature", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SlotTypeValues": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottype.html#cfn-lex-bot-slottype-slottypevalues", + "ItemType": "SlotTypeValue", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "ValueSelectionSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottype.html#cfn-lex-bot-slottype-valueselectionsetting", + "Required": false, + "Type": "SlotValueSelectionSetting", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotTypeValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottypevalue.html", + "Properties": { + "SampleValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottypevalue.html#cfn-lex-bot-slottypevalue-samplevalue", + "Required": true, + "Type": "SampleValue", + "UpdateType": "Mutable" + }, + "Synonyms": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slottypevalue.html#cfn-lex-bot-slottypevalue-synonyms", + "ItemType": "SampleValue", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotValueElicitationSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueelicitationsetting.html", + "Properties": { + "DefaultValueSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueelicitationsetting.html#cfn-lex-bot-slotvalueelicitationsetting-defaultvaluespecification", + "Required": false, + "Type": "SlotDefaultValueSpecification", + "UpdateType": "Mutable" + }, + "PromptSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueelicitationsetting.html#cfn-lex-bot-slotvalueelicitationsetting-promptspecification", + "Required": false, + "Type": "PromptSpecification", + "UpdateType": "Mutable" + }, + "SampleUtterances": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueelicitationsetting.html#cfn-lex-bot-slotvalueelicitationsetting-sampleutterances", + "ItemType": "SampleUtterance", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SlotConstraint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueelicitationsetting.html#cfn-lex-bot-slotvalueelicitationsetting-slotconstraint", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "WaitAndContinueSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueelicitationsetting.html#cfn-lex-bot-slotvalueelicitationsetting-waitandcontinuespecification", + "Required": false, + "Type": "WaitAndContinueSpecification", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotValueRegexFilter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueregexfilter.html", + "Properties": { + "Pattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueregexfilter.html#cfn-lex-bot-slotvalueregexfilter-pattern", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.SlotValueSelectionSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueselectionsetting.html", + "Properties": { + "RegexFilter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueselectionsetting.html#cfn-lex-bot-slotvalueselectionsetting-regexfilter", + "Required": false, + "Type": "SlotValueRegexFilter", + "UpdateType": "Mutable" + }, + "ResolutionStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-slotvalueselectionsetting.html#cfn-lex-bot-slotvalueselectionsetting-resolutionstrategy", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.StillWaitingResponseSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-stillwaitingresponsespecification.html", + "Properties": { + "AllowInterrupt": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-stillwaitingresponsespecification.html#cfn-lex-bot-stillwaitingresponsespecification-allowinterrupt", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "FrequencyInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-stillwaitingresponsespecification.html#cfn-lex-bot-stillwaitingresponsespecification-frequencyinseconds", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MessageGroupsList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-stillwaitingresponsespecification.html#cfn-lex-bot-stillwaitingresponsespecification-messagegroupslist", + "ItemType": "MessageGroup", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "TimeoutInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-stillwaitingresponsespecification.html#cfn-lex-bot-stillwaitingresponsespecification-timeoutinseconds", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.VoiceSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-voicesettings.html", + "Properties": { + "VoiceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-voicesettings.html#cfn-lex-bot-voicesettings-voiceid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::Bot.WaitAndContinueSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-waitandcontinuespecification.html", + "Properties": { + "ContinueResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-waitandcontinuespecification.html#cfn-lex-bot-waitandcontinuespecification-continueresponse", + "Required": true, + "Type": "ResponseSpecification", + "UpdateType": "Mutable" + }, + "IsActive": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-waitandcontinuespecification.html#cfn-lex-bot-waitandcontinuespecification-isactive", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "StillWaitingResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-waitandcontinuespecification.html#cfn-lex-bot-waitandcontinuespecification-stillwaitingresponse", + "Required": false, + "Type": "StillWaitingResponseSpecification", + "UpdateType": "Mutable" + }, + "WaitingResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-waitandcontinuespecification.html#cfn-lex-bot-waitandcontinuespecification-waitingresponse", + "Required": true, + "Type": "ResponseSpecification", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.AudioLogDestination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-audiologdestination.html", + "Properties": { + "S3Bucket": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-audiologdestination.html#cfn-lex-botalias-audiologdestination-s3bucket", + "Required": false, + "Type": "S3BucketLogDestination", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.AudioLogSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-audiologsetting.html", + "Properties": { + "Destination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-audiologsetting.html#cfn-lex-botalias-audiologsetting-destination", + "Required": true, + "Type": "AudioLogDestination", + "UpdateType": "Mutable" + }, + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-audiologsetting.html#cfn-lex-botalias-audiologsetting-enabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.BotAliasLocaleSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-botaliaslocalesettings.html", + "Properties": { + "CodeHookSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-botaliaslocalesettings.html#cfn-lex-botalias-botaliaslocalesettings-codehookspecification", + "Required": false, + "Type": "CodeHookSpecification", + "UpdateType": "Mutable" + }, + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-botaliaslocalesettings.html#cfn-lex-botalias-botaliaslocalesettings-enabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.BotAliasLocaleSettingsItem": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-botaliaslocalesettingsitem.html", + "Properties": { + "BotAliasLocaleSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-botaliaslocalesettingsitem.html#cfn-lex-botalias-botaliaslocalesettingsitem-botaliaslocalesetting", + "Required": false, + "Type": "BotAliasLocaleSettings", + "UpdateType": "Mutable" + }, + "LocaleId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-botaliaslocalesettingsitem.html#cfn-lex-botalias-botaliaslocalesettingsitem-localeid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.CloudWatchLogGroupLogDestination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-cloudwatchloggrouplogdestination.html", + "Properties": { + "CloudWatchLogGroupArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-cloudwatchloggrouplogdestination.html#cfn-lex-botalias-cloudwatchloggrouplogdestination-cloudwatchloggrouparn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogPrefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-cloudwatchloggrouplogdestination.html#cfn-lex-botalias-cloudwatchloggrouplogdestination-logprefix", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.CodeHookSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-codehookspecification.html", + "Properties": { + "LambdaCodeHook": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-codehookspecification.html#cfn-lex-botalias-codehookspecification-lambdacodehook", + "Required": true, + "Type": "LambdaCodeHook", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.ConversationLogSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-conversationlogsettings.html", + "Properties": { + "AudioLogSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-conversationlogsettings.html#cfn-lex-botalias-conversationlogsettings-audiologsettings", + "ItemType": "AudioLogSetting", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "TextLogSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-conversationlogsettings.html#cfn-lex-botalias-conversationlogsettings-textlogsettings", + "ItemType": "TextLogSetting", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.LambdaCodeHook": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-lambdacodehook.html", + "Properties": { + "CodeHookInterfaceVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-lambdacodehook.html#cfn-lex-botalias-lambdacodehook-codehookinterfaceversion", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LambdaArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-lambdacodehook.html#cfn-lex-botalias-lambdacodehook-lambdaarn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.S3BucketLogDestination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-s3bucketlogdestination.html", + "Properties": { + "KmsKeyArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-s3bucketlogdestination.html#cfn-lex-botalias-s3bucketlogdestination-kmskeyarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LogPrefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-s3bucketlogdestination.html#cfn-lex-botalias-s3bucketlogdestination-logprefix", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "S3BucketArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-s3bucketlogdestination.html#cfn-lex-botalias-s3bucketlogdestination-s3bucketarn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.TextLogDestination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-textlogdestination.html", + "Properties": { + "CloudWatch": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-textlogdestination.html#cfn-lex-botalias-textlogdestination-cloudwatch", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias.TextLogSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-textlogsetting.html", + "Properties": { + "Destination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-textlogsetting.html#cfn-lex-botalias-textlogsetting-destination", + "Required": false, + "Type": "TextLogDestination", + "UpdateType": "Mutable" + }, + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botalias-textlogsetting.html#cfn-lex-botalias-textlogsetting-enabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotVersion.BotVersionLocaleDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botversion-botversionlocaledetails.html", + "Properties": { + "SourceBotVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botversion-botversionlocaledetails.html#cfn-lex-botversion-botversionlocaledetails-sourcebotversion", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotVersion.BotVersionLocaleSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botversion-botversionlocalespecification.html", + "Properties": { + "BotVersionLocaleDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botversion-botversionlocalespecification.html#cfn-lex-botversion-botversionlocalespecification-botversionlocaledetails", + "Required": true, + "Type": "BotVersionLocaleDetails", + "UpdateType": "Mutable" + }, + "LocaleId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-botversion-botversionlocalespecification.html#cfn-lex-botversion-botversionlocalespecification-localeid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::ResourcePolicy.Policy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-resourcepolicy-policy.html" + }, "AWS::LicenseManager::License.BorrowConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-borrowconfiguration.html", "Properties": { @@ -46500,6 +48526,12 @@ "Required": false, "UpdateType": "Mutable" }, + "AudioWatermarkingSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiodescription.html#cfn-medialive-channel-audiodescription-audiowatermarkingsettings", + "Required": false, + "Type": "AudioWatermarkSettings", + "UpdateType": "Mutable" + }, "CodecSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiodescription.html#cfn-medialive-channel-audiodescription-codecsettings", "Required": false, @@ -46538,6 +48570,23 @@ } } }, + "AWS::MediaLive::Channel.AudioHlsRenditionSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiohlsrenditionselection.html", + "Properties": { + "GroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiohlsrenditionselection.html#cfn-medialive-channel-audiohlsrenditionselection-groupid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiohlsrenditionselection.html#cfn-medialive-channel-audiohlsrenditionselection-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::MediaLive::Channel.AudioLanguageSelection": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiolanguageselection.html", "Properties": { @@ -46638,6 +48687,12 @@ "AWS::MediaLive::Channel.AudioSelectorSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audioselectorsettings.html", "Properties": { + "AudioHlsRenditionSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audioselectorsettings.html#cfn-medialive-channel-audioselectorsettings-audiohlsrenditionselection", + "Required": false, + "Type": "AudioHlsRenditionSelection", + "UpdateType": "Mutable" + }, "AudioLanguageSelection": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audioselectorsettings.html#cfn-medialive-channel-audioselectorsettings-audiolanguageselection", "Required": false, @@ -46698,6 +48753,17 @@ } } }, + "AWS::MediaLive::Channel.AudioWatermarkSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiowatermarksettings.html", + "Properties": { + "NielsenWatermarksSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-audiowatermarksettings.html#cfn-medialive-channel-audiowatermarksettings-nielsenwatermarkssettings", + "Required": false, + "Type": "NielsenWatermarksSettings", + "UpdateType": "Mutable" + } + } + }, "AWS::MediaLive::Channel.AutomaticInputFailoverSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-automaticinputfailoversettings.html", "Properties": { @@ -47332,6 +49398,12 @@ "AWS::MediaLive::Channel.DvbSubSourceSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-dvbsubsourcesettings.html", "Properties": { + "OcrLanguage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-dvbsubsourcesettings.html#cfn-medialive-channel-dvbsubsourcesettings-ocrlanguage", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "Pid": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-dvbsubsourcesettings.html#cfn-medialive-channel-dvbsubsourcesettings-pid", "PrimitiveType": "Integer", @@ -48743,6 +50815,12 @@ "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" + }, + "Scte35Source": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-hlsinputsettings.html#cfn-medialive-channel-hlsinputsettings-scte35source", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -49873,6 +51951,29 @@ } } }, + "AWS::MediaLive::Channel.NielsenCBET": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsencbet.html", + "Properties": { + "CbetCheckDigitString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsencbet.html#cfn-medialive-channel-nielsencbet-cbetcheckdigitstring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CbetStepaside": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsencbet.html#cfn-medialive-channel-nielsencbet-cbetstepaside", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Csid": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsencbet.html#cfn-medialive-channel-nielsencbet-csid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::MediaLive::Channel.NielsenConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsenconfiguration.html", "Properties": { @@ -49890,6 +51991,46 @@ } } }, + "AWS::MediaLive::Channel.NielsenNaesIiNw": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsennaesiinw.html", + "Properties": { + "CheckDigitString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsennaesiinw.html#cfn-medialive-channel-nielsennaesiinw-checkdigitstring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Sid": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsennaesiinw.html#cfn-medialive-channel-nielsennaesiinw-sid", + "PrimitiveType": "Double", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaLive::Channel.NielsenWatermarksSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsenwatermarkssettings.html", + "Properties": { + "NielsenCbetSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsenwatermarkssettings.html#cfn-medialive-channel-nielsenwatermarkssettings-nielsencbetsettings", + "Required": false, + "Type": "NielsenCBET", + "UpdateType": "Mutable" + }, + "NielsenDistributionType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsenwatermarkssettings.html#cfn-medialive-channel-nielsenwatermarkssettings-nielsendistributiontype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "NielsenNaesIiNwSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-nielsenwatermarkssettings.html#cfn-medialive-channel-nielsenwatermarkssettings-nielsennaesiinwsettings", + "Required": false, + "Type": "NielsenNaesIiNw", + "UpdateType": "Mutable" + } + } + }, "AWS::MediaLive::Channel.Output": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-output.html", "Properties": { @@ -50277,6 +52418,12 @@ "AWS::MediaLive::Channel.Scte27SourceSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-scte27sourcesettings.html", "Properties": { + "OcrLanguage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-scte27sourcesettings.html#cfn-medialive-channel-scte27sourcesettings-ocrlanguage", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "Pid": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-scte27sourcesettings.html#cfn-medialive-channel-scte27sourcesettings-pid", "PrimitiveType": "Integer", @@ -50721,7 +52868,14 @@ }, "AWS::MediaLive::Channel.WebvttDestinationSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-webvttdestinationsettings.html", - "Properties": {} + "Properties": { + "StyleControl": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-webvttdestinationsettings.html#cfn-medialive-channel-webvttdestinationsettings-stylecontrol", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } }, "AWS::MediaLive::Input.InputDestinationRequest": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputdestinationrequest.html", @@ -57310,6 +59464,69 @@ } } }, + "AWS::RUM::AppMonitor.AppMonitorConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html", + "Properties": { + "AllowCookies": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-allowcookies", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "EnableXRay": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-enablexray", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "ExcludedPages": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-excludedpages", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "FavoritePages": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-favoritepages", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "GuestRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-guestrolearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IdentityPoolId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-identitypoolid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IncludedPages": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-includedpages", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SessionSampleRate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-sessionsamplerate", + "PrimitiveType": "Double", + "Required": false, + "UpdateType": "Mutable" + }, + "Telemetries": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html#cfn-rum-appmonitor-appmonitorconfiguration-telemetries", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::Redshift::Cluster.Endpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshift-cluster-endpoint.html", "Properties": { @@ -57458,6 +59675,156 @@ } } }, + "AWS::RefactorSpaces::Application.ApiGatewayProxyInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-application-apigatewayproxyinput.html", + "Properties": { + "EndpointType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-application-apigatewayproxyinput.html#cfn-refactorspaces-application-apigatewayproxyinput-endpointtype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "StageName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-application-apigatewayproxyinput.html#cfn-refactorspaces-application-apigatewayproxyinput-stagename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::RefactorSpaces::Route.UriPathRouteInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-route-uripathrouteinput.html", + "Properties": { + "ActivationState": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-route-uripathrouteinput.html#cfn-refactorspaces-route-uripathrouteinput-activationstate", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "IncludeChildPaths": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-route-uripathrouteinput.html#cfn-refactorspaces-route-uripathrouteinput-includechildpaths", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, + "Methods": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-route-uripathrouteinput.html#cfn-refactorspaces-route-uripathrouteinput-methods", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "SourcePath": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-route-uripathrouteinput.html#cfn-refactorspaces-route-uripathrouteinput-sourcepath", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::RefactorSpaces::Service.LambdaEndpointInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-service-lambdaendpointinput.html", + "Properties": { + "Arn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-service-lambdaendpointinput.html#cfn-refactorspaces-service-lambdaendpointinput-arn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::RefactorSpaces::Service.UrlEndpointInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-service-urlendpointinput.html", + "Properties": { + "HealthUrl": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-service-urlendpointinput.html#cfn-refactorspaces-service-urlendpointinput-healthurl", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-service-urlendpointinput.html#cfn-refactorspaces-service-urlendpointinput-url", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::ResilienceHub::App.PhysicalResourceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html", + "Properties": { + "AwsAccountId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html#cfn-resiliencehub-app-physicalresourceid-awsaccountid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "AwsRegion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html#cfn-resiliencehub-app-physicalresourceid-awsregion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Identifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html#cfn-resiliencehub-app-physicalresourceid-identifier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html#cfn-resiliencehub-app-physicalresourceid-type", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::ResilienceHub::App.ResourceMapping": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-resourcemapping.html", + "Properties": { + "LogicalStackName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-resourcemapping.html#cfn-resiliencehub-app-resourcemapping-logicalstackname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MappingType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-resourcemapping.html#cfn-resiliencehub-app-resourcemapping-mappingtype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "PhysicalResourceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-resourcemapping.html#cfn-resiliencehub-app-resourcemapping-physicalresourceid", + "Required": true, + "Type": "PhysicalResourceId", + "UpdateType": "Mutable" + }, + "ResourceName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-resourcemapping.html#cfn-resiliencehub-app-resourcemapping-resourcename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::ResilienceHub::ResiliencyPolicy.FailurePolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-resiliencypolicy-failurepolicy.html", + "Properties": { + "RpoInSecs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-resiliencypolicy-failurepolicy.html#cfn-resiliencehub-resiliencypolicy-failurepolicy-rpoinsecs", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "RtoInSecs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-resiliencypolicy-failurepolicy.html#cfn-resiliencehub-resiliencypolicy-failurepolicy-rtoinsecs", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::ResourceGroups::Group.ConfigurationItem": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-configurationitem.html", "Properties": { @@ -58474,6 +60841,17 @@ } } }, + "AWS::S3::Bucket.EventBridgeConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-eventbridgeconfig.html", + "Properties": { + "EventBridgeEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-eventbridgeconfig.html#cfn-s3-bucket-eventbridgeconfiguration-eventbridgeenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.FilterRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html", "Properties": { @@ -58680,9 +61058,32 @@ } } }, + "AWS::S3::Bucket.NoncurrentVersionExpiration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversionexpiration.html", + "Properties": { + "NewerNoncurrentVersions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversionexpiration.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversionexpiration-newernoncurrentversions", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "NoncurrentDays": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversionexpiration.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversionexpiration-noncurrentdays", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.NoncurrentVersionTransition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html", "Properties": { + "NewerNoncurrentVersions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition-newernoncurrentversions", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, "StorageClass": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition-storageclass", "PrimitiveType": "String", @@ -58700,6 +61101,12 @@ "AWS::S3::Bucket.NotificationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html", "Properties": { + "EventBridgeConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-eventbridgeconfig", + "Required": false, + "Type": "EventBridgeConfiguration", + "UpdateType": "Mutable" + }, "LambdaConfigurations": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig", "DuplicatesAllowed": false, @@ -59160,6 +61567,12 @@ "Required": false, "UpdateType": "Mutable" }, + "NoncurrentVersionExpiration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversionexpiration", + "Required": false, + "Type": "NoncurrentVersionExpiration", + "UpdateType": "Mutable" + }, "NoncurrentVersionExpirationInDays": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversionexpirationindays", "PrimitiveType": "Integer", @@ -59180,6 +61593,18 @@ "Type": "List", "UpdateType": "Mutable" }, + "ObjectSizeGreaterThan": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-objectsizegreaterthan", + "PrimitiveType": "Long", + "Required": false, + "UpdateType": "Mutable" + }, + "ObjectSizeLessThan": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-objectsizelessthan", + "PrimitiveType": "Long", + "Required": false, + "UpdateType": "Mutable" + }, "Prefix": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-prefix", "PrimitiveType": "String", @@ -59541,12 +61966,29 @@ } } }, + "AWS::S3::StorageLens.CloudWatchMetrics": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-cloudwatchmetrics.html", + "Properties": { + "IsEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-cloudwatchmetrics.html#cfn-s3-storagelens-cloudwatchmetrics-isenabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::S3::StorageLens.DataExport": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html", "Properties": { + "CloudWatchMetrics": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html#cfn-s3-storagelens-dataexport-cloudwatchmetrics", + "Required": false, + "Type": "CloudWatchMetrics", + "UpdateType": "Mutable" + }, "S3BucketDestination": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html#cfn-s3-storagelens-dataexport-s3bucketdestination", - "Required": true, + "Required": false, "Type": "S3BucketDestination", "UpdateType": "Mutable" } @@ -61869,7 +64311,7 @@ "InitialInstanceCount": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-initialinstancecount", "PrimitiveType": "Integer", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "InitialVariantWeight": { @@ -61881,7 +64323,7 @@ "InstanceType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-instancetype", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "ModelName": { @@ -61890,6 +64332,12 @@ "Required": true, "UpdateType": "Immutable" }, + "ServerlessConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-serverlessconfig", + "Required": false, + "Type": "ServerlessConfig", + "UpdateType": "Mutable" + }, "VariantName": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-variantname", "PrimitiveType": "String", @@ -61898,6 +64346,23 @@ } } }, + "AWS::SageMaker::EndpointConfig.ServerlessConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-serverlessconfig.html", + "Properties": { + "MaxConcurrency": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-serverlessconfig.html#cfn-sagemaker-endpointconfig-productionvariant-serverlessconfig-maxconcurrency", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Immutable" + }, + "MemorySizeInMB": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-serverlessconfig.html#cfn-sagemaker-endpointconfig-productionvariant-serverlessconfig-memorysizeinmb", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::SageMaker::FeatureGroup.FeatureDefinition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-featuregroup-featuredefinition.html", "Properties": { @@ -61942,6 +64407,12 @@ "Type": "ImageConfig", "UpdateType": "Immutable" }, + "InferenceSpecificationName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html#cfn-sagemaker-model-containerdefinition-inferencespecificationname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "Mode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html#cfn-sagemaker-model-containerdefinition-mode", "PrimitiveType": "String", @@ -64211,6 +66682,227 @@ } } }, + "AWS::Timestream::ScheduledQuery.DimensionMapping": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html", + "Properties": { + "DimensionValueType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html#cfn-timestream-scheduledquery-dimensionmapping-dimensionvaluetype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html#cfn-timestream-scheduledquery-dimensionmapping-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.ErrorReportConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-errorreportconfiguration.html", + "Properties": { + "S3Configuration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-errorreportconfiguration.html#cfn-timestream-scheduledquery-errorreportconfiguration-s3configuration", + "Required": true, + "Type": "S3Configuration", + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.MixedMeasureMapping": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html", + "Properties": { + "MeasureName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-measurename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "MeasureValueType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-measurevaluetype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "MultiMeasureAttributeMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-multimeasureattributemappings", + "ItemType": "MultiMeasureAttributeMapping", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "SourceColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-sourcecolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "TargetMeasureName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-targetmeasurename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.MultiMeasureAttributeMapping": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html", + "Properties": { + "MeasureValueType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-measurevaluetype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "SourceColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-sourcecolumn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "TargetMultiMeasureAttributeName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-targetmultimeasureattributename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.MultiMeasureMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasuremappings.html", + "Properties": { + "MultiMeasureAttributeMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasuremappings.html#cfn-timestream-scheduledquery-multimeasuremappings-multimeasureattributemappings", + "ItemType": "MultiMeasureAttributeMapping", + "Required": true, + "Type": "List", + "UpdateType": "Immutable" + }, + "TargetMultiMeasureName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasuremappings.html#cfn-timestream-scheduledquery-multimeasuremappings-targetmultimeasurename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.NotificationConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-notificationconfiguration.html", + "Properties": { + "SnsConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-notificationconfiguration.html#cfn-timestream-scheduledquery-notificationconfiguration-snsconfiguration", + "Required": true, + "Type": "SnsConfiguration", + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.S3Configuration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html", + "Properties": { + "BucketName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html#cfn-timestream-scheduledquery-s3configuration-bucketname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "EncryptionOption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html#cfn-timestream-scheduledquery-s3configuration-encryptionoption", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ObjectKeyPrefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html#cfn-timestream-scheduledquery-s3configuration-objectkeyprefix", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.ScheduleConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-scheduleconfiguration.html", + "Properties": { + "ScheduleExpression": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-scheduleconfiguration.html#cfn-timestream-scheduledquery-scheduleconfiguration-scheduleexpression", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.SnsConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-snsconfiguration.html", + "Properties": { + "TopicArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-snsconfiguration.html#cfn-timestream-scheduledquery-snsconfiguration-topicarn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.TargetConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-targetconfiguration.html", + "Properties": { + "TimestreamConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-targetconfiguration.html#cfn-timestream-scheduledquery-targetconfiguration-timestreamconfiguration", + "Required": true, + "Type": "TimestreamConfiguration", + "UpdateType": "Immutable" + } + } + }, + "AWS::Timestream::ScheduledQuery.TimestreamConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html", + "Properties": { + "DatabaseName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-databasename", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "DimensionMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-dimensionmappings", + "ItemType": "DimensionMapping", + "Required": true, + "Type": "List", + "UpdateType": "Immutable" + }, + "MeasureNameColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-measurenamecolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "MixedMeasureMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-mixedmeasuremappings", + "ItemType": "MixedMeasureMapping", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "MultiMeasureMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-multimeasuremappings", + "Required": false, + "Type": "MultiMeasureMappings", + "UpdateType": "Immutable" + }, + "TableName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-tablename", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "TimeColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-timecolumn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Transfer::Server.EndpointDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html", "Properties": { @@ -64365,6 +67057,41 @@ "AWS::Transfer::User.SshPublicKey": { "PrimitiveType": "String" }, + "AWS::Transfer::Workflow.WorkflowStep": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-workflow-workflowstep.html", + "Properties": { + "CopyStepDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-workflow-workflowstep.html#cfn-transfer-workflow-workflowstep-copystepdetails", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, + "CustomStepDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-workflow-workflowstep.html#cfn-transfer-workflow-workflowstep-customstepdetails", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, + "DeleteStepDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-workflow-workflowstep.html#cfn-transfer-workflow-workflowstep-deletestepdetails", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, + "TagStepDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-workflow-workflowstep.html#cfn-transfer-workflow-workflowstep-tagstepdetails", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-workflow-workflowstep.html#cfn-transfer-workflow-workflowstep-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::WAF::ByteMatchSet.ByteMatchTuple": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-bytematchset-bytematchtuples.html", "Properties": { @@ -64968,6 +67695,17 @@ } } }, + "AWS::WAFv2::RuleGroup.CaptchaConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-captchaconfig.html", + "Properties": { + "ImmunityTimeProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-captchaconfig.html#cfn-wafv2-rulegroup-captchaconfig-immunitytimeproperty", + "Required": false, + "Type": "ImmunityTimeProperty", + "UpdateType": "Mutable" + } + } + }, "AWS::WAFv2::RuleGroup.CustomResponseBody": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-customresponsebody.html", "Properties": { @@ -65113,6 +67851,17 @@ } } }, + "AWS::WAFv2::RuleGroup.ImmunityTimeProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-immunitytimeproperty.html", + "Properties": { + "ImmunityTime": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-immunitytimeproperty.html#cfn-wafv2-rulegroup-immunitytimeproperty-immunitytime", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::WAFv2::RuleGroup.JsonBody": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-jsonbody.html", "Properties": { @@ -65245,6 +67994,30 @@ } } }, + "AWS::WAFv2::RuleGroup.RegexMatchStatement": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-regexmatchstatement.html", + "Properties": { + "FieldToMatch": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-regexmatchstatement.html#cfn-wafv2-rulegroup-regexmatchstatement-fieldtomatch", + "Required": true, + "Type": "FieldToMatch", + "UpdateType": "Mutable" + }, + "RegexString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-regexmatchstatement.html#cfn-wafv2-rulegroup-regexmatchstatement-regexstring", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TextTransformations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-regexmatchstatement.html#cfn-wafv2-rulegroup-regexmatchstatement-texttransformations", + "ItemType": "TextTransformation", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::WAFv2::RuleGroup.RegexPatternSetReferenceStatement": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-regexpatternsetreferencestatement.html", "Properties": { @@ -65278,6 +68051,12 @@ "Type": "RuleAction", "UpdateType": "Mutable" }, + "CaptchaConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-rule.html#cfn-wafv2-rulegroup-rule-captchaconfig", + "Required": false, + "Type": "CaptchaConfig", + "UpdateType": "Mutable" + }, "Name": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-rule.html#cfn-wafv2-rulegroup-rule-name", "PrimitiveType": "String", @@ -65326,6 +68105,12 @@ "Required": false, "UpdateType": "Mutable" }, + "Captcha": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-ruleaction.html#cfn-wafv2-rulegroup-ruleaction-captcha", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, "Count": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-ruleaction.html#cfn-wafv2-rulegroup-ruleaction-count", "PrimitiveType": "Json", @@ -65433,6 +68218,12 @@ "Type": "RateBasedStatement", "UpdateType": "Mutable" }, + "RegexMatchStatement": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-statement.html#cfn-wafv2-rulegroup-statement-regexmatchstatement", + "Required": false, + "Type": "RegexMatchStatement", + "UpdateType": "Mutable" + }, "RegexPatternSetReferenceStatement": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-statement.html#cfn-wafv2-rulegroup-statement-regexpatternsetreferencestatement", "Required": false, @@ -65587,6 +68378,28 @@ } } }, + "AWS::WAFv2::WebACL.CaptchaAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaaction.html", + "Properties": { + "CustomRequestHandling": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaaction.html#cfn-wafv2-webacl-captchaaction-customrequesthandling", + "Required": false, + "Type": "CustomRequestHandling", + "UpdateType": "Mutable" + } + } + }, + "AWS::WAFv2::WebACL.CaptchaConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaconfig.html", + "Properties": { + "ImmunityTimeProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaconfig.html#cfn-wafv2-webacl-captchaconfig-immunitytimeproperty", + "Required": false, + "Type": "ImmunityTimeProperty", + "UpdateType": "Mutable" + } + } + }, "AWS::WAFv2::WebACL.CountAction": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-countaction.html", "Properties": { @@ -65824,6 +68637,17 @@ } } }, + "AWS::WAFv2::WebACL.ImmunityTimeProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-immunitytimeproperty.html", + "Properties": { + "ImmunityTime": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-immunitytimeproperty.html#cfn-wafv2-webacl-immunitytimeproperty-immunitytime", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::WAFv2::WebACL.JsonBody": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonbody.html", "Properties": { @@ -65998,6 +68822,30 @@ } } }, + "AWS::WAFv2::WebACL.RegexMatchStatement": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.html", + "Properties": { + "FieldToMatch": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.html#cfn-wafv2-webacl-regexmatchstatement-fieldtomatch", + "Required": true, + "Type": "FieldToMatch", + "UpdateType": "Mutable" + }, + "RegexString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.html#cfn-wafv2-webacl-regexmatchstatement-regexstring", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TextTransformations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.html#cfn-wafv2-webacl-regexmatchstatement-texttransformations", + "ItemType": "TextTransformation", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::WAFv2::WebACL.RegexPatternSetReferenceStatement": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexpatternsetreferencestatement.html", "Properties": { @@ -66031,6 +68879,12 @@ "Type": "RuleAction", "UpdateType": "Mutable" }, + "CaptchaConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.html#cfn-wafv2-webacl-rule-captchaconfig", + "Required": false, + "Type": "CaptchaConfig", + "UpdateType": "Mutable" + }, "Name": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.html#cfn-wafv2-webacl-rule-name", "PrimitiveType": "String", @@ -66085,6 +68939,12 @@ "Type": "BlockAction", "UpdateType": "Mutable" }, + "Captcha": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.html#cfn-wafv2-webacl-ruleaction-captcha", + "Required": false, + "Type": "CaptchaAction", + "UpdateType": "Mutable" + }, "Count": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.html#cfn-wafv2-webacl-ruleaction-count", "Required": false, @@ -66216,6 +69076,12 @@ "Type": "RateBasedStatement", "UpdateType": "Mutable" }, + "RegexMatchStatement": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-regexmatchstatement", + "Required": false, + "Type": "RegexMatchStatement", + "UpdateType": "Mutable" + }, "RegexPatternSetReferenceStatement": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-regexpatternsetreferencestatement", "Required": false, @@ -66732,7 +69598,7 @@ } } }, - "ResourceSpecificationVersion": "49.0.0", + "ResourceSpecificationVersion": "51.0.0", "ResourceTypes": { "AWS::ACMPCA::Certificate": { "Attributes": { @@ -67523,6 +70389,144 @@ } } }, + "AWS::AmplifyUIBuilder::Component": { + "Attributes": { + "AppId": { + "PrimitiveType": "String" + }, + "CreatedAt": { + "PrimitiveType": "String" + }, + "EnvironmentName": { + "PrimitiveType": "String" + }, + "Id": { + "PrimitiveType": "String" + }, + "ModifiedAt": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html", + "Properties": { + "BindingProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-bindingproperties", + "ItemType": "ComponentBindingPropertiesValue", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + }, + "Children": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-children", + "ItemType": "ComponentChild", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "CollectionProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-collectionproperties", + "ItemType": "ComponentDataConfiguration", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + }, + "ComponentType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-componenttype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Overrides": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-overrides", + "ItemType": "ComponentOverridesValue", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + }, + "Properties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-properties", + "ItemType": "ComponentProperty", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + }, + "SourceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-sourceid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-tags", + "PrimitiveItemType": "String", + "Required": false, + "Type": "Map", + "UpdateType": "Immutable" + }, + "Variants": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-component.html#cfn-amplifyuibuilder-component-variants", + "ItemType": "ComponentVariant", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::AmplifyUIBuilder::Theme": { + "Attributes": { + "AppId": { + "PrimitiveType": "String" + }, + "CreatedAt": { + "PrimitiveType": "String" + }, + "EnvironmentName": { + "PrimitiveType": "String" + }, + "Id": { + "PrimitiveType": "String" + }, + "ModifiedAt": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-theme.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-theme.html#cfn-amplifyuibuilder-theme-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Overrides": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-theme.html#cfn-amplifyuibuilder-theme-overrides", + "ItemType": "ThemeValues", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-theme.html#cfn-amplifyuibuilder-theme-tags", + "PrimitiveItemType": "String", + "Required": false, + "Type": "Map", + "UpdateType": "Immutable" + }, + "Values": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplifyuibuilder-theme.html#cfn-amplifyuibuilder-theme-values", + "ItemType": "ThemeValues", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::ApiGateway::Account": { "Attributes": { "Id": { @@ -67727,6 +70731,11 @@ } }, "AWS::ApiGateway::Deployment": { + "Attributes": { + "DeploymentId": { + "PrimitiveType": "String" + } + }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-deployment.html", "Properties": { "DeploymentCanarySettings": { @@ -70733,6 +73742,62 @@ } } }, + "AWS::AppSync::DomainName": { + "Attributes": { + "AppSyncDomainName": { + "PrimitiveType": "String" + }, + "DomainName": { + "PrimitiveType": "String" + }, + "HostedZoneId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainname.html", + "Properties": { + "CertificateArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainname.html#cfn-appsync-domainname-certificatearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainname.html#cfn-appsync-domainname-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DomainName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainname.html#cfn-appsync-domainname-domainname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::AppSync::DomainNameApiAssociation": { + "Attributes": { + "ApiAssociationIdentifier": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainnameapiassociation.html", + "Properties": { + "ApiId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainnameapiassociation.html#cfn-appsync-domainnameapiassociation-apiid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "DomainName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainnameapiassociation.html#cfn-appsync-domainnameapiassociation-domainname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::AppSync::FunctionConfiguration": { "Attributes": { "DataSourceName": { @@ -76258,6 +79323,111 @@ } } }, + "AWS::Connect::ContactFlow": { + "Attributes": { + "ContactFlowArn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html", + "Properties": { + "Content": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html#cfn-connect-contactflow-content", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html#cfn-connect-contactflow-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "InstanceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html#cfn-connect-contactflow-instancearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html#cfn-connect-contactflow-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "State": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html#cfn-connect-contactflow-state", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html#cfn-connect-contactflow-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html#cfn-connect-contactflow-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::Connect::ContactFlowModule": { + "Attributes": { + "ContactFlowModuleArn": { + "PrimitiveType": "String" + }, + "Status": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html", + "Properties": { + "Content": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html#cfn-connect-contactflowmodule-content", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html#cfn-connect-contactflowmodule-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "InstanceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html#cfn-connect-contactflowmodule-instancearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html#cfn-connect-contactflowmodule-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "State": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html#cfn-connect-contactflowmodule-state", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html#cfn-connect-contactflowmodule-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::Connect::HoursOfOperation": { "Attributes": { "HoursOfOperationArn": { @@ -78854,6 +82024,12 @@ "Type": "StreamSpecification", "UpdateType": "Mutable" }, + "TableClass": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-tableclass", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "TableName": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-tablename", "PrimitiveType": "String", @@ -79658,6 +82834,247 @@ } } }, + "AWS::EC2::IPAM": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "IpamId": { + "PrimitiveType": "String" + }, + "PrivateDefaultScopeId": { + "PrimitiveType": "String" + }, + "PublicDefaultScopeId": { + "PrimitiveType": "String" + }, + "ScopeCount": { + "PrimitiveType": "Integer" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipam.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipam.html#cfn-ec2-ipam-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "OperatingRegions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipam.html#cfn-ec2-ipam-operatingregions", + "DuplicatesAllowed": false, + "ItemType": "IpamOperatingRegion", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipam.html#cfn-ec2-ipam-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::EC2::IPAMAllocation": { + "Attributes": { + "IpamPoolAllocationId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamallocation.html", + "Properties": { + "Cidr": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamallocation.html#cfn-ec2-ipamallocation-cidr", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamallocation.html#cfn-ec2-ipamallocation-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "IpamPoolId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamallocation.html#cfn-ec2-ipamallocation-ipampoolid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "NetmaskLength": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamallocation.html#cfn-ec2-ipamallocation-netmasklength", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::EC2::IPAMPool": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "IpamArn": { + "PrimitiveType": "String" + }, + "IpamPoolId": { + "PrimitiveType": "String" + }, + "IpamScopeArn": { + "PrimitiveType": "String" + }, + "IpamScopeType": { + "PrimitiveType": "String" + }, + "PoolDepth": { + "PrimitiveType": "Integer" + }, + "State": { + "PrimitiveType": "String" + }, + "StateMessage": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html", + "Properties": { + "AddressFamily": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-addressfamily", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "AllocationDefaultNetmaskLength": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-allocationdefaultnetmasklength", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "AllocationMaxNetmaskLength": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-allocationmaxnetmasklength", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "AllocationMinNetmaskLength": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-allocationminnetmasklength", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "AllocationResourceTags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-allocationresourcetags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AutoImport": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-autoimport", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IpamScopeId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-ipamscopeid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Locale": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-locale", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ProvisionedCidrs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-provisionedcidrs", + "DuplicatesAllowed": false, + "ItemType": "ProvisionedCidr", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "PubliclyAdvertisable": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-publiclyadvertisable", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, + "SourceIpamPoolId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-sourceipampoolid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::EC2::IPAMScope": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "IpamArn": { + "PrimitiveType": "String" + }, + "IpamScopeId": { + "PrimitiveType": "String" + }, + "IsDefault": { + "PrimitiveType": "Boolean" + }, + "PoolCount": { + "PrimitiveType": "Integer" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html#cfn-ec2-ipamscope-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IpamId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html#cfn-ec2-ipamscope-ipamid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "IpamScopeType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html#cfn-ec2-ipamscope-ipamscopetype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html#cfn-ec2-ipamscope-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::EC2::Instance": { "Attributes": { "AvailabilityZone": { @@ -79858,6 +83275,12 @@ "Required": false, "UpdateType": "Immutable" }, + "PropagateTagsToVolumeOnCreation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-propagatetagstovolumeoncreation", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "RamdiskId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-ramdiskid", "PrimitiveType": "String", @@ -80288,44 +83711,48 @@ }, "AWS::EC2::NetworkInterface": { "Attributes": { + "Id": { + "PrimitiveType": "String" + }, "PrimaryPrivateIpAddress": { "PrimitiveType": "String" }, "SecondaryPrivateIpAddresses": { + "DuplicatesAllowed": true, "PrimitiveItemType": "String", "Type": "List" } }, - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html", "Properties": { "Description": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-description", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-description", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, "GroupSet": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-groupset", - "DuplicatesAllowed": false, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-groupset", + "DuplicatesAllowed": true, "PrimitiveItemType": "String", "Required": false, "Type": "List", "UpdateType": "Mutable" }, "InterfaceType": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-interfacetype", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-interfacetype", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" }, "Ipv6AddressCount": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresscount", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6addresscount", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" }, "Ipv6Addresses": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresses", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6addresses", "DuplicatesAllowed": false, "ItemType": "InstanceIpv6Address", "Required": false, @@ -80333,39 +83760,39 @@ "UpdateType": "Mutable" }, "PrivateIpAddress": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddress", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-privateipaddress", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" }, "PrivateIpAddresses": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddresses", - "DuplicatesAllowed": false, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-privateipaddresses", + "DuplicatesAllowed": true, "ItemType": "PrivateIpAddressSpecification", "Required": false, "Type": "List", - "UpdateType": "Conditional" + "UpdateType": "Mutable" }, "SecondaryPrivateIpAddressCount": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-secondaryprivateipcount", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-secondaryprivateipaddresscount", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" }, "SourceDestCheck": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-sourcedestcheck", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-sourcedestcheck", "PrimitiveType": "Boolean", "Required": false, "UpdateType": "Mutable" }, "SubnetId": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-subnetid", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-subnetid", "PrimitiveType": "String", "Required": true, "UpdateType": "Immutable" }, "Tags": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-tags", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-tags", "DuplicatesAllowed": true, "ItemType": "Tag", "Required": false, @@ -80915,16 +84342,21 @@ } }, "AWS::EC2::SubnetRouteTableAssociation": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-route-table-assoc.html", + "Attributes": { + "Id": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetroutetableassociation.html", "Properties": { "RouteTableId": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-route-table-assoc.html#cfn-ec2-subnetroutetableassociation-routetableid", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetroutetableassociation.html#cfn-ec2-subnetroutetableassociation-routetableid", "PrimitiveType": "String", "Required": true, - "UpdateType": "Mutable" + "UpdateType": "Immutable" }, "SubnetId": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-route-table-assoc.html#cfn-ec2-subnetroutetableassociation-subnetid", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetroutetableassociation.html#cfn-ec2-subnetroutetableassociation-subnetid", "PrimitiveType": "String", "Required": true, "UpdateType": "Immutable" @@ -81860,6 +85292,12 @@ "Required": false, "Type": "List", "UpdateType": "Mutable" + }, + "PayerResponsibility": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-payerresponsibility", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -82981,6 +86419,9 @@ "Endpoint": { "PrimitiveType": "String" }, + "KubernetesNetworkConfig.ServiceIpv6Cidr": { + "PrimitiveType": "String" + }, "OpenIdConnectIssuerUrl": { "PrimitiveType": "String" } @@ -83441,6 +86882,12 @@ "Type": "List", "UpdateType": "Immutable" }, + "CustomAmiId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-customamiid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "EbsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-ebsconfiguration", "Required": false, @@ -84044,6 +87491,12 @@ "Required": false, "UpdateType": "Immutable" }, + "DataTieringEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-datatieringenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, "Engine": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-engine", "PrimitiveType": "String", @@ -85554,6 +89007,242 @@ } } }, + "AWS::Evidently::Experiment": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MetricGoals": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-metricgoals", + "DuplicatesAllowed": false, + "ItemType": "MetricGoalObject", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "OnlineAbConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-onlineabconfig", + "Required": true, + "Type": "OnlineAbConfigObject", + "UpdateType": "Mutable" + }, + "Project": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-project", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "RandomizationSalt": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-randomizationsalt", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SamplingRate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-samplingrate", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Treatments": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html#cfn-evidently-experiment-treatments", + "DuplicatesAllowed": false, + "ItemType": "TreatmentObject", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Feature": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html", + "Properties": { + "DefaultVariation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-defaultvariation", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EntityOverrides": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-entityoverrides", + "DuplicatesAllowed": false, + "ItemType": "EntityOverride", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "EvaluationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-evaluationstrategy", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Project": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-project", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Variations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html#cfn-evidently-feature-variations", + "DuplicatesAllowed": false, + "ItemType": "VariationObject", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Launch": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Groups": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-groups", + "DuplicatesAllowed": false, + "ItemType": "LaunchGroupObject", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "MetricMonitors": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-metricmonitors", + "DuplicatesAllowed": false, + "ItemType": "MetricDefinitionObject", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Project": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-project", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "RandomizationSalt": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-randomizationsalt", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ScheduledSplitsConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-scheduledsplitsconfig", + "DuplicatesAllowed": false, + "ItemType": "StepConfig", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-launch.html#cfn-evidently-launch-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Evidently::Project": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-project.html", + "Properties": { + "DataDelivery": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-project.html#cfn-evidently-project-datadelivery", + "Required": false, + "Type": "DataDeliveryObject", + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-project.html#cfn-evidently-project-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-project.html#cfn-evidently-project-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-project.html#cfn-evidently-project-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::FIS::ExperimentTemplate": { "Attributes": { "Id": { @@ -85716,6 +89405,9 @@ }, "LustreMountName": { "PrimitiveType": "String" + }, + "RootVolumeId": { + "PrimitiveType": "String" } }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html", @@ -85756,6 +89448,12 @@ "Type": "OntapConfiguration", "UpdateType": "Mutable" }, + "OpenZFSConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-openzfsconfiguration", + "Required": false, + "Type": "OpenZFSConfiguration", + "UpdateType": "Mutable" + }, "SecurityGroupIds": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-securitygroupids", "PrimitiveItemType": "String", @@ -90786,10 +94484,16 @@ } }, "AWS::IoTAnalytics::Pipeline": { + "Attributes": { + "Id": { + "PrimitiveType": "String" + } + }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotanalytics-pipeline.html", "Properties": { "PipelineActivities": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotanalytics-pipeline.html#cfn-iotanalytics-pipeline-pipelineactivities", + "DuplicatesAllowed": true, "ItemType": "Activity", "Required": true, "Type": "List", @@ -90803,6 +94507,7 @@ }, "Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotanalytics-pipeline.html#cfn-iotanalytics-pipeline-tags", + "DuplicatesAllowed": true, "ItemType": "Tag", "Required": false, "Type": "List", @@ -91271,6 +94976,14 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-project.html", "Properties": { + "AssetIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-project.html#cfn-iotsitewise-project-assetids", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "PortalId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-project.html#cfn-iotsitewise-project-portalid", "PrimitiveType": "String", @@ -92204,7 +95917,7 @@ "ShardCount": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-shardcount", "PrimitiveType": "Integer", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "StreamEncryption": { @@ -92213,6 +95926,12 @@ "Type": "StreamEncryption", "UpdateType": "Mutable" }, + "StreamModeDetails": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-streammodedetails", + "Required": false, + "Type": "StreamModeDetails", + "UpdateType": "Mutable" + }, "Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-tags", "DuplicatesAllowed": true, @@ -93104,6 +96823,207 @@ } } }, + "AWS::Lex::Bot": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "Id": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html", + "Properties": { + "AutoBuildBotLocales": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-autobuildbotlocales", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "BotFileS3Location": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-botfiles3location", + "Required": false, + "Type": "S3Location", + "UpdateType": "Mutable" + }, + "BotLocales": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-botlocales", + "DuplicatesAllowed": false, + "ItemType": "BotLocale", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "BotTags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-bottags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "DataPrivacy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-dataprivacy", + "PrimitiveType": "Json", + "Required": true, + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IdleSessionTTLInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-idlesessionttlinseconds", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TestBotAliasTags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-bot.html#cfn-lex-bot-testbotaliastags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotAlias": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "BotAliasId": { + "PrimitiveType": "String" + }, + "BotAliasStatus": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html", + "Properties": { + "BotAliasLocaleSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-botaliaslocalesettings", + "DuplicatesAllowed": false, + "ItemType": "BotAliasLocaleSettingsItem", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "BotAliasName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-botaliasname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "BotAliasTags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-botaliastags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "BotId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-botid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "BotVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-botversion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ConversationLogSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-conversationlogsettings", + "Required": false, + "Type": "ConversationLogSettings", + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SentimentAnalysisSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botalias.html#cfn-lex-botalias-sentimentanalysissettings", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::BotVersion": { + "Attributes": { + "BotVersion": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botversion.html", + "Properties": { + "BotId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botversion.html#cfn-lex-botversion-botid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "BotVersionLocaleSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botversion.html#cfn-lex-botversion-botversionlocalespecification", + "ItemType": "BotVersionLocaleSpecification", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-botversion.html#cfn-lex-botversion-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Lex::ResourcePolicy": { + "Attributes": { + "Id": { + "PrimitiveType": "String" + }, + "RevisionId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-resourcepolicy.html", + "Properties": { + "Policy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-resourcepolicy.html#cfn-lex-resourcepolicy-policy", + "Required": true, + "Type": "Policy", + "UpdateType": "Mutable" + }, + "ResourceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lex-resourcepolicy.html#cfn-lex-resourcepolicy-resourcearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::LicenseManager::Grant": { "Attributes": { "GrantArn": { @@ -100647,6 +104567,43 @@ } } }, + "AWS::RUM::AppMonitor": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rum-appmonitor.html", + "Properties": { + "AppMonitorConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rum-appmonitor.html#cfn-rum-appmonitor-appmonitorconfiguration", + "Required": false, + "Type": "AppMonitorConfiguration", + "UpdateType": "Mutable" + }, + "CwLogEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rum-appmonitor.html#cfn-rum-appmonitor-cwlogenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "Domain": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rum-appmonitor.html#cfn-rum-appmonitor-domain", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rum-appmonitor.html#cfn-rum-appmonitor-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rum-appmonitor.html#cfn-rum-appmonitor-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::Redshift::Cluster": { "Attributes": { "DeferMaintenanceIdentifier": { @@ -101315,6 +105272,236 @@ } } }, + "AWS::RefactorSpaces::Application": { + "Attributes": { + "ApiGatewayId": { + "PrimitiveType": "String" + }, + "ApplicationIdentifier": { + "PrimitiveType": "String" + }, + "Arn": { + "PrimitiveType": "String" + }, + "NlbArn": { + "PrimitiveType": "String" + }, + "NlbName": { + "PrimitiveType": "String" + }, + "ProxyUrl": { + "PrimitiveType": "String" + }, + "StageName": { + "PrimitiveType": "String" + }, + "VpcLinkId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-application.html", + "Properties": { + "ApiGatewayProxy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-application.html#cfn-refactorspaces-application-apigatewayproxy", + "Required": false, + "Type": "ApiGatewayProxyInput", + "UpdateType": "Immutable" + }, + "EnvironmentIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-application.html#cfn-refactorspaces-application-environmentidentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-application.html#cfn-refactorspaces-application-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ProxyType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-application.html#cfn-refactorspaces-application-proxytype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-application.html#cfn-refactorspaces-application-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "VpcId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-application.html#cfn-refactorspaces-application-vpcid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::RefactorSpaces::Environment": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "EnvironmentIdentifier": { + "PrimitiveType": "String" + }, + "TransitGatewayId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-environment.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-environment.html#cfn-refactorspaces-environment-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-environment.html#cfn-refactorspaces-environment-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "NetworkFabricType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-environment.html#cfn-refactorspaces-environment-networkfabrictype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-environment.html#cfn-refactorspaces-environment-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::RefactorSpaces::Route": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "PathResourceToId": { + "PrimitiveType": "String" + }, + "RouteIdentifier": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-route.html", + "Properties": { + "ApplicationIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-route.html#cfn-refactorspaces-route-applicationidentifier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "EnvironmentIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-route.html#cfn-refactorspaces-route-environmentidentifier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "RouteType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-route.html#cfn-refactorspaces-route-routetype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ServiceIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-route.html#cfn-refactorspaces-route-serviceidentifier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-route.html#cfn-refactorspaces-route-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "UriPathRoute": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-route.html#cfn-refactorspaces-route-uripathroute", + "Required": false, + "Type": "UriPathRouteInput", + "UpdateType": "Immutable" + } + } + }, + "AWS::RefactorSpaces::Service": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "ServiceIdentifier": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html", + "Properties": { + "ApplicationIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-applicationidentifier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "EndpointType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-endpointtype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "EnvironmentIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-environmentidentifier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "LambdaEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-lambdaendpoint", + "Required": false, + "Type": "LambdaEndpointInput", + "UpdateType": "Immutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "UrlEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-urlendpoint", + "Required": false, + "Type": "UrlEndpointInput", + "UpdateType": "Immutable" + }, + "VpcId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-refactorspaces-service.html#cfn-refactorspaces-service-vpcid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::Rekognition::Project": { "Attributes": { "Arn": { @@ -101331,6 +105518,103 @@ } } }, + "AWS::ResilienceHub::App": { + "Attributes": { + "AppArn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-app.html", + "Properties": { + "AppTemplateBody": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-app.html#cfn-resiliencehub-app-apptemplatebody", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-app.html#cfn-resiliencehub-app-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-app.html#cfn-resiliencehub-app-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "ResiliencyPolicyArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-app.html#cfn-resiliencehub-app-resiliencypolicyarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ResourceMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-app.html#cfn-resiliencehub-app-resourcemappings", + "DuplicatesAllowed": true, + "ItemType": "ResourceMapping", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-app.html#cfn-resiliencehub-app-tags", + "PrimitiveItemType": "String", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + } + } + }, + "AWS::ResilienceHub::ResiliencyPolicy": { + "Attributes": { + "PolicyArn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-resiliencypolicy.html", + "Properties": { + "DataLocationConstraint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-resiliencypolicy.html#cfn-resiliencehub-resiliencypolicy-datalocationconstraint", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Policy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-resiliencypolicy.html#cfn-resiliencehub-resiliencypolicy-policy", + "ItemType": "FailurePolicy", + "Required": true, + "Type": "Map", + "UpdateType": "Mutable" + }, + "PolicyDescription": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-resiliencypolicy.html#cfn-resiliencehub-resiliencypolicy-policydescription", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PolicyName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-resiliencypolicy.html#cfn-resiliencehub-resiliencypolicy-policyname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-resiliencypolicy.html#cfn-resiliencehub-resiliencypolicy-tags", + "PrimitiveItemType": "String", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + }, + "Tier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resiliencehub-resiliencypolicy.html#cfn-resiliencehub-resiliencypolicy-tier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::ResourceGroups::Group": { "Attributes": { "Arn": { @@ -106994,6 +111278,101 @@ } } }, + "AWS::Timestream::ScheduledQuery": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "SQErrorReportConfiguration": { + "PrimitiveType": "String" + }, + "SQKmsKeyId": { + "PrimitiveType": "String" + }, + "SQName": { + "PrimitiveType": "String" + }, + "SQNotificationConfiguration": { + "PrimitiveType": "String" + }, + "SQQueryString": { + "PrimitiveType": "String" + }, + "SQScheduleConfiguration": { + "PrimitiveType": "String" + }, + "SQScheduledQueryExecutionRoleArn": { + "PrimitiveType": "String" + }, + "SQTargetConfiguration": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html", + "Properties": { + "ClientToken": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-clienttoken", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ErrorReportConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-errorreportconfiguration", + "Required": true, + "Type": "ErrorReportConfiguration", + "UpdateType": "Immutable" + }, + "KmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-kmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "NotificationConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-notificationconfiguration", + "Required": true, + "Type": "NotificationConfiguration", + "UpdateType": "Immutable" + }, + "QueryString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-querystring", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "ScheduleConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-scheduleconfiguration", + "Required": true, + "Type": "ScheduleConfiguration", + "UpdateType": "Immutable" + }, + "ScheduledQueryExecutionRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-scheduledqueryexecutionrolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "ScheduledQueryName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-scheduledqueryname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "TargetConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-targetconfiguration", + "Required": false, + "Type": "TargetConfiguration", + "UpdateType": "Immutable" + } + } + }, "AWS::Timestream::Table": { "Attributes": { "Arn": { @@ -107198,6 +111577,49 @@ } } }, + "AWS::Transfer::Workflow": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "WorkflowId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-workflow.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-workflow.html#cfn-transfer-workflow-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "OnExceptionSteps": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-workflow.html#cfn-transfer-workflow-onexceptionsteps", + "DuplicatesAllowed": false, + "ItemType": "WorkflowStep", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "Steps": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-workflow.html#cfn-transfer-workflow-steps", + "DuplicatesAllowed": false, + "ItemType": "WorkflowStep", + "Required": true, + "Type": "List", + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-workflow.html#cfn-transfer-workflow-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::WAF::ByteMatchSet": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-bytematchset.html", "Properties": { @@ -107806,6 +112228,12 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html", "Properties": { + "CaptchaConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-captchaconfig", + "Required": false, + "Type": "CaptchaConfig", + "UpdateType": "Mutable" + }, "CustomResponseBodies": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-customresponsebodies", "ItemType": "CustomResponseBody", diff --git a/packages/@aws-cdk/cfnspec/spec-source/1002_Lex_BotAlias_TextLogDestination_patch.json b/packages/@aws-cdk/cfnspec/spec-source/1002_Lex_BotAlias_TextLogDestination_patch.json new file mode 100644 index 0000000000000..a34166be675b3 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/1002_Lex_BotAlias_TextLogDestination_patch.json @@ -0,0 +1,15 @@ +{ + "PropertyTypes": { + "AWS::Lex::BotAlias.TextLogDestination": { + "patch": { + "description": "Temporarily remove AWS::Lex::BotAlias.TextLogDestination.CloudWatch until cfn specs for it are stable.", + "operations": [ + { + "op": "remove", + "path": "/Properties/CloudWatch" + } + ] + } + } + } +} diff --git a/packages/@aws-cdk/cfnspec/spec-source/590_Ecr_RepositoryPolicyText_patch.json b/packages/@aws-cdk/cfnspec/spec-source/590_Ecr_RepositoryPolicyText_patch.json index 933859092983a..fca812f3cbf7f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/590_Ecr_RepositoryPolicyText_patch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/590_Ecr_RepositoryPolicyText_patch.json @@ -1,16 +1,16 @@ { "ResourceTypes": { - "AWS::ECR::Repository": { - "patch": { - "description": "Primitive type does not exist at all for some reason and it should be Json", - "operations": [ - { - "path": "/Properties/RepositoryPolicyText/PrimitiveType", - "op": "add", - "value": "Json" - } - ] + "AWS::ECR::Repository": { + "patch": { + "description": "Primitive type does not exist at all for some reason and it should be Json", + "operations": [ + { + "path": "/Properties/RepositoryPolicyText/PrimitiveType", + "op": "add", + "value": "Json" } + ] } + } } } \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/spec-source/600_Ecs_TaskDefinition_EFSVolumeConfiguration_AuthorizationConfig_patch.json b/packages/@aws-cdk/cfnspec/spec-source/600_Ecs_TaskDefinition_EFSVolumeConfiguration_AuthorizationConfig_patch.json index e1f7e1c0375d1..67efbee4cd83e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/600_Ecs_TaskDefinition_EFSVolumeConfiguration_AuthorizationConfig_patch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/600_Ecs_TaskDefinition_EFSVolumeConfiguration_AuthorizationConfig_patch.json @@ -2,7 +2,7 @@ "PropertyTypes": { "AWS::ECS::TaskDefinition.EFSVolumeConfiguration": { "patch": { - "description": "Primitive type should not exist because it already has a complext type of AuthorizationConfig", + "description": "Primitive type should not exist because it already has a complex type of AuthorizationConfig", "operations": [ { "path": "/Properties/AuthorizationConfig/PrimitiveType", diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index b0ea12c37b9c8..e98c991ae3f83 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -65,7 +65,7 @@ "@types/jest": "^27.0.3", "@types/mock-fs": "^4.13.1", "@types/semver": "^7.3.9", - "jest": "^27.3.1", + "jest": "^27.4.3", "mock-fs": "^4.14.0", "typescript-json-schema": "^0.52.0" }, diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index df973a6c49a18..049b1d6cbde06 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -29,16 +29,16 @@ "diff": "^5.0.0", "fast-deep-equal": "^3.1.3", "string-width": "^4.2.3", - "table": "^6.7.3" + "table": "^6.7.5" }, "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "@types/string-width": "^4.0.1", - "fast-check": "^2.19.0", - "jest": "^27.3.1", - "ts-jest": "^27.0.7" + "fast-check": "^2.20.0", + "jest": "^27.4.3", + "ts-jest": "^27.1.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index b95703f83b8c5..50d69d512d190 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -79,6 +79,7 @@ "@aws-cdk/aws-acmpca": "0.0.0", "@aws-cdk/aws-amazonmq": "0.0.0", "@aws-cdk/aws-amplify": "0.0.0", + "@aws-cdk/aws-amplifyuibuilder": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", @@ -146,6 +147,7 @@ "@aws-cdk/aws-emrcontainers": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", + "@aws-cdk/aws-evidently": "0.0.0", "@aws-cdk/aws-finspace": "0.0.0", "@aws-cdk/aws-fis": "0.0.0", "@aws-cdk/aws-fms": "0.0.0", @@ -179,6 +181,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", + "@aws-cdk/aws-lex": "0.0.0", "@aws-cdk/aws-licensemanager": "0.0.0", "@aws-cdk/aws-lightsail": "0.0.0", "@aws-cdk/aws-location": "0.0.0", @@ -211,13 +214,16 @@ "@aws-cdk/aws-ram": "0.0.0", "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-redshift": "0.0.0", + "@aws-cdk/aws-refactorspaces": "0.0.0", "@aws-cdk/aws-rekognition": "0.0.0", + "@aws-cdk/aws-resiliencehub": "0.0.0", "@aws-cdk/aws-resourcegroups": "0.0.0", "@aws-cdk/aws-robomaker": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/aws-route53recoverycontrol": "0.0.0", "@aws-cdk/aws-route53recoveryreadiness": "0.0.0", "@aws-cdk/aws-route53resolver": "0.0.0", + "@aws-cdk/aws-rum": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3objectlambda": "0.0.0", "@aws-cdk/aws-s3outposts": "0.0.0", @@ -258,6 +264,7 @@ "@aws-cdk/aws-acmpca": "0.0.0", "@aws-cdk/aws-amazonmq": "0.0.0", "@aws-cdk/aws-amplify": "0.0.0", + "@aws-cdk/aws-amplifyuibuilder": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", @@ -325,6 +332,7 @@ "@aws-cdk/aws-emrcontainers": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", + "@aws-cdk/aws-evidently": "0.0.0", "@aws-cdk/aws-finspace": "0.0.0", "@aws-cdk/aws-fis": "0.0.0", "@aws-cdk/aws-fms": "0.0.0", @@ -358,6 +366,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", + "@aws-cdk/aws-lex": "0.0.0", "@aws-cdk/aws-licensemanager": "0.0.0", "@aws-cdk/aws-lightsail": "0.0.0", "@aws-cdk/aws-location": "0.0.0", @@ -390,13 +399,16 @@ "@aws-cdk/aws-ram": "0.0.0", "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-redshift": "0.0.0", + "@aws-cdk/aws-refactorspaces": "0.0.0", "@aws-cdk/aws-rekognition": "0.0.0", + "@aws-cdk/aws-resiliencehub": "0.0.0", "@aws-cdk/aws-resourcegroups": "0.0.0", "@aws-cdk/aws-robomaker": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/aws-route53recoverycontrol": "0.0.0", "@aws-cdk/aws-route53recoveryreadiness": "0.0.0", "@aws-cdk/aws-route53resolver": "0.0.0", + "@aws-cdk/aws-rum": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3objectlambda": "0.0.0", "@aws-cdk/aws-s3outposts": "0.0.0", @@ -436,8 +448,8 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1", - "ts-jest": "^27.0.7" + "jest": "^27.4.3", + "ts-jest": "^27.1.1" }, "bundledDependencies": [ "yaml" diff --git a/packages/@aws-cdk/core/lib/arn.ts b/packages/@aws-cdk/core/lib/arn.ts index ac10aef173535..a04f03baf466f 100644 --- a/packages/@aws-cdk/core/lib/arn.ts +++ b/packages/@aws-cdk/core/lib/arn.ts @@ -130,10 +130,16 @@ export class Arn { * the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope * can be 'undefined'. */ - public static format(components: ArnComponents, stack: Stack): string { - const partition = components.partition ?? stack.partition; - const region = components.region ?? stack.region; - const account = components.account ?? stack.account; + public static format(components: ArnComponents, stack?: Stack): string { + const partition = components.partition ?? stack?.partition; + const region = components.region ?? stack?.region; + const account = components.account ?? stack?.account; + + // Catch both 'null' and 'undefined' + if (partition == null || region == null || account == null) { + throw new Error(`Arn.format: partition (${partition}), region (${region}), and account (${account}) must all be passed if stack is not passed.`); + } + const sep = components.sep ?? (components.arnFormat === ArnFormat.COLON_RESOURCE_NAME ? ':' : '/'); const values = [ diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 49f4e8d1d1a8a..3e8f0693a8d3d 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -179,15 +179,15 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/fs-extra": "^8.1.2", "@types/jest": "^27.0.3", "@types/lodash": "^4.14.177", "@types/minimatch": "^3.0.5", "@types/node": "^10.17.60", "@types/sinon": "^9.0.11", - "fast-check": "^2.19.0", - "jest": "^27.3.1", + "fast-check": "^2.20.0", + "jest": "^27.4.3", "lodash": "^4.17.21", "sinon": "^9.2.4", "ts-mock-imports": "^1.3.8" diff --git a/packages/@aws-cdk/core/test/arn.test.ts b/packages/@aws-cdk/core/test/arn.test.ts index 28d0ebf22a446..6da31f11f9b22 100644 --- a/packages/@aws-cdk/core/test/arn.test.ts +++ b/packages/@aws-cdk/core/test/arn.test.ts @@ -20,6 +20,14 @@ describe('arn', () => { }); + test('cannot rely on defaults when stack not known', () => { + expect(() => + Arn.format({ + service: 'sqs', + resource: 'myqueuename', + })).toThrow(/must all be passed if stack is not/); + }); + test('create from components with specific values for the various components', () => { const stack = new Stack(); diff --git a/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/runtime/index.ts b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/runtime/index.ts index e88b441637cfc..d56558ef1be31 100644 --- a/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/runtime/index.ts +++ b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/runtime/index.ts @@ -161,8 +161,8 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent if (call) { + let credentials; if (call.assumedRoleArn) { - const timestamp = (new Date()).getTime(); const params = { @@ -170,10 +170,9 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent RoleSessionName: `${timestamp}-${physicalResourceId}`.substring(0, 64), }; - AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ + credentials = new AWS.ChainableTemporaryCredentials({ params: params, }); - } if (!Object.prototype.hasOwnProperty.call(AWS, call.service)) { @@ -181,6 +180,7 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent } const awsService = new (AWS as any)[call.service]({ apiVersion: call.apiVersion, + credentials: credentials, region: call.region, }); diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index cdc43d2f28720..3dcf3875ea1db 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -81,12 +81,12 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/aws-lambda": "^8.10.85", + "@types/aws-lambda": "^8.10.86", "@types/fs-extra": "^8.1.2", "@types/jest": "^27.0.3", "@types/sinon": "^9.0.11", "aws-sdk": "^2.848.0", - "aws-sdk-mock": "^5.4.0", + "aws-sdk-mock": "^5.5.0", "fs-extra": "^9.1.0", "nock": "^13.2.1", "sinon": "^9.2.4" diff --git a/packages/@aws-cdk/custom-resources/test/aws-custom-resource/runtime/index.test.ts b/packages/@aws-cdk/custom-resources/test/aws-custom-resource/runtime/index.test.ts new file mode 100644 index 0000000000000..f16812a7d0c30 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/test/aws-custom-resource/runtime/index.test.ts @@ -0,0 +1,158 @@ +import * as AWS from 'aws-sdk'; +import { PhysicalResourceId } from '../../../lib'; +import { handler } from '../../../lib/aws-custom-resource/runtime/index'; + +/* eslint-disable no-console */ +console.log = jest.fn(); + +jest.mock('aws-sdk', () => { + return { + ...jest.requireActual('aws-sdk'), + SSM: jest.fn(() => { + return { + config: { + apiVersion: 'apiVersion', + region: 'eu-west-1', + }, + getParameter: () => { + return { + promise: async () => {}, + }; + }, + }; + }), + }; +}); + +jest.mock('https', () => { + return { + request: (_: any, callback: () => void) => { + return { + on: () => undefined, + write: () => true, + end: callback, + }; + }, + }; +}); + +afterEach(() => { + jest.clearAllMocks(); +}); + +test('SDK global credentials are never set', async () => { + // WHEN + await handler({ + LogicalResourceId: 'logicalResourceId', + RequestId: 'requestId', + RequestType: 'Create', + ResponseURL: 'responseUrl', + ResourceProperties: { + Create: JSON.stringify({ + action: 'getParameter', + assumedRoleArn: 'arn:aws:iam::123456789012:role/CoolRole', + parameters: { + Name: 'foo', + }, + physicalResourceId: PhysicalResourceId.of('id'), + service: 'SSM', + }), + ServiceToken: 'serviceToken', + }, + ResourceType: 'resourceType', + ServiceToken: 'serviceToken', + StackId: 'stackId', + }, {} as AWSLambda.Context); + + // THEN + expect(AWS.config).toBeInstanceOf(AWS.Config); + expect(AWS.config.credentials).toBeNull(); +}); + +test('SDK credentials are not persisted across subsequent invocations', async () => { + // GIVEN + const mockCreds = new AWS.ChainableTemporaryCredentials(); + jest.spyOn(AWS, 'ChainableTemporaryCredentials').mockReturnValue(mockCreds); + + // WHEN + await handler({ + LogicalResourceId: 'logicalResourceId', + RequestId: 'requestId', + RequestType: 'Create', + ResponseURL: 'responseUrl', + ResourceProperties: { + Create: JSON.stringify({ + action: 'getParameter', + parameters: { + Name: 'foo', + }, + physicalResourceId: PhysicalResourceId.of('id'), + service: 'SSM', + }), + ServiceToken: 'serviceToken', + }, + ResourceType: 'resourceType', + ServiceToken: 'serviceToken', + StackId: 'stackId', + }, {} as AWSLambda.Context); + + await handler({ + LogicalResourceId: 'logicalResourceId', + RequestId: 'requestId', + RequestType: 'Create', + ResponseURL: 'responseUrl', + ResourceProperties: { + Create: JSON.stringify({ + action: 'getParameter', + assumedRoleArn: 'arn:aws:iam::123456789012:role/CoolRole', + parameters: { + Name: 'foo', + }, + physicalResourceId: PhysicalResourceId.of('id'), + service: 'SSM', + }), + ServiceToken: 'serviceToken', + }, + ResourceType: 'resourceType', + ServiceToken: 'serviceToken', + StackId: 'stackId', + }, {} as AWSLambda.Context); + + await handler({ + LogicalResourceId: 'logicalResourceId', + RequestId: 'requestId', + RequestType: 'Create', + ResponseURL: 'responseUrl', + ResourceProperties: { + Create: JSON.stringify({ + action: 'getParameter', + parameters: { + Name: 'foo', + }, + physicalResourceId: PhysicalResourceId.of('id'), + service: 'SSM', + }), + ServiceToken: 'serviceToken', + }, + ResourceType: 'resourceType', + ServiceToken: 'serviceToken', + StackId: 'stackId', + }, {} as AWSLambda.Context); + + // THEN + expect(AWS.SSM).toHaveBeenNthCalledWith(1, { + apiVersion: undefined, + credentials: undefined, + region: undefined, + }); + expect(AWS.SSM).toHaveBeenNthCalledWith(2, { + apiVersion: undefined, + credentials: mockCreds, + region: undefined, + }); + expect(AWS.SSM).toHaveBeenNthCalledWith(3, { + apiVersion: undefined, + credentials: undefined, + region: undefined, + }); +}); diff --git a/packages/@aws-cdk/cx-api/lib/assets.ts b/packages/@aws-cdk/cx-api/lib/assets.ts index 010bafc80c3a5..b4c658b8d57b9 100644 --- a/packages/@aws-cdk/cx-api/lib/assets.ts +++ b/packages/@aws-cdk/cx-api/lib/assets.ts @@ -15,7 +15,6 @@ export const ASSET_RESOURCE_METADATA_DOCKER_BUILD_ARGS_KEY = 'aws:asset:docker-b export const ASSET_RESOURCE_METADATA_DOCKER_BUILD_TARGET_KEY = 'aws:asset:docker-build-target'; export const ASSET_RESOURCE_METADATA_PROPERTY_KEY = 'aws:asset:property'; export const ASSET_RESOURCE_METADATA_IS_BUNDLED_KEY = 'aws:asset:is-bundled'; -export const ASSET_RESOURCE_METADATA_ORIGINAL_PATH_KEY = 'aws:asset:original-path'; /** * Separator string that separates the prefix separator from the object key separator. diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index afecc19afc310..32c9388c04e15 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -71,7 +71,7 @@ "@types/jest": "^27.0.3", "@types/mock-fs": "^4.13.1", "@types/semver": "^7.3.9", - "jest": "^27.3.1", + "jest": "^27.4.3", "mock-fs": "^4.14.0" }, "repository": { diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index f003608672c22..1038c9c7eb61d 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -71,7 +71,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/lambda-layer-awscli/package.json b/packages/@aws-cdk/lambda-layer-awscli/package.json index 7c566ae7aa201..4014eb1fcc93d 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/package.json +++ b/packages/@aws-cdk/lambda-layer-awscli/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", diff --git a/packages/@aws-cdk/lambda-layer-kubectl/package.json b/packages/@aws-cdk/lambda-layer-kubectl/package.json index 204e2f21f191f..83ef1d44cb72e 100644 --- a/packages/@aws-cdk/lambda-layer-kubectl/package.json +++ b/packages/@aws-cdk/lambda-layer-kubectl/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "pkglint": { "attribution": [ diff --git a/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json b/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json index d7c26230c5d94..a4b893e6d8d24 100644 --- a/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json +++ b/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json @@ -70,7 +70,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", diff --git a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts index 6d95f24e5a7e8..6f3b0abd737f1 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -196,83 +196,161 @@ export const APPMESH_ECR_ACCOUNTS: { [region: string]: string } = { // https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versions.html export const CLOUDWATCH_LAMBDA_INSIGHTS_ARNS: { [key: string]: any } = { + '1.0.119.0': { + arm64: { + // US East (N. Virginia) + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // US East (Ohio) + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // US West (Oregon) + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // Asia Pacific (Mumbai) + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // Asia Pacific (Singapore) + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // Asia Pacific (Sydney) + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // Asia Pacific (Tokyo) + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // Europe (Frankfurt) + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // Europe (Ireland) + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:1', + // Europe (London) + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1', + }, + x86_64: { + // US East (N. Virginia) + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:16', + // US East (Ohio) + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:16', + // US West (N. California) + 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:16', + // US West (Oregon) + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:16', + // Africa (Cape Town) + 'af-south-1': 'arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:9', + // Asia Pacific (Hong Kong) + 'ap-east-1': 'arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:9', + // Asia Pacific (Mumbai) + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:16', + // Asia Pacific (Seoul) + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:16', + // Asia Pacific (Singapore) + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:16', + // Asia Pacific (Sydney) + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:16', + // Asia Pacific (Tokyo) + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:23', + // Canada (Central) + 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:16', + // China (Beijing) + 'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:9', + // China (Ningxia) + 'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:9', + // Europe (Frankfurt) + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:16', + // Europe (Ireland) + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:16', + // Europe (London) + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:16', + // Europe (Milan) + 'eu-south-1': 'arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:9', + // Europe (Paris) + 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:16', + // Europe (Stockholm) + 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:16', + // Middle East (Bahrain) + 'me-south-1': 'arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:9', + // South America (Sao Paulo) + 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:16', + }, + }, '1.0.98.0': { - 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14', - 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:14', - 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:14', - 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:14', - 'af-south-1': 'arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:8', - 'ap-east-1': 'arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:8', - 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:14', - 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:14', - 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:14', - 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:14', - 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:14', - 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:14', - 'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:8', - 'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:8', - 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:14', - 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:14', - 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:14', - 'eu-south-1': 'arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:8', - 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:14', - 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:14', - 'me-south-1': 'arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:8', - 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:14', + x86_64: { + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14', + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:14', + 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:14', + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:14', + 'af-south-1': 'arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:8', + 'ap-east-1': 'arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:8', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:14', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:14', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:14', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:14', + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:14', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:14', + 'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:8', + 'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:8', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:14', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:14', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:14', + 'eu-south-1': 'arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:8', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:14', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:14', + 'me-south-1': 'arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:8', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:14', + }, }, '1.0.89.0': { - 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:12', - 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:12', - 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:12', - 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:12', - 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:12', - 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:12', - 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:12', - 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:12', - 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:12', - 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:12', - 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:12', - 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:12', - 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:12', - 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:12', - 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:12', - 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:12', + x86_64: { + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:12', + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:12', + 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:12', + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:12', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:12', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:12', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:12', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:12', + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:12', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:12', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:12', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:12', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:12', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:12', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:12', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:12', + }, }, '1.0.86.0': { - 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:11', - 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:11', - 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:11', - 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:11', - 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:11', - 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:11', - 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:11', - 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:11', - 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:11', - 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:11', - 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:11', - 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:11', - 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:11', - 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:11', - 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:11', - 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:11', + x86_64: { + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:11', + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:11', + 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:11', + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:11', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:11', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:11', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:11', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:11', + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:11', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:11', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:11', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:11', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:11', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:11', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:11', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:11', + }, }, '1.0.54.0': { - 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:2', - 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:2', - 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:2', - 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:2', - 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:2', - 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:2', - 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:2', - 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:2', - 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:2', - 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:2', - 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:2', - 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:2', - 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:2', - 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:2', - 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:2', - 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:2', + x86_64: { + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:2', + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:2', + 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:2', + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:2', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:2', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:2', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:2', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:2', + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:2', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:2', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:2', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:2', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:2', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:2', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:2', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:2', + }, }, }; diff --git a/packages/@aws-cdk/region-info/build-tools/generate-static-data.ts b/packages/@aws-cdk/region-info/build-tools/generate-static-data.ts index 006de89d3994d..23cdbc85071bb 100644 --- a/packages/@aws-cdk/region-info/build-tools/generate-static-data.ts +++ b/packages/@aws-cdk/region-info/build-tools/generate-static-data.ts @@ -79,7 +79,10 @@ async function main(): Promise { } for (const version in CLOUDWATCH_LAMBDA_INSIGHTS_ARNS) { - registerFact(region, ['cloudwatchLambdaInsightsVersion', version], CLOUDWATCH_LAMBDA_INSIGHTS_ARNS[version][region]); + for (const arch in CLOUDWATCH_LAMBDA_INSIGHTS_ARNS[version]) { + registerFact(region, ['cloudwatchLambdaInsightsVersion', version, arch], CLOUDWATCH_LAMBDA_INSIGHTS_ARNS[version][arch][region]); + + } } } lines.push(' }'); @@ -112,13 +115,16 @@ function checkRegions(map: Record) { * Verifies that the provided map of to region to fact does not contain an entry * for a region that was not registered in `AWS_REGIONS`. */ -function checkRegionsSubMap(map: Record>) { +function checkRegionsSubMap(map: Record>>) { const allRegions = new Set(AWS_REGIONS); for (const key of Object.keys(map)) { - for (const region of Object.keys(map[key])) { - if (!allRegions.has(region)) { - throw new Error(`Un-registered region fact found: ${region}. Add to AWS_REGIONS list!`); + for (const subKey of Object.keys(map[key])) { + for (const region of Object.keys(map[key][subKey])) { + if (!allRegions.has(region)) { + throw new Error(`Un-registered region fact found: ${region}. Add to AWS_REGIONS list!`); + } } + } } } diff --git a/packages/@aws-cdk/region-info/lib/fact.ts b/packages/@aws-cdk/region-info/lib/fact.ts index 8d4e33802be43..498e33d693abf 100644 --- a/packages/@aws-cdk/region-info/lib/fact.ts +++ b/packages/@aws-cdk/region-info/lib/fact.ts @@ -165,8 +165,11 @@ export class FactName { /** * The ARN of CloudWatch Lambda Insights for a version (e.g. 1.0.98.0) */ - public static cloudwatchLambdaInsightsVersion(version: string) { - return `cloudwatch-lambda-insights-version:${version.split('.').join('_')}`; + public static cloudwatchLambdaInsightsVersion(version: string, arch?: string) { + // if we are provided an architecture use that, otherwise + // default to x86_64 for backwards compatibility + const suffix = version.split('.').join('_') + `_${arch ?? 'x86_64'}`; + return `cloudwatch-lambda-insights-version:${suffix}`; } /** diff --git a/packages/@aws-cdk/region-info/lib/region-info.ts b/packages/@aws-cdk/region-info/lib/region-info.ts index 3482acf66b9a1..35dce3d6ca980 100644 --- a/packages/@aws-cdk/region-info/lib/region-info.ts +++ b/packages/@aws-cdk/region-info/lib/region-info.ts @@ -120,9 +120,10 @@ export class RegionInfo { /** * The ARN of the CloudWatch Lambda Insights extension, for the given version. * @param insightsVersion the version (e.g. 1.0.98.0) + * @param architecture the Lambda Function architecture (e.g. 'x86_64' or 'arm64') */ - public cloudwatchLambdaInsightsArn(insightsVersion: string): string | undefined { - return Fact.find(this.name, FactName.cloudwatchLambdaInsightsVersion(insightsVersion)); + public cloudwatchLambdaInsightsArn(insightsVersion: string, architecture?: string): string | undefined { + return Fact.find(this.name, FactName.cloudwatchLambdaInsightsVersion(insightsVersion, architecture)); } /** diff --git a/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap b/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap index f1797f8083af5..39b8766351e37 100644 --- a/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap +++ b/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap @@ -5,7 +5,11 @@ Object { "af-south-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:9", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -31,7 +35,11 @@ Object { "ap-east-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:9", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -57,7 +65,11 @@ Object { "ap-northeast-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:23", "1.0.54.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:12", @@ -83,7 +95,11 @@ Object { "ap-northeast-2": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:12", @@ -109,7 +125,11 @@ Object { "ap-northeast-3": Object { "cdkMetadataResourceAvailable": false, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -135,7 +155,11 @@ Object { "ap-south-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:12", @@ -161,7 +185,11 @@ Object { "ap-southeast-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:12", @@ -187,7 +215,11 @@ Object { "ap-southeast-2": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:12", @@ -213,7 +245,11 @@ Object { "ca-central-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:12", @@ -239,7 +275,11 @@ Object { "cn-north-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com.cn", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:9", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -265,7 +305,11 @@ Object { "cn-northwest-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com.cn", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:9", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -291,7 +335,11 @@ Object { "eu-central-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:12", @@ -317,7 +365,11 @@ Object { "eu-north-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:12", @@ -343,7 +395,11 @@ Object { "eu-south-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:9", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -369,7 +425,11 @@ Object { "eu-west-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:12", @@ -395,7 +455,11 @@ Object { "eu-west-2": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:12", @@ -421,7 +485,11 @@ Object { "eu-west-3": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:12", @@ -447,7 +515,11 @@ Object { "me-south-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:9", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -473,7 +545,11 @@ Object { "sa-east-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:12", @@ -499,7 +575,11 @@ Object { "us-east-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:12", @@ -525,7 +605,11 @@ Object { "us-east-2": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:12", @@ -551,7 +635,11 @@ Object { "us-gov-east-1": Object { "cdkMetadataResourceAvailable": false, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -577,7 +665,11 @@ Object { "us-gov-west-1": Object { "cdkMetadataResourceAvailable": false, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -603,7 +695,11 @@ Object { "us-iso-east-1": Object { "cdkMetadataResourceAvailable": false, "domainSuffix": "c2s.ic.gov", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -629,7 +725,11 @@ Object { "us-isob-east-1": Object { "cdkMetadataResourceAvailable": false, "domainSuffix": "sc2s.sgov.gov", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -655,7 +755,11 @@ Object { "us-west-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": undefined, + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:12", @@ -681,7 +785,11 @@ Object { "us-west-2": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", + "lambdaInsightsArmVersions": Object { + "1.0.119.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + }, "lambdaInsightsVersions": Object { + "1.0.119.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:16", "1.0.54.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:12", diff --git a/packages/@aws-cdk/region-info/test/region-info.test.ts b/packages/@aws-cdk/region-info/test/region-info.test.ts index 8c06907052b23..984d5e31cf45d 100644 --- a/packages/@aws-cdk/region-info/test/region-info.test.ts +++ b/packages/@aws-cdk/region-info/test/region-info.test.ts @@ -9,13 +9,19 @@ test('built-in data is correct', () => { const servicePrincipals: { [service: string]: string | undefined } = {}; const lambdaInsightsVersions: { [service: string]: string | undefined } = {}; + const lambdaInsightsArmVersions: { [service: string]: string | undefined } = {}; AWS_SERVICES.forEach(service => servicePrincipals[service] = region.servicePrincipal(service)); for (const version in CLOUDWATCH_LAMBDA_INSIGHTS_ARNS) { lambdaInsightsVersions[version] = region.cloudwatchLambdaInsightsArn(version); + + if ('arm64' in CLOUDWATCH_LAMBDA_INSIGHTS_ARNS[version]) { + lambdaInsightsArmVersions[version] = region.cloudwatchLambdaInsightsArn(version, 'arm64'); + } }; + snapshot[name] = { cdkMetadataResourceAvailable: region.cdkMetadataResourceAvailable, domainSuffix: region.domainSuffix, @@ -24,6 +30,7 @@ test('built-in data is correct', () => { vpcEndPointServiceNamePrefix: region.vpcEndpointServiceNamePrefix, servicePrincipals, lambdaInsightsVersions, + lambdaInsightsArmVersions, }; } expect(snapshot).toMatchSnapshot(); diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index d5049d91ff9ca..6dd2dd68cac26 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -74,7 +74,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "@types/yaml": "^1.9.7", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "bundledDependencies": [ "yaml" diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 6a4e311446f57..73902417ff19f 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -42,17 +42,17 @@ "@types/node": "^10.17.60", "@aws-cdk/cdk-build-tools": "0.0.0", "constructs": "^10.0.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "monocdk": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "ts-jest": "^27.0.7" + "ts-jest": "^27.1.1" }, "dependencies": { "@aws-cdk/cloudformation-diff": "0.0.0" }, "peerDependencies": { "constructs": "^10.0.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "monocdk": "^0.0.0" }, "repository": { diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index b8bff83e7c9ec..a6a60d13dafde 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -122,6 +122,7 @@ "@aws-cdk/aws-acmpca": "0.0.0", "@aws-cdk/aws-amazonmq": "0.0.0", "@aws-cdk/aws-amplify": "0.0.0", + "@aws-cdk/aws-amplifyuibuilder": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-apigatewayv2-authorizers": "0.0.0", @@ -203,6 +204,7 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-events-targets": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", + "@aws-cdk/aws-evidently": "0.0.0", "@aws-cdk/aws-finspace": "0.0.0", "@aws-cdk/aws-fis": "0.0.0", "@aws-cdk/aws-fms": "0.0.0", @@ -245,6 +247,7 @@ "@aws-cdk/aws-lambda-go": "0.0.0", "@aws-cdk/aws-lambda-nodejs": "0.0.0", "@aws-cdk/aws-lambda-python": "0.0.0", + "@aws-cdk/aws-lex": "0.0.0", "@aws-cdk/aws-licensemanager": "0.0.0", "@aws-cdk/aws-lightsail": "0.0.0", "@aws-cdk/aws-location": "0.0.0", @@ -278,7 +281,9 @@ "@aws-cdk/aws-ram": "0.0.0", "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-redshift": "0.0.0", + "@aws-cdk/aws-refactorspaces": "0.0.0", "@aws-cdk/aws-rekognition": "0.0.0", + "@aws-cdk/aws-resiliencehub": "0.0.0", "@aws-cdk/aws-resourcegroups": "0.0.0", "@aws-cdk/aws-robomaker": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", @@ -287,6 +292,7 @@ "@aws-cdk/aws-route53recoverycontrol": "0.0.0", "@aws-cdk/aws-route53recoveryreadiness": "0.0.0", "@aws-cdk/aws-route53resolver": "0.0.0", + "@aws-cdk/aws-rum": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-s3-deployment": "0.0.0", diff --git a/packages/aws-cdk-migration/bin/rewrite-imports-v2.ts b/packages/aws-cdk-migration/bin/rewrite-imports-v2.ts index 13eb72f0f3eea..3b56cd569e1be 100644 --- a/packages/aws-cdk-migration/bin/rewrite-imports-v2.ts +++ b/packages/aws-cdk-migration/bin/rewrite-imports-v2.ts @@ -23,7 +23,9 @@ async function main() { const files = await glob(arg, { ignore, matchBase: true }); for (const file of files) { const input = await fs.promises.readFile(file, { encoding: 'utf8' }); - const output = rewriteMonoPackageImports(input, 'aws-cdk-lib', file); + const output = rewriteMonoPackageImports(input, 'aws-cdk-lib', file, { + rewriteConstructsImports: true, + }); if (output.trim() !== input.trim()) { await fs.promises.writeFile(file, output); } diff --git a/packages/aws-cdk-migration/lib/rewrite.ts b/packages/aws-cdk-migration/lib/rewrite.ts index a902318b0c629..8f875f932249b 100644 --- a/packages/aws-cdk-migration/lib/rewrite.ts +++ b/packages/aws-cdk-migration/lib/rewrite.ts @@ -23,6 +23,13 @@ export interface RewriteOptions { * The unscoped name of the package, e.g. 'aws-kinesisfirehose'. */ readonly packageUnscopedName?: string; + + /** + * When true, imports to known types from the 'constructs' library will be rewritten + * to explicitly import from 'constructs', rather than '@aws-cdk/core'. + * @default false + */ + readonly rewriteConstructsImports?: boolean; } /** @@ -48,7 +55,12 @@ export interface RewriteOptions { * @returns the updated source code. */ export function rewriteMonoPackageImports(sourceText: string, libName: string, fileName: string = 'index.ts', options: RewriteOptions = {}): string { - return rewriteImports(sourceText, (modPath, importedElements) => updatedExternalLocation(modPath, libName, options, importedElements), fileName); + return rewriteImports( + sourceText, + (modPath, importedElements) => updatedExternalLocation(modPath, libName, options, importedElements), + fileName, + options.rewriteConstructsImports, + ); } /** @@ -76,7 +88,12 @@ export function rewriteMonoPackageImports(sourceText: string, libName: string, f export function rewriteReadmeImports(sourceText: string, libName: string, fileName: string = 'index.ts', options: RewriteOptions = {}): string { return sourceText.replace(/(```(?:ts|typescript|text)[^\n]*\n)(.*?)(\n\s*```)/gs, (_m, prefix, body, suffix) => { return prefix + - rewriteImports(body, (modPath, importedElements) => updatedExternalLocation(modPath, libName, options, importedElements), fileName) + + rewriteImports( + body, + (modPath, importedElements) => updatedExternalLocation(modPath, libName, options, importedElements), + fileName, + options.rewriteConstructsImports, + ) + suffix; }); } @@ -107,79 +124,258 @@ export function rewriteImports( sourceText: string, updatedLocation: (modulePath: string, importedElements?: ts.NodeArray) => string | undefined, fileName: string = 'index.ts', + rewriteConstructsImports: boolean = false, ): string { - const sourceFile = ts.createSourceFile(fileName, sourceText, ts.ScriptTarget.ES2018); + const sourceFile = ts.createSourceFile(fileName, sourceText, ts.ScriptTarget.ES2018, true); + const rewriter = new ImportRewriter(sourceFile, updatedLocation, rewriteConstructsImports); + ts.transform(sourceFile, [rewriter.rewriteTransformer()]); + return rewriter.rewriteImports(); +} + +class ImportRewriter { + private static CONSTRUCTS_TYPES = ['Construct', 'IConstruct']; + + private readonly replacements = new Array<{ original: ts.Node, updatedLocation: string, quoted: boolean }>(); + // Constructs rewrites + private readonly constructsNamedImports: Set = new Set(); + private readonly constructsId = 'constructs'; + private firstImportNode?: ts.Node; + private constructsNamespaceImportRequired: boolean = false; + + public constructor( + private readonly sourceFile: ts.SourceFile, + private readonly updatedLocation: (modulePath: string, importedElements?: ts.NodeArray) => string | undefined, + private readonly rewriteConstructsImports: boolean, + ) { } - const replacements = new Array<{ original: ts.Node, updatedLocation: string }>(); + public rewriteTransformer(): ts.TransformerFactory { + const coreNamespaceImports: Set = new Set(); - const visitor = (node: T): ts.VisitResult => { - const moduleSpecifier = getModuleSpecifier(node); - const newTarget = moduleSpecifier && updatedLocation(moduleSpecifier.text, getImportedElements(node)); + return (context) => { + return (sourceFile) => { + const visitor = (node: T): ts.VisitResult => { + const moduleSpecifier = getModuleSpecifier(node); + if (moduleSpecifier) { + return this.visitImportNode(node, coreNamespaceImports, moduleSpecifier); + } - if (moduleSpecifier != null && newTarget != null) { - replacements.push({ original: moduleSpecifier, updatedLocation: newTarget }); + // Rewrite any access or type references with a format `foo.Construct`, + // where `foo` matches the name of a namespace import for '@aws-cdk/core' + // Simple identifiers (e.g., readonly foo: Construct) do not need to be written, + // only qualified identifiers (e.g., cdk.Construct). + if (ts.isIdentifier(node) && ImportRewriter.CONSTRUCTS_TYPES.includes(node.text)) { + if (ts.isPropertyAccessExpression(node.parent) + && ts.isIdentifier(node.parent.expression) + && coreNamespaceImports.has(node.parent.expression.text)) { + this.replacements.push({ original: node.parent, updatedLocation: `${this.constructsId}.${node.text}`, quoted: false }); + this.constructsNamespaceImportRequired = true; + } else if (ts.isQualifiedName(node.parent) + && ts.isIdentifier(node.parent.left) + && coreNamespaceImports.has(node.parent.left.text)) { + this.replacements.push({ original: node.parent, updatedLocation: `${this.constructsId}.${node.text}`, quoted: false }); + this.constructsNamespaceImportRequired = true; + } + } + + return ts.visitEachChild(node, visitor, context); + }; + + return ts.visitNode(sourceFile, visitor); + }; + }; + } + + /** + * Visit import nodes where a module specifier of some kind has been found. + * + * For most nodes, this simply involves rewritting the location of the module via `this.updatedLocation`. + * + * Assumes the current node is an import (of some type) that imports '@aws-cdk/core'. + * + * The following import types are suported: + * - import * as core1 from '@aws-cdk/core'; + * - import core2 = require('@aws-cdk/core'); + * - import { Type1, Type2 as CoreType2 } from '@aws-cdk/core'; + * - import { Type1, Type2 as CoreType2 } = require('@aws-cdk/core'); + * + * For all namespace imports, capture the namespace used so any references later can be updated. + * For example, 'core1.Construct' needs to be renamed to 'constructs.Construct'. + * For all named imports: + * - If all named imports are constructs types, simply rename the import from core to constructs. + * - If there's a split, the constructs types are removed and captured for later to go into a new import. + * + * @returns true iff all other transforms should be skipped for this node. + */ + private visitImportNode(node: T, coreNamespaceImports: Set, moduleSpecifier: ts.StringLiteral) { + // Used later for constructs imports generation, to mark location and get indentation + if (!this.firstImportNode) { this.firstImportNode = node; } + + // Special-case @aws-cdk/core for the case of constructs imports. + if (this.rewriteConstructsImports && moduleSpecifier.text === '@aws-cdk/core') { + if (ts.isImportEqualsDeclaration(node)) { + // import core = require('@aws-cdk/core'); + coreNamespaceImports.add(node.name.text); + } else if (ts.isImportDeclaration(node) && node.importClause?.namedBindings) { + const bindings = node.importClause?.namedBindings; + if (ts.isNamespaceImport(bindings)) { + // import * as core from '@aws-cdk/core'; + coreNamespaceImports.add(bindings.name.text); + } else if (ts.isNamedImports(bindings)) { + // import { Type1, Type2 as CoreType2 } from '@aws-cdk/core'; + // import { Type1, Type2 as CoreType2 } = require('@aws-cdk/core'); + + // Segment the types into core vs construct types + const constructsImports: ts.ImportSpecifier[] = []; + const coreImports: ts.ImportSpecifier[] = []; + bindings.elements.forEach((e) => { + if (ImportRewriter.CONSTRUCTS_TYPES.includes(e.name.text) || + (e.propertyName && ImportRewriter.CONSTRUCTS_TYPES.includes(e.propertyName.text))) { + constructsImports.push(e); + } else { + coreImports.push(e); + } + }); + + // Three cases: + // 1. There are no constructs imports. No special-casing to do. + // 2. There are ONLY constructs imports. The whole import can be replaced. + // 3. There is a mix. We must remove the constructs imports, and add them to a dedicated line. + if (constructsImports.length > 0) { + if (coreImports.length === 0) { + // Rewrite the module to constructs, skipping the normal updateLocation replacement. + this.replacements.push({ original: moduleSpecifier, updatedLocation: this.constructsId, quoted: true }); + return node; + } else { + // Track these named imports to add to a dedicated import statement later. + constructsImports.forEach((i) => this.constructsNamedImports.add(i)); + + // This replaces the interior of the import statement, between the braces: + // import { Stack as CdkStack, StackProps } ... + const coreBindings = ' ' + coreImports.map((e) => e.getText()).join(', ') + ' '; + this.replacements.push({ original: bindings, updatedLocation: coreBindings, quoted: true }); + } + } + } + } } + const newTarget = this.updatedLocation(moduleSpecifier.text, getImportedElements(node)); + if (newTarget != null) { + this.replacements.push({ original: moduleSpecifier, updatedLocation: newTarget, quoted: true }); + } return node; - }; + } - sourceFile.statements.forEach(node => ts.visitNode(node, visitor)); + /** + * Rewrites the imports -- and possibly some qualified identifiers -- in the source file, + * based on the replacement information gathered via transforming the source through `rewriteTransformer()`. + */ + public rewriteImports(): string { + let updatedSourceText = this.sourceFile.text; + // Applying replacements in reverse order, so node positions remain valid. + const sortedReplacements = this.replacements.sort( + ({ original: l }, { original: r }) => r.getStart(this.sourceFile) - l.getStart(this.sourceFile)); + for (const replacement of sortedReplacements) { + const offset = replacement.quoted ? 1 : 0; + const prefix = updatedSourceText.substring(0, replacement.original.getStart(this.sourceFile) + offset); + const suffix = updatedSourceText.substring(replacement.original.getEnd() - offset); + + updatedSourceText = prefix + replacement.updatedLocation + suffix; + } - let updatedSourceText = sourceText; - // Applying replacements in reverse order, so node positions remain valid. - for (const replacement of replacements.sort(({ original: l }, { original: r }) => r.getStart(sourceFile) - l.getStart(sourceFile))) { - const prefix = updatedSourceText.substring(0, replacement.original.getStart(sourceFile) + 1); - const suffix = updatedSourceText.substring(replacement.original.getEnd() - 1); + // Lastly, prepend the source with any new constructs imports, as needed. + const constructsImports = this.getConstructsImportsPrefix(); + if (constructsImports) { + const insertionPoint = this.firstImportNode + // Start of the line, past any leading comments or shebang lines + ? (this.firstImportNode.getStart() - this.getNodeIndentation(this.firstImportNode)) + : 0; + updatedSourceText = updatedSourceText.substring(0, insertionPoint) + + constructsImports + + updatedSourceText.substring(insertionPoint); + } - updatedSourceText = prefix + replacement.updatedLocation + suffix; + return updatedSourceText; } - return updatedSourceText; + /** + * If constructs imports are needed (either namespaced or named types), + * this returns a string with one (or both) imports that can be prepended to the source. + */ + private getConstructsImportsPrefix(): string | undefined { + if (!this.constructsNamespaceImportRequired && this.constructsNamedImports.size === 0) { return undefined; } + + const indentation = ' '.repeat(this.getNodeIndentation(this.firstImportNode)); + let constructsImportPrefix = ''; + if (this.constructsNamespaceImportRequired) { + constructsImportPrefix += `${indentation}import * as ${this.constructsId} from 'constructs';\n`; + } + if (this.constructsNamedImports.size > 0) { + const namedImports = [...this.constructsNamedImports].map(i => i.getText()).join(', '); + constructsImportPrefix += `${indentation}import { ${namedImports} } from 'constructs';\n`; + } + return constructsImportPrefix; + } /** - * Returns the module specifier (location) of an import statement in one of the following forms: - * import from 'location'; - * import * as name from 'location'; - * import { Type } = require('location'); - * import name = require('location'); - * require('location'); + * For a given node, attempts to determine and return how many spaces of indentation are used. */ - function getModuleSpecifier(node: ts.Node): ts.StringLiteral | undefined { - if (ts.isImportDeclaration(node)) { - // import style - const moduleSpecifier = node.moduleSpecifier; - if (ts.isStringLiteral(moduleSpecifier)) { - // import from 'location'; - // import * as name from 'location'; - return moduleSpecifier; - } else if (ts.isBinaryExpression(moduleSpecifier) && ts.isCallExpression(moduleSpecifier.right)) { - // import { Type } = require('location'); - return getModuleSpecifier(moduleSpecifier.right); - } - } else if ( - ts.isImportEqualsDeclaration(node) + private getNodeIndentation(node?: ts.Node): number { + if (!node) { return 0; } + + // Get leading spaces for the final line in the node's trivia + const fullText = node.getFullText(); + const trivia = fullText.substring(0, fullText.length - node.getWidth()); + const m = /( *)$/.exec(trivia); + return m ? m[1].length : 0; + } +} + +/** + * Returns the module specifier (location) of an import statement in one of the following forms: + * import from 'location'; + * import * as name from 'location'; + * import { Type } from 'location'; + * import { Type } = require('location'); + * import name = require('location'); + * require('location'); + */ +function getModuleSpecifier(node: ts.Node): ts.StringLiteral | undefined { + if (ts.isImportDeclaration(node)) { + // import style + const moduleSpecifier = node.moduleSpecifier; + if (ts.isStringLiteral(moduleSpecifier)) { + // import from 'location'; + // import * as name from 'location'; + // import { Foo } from 'location'; + return moduleSpecifier; + } else if (ts.isBinaryExpression(moduleSpecifier) && ts.isCallExpression(moduleSpecifier.right)) { + // import { Type } = require('location'); + return getModuleSpecifier(moduleSpecifier.right); + } + } else if ( + ts.isImportEqualsDeclaration(node) && ts.isExternalModuleReference(node.moduleReference) && ts.isStringLiteral(node.moduleReference.expression) - ) { - // import name = require('location'); - return node.moduleReference.expression; - } else if ( - (ts.isCallExpression(node)) + ) { + // import name = require('location'); + return node.moduleReference.expression; + } else if ( + (ts.isCallExpression(node)) && ts.isIdentifier(node.expression) && node.expression.escapedText === 'require' && node.arguments.length === 1 - ) { - // require('location'); - const argument = node.arguments[0]; - if (ts.isStringLiteral(argument)) { - return argument; - } - } else if (ts.isExpressionStatement(node) && ts.isCallExpression(node.expression)) { - // require('location'); // This is an alternate AST version of it - return getModuleSpecifier(node.expression); + ) { + // require('location'); + const argument = node.arguments[0]; + if (ts.isStringLiteral(argument)) { + return argument; } - return undefined; + } else if (ts.isExpressionStatement(node) && ts.isCallExpression(node.expression)) { + // require('location'); // This is an alternate AST version of it + return getModuleSpecifier(node.expression); } + return undefined; } const EXEMPTIONS = new Set([ diff --git a/packages/aws-cdk-migration/test/rewrite.test.ts b/packages/aws-cdk-migration/test/rewrite.test.ts index 7f98cdde16f4b..36b7dd817dc76 100644 --- a/packages/aws-cdk-migration/test/rewrite.test.ts +++ b/packages/aws-cdk-migration/test/rewrite.test.ts @@ -38,7 +38,7 @@ describe(rewriteMonoPackageImports, () => { // something before import * as s3 from '@aws-cdk/aws-s3'; import * as cfndiff from '@aws-cdk/cloudformation-diff'; - import { Construct } from "@aws-cdk/core"; + import { Stack } from "@aws-cdk/core"; // something after console.log('Look! I did something!');`, 'aws-cdk-lib', 'subject.ts'); @@ -47,7 +47,7 @@ describe(rewriteMonoPackageImports, () => { // something before import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cfndiff from '@aws-cdk/cloudformation-diff'; - import { Construct } from "aws-cdk-lib"; + import { Stack } from "aws-cdk-lib"; // something after console.log('Look! I did something!');`); @@ -58,7 +58,7 @@ describe(rewriteMonoPackageImports, () => { // something before import s3 = require('@aws-cdk/aws-s3'); import cfndiff = require('@aws-cdk/cloudformation-diff'); - import { Construct } = require("@aws-cdk/core"); + import { Stack } = require("@aws-cdk/core"); // something after console.log('Look! I did something!');`, 'aws-cdk-lib', 'subject.ts'); @@ -67,7 +67,7 @@ describe(rewriteMonoPackageImports, () => { // something before import s3 = require('aws-cdk-lib/aws-s3'); import cfndiff = require('@aws-cdk/cloudformation-diff'); - import { Construct } = require("aws-cdk-lib"); + import { Stack } = require("aws-cdk-lib"); // something after console.log('Look! I did something!');`); @@ -144,7 +144,7 @@ describe(rewriteReadmeImports, () => { Some README text. \`\`\`ts import * as s3 from '@aws-cdk/aws-s3'; - import { Construct } from "@aws-cdk/core"; + import { Stack } from "@aws-cdk/core"; \`\`\` Some more README text.`, 'aws-cdk-lib', 'subject.ts'); @@ -152,7 +152,7 @@ describe(rewriteReadmeImports, () => { Some README text. \`\`\`ts import * as s3 from 'aws-cdk-lib/aws-s3'; - import { Construct } from "aws-cdk-lib"; + import { Stack } from "aws-cdk-lib"; \`\`\` Some more README text.`); }); @@ -162,7 +162,7 @@ describe(rewriteReadmeImports, () => { Some README text. \`\`\`typescript import * as s3 from '@aws-cdk/aws-s3'; - import { Construct } from "@aws-cdk/core"; + import { Stack } from "@aws-cdk/core"; \`\`\` Some more README text.`, 'aws-cdk-lib', 'subject.ts'); @@ -170,7 +170,7 @@ describe(rewriteReadmeImports, () => { Some README text. \`\`\`typescript import * as s3 from 'aws-cdk-lib/aws-s3'; - import { Construct } from "aws-cdk-lib"; + import { Stack } from "aws-cdk-lib"; \`\`\` Some more README text.`); }); @@ -180,7 +180,7 @@ describe(rewriteReadmeImports, () => { Some README text. \`\`\`text import * as s3 from '@aws-cdk/aws-s3'; - import { Construct } from "@aws-cdk/core"; + import { Stack } from "@aws-cdk/core"; \`\`\` Some more README text.`, 'aws-cdk-lib', 'subject.ts'); @@ -188,7 +188,7 @@ describe(rewriteReadmeImports, () => { Some README text. \`\`\`text import * as s3 from 'aws-cdk-lib/aws-s3'; - import { Construct } from "aws-cdk-lib"; + import { Stack } from "aws-cdk-lib"; \`\`\` Some more README text.`); }); @@ -231,3 +231,190 @@ describe(rewriteReadmeImports, () => { \`\`\``); }); }); + +describe('constructs imports', () => { + describe('namespace imports', () => { + test('import declaration', () => { + const output = rewriteMonoPackageImports(` + import * as core from '@aws-cdk/core'; + class FooBar extends core.Construct { + private readonly foo: core.Construct; + private doStuff() { return new core.Construct(); } + }`, 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + import * as constructs from 'constructs'; + import * as core from 'aws-cdk-lib'; + class FooBar extends constructs.Construct { + private readonly foo: constructs.Construct; + private doStuff() { return new constructs.Construct(); } + }`); + }); + + test('import equals declaration', () => { + const output = rewriteMonoPackageImports(` + import core = require('@aws-cdk/core'); + class FooBar extends core.Construct { + private readonly foo: core.Construct; + private doStuff() { return new core.Construct(); } + }`, 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + import * as constructs from 'constructs'; + import core = require('aws-cdk-lib'); + class FooBar extends constructs.Construct { + private readonly foo: constructs.Construct; + private doStuff() { return new constructs.Construct(); } + }`); + }); + }); + + describe('named imports', () => { + test('no constructs imports', () => { + const output = rewriteMonoPackageImports(` + import { Stack, StackProps } from '@aws-cdk/core'; + class FooBar extends Stack { }`, + 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + import { Stack, StackProps } from 'aws-cdk-lib'; + class FooBar extends Stack { }`); + }); + + test('all constructs imports', () => { + const output = rewriteMonoPackageImports(` + import { IConstruct, Construct } from '@aws-cdk/core'; + class FooBar implements IConstruct extends Construct { }`, + 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + import { IConstruct, Construct } from 'constructs'; + class FooBar implements IConstruct extends Construct { }`); + }); + + test('mixed constructs and core imports', () => { + const output = rewriteMonoPackageImports(` + import { Stack, Construct, IConstruct, StackProps } from '@aws-cdk/core'; + class FooBar implements IConstruct extends Construct { }`, + 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + import { Construct, IConstruct } from 'constructs'; + import { Stack, StackProps } from 'aws-cdk-lib'; + class FooBar implements IConstruct extends Construct { }`); + }); + }); + + test('exhaustive test', () => { + const output = rewriteMonoPackageImports(` + import * as core1 from '@aws-cdk/core'; + // a comment of some kind + import core2 = require('@aws-cdk/core'); + import { Stack } from '@aws-cdk/core'; + // more comments + import { Construct as CoreConstruct } from '@aws-cdk/core'; + import { IConstruct, Stack, StackProps } from '@aws-cdk/core'; + import * as s3 from '@aws-cdk/aws-s3'; + + class FooBar implements core1.IConstruct { + readonly foo1: core2.Construct; + public static bar1() { return CoreConstruct(); } + public static bar2() { return new class implements IConstruct {}; } + }`, 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + import * as constructs from 'constructs'; + import { IConstruct } from 'constructs'; + import * as core1 from 'aws-cdk-lib'; + // a comment of some kind + import core2 = require('aws-cdk-lib'); + import { Stack } from 'aws-cdk-lib'; + // more comments + import { Construct as CoreConstruct } from 'constructs'; + import { Stack, StackProps } from 'aws-cdk-lib'; + import * as s3 from 'aws-cdk-lib/aws-s3'; + + class FooBar implements constructs.IConstruct { + readonly foo1: constructs.Construct; + public static bar1() { return CoreConstruct(); } + public static bar2() { return new class implements IConstruct {}; } + }`); + }); + + test('does not rewrite constructs imports unless the option is explicitly set', () => { + const output = rewriteMonoPackageImports(` + import * as core1 from '@aws-cdk/core'; + // a comment of some kind + import { Stack } from '@aws-cdk/core'; + // more comments + import { Construct as CoreConstruct } from '@aws-cdk/core'; + import { IConstruct, Stack, StackProps } from '@aws-cdk/core'; + import * as s3 from '@aws-cdk/aws-s3'; + + class FooBar implements core1.IConstruct { + readonly foo1: CoreConstruct; + public static bar2() { return new class implements IConstruct {}; } + }`, 'aws-cdk-lib', 'subject.ts'); + + expect(output).toBe(` + import * as core1 from 'aws-cdk-lib'; + // a comment of some kind + import { Stack } from 'aws-cdk-lib'; + // more comments + import { Construct as CoreConstruct } from 'aws-cdk-lib'; + import { IConstruct, Stack, StackProps } from 'aws-cdk-lib'; + import * as s3 from 'aws-cdk-lib/aws-s3'; + + class FooBar implements core1.IConstruct { + readonly foo1: CoreConstruct; + public static bar2() { return new class implements IConstruct {}; } + }`); + }); + + test('puts constructs imports after shebang lines', () => { + const output = rewriteMonoPackageImports(` + #!/usr/bin/env node + import * as core from '@aws-cdk/core'; + class FooBar extends core.Construct { + private readonly foo: core.Construct; + private doStuff() { return new core.Construct(); } + }`, 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + #!/usr/bin/env node + import * as constructs from 'constructs'; + import * as core from 'aws-cdk-lib'; + class FooBar extends constructs.Construct { + private readonly foo: constructs.Construct; + private doStuff() { return new constructs.Construct(); } + }`); + }); + + test('supports rewriteReadmeImports', () => { + const output = rewriteReadmeImports(` + Some README text. + \`\`\`ts + import * as s3 from '@aws-cdk/aws-s3'; + import * as core from "@aws-cdk/core"; + import { Construct, Stack } from "@aws-cdk/core"; + class Foo extends core.Construct { + public bar() { return new Construct(); } + } + \`\`\` + Some more README text.`, 'aws-cdk-lib', 'subject.ts', { rewriteConstructsImports: true }); + + expect(output).toBe(` + Some README text. + \`\`\`ts + import * as constructs from 'constructs'; + import { Construct } from 'constructs'; + import * as s3 from 'aws-cdk-lib/aws-s3'; + import * as core from "aws-cdk-lib"; + import { Stack } from "aws-cdk-lib"; + class Foo extends constructs.Construct { + public bar() { return new Construct(); } + } + \`\`\` + Some more README text.`); + }); +}); diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index 1bd9e491e34e4..ac399df3008df 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -364,6 +364,7 @@ Hotswapping is currently supported for the following changes - Code asset changes of AWS Lambda functions. - Definition changes of AWS Step Functions State Machines. - Container asset changes of AWS ECS Services. +- Website asset changes of AWS S3 Bucket Deployments. **⚠ Note #1**: This command deliberately introduces drift in CloudFormation stacks in order to speed up deployments. For this reason, only use it for development purposes. diff --git a/packages/aws-cdk/lib/api/hotswap-deployments.ts b/packages/aws-cdk/lib/api/hotswap-deployments.ts index 0d8a4165f9401..b40ba030588ac 100644 --- a/packages/aws-cdk/lib/api/hotswap-deployments.ts +++ b/packages/aws-cdk/lib/api/hotswap-deployments.ts @@ -7,6 +7,7 @@ import { ChangeHotswapImpact, ChangeHotswapResult, HotswapOperation, Hotswappabl import { isHotswappableEcsServiceChange } from './hotswap/ecs-services'; import { EvaluateCloudFormationTemplate } from './hotswap/evaluate-cloudformation-template'; import { isHotswappableLambdaFunctionChange } from './hotswap/lambda-functions'; +import { isHotswappableS3BucketDeploymentChange } from './hotswap/s3-bucket-deployments'; import { isHotswappableStateMachineChange } from './hotswap/stepfunctions-state-machines'; import { CloudFormationStack } from './util/cloudformation'; @@ -73,6 +74,7 @@ async function findAllHotswappableChanges( isHotswappableLambdaFunctionChange(logicalId, resourceHotswapEvaluation, evaluateCfnTemplate), isHotswappableStateMachineChange(logicalId, resourceHotswapEvaluation, evaluateCfnTemplate), isHotswappableEcsServiceChange(logicalId, resourceHotswapEvaluation, evaluateCfnTemplate), + isHotswappableS3BucketDeploymentChange(logicalId, resourceHotswapEvaluation, evaluateCfnTemplate), ]); } }); diff --git a/packages/aws-cdk/lib/api/hotswap/evaluate-cloudformation-template.ts b/packages/aws-cdk/lib/api/hotswap/evaluate-cloudformation-template.ts index 5dc9f948a4250..011a9b28fc394 100644 --- a/packages/aws-cdk/lib/api/hotswap/evaluate-cloudformation-template.ts +++ b/packages/aws-cdk/lib/api/hotswap/evaluate-cloudformation-template.ts @@ -50,6 +50,11 @@ export class EvaluateCloudFormationTemplate { return stackResources.find(sr => sr.LogicalResourceId === logicalId)?.PhysicalResourceId; } + public async findLogicalIdForPhysicalName(physicalName: string): Promise { + const stackResources = await this.stackResources.listStackResources(); + return stackResources.find(sr => sr.PhysicalResourceId === physicalName)?.LogicalResourceId; + } + public findReferencesTo(logicalId: string): Array { const ret = new Array(); for (const [resourceLogicalId, resourceDef] of Object.entries(this.template?.Resources ?? {})) { diff --git a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts index c45bb432ac65d..9a02fc2ba2d2f 100644 --- a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts +++ b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts @@ -3,8 +3,8 @@ import { assetMetadataChanged, ChangeHotswapImpact, ChangeHotswapResult, Hotswap import { EvaluateCloudFormationTemplate } from './evaluate-cloudformation-template'; /** - * Returns `false` if the change cannot be short-circuited, - * `true` if the change is irrelevant from a short-circuit perspective + * Returns `ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT` if the change cannot be short-circuited, + * `ChangeHotswapImpact.IRRELEVANT` if the change is irrelevant from a short-circuit perspective * (like a change to CDKMetadata), * or a LambdaFunctionResource if the change can be short-circuited. */ diff --git a/packages/aws-cdk/lib/api/hotswap/s3-bucket-deployments.ts b/packages/aws-cdk/lib/api/hotswap/s3-bucket-deployments.ts new file mode 100644 index 0000000000000..49ba4ce129759 --- /dev/null +++ b/packages/aws-cdk/lib/api/hotswap/s3-bucket-deployments.ts @@ -0,0 +1,122 @@ +import { ISDK } from '../aws-auth'; +import { ChangeHotswapImpact, ChangeHotswapResult, HotswapOperation, HotswappableChangeCandidate/*, establishResourcePhysicalName*/ } from './common'; +import { EvaluateCloudFormationTemplate } from './evaluate-cloudformation-template'; + +/** + * This means that the value is required to exist by CloudFormation's API (or our S3 Bucket Deployment Lambda) + * but the actual value specified is irrelevant + */ +export const REQUIRED_BY_CFN = 'required-to-be-present-by-cfn'; + +export async function isHotswappableS3BucketDeploymentChange( + logicalId: string, change: HotswappableChangeCandidate, evaluateCfnTemplate: EvaluateCloudFormationTemplate, +): Promise { + // In old-style synthesis, the policy used by the lambda to copy assets Ref's the assets directly, + // meaning that the changes made to the Policy are artifacts that can be safely ignored + if (change.newValue.Type === 'AWS::IAM::Policy') { + return changeIsForS3DeployCustomResourcePolicy(logicalId, change, evaluateCfnTemplate); + } + + if (change.newValue.Type !== 'Custom::CDKBucketDeployment') { + return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; + } + + // note that this gives the ARN of the lambda, not the name. This is fine though, the invoke() sdk call will take either + const functionName = await evaluateCfnTemplate.evaluateCfnExpression(change.newValue.Properties?.ServiceToken); + if (!functionName) { + return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; + } + + const customResourceProperties = await evaluateCfnTemplate.evaluateCfnExpression({ + ...change.newValue.Properties, + ServiceToken: undefined, + }); + + return new S3BucketDeploymentHotswapOperation(functionName, customResourceProperties); +} + +class S3BucketDeploymentHotswapOperation implements HotswapOperation { + public readonly service = 'custom-s3-deployment'; + + constructor(private readonly functionName: string, private readonly customResourceProperties: any) { + } + + public async apply(sdk: ISDK): Promise { + return sdk.lambda().invoke({ + FunctionName: this.functionName, + // Lambda refuses to take a direct JSON object and requires it to be stringify()'d + Payload: JSON.stringify({ + RequestType: 'Update', + ResponseURL: REQUIRED_BY_CFN, + PhysicalResourceId: REQUIRED_BY_CFN, + StackId: REQUIRED_BY_CFN, + RequestId: REQUIRED_BY_CFN, + LogicalResourceId: REQUIRED_BY_CFN, + ResourceProperties: stringifyObject(this.customResourceProperties), // JSON.stringify() doesn't turn the actual objects to strings, but the lambda expects strings + }), + }).promise(); + } +} + +async function changeIsForS3DeployCustomResourcePolicy( + iamPolicyLogicalId: string, change: HotswappableChangeCandidate, evaluateCfnTemplate: EvaluateCloudFormationTemplate, +): Promise { + const roles = change.newValue.Properties?.Roles; + if (!roles) { + return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; + } + + for (const role of roles) { + const roleLogicalId = await evaluateCfnTemplate.findLogicalIdForPhysicalName(await evaluateCfnTemplate.evaluateCfnExpression(role)); + if (!roleLogicalId) { + return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; + } + + const roleRefs = evaluateCfnTemplate.findReferencesTo(roleLogicalId); + for (const roleRef of roleRefs) { + if (roleRef.Type === 'AWS::Lambda::Function') { + const lambdaRefs = evaluateCfnTemplate.findReferencesTo(roleRef.LogicalId); + for (const lambdaRef of lambdaRefs) { + // If S3Deployment -> Lambda -> Role and IAM::Policy -> Role, then this IAM::Policy change is an + // artifact of old-style synthesis + if (lambdaRef.Type !== 'Custom::CDKBucketDeployment') { + return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; + } + } + } else if (roleRef.Type === 'AWS::IAM::Policy') { + if (roleRef.LogicalId !== iamPolicyLogicalId) { + return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; + } + } else { + return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; + } + } + } + + return new EmptyHotswapOperation(); +} + +function stringifyObject(obj: any): any { + if (obj == null) { + return obj; + } + if (Array.isArray(obj)) { + return obj.map(stringifyObject); + } + if (typeof obj !== 'object') { + return obj.toString(); + } + + const ret: { [k: string]: any } = {}; + for (const [k, v] of Object.entries(obj)) { + ret[k] = stringifyObject(v); + } + return ret; +} + +class EmptyHotswapOperation implements HotswapOperation { + readonly service = 'empty'; + public async apply(sdk: ISDK): Promise { + return Promise.resolve(sdk); + } +} diff --git a/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts b/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts index dbaff58ab608b..3af97aef07455 100644 --- a/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts +++ b/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts @@ -1,5 +1,5 @@ import { ISDK } from '../aws-auth'; -import { ChangeHotswapImpact, ChangeHotswapResult, HotswapOperation, HotswappableChangeCandidate, establishResourcePhysicalName } from './common'; +import { ChangeHotswapImpact, ChangeHotswapResult, HotswapOperation, HotswappableChangeCandidate } from './common'; import { EvaluateCloudFormationTemplate } from './evaluate-cloudformation-template'; export async function isHotswappableStateMachineChange( @@ -11,15 +11,20 @@ export async function isHotswappableStateMachineChange( return stateMachineDefinitionChange; } - const machineNameInCfnTemplate = change.newValue?.Properties?.StateMachineName; - const machineName = await establishResourcePhysicalName(logicalId, machineNameInCfnTemplate, evaluateCfnTemplate); - if (!machineName) { + const stateMachineNameInCfnTemplate = change.newValue?.Properties?.StateMachineName; + const stateMachineArn = stateMachineNameInCfnTemplate + ? await evaluateCfnTemplate.evaluateCfnExpression({ + 'Fn::Sub': 'arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:stateMachine:' + stateMachineNameInCfnTemplate, + }) + : await evaluateCfnTemplate.findPhysicalNameFor(logicalId); + + if (!stateMachineArn) { return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT; } return new StateMachineHotswapOperation({ definition: stateMachineDefinitionChange, - stateMachineName: machineName, + stateMachineArn: stateMachineArn, }); } @@ -43,7 +48,7 @@ async function isStateMachineDefinitionOnlyChange( } interface StateMachineResource { - readonly stateMachineName: string; + readonly stateMachineArn: string; readonly definition: string; } @@ -56,8 +61,7 @@ class StateMachineHotswapOperation implements HotswapOperation { public async apply(sdk: ISDK): Promise { // not passing the optional properties leaves them unchanged return sdk.stepFunctions().updateStateMachine({ - // even though the name of the property is stateMachineArn, passing the name of the state machine is allowed here - stateMachineArn: this.stepFunctionResource.stateMachineName, + stateMachineArn: this.stepFunctionResource.stateMachineArn, definition: this.stepFunctionResource.definition, }).promise(); } diff --git a/packages/aws-cdk/lib/context-providers/index.ts b/packages/aws-cdk/lib/context-providers/index.ts index 4de652715dcf2..fe643ca946c83 100644 --- a/packages/aws-cdk/lib/context-providers/index.ts +++ b/packages/aws-cdk/lib/context-providers/index.ts @@ -15,8 +15,8 @@ import { SecurityGroupContextProviderPlugin } from './security-groups'; import { SSMContextProviderPlugin } from './ssm-parameters'; import { VpcNetworkContextProviderPlugin } from './vpcs'; -type ProviderConstructor = (new (sdk: SdkProvider, lookupRoleArn?: string) => ContextProviderPlugin); -export type ProviderMap = {[name: string]: ProviderConstructor}; +export type ContextProviderFactory = ((sdk: SdkProvider) => ContextProviderPlugin); +export type ProviderMap = {[name: string]: ContextProviderFactory}; /** * Iterate over the list of missing context values and invoke the appropriate providers from the map to retrieve them @@ -28,18 +28,23 @@ export async function provideContextValues( for (const missingContext of missingValues) { const key = missingContext.key; - const constructor = availableContextProviders[missingContext.provider]; - if (!constructor) { + const factory = availableContextProviders[missingContext.provider]; + if (!factory) { // eslint-disable-next-line max-len throw new Error(`Unrecognized context provider name: ${missingContext.provider}. You might need to update the toolkit to match the version of the construct library.`); } - const provider = new constructor(sdk); + const provider = factory(sdk); let value; try { - const environment = cxapi.EnvironmentUtils.make(missingContext.props.account, missingContext.props.region); - const resolvedEnvironment = await sdk.resolveEnvironment(environment); + const environment = missingContext.props.account && missingContext.props.region + ? cxapi.EnvironmentUtils.make(missingContext.props.account, missingContext.props.region) + : undefined; + + const resolvedEnvironment: cxapi.Environment = environment + ? await sdk.resolveEnvironment(environment) + : { account: '?', region: '?', name: '?' }; const arns = await replaceEnvPlaceholders({ lookupRoleArn: missingContext.props.lookupRoleArn, @@ -59,21 +64,30 @@ export async function provideContextValues( /** * Register a context provider * - * (Only available for testing right now). + * A context provider cannot reuse the SDKs authentication mechanisms. + */ +export function registerContextProvider(name: string, provider: ContextProviderPlugin) { + availableContextProviders[name] = () => provider; +} + +/** + * Register a context provider factory + * + * A context provider factory takes an SdkProvider and returns the context provider plugin. */ -export function registerContextProvider(name: string, provider: ProviderConstructor) { +export function registerContextProviderFactory(name: string, provider: ContextProviderFactory) { availableContextProviders[name] = provider; } const availableContextProviders: ProviderMap = { - [cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER]: AZContextProviderPlugin, - [cxschema.ContextProvider.SSM_PARAMETER_PROVIDER]: SSMContextProviderPlugin, - [cxschema.ContextProvider.HOSTED_ZONE_PROVIDER]: HostedZoneContextProviderPlugin, - [cxschema.ContextProvider.VPC_PROVIDER]: VpcNetworkContextProviderPlugin, - [cxschema.ContextProvider.AMI_PROVIDER]: AmiContextProviderPlugin, - [cxschema.ContextProvider.ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER]: EndpointServiceAZContextProviderPlugin, - [cxschema.ContextProvider.SECURITY_GROUP_PROVIDER]: SecurityGroupContextProviderPlugin, - [cxschema.ContextProvider.LOAD_BALANCER_PROVIDER]: LoadBalancerContextProviderPlugin, - [cxschema.ContextProvider.LOAD_BALANCER_LISTENER_PROVIDER]: LoadBalancerListenerContextProviderPlugin, - [cxschema.ContextProvider.KEY_PROVIDER]: KeyContextProviderPlugin, + [cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER]: (s) => new AZContextProviderPlugin(s), + [cxschema.ContextProvider.SSM_PARAMETER_PROVIDER]: (s) => new SSMContextProviderPlugin(s), + [cxschema.ContextProvider.HOSTED_ZONE_PROVIDER]: (s) => new HostedZoneContextProviderPlugin(s), + [cxschema.ContextProvider.VPC_PROVIDER]: (s) => new VpcNetworkContextProviderPlugin(s), + [cxschema.ContextProvider.AMI_PROVIDER]: (s) => new AmiContextProviderPlugin(s), + [cxschema.ContextProvider.ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER]: (s) => new EndpointServiceAZContextProviderPlugin(s), + [cxschema.ContextProvider.SECURITY_GROUP_PROVIDER]: (s) => new SecurityGroupContextProviderPlugin(s), + [cxschema.ContextProvider.LOAD_BALANCER_PROVIDER]: (s) => new LoadBalancerContextProviderPlugin(s), + [cxschema.ContextProvider.LOAD_BALANCER_LISTENER_PROVIDER]: (s) => new LoadBalancerListenerContextProviderPlugin(s), + [cxschema.ContextProvider.KEY_PROVIDER]: (s) => new KeyContextProviderPlugin(s), }; diff --git a/packages/aws-cdk/lib/context-providers/provider.ts b/packages/aws-cdk/lib/context-providers/provider.ts index 3d8a59938e9ef..29c3ebadbde64 100644 --- a/packages/aws-cdk/lib/context-providers/provider.ts +++ b/packages/aws-cdk/lib/context-providers/provider.ts @@ -1,3 +1,7 @@ export interface ContextProviderPlugin { getValue(args: {[key: string]: any}): Promise; } + +export function isContextProviderPlugin(x: unknown): x is ContextProviderPlugin { + return typeof x === 'object' && !!x && !!(x as any).getValue; +} \ No newline at end of file diff --git a/packages/aws-cdk/lib/plugin.ts b/packages/aws-cdk/lib/plugin.ts index 705fa3c3d859d..9534af27dc1da 100644 --- a/packages/aws-cdk/lib/plugin.ts +++ b/packages/aws-cdk/lib/plugin.ts @@ -1,6 +1,9 @@ +import { inspect } from 'util'; import { green } from 'colors/safe'; import { CredentialProviderSource } from './api/aws-auth/credentials'; +import { registerContextProvider } from './context-providers'; +import { ContextProviderPlugin, isContextProviderPlugin } from './context-providers/provider'; import { error } from './logging'; /** @@ -86,4 +89,29 @@ export class PluginHost { public registerCredentialProviderSource(source: CredentialProviderSource) { this.credentialProviderSources.push(source); } + + /** + * (EXPERIMENTAL) Allow plugins to register context providers + * + * Context providers are objects with the following method: + * + * ```ts + * getValue(args: {[key: string]: any}): Promise; + * ``` + * + * Currently, they cannot reuse the CDK's authentication mechanisms, so they + * must be prepared to either not make AWS calls or use their own source of + * AWS credentials. + * + * This feature is experimental, and only intended to be used internally at Amazon + * as a trial. + * + * @experimental + */ + public registerContextProviderAlpha(providerName: string, provider: ContextProviderPlugin) { + if (!isContextProviderPlugin(provider)) { + throw new Error(`Object you gave me does not look like a ContextProviderPlugin: ${inspect(provider)}`); + } + registerContextProvider(providerName, provider); + } } diff --git a/packages/aws-cdk/lib/util/asset-publishing.ts b/packages/aws-cdk/lib/util/asset-publishing.ts index 670231627ec92..2f85350f28f5e 100644 --- a/packages/aws-cdk/lib/util/asset-publishing.ts +++ b/packages/aws-cdk/lib/util/asset-publishing.ts @@ -50,7 +50,15 @@ class PublishingAws implements cdk_assets.IAws { } public async discoverCurrentAccount(): Promise { - return (await this.sdk({})).currentAccount(); + const account = await this.aws.defaultAccount(); + return account ?? { + accountId: '', + partition: 'aws', + }; + } + + public async discoverTargetAccount(options: cdk_assets.ClientOptions): Promise { + return (await this.sdk(options)).currentAccount(); } public async s3Client(options: cdk_assets.ClientOptions): Promise { diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index eb74ebbc7c1b2..b5755933455f2 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -51,16 +51,16 @@ "@types/uuid": "^8.3.3", "@types/wrap-ansi": "^3.0.0", "@types/yargs": "^15.0.14", - "aws-sdk-mock": "^5.4.0", + "aws-sdk-mock": "^5.5.0", "@aws-cdk/cdk-build-tools": "0.0.0", "constructs": "^10.0.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "make-runnable": "^1.3.10", "mockery": "^2.1.0", "nock": "^13.2.1", "@aws-cdk/pkglint": "0.0.0", "sinon": "^9.2.4", - "ts-jest": "^27.0.7", + "ts-jest": "^27.1.1", "ts-mock-imports": "^1.3.8", "xml-js": "^1.6.11" }, @@ -69,7 +69,7 @@ "@aws-cdk/cloudformation-diff": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "@jsii/check-node": "1.46.0", + "@jsii/check-node": "1.47.0", "archiver": "^5.3.0", "aws-sdk": "^2.979.0", "camelcase": "^6.2.1", @@ -85,7 +85,7 @@ "proxy-agent": "^5.0.0", "semver": "^7.3.5", "source-map-support": "^0.5.21", - "table": "^6.7.3", + "table": "^6.7.5", "uuid": "^8.3.2", "wrap-ansi": "^7.0.0", "yaml": "1.10.2", diff --git a/packages/aws-cdk/test/api/cloud-executable.test.ts b/packages/aws-cdk/test/api/cloud-executable.test.ts index a4895761ba46e..37b2db03d40e5 100644 --- a/packages/aws-cdk/test/api/cloud-executable.test.ts +++ b/packages/aws-cdk/test/api/cloud-executable.test.ts @@ -49,10 +49,10 @@ describe('AWS::CDK::Metadata', () => { }); test('stop executing if context providers are not making progress', async () => { - registerContextProvider(cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER, class { - public async getValue(_: { [key: string]: any }): Promise { + registerContextProvider(cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER, { + async getValue(_: { [key: string]: any }): Promise { return 'foo'; - } + }, }); const cloudExecutable = new MockCloudExecutable({ diff --git a/packages/aws-cdk/test/api/hotswap/hotswap-test-setup.ts b/packages/aws-cdk/test/api/hotswap/hotswap-test-setup.ts index f96b419b94b20..056e4728ff354 100644 --- a/packages/aws-cdk/test/api/hotswap/hotswap-test-setup.ts +++ b/packages/aws-cdk/test/api/hotswap/hotswap-test-setup.ts @@ -42,7 +42,8 @@ export function pushStackResourceSummaries(...items: CloudFormation.StackResourc } export function setCurrentCfnStackTemplate(template: Template) { - currentCfnStack.setTemplate(template); + const templateDeepCopy = JSON.parse(JSON.stringify(template)); // deep copy the template, so our tests can mutate one template instead of creating two + currentCfnStack.setTemplate(templateDeepCopy); } export function stackSummaryOf(logicalId: string, resourceType: string, physicalResourceId: string): CloudFormation.StackResourceSummary { @@ -87,6 +88,12 @@ export class HotswapMockSdkProvider { }); } + public setInvokeLambdaMock(mockInvokeLambda: (input: lambda.InvocationRequest) => lambda.InvocationResponse) { + this.mockSdkProvider.stubLambda({ + invoke: mockInvokeLambda, + }); + } + public stubEcs(stubs: SyncHandlerSubsetOf, additionalProperties: { [key: string]: any } = {}): void { this.mockSdkProvider.stubEcs(stubs, additionalProperties); } diff --git a/packages/aws-cdk/test/api/hotswap/s3-bucket-hotswap-deployments.test.ts b/packages/aws-cdk/test/api/hotswap/s3-bucket-hotswap-deployments.test.ts new file mode 100644 index 0000000000000..3a015308fcadc --- /dev/null +++ b/packages/aws-cdk/test/api/hotswap/s3-bucket-hotswap-deployments.test.ts @@ -0,0 +1,738 @@ +import { Lambda } from 'aws-sdk'; +import { REQUIRED_BY_CFN } from '../../../lib/api/hotswap/s3-bucket-deployments'; +import * as setup from './hotswap-test-setup'; + +let mockLambdaInvoke: (params: Lambda.Types.InvocationRequest) => Lambda.Types.InvocationResponse; +let hotswapMockSdkProvider: setup.HotswapMockSdkProvider; + +const payloadWithoutCustomResProps = { + RequestType: 'Update', + ResponseURL: REQUIRED_BY_CFN, + PhysicalResourceId: REQUIRED_BY_CFN, + StackId: REQUIRED_BY_CFN, + RequestId: REQUIRED_BY_CFN, + LogicalResourceId: REQUIRED_BY_CFN, +}; + +beforeEach(() => { + hotswapMockSdkProvider = setup.setupHotswapTests(); + mockLambdaInvoke = jest.fn(); + hotswapMockSdkProvider.setInvokeLambdaMock(mockLambdaInvoke); +}); + +test('calls the lambdaInvoke() API when it receives only an asset difference in an S3 bucket deployment and evaluates CFN expressions in S3 Deployment Properties', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + S3Deployment: { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: 'a-lambda-arn', + SourceBucketNames: ['src-bucket'], + SourceObjectKeys: ['src-key-old'], + DestinationBucketName: 'dest-bucket', + DestinationBucketKeyPrefix: 'my-key/some-old-prefix', + }, + }, + }, + }); + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + S3Deployment: { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: 'a-lambda-arn', + SourceBucketNames: ['src-bucket'], + SourceObjectKeys: { + 'Fn::Split': [ + '-', + 'key1-key2-key3', + ], + }, + DestinationBucketName: 'dest-bucket', + DestinationBucketKeyPrefix: 'my-key/some-new-prefix', + }, + }, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + expect(deployStackResult).not.toBeUndefined(); + + expect(mockLambdaInvoke).toHaveBeenCalledWith({ + FunctionName: 'a-lambda-arn', + Payload: JSON.stringify({ + ...payloadWithoutCustomResProps, + ResourceProperties: { + SourceBucketNames: ['src-bucket'], + SourceObjectKeys: ['key1', 'key2', 'key3'], + DestinationBucketName: 'dest-bucket', + DestinationBucketKeyPrefix: 'my-key/some-new-prefix', + }, + }), + }); +}); + +test('does not call the invoke() API when a resource with type that is not Custom::CDKBucketDeployment but has the same properties is changed', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + S3Deployment: { + Type: 'Custom::NotCDKBucketDeployment', + Properties: { + SourceObjectKeys: ['src-key-old'], + }, + }, + }, + }); + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + S3Deployment: { + Type: 'Custom::NotCDKBucketDeployment', + Properties: { + SourceObjectKeys: ['src-key-new'], + }, + }, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + expect(deployStackResult).toBeUndefined(); + expect(mockLambdaInvoke).not.toHaveBeenCalled(); +}); + +test('does not call the invokeLambda() api if the updated Policy has no Roles', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Parameters: { + WebsiteBucketParamOld: { Type: 'String' }, + WebsiteBucketParamNew: { Type: 'String' }, + }, + Resources: { + S3Deployment: { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: 'a-lambda-arn', + SourceObjectKeys: ['src-key-old'], + }, + }, + Policy: { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'my-policy', + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + Ref: 'WebsiteBucketParamOld', + }, + }, + ], + }, + }, + }, + }, + }); + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Parameters: { + WebsiteBucketParamOld: { Type: 'String' }, + WebsiteBucketParamNew: { Type: 'String' }, + }, + Resources: { + S3Deployment: { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: 'a-lambda-arn', + SourceObjectKeys: ['src-key-new'], + }, + }, + Policy: { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'my-policy', + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + Ref: 'WebsiteBucketParamNew', + }, + }, + ], + }, + }, + }, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + expect(deployStackResult).toBeUndefined(); + expect(mockLambdaInvoke).not.toHaveBeenCalled(); +}); + +test('throws an error when the serviceToken fails evaluation in the template', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + S3Deployment: { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: { + Ref: 'BadLamba', + }, + SourceBucketNames: ['src-bucket'], + SourceObjectKeys: ['src-key-old'], + DestinationBucketName: 'dest-bucket', + }, + }, + }, + }); + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + S3Deployment: { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: { + Ref: 'BadLamba', + }, + SourceBucketNames: ['src-bucket'], + SourceObjectKeys: ['src-key-new'], + DestinationBucketName: 'dest-bucket', + }, + }, + }, + }, + }); + + // WHEN + await expect(() => + hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact), + ).rejects.toThrow(/Parameter or resource 'BadLamba' could not be found for evaluation/); + + expect(mockLambdaInvoke).not.toHaveBeenCalled(); +}); + +describe('old-style synthesis', () => { + const parameters = { + WebsiteBucketParamOld: { Type: 'String' }, + WebsiteBucketParamNew: { Type: 'String' }, + DifferentBucketParamNew: { Type: 'String' }, + }; + + const serviceRole = { + Type: 'AWS::IAM::Role', + Properties: { + AssumeRolePolicyDocument: { + Statement: [ + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { + Service: 'lambda.amazonaws.com', + }, + }, + ], + Version: '2012-10-17', + }, + }, + }; + + const policyOld = { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'my-policy-old', + Roles: [ + { Ref: 'ServiceRole' }, + ], + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + Ref: 'WebsiteBucketParamOld', + }, + }, + ], + }, + }, + }; + + const policyNew = { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'my-policy-new', + Roles: [ + { Ref: 'ServiceRole' }, + ], + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + Ref: 'WebsiteBucketParamNew', + }, + }, + ], + }, + }, + }; + + const policy2Old = { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'my-policy-old-2', + Roles: [ + { Ref: 'ServiceRole' }, + ], + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + Ref: 'WebsiteBucketParamOld', + }, + }, + ], + }, + }, + }; + + const policy2New = { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'my-policy-new-2', + Roles: [ + { Ref: 'ServiceRole2' }, + ], + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + Ref: 'DifferentBucketParamOld', + }, + }, + ], + }, + }, + }; + + const deploymentLambda = { + Type: 'AWS::Lambda::Function', + Role: { + 'Fn::GetAtt': [ + 'ServiceRole', + 'Arn', + ], + }, + }; + + const s3DeploymentOld = { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: { + 'Fn::GetAtt': [ + 'S3DeploymentLambda', + 'Arn', + ], + }, + SourceBucketNames: ['src-bucket-old'], + SourceObjectKeys: ['src-key-old'], + DestinationBucketName: 'WebsiteBucketOld', + }, + }; + + const s3DeploymentNew = { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: { + 'Fn::GetAtt': [ + 'S3DeploymentLambda', + 'Arn', + ], + }, + SourceBucketNames: ['src-bucket-new'], + SourceObjectKeys: ['src-key-new'], + DestinationBucketName: 'WebsiteBucketNew', + }, + }; + + beforeEach(() => { + setup.pushStackResourceSummaries( + setup.stackSummaryOf('S3DeploymentLambda', 'AWS::Lambda::Function', 'my-deployment-lambda'), + setup.stackSummaryOf('ServiceRole', 'AWS::IAM::Role', 'my-service-role'), + ); + }); + + test('calls the lambdaInvoke() API when it receives an asset difference in an S3 bucket deployment and an IAM Policy difference using old-style synthesis', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + Parameters: parameters, + ServiceRole: serviceRole, + Policy: policyOld, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentOld, + }, + }); + + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + Parameters: parameters, + ServiceRole: serviceRole, + Policy: policyNew, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentNew, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact, { WebsiteBucketParamOld: 'WebsiteBucketOld', WebsiteBucketParamNew: 'WebsiteBucketNew' }); + + // THEN + expect(deployStackResult).not.toBeUndefined(); + expect(mockLambdaInvoke).toHaveBeenCalledWith({ + FunctionName: 'arn:aws:lambda:here:123456789012:function:my-deployment-lambda', + Payload: JSON.stringify({ + ...payloadWithoutCustomResProps, + ResourceProperties: { + SourceBucketNames: ['src-bucket-new'], + SourceObjectKeys: ['src-key-new'], + DestinationBucketName: 'WebsiteBucketNew', + }, + }), + }); + }); + + test('does not call the lambdaInvoke() API when the difference in the S3 deployment is referred to in one IAM policy change but not another', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + ServiceRole: serviceRole, + Policy1: policyOld, + Policy2: policy2Old, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentOld, + }, + }); + + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + ServiceRole: serviceRole, + Policy1: policyNew, + Policy2: { + Properties: { + Roles: [ + { Ref: 'ServiceRole' }, + 'different-role', + ], + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + 'Fn::GetAtt': [ + 'DifferentBucketNew', + 'Arn', + ], + }, + }, + ], + }, + }, + }, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentNew, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + expect(deployStackResult).toBeUndefined(); + expect(mockLambdaInvoke).not.toHaveBeenCalled(); + }); + + test('does not call the lambdaInvoke() API when the lambda that references the role is referred to by something other than an S3 deployment', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + ServiceRole: serviceRole, + Policy: policyOld, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentOld, + Endpoint: { + Type: 'AWS::Lambda::Permission', + Properties: { + Action: 'lambda:InvokeFunction', + FunctionName: { + 'Fn::GetAtt': [ + 'S3DeploymentLambda', + 'Arn', + ], + }, + Principal: 'apigateway.amazonaws.com', + }, + }, + }, + }); + + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + ServiceRole: serviceRole, + Policy: policyNew, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentNew, + Endpoint: { + Type: 'AWS::Lambda::Permission', + Properties: { + Action: 'lambda:InvokeFunction', + FunctionName: { + 'Fn::GetAtt': [ + 'S3DeploymentLambda', + 'Arn', + ], + }, + Principal: 'apigateway.amazonaws.com', + }, + }, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + expect(deployStackResult).toBeUndefined(); + expect(mockLambdaInvoke).not.toHaveBeenCalled(); + }); + + test('calls the lambdaInvoke() API when it receives an asset difference in two S3 bucket deployments and IAM Policy differences using old-style synthesis', async () => { + // GIVEN + const s3Deployment2Old = { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: { + 'Fn::GetAtt': [ + 'S3DeploymentLambda2', + 'Arn', + ], + }, + SourceBucketNames: ['src-bucket-old'], + SourceObjectKeys: ['src-key-old'], + DestinationBucketName: 'DifferentBucketOld', + }, + }; + + const s3Deployment2New = { + Type: 'Custom::CDKBucketDeployment', + Properties: { + ServiceToken: { + 'Fn::GetAtt': [ + 'S3DeploymentLambda2', + 'Arn', + ], + }, + SourceBucketNames: ['src-bucket-new'], + SourceObjectKeys: ['src-key-new'], + DestinationBucketName: 'DifferentBucketNew', + }, + }; + + setup.setCurrentCfnStackTemplate({ + Resources: { + ServiceRole: serviceRole, + ServiceRole2: serviceRole, + Policy1: policyOld, + Policy2: policy2Old, + S3DeploymentLambda: deploymentLambda, + S3DeploymentLambda2: deploymentLambda, + S3Deployment: s3DeploymentOld, + S3Deployment2: s3Deployment2Old, + }, + }); + + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + Parameters: parameters, + ServiceRole: serviceRole, + ServiceRole2: serviceRole, + Policy1: policyNew, + Policy2: policy2New, + S3DeploymentLambda: deploymentLambda, + S3DeploymentLambda2: deploymentLambda, + S3Deployment: s3DeploymentNew, + S3Deployment2: s3Deployment2New, + }, + }, + }); + + // WHEN + setup.pushStackResourceSummaries( + setup.stackSummaryOf('S3DeploymentLambda2', 'AWS::Lambda::Function', 'my-deployment-lambda-2'), + setup.stackSummaryOf('ServiceRole2', 'AWS::IAM::Role', 'my-service-role-2'), + ); + + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact, { + WebsiteBucketParamOld: 'WebsiteBucketOld', + WebsiteBucketParamNew: 'WebsiteBucketNew', + DifferentBucketParamNew: 'WebsiteBucketNew', + }); + + // THEN + expect(deployStackResult).not.toBeUndefined(); + expect(mockLambdaInvoke).toHaveBeenCalledWith({ + FunctionName: 'arn:aws:lambda:here:123456789012:function:my-deployment-lambda', + Payload: JSON.stringify({ + ...payloadWithoutCustomResProps, + ResourceProperties: { + SourceBucketNames: ['src-bucket-new'], + SourceObjectKeys: ['src-key-new'], + DestinationBucketName: 'WebsiteBucketNew', + }, + }), + }); + + expect(mockLambdaInvoke).toHaveBeenCalledWith({ + FunctionName: 'arn:aws:lambda:here:123456789012:function:my-deployment-lambda-2', + Payload: JSON.stringify({ + ...payloadWithoutCustomResProps, + ResourceProperties: { + SourceBucketNames: ['src-bucket-new'], + SourceObjectKeys: ['src-key-new'], + DestinationBucketName: 'DifferentBucketNew', + }, + }), + }); + }); + + test('does not call the lambdaInvoke() API when it receives an asset difference in an S3 bucket deployment that references two different policies', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + ServiceRole: serviceRole, + Policy1: policyOld, + Policy2: policy2Old, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentOld, + }, + }); + + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + ServiceRole: serviceRole, + Policy1: policyNew, + Policy2: { + Properties: { + Roles: [ + { Ref: 'ServiceRole' }, + ], + PolicyDocument: { + Statement: [ + { + Action: ['s3:GetObject*'], + Effect: 'Allow', + Resource: { + 'Fn::GetAtt': [ + 'DifferentBucketNew', + 'Arn', + ], + }, + }, + ], + }, + }, + }, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentNew, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + expect(deployStackResult).toBeUndefined(); + expect(mockLambdaInvoke).not.toHaveBeenCalled(); + }); + + test('does not call the lambdaInvoke() API when a policy is referenced by a resource that is not an S3 deployment', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + ServiceRole: serviceRole, + Policy1: policyOld, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentOld, + NotADeployment: { + Type: 'AWS::Not::S3Deployment', + Properties: { + Prop: { + Ref: 'ServiceRole', + }, + }, + }, + }, + }); + + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + ServiceRole: serviceRole, + Policy1: policyNew, + S3DeploymentLambda: deploymentLambda, + S3Deployment: s3DeploymentNew, + NotADeployment: { + Type: 'AWS::Not::S3Deployment', + Properties: { + Prop: { + Ref: 'ServiceRole', + }, + }, + }, + }, + }, + }); + + // WHEN + const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + expect(deployStackResult).toBeUndefined(); + expect(mockLambdaInvoke).not.toHaveBeenCalled(); + }); +}); \ No newline at end of file diff --git a/packages/aws-cdk/test/api/hotswap/state-machine-hotswap-deployments.test.ts b/packages/aws-cdk/test/api/hotswap/state-machine-hotswap-deployments.test.ts index 289921fb2bd76..94467c5ac123d 100644 --- a/packages/aws-cdk/test/api/hotswap/state-machine-hotswap-deployments.test.ts +++ b/packages/aws-cdk/test/api/hotswap/state-machine-hotswap-deployments.test.ts @@ -63,7 +63,7 @@ test('calls the updateStateMachine() API when it receives only a definitionStrin expect(deployStackResult).not.toBeUndefined(); expect(mockUpdateMachineDefinition).toHaveBeenCalledWith({ definition: '{ Prop: "new-value" }', - stateMachineArn: 'my-machine', + stateMachineArn: 'arn:aws:states:here:123456789012:stateMachine:my-machine', }); }); @@ -138,7 +138,7 @@ test('calls the updateStateMachine() API when it receives only a definitionStrin }, }, }, null, 2), - stateMachineArn: 'my-machine', + stateMachineArn: 'arn:aws:states:here:123456789012:stateMachine:my-machine', }); }); @@ -168,14 +168,14 @@ test('calls the updateStateMachine() API when it receives a change to the defini }); // WHEN - setup.pushStackResourceSummaries(setup.stackSummaryOf('Machine', 'AWS::StepFunctions::StateMachine', 'mock-machine-resource-id')); + setup.pushStackResourceSummaries(setup.stackSummaryOf('Machine', 'AWS::StepFunctions::StateMachine', 'arn:aws:states:here:123456789012:stateMachine:my-machine')); const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); // THEN expect(deployStackResult).not.toBeUndefined(); expect(mockUpdateMachineDefinition).toHaveBeenCalledWith({ definition: '{ "Prop" : "new-value" }', - stateMachineArn: 'mock-machine-resource-id', // the sdk will convert the ID to the arn in a production environment + stateMachineArn: 'arn:aws:states:here:123456789012:stateMachine:my-machine', }); }); @@ -256,7 +256,7 @@ test('can correctly hotswap old style synth changes', async () => { setup.setCurrentCfnStackTemplate({ Parameters: { AssetParam1: { Type: 'String' } }, Resources: { - SM: { + Machine: { Type: 'AWS::StepFunctions::StateMachine', Properties: { DefinitionString: { Ref: 'AssetParam1' }, @@ -269,7 +269,7 @@ test('can correctly hotswap old style synth changes', async () => { template: { Parameters: { AssetParam2: { Type: String } }, Resources: { - SM: { + Machine: { Type: 'AWS::StepFunctions::StateMachine', Properties: { DefinitionString: { Ref: 'AssetParam2' }, @@ -281,13 +281,14 @@ test('can correctly hotswap old style synth changes', async () => { }); // WHEN + setup.pushStackResourceSummaries(setup.stackSummaryOf('Machine', 'AWS::StepFunctions::StateMachine', 'arn:aws:states:here:123456789012:stateMachine:my-machine')); const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact, { AssetParam2: 'asset-param-2' }); // THEN expect(deployStackResult).not.toBeUndefined(); expect(mockUpdateMachineDefinition).toHaveBeenCalledWith({ definition: 'asset-param-2', - stateMachineArn: 'machine-name', + stateMachineArn: 'arn:aws:states:here:123456789012:stateMachine:machine-name', }); }); @@ -348,7 +349,7 @@ test('calls the updateStateMachine() API when it receives a change to the defini // WHEN setup.pushStackResourceSummaries( - setup.stackSummaryOf('Machine', 'AWS::StepFunctions::StateMachine', 'mock-machine-resource-id'), + setup.stackSummaryOf('Machine', 'AWS::StepFunctions::StateMachine', 'arn:aws:states:here:123456789012:stateMachine:my-machine'), setup.stackSummaryOf('Func', 'AWS::Lambda::Function', 'my-func'), ); const deployStackResult = await hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); @@ -357,7 +358,7 @@ test('calls the updateStateMachine() API when it receives a change to the defini expect(deployStackResult).not.toBeUndefined(); expect(mockUpdateMachineDefinition).toHaveBeenCalledWith({ definition: '"Resource": arn:aws:lambda:here:123456789012:function:my-func', - stateMachineArn: 'my-machine', + stateMachineArn: 'arn:aws:states:here:123456789012:stateMachine:my-machine', }); }); @@ -446,7 +447,7 @@ test("will not perform a hotswap deployment if it doesn't know how to handle a s }, }); setup.pushStackResourceSummaries( - setup.stackSummaryOf('Machine', 'AWS::StepFunctions::StateMachine', 'my-machine'), + setup.stackSummaryOf('Machine', 'AWS::StepFunctions::StateMachine', 'arn:aws:states:here:123456789012:stateMachine:my-machine'), setup.stackSummaryOf('Bucket', 'AWS::S3::Bucket', 'my-bucket'), ); const cdkStackArtifact = setup.cdkStackArtifactOf({ diff --git a/packages/aws-cdk/test/context-providers/generic.test.ts b/packages/aws-cdk/test/context-providers/generic.test.ts index 66d837b2dab98..93325582bf064 100644 --- a/packages/aws-cdk/test/context-providers/generic.test.ts +++ b/packages/aws-cdk/test/context-providers/generic.test.ts @@ -1,3 +1,4 @@ +import { PluginHost } from '../../lib/plugin'; import * as contextproviders from '../../lib/context-providers'; import { Context, TRANSIENT_CONTEXT_KEY } from '../../lib/settings'; import { MockSdkProvider } from '../util/mock-sdk'; @@ -8,10 +9,10 @@ const TEST_PROVIDER: any = 'testprovider'; test('errors are reported into the context value', async () => { // GIVEN - contextproviders.registerContextProvider(TEST_PROVIDER, class { - public async getValue(_: {[key: string]: any}): Promise { + contextproviders.registerContextProvider(TEST_PROVIDER, { + async getValue(_: {[key: string]: any}): Promise { throw new Error('Something went wrong'); - } + }, }); const context = new Context(); @@ -29,8 +30,8 @@ test('errors are reported into the context value', async () => { test('lookup role ARN is resolved', async () => { // GIVEN - contextproviders.registerContextProvider(TEST_PROVIDER, class { - public async getValue(args: {[key: string]: any}): Promise { + contextproviders.registerContextProvider(TEST_PROVIDER, { + async getValue(args: {[key: string]: any}): Promise { if (args.lookupRoleArn == null) { throw new Error('No lookupRoleArn'); } @@ -40,7 +41,7 @@ test('lookup role ARN is resolved', async () => { } return 'some resolved value'; - } + }, }); const context = new Context(); @@ -63,10 +64,10 @@ test('lookup role ARN is resolved', async () => { test('errors are marked transient', async () => { // GIVEN - contextproviders.registerContextProvider(TEST_PROVIDER, class { - public async getValue(_: {[key: string]: any}): Promise { + contextproviders.registerContextProvider(TEST_PROVIDER, { + async getValue(_: {[key: string]: any}): Promise { throw new Error('Something went wrong'); - } + }, }); const context = new Context(); @@ -78,3 +79,42 @@ test('errors are marked transient', async () => { // THEN - error is marked transient expect(context.get('asdf')[TRANSIENT_CONTEXT_KEY]).toBeTruthy(); }); + +test('context provider can be registered using PluginHost', async () => { + let called = false; + + // GIVEN + PluginHost.instance.registerContextProviderAlpha(TEST_PROVIDER, { + async getValue(_: {[key: string]: any}): Promise { + called = true; + return ''; + }, + }); + const context = new Context(); + + // WHEN + await contextproviders.provideContextValues([ + { key: 'asdf', props: { account: '1234', region: 'us-east-1' }, provider: TEST_PROVIDER }, + ], context, mockSDK); + + // THEN - error is marked transient + expect(called).toEqual(true); +}); + +test('context provider can be called without account/region', async () => { + // GIVEN + PluginHost.instance.registerContextProviderAlpha(TEST_PROVIDER, { + async getValue(_: {[key: string]: any}): Promise { + return 'yay'; + }, + }); + const context = new Context(); + + // WHEN + await contextproviders.provideContextValues([ + { key: 'asdf', props: { banana: 'yellow' } as any, provider: TEST_PROVIDER }, + ], context, mockSDK); + + // THEN - error is marked transient + expect(context.get('asdf')).toEqual('yay'); +}); diff --git a/packages/aws-cdk/test/integ/cli/app/app.js b/packages/aws-cdk/test/integ/cli/app/app.js index f0e332eb351fa..834b6369079c9 100644 --- a/packages/aws-cdk/test/integ/cli/app/app.js +++ b/packages/aws-cdk/test/integ/cli/app/app.js @@ -4,6 +4,7 @@ var constructs = require('constructs'); if (process.env.PACKAGE_LAYOUT_VERSION === '1') { var cdk = require('@aws-cdk/core'); var ec2 = require('@aws-cdk/aws-ec2'); + var s3 = require('@aws-cdk/aws-s3'); var ssm = require('@aws-cdk/aws-ssm'); var iam = require('@aws-cdk/aws-iam'); var sns = require('@aws-cdk/aws-sns'); @@ -13,6 +14,7 @@ if (process.env.PACKAGE_LAYOUT_VERSION === '1') { var cdk = require('aws-cdk-lib'); var { aws_ec2: ec2, + aws_s3: s3, aws_ssm: ssm, aws_iam: iam, aws_sns: sns, @@ -109,7 +111,7 @@ class OutputsStack extends cdk.Stack { constructor(parent, id, props) { super(parent, id, props); - const topic = new sns.Topic(this, 'MyOutput', { + const topic = new sns.Topic(this, 'MyOutput', { topicName: `${cdk.Stack.of(this).stackName}MyTopic` }); @@ -299,6 +301,17 @@ class StageUsingContext extends cdk.Stage { } } +class BuiltinLambdaStack extends cdk.Stack { + constructor(parent, id, props) { + super(parent, id, props); + + new s3.Bucket(this, 'Bucket', { + removalPolicy: cdk.RemovalPolicy.DESTROY, + autoDeleteObjects: true, // will deploy a Nodejs lambda backed custom resource + }); + } +} + const app = new cdk.App(); const defaultEnv = { @@ -339,7 +352,7 @@ switch (stackSet) { if (process.env.ENABLE_VPC_TESTING === 'DEFINE') new DefineVpcStack(app, `${stackPrefix}-define-vpc`, { env }); if (process.env.ENABLE_VPC_TESTING === 'IMPORT') - new ImportVpcStack(app, `${stackPrefix}-import-vpc`, { env }); + new ImportVpcStack(app, `${stackPrefix}-import-vpc`, { env }); } new ConditionalResourceStack(app, `${stackPrefix}-conditional-resource`) @@ -352,6 +365,8 @@ switch (stackSet) { }); new SomeStage(app, `${stackPrefix}-stage`); + + new BuiltinLambdaStack(app, `${stackPrefix}-builtin-lambda-function`); break; case 'stage-using-context': diff --git a/packages/aws-cdk/test/integ/cli/cli.integtest.ts b/packages/aws-cdk/test/integ/cli/cli.integtest.ts index 127734a136491..658bb7d355120 100644 --- a/packages/aws-cdk/test/integ/cli/cli.integtest.ts +++ b/packages/aws-cdk/test/integ/cli/cli.integtest.ts @@ -19,6 +19,19 @@ integTest('VPC Lookup', withDefaultFixture(async (fixture) => { await fixture.cdkDeploy('import-vpc', { modEnv: { ENABLE_VPC_TESTING: 'IMPORT' } }); })); +// testing a construct with a builtin Nodejs Lambda Function. +// In this case we are testing the s3.Bucket construct with the +// autoDeleteObjects prop set to true, which creates a Lambda backed +// CustomResource. Since the compiled Lambda code (e.g. __entrypoint__.js) +// is bundled as part of the CDK package, we want to make sure we don't +// introduce changes to the compiled code that could prevent the Lambda from +// executing. If we do, this test will timeout and fail. +integTest('Construct with builtin Lambda function', withDefaultFixture(async (fixture) => { + await fixture.cdkDeploy('builtin-lambda-function'); + fixture.log('Setup complete!'); + await fixture.cdkDestroy('builtin-lambda-function'); +})); + integTest('Two ways of shoing the version', withDefaultFixture(async (fixture) => { const version1 = await fixture.cdk(['version'], { verbose: false }); const version2 = await fixture.cdk(['--version'], { verbose: false }); @@ -259,7 +272,7 @@ integTest('update to stack in ROLLBACK_COMPLETE state will delete stack and crea }); // THEN - expect (stackArn).not.toEqual(newStackArn); // new stack was created + expect(stackArn).not.toEqual(newStackArn); // new stack was created expect(newStackResponse.Stacks?.[0].StackStatus).toEqual('CREATE_COMPLETE'); expect(newStackResponse.Stacks?.[0].Parameters).toContainEqual( { diff --git a/packages/aws-cdk/test/integ/helpers/cdk.ts b/packages/aws-cdk/test/integ/helpers/cdk.ts index 12e60efe243f7..cc04fba7394f4 100644 --- a/packages/aws-cdk/test/integ/helpers/cdk.ts +++ b/packages/aws-cdk/test/integ/helpers/cdk.ts @@ -88,6 +88,7 @@ export function withCdkApp(block: (context: '@aws-cdk/aws-ecr-assets': installationVersion, '@aws-cdk/aws-cloudformation': installationVersion, '@aws-cdk/aws-ec2': installationVersion, + '@aws-cdk/aws-s3': installationVersion, 'constructs': '^3', }); } else { @@ -283,7 +284,7 @@ export class TestFixture { this.output.write(`${s}\n`); } - public async shell(command: string[], options: Omit = {}): Promise { + public async shell(command: string[], options: Omit = {}): Promise { return shell(command, { output: this.output, cwd: this.integTestDir, @@ -701,4 +702,4 @@ const installNpm7 = memoize0(async (): Promise => { return path.join(installDir, 'node_modules', '.bin', 'npm'); }); -const ALREADY_BOOTSTRAPPED_IN_THIS_RUN = new Set(); \ No newline at end of file +const ALREADY_BOOTSTRAPPED_IN_THIS_RUN = new Set(); diff --git a/packages/awslint/package.json b/packages/awslint/package.json index 4ea76e3c3977f..094c8f1003dc1 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -18,11 +18,11 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "^1.46.0", + "@jsii/spec": "^1.47.0", "camelcase": "^6.2.1", "colors": "^1.4.0", "fs-extra": "^9.1.0", - "jsii-reflect": "^1.46.0", + "jsii-reflect": "^1.47.0", "yargs": "^16.2.0" }, "devDependencies": { @@ -39,7 +39,7 @@ "@aws-cdk/eslint-plugin": "0.0.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-jest": "^24.7.0", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "repository": { "type": "git", diff --git a/packages/cdk-assets/lib/aws.ts b/packages/cdk-assets/lib/aws.ts index 936f0d94954e6..c35dedb38bbe2 100644 --- a/packages/cdk-assets/lib/aws.ts +++ b/packages/cdk-assets/lib/aws.ts @@ -8,6 +8,7 @@ export interface IAws { discoverDefaultRegion(): Promise; discoverCurrentAccount(): Promise; + discoverTargetAccount(options: ClientOptions): Promise; s3Client(options: ClientOptions): Promise; ecrClient(options: ClientOptions): Promise; secretsManagerClient(options: ClientOptions): Promise; @@ -94,6 +95,18 @@ export class DefaultAwsClient implements IAws { return this.account; } + public async discoverTargetAccount(options: ClientOptions): Promise { + const sts = new this.AWS.STS(await this.awsOptions(options)); + const response = await sts.getCallerIdentity().promise(); + if (!response.Account || !response.Arn) { + throw new Error(`Unrecognized reponse from STS: '${JSON.stringify(response)}'`); + } + return { + accountId: response.Account!, + partition: response.Arn!.split(':')[1], + }; + } + private async awsOptions(options: ClientOptions) { let credentials; diff --git a/packages/cdk-assets/lib/private/handlers/files.ts b/packages/cdk-assets/lib/private/handlers/files.ts index 0350edb27c39d..f9e2807753c79 100644 --- a/packages/cdk-assets/lib/private/handlers/files.ts +++ b/packages/cdk-assets/lib/private/handlers/files.ts @@ -30,7 +30,7 @@ export class FileAssetHandler implements IAssetHandler { // A thunk for describing the current account. Used when we need to format an error // message, not in the success case. - const account = async () => (await this.host.aws.discoverCurrentAccount())?.accountId; + const account = async () => (await this.host.aws.discoverTargetAccount(destination))?.accountId; switch (await bucketInfo.bucketOwnership(s3, destination.bucketName)) { case BucketOwnership.MINE: break; diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 492bd4ef9b11a..2c648ed64b5b8 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -38,7 +38,7 @@ "@types/node": "^10.17.60", "@types/yargs": "^15.0.14", "@aws-cdk/cdk-build-tools": "0.0.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "jszip": "^3.7.1", "mock-fs": "^4.14.0", "@aws-cdk/pkglint": "0.0.0" diff --git a/packages/cdk-assets/test/fake-listener.ts b/packages/cdk-assets/test/fake-listener.ts new file mode 100644 index 0000000000000..46b7f31a3ecc7 --- /dev/null +++ b/packages/cdk-assets/test/fake-listener.ts @@ -0,0 +1,16 @@ +import { IPublishProgressListener, EventType, IPublishProgress } from '../lib/progress'; + +export class FakeListener implements IPublishProgressListener { + public readonly messages = new Array(); + + constructor(private readonly doAbort = false) { + } + + public onPublishEvent(_type: EventType, event: IPublishProgress): void { + this.messages.push(event.message); + + if (this.doAbort) { + event.abort(); + } + } +} \ No newline at end of file diff --git a/packages/cdk-assets/test/files.test.ts b/packages/cdk-assets/test/files.test.ts index a2cbb592263dc..074d08308027f 100644 --- a/packages/cdk-assets/test/files.test.ts +++ b/packages/cdk-assets/test/files.test.ts @@ -3,6 +3,7 @@ jest.mock('child_process'); import { Manifest } from '@aws-cdk/cloud-assembly-schema'; import * as mockfs from 'mock-fs'; import { AssetManifest, AssetPublishing } from '../lib'; +import { FakeListener } from './fake-listener'; import { mockAws, mockedApiFailure, mockedApiResult, mockUpload } from './mock-aws'; import { mockSpawn } from './mock-child_process'; @@ -226,7 +227,8 @@ test('will only read bucketEncryption once even for multiple assets', async () = }); test('no server side encryption header if access denied for bucket encryption', async () => { - const pub = new AssetPublishing(AssetManifest.fromPath('/simple/cdk.out'), { aws }); + const progressListener = new FakeListener(); + const pub = new AssetPublishing(AssetManifest.fromPath('/simple/cdk.out'), { aws, progressListener }); aws.mockS3.getBucketEncryption = mockedApiFailure('AccessDenied', 'Access Denied'); @@ -243,7 +245,8 @@ test('no server side encryption header if access denied for bucket encryption', ServerSideEncryption: 'AES256', })); - // We'll just have to assume the contents are correct + // Error message references target_account, not current_account + expect(progressListener.messages).toContainEqual(expect.stringMatching(/ACCES_DENIED.*target_account/)); }); test('correctly looks up content type', async () => { @@ -294,6 +297,7 @@ test('successful run does not need to query account ID', async () => { await pub.publish(); expect(aws.discoverCurrentAccount).not.toHaveBeenCalled(); + expect(aws.discoverTargetAccount).not.toHaveBeenCalled(); }); test('correctly identify asset path if path is absolute', async () => { diff --git a/packages/cdk-assets/test/mock-aws.ts b/packages/cdk-assets/test/mock-aws.ts index fcf2fdffa6447..26b4f5d80d914 100644 --- a/packages/cdk-assets/test/mock-aws.ts +++ b/packages/cdk-assets/test/mock-aws.ts @@ -24,6 +24,7 @@ export function mockAws() { discoverPartition: jest.fn(() => Promise.resolve('swa')), discoverCurrentAccount: jest.fn(() => Promise.resolve({ accountId: 'current_account', partition: 'swa' })), discoverDefaultRegion: jest.fn(() => Promise.resolve('current_region')), + discoverTargetAccount: jest.fn(() => Promise.resolve({ accountId: 'target_account', partition: 'swa' })), ecrClient: jest.fn(() => Promise.resolve(mockEcr)), s3Client: jest.fn(() => Promise.resolve(mockS3)), secretsManagerClient: jest.fn(() => Promise.resolve(mockSecretsManager)), @@ -69,4 +70,4 @@ export function mockUpload(expectContent?: string) { }); }), })); -} +} \ No newline at end of file diff --git a/packages/cdk-assets/test/progress.test.ts b/packages/cdk-assets/test/progress.test.ts index d18af611465ba..4003ec7df5482 100644 --- a/packages/cdk-assets/test/progress.test.ts +++ b/packages/cdk-assets/test/progress.test.ts @@ -1,6 +1,7 @@ import { Manifest } from '@aws-cdk/cloud-assembly-schema'; import * as mockfs from 'mock-fs'; -import { AssetManifest, AssetPublishing, EventType, IPublishProgress, IPublishProgressListener } from '../lib'; +import { AssetManifest, AssetPublishing } from '../lib'; +import { FakeListener } from './fake-listener'; import { mockAws, mockedApiResult, mockUpload } from './mock-aws'; let aws: ReturnType; @@ -68,19 +69,4 @@ test('test abort', async () => { // We never get to asset 2 expect(allMessages).not.toContain('theAsset:theDestination2'); -}); - -class FakeListener implements IPublishProgressListener { - public readonly messages = new Array(); - - constructor(private readonly doAbort = false) { - } - - public onPublishEvent(_type: EventType, event: IPublishProgress): void { - this.messages.push(event.message); - - if (this.doAbort) { - event.abort(); - } - } -} +}); \ No newline at end of file diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 1023eed5bf2a2..911a39b00bbd7 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -29,13 +29,13 @@ }, "license": "Apache-2.0", "dependencies": { - "codemaker": "^1.46.0", + "codemaker": "^1.47.0", "yaml": "1.10.2" }, "devDependencies": { "@types/jest": "^27.0.3", "@types/yaml": "1.9.7", - "jest": "^27.3.1", + "jest": "^27.4.3", "typescript": "~3.9.10" }, "keywords": [ diff --git a/packages/cdk/package.json b/packages/cdk/package.json index 37a6b37950684..9bd389d028702 100644 --- a/packages/cdk/package.json +++ b/packages/cdk/package.json @@ -40,6 +40,6 @@ "node": ">= 8.10.0" }, "publishConfig": { - "tag": "next" + "tag": "latest" } } diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 33282a40c846e..5326f04e3ec31 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -37,6 +37,7 @@ "@aws-cdk/aws-acmpca": "0.0.0", "@aws-cdk/aws-amazonmq": "0.0.0", "@aws-cdk/aws-amplify": "0.0.0", + "@aws-cdk/aws-amplifyuibuilder": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-apigatewayv2-authorizers": "0.0.0", @@ -117,6 +118,7 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-events-targets": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", + "@aws-cdk/aws-evidently": "0.0.0", "@aws-cdk/aws-finspace": "0.0.0", "@aws-cdk/aws-fis": "0.0.0", "@aws-cdk/aws-fms": "0.0.0", @@ -159,6 +161,7 @@ "@aws-cdk/aws-lambda-go": "0.0.0", "@aws-cdk/aws-lambda-nodejs": "0.0.0", "@aws-cdk/aws-lambda-python": "0.0.0", + "@aws-cdk/aws-lex": "0.0.0", "@aws-cdk/aws-licensemanager": "0.0.0", "@aws-cdk/aws-lightsail": "0.0.0", "@aws-cdk/aws-location": "0.0.0", @@ -192,7 +195,9 @@ "@aws-cdk/aws-ram": "0.0.0", "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-redshift": "0.0.0", + "@aws-cdk/aws-refactorspaces": "0.0.0", "@aws-cdk/aws-rekognition": "0.0.0", + "@aws-cdk/aws-resiliencehub": "0.0.0", "@aws-cdk/aws-resourcegroups": "0.0.0", "@aws-cdk/aws-robomaker": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", @@ -201,6 +206,7 @@ "@aws-cdk/aws-route53recoverycontrol": "0.0.0", "@aws-cdk/aws-route53recoveryreadiness": "0.0.0", "@aws-cdk/aws-route53resolver": "0.0.0", + "@aws-cdk/aws-rum": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-s3-deployment": "0.0.0", @@ -248,7 +254,7 @@ "@aws-cdk/region-info": "0.0.0", "constructs": "^10.0.0", "fs-extra": "^9.1.0", - "jsii-reflect": "^1.46.0", + "jsii-reflect": "^1.47.0", "jsonschema": "^1.4.0", "yaml": "1.10.2", "yargs": "^16.2.0" @@ -258,8 +264,8 @@ "@types/jest": "^27.0.3", "@types/yaml": "1.9.7", "@types/yargs": "^15.0.14", - "jest": "^27.3.1", - "jsii": "^1.46.0" + "jest": "^27.4.3", + "jsii": "^1.47.0" }, "keywords": [ "aws", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 67d5522e85ff5..05d281a50abfa 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -122,6 +122,7 @@ "@aws-cdk/aws-acmpca": "0.0.0", "@aws-cdk/aws-amazonmq": "0.0.0", "@aws-cdk/aws-amplify": "0.0.0", + "@aws-cdk/aws-amplifyuibuilder": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-apigatewayv2-authorizers": "0.0.0", @@ -203,6 +204,7 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-events-targets": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", + "@aws-cdk/aws-evidently": "0.0.0", "@aws-cdk/aws-finspace": "0.0.0", "@aws-cdk/aws-fis": "0.0.0", "@aws-cdk/aws-fms": "0.0.0", @@ -245,6 +247,7 @@ "@aws-cdk/aws-lambda-go": "0.0.0", "@aws-cdk/aws-lambda-nodejs": "0.0.0", "@aws-cdk/aws-lambda-python": "0.0.0", + "@aws-cdk/aws-lex": "0.0.0", "@aws-cdk/aws-licensemanager": "0.0.0", "@aws-cdk/aws-lightsail": "0.0.0", "@aws-cdk/aws-location": "0.0.0", @@ -278,7 +281,9 @@ "@aws-cdk/aws-ram": "0.0.0", "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-redshift": "0.0.0", + "@aws-cdk/aws-refactorspaces": "0.0.0", "@aws-cdk/aws-rekognition": "0.0.0", + "@aws-cdk/aws-resiliencehub": "0.0.0", "@aws-cdk/aws-resourcegroups": "0.0.0", "@aws-cdk/aws-robomaker": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", @@ -287,6 +292,7 @@ "@aws-cdk/aws-route53recoverycontrol": "0.0.0", "@aws-cdk/aws-route53recoveryreadiness": "0.0.0", "@aws-cdk/aws-route53resolver": "0.0.0", + "@aws-cdk/aws-rum": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-s3-deployment": "0.0.0", diff --git a/scripts/@aws-cdk/script-tests/package.json b/scripts/@aws-cdk/script-tests/package.json index b7f81e397503b..9c3e8f680f25f 100644 --- a/scripts/@aws-cdk/script-tests/package.json +++ b/scripts/@aws-cdk/script-tests/package.json @@ -12,6 +12,6 @@ "build+extract": "npm run build" }, "devDependencies": { - "jest": "^27.3.1" + "jest": "^27.4.3" } } diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 16ceea5aeb58f..2d65fadd177a7 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -54,15 +54,15 @@ "eslint-plugin-import": "^2.25.3", "eslint-plugin-jest": "^24.7.0", "fs-extra": "^9.1.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "jest-junit": "^13.0.0", - "jsii": "^1.46.0", - "jsii-pacmak": "^1.46.0", - "jsii-reflect": "^1.46.0", + "jsii": "^1.47.0", + "jsii-pacmak": "^1.47.0", + "jsii-reflect": "^1.47.0", "markdownlint-cli": "^0.30.0", "nyc": "^15.1.0", "semver": "^7.3.5", - "ts-jest": "^27.0.7", + "ts-jest": "^27.1.1", "typescript": "~3.9.10", "yargs": "^16.2.0" }, diff --git a/tools/@aws-cdk/cdk-release/package.json b/tools/@aws-cdk/cdk-release/package.json index 3aa43d53cc03b..c500f27f176da 100644 --- a/tools/@aws-cdk/cdk-release/package.json +++ b/tools/@aws-cdk/cdk-release/package.json @@ -30,11 +30,11 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/changelog-parser": "^2.7.1", + "@types/changelog-parser": "^2.8.0", "@types/fs-extra": "^8.1.2", "@types/jest": "^27.0.3", "@types/yargs": "^15.0.14", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "dependencies": { "@lerna/project": "^4.0.0", diff --git a/tools/@aws-cdk/cfn2ts/package.json b/tools/@aws-cdk/cfn2ts/package.json index e90de63501744..b8b2ef5cee5ec 100644 --- a/tools/@aws-cdk/cfn2ts/package.json +++ b/tools/@aws-cdk/cfn2ts/package.json @@ -32,7 +32,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-cdk/cfnspec": "0.0.0", - "codemaker": "^1.46.0", + "codemaker": "^1.47.0", "fast-json-patch": "^3.1.0", "fs-extra": "^9.1.0", "yargs": "^16.2.0" @@ -43,7 +43,7 @@ "@types/fs-extra": "^8.1.2", "@types/jest": "^27.0.3", "@types/yargs": "^15.0.14", - "jest": "^27.3.1" + "jest": "^27.4.3" }, "keywords": [ "aws", diff --git a/tools/@aws-cdk/eslint-plugin/package.json b/tools/@aws-cdk/eslint-plugin/package.json index fa10beaba83a7..21cc5abc9b34b 100644 --- a/tools/@aws-cdk/eslint-plugin/package.json +++ b/tools/@aws-cdk/eslint-plugin/package.json @@ -20,7 +20,7 @@ "@types/node": "^10.17.60", "@types/estree": "*", "eslint-plugin-rulesdir": "^0.2.1", - "jest": "^27.3.1", + "jest": "^27.4.3", "typescript": "~3.9.10" }, "dependencies": { diff --git a/tools/@aws-cdk/generate-examples/package.json b/tools/@aws-cdk/generate-examples/package.json index 3479a8e24bdeb..26816bb05da5c 100644 --- a/tools/@aws-cdk/generate-examples/package.json +++ b/tools/@aws-cdk/generate-examples/package.json @@ -42,9 +42,9 @@ "ostools": ["chmod", "cp"] }, "dependencies": { - "@jsii/spec": "1.46.0", - "jsii-reflect": "1.46.0", - "jsii-rosetta": "1.46.0", + "@jsii/spec": "1.47.0", + "jsii-reflect": "1.47.0", + "jsii-rosetta": "1.47.0", "fs-extra": "^9.1.0", "yargs": "^16.2.0" } diff --git a/tools/@aws-cdk/pkglint/lib/library-creation.ts b/tools/@aws-cdk/pkglint/lib/library-creation.ts index 04b13ffbaead3..9dfec23a34a19 100644 --- a/tools/@aws-cdk/pkglint/lib/library-creation.ts +++ b/tools/@aws-cdk/pkglint/lib/library-creation.ts @@ -56,11 +56,12 @@ export function createModuleDefinitionFromCfnNamespace(namespace: string): Modul } -export async function createLibraryReadme(namespace: string, readmePath: string) { +export async function createLibraryReadme(namespace: string, readmePath: string, alphaPackageName?: string) { const module = createModuleDefinitionFromCfnNamespace(namespace); await fs.writeFile(readmePath, cfnOnlyReadmeContents({ cfnNamespace: namespace, packageName: module.packageName, + alphaPackageName, })); } diff --git a/tools/@aws-cdk/pkglint/lib/readme-contents.ts b/tools/@aws-cdk/pkglint/lib/readme-contents.ts index 6e8492566c359..ef80ca6262d0d 100644 --- a/tools/@aws-cdk/pkglint/lib/readme-contents.ts +++ b/tools/@aws-cdk/pkglint/lib/readme-contents.ts @@ -11,6 +11,14 @@ export interface LibraryReadmeOptions { * The name under which we publish this NPM package */ readonly packageName: string; + + /** + * Alpha package name + * + * If the "actual" contents of this library are available in another package, + * give the name here. + */ + readonly alphaPackageName?: string; } /** @@ -55,6 +63,13 @@ export function cfnOnlyReadmeContents(options: LibraryReadmeOptions) { '```ts nofixture', `import * as ${importName} from '${options.packageName}';`, '```', + ...(options.alphaPackageName ? [ + '', + '> The construct library for this service is in preview. Since it is not stable yet, it is distributed', + '> as a separate package so that you can pin its version independently of the rest of the CDK. See the package named:', + '>', + `> ${options.alphaPackageName}`, + ] : []), '', '', '', diff --git a/tools/@aws-cdk/pkglint/package.json b/tools/@aws-cdk/pkglint/package.json index 1c3a934d1952c..9245e467802d1 100644 --- a/tools/@aws-cdk/pkglint/package.json +++ b/tools/@aws-cdk/pkglint/package.json @@ -50,7 +50,7 @@ "eslint-plugin-import": "^2.25.3", "eslint-plugin-jest": "^24.7.0", "eslint": "^7.32.0", - "jest": "^27.3.1", + "jest": "^27.4.3", "typescript": "~3.9.10" }, "nozem": { diff --git a/tools/@aws-cdk/prlint/package.json b/tools/@aws-cdk/prlint/package.json index b9a3760d8373f..0c2e0dfda8680 100644 --- a/tools/@aws-cdk/prlint/package.json +++ b/tools/@aws-cdk/prlint/package.json @@ -22,7 +22,7 @@ "@types/fs-extra": "^9.0.13", "@types/glob": "^7.2.0", "@types/jest": "^27.0.3", - "jest": "^27.3.1", + "jest": "^27.4.3", "make-runnable": "^1.3.10", "typescript": "~3.9.10" }, diff --git a/tools/@aws-cdk/ubergen/bin/ubergen.ts b/tools/@aws-cdk/ubergen/bin/ubergen.ts index f12c86e353d9e..7041235a03ffc 100644 --- a/tools/@aws-cdk/ubergen/bin/ubergen.ts +++ b/tools/@aws-cdk/ubergen/bin/ubergen.ts @@ -364,13 +364,16 @@ async function transformPackage( await fs.mkdirp(destinationLib); await cfn2ts(cfnScopes, destinationLib); + // We know what this is going to be, so predict it + const alphaPackageName = `${library.packageJson.name}-alpha`; + // create a lib/index.ts which only exports the generated files fs.writeFileSync(path.join(destinationLib, 'index.ts'), /// logic copied from `create-missing-libraries.ts` cfnScopes.map(s => (s === 'AWS::Serverless' ? 'AWS::SAM' : s).split('::')[1].toLocaleLowerCase()) .map(s => `export * from './${s}.generated';`) .join('\n')); - await pkglint.createLibraryReadme(cfnScopes[0], path.join(destination, 'README.md')); + await pkglint.createLibraryReadme(cfnScopes[0], path.join(destination, 'README.md'), alphaPackageName); await copyOrTransformFiles(destination, destination, allLibraries, uberPackageJson); } else { diff --git a/tools/@aws-cdk/yarn-cling/package.json b/tools/@aws-cdk/yarn-cling/package.json index 412e5d2f34598..11146a87e152d 100644 --- a/tools/@aws-cdk/yarn-cling/package.json +++ b/tools/@aws-cdk/yarn-cling/package.json @@ -42,7 +42,7 @@ "@types/node": "^10.17.60", "@types/semver": "^7.3.9", "@types/yarnpkg__lockfile": "^1.1.5", - "jest": "^27.3.1", + "jest": "^27.4.3", "typescript": "~3.9.10" }, "dependencies": { diff --git a/version.v1.json b/version.v1.json index f30decb5eb3d0..4b32b3e045994 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.134.0" + "version": "1.135.0" } \ No newline at end of file diff --git a/version.v2.json b/version.v2.json index c2f04052df4f0..5fee125639ed3 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.1.0", - "alphaVersion": "2.1.0-alpha.0" + "version": "2.2.0", + "alphaVersion": "2.2.0-alpha.0" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0ceba103386bb..d1c1a1928dbc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -424,16 +424,16 @@ jest-util "^26.6.2" slash "^3.0.0" -"@jest/console@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/console/-/console-27.3.1.tgz#e8ea3a475d3f8162f23d69efbfaa9cbe486bee93" - integrity sha512-RkFNWmv0iui+qsOr/29q9dyfKTTT5DCuP31kUwg7rmOKPT/ozLeGLKJKVIiOfbiKyleUZKIrHwhmiZWVe8IMdw== +"@jest/console@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz#7a95612d38c007ddb528ee446fe5e5e785e685ce" + integrity sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.3.1" - jest-util "^27.3.1" + jest-message-util "^27.4.2" + jest-util "^27.4.2" slash "^3.0.0" "@jest/core@^26.6.3": @@ -470,35 +470,35 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/core@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/core/-/core-27.3.1.tgz#04992ef1b58b17c459afb87ab56d81e63d386925" - integrity sha512-DMNE90RR5QKx0EA+wqe3/TNEwiRpOkhshKNxtLxd4rt3IZpCt+RSL+FoJsGeblRZmqdK4upHA/mKKGPPRAifhg== +"@jest/core@^27.4.3": + version "27.4.3" + resolved "https://registry.npmjs.org/@jest/core/-/core-27.4.3.tgz#9b9b34f4e6429a633085f476402aa2e3ce707877" + integrity sha512-V9ms3zSxUHxh1E/ZLAiXF7SLejsdFnjWTFizWotMOWvjho0lW5kSjZymhQSodNW0T0ZMQRiha7f8+NcFVm3hJQ== dependencies: - "@jest/console" "^27.3.1" - "@jest/reporters" "^27.3.1" - "@jest/test-result" "^27.3.1" - "@jest/transform" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/console" "^27.4.2" + "@jest/reporters" "^27.4.2" + "@jest/test-result" "^27.4.2" + "@jest/transform" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.3.0" - jest-config "^27.3.1" - jest-haste-map "^27.3.1" - jest-message-util "^27.3.1" - jest-regex-util "^27.0.6" - jest-resolve "^27.3.1" - jest-resolve-dependencies "^27.3.1" - jest-runner "^27.3.1" - jest-runtime "^27.3.1" - jest-snapshot "^27.3.1" - jest-util "^27.3.1" - jest-validate "^27.3.1" - jest-watcher "^27.3.1" + jest-changed-files "^27.4.2" + jest-config "^27.4.3" + jest-haste-map "^27.4.2" + jest-message-util "^27.4.2" + jest-regex-util "^27.4.0" + jest-resolve "^27.4.2" + jest-resolve-dependencies "^27.4.2" + jest-runner "^27.4.3" + jest-runtime "^27.4.2" + jest-snapshot "^27.4.2" + jest-util "^27.4.2" + jest-validate "^27.4.2" + jest-watcher "^27.4.2" micromatch "^4.0.4" rimraf "^3.0.0" slash "^3.0.0" @@ -514,15 +514,15 @@ "@types/node" "*" jest-mock "^26.6.2" -"@jest/environment@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.3.1.tgz#2182defbce8d385fd51c5e7c7050f510bd4c86b1" - integrity sha512-BCKCj4mOVLme6Tanoyc9k0ultp3pnmuyHw73UHRPeeZxirsU/7E3HC4le/VDb/SMzE1JcPnto+XBKFOcoiJzVw== +"@jest/environment@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz#03efabce528dbb09bffd3ec7e39bb0f3f7475cc2" + integrity sha512-uSljKxh/rGlHlmhyeG4ZoVK9hOec+EPBkwTHkHKQ2EqDu5K+MaG9uJZ8o1CbRsSdZqSuhXvJCYhBWsORPPg6qw== dependencies: - "@jest/fake-timers" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/fake-timers" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" - jest-mock "^27.3.0" + jest-mock "^27.4.2" "@jest/fake-timers@^26.6.2": version "26.6.2" @@ -536,17 +536,17 @@ jest-mock "^26.6.2" jest-util "^26.6.2" -"@jest/fake-timers@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.3.1.tgz#1fad860ee9b13034762cdb94266e95609dfce641" - integrity sha512-M3ZFgwwlqJtWZ+QkBG5NmC23A9w+A6ZxNsO5nJxJsKYt4yguBd3i8TpjQz5NfCX91nEve1KqD9RA2Q+Q1uWqoA== +"@jest/fake-timers@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz#d217f86c3ba2027bf29e0b731fd0cb761a72d093" + integrity sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" "@sinonjs/fake-timers" "^8.0.1" "@types/node" "*" - jest-message-util "^27.3.1" - jest-mock "^27.3.0" - jest-util "^27.3.1" + jest-message-util "^27.4.2" + jest-mock "^27.4.2" + jest-util "^27.4.2" "@jest/globals@^26.6.2": version "26.6.2" @@ -557,14 +557,14 @@ "@jest/types" "^26.6.2" expect "^26.6.2" -"@jest/globals@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-27.3.1.tgz#ce1dfb03d379237a9da6c1b99ecfaca1922a5f9e" - integrity sha512-Q651FWiWQAIFiN+zS51xqhdZ8g9b88nGCobC87argAxA7nMfNQq0Q0i9zTfQYgLa6qFXk2cGANEqfK051CZ8Pg== +"@jest/globals@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/globals/-/globals-27.4.2.tgz#56a402c5ebf22eba1d34e900772147f5126ea2d8" + integrity sha512-KkfaHEttlGpXYAQTZHgrESiEPx2q/DKAFLGLFda1uGVrqc17snd3YVPhOxlXOHIzVPs+lQ/SDB2EIvxyGzb3Ew== dependencies: - "@jest/environment" "^27.3.1" - "@jest/types" "^27.2.5" - expect "^27.3.1" + "@jest/environment" "^27.4.2" + "@jest/types" "^27.4.2" + expect "^27.4.2" "@jest/reporters@^26.6.2": version "26.6.2" @@ -598,16 +598,16 @@ optionalDependencies: node-notifier "^8.0.0" -"@jest/reporters@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-27.3.1.tgz#28b5c1f5789481e23788048fa822ed15486430b9" - integrity sha512-m2YxPmL9Qn1emFVgZGEiMwDntDxRRQ2D58tiDQlwYTg5GvbFOKseYCcHtn0WsI8CG4vzPglo3nqbOiT8ySBT/w== +"@jest/reporters@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.2.tgz#d3860c5d3f668fa1326ab2bf5989f774e5c03f04" + integrity sha512-sp4aqmdBJtjKetEakzDPcZggPcVIF6w9QLkYBbaWDV6e/SIsHnF1S4KtIH91eEc2fp7ep6V/e1xvdfEoho1d2w== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.3.1" - "@jest/test-result" "^27.3.1" - "@jest/transform" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/console" "^27.4.2" + "@jest/test-result" "^27.4.2" + "@jest/transform" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" @@ -619,10 +619,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.3.1" - jest-resolve "^27.3.1" - jest-util "^27.3.1" - jest-worker "^27.3.1" + jest-haste-map "^27.4.2" + jest-resolve "^27.4.2" + jest-util "^27.4.2" + jest-worker "^27.4.2" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -638,10 +638,10 @@ graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/source-map@^27.0.6": - version "27.0.6" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-27.0.6.tgz#be9e9b93565d49b0548b86e232092491fb60551f" - integrity sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g== +"@jest/source-map@^27.4.0": + version "27.4.0" + resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz#2f0385d0d884fb3e2554e8f71f8fa957af9a74b6" + integrity sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" @@ -657,13 +657,13 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-27.3.1.tgz#89adee8b771877c69b3b8d59f52f29dccc300194" - integrity sha512-mLn6Thm+w2yl0opM8J/QnPTqrfS4FoXsXF2WIWJb2O/GBSyResL71BRuMYbYRsGt7ELwS5JGcEcGb52BNrumgg== +"@jest/test-result@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz#05fd4a5466ec502f3eae0b39dff2b93ea4d5d9ec" + integrity sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA== dependencies: - "@jest/console" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/console" "^27.4.2" + "@jest/types" "^27.4.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" @@ -678,15 +678,15 @@ jest-runner "^26.6.3" jest-runtime "^26.6.3" -"@jest/test-sequencer@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.3.1.tgz#4b3bde2dbb05ee74afdae608cf0768e3354683b1" - integrity sha512-siySLo07IMEdSjA4fqEnxfIX8lB/lWYsBPwNFtkOvsFQvmBrL3yj3k3uFNZv/JDyApTakRpxbKLJ3CT8UGVCrA== +"@jest/test-sequencer@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.2.tgz#94bb7e5412d59ae2a8a4b8f9925bb16b6dc82b4c" + integrity sha512-HmHp5mlh9f9GyNej5yCS1JZIFfUGnP9+jEOH5zoq5EmsuZeYD+dGULqyvGDPtuzzbyAFJ6R4+z4SS0VvnFwwGQ== dependencies: - "@jest/test-result" "^27.3.1" + "@jest/test-result" "^27.4.2" graceful-fs "^4.2.4" - jest-haste-map "^27.3.1" - jest-runtime "^27.3.1" + jest-haste-map "^27.4.2" + jest-runtime "^27.4.2" "@jest/transform@^26.6.2": version "26.6.2" @@ -709,21 +709,21 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/transform@^27.3.1": - version "27.3.1" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-27.3.1.tgz#ff80eafbeabe811e9025e4b6f452126718455220" - integrity sha512-3fSvQ02kuvjOI1C1ssqMVBKJpZf6nwoCiSu00zAKh5nrp3SptNtZy/8s5deayHnqxhjD9CWDJ+yqQwuQ0ZafXQ== +"@jest/transform@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/transform/-/transform-27.4.2.tgz#459885e96de2e21fc68b8b371e90aa653966dd0d" + integrity sha512-RTKcPZllfcmLfnlxBya7aypofhdz05+E6QITe55Ex0rxyerkgjmmpMlvVn11V0cP719Ps6WcDYCnDzxnnJUwKg== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.3.1" - jest-regex-util "^27.0.6" - jest-util "^27.3.1" + jest-haste-map "^27.4.2" + jest-regex-util "^27.4.0" + jest-util "^27.4.2" micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" @@ -741,10 +741,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^27.2.5": - version "27.2.5" - resolved "https://registry.npmjs.org/@jest/types/-/types-27.2.5.tgz#420765c052605e75686982d24b061b4cbba22132" - integrity sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ== +"@jest/types@^27.4.2": + version "27.4.2" + resolved "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz#96536ebd34da6392c2b7c7737d693885b5dd44a5" + integrity sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -752,18 +752,18 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@jsii/check-node@1.46.0": - version "1.46.0" - resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.46.0.tgz#4825c26f0cd4515015e950ab17df63df07abadfb" - integrity sha512-dIJGSQrF4BXvzTG8idcimu2VCNctlDyoNsc+ETsoHu7T9pije0U0BnOrjUQ6ZJFpBvLZ6qzNA46gynzwWCXB6g== +"@jsii/check-node@1.47.0": + version "1.47.0" + resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.47.0.tgz#746a548b9de6b4fced4d57d6fa0384943e6a9576" + integrity sha512-LSlbKTpMVYw1R3Be70sJJdJbuLWEFAMbGEHE731Je1QDTXTRm6Gc3NDvPUvTTuHEry8f2Wys+1pXNX06X4PKxQ== dependencies: chalk "^4.1.2" semver "^7.3.5" -"@jsii/spec@1.46.0", "@jsii/spec@^1.46.0": - version "1.46.0" - resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.46.0.tgz#8ad4e333120374708f2d681651c6b7fd7961f6a6" - integrity sha512-yp6rN23ve+F1/6g8Gwmp8PbrtqpMB05GMwJ8GGhvwmCLa0kBO8eALWvB/KtmuDJ4wllSojVvuK4rluUTTkvBWg== +"@jsii/spec@1.47.0", "@jsii/spec@^1.47.0": + version "1.47.0" + resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.47.0.tgz#6bc24dbf9f4949a0260d9fb51a2f9d7b30c6b4f4" + integrity sha512-5F9Qw0lnK8mCumHvpA+XhoBJezgW6q92sLM2jsvo7bzXWXyRRfr1cHl1g5fxQ0yS82B5NMa1fN2n28BsEKs+Gw== dependencies: jsonschema "^1.4.0" @@ -1766,15 +1766,15 @@ dependencies: "@types/glob" "*" -"@types/aws-lambda@^8.10.85": - version "8.10.85" - resolved "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.85.tgz#26cd76897b1972247cbc1a34b6f21d023e987437" - integrity sha512-cMRXVxb+NMb6EekKel1fPBfz2ZqE5cGhIS14G7FVUM4Bqilx0lHKnZbsDLWLSeckDpkvlp5six2F7UWyEEJSoQ== +"@types/aws-lambda@^8.10.86": + version "8.10.86" + resolved "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.86.tgz#f97d9e2f75f87b03401bcd19737b025ec08de200" + integrity sha512-CH7MtDqW8hAm05alc837XHvqKcrfx/kacc4EyUoyN5PoFK3D0lIfN0GK2WsV6YKU4tUsLTLAVLSyBrcFdHP9Bw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14", "@types/babel__core@^7.1.7": - version "7.1.16" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.16.tgz#bc12c74b7d65e82d29876b5d0baf5c625ac58702" - integrity sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ== + version "7.1.17" + resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz#f50ac9d20d64153b510578d84f9643f9a3afbe64" + integrity sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -1804,10 +1804,10 @@ dependencies: "@babel/types" "^7.3.0" -"@types/changelog-parser@^2.7.1": - version "2.7.1" - resolved "https://registry.npmjs.org/@types/changelog-parser/-/changelog-parser-2.7.1.tgz#da124373fc8abfb6951fef83718ea5f041fea527" - integrity sha512-OFZB7OlG6nrkcnvJhcyV2Zm/PUGk40oHyfaEBRjlm+ghrKxbFQI+xao/IzYL0G72fpLCTGGs3USrhe38/FF6QQ== +"@types/changelog-parser@^2.8.0": + version "2.8.0" + resolved "https://registry.npmjs.org/@types/changelog-parser/-/changelog-parser-2.8.0.tgz#30568e143dd888a102719f6c34da0e5a97f71c5d" + integrity sha512-40nlD5BTtVmB0Rx40yZxjtfQbK4QfnLL/w+QcSYvVu9zb+zfMLP8YD7Ym3qE+pKF+6gmHvg5Nc5YTGMAO9WaLQ== "@types/eslint@^7.29.0": version "7.29.0" @@ -1870,7 +1870,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^26.0.24": +"@types/jest@^26.0.22", "@types/jest@^26.0.24": version "26.0.24" resolved "https://registry.npmjs.org/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a" integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w== @@ -1936,9 +1936,9 @@ integrity sha512-uv53RrNdhbkV/3VmVCtfImfYCWC3GTTRn3R11Whni3EJ+gb178tkZBVNj2edLY5CMrB749dQi+SJkg87jsN8UQ== "@types/node@*", "@types/node@>= 8", "@types/node@^16.9.2": - version "16.11.10" - resolved "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz#2e3ad0a680d96367103d3e670d41c2fed3da61ae" - integrity sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA== + version "16.11.12" + resolved "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz#ac7fb693ac587ee182c3780c26eb65546a1a3c10" + integrity sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw== "@types/node@^10.17.60": version "10.17.60" @@ -1990,9 +1990,9 @@ "@types/sinonjs__fake-timers" "*" "@types/sinonjs__fake-timers@*": - version "8.1.0" - resolved "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.0.tgz#443f49b74f1f57e20d9abac7e18b59e9ee98c5cf" - integrity sha512-TZ3vsL7wvXRNTRehor/zKtyWX9Ew3TrT20QQHPx+rieOJivRntZntWhUu1/qKnC8FK4q++RiEl/kje+PAVHhfg== + version "8.1.1" + resolved "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" + integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g== "@types/stack-utils@^2.0.0": version "2.0.1" @@ -2508,19 +2508,19 @@ available-typed-arrays@^1.0.5: resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -aws-sdk-mock@^5.4.0: - version "5.4.0" - resolved "https://registry.npmjs.org/aws-sdk-mock/-/aws-sdk-mock-5.4.0.tgz#1c7abbcb128972f0a3a475d08eff9c67b82a04a9" - integrity sha512-lAks83rzszMBNJ91YYGZT/NEaXUlW1rzeBNPFY4i4ImoL3Xx26Ro4sBUb9TwTnU+8LDCMgVigSEELMPFfTUkmA== +aws-sdk-mock@^5.5.0: + version "5.5.0" + resolved "https://registry.npmjs.org/aws-sdk-mock/-/aws-sdk-mock-5.5.0.tgz#6b7df9f1b71747e448983ff9e2e1aa2150b403cc" + integrity sha512-IBs5NSANbRKBlRtj9qAszoIR0EtG5+DaXTHGuV4jZ+qp7otUv3vmBOBkGy9OlmiBNWc204KRNt1V4JnJbWPoiA== dependencies: aws-sdk "^2.928.0" sinon "^11.1.1" traverse "^0.6.6" aws-sdk@^2.596.0, aws-sdk@^2.848.0, aws-sdk@^2.928.0, aws-sdk@^2.979.0: - version "2.1035.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1035.0.tgz#89a34c5b1e76e8304201036bf5258bceeebf4137" - integrity sha512-BjSGGZIQE/SCLDgj2T4AhtBG4A4NgXhV/Z/I/E7Mst/RpOepTqZGznUbgXTvO+Z3gKqx33jJa6mS7ZxStCb/Wg== + version "2.1044.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1044.0.tgz#0708eaf48daf8d961b414e698d84e8cd1f82c4ad" + integrity sha512-n55uGUONQGXteGGG1QlZ1rKx447KSuV/x6jUGNf2nOl41qMI8ZgLUhNUt0uOtw3qJrCTanzCyR/JKBq2PMiqEQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -2563,16 +2563,16 @@ babel-jest@^26.6.3: graceful-fs "^4.2.4" slash "^3.0.0" -babel-jest@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.3.1.tgz#0636a3404c68e07001e434ac4956d82da8a80022" - integrity sha512-SjIF8hh/ir0peae2D6S6ZKRhUy7q/DnpH7k/V6fT4Bgs/LXXUztOpX4G2tCgq8mLo5HA9mN6NmlFMeYtKmIsTQ== +babel-jest@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.2.tgz#6edf80971045cfd44f3f10b6eda6007d95f62742" + integrity sha512-MADrjb3KBO2eyZCAc6QaJg6RT5u+6oEdDyHO5HEalnpwQ6LrhTsQF2Kj1Wnz2t6UPXIXPk18dSXXOT0wF5yTxA== dependencies: - "@jest/transform" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/transform" "^27.4.2" + "@jest/types" "^27.4.2" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.2.0" + babel-preset-jest "^27.4.0" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -2598,10 +2598,10 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-plugin-jest-hoist@^27.2.0: - version "27.2.0" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.2.0.tgz#79f37d43f7e5c4fdc4b2ca3e10cc6cf545626277" - integrity sha512-TOux9khNKdi64mW+0OIhcmbAn75tTlzKhxmiNXevQaPbrBYK7YKjP1jl6NHTJ6XR5UgUrJbCnWlKVnJn29dfjw== +babel-plugin-jest-hoist@^27.4.0: + version "27.4.0" + resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz#d7831fc0f93573788d80dee7e682482da4c730d6" + integrity sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -2634,12 +2634,12 @@ babel-preset-jest@^26.6.2: babel-plugin-jest-hoist "^26.6.2" babel-preset-current-node-syntax "^1.0.0" -babel-preset-jest@^27.2.0: - version "27.2.0" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.2.0.tgz#556bbbf340608fed5670ab0ea0c8ef2449fba885" - integrity sha512-z7MgQ3peBwN5L5aCqBKnF6iqdlvZvFUQynEhu0J+X9nHLU72jO3iY331lcYrg+AssJ8q7xsv5/3AICzVmJ/wvg== +babel-preset-jest@^27.4.0: + version "27.4.0" + resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz#70d0e676a282ccb200fbabd7f415db5fdf393bca" + integrity sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg== dependencies: - babel-plugin-jest-hoist "^27.2.0" + babel-plugin-jest-hoist "^27.4.0" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -2891,9 +2891,9 @@ camelcase@^6.0.0, camelcase@^6.2.0, camelcase@^6.2.1: integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA== caniuse-lite@^1.0.30001280: - version "1.0.30001282" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz#38c781ee0a90ccfe1fe7fefd00e43f5ffdcb96fd" - integrity sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg== + version "1.0.30001285" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001285.tgz#fe1e52229187e11d6670590790d669b9e03315b7" + integrity sha512-KAOkuUtcQ901MtmvxfKD+ODHH9YVDYnBt+TGYSz2KIfnq22CiArbUxXPN9067gNbgMlnNYRSwho8OPXZPALB9Q== capture-exit@^2.0.0: version "2.0.0" @@ -2912,17 +2912,17 @@ caseless@~0.12.0: resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -cdk8s-plus-21@^1.0.0-beta.44: - version "1.0.0-beta.44" - resolved "https://registry.npmjs.org/cdk8s-plus-21/-/cdk8s-plus-21-1.0.0-beta.44.tgz#87eda022cf827dc950db1def42f470d46d64e356" - integrity sha512-3W7nUwSQesmWi4DDU47xjlEb74HK1QJ567JInNJYsgfKpgN+MJvq+J8lP+Ok4qkGZRpw91P6r9T2U9JO2zQdVg== +cdk8s-plus-21@^1.0.0-beta.54: + version "1.0.0-beta.54" + resolved "https://registry.npmjs.org/cdk8s-plus-21/-/cdk8s-plus-21-1.0.0-beta.54.tgz#f6c3d721c90a7fbcefaa0162114cd9c95ccfeb2d" + integrity sha512-5eDM/uSXTCFKOKDGPeu1OafTyxMg/o7jpW4gyuEFZPGnwU3qHQ6j+4b9PPkgs2fCI8jMMBMuc1iGS2IwUqyHOQ== dependencies: minimatch "^3.0.4" -cdk8s@^1.1.42: - version "1.1.42" - resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-1.1.42.tgz#0cd078ece1e4cd85685d7e8bfeb185f2503631ed" - integrity sha512-jK56rKeOMHRjMfnKUvU34GzQPzW+tplOBu5wpEr++cJhg3YUPwmFp5m7/53yaIUk2jLHYodxacA8wSaP14fJRw== +cdk8s@^1.2.6: + version "1.2.6" + resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-1.2.6.tgz#7f65d2f9c780e4893e2b810c7da720ae98e27b2c" + integrity sha512-/vYCE+oWaR9RMcg3Hduiy/G8TGF+8xJQJe+EvQxLFZxAq+kiqbkYoasItuYeYNM3fIRn5qk94M2AVfoV2LosJA== dependencies: fast-json-patch "^2.2.1" follow-redirects "^1.14.5" @@ -3096,12 +3096,12 @@ co@^4.6.0: resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -codemaker@^1.46.0: - version "1.46.0" - resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.46.0.tgz#9889188c8085e3b1a1058c4f8e1f1b9458177e8c" - integrity sha512-sCGZXQkc6DOkchW9S1J5RPzQx7DP9HW2BtfThaCkiDGoKytbvDsUDFGxRX/6823jQxvjkOwZVooOwD+0+hYYEg== +codemaker@^1.47.0: + version "1.47.0" + resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.47.0.tgz#f54ba966fd6e7bec9fd3394cca9cea6bcc528505" + integrity sha512-3Ab891O2IKCAOJE1rrgHS1z91AKlxoeQ2gfvL9bDv2K7zSrEN0IwI/YCgrIsUsf1RQFIOKDnizhFjn2PAap8Wg== dependencies: - camelcase "^6.2.0" + camelcase "^6.2.1" decamelize "^5.0.1" fs-extra "^9.1.0" @@ -3566,9 +3566,9 @@ dateformat@^3.0.0: integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.2" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + version "4.3.3" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" @@ -3771,10 +3771,10 @@ diff-sequences@^26.6.2: resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== -diff-sequences@^27.0.6: - version "27.0.6" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" - integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== +diff-sequences@^27.4.0: + version "27.4.0" + resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz#d783920ad8d06ec718a060d00196dfef25b132a5" + integrity sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww== diff@^4.0.1, diff@^4.0.2: version "4.0.2" @@ -3874,9 +3874,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" electron-to-chromium@^1.3.896: - version "1.4.0" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.0.tgz#7456192519838f881e35e4038bf4ad2c36353e63" - integrity sha512-+oXCt6SaIu8EmFTPx8wNGSB0tHQ5biDscnlf6Uxuz17e9CjzMRtGk9B8705aMPnj0iWr3iC74WuIkngCsLElmA== + version "1.4.13" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.13.tgz#6b8a21a71c6f30b4a4def54d3afe94e0ddbc58b3" + integrity sha512-ih5tIhzEuf78pBY70FXLo+Pw73R5MPPPcXb4CGBMJaCQt/qo/IGIesKXmswpemVCKSE2Bulr5FslUv7gAWJoOw== emittery@^0.7.1: version "0.7.2" @@ -4005,113 +4005,113 @@ es6-error@^4.0.1: resolved "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -esbuild-android-arm64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.13.15.tgz#3fc3ff0bab76fe35dd237476b5d2b32bb20a3d44" - integrity sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg== - -esbuild-darwin-64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.13.15.tgz#8e9169c16baf444eacec60d09b24d11b255a8e72" - integrity sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ== - -esbuild-darwin-arm64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.15.tgz#1b07f893b632114f805e188ddfca41b2b778229a" - integrity sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ== - -esbuild-freebsd-64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.15.tgz#0b8b7eca1690c8ec94c75680c38c07269c1f4a85" - integrity sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA== - -esbuild-freebsd-arm64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.15.tgz#2e1a6c696bfdcd20a99578b76350b41db1934e52" - integrity sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ== - -esbuild-linux-32@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.13.15.tgz#6fd39f36fc66dd45b6b5f515728c7bbebc342a69" - integrity sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g== - -esbuild-linux-64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.13.15.tgz#9cb8e4bcd7574e67946e4ee5f1f1e12386bb6dd3" - integrity sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA== - -esbuild-linux-arm64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.15.tgz#3891aa3704ec579a1b92d2a586122e5b6a2bfba1" - integrity sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA== - -esbuild-linux-arm@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.13.15.tgz#8a00e99e6a0c6c9a6b7f334841364d8a2b4aecfe" - integrity sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA== - -esbuild-linux-mips64le@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.15.tgz#36b07cc47c3d21e48db3bb1f4d9ef8f46aead4f7" - integrity sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg== - -esbuild-linux-ppc64le@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.15.tgz#f7e6bba40b9a11eb9dcae5b01550ea04670edad2" - integrity sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ== - -esbuild-netbsd-64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.15.tgz#a2fedc549c2b629d580a732d840712b08d440038" - integrity sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w== - -esbuild-openbsd-64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.15.tgz#b22c0e5806d3a1fbf0325872037f885306b05cd7" - integrity sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g== - -esbuild-sunos-64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.13.15.tgz#d0b6454a88375ee8d3964daeff55c85c91c7cef4" - integrity sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw== - -esbuild-windows-32@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.13.15.tgz#c96d0b9bbb52f3303322582ef8e4847c5ad375a7" - integrity sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw== - -esbuild-windows-64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.13.15.tgz#1f79cb9b1e1bb02fb25cd414cb90d4ea2892c294" - integrity sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ== - -esbuild-windows-arm64@0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.15.tgz#482173070810df22a752c686509c370c3be3b3c3" - integrity sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA== - -esbuild@^0.13.15: - version "0.13.15" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.13.15.tgz#db56a88166ee373f87dbb2d8798ff449e0450cdf" - integrity sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw== +esbuild-android-arm64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.2.tgz#256b7cf2f9d382a2a92a4ff4e13187587c9b7c6a" + integrity sha512-hEixaKMN3XXCkoe+0WcexO4CcBVU5DCSUT+7P8JZiWZCbAjSkc9b6Yz2X5DSfQmRCtI/cQRU6TfMYrMQ5NBfdw== + +esbuild-darwin-64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.2.tgz#891a59ce6bc3aded0265f982469b3eb9571b92f8" + integrity sha512-Uq8t0cbJQkxkQdbUfOl2wZqZ/AtLZjvJulR1HHnc96UgyzG9YlCLSDMiqjM+NANEy7/zzvwKJsy3iNC9wwqLJA== + +esbuild-darwin-arm64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.2.tgz#ab834fffa9c612b2901ca1e77e4695d4d8aa63a2" + integrity sha512-619MSa17sr7YCIrUj88KzQu2ESA4jKYtIYfLU/smX6qNgxQt3Y/gzM4s6sgJ4fPQzirvmXgcHv1ZNQAs/Xh48A== + +esbuild-freebsd-64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.2.tgz#f7fc87a83f02de27d5a48472571efa1a432ae86d" + integrity sha512-aP6FE/ZsChZpUV6F3HE3x1Pz0paoYXycJ7oLt06g0G9dhJKknPawXCqQg/WMyD+ldCEZfo7F1kavenPdIT/SGQ== + +esbuild-freebsd-arm64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.2.tgz#bc8758420431106751f3180293cac0b5bc4ce2ee" + integrity sha512-LSm98WTb1QIhyS83+Po0KTpZNdd2XpVpI9ua5rLWqKWbKeNRFwOsjeiuwBaRNc+O32s9oC2ZMefETxHBV6VNkQ== + +esbuild-linux-32@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.2.tgz#0cc2dcd816d6d66e255bc7aeac139b1d04246812" + integrity sha512-8VxnNEyeUbiGflTKcuVc5JEPTqXfsx2O6ABwUbfS1Hp26lYPRPC7pKQK5Dxa0MBejGc50jy7YZae3EGQUQ8EkQ== + +esbuild-linux-64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.2.tgz#c790f739aa75b15c153609ea3457153fbe4db93d" + integrity sha512-4bzMS2dNxOJoFIiHId4w+tqQzdnsch71JJV1qZnbnErSFWcR9lRgpSqWnTTFtv6XM+MvltRzSXC5wQ7AEBY6Hg== + +esbuild-linux-arm64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.2.tgz#96858a1f89ad30274dec780d0e3dd8b5691c6b0c" + integrity sha512-RlIVp0RwJrdtasDF1vTFueLYZ8WuFzxoQ1OoRFZOTyJHCGCNgh7xJIC34gd7B7+RT0CzLBB4LcM5n0LS+hIoww== + +esbuild-linux-arm@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.2.tgz#03e193225afa9b1215d2ec6efe8edf0c03eeed6f" + integrity sha512-PaylahvMHhH8YMfJPMKEqi64qA0Su+d4FNfHKvlKes/2dUe4QxgbwXT9oLVgy8iJdcFMrO7By4R8fS8S0p8aVQ== + +esbuild-linux-mips64le@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.2.tgz#972f218d2cb5125237376d40ad60a6e5356a782c" + integrity sha512-Fdwrq2roFnO5oetIiUQQueZ3+5soCxBSJswg3MvYaXDomj47BN6oAWMZgLrFh1oVrtWrxSDLCJBenYdbm2s+qQ== + +esbuild-linux-ppc64le@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.2.tgz#20b71622ac09142b0e523f633af0829def7fed6b" + integrity sha512-vxptskw8JfCDD9QqpRO0XnsM1osuWeRjPaXX1TwdveLogYsbdFtcuiuK/4FxGiNMUr1ojtnCS2rMPbY8puc5NA== + +esbuild-netbsd-64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.2.tgz#dbd6a25117902ef67aa11d8779dd9c6bca7fbe82" + integrity sha512-I8+LzYK5iSNpspS9eCV9sW67Rj8FgMHimGri4mKiGAmN0pNfx+hFX146rYtzGtewuxKtTsPywWteHx+hPRLDsw== + +esbuild-openbsd-64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.2.tgz#3c5f199eed459b2f88865548394c0b77383d9ca4" + integrity sha512-120HgMe9elidWUvM2E6mMf0csrGwx8sYDqUIJugyMy1oHm+/nT08bTAVXuwYG/rkMIqsEO9AlMxuYnwR6En/3Q== + +esbuild-sunos-64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.2.tgz#900a681db6b76c6a7f60fc28d2bfe5b11698641c" + integrity sha512-Q3xcf9Uyfra9UuCFxoLixVvdigo0daZaKJ97TL2KNA4bxRUPK18wwGUk3AxvgDQZpRmg82w9PnkaNYo7a+24ow== + +esbuild-windows-32@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.2.tgz#61e0ba5bd95b277a55d2b997ac4c04dfe2559220" + integrity sha512-TW7O49tPsrq+N1sW8mb3m24j/iDGa4xzAZH4wHWwoIzgtZAYPKC0hpIhufRRG/LA30bdMChO9pjJZ5mtcybtBQ== + +esbuild-windows-64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.2.tgz#6ab59ef721ff75c682a1c8ae0570dabb637abddb" + integrity sha512-Rym6ViMNmi1E2QuQMWy0AFAfdY0wGwZD73BnzlsQBX5hZBuy/L+Speh7ucUZ16gwsrMM9v86icZUDrSN/lNBKg== + +esbuild-windows-arm64@0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.2.tgz#aca2a4f83d2f0d1592ad4be832ed0045fc888cda" + integrity sha512-ZrLbhr0vX5Em/P1faMnHucjVVWPS+m3tktAtz93WkMZLmbRJevhiW1y4CbulBd2z0MEdXZ6emDa1zFHq5O5bSA== + +esbuild@^0.14.2: + version "0.14.2" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.2.tgz#9c1e1a652549cc33e44885eea42ea2cc6267edc2" + integrity sha512-l076A6o/PIgcyM24s0dWmDI/b8RQf41uWoJu9I0M71CtW/YSw5T5NUeXxs5lo2tFQD+O4CW4nBHJXx3OY5NpXg== optionalDependencies: - esbuild-android-arm64 "0.13.15" - esbuild-darwin-64 "0.13.15" - esbuild-darwin-arm64 "0.13.15" - esbuild-freebsd-64 "0.13.15" - esbuild-freebsd-arm64 "0.13.15" - esbuild-linux-32 "0.13.15" - esbuild-linux-64 "0.13.15" - esbuild-linux-arm "0.13.15" - esbuild-linux-arm64 "0.13.15" - esbuild-linux-mips64le "0.13.15" - esbuild-linux-ppc64le "0.13.15" - esbuild-netbsd-64 "0.13.15" - esbuild-openbsd-64 "0.13.15" - esbuild-sunos-64 "0.13.15" - esbuild-windows-32 "0.13.15" - esbuild-windows-64 "0.13.15" - esbuild-windows-arm64 "0.13.15" + esbuild-android-arm64 "0.14.2" + esbuild-darwin-64 "0.14.2" + esbuild-darwin-arm64 "0.14.2" + esbuild-freebsd-64 "0.14.2" + esbuild-freebsd-arm64 "0.14.2" + esbuild-linux-32 "0.14.2" + esbuild-linux-64 "0.14.2" + esbuild-linux-arm "0.14.2" + esbuild-linux-arm64 "0.14.2" + esbuild-linux-mips64le "0.14.2" + esbuild-linux-ppc64le "0.14.2" + esbuild-netbsd-64 "0.14.2" + esbuild-openbsd-64 "0.14.2" + esbuild-sunos-64 "0.14.2" + esbuild-windows-32 "0.14.2" + esbuild-windows-64 "0.14.2" + esbuild-windows-arm64 "0.14.2" escalade@^3.1.1: version "3.1.1" @@ -4465,17 +4465,17 @@ expect@^26.6.2: jest-message-util "^26.6.2" jest-regex-util "^26.0.0" -expect@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/expect/-/expect-27.3.1.tgz#d0f170b1f5c8a2009bab0beffd4bb94f043e38e7" - integrity sha512-MrNXV2sL9iDRebWPGOGFdPQRl2eDQNu/uhxIMShjjx74T6kC6jFIkmQ6OqXDtevjGUkyB2IT56RzDBqXf/QPCg== +expect@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz#4429b0f7e307771d176de9bdf23229b101db6ef6" + integrity sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" ansi-styles "^5.0.0" - jest-get-type "^27.3.1" - jest-matcher-utils "^27.3.1" - jest-message-util "^27.3.1" - jest-regex-util "^27.0.6" + jest-get-type "^27.4.0" + jest-matcher-utils "^27.4.2" + jest-message-util "^27.4.2" + jest-regex-util "^27.4.0" extend-shallow@^2.0.1: version "2.0.1" @@ -4530,10 +4530,10 @@ extsprintf@^1.2.0: resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== -fast-check@^2.19.0: - version "2.19.0" - resolved "https://registry.npmjs.org/fast-check/-/fast-check-2.19.0.tgz#e87666450e417cd163a564bd546ee763d27c0f19" - integrity sha512-qY4Rc0Nljl2aJx2qgbK3o6wPBjL9QvhKdD/VqJgaKd5ewn8l4ViqgDpUHJq/JkHTBnFKomYYvkFkOYGDVTT8bw== +fast-check@^2.20.0: + version "2.20.0" + resolved "https://registry.npmjs.org/fast-check/-/fast-check-2.20.0.tgz#0c88d8640649e981adb501ef92f90a26dc8bd628" + integrity sha512-tFNjLyPnOUg6iimVxOtoWMJOIyybCo7B8gUGm1yv43jDCQ0hlPUn0fmna/XO/n1yPxn/dxQw3+IygPSbMDiiog== dependencies: pure-rand "^5.0.0" @@ -5177,9 +5177,9 @@ hasha@^5.0.0: type-fest "^0.8.0" "heap@>= 0.2.0": - version "0.2.6" - resolved "https://registry.npmjs.org/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" - integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= + version "0.2.7" + resolved "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" + integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== hosted-git-info@^2.1.4: version "2.8.9" @@ -5835,9 +5835,9 @@ istanbul-lib-source-maps@^4.0.0: source-map "^0.6.1" istanbul-reports@^3.0.2: - version "3.0.5" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.5.tgz#a2580107e71279ea6d661ddede929ffc6d693384" - integrity sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ== + version "3.1.1" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.1.tgz#7085857f17d2441053c6ce5c3b8fdf6882289397" + integrity sha512-q1kvhAXWSsXfMjCdNHNPKZZv94OlspKnoGv+R9RGbnqOOQ0VbNfLFgQDVgi7hHenKsndGq3/o0OBdzDXthWcNw== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -5851,36 +5851,36 @@ jest-changed-files@^26.6.2: execa "^4.0.0" throat "^5.0.0" -jest-changed-files@^27.3.0: - version "27.3.0" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.3.0.tgz#22a02cc2b34583fc66e443171dc271c0529d263c" - integrity sha512-9DJs9garMHv4RhylUMZgbdCJ3+jHSkpL9aaVKp13xtXAD80qLTLrqcDZL1PHA9dYA0bCI86Nv2BhkLpLhrBcPg== +jest-changed-files@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz#da2547ea47c6e6a5f6ed336151bd2075736eb4a5" + integrity sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-27.3.1.tgz#1679e74387cbbf0c6a8b42de963250a6469e0797" - integrity sha512-v1dsM9II6gvXokgqq6Yh2jHCpfg7ZqV4jWY66u7npz24JnhP3NHxI0sKT7+ZMQ7IrOWHYAaeEllOySbDbWsiXw== +jest-circus@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.2.tgz#466f482207ca9f323b78416c28f4d1fa7588159a" + integrity sha512-2ePUSru1BGMyzxsMvRfu+tNb+PW60rUyMLJBfw1Nrh5zC8RoTPfF+zbE0JToU31a6ZVe4nnrNKWYRzlghAbL0A== dependencies: - "@jest/environment" "^27.3.1" - "@jest/test-result" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/environment" "^27.4.2" + "@jest/test-result" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.3.1" + expect "^27.4.2" is-generator-fn "^2.0.0" - jest-each "^27.3.1" - jest-matcher-utils "^27.3.1" - jest-message-util "^27.3.1" - jest-runtime "^27.3.1" - jest-snapshot "^27.3.1" - jest-util "^27.3.1" - pretty-format "^27.3.1" + jest-each "^27.4.2" + jest-matcher-utils "^27.4.2" + jest-message-util "^27.4.2" + jest-runtime "^27.4.2" + jest-snapshot "^27.4.2" + jest-util "^27.4.2" + pretty-format "^27.4.2" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" @@ -5904,21 +5904,21 @@ jest-cli@^26.6.3: prompts "^2.0.1" yargs "^15.4.1" -jest-cli@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-27.3.1.tgz#b576f9d146ba6643ce0a162d782b40152b6b1d16" - integrity sha512-WHnCqpfK+6EvT62me6WVs8NhtbjAS4/6vZJnk7/2+oOr50cwAzG4Wxt6RXX0hu6m1169ZGMlhYYUNeKBXCph/Q== +jest-cli@^27.4.3: + version "27.4.3" + resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.3.tgz#89acba683b9f91c7a5e342e2ea13aa5414836a0d" + integrity sha512-zZSJBXNC/i8UnJPwcKWsqnhGgIF3uoTYP7th32Zej7KNQJdxzOMj+wCfy2Ox3kU7nXErJ36DtYyXDhfiqaiDRw== dependencies: - "@jest/core" "^27.3.1" - "@jest/test-result" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/core" "^27.4.3" + "@jest/test-result" "^27.4.2" + "@jest/types" "^27.4.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.3.1" - jest-util "^27.3.1" - jest-validate "^27.3.1" + jest-config "^27.4.3" + jest-util "^27.4.2" + jest-validate "^27.4.2" prompts "^2.0.1" yargs "^16.2.0" @@ -5946,32 +5946,33 @@ jest-config@^26.6.3: micromatch "^4.0.2" pretty-format "^26.6.2" -jest-config@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-27.3.1.tgz#cb3b7f6aaa8c0a7daad4f2b9573899ca7e09bbad" - integrity sha512-KY8xOIbIACZ/vdYCKSopL44I0xboxC751IX+DXL2+Wx6DKNycyEfV3rryC3BPm5Uq/BBqDoMrKuqLEUNJmMKKg== +jest-config@^27.4.3: + version "27.4.3" + resolved "https://registry.npmjs.org/jest-config/-/jest-config-27.4.3.tgz#7820e08f7526fa3f725423e2f0fa7888ee0ef9c9" + integrity sha512-DQ10HTSqYtC2pO7s9j2jw+li4xUnm2wLYWH2o7K1ftB8NyvToHsXoLlXxtsGh3AW9gUQR6KY/4B7G+T/NswJBw== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.3.1" - "@jest/types" "^27.2.5" - babel-jest "^27.3.1" + "@jest/test-sequencer" "^27.4.2" + "@jest/types" "^27.4.2" + babel-jest "^27.4.2" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-circus "^27.3.1" - jest-environment-jsdom "^27.3.1" - jest-environment-node "^27.3.1" - jest-get-type "^27.3.1" - jest-jasmine2 "^27.3.1" - jest-regex-util "^27.0.6" - jest-resolve "^27.3.1" - jest-runner "^27.3.1" - jest-util "^27.3.1" - jest-validate "^27.3.1" + jest-circus "^27.4.2" + jest-environment-jsdom "^27.4.3" + jest-environment-node "^27.4.2" + jest-get-type "^27.4.0" + jest-jasmine2 "^27.4.2" + jest-regex-util "^27.4.0" + jest-resolve "^27.4.2" + jest-runner "^27.4.3" + jest-util "^27.4.2" + jest-validate "^27.4.2" micromatch "^4.0.4" - pretty-format "^27.3.1" + pretty-format "^27.4.2" + slash "^3.0.0" jest-diff@^26.0.0, jest-diff@^26.6.2: version "26.6.2" @@ -5983,15 +5984,15 @@ jest-diff@^26.0.0, jest-diff@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-diff@^27.0.0, jest-diff@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-27.3.1.tgz#d2775fea15411f5f5aeda2a5e02c2f36440f6d55" - integrity sha512-PCeuAH4AWUo2O5+ksW4pL9v5xJAcIKPUPfIhZBcG1RKv/0+dvaWTQK1Nrau8d67dp65fOqbeMdoil+6PedyEPQ== +jest-diff@^27.0.0, jest-diff@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.2.tgz#786b2a5211d854f848e2dcc1e324448e9481f36f" + integrity sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q== dependencies: chalk "^4.0.0" - diff-sequences "^27.0.6" - jest-get-type "^27.3.1" - pretty-format "^27.3.1" + diff-sequences "^27.4.0" + jest-get-type "^27.4.0" + pretty-format "^27.4.2" jest-docblock@^26.0.0: version "26.0.0" @@ -6000,10 +6001,10 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-docblock@^27.0.6: - version "27.0.6" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.0.6.tgz#cc78266acf7fe693ca462cbbda0ea4e639e4e5f3" - integrity sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA== +jest-docblock@^27.4.0: + version "27.4.0" + resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz#06c78035ca93cbbb84faf8fce64deae79a59f69f" + integrity sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg== dependencies: detect-newline "^3.0.0" @@ -6018,16 +6019,16 @@ jest-each@^26.6.2: jest-util "^26.6.2" pretty-format "^26.6.2" -jest-each@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-27.3.1.tgz#14c56bb4f18dd18dc6bdd853919b5f16a17761ff" - integrity sha512-E4SwfzKJWYcvOYCjOxhZcxwL+AY0uFMvdCOwvzgutJiaiodFjkxQQDxHm8FQBeTqDnSmKsQWn7ldMRzTn2zJaQ== +jest-each@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz#19364c82a692d0d26557642098d1f4619c9ee7d3" + integrity sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" chalk "^4.0.0" - jest-get-type "^27.3.1" - jest-util "^27.3.1" - pretty-format "^27.3.1" + jest-get-type "^27.4.0" + jest-util "^27.4.2" + pretty-format "^27.4.2" jest-environment-jsdom@^26.6.2: version "26.6.2" @@ -6042,17 +6043,17 @@ jest-environment-jsdom@^26.6.2: jest-util "^26.6.2" jsdom "^16.4.0" -jest-environment-jsdom@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.3.1.tgz#63ac36d68f7a9303494df783494856222b57f73e" - integrity sha512-3MOy8qMzIkQlfb3W1TfrD7uZHj+xx8Olix5vMENkj5djPmRqndMaXtpnaZkxmxM+Qc3lo+yVzJjzuXbCcZjAlg== +jest-environment-jsdom@^27.4.3: + version "27.4.3" + resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.3.tgz#74198285f6284888ca9c7486c4e5e67add75aa53" + integrity sha512-x1AUVz3G14LpEJs7KIFUaTINT2n0unOUmvdAby3s/sldUpJJetOJifHo1O/EUQC5fNBowggwJbVulko18y6OWw== dependencies: - "@jest/environment" "^27.3.1" - "@jest/fake-timers" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/environment" "^27.4.2" + "@jest/fake-timers" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" - jest-mock "^27.3.0" - jest-util "^27.3.1" + jest-mock "^27.4.2" + jest-util "^27.4.2" jsdom "^16.6.0" jest-environment-node@^26.6.2: @@ -6067,27 +6068,27 @@ jest-environment-node@^26.6.2: jest-mock "^26.6.2" jest-util "^26.6.2" -jest-environment-node@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.3.1.tgz#af7d0eed04edafb740311b303f3fe7c8c27014bb" - integrity sha512-T89F/FgkE8waqrTSA7/ydMkcc52uYPgZZ6q8OaZgyiZkJb5QNNCF6oPZjH9IfPFfcc9uBWh1574N0kY0pSvTXw== +jest-environment-node@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.2.tgz#bf5586a0924a8d21c13838121ac0941638c7d15e" + integrity sha512-nzTZ5nJ+FabuZPH2YVci7SZIHpvtNRHPt8+vipLkCnAgXGjVzHm7XJWdnNqXbAkExIgiKeVEkVMNZOZE/LeiIg== dependencies: - "@jest/environment" "^27.3.1" - "@jest/fake-timers" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/environment" "^27.4.2" + "@jest/fake-timers" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" - jest-mock "^27.3.0" - jest-util "^27.3.1" + jest-mock "^27.4.2" + jest-util "^27.4.2" jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-get-type@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.3.1.tgz#a8a2b0a12b50169773099eee60a0e6dd11423eff" - integrity sha512-+Ilqi8hgHSAdhlQ3s12CAVNd8H96ZkQBfYoXmArzZnOfAtVAJEiPDBirjByEblvG/4LPJmkL+nBqPO3A1YJAEg== +jest-get-type@^27.4.0: + version "27.4.0" + resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz#7503d2663fffa431638337b3998d39c5e928e9b5" + integrity sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ== jest-haste-map@^26.6.2: version "26.6.2" @@ -6110,21 +6111,21 @@ jest-haste-map@^26.6.2: optionalDependencies: fsevents "^2.1.2" -jest-haste-map@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.3.1.tgz#7656fbd64bf48bda904e759fc9d93e2c807353ee" - integrity sha512-lYfNZIzwPccDJZIyk9Iz5iQMM/MH56NIIcGj7AFU1YyA4ewWFBl8z+YPJuSCRML/ee2cCt2y3W4K3VXPT6Nhzg== +jest-haste-map@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.2.tgz#7fc7d5e568cca704284f4850885b74a0b8b87587" + integrity sha512-foiyAEePORUN2eeJnOtcM1y8qW0ShEd9kTjWVL4sVaMcuCJM6gtHegvYPBRT0mpI/bs4ueThM90+Eoj2ncoNsA== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" - jest-regex-util "^27.0.6" - jest-serializer "^27.0.6" - jest-util "^27.3.1" - jest-worker "^27.3.1" + jest-regex-util "^27.4.0" + jest-serializer "^27.4.0" + jest-util "^27.4.2" + jest-worker "^27.4.2" micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: @@ -6154,28 +6155,28 @@ jest-jasmine2@^26.6.3: pretty-format "^26.6.2" throat "^5.0.0" -jest-jasmine2@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.3.1.tgz#df6d3d07c7dafc344feb43a0072a6f09458d32b0" - integrity sha512-WK11ZUetDQaC09w4/j7o4FZDUIp+4iYWH/Lik34Pv7ukL+DuXFGdnmmi7dT58J2ZYKFB5r13GyE0z3NPeyJmsg== +jest-jasmine2@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.2.tgz#c956c88b9c05ca22afdc779deebc2890cb891797" + integrity sha512-VO/fyAJSH9u0THjbteFiL8qc93ufU+yW+bdieDc8tzTCWwlWzO53UHS5nFK1qmE8izb5Smkn+XHlVt6/l06MKQ== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.3.1" - "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/environment" "^27.4.2" + "@jest/source-map" "^27.4.0" + "@jest/test-result" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.3.1" + expect "^27.4.2" is-generator-fn "^2.0.0" - jest-each "^27.3.1" - jest-matcher-utils "^27.3.1" - jest-message-util "^27.3.1" - jest-runtime "^27.3.1" - jest-snapshot "^27.3.1" - jest-util "^27.3.1" - pretty-format "^27.3.1" + jest-each "^27.4.2" + jest-matcher-utils "^27.4.2" + jest-message-util "^27.4.2" + jest-runtime "^27.4.2" + jest-snapshot "^27.4.2" + jest-util "^27.4.2" + pretty-format "^27.4.2" throat "^6.0.1" jest-junit@^13.0.0: @@ -6196,13 +6197,13 @@ jest-leak-detector@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-leak-detector@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.3.1.tgz#7fb632c2992ef707a1e73286e1e704f9cc1772b2" - integrity sha512-78QstU9tXbaHzwlRlKmTpjP9k4Pvre5l0r8Spo4SbFFVy/4Abg9I6ZjHwjg2QyKEAMg020XcjP+UgLZIY50yEg== +jest-leak-detector@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz#7fc3120893a7a911c553f3f2bdff9faa4454abbb" + integrity sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw== dependencies: - jest-get-type "^27.3.1" - pretty-format "^27.3.1" + jest-get-type "^27.4.0" + pretty-format "^27.4.2" jest-matcher-utils@^26.6.2: version "26.6.2" @@ -6214,15 +6215,15 @@ jest-matcher-utils@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-matcher-utils@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.3.1.tgz#257ad61e54a6d4044e080d85dbdc4a08811e9c1c" - integrity sha512-hX8N7zXS4k+8bC1Aj0OWpGb7D3gIXxYvPNK1inP5xvE4ztbz3rc4AkI6jGVaerepBnfWB17FL5lWFJT3s7qo8w== +jest-matcher-utils@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.2.tgz#d17c5038607978a255e0a9a5c32c24e984b6c60b" + integrity sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ== dependencies: chalk "^4.0.0" - jest-diff "^27.3.1" - jest-get-type "^27.3.1" - pretty-format "^27.3.1" + jest-diff "^27.4.2" + jest-get-type "^27.4.0" + pretty-format "^27.4.2" jest-message-util@^26.6.2: version "26.6.2" @@ -6239,18 +6240,18 @@ jest-message-util@^26.6.2: slash "^3.0.0" stack-utils "^2.0.2" -jest-message-util@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.3.1.tgz#f7c25688ad3410ab10bcb862bcfe3152345c6436" - integrity sha512-bh3JEmxsTZ/9rTm0jQrPElbY2+y48Rw2t47uMfByNyUVR+OfPh4anuyKsGqsNkXk/TI4JbLRZx+7p7Hdt6q1yg== +jest-message-util@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz#07f3f1bf207d69cf798ce830cc57f1a849f99388" + integrity sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.4" - pretty-format "^27.3.1" + pretty-format "^27.4.2" slash "^3.0.0" stack-utils "^2.0.3" @@ -6262,12 +6263,12 @@ jest-mock@^26.6.2: "@jest/types" "^26.6.2" "@types/node" "*" -jest-mock@^27.3.0: - version "27.3.0" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.3.0.tgz#ddf0ec3cc3e68c8ccd489bef4d1f525571a1b867" - integrity sha512-ziZiLk0elZOQjD08bLkegBzv5hCABu/c8Ytx45nJKkysQwGaonvmTxwjLqEA4qGdasq9o2I8/HtdGMNnVsMTGw== +jest-mock@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz#184ff197a25491bfe4570c286daa5d62eb760b88" + integrity sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -6280,10 +6281,10 @@ jest-regex-util@^26.0.0: resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-regex-util@^27.0.6: - version "27.0.6" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" - integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== +jest-regex-util@^27.4.0: + version "27.4.0" + resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz#e4c45b52653128843d07ad94aec34393ea14fbca" + integrity sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg== jest-resolve-dependencies@^26.6.3: version "26.6.3" @@ -6294,14 +6295,14 @@ jest-resolve-dependencies@^26.6.3: jest-regex-util "^26.0.0" jest-snapshot "^26.6.2" -jest-resolve-dependencies@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.3.1.tgz#85b99bdbdfa46e2c81c6228fc4c91076f624f6e2" - integrity sha512-X7iLzY8pCiYOnvYo2YrK3P9oSE8/3N2f4pUZMJ8IUcZnT81vlSonya1KTO9ZfKGuC+svE6FHK/XOb8SsoRUV1A== +jest-resolve-dependencies@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.2.tgz#2f4f363cca26f75a22aefd496f9c7ae65b3de37f" + integrity sha512-hb++cTpqvOWfU49MCP/JQkxmnrhKoAVqXWFjgYXswRSVGk8Q6bDTSvhbCeYXDtXaymY0y7WrrSIlKogClcKJuw== dependencies: - "@jest/types" "^27.2.5" - jest-regex-util "^27.0.6" - jest-snapshot "^27.3.1" + "@jest/types" "^27.4.2" + jest-regex-util "^27.4.0" + jest-snapshot "^27.4.2" jest-resolve@^26.6.2: version "26.6.2" @@ -6317,18 +6318,18 @@ jest-resolve@^26.6.2: resolve "^1.18.1" slash "^3.0.0" -jest-resolve@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.3.1.tgz#0e5542172a1aa0270be6f66a65888647bdd74a3e" - integrity sha512-Dfzt25CFSPo3Y3GCbxynRBZzxq9AdyNN+x/v2IqYx6KVT5Z6me2Z/PsSGFSv3cOSUZqJ9pHxilao/I/m9FouLw== +jest-resolve@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.2.tgz#d3e4cbee7acb4a4f8c8bfc270767bec34d2aefaf" + integrity sha512-d/zqPjxCzMqHlOdRTg8cTpO9jY+1/T74KazT8Ws/LwmwxV5sRMWOkiLjmzUCDj/5IqA5XHNK4Hkmlq9Kdpb9Sg== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" chalk "^4.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.3.1" + jest-haste-map "^27.4.2" jest-pnp-resolver "^1.2.2" - jest-util "^27.3.1" - jest-validate "^27.3.1" + jest-util "^27.4.2" + jest-validate "^27.4.2" resolve "^1.20.0" resolve.exports "^1.1.0" slash "^3.0.0" @@ -6359,31 +6360,31 @@ jest-runner@^26.6.3: source-map-support "^0.5.6" throat "^5.0.0" -jest-runner@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-27.3.1.tgz#1d594dcbf3bd8600a7e839e790384559eaf96e3e" - integrity sha512-r4W6kBn6sPr3TBwQNmqE94mPlYVn7fLBseeJfo4E2uCTmAyDFm2O5DYAQAFP7Q3YfiA/bMwg8TVsciP7k0xOww== +jest-runner@^27.4.3: + version "27.4.3" + resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.3.tgz#9f05d4733829787778e8a143ade913834d0828dc" + integrity sha512-JgR6Om/j22Fd6ZUUIGTWNcCtuZVYbNrecb4k89W4UyFJoRtHpo2zMKWkmFFFJoqwWGrfrcPLnVBIgkJiTV3cyA== dependencies: - "@jest/console" "^27.3.1" - "@jest/environment" "^27.3.1" - "@jest/test-result" "^27.3.1" - "@jest/transform" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/console" "^27.4.2" + "@jest/environment" "^27.4.2" + "@jest/test-result" "^27.4.2" + "@jest/transform" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-docblock "^27.0.6" - jest-environment-jsdom "^27.3.1" - jest-environment-node "^27.3.1" - jest-haste-map "^27.3.1" - jest-leak-detector "^27.3.1" - jest-message-util "^27.3.1" - jest-resolve "^27.3.1" - jest-runtime "^27.3.1" - jest-util "^27.3.1" - jest-worker "^27.3.1" + jest-docblock "^27.4.0" + jest-environment-jsdom "^27.4.3" + jest-environment-node "^27.4.2" + jest-haste-map "^27.4.2" + jest-leak-detector "^27.4.2" + jest-message-util "^27.4.2" + jest-resolve "^27.4.2" + jest-runtime "^27.4.2" + jest-util "^27.4.2" + jest-worker "^27.4.2" source-map-support "^0.5.6" throat "^6.0.1" @@ -6420,18 +6421,18 @@ jest-runtime@^26.6.3: strip-bom "^4.0.0" yargs "^15.4.1" -jest-runtime@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.3.1.tgz#80fa32eb85fe5af575865ddf379874777ee993d7" - integrity sha512-qtO6VxPbS8umqhEDpjA4pqTkKQ1Hy4ZSi9mDVeE9Za7LKBo2LdW2jmT+Iod3XFaJqINikZQsn2wEi0j9wPRbLg== - dependencies: - "@jest/console" "^27.3.1" - "@jest/environment" "^27.3.1" - "@jest/globals" "^27.3.1" - "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.3.1" - "@jest/transform" "^27.3.1" - "@jest/types" "^27.2.5" +jest-runtime@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.2.tgz#d72da8a0e97366c16ad515a2c437191a72600d38" + integrity sha512-eqPgcBaUNaw6j8T5M+dnfAEh6MIrh2YmtskCr9sl50QYpD22Sg+QqHw3J3nmaLzVMbBtOMHFFxLF0Qx8MsZVFQ== + dependencies: + "@jest/console" "^27.4.2" + "@jest/environment" "^27.4.2" + "@jest/globals" "^27.4.2" + "@jest/source-map" "^27.4.0" + "@jest/test-result" "^27.4.2" + "@jest/transform" "^27.4.2" + "@jest/types" "^27.4.2" "@types/yargs" "^16.0.0" chalk "^4.0.0" cjs-module-lexer "^1.0.0" @@ -6440,14 +6441,14 @@ jest-runtime@^27.3.1: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-haste-map "^27.3.1" - jest-message-util "^27.3.1" - jest-mock "^27.3.0" - jest-regex-util "^27.0.6" - jest-resolve "^27.3.1" - jest-snapshot "^27.3.1" - jest-util "^27.3.1" - jest-validate "^27.3.1" + jest-haste-map "^27.4.2" + jest-message-util "^27.4.2" + jest-mock "^27.4.2" + jest-regex-util "^27.4.0" + jest-resolve "^27.4.2" + jest-snapshot "^27.4.2" + jest-util "^27.4.2" + jest-validate "^27.4.2" slash "^3.0.0" strip-bom "^4.0.0" yargs "^16.2.0" @@ -6460,10 +6461,10 @@ jest-serializer@^26.6.2: "@types/node" "*" graceful-fs "^4.2.4" -jest-serializer@^27.0.6: - version "27.0.6" - resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.0.6.tgz#93a6c74e0132b81a2d54623251c46c498bb5bec1" - integrity sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA== +jest-serializer@^27.4.0: + version "27.4.0" + resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz#34866586e1cae2388b7d12ffa2c7819edef5958a" + integrity sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ== dependencies: "@types/node" "*" graceful-fs "^4.2.4" @@ -6490,10 +6491,10 @@ jest-snapshot@^26.6.2: pretty-format "^26.6.2" semver "^7.3.2" -jest-snapshot@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.3.1.tgz#1da5c0712a252d70917d46c037054f5918c49ee4" - integrity sha512-APZyBvSgQgOT0XumwfFu7X3G5elj6TGhCBLbBdn3R1IzYustPGPE38F51dBWMQ8hRXa9je0vAdeVDtqHLvB6lg== +jest-snapshot@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.2.tgz#bd1ea04a8fab402e5ab18b788809fa597ddff532" + integrity sha512-DI7lJlNIu6WSQ+esqhnJzEzU70+dV+cNjoF1c+j5FagWEd3KtOyZvVliAH0RWNQ6KSnAAnKSU0qxJ8UXOOhuUQ== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -6501,23 +6502,23 @@ jest-snapshot@^27.3.1: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/transform" "^27.4.2" + "@jest/types" "^27.4.2" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.3.1" + expect "^27.4.2" graceful-fs "^4.2.4" - jest-diff "^27.3.1" - jest-get-type "^27.3.1" - jest-haste-map "^27.3.1" - jest-matcher-utils "^27.3.1" - jest-message-util "^27.3.1" - jest-resolve "^27.3.1" - jest-util "^27.3.1" + jest-diff "^27.4.2" + jest-get-type "^27.4.0" + jest-haste-map "^27.4.2" + jest-matcher-utils "^27.4.2" + jest-message-util "^27.4.2" + jest-resolve "^27.4.2" + jest-util "^27.4.2" natural-compare "^1.4.0" - pretty-format "^27.3.1" + pretty-format "^27.4.2" semver "^7.3.2" jest-util@^26.6.2: @@ -6532,12 +6533,12 @@ jest-util@^26.6.2: is-ci "^2.0.0" micromatch "^4.0.2" -jest-util@^27.0.0, jest-util@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-27.3.1.tgz#a58cdc7b6c8a560caac9ed6bdfc4e4ff23f80429" - integrity sha512-8fg+ifEH3GDryLQf/eKZck1DEs2YuVPBCMOaHQxVVLmQwl/CDhWzrvChTX4efLZxGrw+AA0mSXv78cyytBt/uw== +jest-util@^27.0.0, jest-util@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz#ed95b05b1adfd761e2cda47e0144c6a58e05a621" + integrity sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" @@ -6556,17 +6557,17 @@ jest-validate@^26.6.2: leven "^3.1.0" pretty-format "^26.6.2" -jest-validate@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-27.3.1.tgz#3a395d61a19cd13ae9054af8cdaf299116ef8a24" - integrity sha512-3H0XCHDFLA9uDII67Bwi1Vy7AqwA5HqEEjyy934lgVhtJ3eisw6ShOF1MDmRPspyikef5MyExvIm0/TuLzZ86Q== +jest-validate@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz#eecfcc1b1c9429aa007da08a2bae4e32a81bbbc3" + integrity sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.3.1" + jest-get-type "^27.4.0" leven "^3.1.0" - pretty-format "^27.3.1" + pretty-format "^27.4.2" jest-watcher@^26.6.2: version "26.6.2" @@ -6581,17 +6582,17 @@ jest-watcher@^26.6.2: jest-util "^26.6.2" string-length "^4.0.1" -jest-watcher@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.3.1.tgz#ba5e0bc6aa843612b54ddb7f009d1cbff7e05f3e" - integrity sha512-9/xbV6chABsGHWh9yPaAGYVVKurWoP3ZMCv6h+O1v9/+pkOroigs6WzZ0e9gLP/njokUwM7yQhr01LKJVMkaZA== +jest-watcher@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz#c9037edfd80354c9fe90de4b6f8b6e2b8e736744" + integrity sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg== dependencies: - "@jest/test-result" "^27.3.1" - "@jest/types" "^27.2.5" + "@jest/test-result" "^27.4.2" + "@jest/types" "^27.4.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.3.1" + jest-util "^27.4.2" string-length "^4.0.1" jest-worker@^26.6.2: @@ -6603,10 +6604,10 @@ jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -jest-worker@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.3.1.tgz#0def7feae5b8042be38479799aeb7b5facac24b2" - integrity sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g== +jest-worker@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz#0fb123d50955af1a450267787f340a1bf7e12bc4" + integrity sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag== dependencies: "@types/node" "*" merge-stream "^2.0.0" @@ -6621,14 +6622,14 @@ jest@^26.6.3: import-local "^3.0.2" jest-cli "^26.6.3" -jest@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/jest/-/jest-27.3.1.tgz#b5bab64e8f56b6f7e275ba1836898b0d9f1e5c8a" - integrity sha512-U2AX0AgQGd5EzMsiZpYt8HyZ+nSVIh5ujQ9CPp9EQZJMjXIiSZpJNweZl0swatKRoqHWgGKM3zaSwm4Zaz87ng== +jest@^27.3.1, jest@^27.4.3: + version "27.4.3" + resolved "https://registry.npmjs.org/jest/-/jest-27.4.3.tgz#cf7d1876a84c70efece2e01e4f9dfc2e464d9cbb" + integrity sha512-jwsfVABBzuN3Atm+6h6vIEpTs9+VApODLt4dk2qv1WMOpb1weI1IIZfuwpMiWZ62qvWj78MvdvMHIYdUfqrFaA== dependencies: - "@jest/core" "^27.3.1" + "@jest/core" "^27.4.3" import-local "^3.0.2" - jest-cli "^27.3.1" + jest-cli "^27.4.3" jmespath@0.15.0: version "0.15.0" @@ -6703,73 +6704,73 @@ jsesc@^2.5.1: resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsii-diff@^1.46.0: - version "1.46.0" - resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.46.0.tgz#bda23c721e58aefd15991cd72351ea92af165dd6" - integrity sha512-8xAvCrwxtTwhxM01H/0qHPg+ROC3Qf8F35kNOQ4o0tsjI+Myda5G7ZTTRJvdZMvfoeN8moNhHi8voDi/+2uTzQ== +jsii-diff@^1.47.0: + version "1.47.0" + resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.47.0.tgz#c8803539c34000763b3181d8149e19b950de1791" + integrity sha512-n+/AqWjNMWL3Jqpfk1tsv3zS+ptPpM3zQAlyl8d76B+iyUOPdR7hgMzUZVUbqY2lKHaMAP2pIlh3AZWZ9tyS+Q== dependencies: - "@jsii/check-node" "1.46.0" - "@jsii/spec" "^1.46.0" + "@jsii/check-node" "1.47.0" + "@jsii/spec" "^1.47.0" fs-extra "^9.1.0" - jsii-reflect "^1.46.0" + jsii-reflect "^1.47.0" log4js "^6.3.0" typescript "~3.9.10" yargs "^16.2.0" -jsii-pacmak@^1.46.0: - version "1.46.0" - resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.46.0.tgz#24c9a27dd280bf5ad66bc2c77c116a438ec1cb10" - integrity sha512-2nVdi3lv8IDFKyfYKtBPGBJVMB1wB/6/TZKqz7VIXFdBUHDYb8Z+wjfwhvOW9aiP07/YD357TTTMS7qKUNopew== +jsii-pacmak@^1.47.0: + version "1.47.0" + resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.47.0.tgz#82e687b5444847d79f1030b9ef480b68b63c0e91" + integrity sha512-VGrHZsK2jv7NuPBULvJBJGF0hLpGwdJa7esI2qzOeX1UbHxXSOah9oboheYELbX5KCH3hSe2uDbcPSnEqIT68Q== dependencies: - "@jsii/check-node" "1.46.0" - "@jsii/spec" "^1.46.0" + "@jsii/check-node" "1.47.0" + "@jsii/spec" "^1.47.0" clone "^2.1.2" - codemaker "^1.46.0" + codemaker "^1.47.0" commonmark "^0.30.0" escape-string-regexp "^4.0.0" fs-extra "^9.1.0" - jsii-reflect "^1.46.0" - jsii-rosetta "^1.46.0" + jsii-reflect "^1.47.0" + jsii-rosetta "^1.47.0" semver "^7.3.5" spdx-license-list "^6.4.0" xmlbuilder "^15.1.1" yargs "^16.2.0" -jsii-reflect@1.46.0, jsii-reflect@^1.46.0: - version "1.46.0" - resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.46.0.tgz#8e897105b4cc9a7b3370821bccd27f6ac5e67d5d" - integrity sha512-wiVKwnxVcgrC1LJGR43AKaTbBqI7Ybkr+i9RQKFwGM/PTDG1BfIMzCFc/sLLyyQ/Ba8E0uZ8UfglBm/9H1GSVw== +jsii-reflect@1.47.0, jsii-reflect@^1.47.0: + version "1.47.0" + resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.47.0.tgz#db68dc4b64b0e0d3f4f2cdd69cef82ba623f4dac" + integrity sha512-UgRWqkPI03wB6dGrTPA9UqUa37ORAnvaHGthWxNTcHIGIRHb4EfM29lYdbsRYO/+4/OiQLvdnZno1kw5rMyYcw== dependencies: - "@jsii/check-node" "1.46.0" - "@jsii/spec" "^1.46.0" + "@jsii/check-node" "1.47.0" + "@jsii/spec" "^1.47.0" colors "^1.4.0" fs-extra "^9.1.0" - oo-ascii-tree "^1.46.0" + oo-ascii-tree "^1.47.0" yargs "^16.2.0" -jsii-rosetta@1.46.0, jsii-rosetta@^1.46.0: - version "1.46.0" - resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.46.0.tgz#ce832f160ffd3c1566bba8764a8ad956cb260344" - integrity sha512-EyGFTMcSiLw03aCcDmN8tjwIJ2+XbW7LZJiq8VkyHoKdMz6urHKtYGZTNDns9iNH2/WxfjFRt+d3S9tYi2AfRw== +jsii-rosetta@1.47.0, jsii-rosetta@^1.47.0: + version "1.47.0" + resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.47.0.tgz#0b886fc70446d7148e5a3d797643fd3e18e2f920" + integrity sha512-2XyGNsTOr027bRhDuVy0Ygfkg3/u0jV7F5jvpGWq8lbl0yw90mgfi7epQxFfcFZ7zYgEIx5pXfC5UInl/Ntaqw== dependencies: - "@jsii/check-node" "1.46.0" - "@jsii/spec" "1.46.0" + "@jsii/check-node" "1.47.0" + "@jsii/spec" "1.47.0" "@xmldom/xmldom" "^0.7.5" commonmark "^0.30.0" fs-extra "^9.1.0" - jsii "1.46.0" + jsii "1.47.0" sort-json "^2.0.0" typescript "~3.9.10" workerpool "^6.1.5" yargs "^16.2.0" -jsii@1.46.0, jsii@^1.46.0: - version "1.46.0" - resolved "https://registry.npmjs.org/jsii/-/jsii-1.46.0.tgz#c36294a8fa24c309b94f7bf40d91d72caac594a5" - integrity sha512-PuO7cwz3XDBOMIVKJ822GtJeq9wAu/7S8/Xqn2BuvBjGHaAxksCYR7MEOnhOK9Kj2y43fBGXo0MtHx4eZOHIEg== +jsii@1.47.0, jsii@^1.47.0: + version "1.47.0" + resolved "https://registry.npmjs.org/jsii/-/jsii-1.47.0.tgz#79b85c7e90098f93863e9a38eca1a4c42a382aaa" + integrity sha512-cJ1cQfanSl+0vLVRJTwaWdx0dZ4DxIxYhydRlhuv/EFbQzeAVosy6fEnZ5IlPtWR89tF3k89R6w8DHVhPigjjQ== dependencies: - "@jsii/check-node" "1.46.0" - "@jsii/spec" "^1.46.0" + "@jsii/check-node" "1.47.0" + "@jsii/spec" "^1.47.0" case "^1.6.3" colors "^1.4.0" deep-equal "^2.0.5" @@ -6811,10 +6812,10 @@ json-schema-traverse@^1.0.0: resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" @@ -6872,13 +6873,13 @@ jsonschema@^1.4.0: integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + version "1.4.2" + resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: assert-plus "1.0.0" extsprintf "1.3.0" - json-schema "0.2.3" + json-schema "0.4.0" verror "1.10.0" jszip@^3.7.1: @@ -7762,11 +7763,6 @@ node-int64@^0.4.0: resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= -node-modules-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" - integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= - node-notifier@^8.0.0: version "8.0.2" resolved "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz#f3167a38ef0d2c8a866a83e318c1ba0efeb702c5" @@ -8018,9 +8014,9 @@ object-copy@^0.1.0: kind-of "^3.0.3" object-inspect@^1.11.0, object-inspect@^1.9.0: - version "1.11.0" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== + version "1.11.1" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.1.tgz#d4bd7d7de54b9a75599f59a00bd698c1f1c6549b" + integrity sha512-If7BjFlpkzzBeV1cqgT3OSWT3azyoxDGajR+iGnFBfVV2EWyDyWaZZW2ERDjUaY2QM8i5jI3Sj7mhsM4DDAqWA== object-is@^1.1.4: version "1.1.5" @@ -8096,10 +8092,10 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.46.0: - version "1.46.0" - resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.46.0.tgz#416eddb004561e21493bbee5b35022e671590507" - integrity sha512-OhOxq9sLUGDAZOs2Vxr2ih3Su0EDPntcBa0zWvc9XJcjlyd3z/J3C/Gr7eVJOTynCu8iNftzyyXuqkZWjMv8Mw== +oo-ascii-tree@^1.47.0: + version "1.47.0" + resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.47.0.tgz#dd715c88186d9c0bf5e9410ce5e254794e8e7dbc" + integrity sha512-m8ZGdK0JSMFOZyjV0kkzBwcbPMGqW5WhCYp4CgPrJz4/y128hwhWGB8x4G7b5CAKRNo583y51kL0UCklaxt1Nw== open@^7.4.2: version "7.4.2" @@ -8502,11 +8498,9 @@ pify@^5.0.0: integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== pirates@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" - integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== - dependencies: - node-modules-regexp "^1.0.0" + version "4.0.4" + resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz#07df81e61028e402735cdd49db701e4885b4e6e6" + integrity sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw== pkg-dir@^2.0.0: version "2.0.0" @@ -8547,12 +8541,12 @@ pretty-format@^26.0.0, pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -pretty-format@^27.0.0, pretty-format@^27.3.1: - version "27.3.1" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-27.3.1.tgz#7e9486365ccdd4a502061fa761d3ab9ca1b78df5" - integrity sha512-DR/c+pvFc52nLimLROYjnXPtolawm+uWDxr4FjuLDLUn+ktWnSN851KoHwHzzqq6rfCOjkzN8FLgDrSub6UDuA== +pretty-format@^27.0.0, pretty-format@^27.4.2: + version "27.4.2" + resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.2.tgz#e4ce92ad66c3888423d332b40477c87d1dac1fb8" + integrity sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw== dependencies: - "@jest/types" "^27.2.5" + "@jest/types" "^27.4.2" ansi-regex "^5.0.1" ansi-styles "^5.0.0" react-is "^17.0.1" @@ -8691,9 +8685,9 @@ q@^1.5.1: integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= qs@^6.9.4: - version "6.10.1" - resolved "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" - integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + version "6.10.2" + resolved "https://registry.npmjs.org/qs/-/qs-6.10.2.tgz#c1431bea37fc5b24c5bdbafa20f16bdf2a4b9ffe" + integrity sha512-mSIdjzqznWgfd4pMii7sHtaYF8rx8861hBO80SraY5GT0XQibWZWJSid0avzHGkDIZLImux2S5mXO0Hfct2QCw== dependencies: side-channel "^1.0.4" @@ -9119,9 +9113,9 @@ safe-regex@^1.1.0: ret "~0.1.10" safe-stable-stringify@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.2.0.tgz#26a52f13a6988de16a0d88e20248f38e8a7d840c" - integrity sha512-C6AuMdYPuPV/P1leplHNu0lgc2LAElq/g3TdoksDCIVtBhr78o/CH03bt/9SKqugFbKU9CUjsNlCu0fjtQzQUw== + version "2.3.1" + resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz#ab67cbe1fe7d40603ca641c5e765cb942d04fc73" + integrity sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg== "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" @@ -9737,10 +9731,10 @@ symbol-tree@^3.2.4: resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table@*, table@^6.0.9, table@^6.7.3: - version "6.7.3" - resolved "https://registry.npmjs.org/table/-/table-6.7.3.tgz#255388439715a738391bd2ee4cbca89a4d05a9b7" - integrity sha512-5DkIxeA7XERBqMwJq0aHZOdMadBx4e6eDoFRuyT5VR82J0Ycg2DwM6GfA/EQAhJ+toRTaS1lIdSQCqgrmhPnlw== +table@*, table@^6.0.9, table@^6.7.5: + version "6.7.5" + resolved "https://registry.npmjs.org/table/-/table-6.7.5.tgz#f04478c351ef3d8c7904f0e8be90a1b62417d238" + integrity sha512-LFNeryOqiQHqCVKzhkymKwt6ozeRhlm8IL1mE8rNUurkir4heF6PzMyRgaTa4tlyPTGGgXuvVOF/OLWiH09Lqw== dependencies: ajv "^8.0.1" lodash.truncate "^4.4.2" @@ -9963,10 +9957,10 @@ trim-newlines@^3.0.0: resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -ts-jest@^27.0.7: - version "27.0.7" - resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-27.0.7.tgz#fb7c8c8cb5526ab371bc1b23d06e745652cca2d0" - integrity sha512-O41shibMqzdafpuP+CkrOL7ykbmLh+FqQrXEmV9CydQ5JBk0Sj0uAEF5TNNe94fZWKm3yYvWa/IbyV4Yg1zK2Q== +ts-jest@^27.1.1: + version "27.1.1" + resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.1.tgz#5a54aca96db1dac37c681f3029dd10f3a8c36192" + integrity sha512-Ds0VkB+cB+8g2JUmP/GKWndeZcCKrbe6jzolGrVWdqVUFByY/2KDHqxJ7yBSon7hDB1TA4PXxjfZ+JjzJisvgA== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" @@ -10151,9 +10145,9 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.14.3" - resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.3.tgz#c0f25dfea1e8e5323eccf59610be08b6043c15cf" - integrity sha512-mic3aOdiq01DuSVx0TseaEzMIVqebMZ0Z3vaeDhFEh9bsc24hV1TFvN74reA2vs08D0ZWfNjAcJ3UbVLaBss+g== + version "3.14.4" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.4.tgz#68756f17d1b90b9d289341736cb9a567d6882f90" + integrity sha512-AbiSR44J0GoCeV81+oxcy/jDOElO2Bx3d0MfQCUShq7JRXaM4KtQopZsq2vFv8bCq2yMaGrw1FgygUd03RyRDA== uid-number@0.0.6: version "0.0.6" @@ -10684,6 +10678,11 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^21.0.0: + version "21.0.0" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz#a485d3966be4317426dd56bdb6a30131b281dc55" + integrity sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA== + yargs@^15.0.2, yargs@^15.4.1: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -10715,17 +10714,17 @@ yargs@^16.0.0, yargs@^16.2.0: yargs-parser "^20.2.2" yargs@^17.1.1: - version "17.2.1" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" - integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== + version "17.3.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.3.0.tgz#295c4ffd0eef148ef3e48f7a2e0f58d0e4f26b1c" + integrity sha512-GQl1pWyDoGptFPJx9b9L6kmR33TGusZvXIZUT+BOz9f7X2L94oeAskFYLEg/FkhV06zZPBYLvLZRWeYId29lew== dependencies: cliui "^7.0.2" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" - string-width "^4.2.0" + string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^20.2.2" + yargs-parser "^21.0.0" yn@3.1.1: version "3.1.1"