diff --git a/CHANGELOG.md b/CHANGELOG.md index dc314e3354418..6b6096290abec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,46 @@ 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.141.0](https://github.com/aws/aws-cdk/compare/v1.140.0...v1.141.0) (2022-01-27) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **servicecatalog:** `TagOptions` now have `scope` and `props` argument in constructor, and data is now passed via a `allowedValueForTags` field in props + +### Features + +* **assertions:** support assertions on stack messages ([#18521](https://github.com/aws/aws-cdk/issues/18521)) ([cb86e30](https://github.com/aws/aws-cdk/commit/cb86e30391aefdda13e6b0d4b3be2fedf76477c8)), closes [#18347](https://github.com/aws/aws-cdk/issues/18347) +* **assertions:** support for conditions ([#18577](https://github.com/aws/aws-cdk/issues/18577)) ([55ff1b2](https://github.com/aws/aws-cdk/commit/55ff1b2e69f1b42bbbecd9dc95e17f2ffc35f94e)), closes [#18560](https://github.com/aws/aws-cdk/issues/18560) +* **aws-ecs-patterns:** adding support for custom HealthCheck while creating QueueProcessingFargateService ([#18219](https://github.com/aws/aws-cdk/issues/18219)) ([0ca81a1](https://github.com/aws/aws-cdk/commit/0ca81a118d3d54b87d2d05a53fb72e4efe03b591)), closes [#15636](https://github.com/aws/aws-cdk/issues/15636) +* **certificatemanager:** DnsValidatedCertificate DNS record cleanup ([#18311](https://github.com/aws/aws-cdk/issues/18311)) ([36d356d](https://github.com/aws/aws-cdk/commit/36d356d0b3e422f7451f4b0dd2f971aa0378210e)), closes [#3333](https://github.com/aws/aws-cdk/issues/3333) [#7063](https://github.com/aws/aws-cdk/issues/7063) +* **cfnspec:** cloudformation spec v53.1.0 ([#18588](https://github.com/aws/aws-cdk/issues/18588)) ([a283a48](https://github.com/aws/aws-cdk/commit/a283a482dead64e94383ba21cc7908f10c4459a2)) +* **cfnspec:** cloudformation spec v53.1.0 ([#18658](https://github.com/aws/aws-cdk/issues/18658)) ([2eda19e](https://github.com/aws/aws-cdk/commit/2eda19e510374426190531810cff518d582644ad)) +* **ec2:** session timeout and login banner for client vpn endpoint ([#18590](https://github.com/aws/aws-cdk/issues/18590)) ([7294118](https://github.com/aws/aws-cdk/commit/72941180a7188e5560a58f1509554ef038544ec4)) +* **ecs:** add `BaseService.fromServiceArnWithCluster()` for use in CodePipeline ([#18530](https://github.com/aws/aws-cdk/issues/18530)) ([3d192a9](https://github.com/aws/aws-cdk/commit/3d192a9a832857cb246d719a68b4b8f40d807fed)) +* **iotevents:** add DetectorModel L2 Construct ([#18049](https://github.com/aws/aws-cdk/issues/18049)) ([d0960f1](https://github.com/aws/aws-cdk/commit/d0960f181e5f66daa1eb53be2190b7e62bd66030)), closes [#17711](https://github.com/aws/aws-cdk/issues/17711) [#17711](https://github.com/aws/aws-cdk/issues/17711) +* **lambda-nodejs:** Allow setting mainFields for esbuild ([#18569](https://github.com/aws/aws-cdk/issues/18569)) ([0e78aeb](https://github.com/aws/aws-cdk/commit/0e78aeb9ad62226e67f72f23c0008ba749b3a73b)) +* **s3:** custom role for the bucket notifications handler ([#17794](https://github.com/aws/aws-cdk/issues/17794)) ([43f232d](https://github.com/aws/aws-cdk/commit/43f232ddc0a18e9a2fada2fbead758ab3538adc2)), closes [#9918](https://github.com/aws/aws-cdk/issues/9918) [#13241](https://github.com/aws/aws-cdk/issues/13241) +* **servicecatalog:** Create TagOptions Construct ([#18314](https://github.com/aws/aws-cdk/issues/18314)) ([903c4b6](https://github.com/aws/aws-cdk/commit/903c4b6e4adf676fae42265a048dddd0e1386542)), closes [#17753](https://github.com/aws/aws-cdk/issues/17753) + + +### Bug Fixes + +* **apigatewayv2:** websocket api: allow all methods in grant manage connections ([#18544](https://github.com/aws/aws-cdk/issues/18544)) ([41c8a3f](https://github.com/aws/aws-cdk/commit/41c8a3fa6b50a94affb65286d862056050d02e84)), closes [#18410](https://github.com/aws/aws-cdk/issues/18410) +* **aws-apigateway:** cross region authorizer ref ([#18444](https://github.com/aws/aws-cdk/issues/18444)) ([0e0a092](https://github.com/aws/aws-cdk/commit/0e0a0922ba1d538abdfeb61a260c262109115038)) +* **cli:** hotswap should wait for lambda's `updateFunctionCode` to complete ([#18536](https://github.com/aws/aws-cdk/issues/18536)) ([0e08eeb](https://github.com/aws/aws-cdk/commit/0e08eebd2f13ab0da6cac7b91288845cad530192)), closes [#18386](https://github.com/aws/aws-cdk/issues/18386) [#18386](https://github.com/aws/aws-cdk/issues/18386) +* **ecs:** only works in 'aws' partition ([#18496](https://github.com/aws/aws-cdk/issues/18496)) ([525ac07](https://github.com/aws/aws-cdk/commit/525ac07369e33e2f36b7a0eea7913e43649484db)), closes [#18429](https://github.com/aws/aws-cdk/issues/18429) +* **ecs-patterns:** Fix Network Load Balancer Port assignments in ECS Patterns ([#18157](https://github.com/aws/aws-cdk/issues/18157)) ([1393729](https://github.com/aws/aws-cdk/commit/13937299596d0b858d56e9116bf7a7dbe039d4b4)), closes [#18073](https://github.com/aws/aws-cdk/issues/18073) +* **elasticloadbalancingv2:** ApplicationLoadBalancer.logAccessLogs does not grant all necessary permissions ([#18558](https://github.com/aws/aws-cdk/issues/18558)) ([bde1795](https://github.com/aws/aws-cdk/commit/bde17950293309b7449fc412301634770b47111f)), closes [#18367](https://github.com/aws/aws-cdk/issues/18367) +* **pipelines:** CodeBuild projects are hard to tell apart ([#18492](https://github.com/aws/aws-cdk/issues/18492)) ([f6dab8d](https://github.com/aws/aws-cdk/commit/f6dab8d8c5aa4cf56d6846e2d13c1d5641136f72)) +* **region-info:** incorrect codedeploy service principals ([#18505](https://github.com/aws/aws-cdk/issues/18505)) ([16db963](https://github.com/aws/aws-cdk/commit/16db9639e86f1fd6f26a1054f4d6df24801d0f05)) +* **route53:** add RoutingControlArn to HealthCheck patch ([#18645](https://github.com/aws/aws-cdk/issues/18645)) ([c58e8bb](https://github.com/aws/aws-cdk/commit/c58e8bbbcb0a66c37b65cddc1da8d19dfbf26b4f)), closes [#18570](https://github.com/aws/aws-cdk/issues/18570) +* **s3:** add missing safe actions to `grantWrite`, `grantReadWrite` and `grantPut` methods ([#18494](https://github.com/aws/aws-cdk/issues/18494)) ([940d043](https://github.com/aws/aws-cdk/commit/940d0439cd347f06d755f3e3dd0582470749f710)), closes [#13616](https://github.com/aws/aws-cdk/issues/13616) +* **secretsmanager:** SecretRotation for secret imported by name has incorrect permissions ([#18567](https://github.com/aws/aws-cdk/issues/18567)) ([9ed263c](https://github.com/aws/aws-cdk/commit/9ed263cde0b41959ff267720c0978bfe7449337a)), closes [#18424](https://github.com/aws/aws-cdk/issues/18424) +* **stepfunctions:** task token integration cannot be used with API Gateway ([#18595](https://github.com/aws/aws-cdk/issues/18595)) ([678eede](https://github.com/aws/aws-cdk/commit/678eeded5d5631dbacff43ead697ecbd3bd4b27d)), closes [#14184](https://github.com/aws/aws-cdk/issues/14184) [#14181](https://github.com/aws/aws-cdk/issues/14181) +* **stepfunctions-tasks:** cluster creation fails with unresolved release labels ([#18288](https://github.com/aws/aws-cdk/issues/18288)) ([9940952](https://github.com/aws/aws-cdk/commit/9940952d67bdf07f3d737dc88676dc7f7c435a12)) +* **synthetics:** correct getbucketlocation policy ([#13573](https://github.com/aws/aws-cdk/issues/13573)) ([e743525](https://github.com/aws/aws-cdk/commit/e743525b6379371110d737bb360f637c41d30ca1)), closes [#13572](https://github.com/aws/aws-cdk/issues/13572) + ## [1.140.0](https://github.com/aws/aws-cdk/compare/v1.139.0...v1.140.0) (2022-01-20) diff --git a/packages/@aws-cdk/alexa-ask/package.json b/packages/@aws-cdk/alexa-ask/package.json index 60a4890e26428..ece5934f1136a 100644 --- a/packages/@aws-cdk/alexa-ask/package.json +++ b/packages/@aws-cdk/alexa-ask/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/app-delivery/README.md b/packages/@aws-cdk/app-delivery/README.md index a60f4590dc39f..cd8e80e218bba 100644 --- a/packages/@aws-cdk/app-delivery/README.md +++ b/packages/@aws-cdk/app-delivery/README.md @@ -59,6 +59,10 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as codepipeline_actions from '@aws-cdk/aws-codepipeline-actions'; import * as cdk from '@aws-cdk/core'; import * as cicd from '@aws-cdk/app-delivery'; +import * as iam from '@aws-cdk/aws-iam'; + +class MyServiceStackA extends cdk.Stack {} +class MyServiceStackB extends cdk.Stack {} const app = new cdk.App(); @@ -77,7 +81,9 @@ const sourceOutput = new codepipeline.Artifact(); const source = new codepipeline_actions.GitHubSourceAction({ actionName: 'GitHub', output: sourceOutput, - /* ... */ + owner: 'myName', + repo: 'myRepo', + oauthToken: cdk.SecretValue.plainText('secret'), }); pipeline.addStage({ stageName: 'source', @@ -129,10 +135,11 @@ deployStage.addAction(deployServiceAAction); // is passed to CloudFormation and needs the permissions necessary to deploy // stack. Alternatively you can enable [Administrator](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_administrator) permissions above, // users should understand the privileged nature of this role. -deployServiceAAction.addToRolePolicy(new iam.PolicyStatement({ - actions: ['service:SomeAction'], - resources: [myResource.myResourceArn], - // add more Action(s) and/or Resource(s) here, as needed +const myResourceArn = 'arn:partition:service:region:account-id:resource-id'; +deployServiceAAction.addToDeploymentRolePolicy(new iam.PolicyStatement({ + actions: ['service:SomeAction'], + resources: [myResourceArn], + // add more Action(s) and/or Resource(s) here, as needed })); const serviceStackB = new MyServiceStackB(app, 'ServiceStackB', { /* ... */ }); diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 7f57bf73f19d3..8d3da28ad60ba 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -29,7 +29,14 @@ } }, "outdir": "dist", - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "scripts": { "build": "cdk-build", diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 7bac0d2b66d81..13efc124c74d0 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-accessanalyzer/package.json b/packages/@aws-cdk/aws-accessanalyzer/package.json index ae74b6abb8130..faf809becc93b 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/package.json +++ b/packages/@aws-cdk/aws-accessanalyzer/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-amazonmq/package.json b/packages/@aws-cdk/aws-amazonmq/package.json index 4d98d24d7ee73..c7050a78a44e4 100644 --- a/packages/@aws-cdk/aws-amazonmq/package.json +++ b/packages/@aws-cdk/aws-amazonmq/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-amplify/README.md b/packages/@aws-cdk/aws-amplify/README.md index c015bd38494e8..04d9f0d95bf08 100644 --- a/packages/@aws-cdk/aws-amplify/README.md +++ b/packages/@aws-cdk/aws-amplify/README.md @@ -29,37 +29,36 @@ To set up an Amplify Console app, define an `App`: ```ts import * as codebuild from '@aws-cdk/aws-codebuild'; -import * as amplify from '@aws-cdk/aws-amplify'; -import * as cdk from '@aws-cdk/core'; const amplifyApp = new amplify.App(this, 'MyApp', { sourceCodeProvider: new amplify.GitHubSourceCodeProvider({ owner: '', repository: '', - oauthToken: cdk.SecretValue.secretsManager('my-github-token') + oauthToken: SecretValue.secretsManager('my-github-token'), }), - buildSpec: codebuild.BuildSpec.fromObjectToYaml({ // Alternatively add a `amplify.yml` to the repo + buildSpec: codebuild.BuildSpec.fromObjectToYaml({ + // Alternatively add a `amplify.yml` to the repo version: '1.0', frontend: { phases: { preBuild: { commands: [ - 'yarn' - ] + 'yarn', + ], }, build: { commands: [ - 'yarn build' - ] - } + 'yarn build', + ], + }, }, artifacts: { baseDirectory: 'public', files: - - '**/*' - } - } - }) + - '**/*', + }, + }, + }), }); ``` @@ -70,20 +69,22 @@ const amplifyApp = new amplify.App(this, 'MyApp', { sourceCodeProvider: new amplify.GitLabSourceCodeProvider({ owner: '', repository: '', - oauthToken: cdk.SecretValue.secretsManager('my-gitlab-token') - }) + oauthToken: SecretValue.secretsManager('my-gitlab-token'), + }), }); ``` To connect your `App` to CodeCommit, use the `CodeCommitSourceCodeProvider`: ```ts +import * as codecommit from '@aws-cdk/aws-codecommit'; + const repository = new codecommit.Repository(this, 'Repo', { - repositoryName: 'my-repo' + repositoryName: 'my-repo', }); const amplifyApp = new amplify.App(this, 'App', { - sourceCodeProvider: new amplify.CodeCommitSourceCodeProvider({ repository }) + sourceCodeProvider: new amplify.CodeCommitSourceCodeProvider({ repository }), }); ``` @@ -93,6 +94,8 @@ to pull the CodeCommit repository. Add branches: ```ts +declare const amplifyApp: amplify.App; + const master = amplifyApp.addBranch('master'); // `id` will be used as repo branch name const dev = amplifyApp.addBranch('dev'); dev.addEnvironment('STAGE', 'dev'); @@ -103,10 +106,11 @@ Auto build and pull request preview are enabled by default. Add custom rules for redirection: ```ts +declare const amplifyApp: amplify.App; amplifyApp.addCustomRule({ source: '/docs/specific-filename.html', target: '/documents/different-filename.html', - status: amplify.RedirectStatus.TEMPORARY_REDIRECT + status: amplify.RedirectStatus.TEMPORARY_REDIRECT, }); ``` @@ -117,12 +121,18 @@ file extensions: css, gif, ico, jpg, js, png, txt, svg, woff, ttf, map, json, webmanifest. ```ts +declare const mySinglePageApp: amplify.App; + mySinglePageApp.addCustomRule(amplify.CustomRule.SINGLE_PAGE_APPLICATION_REDIRECT); ``` Add a domain and map sub domains to branches: ```ts +declare const amplifyApp: amplify.App; +declare const master: amplify.Branch; +declare const dev: amplify.Branch; + const domain = amplifyApp.addDomain('example.com', { enableAutoSubdomain: true, // in case subdomains should be auto registered for branches autoSubdomainCreationPatterns: ['*', 'pr*'], // regex for branches that should auto register subdomains @@ -140,9 +150,12 @@ Use `BasicAuth.fromCredentials` when referencing an existing secret: ```ts const amplifyApp = new amplify.App(this, 'MyApp', { - repository: 'https://github.com//', - oauthToken: cdk.SecretValue.secretsManager('my-github-token'), - basicAuth: amplify.BasicAuth.fromCredentials('username', cdk.SecretValue.secretsManager('my-github-token')) + sourceCodeProvider: new amplify.GitHubSourceCodeProvider({ + owner: '', + repository: '', + oauthToken: SecretValue.secretsManager('my-github-token'), + }), + basicAuth: amplify.BasicAuth.fromCredentials('username', SecretValue.secretsManager('my-github-token')), }); ``` @@ -150,17 +163,21 @@ Use `BasicAuth.fromGeneratedPassword` to generate a password in Secrets Manager: ```ts const amplifyApp = new amplify.App(this, 'MyApp', { - repository: 'https://github.com//', - oauthToken: cdk.SecretValue.secretsManager('my-github-token'), - basicAuth: amplify.BasicAuth.fromGeneratedPassword('username') + sourceCodeProvider: new amplify.GitHubSourceCodeProvider({ + owner: '', + repository: '', + oauthToken: SecretValue.secretsManager('my-github-token'), + }), + basicAuth: amplify.BasicAuth.fromGeneratedPassword('username'), }); ``` Basic auth can be added to specific branches: ```ts -app.addBranch('feature/next', { - basicAuth: amplify.BasicAuth.fromGeneratedPassword('username') +declare const amplifyApp: amplify.App; +amplifyApp.addBranch('feature/next', { + basicAuth: amplify.BasicAuth.fromGeneratedPassword('username'), }); ``` @@ -171,11 +188,14 @@ of branches: ```ts const amplifyApp = new amplify.App(this, 'MyApp', { - repository: 'https://github.com//', - oauthToken: cdk.SecretValue.secretsManager('my-github-token'), + sourceCodeProvider: new amplify.GitHubSourceCodeProvider({ + owner: '', + repository: '', + oauthToken: SecretValue.secretsManager('my-github-token'), + }), autoBranchCreation: { // Automatically connect branches that match a pattern set - patterns: ['feature/*', 'test/*'] - } + patterns: ['feature/*', 'test/*'], + }, autoBranchDeletion: true, // Automatically disconnect a branch when you delete a branch from your repository }); ``` @@ -185,11 +205,11 @@ const amplifyApp = new amplify.App(this, 'MyApp', { Use the `customResponseHeaders` prop to configure custom response headers for an Amplify app: ```ts -const amplifyApp = new amplify.App(stack, 'App', { +const amplifyApp = new amplify.App(this, 'App', { sourceCodeProvider: new amplify.GitHubSourceCodeProvider({ owner: '', repository: '', - oauthToken: cdk.SecretValue.secretsManager('my-github-token') + oauthToken: SecretValue.secretsManager('my-github-token'), }), customResponseHeaders: [ { @@ -214,7 +234,9 @@ const amplifyApp = new amplify.App(stack, 'App', { `sourceCodeProvider` is optional; when this is not specified the Amplify app can be deployed to using `.zip` packages. The `asset` property can be used to deploy S3 assets to Amplify as part of the CDK: ```ts -const asset = new assets.Asset(this, "SampleAsset", {}); -const amplifyApp = new amplify.App(this, 'MyApp', {}); +import * as assets from '@aws-cdk/aws-s3-assets'; + +declare const asset: assets.Asset; +declare const amplifyApp: amplify.App; const branch = amplifyApp.addBranch("dev", { asset: asset }); ``` diff --git a/packages/@aws-cdk/aws-amplify/lib/app.ts b/packages/@aws-cdk/aws-amplify/lib/app.ts index 030dc58059a6e..bedec6e9e58ac 100644 --- a/packages/@aws-cdk/aws-amplify/lib/app.ts +++ b/packages/@aws-cdk/aws-amplify/lib/app.ts @@ -28,7 +28,7 @@ export interface SourceCodeProviderConfig { /** * The repository for the application. Must use the `HTTPS` protocol. * - * @example https://github.com/aws/aws-cdk + * For example, `https://github.com/aws/aws-cdk`. */ readonly repository: string; diff --git a/packages/@aws-cdk/aws-amplify/package.json b/packages/@aws-cdk/aws-amplify/package.json index 7360eadcffaf4..e546c68ed28c4 100644 --- a/packages/@aws-cdk/aws-amplify/package.json +++ b/packages/@aws-cdk/aws-amplify/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-amplify/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-amplify/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..922b7902f805d --- /dev/null +++ b/packages/@aws-cdk/aws-amplify/rosetta/default.ts-fixture @@ -0,0 +1,11 @@ +// Fixture with packages imported, but nothing else +import { SecretValue, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as amplify from '@aws-cdk/aws-amplify'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index ccecf1546466f..5e0a110082ab9 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -79,7 +79,7 @@ configures all other HTTP method calls to `/books` to a lambda proxy. ```ts import { HttpUrlIntegration, HttpLambdaIntegration } from '@aws-cdk/aws-apigatewayv2-integrations'; -const getBooksIntegration = new HttpUrlIntegration('GetBooksIntegration' 'https://get-books-proxy.myproxy.internal'); +const getBooksIntegration = new HttpUrlIntegration('GetBooksIntegration', 'https://get-books-proxy.myproxy.internal'); declare const booksDefaultFn: lambda.Function; const booksDefaultIntegration = new HttpLambdaIntegration('BooksIntegration', booksDefaultFn); @@ -261,19 +261,21 @@ Mutual TLS can be configured to limit access to your API based by using client c ```ts import * as s3 from '@aws-cdk/aws-s3'; +import * as acm from '@aws-cdk/aws-certificatemanager'; + const certArn = 'arn:aws:acm:us-east-1:111111111111:certificate'; const domainName = 'example.com'; -const bucket = new s3.Bucket.fromBucketName(stack, 'TrustStoreBucket', ...); +declare const bucket: s3.Bucket; -new DomainName(stack, 'DomainName', { +new apigwv2.DomainName(this, 'DomainName', { domainName, - certificate: Certificate.fromCertificateArn(stack, 'cert', certArn), + certificate: acm.Certificate.fromCertificateArn(this, 'cert', certArn), mtls: { bucket, key: 'someca.pem', version: 'version', }, -}) +}); ``` Instructions for configuring your trust store can be found [here](https://aws.amazon.com/blogs/compute/introducing-mutual-tls-authentication-for-amazon-api-gateway/) @@ -408,17 +410,17 @@ Grant permission to use API Gateway Management API of a WebSocket API by calling You can use Management API to send a callback message to a connected client, get connection information, or disconnect the client. Learn more at [Use @connections commands in your backend service](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-how-to-call-websocket-api-connections.html). ```ts -const lambda = new lambda.Function(this, 'lambda', { /* ... */ }); +declare const fn: lambda.Function; -const webSocketApi = new WebSocketApi(stack, 'mywsapi'); -const stage = new WebSocketStage(stack, 'mystage', { +const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi'); +const stage = new apigwv2.WebSocketStage(this, 'mystage', { webSocketApi, stageName: 'dev', }); // per stage permission -stage.grantManageConnections(lambda); +stage.grantManagementApiAccess(fn); // for all the stages permission -webSocketApi.grantManageConnections(lambda); +webSocketApi.grantManageConnections(fn); ``` ### Managing access to WebSocket APIs @@ -434,9 +436,8 @@ Websocket APIs also support usage of API Keys. An API Key is a key that is used To require an API Key when accessing the Websocket API: ```ts -const webSocketApi = new WebSocketApi(stack, 'mywsapi',{ - apiKeySelectionExpression: WebSocketApiKeySelectionExpression.HEADER_X_API_KEY, - }); -... +const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi',{ + apiKeySelectionExpression: apigwv2.WebSocketApiKeySelectionExpression.HEADER_X_API_KEY, +}); ``` diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index c35e477c574e4..31ec578d85b51 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -32,7 +32,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-appconfig/package.json b/packages/@aws-cdk/aws-appconfig/package.json index e0a11eb7a7cce..4f4abaaf6dc40 100644 --- a/packages/@aws-cdk/aws-appconfig/package.json +++ b/packages/@aws-cdk/aws-appconfig/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-appflow/package.json b/packages/@aws-cdk/aws-appflow/package.json index 093c09ccbc347..fd0648da5f582 100644 --- a/packages/@aws-cdk/aws-appflow/package.json +++ b/packages/@aws-cdk/aws-appflow/package.json @@ -28,6 +28,13 @@ "Framework :: AWS CDK :: 1" ] } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-appintegrations/package.json b/packages/@aws-cdk/aws-appintegrations/package.json index 6bafcc70147e5..cd4ecf81dd7c5 100644 --- a/packages/@aws-cdk/aws-appintegrations/package.json +++ b/packages/@aws-cdk/aws-appintegrations/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-appintegrations", "module": "aws_cdk.aws_appintegrations" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-applicationinsights/package.json b/packages/@aws-cdk/aws-applicationinsights/package.json index 84d95622107e3..38d8d1d6311c1 100644 --- a/packages/@aws-cdk/aws-applicationinsights/package.json +++ b/packages/@aws-cdk/aws-applicationinsights/package.json @@ -28,6 +28,13 @@ "Framework :: AWS CDK :: 1" ] } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-appstream/package.json b/packages/@aws-cdk/aws-appstream/package.json index 774a9b54ca4c0..059821e8a6b4b 100644 --- a/packages/@aws-cdk/aws-appstream/package.json +++ b/packages/@aws-cdk/aws-appstream/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-aps/package.json b/packages/@aws-cdk/aws-aps/package.json index aa6d725f1025d..a63226c0a8148 100644 --- a/packages/@aws-cdk/aws-aps/package.json +++ b/packages/@aws-cdk/aws-aps/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-aps", "module": "aws_cdk.aws_aps" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-athena/package.json b/packages/@aws-cdk/aws-athena/package.json index b96b7559fc447..343d9eb7f34eb 100644 --- a/packages/@aws-cdk/aws-athena/package.json +++ b/packages/@aws-cdk/aws-athena/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "cdk-build": { "cloudformation": "AWS::Athena", diff --git a/packages/@aws-cdk/aws-auditmanager/package.json b/packages/@aws-cdk/aws-auditmanager/package.json index 9b9347689509b..a9a3738209a4d 100644 --- a/packages/@aws-cdk/aws-auditmanager/package.json +++ b/packages/@aws-cdk/aws-auditmanager/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-auditmanager", "module": "aws_cdk.aws_auditmanager" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index 6a0a7fa6efafd..64b399fd336ba 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index d0e520c926fe7..eb1dab85bfe70 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-autoscalingplans/package.json b/packages/@aws-cdk/aws-autoscalingplans/package.json index fac3bc7d1fd91..6de1130ba56bb 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/package.json +++ b/packages/@aws-cdk/aws-autoscalingplans/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-budgets/package.json b/packages/@aws-cdk/aws-budgets/package.json index bdb97890149aa..7b0506935bdb3 100644 --- a/packages/@aws-cdk/aws-budgets/package.json +++ b/packages/@aws-cdk/aws-budgets/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cassandra/package.json b/packages/@aws-cdk/aws-cassandra/package.json index a9d233869e092..70e21b61df3e3 100644 --- a/packages/@aws-cdk/aws-cassandra/package.json +++ b/packages/@aws-cdk/aws-cassandra/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ce/package.json b/packages/@aws-cdk/aws-ce/package.json index b0786e2c47636..6332fc8cffd14 100644 --- a/packages/@aws-cdk/aws-ce/package.json +++ b/packages/@aws-cdk/aws-ce/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-chatbot/README.md b/packages/@aws-cdk/aws-chatbot/README.md index 5e871bb81db48..6f868ff02e17d 100644 --- a/packages/@aws-cdk/aws-chatbot/README.md +++ b/packages/@aws-cdk/aws-chatbot/README.md @@ -18,6 +18,7 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw ```ts import * as chatbot from '@aws-cdk/aws-chatbot'; import * as sns from '@aws-cdk/aws-sns'; +import * as iam from '@aws-cdk/aws-iam'; const slackChannel = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', { slackChannelConfigurationName: 'YOUR_CHANNEL_NAME', @@ -33,7 +34,7 @@ slackChannel.addToRolePolicy(new iam.PolicyStatement({ resources: ['arn:aws:s3:::abc/xyz/123.txt'], })); -slackChannel.addNotificationTopic(new sns.Topic(this, 'MyTopic')) +slackChannel.addNotificationTopic(new sns.Topic(this, 'MyTopic')); ``` ## Log Group diff --git a/packages/@aws-cdk/aws-chatbot/package.json b/packages/@aws-cdk/aws-chatbot/package.json index 2abb1900c7cfd..35a6887f3b5cb 100644 --- a/packages/@aws-cdk/aws-chatbot/package.json +++ b/packages/@aws-cdk/aws-chatbot/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-chatbot/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-chatbot/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..50d86e8a055ce --- /dev/null +++ b/packages/@aws-cdk/aws-chatbot/rosetta/default.ts-fixture @@ -0,0 +1,10 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts index 9c30e6c08540c..b71a9f56aea61 100644 --- a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts +++ b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts @@ -99,21 +99,35 @@ export interface CustomResourceProps { * [resource provider framework]: https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html * * ```ts - * // use the provider framework from aws-cdk/custom-resources: - * provider: new custom_resources.Provider({ + * import * as custom_resources from '@aws-cdk/custom-resources'; + * import * as lambda from '@aws-cdk/aws-lambda'; + * import { Stack } from '@aws-cdk/core'; + * declare const myOnEventLambda: lambda.Function; + * declare const myIsCompleteLambda: lambda.Function; + * const stack = new Stack(); + * + * const provider = new custom_resources.Provider(stack, 'myProvider', { * onEventHandler: myOnEventLambda, * isCompleteHandler: myIsCompleteLambda, // optional * }); * ``` * * ```ts + * import * as cloudformation from '@aws-cdk/aws-cloudformation'; + * import * as lambda from '@aws-cdk/aws-lambda'; + * declare const myFunction: lambda.Function; + * * // invoke an AWS Lambda function when a lifecycle event occurs: - * provider: CustomResourceProvider.fromLambda(myFunction) + * const provider = cloudformation.CustomResourceProvider.fromLambda(myFunction); * ``` * * ```ts + * import * as cloudformation from '@aws-cdk/aws-cloudformation'; + * import * as sns from '@aws-cdk/aws-sns'; + * declare const myTopic: sns.Topic; + * * // publish lifecycle events to an SNS topic: - * provider: CustomResourceProvider.fromTopic(myTopic) + * const provider = cloudformation.CustomResourceProvider.fromTopic(myTopic); * ``` */ readonly provider: ICustomResourceProvider; diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index 3671367db5817..0b15fd01bfe35 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/README.md b/packages/@aws-cdk/aws-cloudwatch-actions/README.md index f13861a8c1555..99eb74e06eb54 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/README.md +++ b/packages/@aws-cdk/aws-cloudwatch-actions/README.md @@ -17,12 +17,11 @@ The currently implemented actions are: EC2 Actions, SNS Actions, Autoscaling Act ## EC2 Action Example ```ts -import * as cw from "@aws-cdk/aws-cloudwatch"; // Alarm must be configured with an EC2 per-instance metric -let alarm: cw.Alarm; +declare const alarm: cloudwatch.Alarm; // Attach a reboot when alarm triggers alarm.addAlarmAction( - new Ec2Action(Ec2InstanceActions.REBOOT) + new actions.Ec2Action(actions.Ec2InstanceAction.REBOOT), ); ``` diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index 08a59bffab0d5..2a37790862f9b 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-cloudwatch-actions/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..c473f965be130 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudwatch-actions/rosetta/default.ts-fixture @@ -0,0 +1,12 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as actions from '@aws-cdk/aws-cloudwatch-actions'; +import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeartifact/package.json b/packages/@aws-cdk/aws-codeartifact/package.json index dfde889c0446f..943a1e3a421a7 100644 --- a/packages/@aws-cdk/aws-codeartifact/package.json +++ b/packages/@aws-cdk/aws-codeartifact/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-codeartifact", "module": "aws_cdk.aws_codeartifact" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-codegurureviewer/package.json b/packages/@aws-cdk/aws-codegurureviewer/package.json index d96fac0ca1c2a..6c72bd475e6ed 100644 --- a/packages/@aws-cdk/aws-codegurureviewer/package.json +++ b/packages/@aws-cdk/aws-codegurureviewer/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.CodeGuruReviewer", diff --git a/packages/@aws-cdk/aws-codestar/README.md b/packages/@aws-cdk/aws-codestar/README.md index e9c6ec2e4bf75..6bdf425aab1d1 100644 --- a/packages/@aws-cdk/aws-codestar/README.md +++ b/packages/@aws-cdk/aws-codestar/README.md @@ -29,13 +29,13 @@ To create a new GitHub Repository and commit the assets from S3 bucket into the import * as codestar from '@aws-cdk/aws-codestar'; import * as s3 from '@aws-cdk/aws-s3' -new codestar.GitHubRepository(stack, 'GitHubRepo', { +new codestar.GitHubRepository(this, 'GitHubRepo', { owner: 'aws', repositoryName: 'aws-cdk', - accessToken: cdk.SecretValue.secretsManager('my-github-token', { + accessToken: SecretValue.secretsManager('my-github-token', { jsonField: 'token', }), - contentsBucket: s3.Bucket.fromBucketName(stack, 'Bucket', 'bucket-name'), + contentsBucket: s3.Bucket.fromBucketName(this, 'Bucket', 'bucket-name'), contentsKey: 'import.zip', }); ``` diff --git a/packages/@aws-cdk/aws-codestar/package.json b/packages/@aws-cdk/aws-codestar/package.json index e179f607ecbfc..a2ae9b1cbd339 100644 --- a/packages/@aws-cdk/aws-codestar/package.json +++ b/packages/@aws-cdk/aws-codestar/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codestar/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-codestar/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..439308f8c0176 --- /dev/null +++ b/packages/@aws-cdk/aws-codestar/rosetta/default.ts-fixture @@ -0,0 +1,10 @@ +// Fixture with packages imported, but nothing else +import { SecretValue, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codestarconnections/package.json b/packages/@aws-cdk/aws-codestarconnections/package.json index 769985db53fbc..9d06e3ea4db51 100644 --- a/packages/@aws-cdk/aws-codestarconnections/package.json +++ b/packages/@aws-cdk/aws-codestarconnections/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codestarnotifications/README.md b/packages/@aws-cdk/aws-codestarnotifications/README.md index b13a33089b01a..ba1da9ced0026 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/README.md +++ b/packages/@aws-cdk/aws-codestarnotifications/README.md @@ -39,17 +39,17 @@ import * as codebuild from '@aws-cdk/aws-codebuild'; import * as sns from '@aws-cdk/aws-sns'; import * as chatbot from '@aws-cdk/aws-chatbot'; -const project = new codebuild.PipelineProject(stack, 'MyProject'); +const project = new codebuild.PipelineProject(this, 'MyProject'); -const topic = new sns.Topic(stack, 'MyTopic1'); +const topic = new sns.Topic(this, 'MyTopic1'); -const slack = new chatbot.SlackChannelConfiguration(stack, 'MySlackChannel', { +const slack = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', { slackChannelConfigurationName: 'YOUR_CHANNEL_NAME', slackWorkspaceId: 'YOUR_SLACK_WORKSPACE_ID', slackChannelId: 'YOUR_SLACK_CHANNEL_ID', }); -const rule = new notifications.NotificationRule(stack, 'NotificationRule', { +const rule = new notifications.NotificationRule(this, 'NotificationRule', { source: project, events: [ 'codebuild-project-build-state-succeeded', diff --git a/packages/@aws-cdk/aws-codestarnotifications/package.json b/packages/@aws-cdk/aws-codestarnotifications/package.json index 251b0b0fa69f7..e6d2bf301f3b4 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/package.json +++ b/packages/@aws-cdk/aws-codestarnotifications/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codestarnotifications/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-codestarnotifications/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..50d86e8a055ce --- /dev/null +++ b/packages/@aws-cdk/aws-codestarnotifications/rosetta/default.ts-fixture @@ -0,0 +1,10 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito-identitypool/README.md b/packages/@aws-cdk/aws-cognito-identitypool/README.md index fb1fc6ef0c0df..e1be0d70ec29c 100644 --- a/packages/@aws-cdk/aws-cognito-identitypool/README.md +++ b/packages/@aws-cdk/aws-cognito-identitypool/README.md @@ -31,6 +31,10 @@ sign-in options for your app users. This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. +```ts nofixture +import { IdentityPool, UserPoolAuthenticationProvider } from '@aws-cdk/aws-cognito-identitypool'; +``` + ## Table of Contents - [Identity Pools](#identity-pools) @@ -66,26 +70,28 @@ A basic Identity Pool with minimal configuration has no required props, with def unauthenticated (guest) roles applied to the identity pool: ```ts -new cognito.IdentityPool(this, 'myIdentityPool'); +new IdentityPool(this, 'myIdentityPool'); ``` By default, both the authenticated and unauthenticated roles will have no permissions attached. Grant permissions to roles using the public `authenticatedRole` and `unauthenticatedRole` properties: ```ts -const identityPool = new cognito.IdentityPool(this, 'myIdentityPool'); -const table = new dynamodb.Table(this, 'MyTable'); +import * as dynamodb from '@aws-cdk/aws-dynamodb'; + +const identityPool = new IdentityPool(this, 'myIdentityPool'); +declare const table: dynamodb.Table; // Grant permissions to authenticated users table.grantReadWriteData(identityPool.authenticatedRole); // Grant permissions to unauthenticated guest users -table.grantRead(identityPool.unauthenticatedRole); +table.grantReadData(identityPool.unauthenticatedRole); //Or add policy statements straight to the role -identityPool.authenticatedRole.addToPrincipalPolicy(new PolicyStatement({ - effect: Effect.ALLOW, +identityPool.authenticatedRole.addToPrincipalPolicy(new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, actions: ['dynamodb:*'], - resources: ['*'] + resources: ['*'], })); ``` @@ -93,14 +99,15 @@ The default roles can also be supplied in `IdentityPoolProps`: ```ts const stack = new Stack(); -const authenticatedRole = new Role(stack, 'authRole', { - assumedBy: new ServicePrincipal('service.amazonaws.com'), +const authenticatedRole = new iam.Role(this, 'authRole', { + assumedBy: new iam.ServicePrincipal('service.amazonaws.com'), }); -const unauthenticatedRole = new Role(stack, 'unauthRole', { - assumedBy: new ServicePrincipal('service.amazonaws.com'), +const unauthenticatedRole = new iam.Role(this, 'unauthRole', { + assumedBy: new iam.ServicePrincipal('service.amazonaws.com'), }); -const identityPool = new IdentityPool(stack, 'TestIdentityPoolActions', { - authenticatedRole, unauthenticatedRole +const identityPool = new IdentityPool(this, 'TestIdentityPoolActions', { + authenticatedRole, + unauthenticatedRole, }); ``` @@ -122,7 +129,7 @@ to gather the necessary properties from the user pool constructs. ```ts const userPool = new cognito.UserPool(this, 'Pool'); -new cognito.IdentityPool(this, 'myidentitypool', { +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', authenticationProviders: { userPools: [new UserPoolAuthenticationProvider({ userPool })], @@ -134,10 +141,11 @@ User pools can also be associated with an identity pool after instantiation. The returns the User Pool Client that has been created: ```ts +declare const identityPool: IdentityPool; const userPool = new cognito.UserPool(this, 'Pool'); -const userPoolClient = identityPool.addUserPoolAuthentication({ - userPools: [new UserPoolAuthenticationProvider({ userPool })]; -}); +const userPoolClient = identityPool.addUserPoolAuthentication(new UserPoolAuthenticationProvider({ + userPool, +})); ``` #### Server Side Token Check @@ -153,13 +161,12 @@ Setting `disableServerSideTokenCheck` to true will change the default behavior t more [here](https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_CognitoIdentityProvider.html#CognitoIdentity-Type-CognitoIdentityProvider-ServerSideTokenCheck): ```ts +declare const identityPool: IdentityPool; const userPool = new cognito.UserPool(this, 'Pool'); -identityPool.addUserPoolAuthentication({ - userPool: new UserPoolAuthenticationProvider({ - userPool, - disableServerSideTokenCheck: true, - }), -}); +identityPool.addUserPoolAuthentication(new UserPoolAuthenticationProvider({ + userPool, + disableServerSideTokenCheck: true, +})); ``` #### Associating an External Provider Directly @@ -168,7 +175,7 @@ One or more [external identity providers](https://docs.aws.amazon.com/cognito/la `authenticationProviders`: ```ts -new cognito.IdentityPool(this, 'myidentitypool', { +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', authenticationProviders: { amazon: { @@ -179,7 +186,7 @@ new cognito.IdentityPool(this, 'myidentitypool', { }, google: { clientId: '12345678012.apps.googleusercontent.com', - } + }, apple: { servicesId: 'com.myappleapp.auth', }, @@ -206,15 +213,15 @@ so that different users can be granted different sets of permissions. Associatin with an identity pool: ```ts -const openIdConnectProvider = new iam.OpenIdConnectProvider(this, 'my-openid-connect-provider', ...); -const samlProvider = new iam.SamlProvider(this, 'my-saml-provider', ...); +declare const openIdConnectProvider: iam.OpenIdConnectProvider; +declare const samlProvider: iam.SamlProvider; -new cognito.IdentityPool(this, 'myidentitypool', { +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', authenticationProviders: { - openIdConnectProvider: openIdConnectProvider, - samlProvider: samlProvider, - } + openIdConnectProviders: [openIdConnectProvider], + samlProviders: [samlProvider], + }, }); ``` @@ -228,13 +235,16 @@ Like the supported external providers, though, only one custom provider can be d pool. ```ts -new cognito.IdentityPool(this, 'myidentitypool', { +declare const openIdConnectProvider: iam.OpenIdConnectProvider; +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', authenticationProviders: { - google: '12345678012.apps.googleusercontent.com', - openIdConnectProvider: openIdConnectProvider, + google: { + clientId: '12345678012.apps.googleusercontent.com', + }, + openIdConnectProviders: [openIdConnectProvider], customProvider: 'my-custom-provider.example.com', - } + }, }); ``` @@ -249,7 +259,9 @@ Using a [token-based approach](https://docs.aws.amazon.com/cognito/latest/develo `cognito:preferred_role` claims from the identity provider: ```ts -new cognito.IdentityPool(this, 'myidentitypool', { +import { IdentityPoolProviderUrl } from '@aws-cdk/aws-cognito-identitypool'; + +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', roleMappings: [{ providerUrl: IdentityPoolProviderUrl.AMAZON, @@ -261,7 +273,11 @@ new cognito.IdentityPool(this, 'myidentitypool', { Using a rule-based approach to role mapping allows roles to be assigned based on custom claims passed from the identity provider: ```ts -new cognito.IdentityPool(this, 'myidentitypool', { +import { IdentityPoolProviderUrl, RoleMappingMatchType } from '@aws-cdk/aws-cognito-identitypool'; + +declare const adminRole: iam.Role; +declare const nonAdminRole: iam.Role; +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', // Assign specific roles to users based on whether or not the custom admin claim is passed from the identity provider roleMappings: [{ @@ -286,6 +302,13 @@ new cognito.IdentityPool(this, 'myidentitypool', { Role mappings can also be added after instantiation with the Identity Pool's `addRoleMappings` method: ```ts +import { IdentityPoolRoleMapping } from '@aws-cdk/aws-cognito-identitypool'; + +declare const identityPool: IdentityPool; +declare const myAddedRoleMapping1: IdentityPoolRoleMapping; +declare const myAddedRoleMapping2: IdentityPoolRoleMapping; +declare const myAddedRoleMapping3: IdentityPoolRoleMapping; + identityPool.addRoleMappings(myAddedRoleMapping1, myAddedRoleMapping2, myAddedRoleMapping3); ``` @@ -295,7 +318,9 @@ Role mappings must be associated with the url of an Identity Provider which can `IdentityPoolProviderUrl`. Supported Providers have static Urls that can be used: ```ts -new cognito.IdentityPool(this, 'myidentitypool', { +import { IdentityPoolProviderUrl } from '@aws-cdk/aws-cognito-identitypool'; + +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', roleMappings: [{ providerUrl: IdentityPoolProviderUrl.FACEBOOK, @@ -307,7 +332,9 @@ new cognito.IdentityPool(this, 'myidentitypool', { For identity providers that don't have static Urls, a custom Url or User Pool Client Url can be supplied: ```ts -new cognito.IdentityPool(this, 'myidentitypool', { +import { IdentityPoolProviderUrl } from '@aws-cdk/aws-cognito-identitypool'; + +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', roleMappings: [ { @@ -330,7 +357,7 @@ Identity Pool [Authentication Flow](https://docs.aws.amazon.com/cognito/latest/d can also be implemented using `allowClassicFlow`: ```ts -new cognito.IdentityPool(this, 'myidentitypool', { +new IdentityPool(this, 'myidentitypool', { identityPoolName: 'myidentitypool', allowClassicFlow: true, }); diff --git a/packages/@aws-cdk/aws-cognito-identitypool/package.json b/packages/@aws-cdk/aws-cognito-identitypool/package.json index db55fece60596..c4e0c079d7daa 100644 --- a/packages/@aws-cdk/aws-cognito-identitypool/package.json +++ b/packages/@aws-cdk/aws-cognito-identitypool/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cognito-identitypool/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-cognito-identitypool/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..a362c0eca88f3 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito-identitypool/rosetta/default.ts-fixture @@ -0,0 +1,13 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as cognito from '@aws-cdk/aws-cognito'; +import * as iam from '@aws-cdk/aws-iam'; +import { IdentityPool, UserPoolAuthenticationProvider } from '@aws-cdk/aws-cognito-identitypool'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-connect/package.json b/packages/@aws-cdk/aws-connect/package.json index 6bd8d4ba57d84..0d413aaf0db47 100644 --- a/packages/@aws-cdk/aws-connect/package.json +++ b/packages/@aws-cdk/aws-connect/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-connect", "module": "aws_cdk.aws_connect" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-cur/package.json b/packages/@aws-cdk/aws-cur/package.json index ea61b4d3f963c..c871e8b723bc9 100644 --- a/packages/@aws-cdk/aws-cur/package.json +++ b/packages/@aws-cdk/aws-cur/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-cur", "module": "aws_cdk.aws_cur" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-customerprofiles/package.json b/packages/@aws-cdk/aws-customerprofiles/package.json index 281b809346819..e73bd86cba198 100644 --- a/packages/@aws-cdk/aws-customerprofiles/package.json +++ b/packages/@aws-cdk/aws-customerprofiles/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.CustomerProfiles", diff --git a/packages/@aws-cdk/aws-databrew/package.json b/packages/@aws-cdk/aws-databrew/package.json index 4ab4173606602..66e42d3cd4e94 100644 --- a/packages/@aws-cdk/aws-databrew/package.json +++ b/packages/@aws-cdk/aws-databrew/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-databrew", "module": "aws_cdk.aws_databrew" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-datapipeline/package.json b/packages/@aws-cdk/aws-datapipeline/package.json index d3d4c24c94d09..0aff6f0f1389c 100644 --- a/packages/@aws-cdk/aws-datapipeline/package.json +++ b/packages/@aws-cdk/aws-datapipeline/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-datasync/package.json b/packages/@aws-cdk/aws-datasync/package.json index 2e9a5d220c1ad..1dc0061ea02ec 100644 --- a/packages/@aws-cdk/aws-datasync/package.json +++ b/packages/@aws-cdk/aws-datasync/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-datasync", "module": "aws_cdk.aws_datasync" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-dax/package.json b/packages/@aws-cdk/aws-dax/package.json index 4d9b73a99022e..c00396c2220ae 100644 --- a/packages/@aws-cdk/aws-dax/package.json +++ b/packages/@aws-cdk/aws-dax/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-detective/package.json b/packages/@aws-cdk/aws-detective/package.json index 8e10f2018e368..2522e915d02b3 100644 --- a/packages/@aws-cdk/aws-detective/package.json +++ b/packages/@aws-cdk/aws-detective/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-devopsguru/package.json b/packages/@aws-cdk/aws-devopsguru/package.json index 2b3b4e4077e2a..2082aba14cbd3 100644 --- a/packages/@aws-cdk/aws-devopsguru/package.json +++ b/packages/@aws-cdk/aws-devopsguru/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-devopsguru", "module": "aws_cdk.aws_devopsguru" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-directoryservice/package.json b/packages/@aws-cdk/aws-directoryservice/package.json index d68d97956dd36..7e32fa22bdfc5 100644 --- a/packages/@aws-cdk/aws-directoryservice/package.json +++ b/packages/@aws-cdk/aws-directoryservice/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-dlm/package.json b/packages/@aws-cdk/aws-dlm/package.json index a4dac9e9c23c0..d59d69ba32dc5 100644 --- a/packages/@aws-cdk/aws-dlm/package.json +++ b/packages/@aws-cdk/aws-dlm/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-dms/package.json b/packages/@aws-cdk/aws-dms/package.json index a6168fcf47cac..2c7da4b13bac7 100644 --- a/packages/@aws-cdk/aws-dms/package.json +++ b/packages/@aws-cdk/aws-dms/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-dynamodb-global/README.md b/packages/@aws-cdk/aws-dynamodb-global/README.md index a31c37eb3e114..77f2725e76797 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/README.md +++ b/packages/@aws-cdk/aws-dynamodb-global/README.md @@ -26,9 +26,9 @@ import { App } from '@aws-cdk/core'; const app = new App(); new GlobalTable(app, 'globdynamodb', { - partitionKey: { name: 'hashKey', type: AttributeType.String }, + partitionKey: { name: 'hashKey', type: AttributeType.STRING }, tableName: 'GlobalTable', - regions: [ "us-east-1", "us-east-2", "us-west-2" ] + regions: [ "us-east-1", "us-east-2", "us-west-2" ], }); app.synth(); ``` diff --git a/packages/@aws-cdk/aws-dynamodb-global/package.json b/packages/@aws-cdk/aws-dynamodb-global/package.json index 61e2d44daab47..882e1b789e912 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/package.json @@ -39,7 +39,14 @@ "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-efs/README.md b/packages/@aws-cdk/aws-efs/README.md index 1a26f9e0e9c5a..058198d0c897e 100644 --- a/packages/@aws-cdk/aws-efs/README.md +++ b/packages/@aws-cdk/aws-efs/README.md @@ -36,7 +36,7 @@ const fileSystem = new efs.FileSystem(this, 'MyEfsFileSystem', { vpc: new ec2.Vpc(this, 'VPC'), lifecyclePolicy: efs.LifecyclePolicy.AFTER_14_DAYS, // files are not transitioned to infrequent access (IA) storage by default performanceMode: efs.PerformanceMode.GENERAL_PURPOSE, // default - outInfrequentAccessPolicy: efs.OutOfInfrequentAccessPolicy.AFTER_1_ACCESS, // files are not transitioned back from (infrequent access) IA to primary storage by default + outOfInfrequentAccessPolicy: efs.OutOfInfrequentAccessPolicy.AFTER_1_ACCESS, // files are not transitioned back from (infrequent access) IA to primary storage by default }); ``` @@ -159,6 +159,6 @@ You can configure the file system to be destroyed on stack deletion by setting a ```ts const fileSystem = new efs.FileSystem(this, 'EfsFileSystem', { vpc: new ec2.Vpc(this, 'VPC'), - removalPolicy: RemovalPolicy.DESTROY + removalPolicy: RemovalPolicy.DESTROY, }); ``` diff --git a/packages/@aws-cdk/aws-efs/package.json b/packages/@aws-cdk/aws-efs/package.json index 4ce72aacb86e5..09d1c1f6f2ca6 100644 --- a/packages/@aws-cdk/aws-efs/package.json +++ b/packages/@aws-cdk/aws-efs/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-efs/rosetta/with-filesystem-instance.ts-fixture b/packages/@aws-cdk/aws-efs/rosetta/with-filesystem-instance.ts-fixture index 092b572afa726..427e2ed030b4b 100644 --- a/packages/@aws-cdk/aws-efs/rosetta/with-filesystem-instance.ts-fixture +++ b/packages/@aws-cdk/aws-efs/rosetta/with-filesystem-instance.ts-fixture @@ -3,6 +3,7 @@ import { Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import * as efs from '@aws-cdk/aws-efs'; import * as ec2 from '@aws-cdk/aws-ec2'; +import * as iam from '@aws-cdk/aws-iam'; class Fixture extends Stack { constructor(scope: Construct, id: string) { diff --git a/packages/@aws-cdk/aws-elasticache/package.json b/packages/@aws-cdk/aws-elasticache/package.json index 5af18606b0558..61fe8976e0ced 100644 --- a/packages/@aws-cdk/aws-elasticache/package.json +++ b/packages/@aws-cdk/aws-elasticache/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/package.json b/packages/@aws-cdk/aws-elasticbeanstalk/package.json index 3607699ce8b8b..46506c219aedb 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/package.json +++ b/packages/@aws-cdk/aws-elasticbeanstalk/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/README.md b/packages/@aws-cdk/aws-elasticloadbalancing/README.md index 6d66ca5965c69..45ec1828bb466 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancing/README.md @@ -21,17 +21,19 @@ balancer, set up listeners and a health check, and supply the fleet(s) you want to load balance to in the `targets` property. ```ts +declare const vpc: ec2.IVpc; const lb = new elb.LoadBalancer(this, 'LB', { - vpc, - internetFacing: true, - healthCheck: { - port: 80 - }, + vpc, + internetFacing: true, + healthCheck: { + port: 80, + }, }); +declare const myAutoScalingGroup: autoscaling.AutoScalingGroup; lb.addTarget(myAutoScalingGroup); lb.addListener({ - externalPort: 80, + externalPort: 80, }); ``` @@ -39,8 +41,10 @@ The load balancer allows all connections by default. If you want to change that, pass the `allowConnectionsFrom` property while setting up the listener: ```ts +declare const mySecurityGroup: ec2.SecurityGroup; +declare const lb: elb.LoadBalancer; lb.addListener({ - externalPort: 80, - allowConnectionsFrom: [mySecurityGroup] + externalPort: 80, + allowConnectionsFrom: [mySecurityGroup], }); ``` diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/package.json b/packages/@aws-cdk/aws-elasticloadbalancing/package.json index 190f42846901b..c43acdd739437 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancing/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-elasticloadbalancing/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..036e5ddf38c1b --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancing/rosetta/default.ts-fixture @@ -0,0 +1,13 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as elb from '@aws-cdk/aws-elasticloadbalancing'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as autoscaling from '@aws-cdk/aws-autoscaling'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index 90449a5d94204..deaf25cd5eda8 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index 9990e7ea75a73..76d0b7ba72ee8 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-emr/package.json b/packages/@aws-cdk/aws-emr/package.json index 60da5b871705d..ae9f2a89744ea 100644 --- a/packages/@aws-cdk/aws-emr/package.json +++ b/packages/@aws-cdk/aws-emr/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-emrcontainers/package.json b/packages/@aws-cdk/aws-emrcontainers/package.json index 9098ed9069a61..5762e656d6761 100644 --- a/packages/@aws-cdk/aws-emrcontainers/package.json +++ b/packages/@aws-cdk/aws-emrcontainers/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-emrcontainers", "module": "aws_cdk.aws_emrcontainers" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-eventschemas/package.json b/packages/@aws-cdk/aws-eventschemas/package.json index d1597e155ee9d..d8d89608e6e95 100644 --- a/packages/@aws-cdk/aws-eventschemas/package.json +++ b/packages/@aws-cdk/aws-eventschemas/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-finspace/package.json b/packages/@aws-cdk/aws-finspace/package.json index 3d0e223d1d146..7c3ae60c58506 100644 --- a/packages/@aws-cdk/aws-finspace/package.json +++ b/packages/@aws-cdk/aws-finspace/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-finspace", "module": "aws_cdk.aws_finspace" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-fis/package.json b/packages/@aws-cdk/aws-fis/package.json index a2e1bbe7845ec..614d64919c252 100644 --- a/packages/@aws-cdk/aws-fis/package.json +++ b/packages/@aws-cdk/aws-fis/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-fis", "module": "aws_cdk.aws_fis" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-fms/package.json b/packages/@aws-cdk/aws-fms/package.json index 6a018450a9b2f..1366f66c49454 100644 --- a/packages/@aws-cdk/aws-fms/package.json +++ b/packages/@aws-cdk/aws-fms/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-frauddetector/package.json b/packages/@aws-cdk/aws-frauddetector/package.json index 220eed4178f21..b30bf59153cd7 100644 --- a/packages/@aws-cdk/aws-frauddetector/package.json +++ b/packages/@aws-cdk/aws-frauddetector/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-frauddetector", "module": "aws_cdk.aws_frauddetector" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-gamelift/package.json b/packages/@aws-cdk/aws-gamelift/package.json index e1a7578e757d1..8e0aa9635f092 100644 --- a/packages/@aws-cdk/aws-gamelift/package.json +++ b/packages/@aws-cdk/aws-gamelift/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json index 11d94970c0248..aef8ed88576af 100644 --- a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json +++ b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-greengrass/package.json b/packages/@aws-cdk/aws-greengrass/package.json index 3d9e5f4a5aeb4..d4b6a23bc436e 100644 --- a/packages/@aws-cdk/aws-greengrass/package.json +++ b/packages/@aws-cdk/aws-greengrass/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-greengrassv2/package.json b/packages/@aws-cdk/aws-greengrassv2/package.json index 9c6217595cba7..af50ddd6ab9c6 100644 --- a/packages/@aws-cdk/aws-greengrassv2/package.json +++ b/packages/@aws-cdk/aws-greengrassv2/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-groundstation/package.json b/packages/@aws-cdk/aws-groundstation/package.json index dfa3a183aed81..faf4496480b5f 100644 --- a/packages/@aws-cdk/aws-groundstation/package.json +++ b/packages/@aws-cdk/aws-groundstation/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-groundstation", "module": "aws_cdk.aws_groundstation" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-guardduty/package.json b/packages/@aws-cdk/aws-guardduty/package.json index 532e2f1554e23..e802c1d15247d 100644 --- a/packages/@aws-cdk/aws-guardduty/package.json +++ b/packages/@aws-cdk/aws-guardduty/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-healthlake/package.json b/packages/@aws-cdk/aws-healthlake/package.json index 556be6a207dd9..20fabb1ffe47f 100644 --- a/packages/@aws-cdk/aws-healthlake/package.json +++ b/packages/@aws-cdk/aws-healthlake/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-healthlake", "module": "aws_cdk.aws_healthlake" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-imagebuilder/package.json b/packages/@aws-cdk/aws-imagebuilder/package.json index 4a03d80bcc982..bacd907148a73 100644 --- a/packages/@aws-cdk/aws-imagebuilder/package.json +++ b/packages/@aws-cdk/aws-imagebuilder/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-inspector/package.json b/packages/@aws-cdk/aws-inspector/package.json index b237844ea1221..5bdb7a30c188c 100644 --- a/packages/@aws-cdk/aws-inspector/package.json +++ b/packages/@aws-cdk/aws-inspector/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iot1click/package.json b/packages/@aws-cdk/aws-iot1click/package.json index 8c3bf4dbdfa02..656dee749a698 100644 --- a/packages/@aws-cdk/aws-iot1click/package.json +++ b/packages/@aws-cdk/aws-iot1click/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iotanalytics/package.json b/packages/@aws-cdk/aws-iotanalytics/package.json index 69865e7d5cf54..534ffed3675a9 100644 --- a/packages/@aws-cdk/aws-iotanalytics/package.json +++ b/packages/@aws-cdk/aws-iotanalytics/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json b/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json index 4fb4501c9beef..ecb59fded3ba8 100644 --- a/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json +++ b/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.IoTCoreDeviceAdvisor", diff --git a/packages/@aws-cdk/aws-iotevents/package.json b/packages/@aws-cdk/aws-iotevents/package.json index f9ac79e55395a..37c2035b4378f 100644 --- a/packages/@aws-cdk/aws-iotevents/package.json +++ b/packages/@aws-cdk/aws-iotevents/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iotevents/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-iotevents/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..50d86e8a055ce --- /dev/null +++ b/packages/@aws-cdk/aws-iotevents/rosetta/default.ts-fixture @@ -0,0 +1,10 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotfleethub/package.json b/packages/@aws-cdk/aws-iotfleethub/package.json index 0265539be552c..dde15541e17b5 100644 --- a/packages/@aws-cdk/aws-iotfleethub/package.json +++ b/packages/@aws-cdk/aws-iotfleethub/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-iotfleethub", "module": "aws_cdk.aws_iotfleethub" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-iotsitewise/package.json b/packages/@aws-cdk/aws-iotsitewise/package.json index 1d4fcbae037cd..d84b4f75d06dc 100644 --- a/packages/@aws-cdk/aws-iotsitewise/package.json +++ b/packages/@aws-cdk/aws-iotsitewise/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-iotsitewise", "module": "aws_cdk.aws_iotsitewise" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-iotthingsgraph/package.json b/packages/@aws-cdk/aws-iotthingsgraph/package.json index 38352027ee8ae..fd5ffd5531c81 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/package.json +++ b/packages/@aws-cdk/aws-iotthingsgraph/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iotwireless/package.json b/packages/@aws-cdk/aws-iotwireless/package.json index b9cdebdb5a3d8..b5a5f1aee6dc7 100644 --- a/packages/@aws-cdk/aws-iotwireless/package.json +++ b/packages/@aws-cdk/aws-iotwireless/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-iotwireless", "module": "aws_cdk.aws_iotwireless" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-ivs/package.json b/packages/@aws-cdk/aws-ivs/package.json index 2ef5a15ca7b34..d078cf3eceeaa 100644 --- a/packages/@aws-cdk/aws-ivs/package.json +++ b/packages/@aws-cdk/aws-ivs/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-ivs", "module": "aws_cdk.aws_ivs" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "awslint": { diff --git a/packages/@aws-cdk/aws-kendra/package.json b/packages/@aws-cdk/aws-kendra/package.json index 4c1c9b79a4d9b..2da553adf56a5 100644 --- a/packages/@aws-cdk/aws-kendra/package.json +++ b/packages/@aws-cdk/aws-kendra/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.Kendra", diff --git a/packages/@aws-cdk/aws-lakeformation/package.json b/packages/@aws-cdk/aws-lakeformation/package.json index e1cdfff184bc3..2c37cb38a608f 100644 --- a/packages/@aws-cdk/aws-lakeformation/package.json +++ b/packages/@aws-cdk/aws-lakeformation/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-licensemanager/package.json b/packages/@aws-cdk/aws-licensemanager/package.json index 802c3eaebd97f..2a080395c788e 100644 --- a/packages/@aws-cdk/aws-licensemanager/package.json +++ b/packages/@aws-cdk/aws-licensemanager/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-licensemanager", "module": "aws_cdk.aws_licensemanager" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-lightsail/package.json b/packages/@aws-cdk/aws-lightsail/package.json index 75ce8a8401de5..c99305e2ad42c 100644 --- a/packages/@aws-cdk/aws-lightsail/package.json +++ b/packages/@aws-cdk/aws-lightsail/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.Lightsail", diff --git a/packages/@aws-cdk/aws-location/package.json b/packages/@aws-cdk/aws-location/package.json index 714e4a652448c..7acaf2d81fd60 100644 --- a/packages/@aws-cdk/aws-location/package.json +++ b/packages/@aws-cdk/aws-location/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-location", "module": "aws_cdk.aws_location" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index ceb9c5c120499..e1e43b017c992 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-lookoutequipment/package.json b/packages/@aws-cdk/aws-lookoutequipment/package.json index 673dce8a9e5db..26dc399bb1d3d 100644 --- a/packages/@aws-cdk/aws-lookoutequipment/package.json +++ b/packages/@aws-cdk/aws-lookoutequipment/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-lookoutequipment", "module": "aws_cdk.aws_lookoutequipment" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-lookoutmetrics/package.json b/packages/@aws-cdk/aws-lookoutmetrics/package.json index dd6721487fb9e..257c1ccad03c5 100644 --- a/packages/@aws-cdk/aws-lookoutmetrics/package.json +++ b/packages/@aws-cdk/aws-lookoutmetrics/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-lookoutmetrics", "module": "aws_cdk.aws_lookoutmetrics" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-lookoutvision/package.json b/packages/@aws-cdk/aws-lookoutvision/package.json index da277979b41e2..3722553279a80 100644 --- a/packages/@aws-cdk/aws-lookoutvision/package.json +++ b/packages/@aws-cdk/aws-lookoutvision/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-lookoutvision", "module": "aws_cdk.aws_lookoutvision" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-macie/package.json b/packages/@aws-cdk/aws-macie/package.json index cf5dcf3ddc027..0db2eaf329169 100644 --- a/packages/@aws-cdk/aws-macie/package.json +++ b/packages/@aws-cdk/aws-macie/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-managedblockchain/package.json b/packages/@aws-cdk/aws-managedblockchain/package.json index 2a56972081f67..8f8f77907edb4 100644 --- a/packages/@aws-cdk/aws-managedblockchain/package.json +++ b/packages/@aws-cdk/aws-managedblockchain/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-mediaconnect/package.json b/packages/@aws-cdk/aws-mediaconnect/package.json index 4fa2d509bc28f..ca2d9a593ea5a 100644 --- a/packages/@aws-cdk/aws-mediaconnect/package.json +++ b/packages/@aws-cdk/aws-mediaconnect/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-mediaconnect", "module": "aws_cdk.aws_mediaconnect" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-mediaconvert/package.json b/packages/@aws-cdk/aws-mediaconvert/package.json index a65ece075fb44..0ee4ec64dcbe7 100644 --- a/packages/@aws-cdk/aws-mediaconvert/package.json +++ b/packages/@aws-cdk/aws-mediaconvert/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-medialive/package.json b/packages/@aws-cdk/aws-medialive/package.json index a857dc5e4280a..f87426fc1fd81 100644 --- a/packages/@aws-cdk/aws-medialive/package.json +++ b/packages/@aws-cdk/aws-medialive/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-mediapackage/package.json b/packages/@aws-cdk/aws-mediapackage/package.json index 0a3ca05146fb9..31e2b39fe0c9a 100644 --- a/packages/@aws-cdk/aws-mediapackage/package.json +++ b/packages/@aws-cdk/aws-mediapackage/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.MediaPackage", diff --git a/packages/@aws-cdk/aws-mediastore/package.json b/packages/@aws-cdk/aws-mediastore/package.json index 34b83f88e975b..ece435e1c014f 100644 --- a/packages/@aws-cdk/aws-mediastore/package.json +++ b/packages/@aws-cdk/aws-mediastore/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-memorydb/package.json b/packages/@aws-cdk/aws-memorydb/package.json index aaeacc2305d5f..b85421f3713f9 100644 --- a/packages/@aws-cdk/aws-memorydb/package.json +++ b/packages/@aws-cdk/aws-memorydb/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-memorydb", "module": "aws_cdk.aws_memorydb" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-mwaa/package.json b/packages/@aws-cdk/aws-mwaa/package.json index e0c7e0c26544e..f0a0cec6a6877 100644 --- a/packages/@aws-cdk/aws-mwaa/package.json +++ b/packages/@aws-cdk/aws-mwaa/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-mwaa", "module": "aws_cdk.aws_mwaa" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-neptune/README.md b/packages/@aws-cdk/aws-neptune/README.md index c4f131b27d550..77f50a7f6192d 100644 --- a/packages/@aws-cdk/aws-neptune/README.md +++ b/packages/@aws-cdk/aws-neptune/README.md @@ -36,7 +36,7 @@ To set up a Neptune database, define a `DatabaseCluster`. You must always launch ```ts const cluster = new neptune.DatabaseCluster(this, 'Database', { vpc, - instanceType: neptune.InstanceType.R5_LARGE + instanceType: neptune.InstanceType.R5_LARGE, }); ``` @@ -92,7 +92,7 @@ const clusterParams = new neptune.ClusterParameterGroup(this, 'ClusterParams', { const dbParams = new neptune.ParameterGroup(this, 'DbParams', { description: 'Db parameter group', parameters: { - neptune_query_timeout: '120000' + neptune_query_timeout: '120000', }, }); @@ -113,7 +113,7 @@ attribute. const cluster = new neptune.DatabaseCluster(this, 'Database', { vpc, instanceType: neptune.InstanceType.R5_LARGE, - instances: 2 + instances: 2, }); ``` @@ -122,7 +122,7 @@ Additionally it is also possible to add replicas using `DatabaseInstance` for an ```ts fixture=with-cluster const replica1 = new neptune.DatabaseInstance(this, 'Instance', { cluster, - instanceType: neptune.InstanceType.R5_LARGE + instanceType: neptune.InstanceType.R5_LARGE, }); ``` @@ -133,9 +133,9 @@ the engine of the entire cluster to the latest minor version after a stabilizati window of 2 to 3 weeks. ```ts -new neptune.DatabaseCluster(stack, 'Cluster', { - vpc, - instanceType: InstanceType.R5_LARGE, - autoMinorVersionUpgrade: true - }); +new neptune.DatabaseCluster(this, 'Cluster', { + vpc, + instanceType: neptune.InstanceType.R5_LARGE, + autoMinorVersionUpgrade: true, +}); ``` diff --git a/packages/@aws-cdk/aws-neptune/package.json b/packages/@aws-cdk/aws-neptune/package.json index 0f524965e61f5..27c8c35f6e980 100644 --- a/packages/@aws-cdk/aws-neptune/package.json +++ b/packages/@aws-cdk/aws-neptune/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-networkfirewall/package.json b/packages/@aws-cdk/aws-networkfirewall/package.json index 0fb6559679080..91e96fd0b3a46 100644 --- a/packages/@aws-cdk/aws-networkfirewall/package.json +++ b/packages/@aws-cdk/aws-networkfirewall/package.json @@ -28,6 +28,13 @@ "distName": "aws-cdk.aws-networkfirewall", "module": "aws_cdk.aws_networkfirewall" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-networkmanager/package.json b/packages/@aws-cdk/aws-networkmanager/package.json index e86cd346d6a3c..696efca60f8eb 100644 --- a/packages/@aws-cdk/aws-networkmanager/package.json +++ b/packages/@aws-cdk/aws-networkmanager/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-nimblestudio/package.json b/packages/@aws-cdk/aws-nimblestudio/package.json index 4a760f3ca04f2..c033e0066f94e 100644 --- a/packages/@aws-cdk/aws-nimblestudio/package.json +++ b/packages/@aws-cdk/aws-nimblestudio/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-nimblestudio", "module": "aws_cdk.aws_nimblestudio" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-opsworks/package.json b/packages/@aws-cdk/aws-opsworks/package.json index ab1b39f13d8d6..838ff7003ff62 100644 --- a/packages/@aws-cdk/aws-opsworks/package.json +++ b/packages/@aws-cdk/aws-opsworks/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-opsworkscm/package.json b/packages/@aws-cdk/aws-opsworkscm/package.json index 1b32bd96310aa..1220456e3ff0b 100644 --- a/packages/@aws-cdk/aws-opsworkscm/package.json +++ b/packages/@aws-cdk/aws-opsworkscm/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-panorama/package.json b/packages/@aws-cdk/aws-panorama/package.json index b49f7b48cfb52..37658a09b0c61 100644 --- a/packages/@aws-cdk/aws-panorama/package.json +++ b/packages/@aws-cdk/aws-panorama/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.Panorama", @@ -30,6 +37,13 @@ "distName": "aws-cdk.aws-panorama", "module": "aws_cdk.aws_panorama" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-pinpoint/package.json b/packages/@aws-cdk/aws-pinpoint/package.json index fd77ed7f9c3c3..30801027c4e06 100644 --- a/packages/@aws-cdk/aws-pinpoint/package.json +++ b/packages/@aws-cdk/aws-pinpoint/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-pinpointemail/package.json b/packages/@aws-cdk/aws-pinpointemail/package.json index d50d8720e25e3..26486ee72627b 100644 --- a/packages/@aws-cdk/aws-pinpointemail/package.json +++ b/packages/@aws-cdk/aws-pinpointemail/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-qldb/package.json b/packages/@aws-cdk/aws-qldb/package.json index 584ee48921e4c..a35637354c0c1 100644 --- a/packages/@aws-cdk/aws-qldb/package.json +++ b/packages/@aws-cdk/aws-qldb/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-quicksight/package.json b/packages/@aws-cdk/aws-quicksight/package.json index 495c2e3fa0a5f..270c171d3b5cb 100644 --- a/packages/@aws-cdk/aws-quicksight/package.json +++ b/packages/@aws-cdk/aws-quicksight/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-quicksight", "module": "aws_cdk.aws_quicksight" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-ram/package.json b/packages/@aws-cdk/aws-ram/package.json index c66d84681500c..1064bb16fc89f 100644 --- a/packages/@aws-cdk/aws-ram/package.json +++ b/packages/@aws-cdk/aws-ram/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-rekognition/package.json b/packages/@aws-cdk/aws-rekognition/package.json index b7371d019400b..9cf5d2e0d407d 100644 --- a/packages/@aws-cdk/aws-rekognition/package.json +++ b/packages/@aws-cdk/aws-rekognition/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.Rekognition", @@ -30,6 +37,13 @@ "distName": "aws-cdk.aws-rekognition", "module": "aws_cdk.aws_rekognition" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-resourcegroups/package.json b/packages/@aws-cdk/aws-resourcegroups/package.json index 67dc38bf37492..caf23fb138d50 100644 --- a/packages/@aws-cdk/aws-resourcegroups/package.json +++ b/packages/@aws-cdk/aws-resourcegroups/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-robomaker/package.json b/packages/@aws-cdk/aws-robomaker/package.json index 6748a1e52affc..d40dc417d86d6 100644 --- a/packages/@aws-cdk/aws-robomaker/package.json +++ b/packages/@aws-cdk/aws-robomaker/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-route53recoverycontrol/package.json b/packages/@aws-cdk/aws-route53recoverycontrol/package.json index 316ce7ec6b312..0ec2546ada38d 100644 --- a/packages/@aws-cdk/aws-route53recoverycontrol/package.json +++ b/packages/@aws-cdk/aws-route53recoverycontrol/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-route53recoverycontrol", "module": "aws_cdk.aws_route53recoverycontrol" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-route53recoveryreadiness/package.json b/packages/@aws-cdk/aws-route53recoveryreadiness/package.json index f0a1538967e6b..6dcaed6cb8433 100644 --- a/packages/@aws-cdk/aws-route53recoveryreadiness/package.json +++ b/packages/@aws-cdk/aws-route53recoveryreadiness/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-route53recoveryreadiness", "module": "aws_cdk.aws_route53recoveryreadiness" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-s3objectlambda/package.json b/packages/@aws-cdk/aws-s3objectlambda/package.json index 3e7849ee2de72..0e1020f5e6dc1 100644 --- a/packages/@aws-cdk/aws-s3objectlambda/package.json +++ b/packages/@aws-cdk/aws-s3objectlambda/package.json @@ -30,6 +30,13 @@ "distName": "aws-cdk.aws-s3objectlambda", "module": "aws_cdk.aws_s3objectlambda" } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } } }, "repository": { diff --git a/packages/@aws-cdk/aws-s3outposts/package.json b/packages/@aws-cdk/aws-s3outposts/package.json index 230241444e76d..9c1b9dc830771 100644 --- a/packages/@aws-cdk/aws-s3outposts/package.json +++ b/packages/@aws-cdk/aws-s3outposts/package.json @@ -7,6 +7,13 @@ "jsii": { "outdir": "dist", "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.S3Outposts", diff --git a/packages/@aws-cdk/aws-sagemaker/package.json b/packages/@aws-cdk/aws-sagemaker/package.json index 49d7b6d54f5ac..9741c8b8d96a3 100644 --- a/packages/@aws-cdk/aws-sagemaker/package.json +++ b/packages/@aws-cdk/aws-sagemaker/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 37ddba18cf79b..7b955ade95a3f 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sdb/package.json b/packages/@aws-cdk/aws-sdb/package.json index 466c7fc72acf1..4636ae5160146 100644 --- a/packages/@aws-cdk/aws-sdb/package.json +++ b/packages/@aws-cdk/aws-sdb/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-servicecatalog/package.json b/packages/@aws-cdk/aws-servicecatalog/package.json index e11b48a0c3392..d5493a3813974 100644 --- a/packages/@aws-cdk/aws-servicecatalog/package.json +++ b/packages/@aws-cdk/aws-servicecatalog/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-servicediscovery/package.json b/packages/@aws-cdk/aws-servicediscovery/package.json index 0cd7758a3f1a4..ba4ab174a807e 100644 --- a/packages/@aws-cdk/aws-servicediscovery/package.json +++ b/packages/@aws-cdk/aws-servicediscovery/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index 2d42ecb26c71b..0165754b44065 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-waf/package.json b/packages/@aws-cdk/aws-waf/package.json index d1f980c9a985b..8aaf46f4b625f 100644 --- a/packages/@aws-cdk/aws-waf/package.json +++ b/packages/@aws-cdk/aws-waf/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-wafregional/package.json b/packages/@aws-cdk/aws-wafregional/package.json index c3aff82a3a269..485d9962f8424 100644 --- a/packages/@aws-cdk/aws-wafregional/package.json +++ b/packages/@aws-cdk/aws-wafregional/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-workspaces/package.json b/packages/@aws-cdk/aws-workspaces/package.json index e652fa57e8549..95758a0601e75 100644 --- a/packages/@aws-cdk/aws-workspaces/package.json +++ b/packages/@aws-cdk/aws-workspaces/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index a020985f920a7..682764dae229f 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "scripts": { "build": "cdk-build", diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 00e937a053bd3..ae7be92395bca 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,13 +1,3 @@ - -## Unapplied changes - -* AWS::ECS is at 51.0.0 - - -## Unapplied changes - -* AWS::ECS is at 51.0.0 - # CloudFormation Resource Specification v53.1.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/build-tools/update.sh b/packages/@aws-cdk/cfnspec/build-tools/update.sh index 470b4d4de4d6a..9cb2376f1104e 100755 --- a/packages/@aws-cdk/cfnspec/build-tools/update.sh +++ b/packages/@aws-cdk/cfnspec/build-tools/update.sh @@ -61,13 +61,17 @@ update-spec \ spec-source/specification/000_cfn/000_official \ true true +old_version=$(cat cfn.version) +new_version=$(node -p "require('${scriptdir}/../spec-source/specification/000_cfn/000_official/001_Version.json').ResourceSpecificationVersion") echo >&2 "Recording new version..." rm -f cfn.version -node -p "require('${scriptdir}/../spec-source/specification/000_cfn/000_official/001_Version.json').ResourceSpecificationVersion" > cfn.version +echo "$new_version" > cfn.version - -echo >&2 "Reporting outdated specs..." -node build-tools/report-issues spec-source/specification/000_cfn/000_official/ outdated >> CHANGELOG.md.new +# Only report outdated specs if we made changes, otherwise we're stuck reporting changes every time. +if [[ "$new_version" != "$old_version" ]]; then + echo >&2 "Reporting outdated specs..." + node build-tools/report-issues spec-source/specification/000_cfn/000_official/ outdated >> CHANGELOG.md.new +fi update-spec \ "Serverless Application Model (SAM) Resource Specification" \ diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index e0d91b4c3a21d..f37f388b24062 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -29,7 +29,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/lambda-layer-node-proxy-agent/README.md b/packages/@aws-cdk/lambda-layer-node-proxy-agent/README.md index 45187394cb8b2..f27c51013b3fc 100644 --- a/packages/@aws-cdk/lambda-layer-node-proxy-agent/README.md +++ b/packages/@aws-cdk/lambda-layer-node-proxy-agent/README.md @@ -16,8 +16,11 @@ This module exports a single class called `NodeProxyAgentLayer` which is a `lamb Usage: ```ts -const fn = new lambda.Function(...); -fn.addLayers(new NodeProxyAgentLayer(stack, 'NodeProxyAgentLayer')); +import { NodeProxyAgentLayer } from '@aws-cdk/lambda-layer-node-proxy-agent'; +import * as lambda from '@aws-cdk/aws-lambda'; + +declare const fn: lambda.Function; +fn.addLayers(new NodeProxyAgentLayer(this, 'NodeProxyAgentLayer')); ``` [`proxy-agent`](https://www.npmjs.com/package/proxy-agent) will be installed under `/opt/nodejs/node_modules`. 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 b4e0211270c66..1753c1057db84 100644 --- a/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json +++ b/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json @@ -29,7 +29,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/lambda-layer-node-proxy-agent/rosetta/default.ts-fixture b/packages/@aws-cdk/lambda-layer-node-proxy-agent/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..50d86e8a055ce --- /dev/null +++ b/packages/@aws-cdk/lambda-layer-node-proxy-agent/rosetta/default.ts-fixture @@ -0,0 +1,10 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/region-info/README.md b/packages/@aws-cdk/region-info/README.md index 0f1186318ee49..b8d75339c3320 100644 --- a/packages/@aws-cdk/region-info/README.md +++ b/packages/@aws-cdk/region-info/README.md @@ -22,10 +22,8 @@ the form of the `RegionInfo` class. This is the preferred way to interact with the regional information database: ```ts -import { RegionInfo } from '@aws-cdk/region-info'; - // Get the information for "eu-west-1": -const region = RegionInfo.get('eu-west-1'); +const region = regionInfo.RegionInfo.get('eu-west-1'); // Access attributes: region.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com @@ -44,8 +42,6 @@ a list of known fact names, which can then be used with the `RegionInfo` to retrieve a particular value: ```ts -import * as regionInfo from '@aws-cdk/region-info'; - const codeDeployPrincipal = regionInfo.Fact.find('us-east-1', regionInfo.FactName.servicePrincipal('codedeploy.amazonaws.com')); // => codedeploy.us-east-1.amazonaws.com @@ -60,11 +56,13 @@ missing from the library. In such cases, the `Fact.register` method can be used to inject FactName into the database: ```ts -regionInfo.Fact.register({ - region: 'bermuda-triangle-1', - name: regionInfo.FactName.servicePrincipal('s3.amazonaws.com'), - value: 's3-website.bermuda-triangle-1.nowhere.com', -}); +class MyFact implements regionInfo.IFact { + public readonly region = 'bermuda-triangle-1'; + public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com'); + public readonly value = 's3-website.bermuda-triangle-1.nowhere.com'; +} + +regionInfo.Fact.register(new MyFact()); ``` ## Overriding incorrect information @@ -74,11 +72,13 @@ overridden using the same `Fact.register` method demonstrated above, simply adding an extra boolean argument: ```ts -regionInfo.Fact.register({ - region: 'us-east-1', - name: regionInfo.FactName.servicePrincipal('service.amazonaws.com'), - value: 'the-correct-principal.amazonaws.com', -}, true /* Allow overriding information */); +class MyFact implements regionInfo.IFact { + public readonly region = 'us-east-1'; + public readonly name = regionInfo.FactName.servicePrincipal('service.amazonaws.com'); + public readonly value = 'the-correct-principal.amazonaws.com'; +} + +regionInfo.Fact.register(new MyFact(), true /* Allow overriding information */); ``` If you happen to have stumbled upon incorrect data built into this library, it diff --git a/packages/@aws-cdk/region-info/package.json b/packages/@aws-cdk/region-info/package.json index dba2268c2fa22..f3400ed30b3e4 100644 --- a/packages/@aws-cdk/region-info/package.json +++ b/packages/@aws-cdk/region-info/package.json @@ -28,7 +28,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "scripts": { "gen": "bash build-tools/generate.sh", diff --git a/packages/@aws-cdk/region-info/rosetta/default.ts-fixture b/packages/@aws-cdk/region-info/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..3a11f7f47a475 --- /dev/null +++ b/packages/@aws-cdk/region-info/rosetta/default.ts-fixture @@ -0,0 +1,11 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as regionInfo from '@aws-cdk/region-info'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + /// here + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index b0035c4e80552..c30424077862f 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -48,7 +48,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "scripts": { "build": "cdk-build", diff --git a/version.v1.json b/version.v1.json index b2dc0b4c0995b..98a18d4b799df 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.140.0" + "version": "1.141.0" } \ No newline at end of file