Skip to content

Commit 4255b23

Browse files
authored
fix(kinesisanalytics): deprecate using KinesisAnalyticsV2 from aws-kinesisanalytics, use aws-kinesisanalyticsv2 instead (#35519)
### Reason for this change Sometimes services introduces a `V2` version of their APIs and CloudFormation resources. In the past we had thought it's a good idea if `KinesisAnalyticsV2` constructs would just be included in the original `aws-kinesisanalytics` module. However since then we have come to a different view and think it's better to strictly follow what the services are doing. As of today `KinesisAnalyticsV2` is the only service that got this treatment. We now want to clearly indicate that this is not supported and deprecate the usage from within the "V1" module. ### Description of changes Update the `spec2cdk` package to allow services being deprecated. I've also changed the suffix handling to be explicit instead of computed when reading from a service map. Given that we only have that one module with multiple services, this seems prudent. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes All existing tests pass. `jsii-diff` reports no issues. Test case added for codegen of deprecated service. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent b3ad6f9 commit 4255b23

File tree

13 files changed

+1174
-315
lines changed

13 files changed

+1174
-315
lines changed

packages/aws-cdk-lib/scripts/gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ async function main() {
3232
async function writeScopeMap(modules: ModuleMap) {
3333
const newScopeMap = Object.entries(modules)
3434
.sort(([modA], [modB]) => modA.localeCompare(modB))
35-
.reduce((accum, [moduleName, { scopes }]) => {
35+
.reduce((scopeMap, [moduleName, { scopes }]) => {
3636
return {
37-
...accum,
37+
...scopeMap,
3838
[moduleName]: scopes,
3939
};
4040
}, {});

0 commit comments

Comments
 (0)