diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index 55b2b51435beb..5565619283b17 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,19 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.90.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.89.0-alpha.0...v2.90.0-alpha.0) (2023-08-04) + + +### Features + +* **glue:** glue tables can include storage parameters ([#24498](https://github.com/aws/aws-cdk/issues/24498)) ([f1df9ab](https://github.com/aws/aws-cdk/commit/f1df9ab2ba29051016f052ffe9a629ca698289b8)), closes [#23132](https://github.com/aws/aws-cdk/issues/23132) + + +### Bug Fixes + +* **app-staging-synthesizer:** misleading error message about environment-agnostic/aware stacks ([#26607](https://github.com/aws/aws-cdk/issues/26607)) ([7e2f335](https://github.com/aws/aws-cdk/commit/7e2f335b60bda549c6abd628863b3535f9e9f153)) +* **synthetics:** updated handler validation ([#26569](https://github.com/aws/aws-cdk/issues/26569)) ([1eaec92](https://github.com/aws/aws-cdk/commit/1eaec92cd7cc201c92990ab1f57a8299107327db)), closes [#26540](https://github.com/aws/aws-cdk/issues/26540) + ## [2.89.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.88.0-alpha.0...v2.89.0-alpha.0) (2023-07-28) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index 38dcf7eac888c..984051004cc46 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,26 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.90.0](https://github.com/aws/aws-cdk/compare/v2.89.0...v2.90.0) (2023-08-04) + + +### Features + +* **aws-cdk-lib:** ADOT Lambda Layer v0.31.0 ([#26505](https://github.com/aws/aws-cdk/issues/26505)) ([03c6f6f](https://github.com/aws/aws-cdk/commit/03c6f6fb667a1d7034537b514103215bb949a8da)) +* **core:** new RemovalPolicy.RETAIN_EXCEPT_ON_CREATE to only retain resources that have been successfully created ([#26602](https://github.com/aws/aws-cdk/issues/26602)) ([c84666c](https://github.com/aws/aws-cdk/commit/c84666c22658e22956d79b83d0d226278d829f9d)), closes [#26595](https://github.com/aws/aws-cdk/issues/26595) +* **core:** support ssh build arg in DockerImageAsset ([#26356](https://github.com/aws/aws-cdk/issues/26356)) ([7b3d381](https://github.com/aws/aws-cdk/commit/7b3d3813124c6c1dfa912c4fbe20772c84a0ffc6)) +* **stepfunctions:** allow setting comment on state machine ([#25858](https://github.com/aws/aws-cdk/issues/25858)) ([6a70b4f](https://github.com/aws/aws-cdk/commit/6a70b4fe83f6ab2571086454909aae13ec9959fb)) +* update AWS Service Spec ([#26579](https://github.com/aws/aws-cdk/issues/26579)) ([6c588da](https://github.com/aws/aws-cdk/commit/6c588da2c6b1c2f5a53fb9151c84c7298ce2427e)) + + +### Bug Fixes + +* **cli:** specifying --quiet does not suppress asset building and publishing logs ([#26493](https://github.com/aws/aws-cdk/issues/26493)) ([b12bc67](https://github.com/aws/aws-cdk/commit/b12bc676bd5f99843b224839bc32504b47f0599e)), closes [#26265](https://github.com/aws/aws-cdk/issues/26265) +* **ec2:** flowLogName property for FlowLog construct does not work ([#26371](https://github.com/aws/aws-cdk/issues/26371)) ([f910f78](https://github.com/aws/aws-cdk/commit/f910f7840f9ceb02780dc3b08d548fb7a2072e58)), closes [#26370](https://github.com/aws/aws-cdk/issues/26370) +* **ecr:** error handling compatible with aws sdk v3 ([#26608](https://github.com/aws/aws-cdk/issues/26608)) ([300989a](https://github.com/aws/aws-cdk/commit/300989a675bd9fc9c2829c5115efe34e753e0976)), closes [#26433](https://github.com/aws/aws-cdk/issues/26433) +* **ecs:** unclear docs on valid ec2 task definition placement constraints and no validation of input [#25933](https://github.com/aws/aws-cdk/issues/25933) ([#26384](https://github.com/aws/aws-cdk/issues/26384)) ([4c57f45](https://github.com/aws/aws-cdk/commit/4c57f4550917f5a280a5c0a79f2ae03325ef3a66)) +* **logs:** LogRetention Custom Resource does not use Node18 ([#26609](https://github.com/aws/aws-cdk/issues/26609)) ([54e64c7](https://github.com/aws/aws-cdk/commit/54e64c7eb0435bd043affe4bbd8dc2fdbddbcffd)), closes [#26461](https://github.com/aws/aws-cdk/issues/26461) + ## [2.89.0](https://github.com/aws/aws-cdk/compare/v2.88.0...v2.89.0) (2023-07-28) diff --git a/package.json b/package.json index 58b51f2d73547..a105a8dec169b 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,9 @@ "fs-extra": "^9.1.0", "graceful-fs": "^4.2.11", "jest-junit": "^13.2.0", - "jsii-diff": "1.86.0", - "jsii-pacmak": "1.86.0", - "jsii-reflect": "1.86.0", + "jsii-diff": "1.86.1", + "jsii-pacmak": "1.86.1", + "jsii-reflect": "1.86.1", "jsii-rosetta": "~5.1.9", "lerna": "^7.1.4", "nx": "^16.6.0", @@ -173,4 +173,4 @@ "dependencies": { "string-width": "^4.2.3" } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk-testing/cli-integ/package.json b/packages/@aws-cdk-testing/cli-integ/package.json index 8ee70f8d70e1a..04e9e1b978f03 100644 --- a/packages/@aws-cdk-testing/cli-integ/package.json +++ b/packages/@aws-cdk-testing/cli-integ/package.json @@ -39,7 +39,7 @@ }, "dependencies": { "@octokit/rest": "^18.12.0", - "aws-sdk": "^2.1427.0", + "aws-sdk": "^2.1432.0", "axios": "^0.27.2", "fs-extra": "^9.1.0", "glob": "^7.2.3", diff --git a/packages/@aws-cdk-testing/framework-integ/package.json b/packages/@aws-cdk-testing/framework-integ/package.json index d10f1c99cb41b..ebdd408882be1 100644 --- a/packages/@aws-cdk-testing/framework-integ/package.json +++ b/packages/@aws-cdk-testing/framework-integ/package.json @@ -39,9 +39,9 @@ "@aws-cdk/integ-tests-alpha": "0.0.0", "@aws-cdk/lambda-layer-kubectl-v24": "^2.0.242", "aws-cdk-lib": "0.0.0", - "aws-sdk": "^2.1427.0", + "aws-sdk": "^2.1432.0", "aws-sdk-mock": "5.6.0", - "cdk8s": "^2.30.0", + "cdk8s": "^2.38.0", "cdk8s-plus-24": "2.12.1", "constructs": "^10.0.0" }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json index 639edcbf6b37e..240e9a6af7eeb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json @@ -2,6 +2,6 @@ "name": "eks-service-account-sdk-call-integ-test", "private": "true", "dependencies": { - "aws-sdk": "^2.1427.0" + "aws-sdk": "^2.1432.0" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/asset.ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/asset.ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd/__entrypoint__.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/asset.ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/asset.ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd/index.js new file mode 100644 index 0000000000000..cf597f535efd3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/asset.ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd/index.js @@ -0,0 +1,81 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +// eslint-disable-next-line import/no-extraneous-dependencies +const aws_sdk_1 = require("aws-sdk"); +const ec2 = new aws_sdk_1.EC2(); +/** + * The default security group ingress rule. This can be used to both revoke and authorize the rules + */ +function ingressRuleParams(groupId, account) { + return { + GroupId: groupId, + IpPermissions: [{ + UserIdGroupPairs: [{ + GroupId: groupId, + UserId: account, + }], + IpProtocol: '-1', + }], + }; +} +/** + * The default security group egress rule. This can be used to both revoke and authorize the rules + */ +function egressRuleParams(groupId) { + return { + GroupId: groupId, + IpPermissions: [{ + IpRanges: [{ + CidrIp: '0.0.0.0/0', + }], + IpProtocol: '-1', + }], + }; +} +/** + * Process a custom resource request to restrict the default security group + * ingress & egress rules. + * + * When someone turns off the property then this custom resource will be deleted in which + * case we should add back the rules that were removed. + */ +async function handler(event) { + const securityGroupId = event.ResourceProperties.DefaultSecurityGroupId; + const account = event.ResourceProperties.Account; + switch (event.RequestType) { + case 'Create': + return revokeRules(securityGroupId, account); + case 'Update': + return onUpdate(event); + case 'Delete': + return authorizeRules(securityGroupId, account); + } +} +exports.handler = handler; +async function onUpdate(event) { + const oldSg = event.OldResourceProperties.DefaultSecurityGroupId; + const newSg = event.ResourceProperties.DefaultSecurityGroupId; + if (oldSg !== newSg) { + await authorizeRules(oldSg, event.ResourceProperties.Account); + await revokeRules(newSg, event.ResourceProperties.Account); + } + return; +} +/** + * Revoke both ingress and egress rules + */ +async function revokeRules(groupId, account) { + await ec2.revokeSecurityGroupEgress(egressRuleParams(groupId)).promise(); + await ec2.revokeSecurityGroupIngress(ingressRuleParams(groupId, account)).promise(); + return; +} +/** + * Authorize both ingress and egress rules + */ +async function authorizeRules(groupId, account) { + await ec2.authorizeSecurityGroupIngress(ingressRuleParams(groupId, account)).promise(); + await ec2.authorizeSecurityGroupEgress(egressRuleParams(groupId)).promise(); + return; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2REFBNkQ7QUFDN0QscUNBQThCO0FBRTlCLE1BQU0sR0FBRyxHQUFHLElBQUksYUFBRyxFQUFFLENBQUM7QUFFdEI7O0dBRUc7QUFDSCxTQUFTLGlCQUFpQixDQUFDLE9BQWUsRUFBRSxPQUFlO0lBQ3pELE9BQU87UUFDTCxPQUFPLEVBQUUsT0FBTztRQUNoQixhQUFhLEVBQUUsQ0FBQztnQkFDZCxnQkFBZ0IsRUFBRSxDQUFDO3dCQUNqQixPQUFPLEVBQUUsT0FBTzt3QkFDaEIsTUFBTSxFQUFFLE9BQU87cUJBQ2hCLENBQUM7Z0JBQ0YsVUFBVSxFQUFFLElBQUk7YUFDakIsQ0FBQztLQUNILENBQUM7QUFDSixDQUFDO0FBRUQ7O0dBRUc7QUFDSCxTQUFTLGdCQUFnQixDQUFDLE9BQWU7SUFDdkMsT0FBTztRQUNMLE9BQU8sRUFBRSxPQUFPO1FBQ2hCLGFBQWEsRUFBRSxDQUFDO2dCQUNkLFFBQVEsRUFBRSxDQUFDO3dCQUNULE1BQU0sRUFBRSxXQUFXO3FCQUNwQixDQUFDO2dCQUNGLFVBQVUsRUFBRSxJQUFJO2FBQ2pCLENBQUM7S0FDSCxDQUFDO0FBQ0osQ0FBQztBQUVEOzs7Ozs7R0FNRztBQUNJLEtBQUssVUFBVSxPQUFPLENBQUMsS0FBa0Q7SUFDOUUsTUFBTSxlQUFlLEdBQUcsS0FBSyxDQUFDLGtCQUFrQixDQUFDLHNCQUFzQixDQUFDO0lBQ3hFLE1BQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxPQUFPLENBQUM7SUFDakQsUUFBUSxLQUFLLENBQUMsV0FBVyxFQUFFO1FBQ3pCLEtBQUssUUFBUTtZQUNYLE9BQU8sV0FBVyxDQUFDLGVBQWUsRUFBRSxPQUFPLENBQUMsQ0FBQztRQUMvQyxLQUFLLFFBQVE7WUFDWCxPQUFPLFFBQVEsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUN6QixLQUFLLFFBQVE7WUFDWCxPQUFPLGNBQWMsQ0FBQyxlQUFlLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDbkQ7QUFDSCxDQUFDO0FBWEQsMEJBV0M7QUFDRCxLQUFLLFVBQVUsUUFBUSxDQUFDLEtBQXdEO0lBQzlFLE1BQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxxQkFBcUIsQ0FBQyxzQkFBc0IsQ0FBQztJQUNqRSxNQUFNLEtBQUssR0FBRyxLQUFLLENBQUMsa0JBQWtCLENBQUMsc0JBQXNCLENBQUM7SUFDOUQsSUFBSSxLQUFLLEtBQUssS0FBSyxFQUFFO1FBQ25CLE1BQU0sY0FBYyxDQUFDLEtBQUssRUFBRSxLQUFLLENBQUMsa0JBQWtCLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDOUQsTUFBTSxXQUFXLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxPQUFPLENBQUMsQ0FBQztLQUM1RDtJQUNELE9BQU87QUFDVCxDQUFDO0FBRUQ7O0dBRUc7QUFDSCxLQUFLLFVBQVUsV0FBVyxDQUFDLE9BQWUsRUFBRSxPQUFlO0lBQ3pELE1BQU0sR0FBRyxDQUFDLHlCQUF5QixDQUFDLGdCQUFnQixDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDekUsTUFBTSxHQUFHLENBQUMsMEJBQTBCLENBQUMsaUJBQWlCLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDcEYsT0FBTztBQUNULENBQUM7QUFFRDs7R0FFRztBQUNILEtBQUssVUFBVSxjQUFjLENBQUMsT0FBZSxFQUFFLE9BQWU7SUFDNUQsTUFBTSxHQUFHLENBQUMsNkJBQTZCLENBQUMsaUJBQWlCLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDdkYsTUFBTSxHQUFHLENBQUMsNEJBQTRCLENBQUMsZ0JBQWdCLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQztJQUM1RSxPQUFPO0FBQ1QsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXNcbmltcG9ydCB7IEVDMiB9IGZyb20gJ2F3cy1zZGsnO1xuXG5jb25zdCBlYzIgPSBuZXcgRUMyKCk7XG5cbi8qKlxuICogVGhlIGRlZmF1bHQgc2VjdXJpdHkgZ3JvdXAgaW5ncmVzcyBydWxlLiBUaGlzIGNhbiBiZSB1c2VkIHRvIGJvdGggcmV2b2tlIGFuZCBhdXRob3JpemUgdGhlIHJ1bGVzXG4gKi9cbmZ1bmN0aW9uIGluZ3Jlc3NSdWxlUGFyYW1zKGdyb3VwSWQ6IHN0cmluZywgYWNjb3VudDogc3RyaW5nKTogRUMyLlJldm9rZVNlY3VyaXR5R3JvdXBJbmdyZXNzUmVxdWVzdCB8IEVDMi5BdXRob3JpemVTZWN1cml0eUdyb3VwSW5ncmVzc1JlcXVlc3Qge1xuICByZXR1cm4ge1xuICAgIEdyb3VwSWQ6IGdyb3VwSWQsXG4gICAgSXBQZXJtaXNzaW9uczogW3tcbiAgICAgIFVzZXJJZEdyb3VwUGFpcnM6IFt7XG4gICAgICAgIEdyb3VwSWQ6IGdyb3VwSWQsXG4gICAgICAgIFVzZXJJZDogYWNjb3VudCxcbiAgICAgIH1dLFxuICAgICAgSXBQcm90b2NvbDogJy0xJyxcbiAgICB9XSxcbiAgfTtcbn1cblxuLyoqXG4gKiBUaGUgZGVmYXVsdCBzZWN1cml0eSBncm91cCBlZ3Jlc3MgcnVsZS4gVGhpcyBjYW4gYmUgdXNlZCB0byBib3RoIHJldm9rZSBhbmQgYXV0aG9yaXplIHRoZSBydWxlc1xuICovXG5mdW5jdGlvbiBlZ3Jlc3NSdWxlUGFyYW1zKGdyb3VwSWQ6IHN0cmluZyk6IEVDMi5SZXZva2VTZWN1cml0eUdyb3VwRWdyZXNzUmVxdWVzdCB8IEVDMi5BdXRob3JpemVTZWN1cml0eUdyb3VwRWdyZXNzUmVxdWVzdCB7XG4gIHJldHVybiB7XG4gICAgR3JvdXBJZDogZ3JvdXBJZCxcbiAgICBJcFBlcm1pc3Npb25zOiBbe1xuICAgICAgSXBSYW5nZXM6IFt7XG4gICAgICAgIENpZHJJcDogJzAuMC4wLjAvMCcsXG4gICAgICB9XSxcbiAgICAgIElwUHJvdG9jb2w6ICctMScsXG4gICAgfV0sXG4gIH07XG59XG5cbi8qKlxuICogUHJvY2VzcyBhIGN1c3RvbSByZXNvdXJjZSByZXF1ZXN0IHRvIHJlc3RyaWN0IHRoZSBkZWZhdWx0IHNlY3VyaXR5IGdyb3VwXG4gKiBpbmdyZXNzICYgZWdyZXNzIHJ1bGVzLlxuICpcbiAqIFdoZW4gc29tZW9uZSB0dXJucyBvZmYgdGhlIHByb3BlcnR5IHRoZW4gdGhpcyBjdXN0b20gcmVzb3VyY2Ugd2lsbCBiZSBkZWxldGVkIGluIHdoaWNoXG4gKiBjYXNlIHdlIHNob3VsZCBhZGQgYmFjayB0aGUgcnVsZXMgdGhhdCB3ZXJlIHJlbW92ZWQuXG4gKi9cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBoYW5kbGVyKGV2ZW50OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50KTogUHJvbWlzZTx2b2lkPiB7XG4gIGNvbnN0IHNlY3VyaXR5R3JvdXBJZCA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5EZWZhdWx0U2VjdXJpdHlHcm91cElkO1xuICBjb25zdCBhY2NvdW50ID0gZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLkFjY291bnQ7XG4gIHN3aXRjaCAoZXZlbnQuUmVxdWVzdFR5cGUpIHtcbiAgICBjYXNlICdDcmVhdGUnOlxuICAgICAgcmV0dXJuIHJldm9rZVJ1bGVzKHNlY3VyaXR5R3JvdXBJZCwgYWNjb3VudCk7XG4gICAgY2FzZSAnVXBkYXRlJzpcbiAgICAgIHJldHVybiBvblVwZGF0ZShldmVudCk7XG4gICAgY2FzZSAnRGVsZXRlJzpcbiAgICAgIHJldHVybiBhdXRob3JpemVSdWxlcyhzZWN1cml0eUdyb3VwSWQsIGFjY291bnQpO1xuICB9XG59XG5hc3luYyBmdW5jdGlvbiBvblVwZGF0ZShldmVudDogQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VVcGRhdGVFdmVudCk6IFByb21pc2U8dm9pZD4ge1xuICBjb25zdCBvbGRTZyA9IGV2ZW50Lk9sZFJlc291cmNlUHJvcGVydGllcy5EZWZhdWx0U2VjdXJpdHlHcm91cElkO1xuICBjb25zdCBuZXdTZyA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5EZWZhdWx0U2VjdXJpdHlHcm91cElkO1xuICBpZiAob2xkU2cgIT09IG5ld1NnKSB7XG4gICAgYXdhaXQgYXV0aG9yaXplUnVsZXMob2xkU2csIGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5BY2NvdW50KTtcbiAgICBhd2FpdCByZXZva2VSdWxlcyhuZXdTZywgZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLkFjY291bnQpO1xuICB9XG4gIHJldHVybjtcbn1cblxuLyoqXG4gKiBSZXZva2UgYm90aCBpbmdyZXNzIGFuZCBlZ3Jlc3MgcnVsZXNcbiAqL1xuYXN5bmMgZnVuY3Rpb24gcmV2b2tlUnVsZXMoZ3JvdXBJZDogc3RyaW5nLCBhY2NvdW50OiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+IHtcbiAgYXdhaXQgZWMyLnJldm9rZVNlY3VyaXR5R3JvdXBFZ3Jlc3MoZWdyZXNzUnVsZVBhcmFtcyhncm91cElkKSkucHJvbWlzZSgpO1xuICBhd2FpdCBlYzIucmV2b2tlU2VjdXJpdHlHcm91cEluZ3Jlc3MoaW5ncmVzc1J1bGVQYXJhbXMoZ3JvdXBJZCwgYWNjb3VudCkpLnByb21pc2UoKTtcbiAgcmV0dXJuO1xufVxuXG4vKipcbiAqIEF1dGhvcml6ZSBib3RoIGluZ3Jlc3MgYW5kIGVncmVzcyBydWxlc1xuICovXG5hc3luYyBmdW5jdGlvbiBhdXRob3JpemVSdWxlcyhncm91cElkOiBzdHJpbmcsIGFjY291bnQ6IHN0cmluZyk6IFByb21pc2U8dm9pZD4ge1xuICBhd2FpdCBlYzIuYXV0aG9yaXplU2VjdXJpdHlHcm91cEluZ3Jlc3MoaW5ncmVzc1J1bGVQYXJhbXMoZ3JvdXBJZCwgYWNjb3VudCkpLnByb21pc2UoKTtcbiAgYXdhaXQgZWMyLmF1dGhvcml6ZVNlY3VyaXR5R3JvdXBFZ3Jlc3MoZWdyZXNzUnVsZVBhcmFtcyhncm91cElkKSkucHJvbWlzZSgpO1xuICByZXR1cm47XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/aws-cdk-rds-integ-instance-create-grant.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/aws-cdk-rds-integ-instance-create-grant.assets.json new file mode 100644 index 0000000000000..a68b74ac24ad2 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/aws-cdk-rds-integ-instance-create-grant.assets.json @@ -0,0 +1,32 @@ +{ + "version": "33.0.0", + "files": { + "ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd": { + "source": { + "path": "asset.ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "3cb4c5b292de90a5cca731c6fccc40d54330b450daa17f661fd5b902cdb88262": { + "source": { + "path": "aws-cdk-rds-integ-instance-create-grant.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "3cb4c5b292de90a5cca731c6fccc40d54330b450daa17f661fd5b902cdb88262.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/aws-cdk-rds-integ-instance-create-grant.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/aws-cdk-rds-integ-instance-create-grant.template.json new file mode 100644 index 0000000000000..3919e084f527e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/aws-cdk-rds-integ-instance-create-grant.template.json @@ -0,0 +1,736 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet1DefaultRoute91CEF279", + "VPCPublicSubnet1RouteTableAssociation0B0896DC" + ] + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet2DefaultRouteB7481BBA", + "VPCPublicSubnet2RouteTableAssociation5A808732" + ] + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-create-grant/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCRestrictDefaultSecurityGroupCustomResource59474679": { + "Type": "Custom::VpcRestrictDefaultSG", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E", + "Arn" + ] + }, + "DefaultSecurityGroupId": { + "Fn::GetAtt": [ + "VPCB9E5F0B4", + "DefaultSecurityGroup" + ] + }, + "Account": { + "Ref": "AWS::AccountId" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "ec2:AuthorizeSecurityGroupIngress", + "ec2:AuthorizeSecurityGroupEgress", + "ec2:RevokeSecurityGroupIngress", + "ec2:RevokeSecurityGroupEgress" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ec2:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":security-group/", + { + "Fn::GetAtt": [ + "VPCB9E5F0B4", + "DefaultSecurityGroup" + ] + } + ] + ] + } + ] + } + ] + } + } + ] + } + }, + "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0", + "Arn" + ] + }, + "Runtime": "nodejs16.x", + "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" + }, + "DependsOn": [ + "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0" + ] + }, + "InstanceSubnetGroupF2CBA54F": { + "Type": "AWS::RDS::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnet group for Instance database", + "SubnetIds": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ] + } + }, + "InstanceSecurityGroupB4E5FA83": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Security group for Instance database", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "awscdkrdsinteginstancecreategrantInstanceSecret88B5032B3fdaad7efa858a3daf9490cf0a702aeb": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "Description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "GenerateSecretString": { + "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"dbuser\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "InstanceSecretAttachment83BEE581": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "awscdkrdsinteginstancecreategrantInstanceSecret88B5032B3fdaad7efa858a3daf9490cf0a702aeb" + }, + "TargetId": { + "Ref": "InstanceC1063A87" + }, + "TargetType": "AWS::RDS::DBInstance" + } + }, + "InstanceC1063A87": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "AllocatedStorage": "100", + "BackupRetentionPeriod": 0, + "CopyTagsToSnapshot": true, + "DBInstanceClass": "db.t3.micro", + "DBSubnetGroupName": { + "Ref": "InstanceSubnetGroupF2CBA54F" + }, + "DeletionProtection": false, + "EnableIAMDatabaseAuthentication": true, + "Engine": "postgres", + "EngineVersion": "14", + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "awscdkrdsinteginstancecreategrantInstanceSecret88B5032B3fdaad7efa858a3daf9490cf0a702aeb" + }, + ":SecretString:password::}}" + ] + ] + }, + "MasterUsername": "dbuser", + "MultiAZ": false, + "PubliclyAccessible": false, + "StorageType": "gp2", + "VPCSecurityGroups": [ + { + "Fn::GetAtt": [ + "InstanceSecurityGroupB4E5FA83", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Snapshot", + "DeletionPolicy": "Snapshot" + }, + "DBRole890CB76D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "DBRoleDefaultPolicyDBB64848": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "rds-db:connect", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":rds-db:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":dbuser:", + { + "Fn::GetAtt": [ + "InstanceC1063A87", + "DbiResourceId" + ] + }, + "/{{resolve:secretsmanager:", + { + "Ref": "InstanceSecretAttachment83BEE581" + }, + ":SecretString:username::}}" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DBRoleDefaultPolicyDBB64848", + "Roles": [ + { + "Ref": "DBRole890CB76D" + } + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/cdk.out new file mode 100644 index 0000000000000..560dae10d018f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"33.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/integ.json new file mode 100644 index 0000000000000..ccea8babdcc2f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "33.0.0", + "testCases": { + "rds-integ-instance-create-grant/DefaultTest": { + "stacks": [ + "aws-cdk-rds-integ-instance-create-grant" + ], + "assertionStack": "rds-integ-instance-create-grant/DefaultTest/DeployAssert", + "assertionStackName": "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/manifest.json new file mode 100644 index 0000000000000..289f724851753 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/manifest.json @@ -0,0 +1,303 @@ +{ + "version": "33.0.0", + "artifacts": { + "aws-cdk-rds-integ-instance-create-grant.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-rds-integ-instance-create-grant.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-rds-integ-instance-create-grant": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-rds-integ-instance-create-grant.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3cb4c5b292de90a5cca731c6fccc40d54330b450daa17f661fd5b902cdb88262.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-rds-integ-instance-create-grant.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-rds-integ-instance-create-grant.assets" + ], + "metadata": { + "/aws-cdk-rds-integ-instance-create-grant/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/VPC/RestrictDefaultSecurityGroupCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCRestrictDefaultSecurityGroupCustomResource59474679" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/Instance/SubnetGroup/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "InstanceSubnetGroupF2CBA54F" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/Instance/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "InstanceSecurityGroupB4E5FA83" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/Instance/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "awscdkrdsinteginstancecreategrantInstanceSecret88B5032B3fdaad7efa858a3daf9490cf0a702aeb" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/Instance/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "InstanceSecretAttachment83BEE581" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/Instance/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "InstanceC1063A87" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/DBRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DBRole890CB76D" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/DBRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DBRoleDefaultPolicyDBB64848" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-rds-integ-instance-create-grant/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-rds-integ-instance-create-grant" + }, + "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.assets" + ], + "metadata": { + "/rds-integ-instance-create-grant/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/rds-integ-instance-create-grant/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "rds-integ-instance-create-grant/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.assets.json new file mode 100644 index 0000000000000..2fa4d86776b5e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.assets.json @@ -0,0 +1,19 @@ +{ + "version": "33.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/rdsinteginstancecreategrantDefaultTestDeployAssertFEE03C52.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/tree.json new file mode 100644 index 0000000000000..d4368bf929372 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.js.snapshot/tree.json @@ -0,0 +1,1117 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-rds-integ-instance-create-grant": { + "id": "aws-cdk-rds-integ-instance-create-grant", + "path": "aws-cdk-rds-integ-instance-create-grant", + "children": { + "VPC": { + "id": "VPC", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ-instance-create-grant/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + }, + "RestrictDefaultSecurityGroupCustomResource": { + "id": "RestrictDefaultSecurityGroupCustomResource", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/RestrictDefaultSecurityGroupCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-rds-integ-instance-create-grant/VPC/RestrictDefaultSecurityGroupCustomResource/Default", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "Custom::VpcRestrictDefaultSGCustomResourceProvider": { + "id": "Custom::VpcRestrictDefaultSGCustomResourceProvider", + "path": "aws-cdk-rds-integ-instance-create-grant/Custom::VpcRestrictDefaultSGCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-cdk-rds-integ-instance-create-grant/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-cdk-rds-integ-instance-create-grant/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "aws-cdk-rds-integ-instance-create-grant/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.CustomResourceProvider", + "version": "0.0.0" + } + }, + "Instance": { + "id": "Instance", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance", + "children": { + "SubnetGroup": { + "id": "SubnetGroup", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/SubnetGroup", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/SubnetGroup/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBSubnetGroup", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupDescription": "Subnet group for Instance database", + "subnetIds": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.CfnDBSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.SubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Security group for Instance database", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"dbuser\"}", + "generateStringKey": "password", + "excludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "awscdkrdsinteginstancecreategrantInstanceSecret88B5032B3fdaad7efa858a3daf9490cf0a702aeb" + }, + "targetId": { + "Ref": "InstanceC1063A87" + }, + "targetType": "AWS::RDS::DBInstance" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ-instance-create-grant/Instance/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBInstance", + "aws:cdk:cloudformation:props": { + "allocatedStorage": "100", + "backupRetentionPeriod": 0, + "copyTagsToSnapshot": true, + "dbInstanceClass": "db.t3.micro", + "dbSubnetGroupName": { + "Ref": "InstanceSubnetGroupF2CBA54F" + }, + "deletionProtection": false, + "enableIamDatabaseAuthentication": true, + "engine": "postgres", + "engineVersion": "14", + "masterUsername": "dbuser", + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "awscdkrdsinteginstancecreategrantInstanceSecret88B5032B3fdaad7efa858a3daf9490cf0a702aeb" + }, + ":SecretString:password::}}" + ] + ] + }, + "multiAz": false, + "publiclyAccessible": false, + "storageType": "gp2", + "vpcSecurityGroups": [ + { + "Fn::GetAtt": [ + "InstanceSecurityGroupB4E5FA83", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.CfnDBInstance", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.DatabaseInstance", + "version": "0.0.0" + } + }, + "DBRole": { + "id": "DBRole", + "path": "aws-cdk-rds-integ-instance-create-grant/DBRole", + "children": { + "ImportDBRole": { + "id": "ImportDBRole", + "path": "aws-cdk-rds-integ-instance-create-grant/DBRole/ImportDBRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ-instance-create-grant/DBRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-rds-integ-instance-create-grant/DBRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ-instance-create-grant/DBRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "rds-db:connect", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":rds-db:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":dbuser:", + { + "Fn::GetAtt": [ + "InstanceC1063A87", + "DbiResourceId" + ] + }, + "/{{resolve:secretsmanager:", + { + "Ref": "InstanceSecretAttachment83BEE581" + }, + ":SecretString:username::}}" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "DBRoleDefaultPolicyDBB64848", + "roles": [ + { + "Ref": "DBRole890CB76D" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-rds-integ-instance-create-grant/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-rds-integ-instance-create-grant/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "rds-integ-instance-create-grant": { + "id": "rds-integ-instance-create-grant", + "path": "rds-integ-instance-create-grant", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "rds-integ-instance-create-grant/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "rds-integ-instance-create-grant/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "rds-integ-instance-create-grant/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "rds-integ-instance-create-grant/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "rds-integ-instance-create-grant/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.ts new file mode 100644 index 0000000000000..e63a982d20b0e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-create-grant.ts @@ -0,0 +1,41 @@ +import * as integ from '@aws-cdk/integ-tests-alpha'; +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import * as cdk from 'aws-cdk-lib'; +import * as rds from 'aws-cdk-lib/aws-rds'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-cdk-rds-integ-instance-create-grant'); + +const vpc = new ec2.Vpc(stack, 'VPC'); + +const instance = new rds.DatabaseInstance(stack, 'Instance', { + vpc, + vpcSubnets: { + subnetType: ec2.SubnetType.PUBLIC, + }, + engine: rds.DatabaseInstanceEngine.postgres({ + version: rds.PostgresEngineVersion.VER_14, + }), + instanceType: ec2.InstanceType.of( + ec2.InstanceClass.T3, + ec2.InstanceSize.MICRO, + ), + credentials: rds.Credentials.fromGeneratedSecret('dbuser'), + multiAz: false, + deletionProtection: false, + publiclyAccessible: false, + backupRetention: cdk.Duration.days(0), +}); + +const role = new iam.Role(stack, 'DBRole', { + assumedBy: new iam.AccountPrincipal(stack.account), +}); + +instance.grantConnect(role); + +new integ.IntegTest(app, 'rds-integ-instance-create-grant', { + testCases: [stack], +}); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.assets.json new file mode 100644 index 0000000000000..807cef2a2cff8 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.assets.json @@ -0,0 +1,19 @@ +{ + "version": "33.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3/index.js deleted file mode 100644 index 7c8fbb57223d2..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3/index.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = void 0; -// eslint-disable-next-line import/no-extraneous-dependencies -const client_route_53_1 = require("@aws-sdk/client-route-53"); -// eslint-disable-next-line import/no-extraneous-dependencies -const credential_providers_1 = require("@aws-sdk/credential-providers"); -async function handler(event) { - const resourceProps = event.ResourceProperties; - switch (event.RequestType) { - case 'Create': - case 'Update': - return cfnEventHandler(resourceProps, false); - case 'Delete': - return cfnEventHandler(resourceProps, true); - } -} -exports.handler = handler; -async function cfnEventHandler(props, isDeleteEvent) { - const { AssumeRoleArn, ParentZoneId, ParentZoneName, DelegatedZoneName, DelegatedZoneNameServers, TTL, UseRegionalStsEndpoint } = props; - if (!ParentZoneId && !ParentZoneName) { - throw Error('One of ParentZoneId or ParentZoneName must be specified'); - } - const timestamp = (new Date()).getTime(); - const route53 = new client_route_53_1.Route53({ - credentials: (0, credential_providers_1.fromTemporaryCredentials)({ - clientConfig: { useGlobalEndpoint: !UseRegionalStsEndpoint }, - params: { - RoleArn: AssumeRoleArn, - RoleSessionName: `cross-account-zone-delegation-${timestamp}`, - }, - }), - }); - const parentZoneId = ParentZoneId ?? await getHostedZoneIdByName(ParentZoneName, route53); - await route53.changeResourceRecordSets({ - HostedZoneId: parentZoneId, - ChangeBatch: { - Changes: [{ - Action: isDeleteEvent ? 'DELETE' : 'UPSERT', - ResourceRecordSet: { - Name: DelegatedZoneName, - Type: 'NS', - TTL, - ResourceRecords: DelegatedZoneNameServers.map(ns => ({ Value: ns })), - }, - }], - }, - }); -} -async function getHostedZoneIdByName(name, route53) { - const zones = await route53.listHostedZonesByName({ DNSName: name }); - const matchedZones = zones.HostedZones?.filter(zone => zone.Name === `${name}.`) ?? []; - if (matchedZones && matchedZones.length !== 1) { - throw Error(`Expected one hosted zone to match the given name but found ${matchedZones.length}`); - } - // will always be defined because we throw if length !==1 - return matchedZones[0].Id; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2REFBNkQ7QUFDN0QsOERBQW1EO0FBQ25ELDZEQUE2RDtBQUM3RCx3RUFBeUU7QUFZbEUsS0FBSyxVQUFVLE9BQU8sQ0FBQyxLQUFrRDtJQUM5RSxNQUFNLGFBQWEsR0FBRyxLQUFLLENBQUMsa0JBQW1ELENBQUM7SUFFaEYsUUFBUSxLQUFLLENBQUMsV0FBVyxFQUFFO1FBQ3pCLEtBQUssUUFBUSxDQUFDO1FBQ2QsS0FBSyxRQUFRO1lBQ1gsT0FBTyxlQUFlLENBQUMsYUFBYSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBQy9DLEtBQUssUUFBUTtZQUNYLE9BQU8sZUFBZSxDQUFDLGFBQWEsRUFBRSxJQUFJLENBQUMsQ0FBQztLQUMvQztBQUNILENBQUM7QUFWRCwwQkFVQztBQUVELEtBQUssVUFBVSxlQUFlLENBQUMsS0FBeUIsRUFBRSxhQUFzQjtJQUM5RSxNQUFNLEVBQUUsYUFBYSxFQUFFLFlBQVksRUFBRSxjQUFjLEVBQUUsaUJBQWlCLEVBQUUsd0JBQXdCLEVBQUUsR0FBRyxFQUFFLHNCQUFzQixFQUFFLEdBQUcsS0FBSyxDQUFDO0lBRXhJLElBQUksQ0FBQyxZQUFZLElBQUksQ0FBQyxjQUFjLEVBQUU7UUFDcEMsTUFBTSxLQUFLLENBQUMseURBQXlELENBQUMsQ0FBQztLQUN4RTtJQUVELE1BQU0sU0FBUyxHQUFHLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDO0lBQ3pDLE1BQU0sT0FBTyxHQUFHLElBQUkseUJBQU8sQ0FBQztRQUMxQixXQUFXLEVBQUUsSUFBQSwrQ0FBd0IsRUFBQztZQUNwQyxZQUFZLEVBQUUsRUFBRSxpQkFBaUIsRUFBRSxDQUFDLHNCQUFzQixFQUFFO1lBQzVELE1BQU0sRUFBRTtnQkFDTixPQUFPLEVBQUUsYUFBYTtnQkFDdEIsZUFBZSxFQUFFLGlDQUFpQyxTQUFTLEVBQUU7YUFDOUQ7U0FDRixDQUFDO0tBQ0gsQ0FBQyxDQUFDO0lBRUgsTUFBTSxZQUFZLEdBQUcsWUFBWSxJQUFJLE1BQU0scUJBQXFCLENBQUMsY0FBZSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBRTNGLE1BQU0sT0FBTyxDQUFDLHdCQUF3QixDQUFDO1FBQ3JDLFlBQVksRUFBRSxZQUFZO1FBQzFCLFdBQVcsRUFBRTtZQUNYLE9BQU8sRUFBRSxDQUFDO29CQUNSLE1BQU0sRUFBRSxhQUFhLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsUUFBUTtvQkFDM0MsaUJBQWlCLEVBQUU7d0JBQ2pCLElBQUksRUFBRSxpQkFBaUI7d0JBQ3ZCLElBQUksRUFBRSxJQUFJO3dCQUNWLEdBQUc7d0JBQ0gsZUFBZSxFQUFFLHdCQUF3QixDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQztxQkFDckU7aUJBQ0YsQ0FBQztTQUNIO0tBQ0YsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUVELEtBQUssVUFBVSxxQkFBcUIsQ0FBQyxJQUFZLEVBQUUsT0FBZ0I7SUFDakUsTUFBTSxLQUFLLEdBQUcsTUFBTSxPQUFPLENBQUMscUJBQXFCLENBQUMsRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQztJQUNyRSxNQUFNLFlBQVksR0FBRyxLQUFLLENBQUMsV0FBVyxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssR0FBRyxJQUFJLEdBQUcsQ0FBQyxJQUFJLEVBQUUsQ0FBQztJQUV2RixJQUFJLFlBQVksSUFBSSxZQUFZLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtRQUM3QyxNQUFNLEtBQUssQ0FBQyw4REFBOEQsWUFBWSxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUM7S0FDbEc7SUFFRCx5REFBeUQ7SUFDekQsT0FBTyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRyxDQUFDO0FBQzdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgaW1wb3J0L25vLWV4dHJhbmVvdXMtZGVwZW5kZW5jaWVzXG5pbXBvcnQgeyBSb3V0ZTUzIH0gZnJvbSAnQGF3cy1zZGsvY2xpZW50LXJvdXRlLTUzJztcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXNcbmltcG9ydCB7IGZyb21UZW1wb3JhcnlDcmVkZW50aWFscyB9IGZyb20gJ0Bhd3Mtc2RrL2NyZWRlbnRpYWwtcHJvdmlkZXJzJztcblxuaW50ZXJmYWNlIFJlc291cmNlUHJvcGVydGllcyB7XG4gIEFzc3VtZVJvbGVBcm46IHN0cmluZyxcbiAgUGFyZW50Wm9uZU5hbWU/OiBzdHJpbmcsXG4gIFBhcmVudFpvbmVJZD86IHN0cmluZyxcbiAgRGVsZWdhdGVkWm9uZU5hbWU6IHN0cmluZyxcbiAgRGVsZWdhdGVkWm9uZU5hbWVTZXJ2ZXJzOiBzdHJpbmdbXSxcbiAgVFRMOiBudW1iZXIsXG4gIFVzZVJlZ2lvbmFsU3RzRW5kcG9pbnQ/OiBzdHJpbmcsXG59XG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBoYW5kbGVyKGV2ZW50OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50KSB7XG4gIGNvbnN0IHJlc291cmNlUHJvcHMgPSBldmVudC5SZXNvdXJjZVByb3BlcnRpZXMgYXMgdW5rbm93biBhcyBSZXNvdXJjZVByb3BlcnRpZXM7XG5cbiAgc3dpdGNoIChldmVudC5SZXF1ZXN0VHlwZSkge1xuICAgIGNhc2UgJ0NyZWF0ZSc6XG4gICAgY2FzZSAnVXBkYXRlJzpcbiAgICAgIHJldHVybiBjZm5FdmVudEhhbmRsZXIocmVzb3VyY2VQcm9wcywgZmFsc2UpO1xuICAgIGNhc2UgJ0RlbGV0ZSc6XG4gICAgICByZXR1cm4gY2ZuRXZlbnRIYW5kbGVyKHJlc291cmNlUHJvcHMsIHRydWUpO1xuICB9XG59XG5cbmFzeW5jIGZ1bmN0aW9uIGNmbkV2ZW50SGFuZGxlcihwcm9wczogUmVzb3VyY2VQcm9wZXJ0aWVzLCBpc0RlbGV0ZUV2ZW50OiBib29sZWFuKSB7XG4gIGNvbnN0IHsgQXNzdW1lUm9sZUFybiwgUGFyZW50Wm9uZUlkLCBQYXJlbnRab25lTmFtZSwgRGVsZWdhdGVkWm9uZU5hbWUsIERlbGVnYXRlZFpvbmVOYW1lU2VydmVycywgVFRMLCBVc2VSZWdpb25hbFN0c0VuZHBvaW50IH0gPSBwcm9wcztcblxuICBpZiAoIVBhcmVudFpvbmVJZCAmJiAhUGFyZW50Wm9uZU5hbWUpIHtcbiAgICB0aHJvdyBFcnJvcignT25lIG9mIFBhcmVudFpvbmVJZCBvciBQYXJlbnRab25lTmFtZSBtdXN0IGJlIHNwZWNpZmllZCcpO1xuICB9XG5cbiAgY29uc3QgdGltZXN0YW1wID0gKG5ldyBEYXRlKCkpLmdldFRpbWUoKTtcbiAgY29uc3Qgcm91dGU1MyA9IG5ldyBSb3V0ZTUzKHtcbiAgICBjcmVkZW50aWFsczogZnJvbVRlbXBvcmFyeUNyZWRlbnRpYWxzKHtcbiAgICAgIGNsaWVudENvbmZpZzogeyB1c2VHbG9iYWxFbmRwb2ludDogIVVzZVJlZ2lvbmFsU3RzRW5kcG9pbnQgfSxcbiAgICAgIHBhcmFtczoge1xuICAgICAgICBSb2xlQXJuOiBBc3N1bWVSb2xlQXJuLFxuICAgICAgICBSb2xlU2Vzc2lvbk5hbWU6IGBjcm9zcy1hY2NvdW50LXpvbmUtZGVsZWdhdGlvbi0ke3RpbWVzdGFtcH1gLFxuICAgICAgfSxcbiAgICB9KSxcbiAgfSk7XG5cbiAgY29uc3QgcGFyZW50Wm9uZUlkID0gUGFyZW50Wm9uZUlkID8/IGF3YWl0IGdldEhvc3RlZFpvbmVJZEJ5TmFtZShQYXJlbnRab25lTmFtZSEsIHJvdXRlNTMpO1xuXG4gIGF3YWl0IHJvdXRlNTMuY2hhbmdlUmVzb3VyY2VSZWNvcmRTZXRzKHtcbiAgICBIb3N0ZWRab25lSWQ6IHBhcmVudFpvbmVJZCxcbiAgICBDaGFuZ2VCYXRjaDoge1xuICAgICAgQ2hhbmdlczogW3tcbiAgICAgICAgQWN0aW9uOiBpc0RlbGV0ZUV2ZW50ID8gJ0RFTEVURScgOiAnVVBTRVJUJyxcbiAgICAgICAgUmVzb3VyY2VSZWNvcmRTZXQ6IHtcbiAgICAgICAgICBOYW1lOiBEZWxlZ2F0ZWRab25lTmFtZSxcbiAgICAgICAgICBUeXBlOiAnTlMnLFxuICAgICAgICAgIFRUTCxcbiAgICAgICAgICBSZXNvdXJjZVJlY29yZHM6IERlbGVnYXRlZFpvbmVOYW1lU2VydmVycy5tYXAobnMgPT4gKHsgVmFsdWU6IG5zIH0pKSxcbiAgICAgICAgfSxcbiAgICAgIH1dLFxuICAgIH0sXG4gIH0pO1xufVxuXG5hc3luYyBmdW5jdGlvbiBnZXRIb3N0ZWRab25lSWRCeU5hbWUobmFtZTogc3RyaW5nLCByb3V0ZTUzOiBSb3V0ZTUzKTogUHJvbWlzZTxzdHJpbmc+IHtcbiAgY29uc3Qgem9uZXMgPSBhd2FpdCByb3V0ZTUzLmxpc3RIb3N0ZWRab25lc0J5TmFtZSh7IEROU05hbWU6IG5hbWUgfSk7XG4gIGNvbnN0IG1hdGNoZWRab25lcyA9IHpvbmVzLkhvc3RlZFpvbmVzPy5maWx0ZXIoem9uZSA9PiB6b25lLk5hbWUgPT09IGAke25hbWV9LmApID8/IFtdO1xuXG4gIGlmIChtYXRjaGVkWm9uZXMgJiYgbWF0Y2hlZFpvbmVzLmxlbmd0aCAhPT0gMSkge1xuICAgIHRocm93IEVycm9yKGBFeHBlY3RlZCBvbmUgaG9zdGVkIHpvbmUgdG8gbWF0Y2ggdGhlIGdpdmVuIG5hbWUgYnV0IGZvdW5kICR7bWF0Y2hlZFpvbmVzLmxlbmd0aH1gKTtcbiAgfVxuXG4gIC8vIHdpbGwgYWx3YXlzIGJlIGRlZmluZWQgYmVjYXVzZSB3ZSB0aHJvdyBpZiBsZW5ndGggIT09MVxuICByZXR1cm4gbWF0Y2hlZFpvbmVzWzBdLklkITtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab/__entrypoint__.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab/index.js new file mode 100644 index 0000000000000..83c3f0eb66811 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/asset.ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab/index.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +// eslint-disable-next-line import/no-extraneous-dependencies +const aws_sdk_1 = require("aws-sdk"); +async function handler(event) { + const resourceProps = event.ResourceProperties; + switch (event.RequestType) { + case 'Create': + case 'Update': + return cfnEventHandler(resourceProps, false); + case 'Delete': + return cfnEventHandler(resourceProps, true); + } +} +exports.handler = handler; +async function cfnEventHandler(props, isDeleteEvent) { + const { AssumeRoleArn, ParentZoneId, ParentZoneName, DelegatedZoneName, DelegatedZoneNameServers, TTL, UseRegionalStsEndpoint } = props; + if (!ParentZoneId && !ParentZoneName) { + throw Error('One of ParentZoneId or ParentZoneName must be specified'); + } + const credentials = await getCrossAccountCredentials(AssumeRoleArn, !!UseRegionalStsEndpoint); + const route53 = new aws_sdk_1.Route53({ credentials }); + const parentZoneId = ParentZoneId ?? await getHostedZoneIdByName(ParentZoneName, route53); + await route53.changeResourceRecordSets({ + HostedZoneId: parentZoneId, + ChangeBatch: { + Changes: [{ + Action: isDeleteEvent ? 'DELETE' : 'UPSERT', + ResourceRecordSet: { + Name: DelegatedZoneName, + Type: 'NS', + TTL, + ResourceRecords: DelegatedZoneNameServers.map(ns => ({ Value: ns })), + }, + }], + }, + }).promise(); +} +async function getCrossAccountCredentials(roleArn, regionalEndpoint) { + const sts = new aws_sdk_1.STS(regionalEndpoint ? { stsRegionalEndpoints: 'regional' } : {}); + const timestamp = (new Date()).getTime(); + const { Credentials: assumedCredentials } = await sts + .assumeRole({ + RoleArn: roleArn, + RoleSessionName: `cross-account-zone-delegation-${timestamp}`, + }) + .promise(); + if (!assumedCredentials) { + throw Error('Error getting assume role credentials'); + } + return new aws_sdk_1.Credentials({ + accessKeyId: assumedCredentials.AccessKeyId, + secretAccessKey: assumedCredentials.SecretAccessKey, + sessionToken: assumedCredentials.SessionToken, + }); +} +async function getHostedZoneIdByName(name, route53) { + const zones = await route53.listHostedZonesByName({ DNSName: name }).promise(); + const matchedZones = zones.HostedZones.filter(zone => zone.Name === `${name}.`); + if (matchedZones.length !== 1) { + throw Error(`Expected one hosted zone to match the given name but found ${matchedZones.length}`); + } + return matchedZones[0].Id; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2REFBNkQ7QUFDN0QscUNBQW9EO0FBWTdDLEtBQUssVUFBVSxPQUFPLENBQUMsS0FBa0Q7SUFDOUUsTUFBTSxhQUFhLEdBQUcsS0FBSyxDQUFDLGtCQUFtRCxDQUFDO0lBRWhGLFFBQVEsS0FBSyxDQUFDLFdBQVcsRUFBRTtRQUN6QixLQUFLLFFBQVEsQ0FBQztRQUNkLEtBQUssUUFBUTtZQUNYLE9BQU8sZUFBZSxDQUFDLGFBQWEsRUFBRSxLQUFLLENBQUMsQ0FBQztRQUMvQyxLQUFLLFFBQVE7WUFDWCxPQUFPLGVBQWUsQ0FBQyxhQUFhLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDL0M7QUFDSCxDQUFDO0FBVkQsMEJBVUM7QUFFRCxLQUFLLFVBQVUsZUFBZSxDQUFDLEtBQXlCLEVBQUUsYUFBc0I7SUFDOUUsTUFBTSxFQUFFLGFBQWEsRUFBRSxZQUFZLEVBQUUsY0FBYyxFQUFFLGlCQUFpQixFQUFFLHdCQUF3QixFQUFFLEdBQUcsRUFBRSxzQkFBc0IsRUFBRSxHQUFHLEtBQUssQ0FBQztJQUV4SSxJQUFJLENBQUMsWUFBWSxJQUFJLENBQUMsY0FBYyxFQUFFO1FBQ3BDLE1BQU0sS0FBSyxDQUFDLHlEQUF5RCxDQUFDLENBQUM7S0FDeEU7SUFFRCxNQUFNLFdBQVcsR0FBRyxNQUFNLDBCQUEwQixDQUFDLGFBQWEsRUFBRSxDQUFDLENBQUMsc0JBQXNCLENBQUMsQ0FBQztJQUM5RixNQUFNLE9BQU8sR0FBRyxJQUFJLGlCQUFPLENBQUMsRUFBRSxXQUFXLEVBQUUsQ0FBQyxDQUFDO0lBRTdDLE1BQU0sWUFBWSxHQUFHLFlBQVksSUFBSSxNQUFNLHFCQUFxQixDQUFDLGNBQWUsRUFBRSxPQUFPLENBQUMsQ0FBQztJQUUzRixNQUFNLE9BQU8sQ0FBQyx3QkFBd0IsQ0FBQztRQUNyQyxZQUFZLEVBQUUsWUFBWTtRQUMxQixXQUFXLEVBQUU7WUFDWCxPQUFPLEVBQUUsQ0FBQztvQkFDUixNQUFNLEVBQUUsYUFBYSxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLFFBQVE7b0JBQzNDLGlCQUFpQixFQUFFO3dCQUNqQixJQUFJLEVBQUUsaUJBQWlCO3dCQUN2QixJQUFJLEVBQUUsSUFBSTt3QkFDVixHQUFHO3dCQUNILGVBQWUsRUFBRSx3QkFBd0IsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRSxDQUFDLENBQUM7cUJBQ3JFO2lCQUNGLENBQUM7U0FDSDtLQUNGLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQztBQUNmLENBQUM7QUFFRCxLQUFLLFVBQVUsMEJBQTBCLENBQUMsT0FBZSxFQUFFLGdCQUF5QjtJQUNsRixNQUFNLEdBQUcsR0FBRyxJQUFJLGFBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLENBQUMsRUFBRSxvQkFBb0IsRUFBRSxVQUFVLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUM7SUFDbEYsTUFBTSxTQUFTLEdBQUcsQ0FBQyxJQUFJLElBQUksRUFBRSxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFFekMsTUFBTSxFQUFFLFdBQVcsRUFBRSxrQkFBa0IsRUFBRSxHQUFHLE1BQU0sR0FBRztTQUNsRCxVQUFVLENBQUM7UUFDVixPQUFPLEVBQUUsT0FBTztRQUNoQixlQUFlLEVBQUUsaUNBQWlDLFNBQVMsRUFBRTtLQUM5RCxDQUFDO1NBQ0QsT0FBTyxFQUFFLENBQUM7SUFFYixJQUFJLENBQUMsa0JBQWtCLEVBQUU7UUFDdkIsTUFBTSxLQUFLLENBQUMsdUNBQXVDLENBQUMsQ0FBQztLQUN0RDtJQUVELE9BQU8sSUFBSSxxQkFBVyxDQUFDO1FBQ3JCLFdBQVcsRUFBRSxrQkFBa0IsQ0FBQyxXQUFXO1FBQzNDLGVBQWUsRUFBRSxrQkFBa0IsQ0FBQyxlQUFlO1FBQ25ELFlBQVksRUFBRSxrQkFBa0IsQ0FBQyxZQUFZO0tBQzlDLENBQUMsQ0FBQztBQUNMLENBQUM7QUFFRCxLQUFLLFVBQVUscUJBQXFCLENBQUMsSUFBWSxFQUFFLE9BQWdCO0lBQ2pFLE1BQU0sS0FBSyxHQUFHLE1BQU0sT0FBTyxDQUFDLHFCQUFxQixDQUFDLEVBQUUsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDL0UsTUFBTSxZQUFZLEdBQUcsS0FBSyxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsSUFBSSxLQUFLLEdBQUcsSUFBSSxHQUFHLENBQUMsQ0FBQztJQUVoRixJQUFJLFlBQVksQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1FBQzdCLE1BQU0sS0FBSyxDQUFDLDhEQUE4RCxZQUFZLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztLQUNsRztJQUVELE9BQU8sWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQztBQUM1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGltcG9ydC9uby1leHRyYW5lb3VzLWRlcGVuZGVuY2llc1xuaW1wb3J0IHsgQ3JlZGVudGlhbHMsIFJvdXRlNTMsIFNUUyB9IGZyb20gJ2F3cy1zZGsnO1xuXG5pbnRlcmZhY2UgUmVzb3VyY2VQcm9wZXJ0aWVzIHtcbiAgQXNzdW1lUm9sZUFybjogc3RyaW5nLFxuICBQYXJlbnRab25lTmFtZT86IHN0cmluZyxcbiAgUGFyZW50Wm9uZUlkPzogc3RyaW5nLFxuICBEZWxlZ2F0ZWRab25lTmFtZTogc3RyaW5nLFxuICBEZWxlZ2F0ZWRab25lTmFtZVNlcnZlcnM6IHN0cmluZ1tdLFxuICBUVEw6IG51bWJlcixcbiAgVXNlUmVnaW9uYWxTdHNFbmRwb2ludD86IHN0cmluZyxcbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGhhbmRsZXIoZXZlbnQ6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQpIHtcbiAgY29uc3QgcmVzb3VyY2VQcm9wcyA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllcyBhcyB1bmtub3duIGFzIFJlc291cmNlUHJvcGVydGllcztcblxuICBzd2l0Y2ggKGV2ZW50LlJlcXVlc3RUeXBlKSB7XG4gICAgY2FzZSAnQ3JlYXRlJzpcbiAgICBjYXNlICdVcGRhdGUnOlxuICAgICAgcmV0dXJuIGNmbkV2ZW50SGFuZGxlcihyZXNvdXJjZVByb3BzLCBmYWxzZSk7XG4gICAgY2FzZSAnRGVsZXRlJzpcbiAgICAgIHJldHVybiBjZm5FdmVudEhhbmRsZXIocmVzb3VyY2VQcm9wcywgdHJ1ZSk7XG4gIH1cbn1cblxuYXN5bmMgZnVuY3Rpb24gY2ZuRXZlbnRIYW5kbGVyKHByb3BzOiBSZXNvdXJjZVByb3BlcnRpZXMsIGlzRGVsZXRlRXZlbnQ6IGJvb2xlYW4pIHtcbiAgY29uc3QgeyBBc3N1bWVSb2xlQXJuLCBQYXJlbnRab25lSWQsIFBhcmVudFpvbmVOYW1lLCBEZWxlZ2F0ZWRab25lTmFtZSwgRGVsZWdhdGVkWm9uZU5hbWVTZXJ2ZXJzLCBUVEwsIFVzZVJlZ2lvbmFsU3RzRW5kcG9pbnQgfSA9IHByb3BzO1xuXG4gIGlmICghUGFyZW50Wm9uZUlkICYmICFQYXJlbnRab25lTmFtZSkge1xuICAgIHRocm93IEVycm9yKCdPbmUgb2YgUGFyZW50Wm9uZUlkIG9yIFBhcmVudFpvbmVOYW1lIG11c3QgYmUgc3BlY2lmaWVkJyk7XG4gIH1cblxuICBjb25zdCBjcmVkZW50aWFscyA9IGF3YWl0IGdldENyb3NzQWNjb3VudENyZWRlbnRpYWxzKEFzc3VtZVJvbGVBcm4sICEhVXNlUmVnaW9uYWxTdHNFbmRwb2ludCk7XG4gIGNvbnN0IHJvdXRlNTMgPSBuZXcgUm91dGU1Myh7IGNyZWRlbnRpYWxzIH0pO1xuXG4gIGNvbnN0IHBhcmVudFpvbmVJZCA9IFBhcmVudFpvbmVJZCA/PyBhd2FpdCBnZXRIb3N0ZWRab25lSWRCeU5hbWUoUGFyZW50Wm9uZU5hbWUhLCByb3V0ZTUzKTtcblxuICBhd2FpdCByb3V0ZTUzLmNoYW5nZVJlc291cmNlUmVjb3JkU2V0cyh7XG4gICAgSG9zdGVkWm9uZUlkOiBwYXJlbnRab25lSWQsXG4gICAgQ2hhbmdlQmF0Y2g6IHtcbiAgICAgIENoYW5nZXM6IFt7XG4gICAgICAgIEFjdGlvbjogaXNEZWxldGVFdmVudCA/ICdERUxFVEUnIDogJ1VQU0VSVCcsXG4gICAgICAgIFJlc291cmNlUmVjb3JkU2V0OiB7XG4gICAgICAgICAgTmFtZTogRGVsZWdhdGVkWm9uZU5hbWUsXG4gICAgICAgICAgVHlwZTogJ05TJyxcbiAgICAgICAgICBUVEwsXG4gICAgICAgICAgUmVzb3VyY2VSZWNvcmRzOiBEZWxlZ2F0ZWRab25lTmFtZVNlcnZlcnMubWFwKG5zID0+ICh7IFZhbHVlOiBucyB9KSksXG4gICAgICAgIH0sXG4gICAgICB9XSxcbiAgICB9LFxuICB9KS5wcm9taXNlKCk7XG59XG5cbmFzeW5jIGZ1bmN0aW9uIGdldENyb3NzQWNjb3VudENyZWRlbnRpYWxzKHJvbGVBcm46IHN0cmluZywgcmVnaW9uYWxFbmRwb2ludDogYm9vbGVhbik6IFByb21pc2U8Q3JlZGVudGlhbHM+IHtcbiAgY29uc3Qgc3RzID0gbmV3IFNUUyhyZWdpb25hbEVuZHBvaW50ID8geyBzdHNSZWdpb25hbEVuZHBvaW50czogJ3JlZ2lvbmFsJyB9IDoge30pO1xuICBjb25zdCB0aW1lc3RhbXAgPSAobmV3IERhdGUoKSkuZ2V0VGltZSgpO1xuXG4gIGNvbnN0IHsgQ3JlZGVudGlhbHM6IGFzc3VtZWRDcmVkZW50aWFscyB9ID0gYXdhaXQgc3RzXG4gICAgLmFzc3VtZVJvbGUoe1xuICAgICAgUm9sZUFybjogcm9sZUFybixcbiAgICAgIFJvbGVTZXNzaW9uTmFtZTogYGNyb3NzLWFjY291bnQtem9uZS1kZWxlZ2F0aW9uLSR7dGltZXN0YW1wfWAsXG4gICAgfSlcbiAgICAucHJvbWlzZSgpO1xuXG4gIGlmICghYXNzdW1lZENyZWRlbnRpYWxzKSB7XG4gICAgdGhyb3cgRXJyb3IoJ0Vycm9yIGdldHRpbmcgYXNzdW1lIHJvbGUgY3JlZGVudGlhbHMnKTtcbiAgfVxuXG4gIHJldHVybiBuZXcgQ3JlZGVudGlhbHMoe1xuICAgIGFjY2Vzc0tleUlkOiBhc3N1bWVkQ3JlZGVudGlhbHMuQWNjZXNzS2V5SWQsXG4gICAgc2VjcmV0QWNjZXNzS2V5OiBhc3N1bWVkQ3JlZGVudGlhbHMuU2VjcmV0QWNjZXNzS2V5LFxuICAgIHNlc3Npb25Ub2tlbjogYXNzdW1lZENyZWRlbnRpYWxzLlNlc3Npb25Ub2tlbixcbiAgfSk7XG59XG5cbmFzeW5jIGZ1bmN0aW9uIGdldEhvc3RlZFpvbmVJZEJ5TmFtZShuYW1lOiBzdHJpbmcsIHJvdXRlNTM6IFJvdXRlNTMpOiBQcm9taXNlPHN0cmluZz4ge1xuICBjb25zdCB6b25lcyA9IGF3YWl0IHJvdXRlNTMubGlzdEhvc3RlZFpvbmVzQnlOYW1lKHsgRE5TTmFtZTogbmFtZSB9KS5wcm9taXNlKCk7XG4gIGNvbnN0IG1hdGNoZWRab25lcyA9IHpvbmVzLkhvc3RlZFpvbmVzLmZpbHRlcih6b25lID0+IHpvbmUuTmFtZSA9PT0gYCR7bmFtZX0uYCk7XG5cbiAgaWYgKG1hdGNoZWRab25lcy5sZW5ndGggIT09IDEpIHtcbiAgICB0aHJvdyBFcnJvcihgRXhwZWN0ZWQgb25lIGhvc3RlZCB6b25lIHRvIG1hdGNoIHRoZSBnaXZlbiBuYW1lIGJ1dCBmb3VuZCAke21hdGNoZWRab25lcy5sZW5ndGh9YCk7XG4gIH1cblxuICByZXR1cm4gbWF0Y2hlZFpvbmVzWzBdLklkO1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.assets.json index 7f9e7395fc8d1..03a8cf2340c2f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.assets.json @@ -1,20 +1,20 @@ { - "version": "32.0.0", + "version": "33.0.0", "files": { - "41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3": { + "ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab": { "source": { - "path": "asset.41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3", + "path": "asset.ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3.zip", + "objectKey": "ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "6f4ec979a8d1283c6acc22bc18d9484eeb277437d6478857bfc44713df18cf6c": { + "3222f491727b0389ac87f972f2443b490ff3cee14d24c28f1527c3f085cab460": { "source": { "path": "aws-cdk-route53-cross-account-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6f4ec979a8d1283c6acc22bc18d9484eeb277437d6478857bfc44713df18cf6c.json", + "objectKey": "3222f491727b0389ac87f972f2443b490ff3cee14d24c28f1527c3f085cab460.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.template.json index ca6cf99b87cf6..0dc079b05fef5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/aws-cdk-route53-cross-account-integ.template.json @@ -200,7 +200,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "41c4b73830acc6810dfa58ee8d966cb1485aa9daa124decc1e33f957eeb1adb3.zip" + "S3Key": "ab0afc2f801b8ac11473bad4d9f22578919d8959b5f1bcd21b05c4ac895dbcab.zip" }, "Timeout": 900, "MemorySize": 128, @@ -211,7 +211,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x" + "Runtime": "nodejs16.x" }, "DependsOn": [ "CustomCrossAccountZoneDelegationCustomResourceProviderRoleED64687B" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/cdk.out index f0b901e7c06e5..560dae10d018f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"33.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/integ.json index 9b627fe91a50d..db00c89da163e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/integ.json @@ -1,14 +1,13 @@ { - "version": "32.0.0", + "version": "33.0.0", "testCases": { - "integ.cross-account-zone-delegation": { + "Route53CrossAccountInteg/DefaultTest": { "stacks": [ "aws-cdk-route53-cross-account-integ" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "diffAssets": true, + "assertionStack": "Route53CrossAccountInteg/DefaultTest/DeployAssert", + "assertionStackName": "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/manifest.json index fae5ca02eb1e2..646cd1f7d8514 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "33.0.0", "artifacts": { "aws-cdk-route53-cross-account-integ.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6f4ec979a8d1283c6acc22bc18d9484eeb277437d6478857bfc44713df18cf6c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3222f491727b0389ac87f972f2443b490ff3cee14d24c28f1527c3f085cab460.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -108,6 +108,53 @@ }, "displayName": "aws-cdk-route53-cross-account-integ" }, + "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "Route53CrossAccountIntegDefaultTestDeployAssertF1D808C9.assets" + ], + "metadata": { + "/Route53CrossAccountInteg/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/Route53CrossAccountInteg/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "Route53CrossAccountInteg/DefaultTest/DeployAssert" + }, "Tree": { "type": "cdk:tree", "properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/tree.json index edb9bf69a6743..d74a2a27509b1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.cross-account-zone-delegation.js.snapshot/tree.json @@ -449,12 +449,66 @@ "version": "0.0.0" } }, + "Route53CrossAccountInteg": { + "id": "Route53CrossAccountInteg", + "path": "Route53CrossAccountInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "Route53CrossAccountInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "Route53CrossAccountInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "Route53CrossAccountInteg/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "Route53CrossAccountInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "Route53CrossAccountInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, "Tree": { "id": "Tree", "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.assets.json b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.assets.json new file mode 100644 index 0000000000000..f51ac22b6fa4a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.template.json b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/cdk.out new file mode 100644 index 0000000000000..f0b901e7c06e5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"32.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/core-cfn-mapping-1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/core-cfn-mapping-1.assets.json new file mode 100644 index 0000000000000..29d191b6fdd3a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/core-cfn-mapping-1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "175902e9c94a814a5739a092426ef29b46a5098db6118c5c464b507fa4e867e5": { + "source": { + "path": "core-cfn-mapping-1.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "175902e9c94a814a5739a092426ef29b46a5098db6118c5c464b507fa4e867e5.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/core-cfn-mapping-1.template.json b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/core-cfn-mapping-1.template.json new file mode 100644 index 0000000000000..c1c1b75dab061 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/core-cfn-mapping-1.template.json @@ -0,0 +1,120 @@ +{ + "Transform": [ + "AWS::LanguageExtensions" + ], + "Mappings": { + "Regularmapping": { + "TopLevelKey1": { + "SecondLevelKey1": "Yes", + "SecondLevelKey2": "No" + } + }, + "Lazymapping": { + "TopLevelKey1": { + "SecondLevelKey1": "Yes", + "SecondLevelKey2": "No" + } + } + }, + "Outputs": { + "Output0": { + "Value": { + "Fn::FindInMap": [ + "Regularmapping", + "TopLevelKey1", + "SecondLevelKey1", + { + "DefaultValue": "foob" + } + ] + } + }, + "Output1": { + "Value": { + "Fn::FindInMap": [ + "Regularmapping", + "TopLevelKey1", + { + "Ref": "AWS::Region" + }, + { + "DefaultValue": "foob" + } + ] + } + }, + "Output2": { + "Value": { + "Fn::FindInMap": [ + "Regularmapping", + "TopLevelKey1", + "SecondLevelKey3", + { + "DefaultValue": "foob" + } + ] + } + }, + "Output3": { + "Value": "No" + }, + "Output4": { + "Value": "bart" + }, + "Output5": { + "Value": { + "Fn::FindInMap": [ + "Lazymapping", + { + "Ref": "AWS::Region" + }, + "SecondLevelKey2", + { + "DefaultValue": "bart" + } + ] + } + } + }, + "Resources": { + "CfnMappingFindInMapBucket6F72FEE7": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/integ.json new file mode 100644 index 0000000000000..4e00e573e58c3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "32.0.0", + "testCases": { + "CfnMappingFindInMapTest/DefaultTest": { + "stacks": [ + "core-cfn-mapping-1" + ], + "assertionStack": "CfnMappingFindInMapTest/DefaultTest/DeployAssert", + "assertionStackName": "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/manifest.json new file mode 100644 index 0000000000000..dc377e2dbb8af --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/manifest.json @@ -0,0 +1,159 @@ +{ + "version": "32.0.0", + "artifacts": { + "core-cfn-mapping-1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "core-cfn-mapping-1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "core-cfn-mapping-1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "core-cfn-mapping-1.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/175902e9c94a814a5739a092426ef29b46a5098db6118c5c464b507fa4e867e5.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "core-cfn-mapping-1.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "core-cfn-mapping-1.assets" + ], + "metadata": { + "/core-cfn-mapping-1/Regular mapping": [ + { + "type": "aws:cdk:logicalId", + "data": "Regularmapping" + } + ], + "/core-cfn-mapping-1/Lazy mapping": [ + { + "type": "aws:cdk:logicalId", + "data": "Lazymapping" + } + ], + "/core-cfn-mapping-1/Output0": [ + { + "type": "aws:cdk:logicalId", + "data": "Output0" + } + ], + "/core-cfn-mapping-1/Output1": [ + { + "type": "aws:cdk:logicalId", + "data": "Output1" + } + ], + "/core-cfn-mapping-1/Output2": [ + { + "type": "aws:cdk:logicalId", + "data": "Output2" + } + ], + "/core-cfn-mapping-1/Output3": [ + { + "type": "aws:cdk:logicalId", + "data": "Output3" + } + ], + "/core-cfn-mapping-1/Output4": [ + { + "type": "aws:cdk:logicalId", + "data": "Output4" + } + ], + "/core-cfn-mapping-1/Output5": [ + { + "type": "aws:cdk:logicalId", + "data": "Output5" + } + ], + "/core-cfn-mapping-1/CfnMappingFindInMapBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CfnMappingFindInMapBucket6F72FEE7" + } + ], + "/core-cfn-mapping-1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/core-cfn-mapping-1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "core-cfn-mapping-1" + }, + "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "CfnMappingFindInMapTestDefaultTestDeployAssertEA32B10D.assets" + ], + "metadata": { + "/CfnMappingFindInMapTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/CfnMappingFindInMapTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "CfnMappingFindInMapTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/tree.json new file mode 100644 index 0000000000000..551e1e60b027f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.js.snapshot/tree.json @@ -0,0 +1,187 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "core-cfn-mapping-1": { + "id": "core-cfn-mapping-1", + "path": "core-cfn-mapping-1", + "children": { + "Regular mapping": { + "id": "Regular mapping", + "path": "core-cfn-mapping-1/Regular mapping", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "Lazy mapping": { + "id": "Lazy mapping", + "path": "core-cfn-mapping-1/Lazy mapping", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "Output0": { + "id": "Output0", + "path": "core-cfn-mapping-1/Output0", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "Output1": { + "id": "Output1", + "path": "core-cfn-mapping-1/Output1", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "Output2": { + "id": "Output2", + "path": "core-cfn-mapping-1/Output2", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "Output3": { + "id": "Output3", + "path": "core-cfn-mapping-1/Output3", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "Output4": { + "id": "Output4", + "path": "core-cfn-mapping-1/Output4", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "Output5": { + "id": "Output5", + "path": "core-cfn-mapping-1/Output5", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "CfnMappingFindInMapBucket": { + "id": "CfnMappingFindInMapBucket", + "path": "core-cfn-mapping-1/CfnMappingFindInMapBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "core-cfn-mapping-1/CfnMappingFindInMapBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "core-cfn-mapping-1/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "core-cfn-mapping-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "CfnMappingFindInMapTest": { + "id": "CfnMappingFindInMapTest", + "path": "CfnMappingFindInMapTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "CfnMappingFindInMapTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "CfnMappingFindInMapTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "CfnMappingFindInMapTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "CfnMappingFindInMapTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "CfnMappingFindInMapTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.55" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.ts b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.ts new file mode 100644 index 0000000000000..bdd4f7763043e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.ts @@ -0,0 +1,49 @@ +import * as cdk from 'aws-cdk-lib/core'; +import { Bucket } from 'aws-cdk-lib/aws-s3'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'core-cfn-mapping-1'/*,{ env }*/); + +const backing = { + TopLevelKey1: { + SecondLevelKey1: 'Yes', + SecondLevelKey2: 'No', + }, +}; + +const mapping = new cdk.CfnMapping(stack, 'Regular mapping', { + mapping: backing, +}); + +const lazyMapping = new cdk.CfnMapping(stack, 'Lazy mapping', { + mapping: backing, + lazy: true, +}); + +const defValue = 'foob'; +const defValue2 = 'bart'; + +const mapYes = mapping.findInMap('TopLevelKey1', 'SecondLevelKey1', defValue); // resolve to 'Yes' +const mapDefault = mapping.findInMap('TopLevelKey1', cdk.Aws.REGION, defValue); // resolve to 'foob' +const mapFn = cdk.Fn.findInMap(mapping.logicalId, 'TopLevelKey1', 'SecondLevelKey3', defValue); // resolve to 'foob' + +const lazyNo = lazyMapping.findInMap('TopLevelKey1', 'SecondLevelKey2', defValue2); // short circuit to 'No' +const lazyDefault = lazyMapping.findInMap('TopLevelKey2', 'SecondLevelKey2', defValue2); // short circuit to 'bart' +const lazyResolve = lazyMapping.findInMap(cdk.Aws.REGION, 'SecondLevelKey2', defValue2); // resolve to 'bart' + +new cdk.CfnOutput(stack, 'Output0', { value: mapYes }); +new cdk.CfnOutput(stack, 'Output1', { value: mapDefault }); +new cdk.CfnOutput(stack, 'Output2', { value: mapFn }); +new cdk.CfnOutput(stack, 'Output3', { value: lazyNo }); +new cdk.CfnOutput(stack, 'Output4', { value: lazyDefault }); +new cdk.CfnOutput(stack, 'Output5', { value: lazyResolve }); + +new Bucket(stack, 'CfnMappingFindInMapBucket'); + +new IntegTest(app, 'CfnMappingFindInMapTest', { + testCases: [stack], +}); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json index d761667bb6db6..4b04950e2d774 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json @@ -1,15 +1,15 @@ { - "version": "32.0.0", + "version": "33.0.0", "files": { - "bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232": { + "237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139": { "source": { - "path": "asset.bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232", + "path": "asset.237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232.zip", + "objectKey": "237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "2aba455d6086d5fb7be6c191dd151bacd3ced3db7a93799474386bb144c6d89a": { + "d70b0346c408b6c05836b626356b50a8a99a92a3fe6ea2e281a97ecf03dd1201": { "source": { "path": "MyStack.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2aba455d6086d5fb7be6c191dd151bacd3ced3db7a93799474386bb144c6d89a.json", + "objectKey": "d70b0346c408b6c05836b626356b50a8a99a92a3fe6ea2e281a97ecf03dd1201.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json index a904319ea9e7a..039abaa0aa3bb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json @@ -46,13 +46,13 @@ "Code": { "ZipFile": "exports.handler = function() { console.log(\"hi\"); };" }, + "Handler": "index.handler", "Role": { "Fn::GetAtt": [ "MyTriggerFunctionServiceRole1BB78C29", "Arn" ] }, - "Handler": "index.handler", "Runtime": "nodejs16.x" }, "DependsOn": [ @@ -72,7 +72,8 @@ "Ref": "MyTriggerFunctionCurrentVersion61957CE160cd5b4c06c4d00191dc10a647ea0777" }, "InvocationType": "RequestResponse", - "Timeout": "120000" + "Timeout": "120000", + "ExecuteOnHandlerChange": true }, "DependsOn": [ "Topic269377B75" @@ -237,7 +238,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232.zip" + "S3Key": "237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139.zip" }, "Timeout": 900, "MemorySize": 128, @@ -299,13 +300,13 @@ "Code": { "ZipFile": "exports.handler = async function() { await setTimeout(() => {console.log(\"hi\")}, 3*60*1000); };" }, + "Handler": "index.handler", "Role": { "Fn::GetAtt": [ "MyLambdaFunctionServiceRole313A4D46", "Arn" ] }, - "Handler": "index.handler", "Runtime": "nodejs16.x", "Timeout": 900 }, @@ -334,7 +335,8 @@ "Ref": "MyLambdaFunctionCurrentVersion4FAB80EC75f2df347bcc21ea05f818cb68778d9f" }, "InvocationType": "Event", - "Timeout": "60000" + "Timeout": "60000", + "ExecuteOnHandlerChange": true }, "DependsOn": [ "Topic198E71B3E", @@ -413,12 +415,6 @@ }, "S3Key": "004b12857696fed3c10ad54c8e3cabd07cdf653ec469cbadab6c64ae6c9ce690.zip" }, - "Role": { - "Fn::GetAtt": [ - "MyAssertionLambdaFunctionServiceRole36146F3B", - "Arn" - ] - }, "Environment": { "Variables": { "QUEUE_URL": { @@ -427,6 +423,12 @@ } }, "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "MyAssertionLambdaFunctionServiceRole36146F3B", + "Arn" + ] + }, "Runtime": "nodejs16.x", "Timeout": 900 }, @@ -456,7 +458,8 @@ "Ref": "MyAssertionLambdaFunctionCurrentVersionF4FA4C80f14c7075b9f4d7c63066e881d45e211c" }, "InvocationType": "RequestResponse", - "Timeout": "60000" + "Timeout": "60000", + "ExecuteOnHandlerChange": true }, "DependsOn": [ "TestQueue6F0069AA" @@ -501,13 +504,13 @@ "Code": { "ZipFile": "exports.handler = function() { console.log(\"hello\"); };" }, + "Handler": "index.handler", "Role": { "Fn::GetAtt": [ "MySecondFunctionServiceRole5B930841", "Arn" ] }, - "Handler": "index.handler", "Runtime": "nodejs16.x" }, "DependsOn": [ @@ -527,7 +530,8 @@ "Ref": "MySecondFunctionCurrentVersion7D497B5D173a4bb1f758991022ea97d651403362" }, "InvocationType": "RequestResponse", - "Timeout": "120000" + "Timeout": "120000", + "ExecuteOnHandlerChange": true }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -553,7 +557,8 @@ "Ref": "MyLambdaFunctionCurrentVersion4FAB80EC75f2df347bcc21ea05f818cb68778d9f" }, "InvocationType": "RequestResponse", - "Timeout": "120000" + "Timeout": "120000", + "ExecuteOnHandlerChange": true }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json index 16eca07ea7128..3c1c49d137eed 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json @@ -1,20 +1,20 @@ { - "version": "32.0.0", + "version": "33.0.0", "files": { - "86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2": { + "e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b": { "source": { - "path": "asset.86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.bundle", + "path": "asset.e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.zip", + "objectKey": "e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "506333024aade6ef1f4c1b78000bbc1e1307f8003bad9422adb127768f97739b": { + "033efbe16b566cb69151acaa2d38b2c1f73bf411f644ae441daf0c6aec5a6697": { "source": { "path": "TriggerTestDefaultTestDeployAssert61636546.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "506333024aade6ef1f4c1b78000bbc1e1307f8003bad9422adb127768f97739b.json", + "objectKey": "033efbe16b566cb69151acaa2d38b2c1f73bf411f644ae441daf0c6aec5a6697.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json index 3428ef4b3f7de..b40bac8dac63b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json @@ -18,15 +18,24 @@ }, "parameters": { "QueueUrl": { - "Fn::ImportValue": "MyStack:ExportsOutputRefTestQueue6F0069AA4C7E94E2" + "Fn::Join": [ + "", + [ + "\"", + { + "Fn::ImportValue": "MyStack:ExportsOutputRefTestQueue6F0069AA4C7E94E2" + }, + "\"" + ] + ] }, - "WaitTimeSeconds": 20 + "WaitTimeSeconds": "20" }, "flattenResponse": "true", "outputPaths": [ "Messages.0.Body" ], - "salt": "1688619578418" + "salt": "1691559124118" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -206,7 +215,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.zip" + "S3Key": "e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -267,7 +276,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.zip" + "S3Key": "e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.zip" }, "Timeout": 120, "Handler": "index.isComplete", @@ -309,7 +318,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.zip" + "S3Key": "e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.zip" }, "Timeout": 120, "Handler": "index.onTimeout", diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139/__entrypoint__.js new file mode 100644 index 0000000000000..c83ecebaaadac --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139/__entrypoint__.js @@ -0,0 +1,147 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withRetries = exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + const sanitizedEvent = { ...event, ResponseURL: '...' }; + exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(sanitizedEvent, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + exports.external.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + const retryOptions = { + attempts: 5, + sleep: 1000, + }; + await withRetries(retryOptions, exports.external.sendHttpRequest)(req, responseBody); +} +async function defaultSendHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, _ => resolve()); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsTUFBTSxjQUFjLEdBQUcsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUM7SUFDeEQsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxjQUFjLEVBQUUsU0FBUyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFM0QsdUVBQXVFO0lBQ3ZFLHVFQUF1RTtJQUN2RSxhQUFhO0lBQ2IsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsSUFBSSxLQUFLLENBQUMsa0JBQWtCLEtBQUssZ0NBQWdDLEVBQUU7UUFDbkcsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsdURBQXVELENBQUMsQ0FBQztRQUN0RSxNQUFNLGNBQWMsQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFDdkMsT0FBTztLQUNSO0lBRUQsSUFBSTtRQUNGLHlFQUF5RTtRQUN6RSxpRUFBaUU7UUFDakUsd0NBQXdDO1FBQ3hDLGlFQUFpRTtRQUNqRSxNQUFNLFdBQVcsR0FBWSxPQUFPLENBQUMsZ0JBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLE9BQU8sQ0FBQztRQUN4RSxNQUFNLE1BQU0sR0FBRyxNQUFNLFdBQVcsQ0FBQyxjQUFjLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFFMUQsdURBQXVEO1FBQ3ZELE1BQU0sYUFBYSxHQUFHLGNBQWMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFFcEQsMkJBQTJCO1FBQzNCLE1BQU0sY0FBYyxDQUFDLFNBQVMsRUFBRSxhQUFhLENBQUMsQ0FBQztLQUNoRDtJQUFDLE9BQU8sQ0FBTSxFQUFFO1FBQ2YsTUFBTSxJQUFJLEdBQWE7WUFDckIsR0FBRyxLQUFLO1lBQ1IsTUFBTSxFQUFFLGdCQUFRLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPO1NBQzFELENBQUM7UUFFRixJQUFJLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFO1lBQzVCLHlFQUF5RTtZQUN6RSxtRUFBbUU7WUFDbkUsd0VBQXdFO1lBQ3hFLHFFQUFxRTtZQUNyRSxnQ0FBZ0M7WUFDaEMsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsRUFBRTtnQkFDbEMsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsNEdBQTRHLENBQUMsQ0FBQztnQkFDM0gsSUFBSSxDQUFDLGtCQUFrQixHQUFHLGdDQUFnQyxDQUFDO2FBQzVEO2lCQUFNO2dCQUNMLGtFQUFrRTtnQkFDbEUsNkRBQTZEO2dCQUM3RCxnQkFBUSxDQUFDLEdBQUcsQ0FBQyw2REFBNkQsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUM7YUFDcEc7U0FDRjtRQUVELG1FQUFtRTtRQUNuRSxNQUFNLGNBQWMsQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDdEM7QUFDSCxDQUFDO0FBbkRELDBCQW1EQztBQUVELFNBQVMsY0FBYyxDQUNyQixVQUF5RixFQUN6RixrQkFBMEMsRUFBRztJQUU3QyxzRUFBc0U7SUFDdEUsdUJBQXVCO0lBQ3ZCLE1BQU0sa0JBQWtCLEdBQUcsZUFBZSxDQUFDLGtCQUFrQixJQUFJLFVBQVUsQ0FBQyxrQkFBa0IsSUFBSSxVQUFVLENBQUMsU0FBUyxDQUFDO0lBRXZILGtFQUFrRTtJQUNsRSxJQUFJLFVBQVUsQ0FBQyxXQUFXLEtBQUssUUFBUSxJQUFJLGtCQUFrQixLQUFLLFVBQVUsQ0FBQyxrQkFBa0IsRUFBRTtRQUMvRixNQUFNLElBQUksS0FBSyxDQUFDLHdEQUF3RCxVQUFVLENBQUMsa0JBQWtCLFNBQVMsZUFBZSxDQUFDLGtCQUFrQixtQkFBbUIsQ0FBQyxDQUFDO0tBQ3RLO0lBRUQsMERBQTBEO0lBQzFELE9BQU87UUFDTCxHQUFHLFVBQVU7UUFDYixHQUFHLGVBQWU7UUFDbEIsa0JBQWtCLEVBQUUsa0JBQWtCO0tBQ3ZDLENBQUM7QUFDSixDQUFDO0FBRUQsS0FBSyxVQUFVLGNBQWMsQ0FBQyxNQUE0QixFQUFFLEtBQWU7SUFDekUsTUFBTSxJQUFJLEdBQW1EO1FBQzNELE1BQU0sRUFBRSxNQUFNO1FBQ2QsTUFBTSxFQUFFLEtBQUssQ0FBQyxNQUFNLElBQUksTUFBTTtRQUM5QixPQUFPLEVBQUUsS0FBSyxDQUFDLE9BQU87UUFDdEIsU0FBUyxFQUFFLEtBQUssQ0FBQyxTQUFTO1FBQzFCLGtCQUFrQixFQUFFLEtBQUssQ0FBQyxrQkFBa0IsSUFBSSwwQkFBMEI7UUFDMUUsaUJBQWlCLEVBQUUsS0FBSyxDQUFDLGlCQUFpQjtRQUMxQyxNQUFNLEVBQUUsS0FBSyxDQUFDLE1BQU07UUFDcEIsSUFBSSxFQUFFLEtBQUssQ0FBQyxJQUFJO0tBQ2pCLENBQUM7SUFFRixnQkFBUSxDQUFDLEdBQUcsQ0FBQyxtQ0FBbUMsRUFBRSxJQUFJLENBQUMsQ0FBQztJQUV4RCxNQUFNLFlBQVksR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzFDLE1BQU0sU0FBUyxHQUFHLEdBQUcsQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQy9DLE1BQU0sR0FBRyxHQUFHO1FBQ1YsUUFBUSxFQUFFLFNBQVMsQ0FBQyxRQUFRO1FBQzVCLElBQUksRUFBRSxTQUFTLENBQUMsSUFBSTtRQUNwQixNQUFNLEVBQUUsS0FBSztRQUNiLE9BQU8sRUFBRTtZQUNQLGNBQWMsRUFBRSxFQUFFO1lBQ2xCLGdCQUFnQixFQUFFLE1BQU0sQ0FBQyxVQUFVLENBQUMsWUFBWSxFQUFFLE1BQU0sQ0FBQztTQUMxRDtLQUNGLENBQUM7SUFFRixNQUFNLFlBQVksR0FBRztRQUNuQixRQUFRLEVBQUUsQ0FBQztRQUNYLEtBQUssRUFBRSxJQUFJO0tBQ1osQ0FBQztJQUNGLE1BQU0sV0FBVyxDQUFDLFlBQVksRUFBRSxnQkFBUSxDQUFDLGVBQWUsQ0FBQyxDQUFDLEdBQUcsRUFBRSxZQUFZLENBQUMsQ0FBQztBQUMvRSxDQUFDO0FBRUQsS0FBSyxVQUFVLHNCQUFzQixDQUFDLE9BQTZCLEVBQUUsWUFBb0I7SUFDdkYsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsRUFBRTtRQUNyQyxJQUFJO1lBQ0YsTUFBTSxPQUFPLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO1lBQ3ZELE9BQU8sQ0FBQyxFQUFFLENBQUMsT0FBTyxFQUFFLE1BQU0sQ0FBQyxDQUFDO1lBQzVCLE9BQU8sQ0FBQyxLQUFLLENBQUMsWUFBWSxDQUFDLENBQUM7WUFDNUIsT0FBTyxDQUFDLEdBQUcsRUFBRSxDQUFDO1NBQ2Y7UUFBQyxPQUFPLENBQUMsRUFBRTtZQUNWLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUNYO0lBQ0gsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDO0FBRUQsU0FBUyxVQUFVLENBQUMsR0FBVyxFQUFFLEdBQUcsTUFBYTtJQUMvQyxzQ0FBc0M7SUFDdEMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLEVBQUUsR0FBRyxNQUFNLENBQUMsQ0FBQztBQUM5QixDQUFDO0FBU0QsU0FBZ0IsV0FBVyxDQUEwQixPQUFxQixFQUFFLEVBQTRCO0lBQ3RHLE9BQU8sS0FBSyxFQUFFLEdBQUcsRUFBSyxFQUFFLEVBQUU7UUFDeEIsSUFBSSxRQUFRLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQztRQUNoQyxJQUFJLEVBQUUsR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDO1FBQ3ZCLE9BQU8sSUFBSSxFQUFFO1lBQ1gsSUFBSTtnQkFDRixPQUFPLE1BQU0sRUFBRSxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7YUFDeEI7WUFBQyxPQUFPLENBQUMsRUFBRTtnQkFDVixJQUFJLFFBQVEsRUFBRSxJQUFJLENBQUMsRUFBRTtvQkFDbkIsTUFBTSxDQUFDLENBQUM7aUJBQ1Q7Z0JBQ0QsTUFBTSxLQUFLLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQztnQkFDNUMsRUFBRSxJQUFJLENBQUMsQ0FBQzthQUNUO1NBQ0Y7SUFDSCxDQUFDLENBQUM7QUFDSixDQUFDO0FBaEJELGtDQWdCQztBQUVELEtBQUssVUFBVSxLQUFLLENBQUMsRUFBVTtJQUM3QixPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDakQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGh0dHBzIGZyb20gJ2h0dHBzJztcbmltcG9ydCAqIGFzIHVybCBmcm9tICd1cmwnO1xuXG4vLyBmb3IgdW5pdCB0ZXN0c1xuZXhwb3J0IGNvbnN0IGV4dGVybmFsID0ge1xuICBzZW5kSHR0cFJlcXVlc3Q6IGRlZmF1bHRTZW5kSHR0cFJlcXVlc3QsXG4gIGxvZzogZGVmYXVsdExvZyxcbiAgaW5jbHVkZVN0YWNrVHJhY2VzOiB0cnVlLFxuICB1c2VySGFuZGxlckluZGV4OiAnLi9pbmRleCcsXG59O1xuXG5jb25zdCBDUkVBVEVfRkFJTEVEX1BIWVNJQ0FMX0lEX01BUktFUiA9ICdBV1NDREs6OkN1c3RvbVJlc291cmNlUHJvdmlkZXJGcmFtZXdvcms6OkNSRUFURV9GQUlMRUQnO1xuY29uc3QgTUlTU0lOR19QSFlTSUNBTF9JRF9NQVJLRVIgPSAnQVdTQ0RLOjpDdXN0b21SZXNvdXJjZVByb3ZpZGVyRnJhbWV3b3JrOjpNSVNTSU5HX1BIWVNJQ0FMX0lEJztcblxuZXhwb3J0IHR5cGUgUmVzcG9uc2UgPSBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50ICYgSGFuZGxlclJlc3BvbnNlO1xuZXhwb3J0IHR5cGUgSGFuZGxlciA9IChldmVudDogQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VFdmVudCwgY29udGV4dDogQVdTTGFtYmRhLkNvbnRleHQpID0+IFByb21pc2U8SGFuZGxlclJlc3BvbnNlIHwgdm9pZD47XG5leHBvcnQgdHlwZSBIYW5kbGVyUmVzcG9uc2UgPSB1bmRlZmluZWQgfCB7XG4gIERhdGE/OiBhbnk7XG4gIFBoeXNpY2FsUmVzb3VyY2VJZD86IHN0cmluZztcbiAgUmVhc29uPzogc3RyaW5nO1xuICBOb0VjaG8/OiBib29sZWFuO1xufTtcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGhhbmRsZXIoZXZlbnQ6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQsIGNvbnRleHQ6IEFXU0xhbWJkYS5Db250ZXh0KSB7XG4gIGNvbnN0IHNhbml0aXplZEV2ZW50ID0geyAuLi5ldmVudCwgUmVzcG9uc2VVUkw6ICcuLi4nIH07XG4gIGV4dGVybmFsLmxvZyhKU09OLnN0cmluZ2lmeShzYW5pdGl6ZWRFdmVudCwgdW5kZWZpbmVkLCAyKSk7XG5cbiAgLy8gaWdub3JlIERFTEVURSBldmVudCB3aGVuIHRoZSBwaHlzaWNhbCByZXNvdXJjZSBJRCBpcyB0aGUgbWFya2VyIHRoYXRcbiAgLy8gaW5kaWNhdGVzIHRoYXQgdGhpcyBERUxFVEUgaXMgYSBzdWJzZXF1ZW50IERFTEVURSB0byBhIGZhaWxlZCBDUkVBVEVcbiAgLy8gb3BlcmF0aW9uLlxuICBpZiAoZXZlbnQuUmVxdWVzdFR5cGUgPT09ICdEZWxldGUnICYmIGV2ZW50LlBoeXNpY2FsUmVzb3VyY2VJZCA9PT0gQ1JFQVRFX0ZBSUxFRF9QSFlTSUNBTF9JRF9NQVJLRVIpIHtcbiAgICBleHRlcm5hbC5sb2coJ2lnbm9yaW5nIERFTEVURSBldmVudCBjYXVzZWQgYnkgYSBmYWlsZWQgQ1JFQVRFIGV2ZW50Jyk7XG4gICAgYXdhaXQgc3VibWl0UmVzcG9uc2UoJ1NVQ0NFU1MnLCBldmVudCk7XG4gICAgcmV0dXJuO1xuICB9XG5cbiAgdHJ5IHtcbiAgICAvLyBpbnZva2UgdGhlIHVzZXIgaGFuZGxlci4gdGhpcyBpcyBpbnRlbnRpb25hbGx5IGluc2lkZSB0aGUgdHJ5LWNhdGNoIHRvXG4gICAgLy8gZW5zdXJlIHRoYXQgaWYgdGhlcmUgaXMgYW4gZXJyb3IgaXQncyByZXBvcnRlZCBhcyBhIGZhaWx1cmUgdG9cbiAgICAvLyBjbG91ZGZvcm1hdGlvbiAob3RoZXJ3aXNlIGNmbiB3YWl0cykuXG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1yZXF1aXJlLWltcG9ydHNcbiAgICBjb25zdCB1c2VySGFuZGxlcjogSGFuZGxlciA9IHJlcXVpcmUoZXh0ZXJuYWwudXNlckhhbmRsZXJJbmRleCkuaGFuZGxlcjtcbiAgICBjb25zdCByZXN1bHQgPSBhd2FpdCB1c2VySGFuZGxlcihzYW5pdGl6ZWRFdmVudCwgY29udGV4dCk7XG5cbiAgICAvLyB2YWxpZGF0ZSB1c2VyIHJlc3BvbnNlIGFuZCBjcmVhdGUgdGhlIGNvbWJpbmVkIGV2ZW50XG4gICAgY29uc3QgcmVzcG9uc2VFdmVudCA9IHJlbmRlclJlc3BvbnNlKGV2ZW50LCByZXN1bHQpO1xuXG4gICAgLy8gc3VibWl0IHRvIGNmbiBhcyBzdWNjZXNzXG4gICAgYXdhaXQgc3VibWl0UmVzcG9uc2UoJ1NVQ0NFU1MnLCByZXNwb25zZUV2ZW50KTtcbiAgfSBjYXRjaCAoZTogYW55KSB7XG4gICAgY29uc3QgcmVzcDogUmVzcG9uc2UgPSB7XG4gICAgICAuLi5ldmVudCxcbiAgICAgIFJlYXNvbjogZXh0ZXJuYWwuaW5jbHVkZVN0YWNrVHJhY2VzID8gZS5zdGFjayA6IGUubWVzc2FnZSxcbiAgICB9O1xuXG4gICAgaWYgKCFyZXNwLlBoeXNpY2FsUmVzb3VyY2VJZCkge1xuICAgICAgLy8gc3BlY2lhbCBjYXNlOiBpZiBDUkVBVEUgZmFpbHMsIHdoaWNoIHVzdWFsbHkgaW1wbGllcywgd2UgdXN1YWxseSBkb24ndFxuICAgICAgLy8gaGF2ZSBhIHBoeXNpY2FsIHJlc291cmNlIGlkLiBpbiB0aGlzIGNhc2UsIHRoZSBzdWJzZXF1ZW50IERFTEVURVxuICAgICAgLy8gb3BlcmF0aW9uIGRvZXMgbm90IGhhdmUgYW55IG1lYW5pbmcsIGFuZCB3aWxsIGxpa2VseSBmYWlsIGFzIHdlbGwuIHRvXG4gICAgICAvLyBhZGRyZXNzIHRoaXMsIHdlIHVzZSBhIG1hcmtlciBzbyB0aGUgcHJvdmlkZXIgZnJhbWV3b3JrIGNhbiBzaW1wbHlcbiAgICAgIC8vIGlnbm9yZSB0aGUgc3Vic2VxdWVudCBERUxFVEUuXG4gICAgICBpZiAoZXZlbnQuUmVxdWVzdFR5cGUgPT09ICdDcmVhdGUnKSB7XG4gICAgICAgIGV4dGVybmFsLmxvZygnQ1JFQVRFIGZhaWxlZCwgcmVzcG9uZGluZyB3aXRoIGEgbWFya2VyIHBoeXNpY2FsIHJlc291cmNlIGlkIHNvIHRoYXQgdGhlIHN1YnNlcXVlbnQgREVMRVRFIHdpbGwgYmUgaWdub3JlZCcpO1xuICAgICAgICByZXNwLlBoeXNpY2FsUmVzb3VyY2VJZCA9IENSRUFURV9GQUlMRURfUEhZU0lDQUxfSURfTUFSS0VSO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gb3RoZXJ3aXNlLCBpZiBQaHlzaWNhbFJlc291cmNlSWQgaXMgbm90IHNwZWNpZmllZCwgc29tZXRoaW5nIGlzXG4gICAgICAgIC8vIHRlcnJpYmx5IHdyb25nIGJlY2F1c2UgYWxsIG90aGVyIGV2ZW50cyBzaG91bGQgaGF2ZSBhbiBJRC5cbiAgICAgICAgZXh0ZXJuYWwubG9nKGBFUlJPUjogTWFsZm9ybWVkIGV2ZW50LiBcIlBoeXNpY2FsUmVzb3VyY2VJZFwiIGlzIHJlcXVpcmVkOiAke0pTT04uc3RyaW5naWZ5KGV2ZW50KX1gKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyB0aGlzIGlzIGFuIGFjdHVhbCBlcnJvciwgZmFpbCB0aGUgYWN0aXZpdHkgYWx0b2dldGhlciBhbmQgZXhpc3QuXG4gICAgYXdhaXQgc3VibWl0UmVzcG9uc2UoJ0ZBSUxFRCcsIHJlc3ApO1xuICB9XG59XG5cbmZ1bmN0aW9uIHJlbmRlclJlc3BvbnNlKFxuICBjZm5SZXF1ZXN0OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50ICYgeyBQaHlzaWNhbFJlc291cmNlSWQ/OiBzdHJpbmcgfSxcbiAgaGFuZGxlclJlc3BvbnNlOiB2b2lkIHwgSGFuZGxlclJlc3BvbnNlID0geyB9KTogUmVzcG9uc2Uge1xuXG4gIC8vIGlmIHBoeXNpY2FsIElEIGlzIG5vdCByZXR1cm5lZCwgd2UgaGF2ZSBzb21lIGRlZmF1bHRzIGZvciB5b3UgYmFzZWRcbiAgLy8gb24gdGhlIHJlcXVlc3QgdHlwZS5cbiAgY29uc3QgcGh5c2ljYWxSZXNvdXJjZUlkID0gaGFuZGxlclJlc3BvbnNlLlBoeXNpY2FsUmVzb3VyY2VJZCA/PyBjZm5SZXF1ZXN0LlBoeXNpY2FsUmVzb3VyY2VJZCA/PyBjZm5SZXF1ZXN0LlJlcXVlc3RJZDtcblxuICAvLyBpZiB3ZSBhcmUgaW4gREVMRVRFIGFuZCBwaHlzaWNhbCBJRCB3YXMgY2hhbmdlZCwgaXQncyBhbiBlcnJvci5cbiAgaWYgKGNmblJlcXVlc3QuUmVxdWVzdFR5cGUgPT09ICdEZWxldGUnICYmIHBoeXNpY2FsUmVzb3VyY2VJZCAhPT0gY2ZuUmVxdWVzdC5QaHlzaWNhbFJlc291cmNlSWQpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYERFTEVURTogY2Fubm90IGNoYW5nZSB0aGUgcGh5c2ljYWwgcmVzb3VyY2UgSUQgZnJvbSBcIiR7Y2ZuUmVxdWVzdC5QaHlzaWNhbFJlc291cmNlSWR9XCIgdG8gXCIke2hhbmRsZXJSZXNwb25zZS5QaHlzaWNhbFJlc291cmNlSWR9XCIgZHVyaW5nIGRlbGV0aW9uYCk7XG4gIH1cblxuICAvLyBtZXJnZSByZXF1ZXN0IGV2ZW50IGFuZCByZXN1bHQgZXZlbnQgKHJlc3VsdCBwcmV2YWlscykuXG4gIHJldHVybiB7XG4gICAgLi4uY2ZuUmVxdWVzdCxcbiAgICAuLi5oYW5kbGVyUmVzcG9uc2UsXG4gICAgUGh5c2ljYWxSZXNvdXJjZUlkOiBwaHlzaWNhbFJlc291cmNlSWQsXG4gIH07XG59XG5cbmFzeW5jIGZ1bmN0aW9uIHN1Ym1pdFJlc3BvbnNlKHN0YXR1czogJ1NVQ0NFU1MnIHwgJ0ZBSUxFRCcsIGV2ZW50OiBSZXNwb25zZSkge1xuICBjb25zdCBqc29uOiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZVJlc3BvbnNlID0ge1xuICAgIFN0YXR1czogc3RhdHVzLFxuICAgIFJlYXNvbjogZXZlbnQuUmVhc29uID8/IHN0YXR1cyxcbiAgICBTdGFja0lkOiBldmVudC5TdGFja0lkLFxuICAgIFJlcXVlc3RJZDogZXZlbnQuUmVxdWVzdElkLFxuICAgIFBoeXNpY2FsUmVzb3VyY2VJZDogZXZlbnQuUGh5c2ljYWxSZXNvdXJjZUlkIHx8IE1JU1NJTkdfUEhZU0lDQUxfSURfTUFSS0VSLFxuICAgIExvZ2ljYWxSZXNvdXJjZUlkOiBldmVudC5Mb2dpY2FsUmVzb3VyY2VJZCxcbiAgICBOb0VjaG86IGV2ZW50Lk5vRWNobyxcbiAgICBEYXRhOiBldmVudC5EYXRhLFxuICB9O1xuXG4gIGV4dGVybmFsLmxvZygnc3VibWl0IHJlc3BvbnNlIHRvIGNsb3VkZm9ybWF0aW9uJywganNvbik7XG5cbiAgY29uc3QgcmVzcG9uc2VCb2R5ID0gSlNPTi5zdHJpbmdpZnkoanNvbik7XG4gIGNvbnN0IHBhcnNlZFVybCA9IHVybC5wYXJzZShldmVudC5SZXNwb25zZVVSTCk7XG4gIGNvbnN0IHJlcSA9IHtcbiAgICBob3N0bmFtZTogcGFyc2VkVXJsLmhvc3RuYW1lLFxuICAgIHBhdGg6IHBhcnNlZFVybC5wYXRoLFxuICAgIG1ldGhvZDogJ1BVVCcsXG4gICAgaGVhZGVyczoge1xuICAgICAgJ2NvbnRlbnQtdHlwZSc6ICcnLFxuICAgICAgJ2NvbnRlbnQtbGVuZ3RoJzogQnVmZmVyLmJ5dGVMZW5ndGgocmVzcG9uc2VCb2R5LCAndXRmOCcpLFxuICAgIH0sXG4gIH07XG5cbiAgY29uc3QgcmV0cnlPcHRpb25zID0ge1xuICAgIGF0dGVtcHRzOiA1LFxuICAgIHNsZWVwOiAxMDAwLFxuICB9O1xuICBhd2FpdCB3aXRoUmV0cmllcyhyZXRyeU9wdGlvbnMsIGV4dGVybmFsLnNlbmRIdHRwUmVxdWVzdCkocmVxLCByZXNwb25zZUJvZHkpO1xufVxuXG5hc3luYyBmdW5jdGlvbiBkZWZhdWx0U2VuZEh0dHBSZXF1ZXN0KG9wdGlvbnM6IGh0dHBzLlJlcXVlc3RPcHRpb25zLCByZXNwb25zZUJvZHk6IHN0cmluZyk6IFByb21pc2U8dm9pZD4ge1xuICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgIHRyeSB7XG4gICAgICBjb25zdCByZXF1ZXN0ID0gaHR0cHMucmVxdWVzdChvcHRpb25zLCBfID0+IHJlc29sdmUoKSk7XG4gICAgICByZXF1ZXN0Lm9uKCdlcnJvcicsIHJlamVjdCk7XG4gICAgICByZXF1ZXN0LndyaXRlKHJlc3BvbnNlQm9keSk7XG4gICAgICByZXF1ZXN0LmVuZCgpO1xuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgIHJlamVjdChlKTtcbiAgICB9XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBkZWZhdWx0TG9nKGZtdDogc3RyaW5nLCAuLi5wYXJhbXM6IGFueVtdKSB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gIGNvbnNvbGUubG9nKGZtdCwgLi4ucGFyYW1zKTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBSZXRyeU9wdGlvbnMge1xuICAvKiogSG93IG1hbnkgcmV0cmllcyAod2lsbCBhdCBsZWFzdCB0cnkgb25jZSkgKi9cbiAgcmVhZG9ubHkgYXR0ZW1wdHM6IG51bWJlcjtcbiAgLyoqIFNsZWVwIGJhc2UsIGluIG1zICovXG4gIHJlYWRvbmx5IHNsZWVwOiBudW1iZXI7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB3aXRoUmV0cmllczxBIGV4dGVuZHMgQXJyYXk8YW55PiwgQj4ob3B0aW9uczogUmV0cnlPcHRpb25zLCBmbjogKC4uLnhzOiBBKSA9PiBQcm9taXNlPEI+KTogKC4uLnhzOiBBKSA9PiBQcm9taXNlPEI+IHtcbiAgcmV0dXJuIGFzeW5jICguLi54czogQSkgPT4ge1xuICAgIGxldCBhdHRlbXB0cyA9IG9wdGlvbnMuYXR0ZW1wdHM7XG4gICAgbGV0IG1zID0gb3B0aW9ucy5zbGVlcDtcbiAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgdHJ5IHtcbiAgICAgICAgcmV0dXJuIGF3YWl0IGZuKC4uLnhzKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgaWYgKGF0dGVtcHRzLS0gPD0gMCkge1xuICAgICAgICAgIHRocm93IGU7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogbXMpKTtcbiAgICAgICAgbXMgKj0gMjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG59XG5cbmFzeW5jIGZ1bmN0aW9uIHNsZWVwKG1zOiBudW1iZXIpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChvaykgPT4gc2V0VGltZW91dChvaywgbXMpKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139/index.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139/index.js new file mode 100644 index 0000000000000..4fe28a14f130f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.237e4a416773a5765262a8b9c70210bd35dfd48ae5a364b19e35f260026b5139/index.js @@ -0,0 +1,90 @@ +"use strict"; +/* eslint-disable no-console */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = exports.invoke = void 0; +/* eslint-disable import/no-extraneous-dependencies */ +const client_account_1 = require("@aws-sdk/client-account"); +const client_lambda_1 = require("@aws-sdk/client-lambda"); +const node_http_handler_1 = require("@aws-sdk/node-http-handler"); +const invoke = async (functionName, invocationType, timeout) => { + const lambda = new client_lambda_1.Lambda({ + requestHandler: new node_http_handler_1.NodeHttpHandler({ + socketTimeout: timeout, + }), + }); + const invokeRequest = { FunctionName: functionName, InvocationType: invocationType }; + console.log({ invokeRequest }); + // IAM policy changes can take some time to fully propagate + // Therefore, retry for up to one minute + let retryCount = 0; + const delay = 5000; + let invokeResponse; + while (true) { + try { + invokeResponse = await lambda.invoke(invokeRequest); + break; + } + catch (error) { + if (error instanceof client_account_1.AccessDeniedException && retryCount < 12) { + retryCount++; + await new Promise((resolve) => { + setTimeout(resolve, delay); + }); + continue; + } + throw error; + } + } + console.log({ invokeResponse }); + return invokeResponse; +}; +exports.invoke = invoke; +async function handler(event) { + console.log({ ...event, ResponseURL: '...' }); + if (event.RequestType === 'Delete') { + console.log('not calling trigger on DELETE'); + return; + } + if (event.RequestType === 'Update' && event.ResourceProperties.ExecuteOnHandlerChange === 'false') { + console.log('not calling trigger because ExecuteOnHandlerChange is false'); + return; + } + const handlerArn = event.ResourceProperties.HandlerArn; + if (!handlerArn) { + throw new Error('The "HandlerArn" property is required'); + } + const invocationType = event.ResourceProperties.InvocationType; + const timeout = event.ResourceProperties.Timeout; + const parsedTimeout = parseInt(timeout); + if (isNaN(parsedTimeout)) { + throw new Error(`The "Timeout" property with value ${timeout} is not parseable to a number`); + } + const invokeResponse = await (0, exports.invoke)(handlerArn, invocationType, parsedTimeout); + if (invokeResponse.StatusCode && invokeResponse.StatusCode >= 400) { + throw new Error(`Trigger handler failed with status code ${invokeResponse.StatusCode}`); + } + // if the lambda function throws an error, parse the error message and fail + if (invokeResponse.FunctionError) { + throw new Error(parseError(invokeResponse.Payload?.toString())); + } +} +exports.handler = handler; +/** + * Parse the error message from the lambda function. + */ +function parseError(payload) { + console.log(`Error payload: ${payload}`); + if (!payload) { + return 'unknown handler error'; + } + try { + const error = JSON.parse(payload); + const concat = [error.errorMessage, error.trace].filter(x => x).join('\n'); + return concat.length > 0 ? concat : payload; + } + catch { + // fall back to just returning the payload + return payload; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0JBQStCOzs7QUFFL0Isc0RBQXNEO0FBQ3RELDREQUFnRTtBQUNoRSwwREFBb0U7QUFDcEUsa0VBQTZEO0FBSXRELE1BQU0sTUFBTSxHQUFtQixLQUFLLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxPQUFPLEVBQUUsRUFBRTtJQUNwRixNQUFNLE1BQU0sR0FBRyxJQUFJLHNCQUFNLENBQUM7UUFDeEIsY0FBYyxFQUFFLElBQUksbUNBQWUsQ0FBQztZQUNsQyxhQUFhLEVBQUUsT0FBTztTQUN2QixDQUFDO0tBQ0gsQ0FBQyxDQUFDO0lBRUgsTUFBTSxhQUFhLEdBQUcsRUFBRSxZQUFZLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxjQUFjLEVBQUUsQ0FBQztJQUNyRixPQUFPLENBQUMsR0FBRyxDQUFDLEVBQUUsYUFBYSxFQUFFLENBQUMsQ0FBQztJQUUvQiwyREFBMkQ7SUFDM0Qsd0NBQXdDO0lBRXhDLElBQUksVUFBVSxHQUFHLENBQUMsQ0FBQztJQUNuQixNQUFNLEtBQUssR0FBRyxJQUFJLENBQUM7SUFFbkIsSUFBSSxjQUFjLENBQUM7SUFDbkIsT0FBTyxJQUFJLEVBQUU7UUFDWCxJQUFJO1lBQ0YsY0FBYyxHQUFHLE1BQU0sTUFBTSxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsQ0FBQztZQUNwRCxNQUFNO1NBQ1A7UUFBQyxPQUFPLEtBQUssRUFBRTtZQUNkLElBQUksS0FBSyxZQUFZLHNDQUFxQixJQUFJLFVBQVUsR0FBRyxFQUFFLEVBQUU7Z0JBQzdELFVBQVUsRUFBRSxDQUFDO2dCQUNiLE1BQU0sSUFBSSxPQUFPLENBQUMsQ0FBQyxPQUFPLEVBQUUsRUFBRTtvQkFDNUIsVUFBVSxDQUFDLE9BQU8sRUFBRSxLQUFLLENBQUMsQ0FBQztnQkFDN0IsQ0FBQyxDQUFDLENBQUM7Z0JBQ0gsU0FBUzthQUNWO1lBRUQsTUFBTSxLQUFLLENBQUM7U0FDYjtLQUNGO0lBRUQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFFLGNBQWMsRUFBRSxDQUFDLENBQUM7SUFDaEMsT0FBTyxjQUFjLENBQUM7QUFDeEIsQ0FBQyxDQUFDO0FBcENXLFFBQUEsTUFBTSxVQW9DakI7QUFFSyxLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtEO0lBQzlFLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQztJQUU5QyxJQUFJLEtBQUssQ0FBQyxXQUFXLEtBQUssUUFBUSxFQUFFO1FBQ2xDLE9BQU8sQ0FBQyxHQUFHLENBQUMsK0JBQStCLENBQUMsQ0FBQztRQUM3QyxPQUFPO0tBQ1I7SUFFRCxJQUFJLEtBQUssQ0FBQyxXQUFXLEtBQUssUUFBUSxJQUFJLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxzQkFBc0IsS0FBSyxPQUFPLEVBQUU7UUFDakcsT0FBTyxDQUFDLEdBQUcsQ0FBQyw2REFBNkQsQ0FBQyxDQUFDO1FBQzNFLE9BQU87S0FDUjtJQUVELE1BQU0sVUFBVSxHQUFHLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxVQUFVLENBQUM7SUFDdkQsSUFBSSxDQUFDLFVBQVUsRUFBRTtRQUNmLE1BQU0sSUFBSSxLQUFLLENBQUMsdUNBQXVDLENBQUMsQ0FBQztLQUMxRDtJQUVELE1BQU0sY0FBYyxHQUFHLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxjQUFjLENBQUM7SUFDL0QsTUFBTSxPQUFPLEdBQUcsS0FBSyxDQUFDLGtCQUFrQixDQUFDLE9BQU8sQ0FBQztJQUVqRCxNQUFNLGFBQWEsR0FBRyxRQUFRLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDeEMsSUFBSSxLQUFLLENBQUMsYUFBYSxDQUFDLEVBQUU7UUFDeEIsTUFBTSxJQUFJLEtBQUssQ0FBQyxxQ0FBcUMsT0FBTywrQkFBK0IsQ0FBQyxDQUFDO0tBQzlGO0lBRUQsTUFBTSxjQUFjLEdBQUcsTUFBTSxJQUFBLGNBQU0sRUFBQyxVQUFVLEVBQUUsY0FBYyxFQUFFLGFBQWEsQ0FBQyxDQUFDO0lBRS9FLElBQUksY0FBYyxDQUFDLFVBQVUsSUFBSSxjQUFjLENBQUMsVUFBVSxJQUFJLEdBQUcsRUFBRTtRQUNqRSxNQUFNLElBQUksS0FBSyxDQUFDLDJDQUEyQyxjQUFjLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQztLQUN6RjtJQUVELDJFQUEyRTtJQUMzRSxJQUFJLGNBQWMsQ0FBQyxhQUFhLEVBQUU7UUFDaEMsTUFBTSxJQUFJLEtBQUssQ0FBQyxVQUFVLENBQUMsY0FBYyxDQUFDLE9BQU8sRUFBRSxRQUFRLEVBQUUsQ0FBQyxDQUFDLENBQUM7S0FDakU7QUFDSCxDQUFDO0FBcENELDBCQW9DQztBQUVEOztHQUVHO0FBQ0gsU0FBUyxVQUFVLENBQUMsT0FBMkI7SUFDN0MsT0FBTyxDQUFDLEdBQUcsQ0FBQyxrQkFBa0IsT0FBTyxFQUFFLENBQUMsQ0FBQztJQUN6QyxJQUFJLENBQUMsT0FBTyxFQUFFO1FBQ1osT0FBTyx1QkFBdUIsQ0FBQztLQUNoQztJQUNELElBQUk7UUFDRixNQUFNLEtBQUssR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQ2xDLE1BQU0sTUFBTSxHQUFHLENBQUMsS0FBSyxDQUFDLFlBQVksRUFBRSxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQzNFLE9BQU8sTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDO0tBQzdDO0lBQUMsTUFBTTtRQUNOLDBDQUEwQztRQUMxQyxPQUFPLE9BQU8sQ0FBQztLQUNoQjtBQUNILENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1jb25zb2xlICovXG5cbi8qIGVzbGludC1kaXNhYmxlIGltcG9ydC9uby1leHRyYW5lb3VzLWRlcGVuZGVuY2llcyAqL1xuaW1wb3J0IHsgQWNjZXNzRGVuaWVkRXhjZXB0aW9uIH0gZnJvbSAnQGF3cy1zZGsvY2xpZW50LWFjY291bnQnO1xuaW1wb3J0IHsgTGFtYmRhLCBJbnZvY2F0aW9uUmVzcG9uc2UgfSBmcm9tICdAYXdzLXNkay9jbGllbnQtbGFtYmRhJztcbmltcG9ydCB7IE5vZGVIdHRwSGFuZGxlciB9IGZyb20gJ0Bhd3Mtc2RrL25vZGUtaHR0cC1oYW5kbGVyJztcblxuZXhwb3J0IHR5cGUgSW52b2tlRnVuY3Rpb24gPSAoZnVuY3Rpb25OYW1lOiBzdHJpbmcsIGludm9jYXRpb25UeXBlOiBzdHJpbmcsIHRpbWVvdXQ6IG51bWJlcikgPT4gUHJvbWlzZTxJbnZvY2F0aW9uUmVzcG9uc2U+O1xuXG5leHBvcnQgY29uc3QgaW52b2tlOiBJbnZva2VGdW5jdGlvbiA9IGFzeW5jIChmdW5jdGlvbk5hbWUsIGludm9jYXRpb25UeXBlLCB0aW1lb3V0KSA9PiB7XG4gIGNvbnN0IGxhbWJkYSA9IG5ldyBMYW1iZGEoe1xuICAgIHJlcXVlc3RIYW5kbGVyOiBuZXcgTm9kZUh0dHBIYW5kbGVyKHtcbiAgICAgIHNvY2tldFRpbWVvdXQ6IHRpbWVvdXQsXG4gICAgfSksXG4gIH0pO1xuXG4gIGNvbnN0IGludm9rZVJlcXVlc3QgPSB7IEZ1bmN0aW9uTmFtZTogZnVuY3Rpb25OYW1lLCBJbnZvY2F0aW9uVHlwZTogaW52b2NhdGlvblR5cGUgfTtcbiAgY29uc29sZS5sb2coeyBpbnZva2VSZXF1ZXN0IH0pO1xuXG4gIC8vIElBTSBwb2xpY3kgY2hhbmdlcyBjYW4gdGFrZSBzb21lIHRpbWUgdG8gZnVsbHkgcHJvcGFnYXRlXG4gIC8vIFRoZXJlZm9yZSwgcmV0cnkgZm9yIHVwIHRvIG9uZSBtaW51dGVcblxuICBsZXQgcmV0cnlDb3VudCA9IDA7XG4gIGNvbnN0IGRlbGF5ID0gNTAwMDtcblxuICBsZXQgaW52b2tlUmVzcG9uc2U7XG4gIHdoaWxlICh0cnVlKSB7XG4gICAgdHJ5IHtcbiAgICAgIGludm9rZVJlc3BvbnNlID0gYXdhaXQgbGFtYmRhLmludm9rZShpbnZva2VSZXF1ZXN0KTtcbiAgICAgIGJyZWFrO1xuICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICBpZiAoZXJyb3IgaW5zdGFuY2VvZiBBY2Nlc3NEZW5pZWRFeGNlcHRpb24gJiYgcmV0cnlDb3VudCA8IDEyKSB7XG4gICAgICAgIHJldHJ5Q291bnQrKztcbiAgICAgICAgYXdhaXQgbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcbiAgICAgICAgICBzZXRUaW1lb3V0KHJlc29sdmUsIGRlbGF5KTtcbiAgICAgICAgfSk7XG4gICAgICAgIGNvbnRpbnVlO1xuICAgICAgfVxuXG4gICAgICB0aHJvdyBlcnJvcjtcbiAgICB9XG4gIH1cblxuICBjb25zb2xlLmxvZyh7IGludm9rZVJlc3BvbnNlIH0pO1xuICByZXR1cm4gaW52b2tlUmVzcG9uc2U7XG59O1xuXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gaGFuZGxlcihldmVudDogQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VFdmVudCkge1xuICBjb25zb2xlLmxvZyh7IC4uLmV2ZW50LCBSZXNwb25zZVVSTDogJy4uLicgfSk7XG5cbiAgaWYgKGV2ZW50LlJlcXVlc3RUeXBlID09PSAnRGVsZXRlJykge1xuICAgIGNvbnNvbGUubG9nKCdub3QgY2FsbGluZyB0cmlnZ2VyIG9uIERFTEVURScpO1xuICAgIHJldHVybjtcbiAgfVxuXG4gIGlmIChldmVudC5SZXF1ZXN0VHlwZSA9PT0gJ1VwZGF0ZScgJiYgZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLkV4ZWN1dGVPbkhhbmRsZXJDaGFuZ2UgPT09ICdmYWxzZScpIHtcbiAgICBjb25zb2xlLmxvZygnbm90IGNhbGxpbmcgdHJpZ2dlciBiZWNhdXNlIEV4ZWN1dGVPbkhhbmRsZXJDaGFuZ2UgaXMgZmFsc2UnKTtcbiAgICByZXR1cm47XG4gIH1cblxuICBjb25zdCBoYW5kbGVyQXJuID0gZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLkhhbmRsZXJBcm47XG4gIGlmICghaGFuZGxlckFybikge1xuICAgIHRocm93IG5ldyBFcnJvcignVGhlIFwiSGFuZGxlckFyblwiIHByb3BlcnR5IGlzIHJlcXVpcmVkJyk7XG4gIH1cblxuICBjb25zdCBpbnZvY2F0aW9uVHlwZSA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5JbnZvY2F0aW9uVHlwZTtcbiAgY29uc3QgdGltZW91dCA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5UaW1lb3V0O1xuXG4gIGNvbnN0IHBhcnNlZFRpbWVvdXQgPSBwYXJzZUludCh0aW1lb3V0KTtcbiAgaWYgKGlzTmFOKHBhcnNlZFRpbWVvdXQpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgXCJUaW1lb3V0XCIgcHJvcGVydHkgd2l0aCB2YWx1ZSAke3RpbWVvdXR9IGlzIG5vdCBwYXJzZWFibGUgdG8gYSBudW1iZXJgKTtcbiAgfVxuXG4gIGNvbnN0IGludm9rZVJlc3BvbnNlID0gYXdhaXQgaW52b2tlKGhhbmRsZXJBcm4sIGludm9jYXRpb25UeXBlLCBwYXJzZWRUaW1lb3V0KTtcblxuICBpZiAoaW52b2tlUmVzcG9uc2UuU3RhdHVzQ29kZSAmJiBpbnZva2VSZXNwb25zZS5TdGF0dXNDb2RlID49IDQwMCkge1xuICAgIHRocm93IG5ldyBFcnJvcihgVHJpZ2dlciBoYW5kbGVyIGZhaWxlZCB3aXRoIHN0YXR1cyBjb2RlICR7aW52b2tlUmVzcG9uc2UuU3RhdHVzQ29kZX1gKTtcbiAgfVxuXG4gIC8vIGlmIHRoZSBsYW1iZGEgZnVuY3Rpb24gdGhyb3dzIGFuIGVycm9yLCBwYXJzZSB0aGUgZXJyb3IgbWVzc2FnZSBhbmQgZmFpbFxuICBpZiAoaW52b2tlUmVzcG9uc2UuRnVuY3Rpb25FcnJvcikge1xuICAgIHRocm93IG5ldyBFcnJvcihwYXJzZUVycm9yKGludm9rZVJlc3BvbnNlLlBheWxvYWQ/LnRvU3RyaW5nKCkpKTtcbiAgfVxufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBlcnJvciBtZXNzYWdlIGZyb20gdGhlIGxhbWJkYSBmdW5jdGlvbi5cbiAqL1xuZnVuY3Rpb24gcGFyc2VFcnJvcihwYXlsb2FkOiBzdHJpbmcgfCB1bmRlZmluZWQpOiBzdHJpbmcge1xuICBjb25zb2xlLmxvZyhgRXJyb3IgcGF5bG9hZDogJHtwYXlsb2FkfWApO1xuICBpZiAoIXBheWxvYWQpIHtcbiAgICByZXR1cm4gJ3Vua25vd24gaGFuZGxlciBlcnJvcic7XG4gIH1cbiAgdHJ5IHtcbiAgICBjb25zdCBlcnJvciA9IEpTT04ucGFyc2UocGF5bG9hZCk7XG4gICAgY29uc3QgY29uY2F0ID0gW2Vycm9yLmVycm9yTWVzc2FnZSwgZXJyb3IudHJhY2VdLmZpbHRlcih4ID0+IHgpLmpvaW4oJ1xcbicpO1xuICAgIHJldHVybiBjb25jYXQubGVuZ3RoID4gMCA/IGNvbmNhdCA6IHBheWxvYWQ7XG4gIH0gY2F0Y2gge1xuICAgIC8vIGZhbGwgYmFjayB0byBqdXN0IHJldHVybmluZyB0aGUgcGF5bG9hZFxuICAgIHJldHVybiBwYXlsb2FkO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232/index.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232/index.js deleted file mode 100644 index 86f218d44379f..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.bcb8f5f1cebce365c4a0bf886b9820908bb469b121d65ef42809ae9798fb9232/index.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -/* eslint-disable no-console */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = exports.invoke = void 0; -/* eslint-disable import/no-extraneous-dependencies */ -const client_account_1 = require("@aws-sdk/client-account"); -const client_lambda_1 = require("@aws-sdk/client-lambda"); -const node_http_handler_1 = require("@aws-sdk/node-http-handler"); -const invoke = async (functionName, invocationType, timeout) => { - const lambda = new client_lambda_1.Lambda({ - requestHandler: new node_http_handler_1.NodeHttpHandler({ - socketTimeout: timeout, - }), - }); - const invokeRequest = { FunctionName: functionName, InvocationType: invocationType }; - console.log({ invokeRequest }); - // IAM policy changes can take some time to fully propagate - // Therefore, retry for up to one minute - let retryCount = 0; - const delay = 5000; - let invokeResponse; - while (true) { - try { - invokeResponse = await lambda.invoke(invokeRequest); - break; - } - catch (error) { - if (error instanceof client_account_1.AccessDeniedException && retryCount < 12) { - retryCount++; - await new Promise((resolve) => { - setTimeout(resolve, delay); - }); - continue; - } - throw error; - } - } - console.log({ invokeResponse }); - return invokeResponse; -}; -exports.invoke = invoke; -async function handler(event) { - console.log({ ...event, ResponseURL: '...' }); - if (event.RequestType === 'Delete') { - console.log('not calling trigger on DELETE'); - return; - } - const handlerArn = event.ResourceProperties.HandlerArn; - if (!handlerArn) { - throw new Error('The "HandlerArn" property is required'); - } - const invocationType = event.ResourceProperties.InvocationType; - const timeout = event.ResourceProperties.Timeout; - const parsedTimeout = parseInt(timeout); - if (isNaN(parsedTimeout)) { - throw new Error(`The "Timeout" property with value ${timeout} is not parseable to a number`); - } - const invokeResponse = await (0, exports.invoke)(handlerArn, invocationType, parsedTimeout); - if (invokeResponse.StatusCode && invokeResponse.StatusCode >= 400) { - throw new Error(`Trigger handler failed with status code ${invokeResponse.StatusCode}`); - } - // if the lambda function throws an error, parse the error message and fail - if (invokeResponse.FunctionError) { - throw new Error(parseError(invokeResponse.Payload?.toString())); - } -} -exports.handler = handler; -/** - * Parse the error message from the lambda function. - */ -function parseError(payload) { - console.log(`Error payload: ${payload}`); - if (!payload) { - return 'unknown handler error'; - } - try { - const error = JSON.parse(payload); - const concat = [error.errorMessage, error.trace].filter(x => x).join('\n'); - return concat.length > 0 ? concat : payload; - } - catch { - // fall back to just returning the payload - return payload; - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0JBQStCOzs7QUFFL0Isc0RBQXNEO0FBQ3RELDREQUFnRTtBQUNoRSwwREFBb0U7QUFDcEUsa0VBQTZEO0FBSXRELE1BQU0sTUFBTSxHQUFtQixLQUFLLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxPQUFPLEVBQUUsRUFBRTtJQUNwRixNQUFNLE1BQU0sR0FBRyxJQUFJLHNCQUFNLENBQUM7UUFDeEIsY0FBYyxFQUFFLElBQUksbUNBQWUsQ0FBQztZQUNsQyxhQUFhLEVBQUUsT0FBTztTQUN2QixDQUFDO0tBQ0gsQ0FBQyxDQUFDO0lBRUgsTUFBTSxhQUFhLEdBQUcsRUFBRSxZQUFZLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxjQUFjLEVBQUUsQ0FBQztJQUNyRixPQUFPLENBQUMsR0FBRyxDQUFDLEVBQUUsYUFBYSxFQUFFLENBQUMsQ0FBQztJQUUvQiwyREFBMkQ7SUFDM0Qsd0NBQXdDO0lBRXhDLElBQUksVUFBVSxHQUFHLENBQUMsQ0FBQztJQUNuQixNQUFNLEtBQUssR0FBRyxJQUFJLENBQUM7SUFFbkIsSUFBSSxjQUFjLENBQUM7SUFDbkIsT0FBTyxJQUFJLEVBQUU7UUFDWCxJQUFJO1lBQ0YsY0FBYyxHQUFHLE1BQU0sTUFBTSxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsQ0FBQztZQUNwRCxNQUFNO1NBQ1A7UUFBQyxPQUFPLEtBQUssRUFBRTtZQUNkLElBQUksS0FBSyxZQUFZLHNDQUFxQixJQUFJLFVBQVUsR0FBRyxFQUFFLEVBQUU7Z0JBQzdELFVBQVUsRUFBRSxDQUFDO2dCQUNiLE1BQU0sSUFBSSxPQUFPLENBQUMsQ0FBQyxPQUFPLEVBQUUsRUFBRTtvQkFDNUIsVUFBVSxDQUFDLE9BQU8sRUFBRSxLQUFLLENBQUMsQ0FBQztnQkFDN0IsQ0FBQyxDQUFDLENBQUM7Z0JBQ0gsU0FBUzthQUNWO1lBRUQsTUFBTSxLQUFLLENBQUM7U0FDYjtLQUNGO0lBRUQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFFLGNBQWMsRUFBRSxDQUFDLENBQUM7SUFDaEMsT0FBTyxjQUFjLENBQUM7QUFDeEIsQ0FBQyxDQUFDO0FBcENXLFFBQUEsTUFBTSxVQW9DakI7QUFFSyxLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtEO0lBQzlFLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQztJQUU5QyxJQUFJLEtBQUssQ0FBQyxXQUFXLEtBQUssUUFBUSxFQUFFO1FBQ2xDLE9BQU8sQ0FBQyxHQUFHLENBQUMsK0JBQStCLENBQUMsQ0FBQztRQUM3QyxPQUFPO0tBQ1I7SUFFRCxNQUFNLFVBQVUsR0FBRyxLQUFLLENBQUMsa0JBQWtCLENBQUMsVUFBVSxDQUFDO0lBQ3ZELElBQUksQ0FBQyxVQUFVLEVBQUU7UUFDZixNQUFNLElBQUksS0FBSyxDQUFDLHVDQUF1QyxDQUFDLENBQUM7S0FDMUQ7SUFFRCxNQUFNLGNBQWMsR0FBRyxLQUFLLENBQUMsa0JBQWtCLENBQUMsY0FBYyxDQUFDO0lBQy9ELE1BQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxPQUFPLENBQUM7SUFFakQsTUFBTSxhQUFhLEdBQUcsUUFBUSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ3hDLElBQUksS0FBSyxDQUFDLGFBQWEsQ0FBQyxFQUFFO1FBQ3hCLE1BQU0sSUFBSSxLQUFLLENBQUMscUNBQXFDLE9BQU8sK0JBQStCLENBQUMsQ0FBQztLQUM5RjtJQUVELE1BQU0sY0FBYyxHQUFHLE1BQU0sSUFBQSxjQUFNLEVBQUMsVUFBVSxFQUFFLGNBQWMsRUFBRSxhQUFhLENBQUMsQ0FBQztJQUUvRSxJQUFJLGNBQWMsQ0FBQyxVQUFVLElBQUksY0FBYyxDQUFDLFVBQVUsSUFBSSxHQUFHLEVBQUU7UUFDakUsTUFBTSxJQUFJLEtBQUssQ0FBQywyQ0FBMkMsY0FBYyxDQUFDLFVBQVUsRUFBRSxDQUFDLENBQUM7S0FDekY7SUFFRCwyRUFBMkU7SUFDM0UsSUFBSSxjQUFjLENBQUMsYUFBYSxFQUFFO1FBQ2hDLE1BQU0sSUFBSSxLQUFLLENBQUMsVUFBVSxDQUFDLGNBQWMsQ0FBQyxPQUFPLEVBQUUsUUFBUSxFQUFFLENBQUMsQ0FBQyxDQUFDO0tBQ2pFO0FBQ0gsQ0FBQztBQS9CRCwwQkErQkM7QUFFRDs7R0FFRztBQUNILFNBQVMsVUFBVSxDQUFDLE9BQTJCO0lBQzdDLE9BQU8sQ0FBQyxHQUFHLENBQUMsa0JBQWtCLE9BQU8sRUFBRSxDQUFDLENBQUM7SUFDekMsSUFBSSxDQUFDLE9BQU8sRUFBRTtRQUNaLE9BQU8sdUJBQXVCLENBQUM7S0FDaEM7SUFDRCxJQUFJO1FBQ0YsTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUNsQyxNQUFNLE1BQU0sR0FBRyxDQUFDLEtBQUssQ0FBQyxZQUFZLEVBQUUsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUMzRSxPQUFPLE1BQU0sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQztLQUM3QztJQUFDLE1BQU07UUFDTiwwQ0FBMEM7UUFDMUMsT0FBTyxPQUFPLENBQUM7S0FDaEI7QUFDSCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tY29uc29sZSAqL1xuXG4vKiBlc2xpbnQtZGlzYWJsZSBpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXMgKi9cbmltcG9ydCB7IEFjY2Vzc0RlbmllZEV4Y2VwdGlvbiB9IGZyb20gJ0Bhd3Mtc2RrL2NsaWVudC1hY2NvdW50JztcbmltcG9ydCB7IExhbWJkYSwgSW52b2NhdGlvblJlc3BvbnNlIH0gZnJvbSAnQGF3cy1zZGsvY2xpZW50LWxhbWJkYSc7XG5pbXBvcnQgeyBOb2RlSHR0cEhhbmRsZXIgfSBmcm9tICdAYXdzLXNkay9ub2RlLWh0dHAtaGFuZGxlcic7XG5cbmV4cG9ydCB0eXBlIEludm9rZUZ1bmN0aW9uID0gKGZ1bmN0aW9uTmFtZTogc3RyaW5nLCBpbnZvY2F0aW9uVHlwZTogc3RyaW5nLCB0aW1lb3V0OiBudW1iZXIpID0+IFByb21pc2U8SW52b2NhdGlvblJlc3BvbnNlPjtcblxuZXhwb3J0IGNvbnN0IGludm9rZTogSW52b2tlRnVuY3Rpb24gPSBhc3luYyAoZnVuY3Rpb25OYW1lLCBpbnZvY2F0aW9uVHlwZSwgdGltZW91dCkgPT4ge1xuICBjb25zdCBsYW1iZGEgPSBuZXcgTGFtYmRhKHtcbiAgICByZXF1ZXN0SGFuZGxlcjogbmV3IE5vZGVIdHRwSGFuZGxlcih7XG4gICAgICBzb2NrZXRUaW1lb3V0OiB0aW1lb3V0LFxuICAgIH0pLFxuICB9KTtcblxuICBjb25zdCBpbnZva2VSZXF1ZXN0ID0geyBGdW5jdGlvbk5hbWU6IGZ1bmN0aW9uTmFtZSwgSW52b2NhdGlvblR5cGU6IGludm9jYXRpb25UeXBlIH07XG4gIGNvbnNvbGUubG9nKHsgaW52b2tlUmVxdWVzdCB9KTtcblxuICAvLyBJQU0gcG9saWN5IGNoYW5nZXMgY2FuIHRha2Ugc29tZSB0aW1lIHRvIGZ1bGx5IHByb3BhZ2F0ZVxuICAvLyBUaGVyZWZvcmUsIHJldHJ5IGZvciB1cCB0byBvbmUgbWludXRlXG5cbiAgbGV0IHJldHJ5Q291bnQgPSAwO1xuICBjb25zdCBkZWxheSA9IDUwMDA7XG5cbiAgbGV0IGludm9rZVJlc3BvbnNlO1xuICB3aGlsZSAodHJ1ZSkge1xuICAgIHRyeSB7XG4gICAgICBpbnZva2VSZXNwb25zZSA9IGF3YWl0IGxhbWJkYS5pbnZva2UoaW52b2tlUmVxdWVzdCk7XG4gICAgICBicmVhaztcbiAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgaWYgKGVycm9yIGluc3RhbmNlb2YgQWNjZXNzRGVuaWVkRXhjZXB0aW9uICYmIHJldHJ5Q291bnQgPCAxMikge1xuICAgICAgICByZXRyeUNvdW50Kys7XG4gICAgICAgIGF3YWl0IG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICAgICAgc2V0VGltZW91dChyZXNvbHZlLCBkZWxheSk7XG4gICAgICAgIH0pO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgdGhyb3cgZXJyb3I7XG4gICAgfVxuICB9XG5cbiAgY29uc29sZS5sb2coeyBpbnZva2VSZXNwb25zZSB9KTtcbiAgcmV0dXJuIGludm9rZVJlc3BvbnNlO1xufTtcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGhhbmRsZXIoZXZlbnQ6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQpIHtcbiAgY29uc29sZS5sb2coeyAuLi5ldmVudCwgUmVzcG9uc2VVUkw6ICcuLi4nIH0pO1xuXG4gIGlmIChldmVudC5SZXF1ZXN0VHlwZSA9PT0gJ0RlbGV0ZScpIHtcbiAgICBjb25zb2xlLmxvZygnbm90IGNhbGxpbmcgdHJpZ2dlciBvbiBERUxFVEUnKTtcbiAgICByZXR1cm47XG4gIH1cblxuICBjb25zdCBoYW5kbGVyQXJuID0gZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLkhhbmRsZXJBcm47XG4gIGlmICghaGFuZGxlckFybikge1xuICAgIHRocm93IG5ldyBFcnJvcignVGhlIFwiSGFuZGxlckFyblwiIHByb3BlcnR5IGlzIHJlcXVpcmVkJyk7XG4gIH1cblxuICBjb25zdCBpbnZvY2F0aW9uVHlwZSA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5JbnZvY2F0aW9uVHlwZTtcbiAgY29uc3QgdGltZW91dCA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5UaW1lb3V0O1xuXG4gIGNvbnN0IHBhcnNlZFRpbWVvdXQgPSBwYXJzZUludCh0aW1lb3V0KTtcbiAgaWYgKGlzTmFOKHBhcnNlZFRpbWVvdXQpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgXCJUaW1lb3V0XCIgcHJvcGVydHkgd2l0aCB2YWx1ZSAke3RpbWVvdXR9IGlzIG5vdCBwYXJzZWFibGUgdG8gYSBudW1iZXJgKTtcbiAgfVxuXG4gIGNvbnN0IGludm9rZVJlc3BvbnNlID0gYXdhaXQgaW52b2tlKGhhbmRsZXJBcm4sIGludm9jYXRpb25UeXBlLCBwYXJzZWRUaW1lb3V0KTtcblxuICBpZiAoaW52b2tlUmVzcG9uc2UuU3RhdHVzQ29kZSAmJiBpbnZva2VSZXNwb25zZS5TdGF0dXNDb2RlID49IDQwMCkge1xuICAgIHRocm93IG5ldyBFcnJvcihgVHJpZ2dlciBoYW5kbGVyIGZhaWxlZCB3aXRoIHN0YXR1cyBjb2RlICR7aW52b2tlUmVzcG9uc2UuU3RhdHVzQ29kZX1gKTtcbiAgfVxuXG4gIC8vIGlmIHRoZSBsYW1iZGEgZnVuY3Rpb24gdGhyb3dzIGFuIGVycm9yLCBwYXJzZSB0aGUgZXJyb3IgbWVzc2FnZSBhbmQgZmFpbFxuICBpZiAoaW52b2tlUmVzcG9uc2UuRnVuY3Rpb25FcnJvcikge1xuICAgIHRocm93IG5ldyBFcnJvcihwYXJzZUVycm9yKGludm9rZVJlc3BvbnNlLlBheWxvYWQ/LnRvU3RyaW5nKCkpKTtcbiAgfVxufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBlcnJvciBtZXNzYWdlIGZyb20gdGhlIGxhbWJkYSBmdW5jdGlvbi5cbiAqL1xuZnVuY3Rpb24gcGFyc2VFcnJvcihwYXlsb2FkOiBzdHJpbmcgfCB1bmRlZmluZWQpOiBzdHJpbmcge1xuICBjb25zb2xlLmxvZyhgRXJyb3IgcGF5bG9hZDogJHtwYXlsb2FkfWApO1xuICBpZiAoIXBheWxvYWQpIHtcbiAgICByZXR1cm4gJ3Vua25vd24gaGFuZGxlciBlcnJvcic7XG4gIH1cbiAgdHJ5IHtcbiAgICBjb25zdCBlcnJvciA9IEpTT04ucGFyc2UocGF5bG9hZCk7XG4gICAgY29uc3QgY29uY2F0ID0gW2Vycm9yLmVycm9yTWVzc2FnZSwgZXJyb3IudHJhY2VdLmZpbHRlcih4ID0+IHgpLmpvaW4oJ1xcbicpO1xuICAgIHJldHVybiBjb25jYXQubGVuZ3RoID4gMCA/IGNvbmNhdCA6IHBheWxvYWQ7XG4gIH0gY2F0Y2gge1xuICAgIC8vIGZhbGwgYmFjayB0byBqdXN0IHJldHVybmluZyB0aGUgcGF5bG9hZFxuICAgIHJldHVybiBwYXlsb2FkO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.bundle/index.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.bundle/index.js similarity index 96% rename from packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.bundle/index.js rename to packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.bundle/index.js index 8555fb712a126..69209d46ead27 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.86e6ecbc86f6febc745cde7ce633979efa869d6d493b12f2c9d8641d70caa7c2.bundle/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.e4815916885b43e053d8fcef603638aa3a4754c27a3cb0d21fd1c50c2923415b.bundle/index.js @@ -1,4 +1,3 @@ -"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; @@ -55,12 +54,12 @@ var Matcher, MatchResult; var init_matcher = __esm({ "../../aws-cdk-lib/assertions/lib/matcher.ts"() { "use strict"; - Matcher = class { + Matcher = class _Matcher { /** * Check whether the provided object is a subtype of the `IMatcher`. */ static isMatcher(x) { - return x && x instanceof Matcher; + return x && x instanceof _Matcher; } }; MatchResult = class { @@ -195,7 +194,7 @@ ${indents.join("")}`)); emit(`!! ${fail.message} `); } - scrapSet == null ? void 0 : scrapSet.delete(path); + scrapSet?.delete(path); } function recurse(r) { const remainingFailures = new Set(Array.from(r.failuresHere.keys()).filter((x) => x !== "")); @@ -381,12 +380,10 @@ var init_sparse_matrix = __esm({ this.matrix = /* @__PURE__ */ new Map(); } get(row, col) { - var _a; - return (_a = this.matrix.get(row)) == null ? void 0 : _a.get(col); + return this.matrix.get(row)?.get(col); } row(row) { - var _a; - return Array.from(((_a = this.matrix.get(row)) == null ? void 0 : _a.entries()) ?? []); + return Array.from(this.matrix.get(row)?.entries() ?? []); } set(row, col, value) { let r = this.matrix.get(row); @@ -816,6 +813,7 @@ var require_helpers_internal = __commonJS({ // ../../../node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { + __addDisposableResource: () => __addDisposableResource, __assign: () => __assign, __asyncDelegator: () => __asyncDelegator, __asyncGenerator: () => __asyncGenerator, @@ -827,6 +825,7 @@ __export(tslib_es6_exports, { __classPrivateFieldSet: () => __classPrivateFieldSet, __createBinding: () => __createBinding, __decorate: () => __decorate, + __disposeResources: () => __disposeResources, __esDecorate: () => __esDecorate, __exportStar: () => __exportStar, __extends: () => __extends, @@ -1229,7 +1228,54 @@ function __classPrivateFieldIn(state, receiver) { throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } -var extendStatics, __assign, __createBinding, __setModuleDefault, tslib_es6_default; +function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") + throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) + throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) + throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") + throw new TypeError("Object not disposable."); + env.stack.push({ value, dispose, async }); + } else if (async) { + env.stack.push({ async: true }); + } + return value; +} +function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) + return Promise.resolve(result).then(next, function(e) { + fail(e); + return next(); + }); + } catch (e) { + fail(e); + } + } + if (env.hasError) + throw env.error; + } + return next(); +} +var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ "../../../node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { @@ -1274,6 +1320,10 @@ var init_tslib_es6 = __esm({ } : function(o, v) { o["default"] = v; }; + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; tslib_es6_default = { __extends, __assign, @@ -1299,7 +1349,9 @@ var init_tslib_es6 = __esm({ __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, - __classPrivateFieldIn + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources }; } }); @@ -1326,6 +1378,14 @@ var require_auth = __commonJS({ } }); +// ../../../node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js +var require_blob_payload_input_types = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + // ../../../node_modules/@smithy/types/dist-cjs/checksum.js var require_checksum = __commonJS({ "../../../node_modules/@smithy/types/dist-cjs/checksum.js"(exports) { @@ -1599,6 +1659,30 @@ var require_stream = __commonJS({ } }); +// ../../../node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js +var require_streaming_blob_common_types = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +var require_streaming_blob_payload_input_types = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +var require_streaming_blob_payload_output_types = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + // ../../../node_modules/@smithy/types/dist-cjs/transfer.js var require_transfer = __commonJS({ "../../../node_modules/@smithy/types/dist-cjs/transfer.js"(exports) { @@ -1614,6 +1698,22 @@ var require_transfer = __commonJS({ } }); +// ../../../node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js +var require_client_payload_blob_type_narrow = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/transform/type-transform.js +var require_type_transform = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/transform/type-transform.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + // ../../../node_modules/@smithy/types/dist-cjs/uri.js var require_uri = __commonJS({ "../../../node_modules/@smithy/types/dist-cjs/uri.js"(exports) { @@ -1646,6 +1746,7 @@ var require_dist_cjs = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_abort(), exports); tslib_1.__exportStar(require_auth(), exports); + tslib_1.__exportStar(require_blob_payload_input_types(), exports); tslib_1.__exportStar(require_checksum(), exports); tslib_1.__exportStar(require_client(), exports); tslib_1.__exportStar(require_command(), exports); @@ -1667,7 +1768,12 @@ var require_dist_cjs = __commonJS({ tslib_1.__exportStar(require_shapes(), exports); tslib_1.__exportStar(require_signature(), exports); tslib_1.__exportStar(require_stream(), exports); + tslib_1.__exportStar(require_streaming_blob_common_types(), exports); + tslib_1.__exportStar(require_streaming_blob_payload_input_types(), exports); + tslib_1.__exportStar(require_streaming_blob_payload_output_types(), exports); tslib_1.__exportStar(require_transfer(), exports); + tslib_1.__exportStar(require_client_payload_blob_type_narrow(), exports); + tslib_1.__exportStar(require_type_transform(), exports); tslib_1.__exportStar(require_uri(), exports); tslib_1.__exportStar(require_util(), exports); tslib_1.__exportStar(require_waiter(), exports); @@ -1750,7 +1856,7 @@ var require_httpRequest = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpRequest = void 0; - var HttpRequest = class { + var HttpRequest = class _HttpRequest { constructor(options) { this.method = options.method || "GET"; this.hostname = options.hostname || "localhost"; @@ -1771,7 +1877,7 @@ var require_httpRequest = __commonJS({ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; } clone() { - const cloned = new HttpRequest({ + const cloned = new _HttpRequest({ ...this, headers: { ...this.headers } }); @@ -2011,12 +2117,12 @@ var require_ProviderError = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProviderError = void 0; - var ProviderError = class extends Error { + var ProviderError = class _ProviderError extends Error { constructor(message, tryNextLink = true) { super(message); this.tryNextLink = tryNextLink; this.name = "ProviderError"; - Object.setPrototypeOf(this, ProviderError.prototype); + Object.setPrototypeOf(this, _ProviderError.prototype); } static from(error, tryNextLink = true) { return Object.assign(new this(error.message, tryNextLink), error); @@ -2033,12 +2139,12 @@ var require_CredentialsProviderError = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.CredentialsProviderError = void 0; var ProviderError_1 = require_ProviderError(); - var CredentialsProviderError = class extends ProviderError_1.ProviderError { + var CredentialsProviderError = class _CredentialsProviderError extends ProviderError_1.ProviderError { constructor(message, tryNextLink = true) { super(message, tryNextLink); this.tryNextLink = tryNextLink; this.name = "CredentialsProviderError"; - Object.setPrototypeOf(this, CredentialsProviderError.prototype); + Object.setPrototypeOf(this, _CredentialsProviderError.prototype); } }; exports.CredentialsProviderError = CredentialsProviderError; @@ -2052,12 +2158,12 @@ var require_TokenProviderError = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.TokenProviderError = void 0; var ProviderError_1 = require_ProviderError(); - var TokenProviderError = class extends ProviderError_1.ProviderError { + var TokenProviderError = class _TokenProviderError extends ProviderError_1.ProviderError { constructor(message, tryNextLink = true) { super(message, tryNextLink); this.tryNextLink = tryNextLink; this.name = "TokenProviderError"; - Object.setPrototypeOf(this, TokenProviderError.prototype); + Object.setPrototypeOf(this, _TokenProviderError.prototype); } }; exports.TokenProviderError = TokenProviderError; @@ -3114,7 +3220,7 @@ var require_Int64 = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.Int64 = void 0; var util_hex_encoding_1 = require_dist_cjs8(); - var Int64 = class { + var Int64 = class _Int64 { constructor(bytes) { this.bytes = bytes; if (bytes.byteLength !== 8) { @@ -3132,7 +3238,7 @@ var require_Int64 = __commonJS({ if (number < 0) { negate(bytes); } - return new Int64(bytes); + return new _Int64(bytes); } valueOf() { const bytes = this.bytes.slice(0); @@ -4777,6 +4883,18 @@ var require_partition = __commonJS({ } }); +// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js +var require_isIpAddress = __commonJS({ + "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isIpAddress = void 0; + var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); + var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"); + exports.isIpAddress = isIpAddress; + } +}); + // ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/debugId.js var require_debugId = __commonJS({ "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/debugId.js"(exports) { @@ -4891,18 +5009,6 @@ var require_types2 = __commonJS({ } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js -var require_isIpAddress = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.isIpAddress = void 0; - var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); - var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"); - exports.isIpAddress = isIpAddress; - } -}); - // ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isValidHostLabel.js var require_isValidHostLabel = __commonJS({ "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isValidHostLabel.js"(exports) { @@ -5099,11 +5205,10 @@ var require_auth2 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpAuthLocation = void 0; - var HttpAuthLocation; - (function(HttpAuthLocation2) { - HttpAuthLocation2["HEADER"] = "header"; - HttpAuthLocation2["QUERY"] = "query"; - })(HttpAuthLocation = exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); + var types_1 = require_dist_cjs(); + Object.defineProperty(exports, "HttpAuthLocation", { enumerable: true, get: function() { + return types_1.HttpAuthLocation; + } }); } }); @@ -5139,39 +5244,11 @@ var require_command2 = __commonJS({ } }); -// ../../../node_modules/@aws-sdk/types/dist-cjs/connection/config.js -var require_config2 = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/connection/config.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/connection/manager.js -var require_manager2 = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/connection/manager.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/connection/pool.js -var require_pool2 = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/connection/pool.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/connection/index.js +// ../../../node_modules/@aws-sdk/types/dist-cjs/connection.js var require_connection2 = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/connection/index.js"(exports) { + "../../../node_modules/@aws-sdk/types/dist-cjs/connection.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_config2(), exports); - tslib_1.__exportStar(require_manager2(), exports); - tslib_1.__exportStar(require_pool2(), exports); } }); @@ -5219,11 +5296,10 @@ var require_endpoint2 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EndpointURLScheme = void 0; - var EndpointURLScheme; - (function(EndpointURLScheme2) { - EndpointURLScheme2["HTTP"] = "http"; - EndpointURLScheme2["HTTPS"] = "https"; - })(EndpointURLScheme = exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); + var types_1 = require_dist_cjs(); + Object.defineProperty(exports, "EndpointURLScheme", { enumerable: true, get: function() { + return types_1.EndpointURLScheme; + } }); } }); @@ -5399,12 +5475,10 @@ var require_transfer2 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RequestHandlerProtocol = void 0; - var RequestHandlerProtocol; - (function(RequestHandlerProtocol2) { - RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; - })(RequestHandlerProtocol = exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); + var types_1 = require_dist_cjs(); + Object.defineProperty(exports, "RequestHandlerProtocol", { enumerable: true, get: function() { + return types_1.RequestHandlerProtocol; + } }); } }); @@ -6022,6 +6096,7 @@ var require_dist_cjs18 = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_partition(), exports); + tslib_1.__exportStar(require_isIpAddress(), exports); tslib_1.__exportStar(require_resolveEndpoint(), exports); tslib_1.__exportStar(require_types2(), exports); } @@ -6285,7 +6360,7 @@ var require_endpointsConfig = __commonJS({ }); // ../../../node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js -var require_config3 = __commonJS({ +var require_config2 = __commonJS({ "../../../node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -6369,7 +6444,7 @@ var require_regionConfig = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_config3(), exports); + tslib_1.__exportStar(require_config2(), exports); tslib_1.__exportStar(require_resolveRegionConfig(), exports); } }); @@ -6994,7 +7069,7 @@ var require_dist_cjs26 = __commonJS({ }); // ../../../node_modules/@smithy/util-retry/dist-cjs/config.js -var require_config4 = __commonJS({ +var require_config3 = __commonJS({ "../../../node_modules/@smithy/util-retry/dist-cjs/config.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -7039,7 +7114,7 @@ var require_constants3 = __commonJS({ "TooManyRequestsException", "TransactionInProgressException" ]; - exports.TRANSIENT_ERROR_CODES = ["AbortError", "TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + exports.TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; exports.TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; exports.NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; } @@ -7259,7 +7334,7 @@ var require_StandardRetryStrategy = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StandardRetryStrategy = void 0; - var config_1 = require_config4(); + var config_1 = require_config3(); var constants_1 = require_constants4(); var defaultRetryBackoffStrategy_1 = require_defaultRetryBackoffStrategy(); var defaultRetryToken_1 = require_defaultRetryToken(); @@ -7330,7 +7405,7 @@ var require_AdaptiveRetryStrategy = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AdaptiveRetryStrategy = void 0; - var config_1 = require_config4(); + var config_1 = require_config3(); var DefaultRateLimiter_1 = require_DefaultRateLimiter(); var StandardRetryStrategy_1 = require_StandardRetryStrategy(); var AdaptiveRetryStrategy = class { @@ -7403,7 +7478,7 @@ var require_dist_cjs28 = __commonJS({ tslib_1.__exportStar(require_ConfiguredRetryStrategy(), exports); tslib_1.__exportStar(require_DefaultRateLimiter(), exports); tslib_1.__exportStar(require_StandardRetryStrategy(), exports); - tslib_1.__exportStar(require_config4(), exports); + tslib_1.__exportStar(require_config3(), exports); tslib_1.__exportStar(require_constants4(), exports); tslib_1.__exportStar(require_types4(), exports); } @@ -8544,7 +8619,7 @@ var require_Uint8ArrayBlobAdapter = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.Uint8ArrayBlobAdapter = void 0; var transforms_1 = require_transforms(); - var Uint8ArrayBlobAdapter = class extends Uint8Array { + var Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { static fromString(source, encoding = "utf-8") { switch (typeof source) { case "string": @@ -8554,7 +8629,7 @@ var require_Uint8ArrayBlobAdapter = __commonJS({ } } static mutate(source) { - Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); return source; } transformToString(encoding = "utf-8") { @@ -9852,10 +9927,10 @@ var require_exceptions = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.decorateServiceException = exports.ServiceException = void 0; - var ServiceException = class extends Error { + var ServiceException = class _ServiceException extends Error { constructor(options) { super(options.message); - Object.setPrototypeOf(this, ServiceException.prototype); + Object.setPrototypeOf(this, _ServiceException.prototype); this.name = options.name; this.$fault = options.$fault; this.$metadata = options.$metadata; @@ -10035,7 +10110,7 @@ var require_lazy_json = __commonJS({ } }); Object.setPrototypeOf(exports.StringWrapper, String); - var LazyJsonString = class extends exports.StringWrapper { + var LazyJsonString = class _LazyJsonString extends exports.StringWrapper { deserializeJSON() { return JSON.parse(super.toString()); } @@ -10043,12 +10118,12 @@ var require_lazy_json = __commonJS({ return super.toString(); } static fromObject(object) { - if (object instanceof LazyJsonString) { + if (object instanceof _LazyJsonString) { return object; } else if (object instanceof String || typeof object === "string") { - return new LazyJsonString(object); + return new _LazyJsonString(object); } - return new LazyJsonString(JSON.stringify(object)); + return new _LazyJsonString(JSON.stringify(object)); } }; exports.LazyJsonString = LazyJsonString; @@ -10318,7 +10393,7 @@ var require_package = __commonJS({ module2.exports = { name: "@aws-sdk/client-sfn", description: "AWS SDK for JavaScript Sfn Client for Node.js, Browser and React Native", - version: "3.363.0", + version: "3.378.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -10338,44 +10413,43 @@ var require_package = __commonJS({ dependencies: { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.363.0", - "@aws-sdk/credential-provider-node": "3.363.0", - "@aws-sdk/middleware-host-header": "3.363.0", - "@aws-sdk/middleware-logger": "3.363.0", - "@aws-sdk/middleware-recursion-detection": "3.363.0", - "@aws-sdk/middleware-signing": "3.363.0", - "@aws-sdk/middleware-user-agent": "3.363.0", - "@aws-sdk/types": "3.357.0", - "@aws-sdk/util-endpoints": "3.357.0", - "@aws-sdk/util-user-agent-browser": "3.363.0", - "@aws-sdk/util-user-agent-node": "3.363.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.1", - "@smithy/middleware-retry": "^1.0.2", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.0.1", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.0.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.2", - "@smithy/util-utf8": "^1.0.1", + "@aws-sdk/client-sts": "3.378.0", + "@aws-sdk/credential-provider-node": "3.378.0", + "@aws-sdk/middleware-host-header": "3.378.0", + "@aws-sdk/middleware-logger": "3.378.0", + "@aws-sdk/middleware-recursion-detection": "3.378.0", + "@aws-sdk/middleware-signing": "3.378.0", + "@aws-sdk/middleware-user-agent": "3.378.0", + "@aws-sdk/types": "3.378.0", + "@aws-sdk/util-endpoints": "3.378.0", + "@aws-sdk/util-user-agent-browser": "3.378.0", + "@aws-sdk/util-user-agent-node": "3.378.0", + "@smithy/config-resolver": "^2.0.1", + "@smithy/fetch-http-handler": "^2.0.1", + "@smithy/hash-node": "^2.0.1", + "@smithy/invalid-dependency": "^2.0.1", + "@smithy/middleware-content-length": "^2.0.1", + "@smithy/middleware-endpoint": "^2.0.1", + "@smithy/middleware-retry": "^2.0.1", + "@smithy/middleware-serde": "^2.0.1", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.1", + "@smithy/node-http-handler": "^2.0.1", + "@smithy/protocol-http": "^2.0.1", + "@smithy/smithy-client": "^2.0.1", + "@smithy/types": "^2.0.2", + "@smithy/url-parser": "^2.0.1", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.1", + "@smithy/util-defaults-mode-node": "^2.0.1", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", tslib: "^2.5.0" }, devDependencies: { - "@aws-sdk/service-client-documentation-generator": "3.310.0", - "@smithy/service-client-documentation-generator": "^1.0.1", + "@smithy/service-client-documentation-generator": "^2.0.0", "@tsconfig/node14": "1.0.3", "@types/node": "^14.14.31", concurrently: "7.0.0", @@ -10458,7 +10532,7 @@ var require_package2 = __commonJS({ module2.exports = { name: "@aws-sdk/client-sts", description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", - version: "3.363.0", + version: "3.378.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -10480,45 +10554,44 @@ var require_package2 = __commonJS({ dependencies: { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.363.0", - "@aws-sdk/middleware-host-header": "3.363.0", - "@aws-sdk/middleware-logger": "3.363.0", - "@aws-sdk/middleware-recursion-detection": "3.363.0", - "@aws-sdk/middleware-sdk-sts": "3.363.0", - "@aws-sdk/middleware-signing": "3.363.0", - "@aws-sdk/middleware-user-agent": "3.363.0", - "@aws-sdk/types": "3.357.0", - "@aws-sdk/util-endpoints": "3.357.0", - "@aws-sdk/util-user-agent-browser": "3.363.0", - "@aws-sdk/util-user-agent-node": "3.363.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.1", - "@smithy/middleware-retry": "^1.0.1", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.1", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.2", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", + "@aws-sdk/credential-provider-node": "3.378.0", + "@aws-sdk/middleware-host-header": "3.378.0", + "@aws-sdk/middleware-logger": "3.378.0", + "@aws-sdk/middleware-recursion-detection": "3.378.0", + "@aws-sdk/middleware-sdk-sts": "3.378.0", + "@aws-sdk/middleware-signing": "3.378.0", + "@aws-sdk/middleware-user-agent": "3.378.0", + "@aws-sdk/types": "3.378.0", + "@aws-sdk/util-endpoints": "3.378.0", + "@aws-sdk/util-user-agent-browser": "3.378.0", + "@aws-sdk/util-user-agent-node": "3.378.0", + "@smithy/config-resolver": "^2.0.1", + "@smithy/fetch-http-handler": "^2.0.1", + "@smithy/hash-node": "^2.0.1", + "@smithy/invalid-dependency": "^2.0.1", + "@smithy/middleware-content-length": "^2.0.1", + "@smithy/middleware-endpoint": "^2.0.1", + "@smithy/middleware-retry": "^2.0.1", + "@smithy/middleware-serde": "^2.0.1", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.1", + "@smithy/node-http-handler": "^2.0.1", + "@smithy/protocol-http": "^2.0.1", + "@smithy/smithy-client": "^2.0.1", + "@smithy/types": "^2.0.2", + "@smithy/url-parser": "^2.0.1", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.1", + "@smithy/util-defaults-mode-node": "^2.0.1", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", "fast-xml-parser": "4.2.5", tslib: "^2.5.0" }, devDependencies: { - "@aws-sdk/service-client-documentation-generator": "3.310.0", - "@smithy/service-client-documentation-generator": "^1.0.1", + "@smithy/service-client-documentation-generator": "^2.0.0", "@tsconfig/node14": "1.0.3", "@types/node": "^14.14.31", concurrently: "7.0.0", @@ -10571,10 +10644,10 @@ var require_STSServiceException = __commonJS({ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() { return smithy_client_1.ServiceException; } }); - var STSServiceException = class extends smithy_client_1.ServiceException { + var STSServiceException = class _STSServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); - Object.setPrototypeOf(this, STSServiceException.prototype); + Object.setPrototypeOf(this, _STSServiceException.prototype); } }; exports.STSServiceException = STSServiceException; @@ -10589,7 +10662,7 @@ var require_models_0 = __commonJS({ exports.GetSessionTokenResponseFilterSensitiveLog = exports.GetFederationTokenResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = exports.AssumeRoleResponseFilterSensitiveLog = exports.CredentialsFilterSensitiveLog = exports.InvalidAuthorizationMessageException = exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0; var smithy_client_1 = require_dist_cjs35(); var STSServiceException_1 = require_STSServiceException(); - var ExpiredTokenException = class extends STSServiceException_1.STSServiceException { + var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "ExpiredTokenException", @@ -10598,11 +10671,11 @@ var require_models_0 = __commonJS({ }); this.name = "ExpiredTokenException"; this.$fault = "client"; - Object.setPrototypeOf(this, ExpiredTokenException.prototype); + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); } }; exports.ExpiredTokenException = ExpiredTokenException; - var MalformedPolicyDocumentException = class extends STSServiceException_1.STSServiceException { + var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "MalformedPolicyDocumentException", @@ -10611,11 +10684,11 @@ var require_models_0 = __commonJS({ }); this.name = "MalformedPolicyDocumentException"; this.$fault = "client"; - Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); + Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); } }; exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException; - var PackedPolicyTooLargeException = class extends STSServiceException_1.STSServiceException { + var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "PackedPolicyTooLargeException", @@ -10624,11 +10697,11 @@ var require_models_0 = __commonJS({ }); this.name = "PackedPolicyTooLargeException"; this.$fault = "client"; - Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype); + Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); } }; exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException; - var RegionDisabledException = class extends STSServiceException_1.STSServiceException { + var RegionDisabledException = class _RegionDisabledException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "RegionDisabledException", @@ -10637,11 +10710,11 @@ var require_models_0 = __commonJS({ }); this.name = "RegionDisabledException"; this.$fault = "client"; - Object.setPrototypeOf(this, RegionDisabledException.prototype); + Object.setPrototypeOf(this, _RegionDisabledException.prototype); } }; exports.RegionDisabledException = RegionDisabledException; - var IDPRejectedClaimException = class extends STSServiceException_1.STSServiceException { + var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "IDPRejectedClaimException", @@ -10650,11 +10723,11 @@ var require_models_0 = __commonJS({ }); this.name = "IDPRejectedClaimException"; this.$fault = "client"; - Object.setPrototypeOf(this, IDPRejectedClaimException.prototype); + Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype); } }; exports.IDPRejectedClaimException = IDPRejectedClaimException; - var InvalidIdentityTokenException = class extends STSServiceException_1.STSServiceException { + var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "InvalidIdentityTokenException", @@ -10663,11 +10736,11 @@ var require_models_0 = __commonJS({ }); this.name = "InvalidIdentityTokenException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype); + Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype); } }; exports.InvalidIdentityTokenException = InvalidIdentityTokenException; - var IDPCommunicationErrorException = class extends STSServiceException_1.STSServiceException { + var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "IDPCommunicationErrorException", @@ -10676,11 +10749,11 @@ var require_models_0 = __commonJS({ }); this.name = "IDPCommunicationErrorException"; this.$fault = "client"; - Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); + Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype); } }; exports.IDPCommunicationErrorException = IDPCommunicationErrorException; - var InvalidAuthorizationMessageException = class extends STSServiceException_1.STSServiceException { + var InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ name: "InvalidAuthorizationMessageException", @@ -10689,7 +10762,7 @@ var require_models_0 = __commonJS({ }); this.name = "InvalidAuthorizationMessageException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype); + Object.setPrototypeOf(this, _InvalidAuthorizationMessageException.prototype); } }; exports.InvalidAuthorizationMessageException = InvalidAuthorizationMessageException; @@ -12887,7 +12960,6 @@ var require_Aws_query = __commonJS({ return (0, smithy_client_1.decorateServiceException)(exception, body); }; var se_AssumeRoleRequest = (input, context) => { - var _a, _b, _c; const entries = {}; if (input.RoleArn != null) { entries["RoleArn"] = input.RoleArn; @@ -12897,7 +12969,7 @@ var require_Aws_query = __commonJS({ } if (input.PolicyArns != null) { const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (((_a = input.PolicyArns) == null ? void 0 : _a.length) === 0) { + if (input.PolicyArns?.length === 0) { entries.PolicyArns = []; } Object.entries(memberEntries).forEach(([key, value]) => { @@ -12913,7 +12985,7 @@ var require_Aws_query = __commonJS({ } if (input.Tags != null) { const memberEntries = se_tagListType(input.Tags, context); - if (((_b = input.Tags) == null ? void 0 : _b.length) === 0) { + if (input.Tags?.length === 0) { entries.Tags = []; } Object.entries(memberEntries).forEach(([key, value]) => { @@ -12923,7 +12995,7 @@ var require_Aws_query = __commonJS({ } if (input.TransitiveTagKeys != null) { const memberEntries = se_tagKeyListType(input.TransitiveTagKeys, context); - if (((_c = input.TransitiveTagKeys) == null ? void 0 : _c.length) === 0) { + if (input.TransitiveTagKeys?.length === 0) { entries.TransitiveTagKeys = []; } Object.entries(memberEntries).forEach(([key, value]) => { @@ -12943,10 +13015,19 @@ var require_Aws_query = __commonJS({ if (input.SourceIdentity != null) { entries["SourceIdentity"] = input.SourceIdentity; } + if (input.ProvidedContexts != null) { + const memberEntries = se_ProvidedContextsListType(input.ProvidedContexts, context); + if (input.ProvidedContexts?.length === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } return entries; }; var se_AssumeRoleWithSAMLRequest = (input, context) => { - var _a; const entries = {}; if (input.RoleArn != null) { entries["RoleArn"] = input.RoleArn; @@ -12959,7 +13040,7 @@ var require_Aws_query = __commonJS({ } if (input.PolicyArns != null) { const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (((_a = input.PolicyArns) == null ? void 0 : _a.length) === 0) { + if (input.PolicyArns?.length === 0) { entries.PolicyArns = []; } Object.entries(memberEntries).forEach(([key, value]) => { @@ -12976,7 +13057,6 @@ var require_Aws_query = __commonJS({ return entries; }; var se_AssumeRoleWithWebIdentityRequest = (input, context) => { - var _a; const entries = {}; if (input.RoleArn != null) { entries["RoleArn"] = input.RoleArn; @@ -12992,7 +13072,7 @@ var require_Aws_query = __commonJS({ } if (input.PolicyArns != null) { const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (((_a = input.PolicyArns) == null ? void 0 : _a.length) === 0) { + if (input.PolicyArns?.length === 0) { entries.PolicyArns = []; } Object.entries(memberEntries).forEach(([key, value]) => { @@ -13027,7 +13107,6 @@ var require_Aws_query = __commonJS({ return entries; }; var se_GetFederationTokenRequest = (input, context) => { - var _a, _b; const entries = {}; if (input.Name != null) { entries["Name"] = input.Name; @@ -13037,7 +13116,7 @@ var require_Aws_query = __commonJS({ } if (input.PolicyArns != null) { const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (((_a = input.PolicyArns) == null ? void 0 : _a.length) === 0) { + if (input.PolicyArns?.length === 0) { entries.PolicyArns = []; } Object.entries(memberEntries).forEach(([key, value]) => { @@ -13050,7 +13129,7 @@ var require_Aws_query = __commonJS({ } if (input.Tags != null) { const memberEntries = se_tagListType(input.Tags, context); - if (((_b = input.Tags) == null ? void 0 : _b.length) === 0) { + if (input.Tags?.length === 0) { entries.Tags = []; } Object.entries(memberEntries).forEach(([key, value]) => { @@ -13095,6 +13174,31 @@ var require_Aws_query = __commonJS({ } return entries; }; + var se_ProvidedContext = (input, context) => { + const entries = {}; + if (input.ProviderArn != null) { + entries["ProviderArn"] = input.ProviderArn; + } + if (input.ContextAssertion != null) { + entries["ContextAssertion"] = input.ContextAssertion; + } + return entries; + }; + var se_ProvidedContextsListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }; var se_Tag = (input, context) => { const entries = {}; if (input.Key != null) { @@ -13406,8 +13510,7 @@ var require_Aws_query = __commonJS({ }; var buildFormUrlencodedString = (formEntries) => Object.entries(formEntries).map(([key, value]) => (0, smithy_client_1.extendedEncodeURIComponent)(key) + "=" + (0, smithy_client_1.extendedEncodeURIComponent)(value)).join("&"); var loadQueryErrorCode = (output, data) => { - var _a; - if (((_a = data.Error) == null ? void 0 : _a.Code) !== void 0) { + if (data.Error?.Code !== void 0) { return data.Error.Code; } if (output.statusCode == 404) { @@ -13432,7 +13535,7 @@ var require_AssumeRoleCommand = __commonJS({ } }); var models_0_1 = require_models_0(); var Aws_query_1 = require_Aws_query(); - var AssumeRoleCommand = class extends smithy_client_1.Command { + var AssumeRoleCommand = class _AssumeRoleCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -13448,7 +13551,7 @@ var require_AssumeRoleCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _AssumeRoleCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -13489,7 +13592,7 @@ var require_AssumeRoleWithWebIdentityCommand = __commonJS({ } }); var models_0_1 = require_models_0(); var Aws_query_1 = require_Aws_query(); - var AssumeRoleWithWebIdentityCommand = class extends smithy_client_1.Command { + var AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -13505,7 +13608,7 @@ var require_AssumeRoleWithWebIdentityCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithWebIdentityCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _AssumeRoleWithWebIdentityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -14700,7 +14803,7 @@ var require_package3 = __commonJS({ module2.exports = { name: "@aws-sdk/client-sso", description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", - version: "3.363.0", + version: "3.378.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -14720,41 +14823,40 @@ var require_package3 = __commonJS({ dependencies: { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.363.0", - "@aws-sdk/middleware-logger": "3.363.0", - "@aws-sdk/middleware-recursion-detection": "3.363.0", - "@aws-sdk/middleware-user-agent": "3.363.0", - "@aws-sdk/types": "3.357.0", - "@aws-sdk/util-endpoints": "3.357.0", - "@aws-sdk/util-user-agent-browser": "3.363.0", - "@aws-sdk/util-user-agent-node": "3.363.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.1", - "@smithy/middleware-retry": "^1.0.2", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.0.1", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.0.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.2", - "@smithy/util-utf8": "^1.0.1", + "@aws-sdk/middleware-host-header": "3.378.0", + "@aws-sdk/middleware-logger": "3.378.0", + "@aws-sdk/middleware-recursion-detection": "3.378.0", + "@aws-sdk/middleware-user-agent": "3.378.0", + "@aws-sdk/types": "3.378.0", + "@aws-sdk/util-endpoints": "3.378.0", + "@aws-sdk/util-user-agent-browser": "3.378.0", + "@aws-sdk/util-user-agent-node": "3.378.0", + "@smithy/config-resolver": "^2.0.1", + "@smithy/fetch-http-handler": "^2.0.1", + "@smithy/hash-node": "^2.0.1", + "@smithy/invalid-dependency": "^2.0.1", + "@smithy/middleware-content-length": "^2.0.1", + "@smithy/middleware-endpoint": "^2.0.1", + "@smithy/middleware-retry": "^2.0.1", + "@smithy/middleware-serde": "^2.0.1", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.1", + "@smithy/node-http-handler": "^2.0.1", + "@smithy/protocol-http": "^2.0.1", + "@smithy/smithy-client": "^2.0.1", + "@smithy/types": "^2.0.2", + "@smithy/url-parser": "^2.0.1", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.1", + "@smithy/util-defaults-mode-node": "^2.0.1", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", tslib: "^2.5.0" }, devDependencies: { - "@aws-sdk/service-client-documentation-generator": "3.310.0", - "@smithy/service-client-documentation-generator": "^1.0.1", + "@smithy/service-client-documentation-generator": "^2.0.0", "@tsconfig/node14": "1.0.3", "@types/node": "^14.14.31", concurrently: "7.0.0", @@ -15006,15 +15108,15 @@ var require_runtimeConfig_shared = __commonJS({ var endpointResolver_1 = require_endpointResolver(); var getRuntimeConfig = (config) => ({ apiVersion: "2019-06-10", - base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64, - base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64, - disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false, - endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver, - logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(), - serviceId: (config == null ? void 0 : config.serviceId) ?? "SSO", - urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl, - utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8, - utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8 + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 }); exports.getRuntimeConfig = getRuntimeConfig; } @@ -15156,19 +15258,19 @@ var require_runtimeConfig = __commonJS({ ...config, runtime: "node", defaultsMode, - bodyLengthChecker: (config == null ? void 0 : config.bodyLengthChecker) ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: (config == null ? void 0 : config.defaultUserAgentProvider) ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: (config == null ? void 0 : config.maxAttempts) ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: (config == null ? void 0 : config.region) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (config == null ? void 0 : config.requestHandler) ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (config == null ? void 0 : config.retryMode) ?? (0, node_config_provider_1.loadConfig)({ + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE }), - sha256: (config == null ? void 0 : config.sha256) ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (config == null ? void 0 : config.streamCollector) ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: (config == null ? void 0 : config.useDualstackEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (config == null ? void 0 : config.useFipsEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; }; exports.getRuntimeConfig = getRuntimeConfig; @@ -15231,10 +15333,10 @@ var require_SSOServiceException = __commonJS({ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() { return smithy_client_1.ServiceException; } }); - var SSOServiceException = class extends smithy_client_1.ServiceException { + var SSOServiceException = class _SSOServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); - Object.setPrototypeOf(this, SSOServiceException.prototype); + Object.setPrototypeOf(this, _SSOServiceException.prototype); } }; exports.SSOServiceException = SSOServiceException; @@ -15249,7 +15351,7 @@ var require_models_02 = __commonJS({ exports.LogoutRequestFilterSensitiveLog = exports.ListAccountsRequestFilterSensitiveLog = exports.ListAccountRolesRequestFilterSensitiveLog = exports.GetRoleCredentialsResponseFilterSensitiveLog = exports.RoleCredentialsFilterSensitiveLog = exports.GetRoleCredentialsRequestFilterSensitiveLog = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0; var smithy_client_1 = require_dist_cjs35(); var SSOServiceException_1 = require_SSOServiceException(); - var InvalidRequestException = class extends SSOServiceException_1.SSOServiceException { + var InvalidRequestException = class _InvalidRequestException extends SSOServiceException_1.SSOServiceException { constructor(opts) { super({ name: "InvalidRequestException", @@ -15258,11 +15360,11 @@ var require_models_02 = __commonJS({ }); this.name = "InvalidRequestException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidRequestException.prototype); + Object.setPrototypeOf(this, _InvalidRequestException.prototype); } }; exports.InvalidRequestException = InvalidRequestException; - var ResourceNotFoundException = class extends SSOServiceException_1.SSOServiceException { + var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException_1.SSOServiceException { constructor(opts) { super({ name: "ResourceNotFoundException", @@ -15271,11 +15373,11 @@ var require_models_02 = __commonJS({ }); this.name = "ResourceNotFoundException"; this.$fault = "client"; - Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); } }; exports.ResourceNotFoundException = ResourceNotFoundException; - var TooManyRequestsException = class extends SSOServiceException_1.SSOServiceException { + var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException_1.SSOServiceException { constructor(opts) { super({ name: "TooManyRequestsException", @@ -15284,11 +15386,11 @@ var require_models_02 = __commonJS({ }); this.name = "TooManyRequestsException"; this.$fault = "client"; - Object.setPrototypeOf(this, TooManyRequestsException.prototype); + Object.setPrototypeOf(this, _TooManyRequestsException.prototype); } }; exports.TooManyRequestsException = TooManyRequestsException; - var UnauthorizedException = class extends SSOServiceException_1.SSOServiceException { + var UnauthorizedException = class _UnauthorizedException extends SSOServiceException_1.SSOServiceException { constructor(opts) { super({ name: "UnauthorizedException", @@ -15297,7 +15399,7 @@ var require_models_02 = __commonJS({ }); this.name = "UnauthorizedException"; this.$fault = "client"; - Object.setPrototypeOf(this, UnauthorizedException.prototype); + Object.setPrototypeOf(this, _UnauthorizedException.prototype); } }; exports.UnauthorizedException = UnauthorizedException; @@ -15350,7 +15452,7 @@ var require_Aws_restJson1 = __commonJS({ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "x-amz-sso_bearer_token": input.accessToken }); - const resolvedPath = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/federation/credentials`; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/federation/credentials`; const query = (0, smithy_client_1.map)({ role_name: [, (0, smithy_client_1.expectNonNull)(input.roleName, `roleName`)], account_id: [, (0, smithy_client_1.expectNonNull)(input.accountId, `accountId`)] @@ -15373,7 +15475,7 @@ var require_Aws_restJson1 = __commonJS({ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "x-amz-sso_bearer_token": input.accessToken }); - const resolvedPath = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/assignment/roles`; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/assignment/roles`; const query = (0, smithy_client_1.map)({ next_token: [, input.nextToken], max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()], @@ -15397,7 +15499,7 @@ var require_Aws_restJson1 = __commonJS({ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "x-amz-sso_bearer_token": input.accessToken }); - const resolvedPath = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/assignment/accounts`; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/assignment/accounts`; const query = (0, smithy_client_1.map)({ next_token: [, input.nextToken], max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()] @@ -15420,7 +15522,7 @@ var require_Aws_restJson1 = __commonJS({ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "x-amz-sso_bearer_token": input.accessToken }); - const resolvedPath = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/logout`; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/logout`; let body; return new protocol_http_1.HttpRequest({ protocol, @@ -15718,7 +15820,7 @@ var require_GetRoleCredentialsCommand = __commonJS({ } }); var models_0_1 = require_models_02(); var Aws_restJson1_1 = require_Aws_restJson1(); - var GetRoleCredentialsCommand = class extends smithy_client_1.Command { + var GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -15733,7 +15835,7 @@ var require_GetRoleCredentialsCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetRoleCredentialsCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetRoleCredentialsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -15773,7 +15875,7 @@ var require_ListAccountRolesCommand = __commonJS({ } }); var models_0_1 = require_models_02(); var Aws_restJson1_1 = require_Aws_restJson1(); - var ListAccountRolesCommand = class extends smithy_client_1.Command { + var ListAccountRolesCommand = class _ListAccountRolesCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -15788,7 +15890,7 @@ var require_ListAccountRolesCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountRolesCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListAccountRolesCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -15828,7 +15930,7 @@ var require_ListAccountsCommand = __commonJS({ } }); var models_0_1 = require_models_02(); var Aws_restJson1_1 = require_Aws_restJson1(); - var ListAccountsCommand = class extends smithy_client_1.Command { + var ListAccountsCommand = class _ListAccountsCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -15843,7 +15945,7 @@ var require_ListAccountsCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountsCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListAccountsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -15883,7 +15985,7 @@ var require_LogoutCommand = __commonJS({ } }); var models_0_1 = require_models_02(); var Aws_restJson1_1 = require_Aws_restJson1(); - var LogoutCommand = class extends smithy_client_1.Command { + var LogoutCommand = class _LogoutCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -15898,7 +16000,7 @@ var require_LogoutCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, LogoutCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _LogoutCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -16114,7 +16216,7 @@ var require_package4 = __commonJS({ module2.exports = { name: "@aws-sdk/client-sso-oidc", description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native", - version: "3.363.0", + version: "3.378.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -16134,41 +16236,40 @@ var require_package4 = __commonJS({ dependencies: { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.363.0", - "@aws-sdk/middleware-logger": "3.363.0", - "@aws-sdk/middleware-recursion-detection": "3.363.0", - "@aws-sdk/middleware-user-agent": "3.363.0", - "@aws-sdk/types": "3.357.0", - "@aws-sdk/util-endpoints": "3.357.0", - "@aws-sdk/util-user-agent-browser": "3.363.0", - "@aws-sdk/util-user-agent-node": "3.363.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.1", - "@smithy/middleware-retry": "^1.0.2", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.0.1", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.0.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.2", - "@smithy/util-utf8": "^1.0.1", + "@aws-sdk/middleware-host-header": "3.378.0", + "@aws-sdk/middleware-logger": "3.378.0", + "@aws-sdk/middleware-recursion-detection": "3.378.0", + "@aws-sdk/middleware-user-agent": "3.378.0", + "@aws-sdk/types": "3.378.0", + "@aws-sdk/util-endpoints": "3.378.0", + "@aws-sdk/util-user-agent-browser": "3.378.0", + "@aws-sdk/util-user-agent-node": "3.378.0", + "@smithy/config-resolver": "^2.0.1", + "@smithy/fetch-http-handler": "^2.0.1", + "@smithy/hash-node": "^2.0.1", + "@smithy/invalid-dependency": "^2.0.1", + "@smithy/middleware-content-length": "^2.0.1", + "@smithy/middleware-endpoint": "^2.0.1", + "@smithy/middleware-retry": "^2.0.1", + "@smithy/middleware-serde": "^2.0.1", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.1", + "@smithy/node-http-handler": "^2.0.1", + "@smithy/protocol-http": "^2.0.1", + "@smithy/smithy-client": "^2.0.1", + "@smithy/types": "^2.0.2", + "@smithy/url-parser": "^2.0.1", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.1", + "@smithy/util-defaults-mode-node": "^2.0.1", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", tslib: "^2.5.0" }, devDependencies: { - "@aws-sdk/service-client-documentation-generator": "3.310.0", - "@smithy/service-client-documentation-generator": "^1.0.1", + "@smithy/service-client-documentation-generator": "^2.0.0", "@tsconfig/node14": "1.0.3", "@types/node": "^14.14.31", concurrently: "7.0.0", @@ -16272,15 +16373,15 @@ var require_runtimeConfig_shared2 = __commonJS({ var endpointResolver_1 = require_endpointResolver2(); var getRuntimeConfig = (config) => ({ apiVersion: "2019-06-10", - base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64, - base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64, - disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false, - endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver, - logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(), - serviceId: (config == null ? void 0 : config.serviceId) ?? "SSO OIDC", - urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl, - utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8, - utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8 + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO OIDC", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 }); exports.getRuntimeConfig = getRuntimeConfig; } @@ -16316,19 +16417,19 @@ var require_runtimeConfig2 = __commonJS({ ...config, runtime: "node", defaultsMode, - bodyLengthChecker: (config == null ? void 0 : config.bodyLengthChecker) ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: (config == null ? void 0 : config.defaultUserAgentProvider) ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: (config == null ? void 0 : config.maxAttempts) ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: (config == null ? void 0 : config.region) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (config == null ? void 0 : config.requestHandler) ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (config == null ? void 0 : config.retryMode) ?? (0, node_config_provider_1.loadConfig)({ + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE }), - sha256: (config == null ? void 0 : config.sha256) ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (config == null ? void 0 : config.streamCollector) ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: (config == null ? void 0 : config.useDualstackEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (config == null ? void 0 : config.useFipsEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; }; exports.getRuntimeConfig = getRuntimeConfig; @@ -16391,10 +16492,10 @@ var require_SSOOIDCServiceException = __commonJS({ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() { return smithy_client_1.ServiceException; } }); - var SSOOIDCServiceException = class extends smithy_client_1.ServiceException { + var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); - Object.setPrototypeOf(this, SSOOIDCServiceException.prototype); + Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); } }; exports.SSOOIDCServiceException = SSOOIDCServiceException; @@ -16408,7 +16509,7 @@ var require_models_03 = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.InvalidClientMetadataException = exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidGrantException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0; var SSOOIDCServiceException_1 = require_SSOOIDCServiceException(); - var AccessDeniedException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "AccessDeniedException", @@ -16417,13 +16518,13 @@ var require_models_03 = __commonJS({ }); this.name = "AccessDeniedException"; this.$fault = "client"; - Object.setPrototypeOf(this, AccessDeniedException.prototype); + Object.setPrototypeOf(this, _AccessDeniedException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.AccessDeniedException = AccessDeniedException; - var AuthorizationPendingException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "AuthorizationPendingException", @@ -16432,13 +16533,13 @@ var require_models_03 = __commonJS({ }); this.name = "AuthorizationPendingException"; this.$fault = "client"; - Object.setPrototypeOf(this, AuthorizationPendingException.prototype); + Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.AuthorizationPendingException = AuthorizationPendingException; - var ExpiredTokenException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "ExpiredTokenException", @@ -16447,13 +16548,13 @@ var require_models_03 = __commonJS({ }); this.name = "ExpiredTokenException"; this.$fault = "client"; - Object.setPrototypeOf(this, ExpiredTokenException.prototype); + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.ExpiredTokenException = ExpiredTokenException; - var InternalServerException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InternalServerException = class _InternalServerException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "InternalServerException", @@ -16462,13 +16563,13 @@ var require_models_03 = __commonJS({ }); this.name = "InternalServerException"; this.$fault = "server"; - Object.setPrototypeOf(this, InternalServerException.prototype); + Object.setPrototypeOf(this, _InternalServerException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.InternalServerException = InternalServerException; - var InvalidClientException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidClientException", @@ -16477,13 +16578,13 @@ var require_models_03 = __commonJS({ }); this.name = "InvalidClientException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidClientException.prototype); + Object.setPrototypeOf(this, _InvalidClientException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.InvalidClientException = InvalidClientException; - var InvalidGrantException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidGrantException", @@ -16492,13 +16593,13 @@ var require_models_03 = __commonJS({ }); this.name = "InvalidGrantException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidGrantException.prototype); + Object.setPrototypeOf(this, _InvalidGrantException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.InvalidGrantException = InvalidGrantException; - var InvalidRequestException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidRequestException", @@ -16507,13 +16608,13 @@ var require_models_03 = __commonJS({ }); this.name = "InvalidRequestException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidRequestException.prototype); + Object.setPrototypeOf(this, _InvalidRequestException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.InvalidRequestException = InvalidRequestException; - var InvalidScopeException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidScopeException", @@ -16522,13 +16623,13 @@ var require_models_03 = __commonJS({ }); this.name = "InvalidScopeException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidScopeException.prototype); + Object.setPrototypeOf(this, _InvalidScopeException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.InvalidScopeException = InvalidScopeException; - var SlowDownException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var SlowDownException = class _SlowDownException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "SlowDownException", @@ -16537,13 +16638,13 @@ var require_models_03 = __commonJS({ }); this.name = "SlowDownException"; this.$fault = "client"; - Object.setPrototypeOf(this, SlowDownException.prototype); + Object.setPrototypeOf(this, _SlowDownException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.SlowDownException = SlowDownException; - var UnauthorizedClientException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "UnauthorizedClientException", @@ -16552,13 +16653,13 @@ var require_models_03 = __commonJS({ }); this.name = "UnauthorizedClientException"; this.$fault = "client"; - Object.setPrototypeOf(this, UnauthorizedClientException.prototype); + Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.UnauthorizedClientException = UnauthorizedClientException; - var UnsupportedGrantTypeException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "UnsupportedGrantTypeException", @@ -16567,13 +16668,13 @@ var require_models_03 = __commonJS({ }); this.name = "UnsupportedGrantTypeException"; this.$fault = "client"; - Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype); + Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); this.error = opts.error; this.error_description = opts.error_description; } }; exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException; - var InvalidClientMetadataException = class extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException_1.SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidClientMetadataException", @@ -16582,7 +16683,7 @@ var require_models_03 = __commonJS({ }); this.name = "InvalidClientMetadataException"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidClientMetadataException.prototype); + Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype); this.error = opts.error; this.error_description = opts.error_description; } @@ -16606,7 +16707,7 @@ var require_Aws_restJson12 = __commonJS({ const headers = { "content-type": "application/json" }; - const resolvedPath = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/token`; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/token`; let body; body = JSON.stringify((0, smithy_client_1.take)(input, { clientId: [], @@ -16634,7 +16735,7 @@ var require_Aws_restJson12 = __commonJS({ const headers = { "content-type": "application/json" }; - const resolvedPath = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/client/register`; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/client/register`; let body; body = JSON.stringify((0, smithy_client_1.take)(input, { clientName: [], @@ -16657,7 +16758,7 @@ var require_Aws_restJson12 = __commonJS({ const headers = { "content-type": "application/json" }; - const resolvedPath = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; let body; body = JSON.stringify((0, smithy_client_1.take)(input, { clientId: [], @@ -17074,7 +17175,7 @@ var require_CreateTokenCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_restJson1_1 = require_Aws_restJson12(); - var CreateTokenCommand = class extends smithy_client_1.Command { + var CreateTokenCommand = class _CreateTokenCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17089,7 +17190,7 @@ var require_CreateTokenCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateTokenCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _CreateTokenCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17128,7 +17229,7 @@ var require_RegisterClientCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_restJson1_1 = require_Aws_restJson12(); - var RegisterClientCommand = class extends smithy_client_1.Command { + var RegisterClientCommand = class _RegisterClientCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17143,7 +17244,7 @@ var require_RegisterClientCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, RegisterClientCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _RegisterClientCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17182,7 +17283,7 @@ var require_StartDeviceAuthorizationCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_restJson1_1 = require_Aws_restJson12(); - var StartDeviceAuthorizationCommand = class extends smithy_client_1.Command { + var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17197,7 +17298,7 @@ var require_StartDeviceAuthorizationCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, StartDeviceAuthorizationCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _StartDeviceAuthorizationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17994,15 +18095,15 @@ var require_runtimeConfig_shared3 = __commonJS({ var endpointResolver_1 = require_endpointResolver3(); var getRuntimeConfig = (config) => ({ apiVersion: "2011-06-15", - base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64, - base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64, - disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false, - endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver, - logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(), - serviceId: (config == null ? void 0 : config.serviceId) ?? "STS", - urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl, - utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8, - utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8 + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 }); exports.getRuntimeConfig = getRuntimeConfig; } @@ -18040,20 +18141,20 @@ var require_runtimeConfig3 = __commonJS({ ...config, runtime: "node", defaultsMode, - bodyLengthChecker: (config == null ? void 0 : config.bodyLengthChecker) ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: (config == null ? void 0 : config.credentialDefaultProvider) ?? (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), - defaultUserAgentProvider: (config == null ? void 0 : config.defaultUserAgentProvider) ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: (config == null ? void 0 : config.maxAttempts) ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: (config == null ? void 0 : config.region) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (config == null ? void 0 : config.requestHandler) ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (config == null ? void 0 : config.retryMode) ?? (0, node_config_provider_1.loadConfig)({ + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE }), - sha256: (config == null ? void 0 : config.sha256) ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (config == null ? void 0 : config.streamCollector) ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: (config == null ? void 0 : config.useDualstackEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (config == null ? void 0 : config.useFipsEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; }; exports.getRuntimeConfig = getRuntimeConfig; @@ -18081,7 +18182,7 @@ var require_STSClient = __commonJS({ } }); var EndpointParameters_1 = require_EndpointParameters2(); var runtimeConfig_1 = require_runtimeConfig3(); - var STSClient = class extends smithy_client_1.Client { + var STSClient = class _STSClient extends smithy_client_1.Client { constructor(configuration) { const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); @@ -18089,7 +18190,7 @@ var require_STSClient = __commonJS({ const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, middleware_sdk_sts_1.resolveStsAuthConfig)(_config_5, { stsClientCtor: STSClient }); + const _config_6 = (0, middleware_sdk_sts_1.resolveStsAuthConfig)(_config_5, { stsClientCtor: _STSClient }); const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); super(_config_7); this.config = _config_7; @@ -18122,7 +18223,7 @@ var require_AssumeRoleWithSAMLCommand = __commonJS({ } }); var models_0_1 = require_models_0(); var Aws_query_1 = require_Aws_query(); - var AssumeRoleWithSAMLCommand = class extends smithy_client_1.Command { + var AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -18138,7 +18239,7 @@ var require_AssumeRoleWithSAMLCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithSAMLCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _AssumeRoleWithSAMLCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -18178,7 +18279,7 @@ var require_DecodeAuthorizationMessageCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_query_1 = require_Aws_query(); - var DecodeAuthorizationMessageCommand = class extends smithy_client_1.Command { + var DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -18194,7 +18295,7 @@ var require_DecodeAuthorizationMessageCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DecodeAuthorizationMessageCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DecodeAuthorizationMessageCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -18235,7 +18336,7 @@ var require_GetAccessKeyInfoCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_query_1 = require_Aws_query(); - var GetAccessKeyInfoCommand = class extends smithy_client_1.Command { + var GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -18251,7 +18352,7 @@ var require_GetAccessKeyInfoCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetAccessKeyInfoCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetAccessKeyInfoCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -18292,7 +18393,7 @@ var require_GetCallerIdentityCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_query_1 = require_Aws_query(); - var GetCallerIdentityCommand = class extends smithy_client_1.Command { + var GetCallerIdentityCommand = class _GetCallerIdentityCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -18308,7 +18409,7 @@ var require_GetCallerIdentityCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetCallerIdentityCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetCallerIdentityCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -18350,7 +18451,7 @@ var require_GetFederationTokenCommand = __commonJS({ } }); var models_0_1 = require_models_0(); var Aws_query_1 = require_Aws_query(); - var GetFederationTokenCommand = class extends smithy_client_1.Command { + var GetFederationTokenCommand = class _GetFederationTokenCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -18366,7 +18467,7 @@ var require_GetFederationTokenCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetFederationTokenCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetFederationTokenCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -18408,7 +18509,7 @@ var require_GetSessionTokenCommand = __commonJS({ } }); var models_0_1 = require_models_0(); var Aws_query_1 = require_Aws_query(); - var GetSessionTokenCommand = class extends smithy_client_1.Command { + var GetSessionTokenCommand = class _GetSessionTokenCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, @@ -18424,7 +18525,7 @@ var require_GetSessionTokenCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetSessionTokenCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetSessionTokenCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -18627,15 +18728,15 @@ var require_runtimeConfig_shared4 = __commonJS({ var endpointResolver_1 = require_endpointResolver4(); var getRuntimeConfig = (config) => ({ apiVersion: "2016-11-23", - base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64, - base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64, - disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false, - endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver, - logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(), - serviceId: (config == null ? void 0 : config.serviceId) ?? "SFN", - urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl, - utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8, - utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8 + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SFN", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 }); exports.getRuntimeConfig = getRuntimeConfig; } @@ -18673,20 +18774,20 @@ var require_runtimeConfig4 = __commonJS({ ...config, runtime: "node", defaultsMode, - bodyLengthChecker: (config == null ? void 0 : config.bodyLengthChecker) ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: (config == null ? void 0 : config.credentialDefaultProvider) ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), - defaultUserAgentProvider: (config == null ? void 0 : config.defaultUserAgentProvider) ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: (config == null ? void 0 : config.maxAttempts) ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: (config == null ? void 0 : config.region) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (config == null ? void 0 : config.requestHandler) ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (config == null ? void 0 : config.retryMode) ?? (0, node_config_provider_1.loadConfig)({ + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE }), - sha256: (config == null ? void 0 : config.sha256) ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (config == null ? void 0 : config.streamCollector) ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: (config == null ? void 0 : config.useDualstackEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (config == null ? void 0 : config.useFipsEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; }; exports.getRuntimeConfig = getRuntimeConfig; @@ -18752,10 +18853,10 @@ var require_SFNServiceException = __commonJS({ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() { return smithy_client_1.ServiceException; } }); - var SFNServiceException = class extends smithy_client_1.ServiceException { + var SFNServiceException = class _SFNServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); - Object.setPrototypeOf(this, SFNServiceException.prototype); + Object.setPrototypeOf(this, _SFNServiceException.prototype); } }; exports.SFNServiceException = SFNServiceException; @@ -18771,7 +18872,7 @@ var require_models_04 = __commonJS({ exports.UpdateStateMachineAliasInputFilterSensitiveLog = exports.UpdateStateMachineInputFilterSensitiveLog = exports.StopExecutionInputFilterSensitiveLog = exports.StartSyncExecutionOutputFilterSensitiveLog = exports.StartSyncExecutionInputFilterSensitiveLog = exports.StartExecutionInputFilterSensitiveLog = exports.SendTaskSuccessInputFilterSensitiveLog = exports.SendTaskFailureInputFilterSensitiveLog = exports.PublishStateMachineVersionInputFilterSensitiveLog = exports.GetExecutionHistoryOutputFilterSensitiveLog = exports.HistoryEventFilterSensitiveLog = exports.TaskTimedOutEventDetailsFilterSensitiveLog = exports.TaskSucceededEventDetailsFilterSensitiveLog = exports.TaskSubmittedEventDetailsFilterSensitiveLog = exports.TaskSubmitFailedEventDetailsFilterSensitiveLog = exports.TaskStartFailedEventDetailsFilterSensitiveLog = exports.TaskScheduledEventDetailsFilterSensitiveLog = exports.TaskFailedEventDetailsFilterSensitiveLog = exports.StateExitedEventDetailsFilterSensitiveLog = exports.StateEnteredEventDetailsFilterSensitiveLog = exports.MapRunFailedEventDetailsFilterSensitiveLog = exports.LambdaFunctionTimedOutEventDetailsFilterSensitiveLog = exports.LambdaFunctionSucceededEventDetailsFilterSensitiveLog = exports.LambdaFunctionStartFailedEventDetailsFilterSensitiveLog = exports.LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog = exports.LambdaFunctionScheduledEventDetailsFilterSensitiveLog = exports.LambdaFunctionFailedEventDetailsFilterSensitiveLog = exports.ExecutionTimedOutEventDetailsFilterSensitiveLog = exports.ExecutionSucceededEventDetailsFilterSensitiveLog = void 0; var smithy_client_1 = require_dist_cjs35(); var SFNServiceException_1 = require_SFNServiceException(); - var ActivityDoesNotExist = class extends SFNServiceException_1.SFNServiceException { + var ActivityDoesNotExist = class _ActivityDoesNotExist extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ActivityDoesNotExist", @@ -18780,11 +18881,11 @@ var require_models_04 = __commonJS({ }); this.name = "ActivityDoesNotExist"; this.$fault = "client"; - Object.setPrototypeOf(this, ActivityDoesNotExist.prototype); + Object.setPrototypeOf(this, _ActivityDoesNotExist.prototype); } }; exports.ActivityDoesNotExist = ActivityDoesNotExist; - var ActivityLimitExceeded = class extends SFNServiceException_1.SFNServiceException { + var ActivityLimitExceeded = class _ActivityLimitExceeded extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ActivityLimitExceeded", @@ -18793,11 +18894,11 @@ var require_models_04 = __commonJS({ }); this.name = "ActivityLimitExceeded"; this.$fault = "client"; - Object.setPrototypeOf(this, ActivityLimitExceeded.prototype); + Object.setPrototypeOf(this, _ActivityLimitExceeded.prototype); } }; exports.ActivityLimitExceeded = ActivityLimitExceeded; - var ActivityWorkerLimitExceeded = class extends SFNServiceException_1.SFNServiceException { + var ActivityWorkerLimitExceeded = class _ActivityWorkerLimitExceeded extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ActivityWorkerLimitExceeded", @@ -18806,11 +18907,11 @@ var require_models_04 = __commonJS({ }); this.name = "ActivityWorkerLimitExceeded"; this.$fault = "client"; - Object.setPrototypeOf(this, ActivityWorkerLimitExceeded.prototype); + Object.setPrototypeOf(this, _ActivityWorkerLimitExceeded.prototype); } }; exports.ActivityWorkerLimitExceeded = ActivityWorkerLimitExceeded; - var InvalidName = class extends SFNServiceException_1.SFNServiceException { + var InvalidName = class _InvalidName extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidName", @@ -18819,11 +18920,11 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidName"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidName.prototype); + Object.setPrototypeOf(this, _InvalidName.prototype); } }; exports.InvalidName = InvalidName; - var TooManyTags = class extends SFNServiceException_1.SFNServiceException { + var TooManyTags = class _TooManyTags extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "TooManyTags", @@ -18832,12 +18933,12 @@ var require_models_04 = __commonJS({ }); this.name = "TooManyTags"; this.$fault = "client"; - Object.setPrototypeOf(this, TooManyTags.prototype); + Object.setPrototypeOf(this, _TooManyTags.prototype); this.resourceName = opts.resourceName; } }; exports.TooManyTags = TooManyTags; - var ConflictException = class extends SFNServiceException_1.SFNServiceException { + var ConflictException = class _ConflictException extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ConflictException", @@ -18846,7 +18947,7 @@ var require_models_04 = __commonJS({ }); this.name = "ConflictException"; this.$fault = "client"; - Object.setPrototypeOf(this, ConflictException.prototype); + Object.setPrototypeOf(this, _ConflictException.prototype); } }; exports.ConflictException = ConflictException; @@ -18860,7 +18961,7 @@ var require_models_04 = __commonJS({ EXPRESS: "EXPRESS", STANDARD: "STANDARD" }; - var InvalidArn = class extends SFNServiceException_1.SFNServiceException { + var InvalidArn = class _InvalidArn extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidArn", @@ -18869,11 +18970,11 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidArn"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidArn.prototype); + Object.setPrototypeOf(this, _InvalidArn.prototype); } }; exports.InvalidArn = InvalidArn; - var InvalidDefinition = class extends SFNServiceException_1.SFNServiceException { + var InvalidDefinition = class _InvalidDefinition extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidDefinition", @@ -18882,11 +18983,11 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidDefinition"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidDefinition.prototype); + Object.setPrototypeOf(this, _InvalidDefinition.prototype); } }; exports.InvalidDefinition = InvalidDefinition; - var InvalidLoggingConfiguration = class extends SFNServiceException_1.SFNServiceException { + var InvalidLoggingConfiguration = class _InvalidLoggingConfiguration extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidLoggingConfiguration", @@ -18895,11 +18996,11 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidLoggingConfiguration"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidLoggingConfiguration.prototype); + Object.setPrototypeOf(this, _InvalidLoggingConfiguration.prototype); } }; exports.InvalidLoggingConfiguration = InvalidLoggingConfiguration; - var InvalidTracingConfiguration = class extends SFNServiceException_1.SFNServiceException { + var InvalidTracingConfiguration = class _InvalidTracingConfiguration extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidTracingConfiguration", @@ -18908,11 +19009,11 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidTracingConfiguration"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidTracingConfiguration.prototype); + Object.setPrototypeOf(this, _InvalidTracingConfiguration.prototype); } }; exports.InvalidTracingConfiguration = InvalidTracingConfiguration; - var StateMachineAlreadyExists = class extends SFNServiceException_1.SFNServiceException { + var StateMachineAlreadyExists = class _StateMachineAlreadyExists extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "StateMachineAlreadyExists", @@ -18921,11 +19022,11 @@ var require_models_04 = __commonJS({ }); this.name = "StateMachineAlreadyExists"; this.$fault = "client"; - Object.setPrototypeOf(this, StateMachineAlreadyExists.prototype); + Object.setPrototypeOf(this, _StateMachineAlreadyExists.prototype); } }; exports.StateMachineAlreadyExists = StateMachineAlreadyExists; - var StateMachineDeleting = class extends SFNServiceException_1.SFNServiceException { + var StateMachineDeleting = class _StateMachineDeleting extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "StateMachineDeleting", @@ -18934,11 +19035,11 @@ var require_models_04 = __commonJS({ }); this.name = "StateMachineDeleting"; this.$fault = "client"; - Object.setPrototypeOf(this, StateMachineDeleting.prototype); + Object.setPrototypeOf(this, _StateMachineDeleting.prototype); } }; exports.StateMachineDeleting = StateMachineDeleting; - var StateMachineLimitExceeded = class extends SFNServiceException_1.SFNServiceException { + var StateMachineLimitExceeded = class _StateMachineLimitExceeded extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "StateMachineLimitExceeded", @@ -18947,11 +19048,11 @@ var require_models_04 = __commonJS({ }); this.name = "StateMachineLimitExceeded"; this.$fault = "client"; - Object.setPrototypeOf(this, StateMachineLimitExceeded.prototype); + Object.setPrototypeOf(this, _StateMachineLimitExceeded.prototype); } }; exports.StateMachineLimitExceeded = StateMachineLimitExceeded; - var StateMachineTypeNotSupported = class extends SFNServiceException_1.SFNServiceException { + var StateMachineTypeNotSupported = class _StateMachineTypeNotSupported extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "StateMachineTypeNotSupported", @@ -18960,7 +19061,7 @@ var require_models_04 = __commonJS({ }); this.name = "StateMachineTypeNotSupported"; this.$fault = "client"; - Object.setPrototypeOf(this, StateMachineTypeNotSupported.prototype); + Object.setPrototypeOf(this, _StateMachineTypeNotSupported.prototype); } }; exports.StateMachineTypeNotSupported = StateMachineTypeNotSupported; @@ -18970,7 +19071,7 @@ var require_models_04 = __commonJS({ INVALID_ROUTING_CONFIGURATION: "INVALID_ROUTING_CONFIGURATION", MISSING_REQUIRED_PARAMETER: "MISSING_REQUIRED_PARAMETER" }; - var ValidationException = class extends SFNServiceException_1.SFNServiceException { + var ValidationException = class _ValidationException extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ValidationException", @@ -18979,12 +19080,12 @@ var require_models_04 = __commonJS({ }); this.name = "ValidationException"; this.$fault = "client"; - Object.setPrototypeOf(this, ValidationException.prototype); + Object.setPrototypeOf(this, _ValidationException.prototype); this.reason = opts.reason; } }; exports.ValidationException = ValidationException; - var ResourceNotFound = class extends SFNServiceException_1.SFNServiceException { + var ResourceNotFound = class _ResourceNotFound extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ResourceNotFound", @@ -18993,12 +19094,12 @@ var require_models_04 = __commonJS({ }); this.name = "ResourceNotFound"; this.$fault = "client"; - Object.setPrototypeOf(this, ResourceNotFound.prototype); + Object.setPrototypeOf(this, _ResourceNotFound.prototype); this.resourceName = opts.resourceName; } }; exports.ResourceNotFound = ResourceNotFound; - var ServiceQuotaExceededException = class extends SFNServiceException_1.SFNServiceException { + var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ServiceQuotaExceededException", @@ -19007,7 +19108,7 @@ var require_models_04 = __commonJS({ }); this.name = "ServiceQuotaExceededException"; this.$fault = "client"; - Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype); } }; exports.ServiceQuotaExceededException = ServiceQuotaExceededException; @@ -19018,7 +19119,7 @@ var require_models_04 = __commonJS({ SUCCEEDED: "SUCCEEDED", TIMED_OUT: "TIMED_OUT" }; - var ExecutionDoesNotExist = class extends SFNServiceException_1.SFNServiceException { + var ExecutionDoesNotExist = class _ExecutionDoesNotExist extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ExecutionDoesNotExist", @@ -19027,7 +19128,7 @@ var require_models_04 = __commonJS({ }); this.name = "ExecutionDoesNotExist"; this.$fault = "client"; - Object.setPrototypeOf(this, ExecutionDoesNotExist.prototype); + Object.setPrototypeOf(this, _ExecutionDoesNotExist.prototype); } }; exports.ExecutionDoesNotExist = ExecutionDoesNotExist; @@ -19041,7 +19142,7 @@ var require_models_04 = __commonJS({ ACTIVE: "ACTIVE", DELETING: "DELETING" }; - var StateMachineDoesNotExist = class extends SFNServiceException_1.SFNServiceException { + var StateMachineDoesNotExist = class _StateMachineDoesNotExist extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "StateMachineDoesNotExist", @@ -19050,7 +19151,7 @@ var require_models_04 = __commonJS({ }); this.name = "StateMachineDoesNotExist"; this.$fault = "client"; - Object.setPrototypeOf(this, StateMachineDoesNotExist.prototype); + Object.setPrototypeOf(this, _StateMachineDoesNotExist.prototype); } }; exports.StateMachineDoesNotExist = StateMachineDoesNotExist; @@ -19115,7 +19216,7 @@ var require_models_04 = __commonJS({ WaitStateEntered: "WaitStateEntered", WaitStateExited: "WaitStateExited" }; - var InvalidToken = class extends SFNServiceException_1.SFNServiceException { + var InvalidToken = class _InvalidToken extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidToken", @@ -19124,11 +19225,11 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidToken"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidToken.prototype); + Object.setPrototypeOf(this, _InvalidToken.prototype); } }; exports.InvalidToken = InvalidToken; - var TaskDoesNotExist = class extends SFNServiceException_1.SFNServiceException { + var TaskDoesNotExist = class _TaskDoesNotExist extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "TaskDoesNotExist", @@ -19137,11 +19238,11 @@ var require_models_04 = __commonJS({ }); this.name = "TaskDoesNotExist"; this.$fault = "client"; - Object.setPrototypeOf(this, TaskDoesNotExist.prototype); + Object.setPrototypeOf(this, _TaskDoesNotExist.prototype); } }; exports.TaskDoesNotExist = TaskDoesNotExist; - var TaskTimedOut = class extends SFNServiceException_1.SFNServiceException { + var TaskTimedOut = class _TaskTimedOut extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "TaskTimedOut", @@ -19150,11 +19251,11 @@ var require_models_04 = __commonJS({ }); this.name = "TaskTimedOut"; this.$fault = "client"; - Object.setPrototypeOf(this, TaskTimedOut.prototype); + Object.setPrototypeOf(this, _TaskTimedOut.prototype); } }; exports.TaskTimedOut = TaskTimedOut; - var InvalidOutput = class extends SFNServiceException_1.SFNServiceException { + var InvalidOutput = class _InvalidOutput extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidOutput", @@ -19163,11 +19264,11 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidOutput"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidOutput.prototype); + Object.setPrototypeOf(this, _InvalidOutput.prototype); } }; exports.InvalidOutput = InvalidOutput; - var ExecutionAlreadyExists = class extends SFNServiceException_1.SFNServiceException { + var ExecutionAlreadyExists = class _ExecutionAlreadyExists extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ExecutionAlreadyExists", @@ -19176,11 +19277,11 @@ var require_models_04 = __commonJS({ }); this.name = "ExecutionAlreadyExists"; this.$fault = "client"; - Object.setPrototypeOf(this, ExecutionAlreadyExists.prototype); + Object.setPrototypeOf(this, _ExecutionAlreadyExists.prototype); } }; exports.ExecutionAlreadyExists = ExecutionAlreadyExists; - var ExecutionLimitExceeded = class extends SFNServiceException_1.SFNServiceException { + var ExecutionLimitExceeded = class _ExecutionLimitExceeded extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "ExecutionLimitExceeded", @@ -19189,11 +19290,11 @@ var require_models_04 = __commonJS({ }); this.name = "ExecutionLimitExceeded"; this.$fault = "client"; - Object.setPrototypeOf(this, ExecutionLimitExceeded.prototype); + Object.setPrototypeOf(this, _ExecutionLimitExceeded.prototype); } }; exports.ExecutionLimitExceeded = ExecutionLimitExceeded; - var InvalidExecutionInput = class extends SFNServiceException_1.SFNServiceException { + var InvalidExecutionInput = class _InvalidExecutionInput extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "InvalidExecutionInput", @@ -19202,7 +19303,7 @@ var require_models_04 = __commonJS({ }); this.name = "InvalidExecutionInput"; this.$fault = "client"; - Object.setPrototypeOf(this, InvalidExecutionInput.prototype); + Object.setPrototypeOf(this, _InvalidExecutionInput.prototype); } }; exports.InvalidExecutionInput = InvalidExecutionInput; @@ -19211,7 +19312,7 @@ var require_models_04 = __commonJS({ SUCCEEDED: "SUCCEEDED", TIMED_OUT: "TIMED_OUT" }; - var MissingRequiredParameter = class extends SFNServiceException_1.SFNServiceException { + var MissingRequiredParameter = class _MissingRequiredParameter extends SFNServiceException_1.SFNServiceException { constructor(opts) { super({ name: "MissingRequiredParameter", @@ -19220,7 +19321,7 @@ var require_models_04 = __commonJS({ }); this.name = "MissingRequiredParameter"; this.$fault = "client"; - Object.setPrototypeOf(this, MissingRequiredParameter.prototype); + Object.setPrototypeOf(this, _MissingRequiredParameter.prototype); } }; exports.MissingRequiredParameter = MissingRequiredParameter; @@ -21869,7 +21970,7 @@ var require_CreateActivityCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var CreateActivityCommand = class extends smithy_client_1.Command { + var CreateActivityCommand = class _CreateActivityCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -21884,7 +21985,7 @@ var require_CreateActivityCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateActivityCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _CreateActivityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -21924,7 +22025,7 @@ var require_CreateStateMachineAliasCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var CreateStateMachineAliasCommand = class extends smithy_client_1.Command { + var CreateStateMachineAliasCommand = class _CreateStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -21939,7 +22040,7 @@ var require_CreateStateMachineAliasCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateStateMachineAliasCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _CreateStateMachineAliasCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -21979,7 +22080,7 @@ var require_CreateStateMachineCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var CreateStateMachineCommand = class extends smithy_client_1.Command { + var CreateStateMachineCommand = class _CreateStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -21994,7 +22095,7 @@ var require_CreateStateMachineCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateStateMachineCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _CreateStateMachineCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22033,7 +22134,7 @@ var require_DeleteActivityCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteActivityCommand = class extends smithy_client_1.Command { + var DeleteActivityCommand = class _DeleteActivityCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22048,7 +22149,7 @@ var require_DeleteActivityCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteActivityCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteActivityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22087,7 +22188,7 @@ var require_DeleteStateMachineAliasCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteStateMachineAliasCommand = class extends smithy_client_1.Command { + var DeleteStateMachineAliasCommand = class _DeleteStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22102,7 +22203,7 @@ var require_DeleteStateMachineAliasCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteStateMachineAliasCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteStateMachineAliasCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22141,7 +22242,7 @@ var require_DeleteStateMachineCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteStateMachineCommand = class extends smithy_client_1.Command { + var DeleteStateMachineCommand = class _DeleteStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22156,7 +22257,7 @@ var require_DeleteStateMachineCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteStateMachineCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteStateMachineCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22195,7 +22296,7 @@ var require_DeleteStateMachineVersionCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteStateMachineVersionCommand = class extends smithy_client_1.Command { + var DeleteStateMachineVersionCommand = class _DeleteStateMachineVersionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22210,7 +22311,7 @@ var require_DeleteStateMachineVersionCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteStateMachineVersionCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteStateMachineVersionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22249,7 +22350,7 @@ var require_DescribeActivityCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeActivityCommand = class extends smithy_client_1.Command { + var DescribeActivityCommand = class _DescribeActivityCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22264,7 +22365,7 @@ var require_DescribeActivityCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeActivityCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeActivityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22304,7 +22405,7 @@ var require_DescribeExecutionCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeExecutionCommand = class extends smithy_client_1.Command { + var DescribeExecutionCommand = class _DescribeExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22319,7 +22420,7 @@ var require_DescribeExecutionCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeExecutionCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeExecutionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22358,7 +22459,7 @@ var require_DescribeMapRunCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeMapRunCommand = class extends smithy_client_1.Command { + var DescribeMapRunCommand = class _DescribeMapRunCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22373,7 +22474,7 @@ var require_DescribeMapRunCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeMapRunCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeMapRunCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22413,7 +22514,7 @@ var require_DescribeStateMachineAliasCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeStateMachineAliasCommand = class extends smithy_client_1.Command { + var DescribeStateMachineAliasCommand = class _DescribeStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22428,7 +22529,7 @@ var require_DescribeStateMachineAliasCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeStateMachineAliasCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeStateMachineAliasCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22468,7 +22569,7 @@ var require_DescribeStateMachineCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeStateMachineCommand = class extends smithy_client_1.Command { + var DescribeStateMachineCommand = class _DescribeStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22483,7 +22584,7 @@ var require_DescribeStateMachineCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeStateMachineCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeStateMachineCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22523,7 +22624,7 @@ var require_DescribeStateMachineForExecutionCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeStateMachineForExecutionCommand = class extends smithy_client_1.Command { + var DescribeStateMachineForExecutionCommand = class _DescribeStateMachineForExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22538,7 +22639,7 @@ var require_DescribeStateMachineForExecutionCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeStateMachineForExecutionCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeStateMachineForExecutionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22578,7 +22679,7 @@ var require_GetActivityTaskCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var GetActivityTaskCommand = class extends smithy_client_1.Command { + var GetActivityTaskCommand = class _GetActivityTaskCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22593,7 +22694,7 @@ var require_GetActivityTaskCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetActivityTaskCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetActivityTaskCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22633,7 +22734,7 @@ var require_GetExecutionHistoryCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var GetExecutionHistoryCommand = class extends smithy_client_1.Command { + var GetExecutionHistoryCommand = class _GetExecutionHistoryCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22648,7 +22749,7 @@ var require_GetExecutionHistoryCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetExecutionHistoryCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetExecutionHistoryCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22687,7 +22788,7 @@ var require_ListActivitiesCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var ListActivitiesCommand = class extends smithy_client_1.Command { + var ListActivitiesCommand = class _ListActivitiesCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22702,7 +22803,7 @@ var require_ListActivitiesCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListActivitiesCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListActivitiesCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22741,7 +22842,7 @@ var require_ListExecutionsCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var ListExecutionsCommand = class extends smithy_client_1.Command { + var ListExecutionsCommand = class _ListExecutionsCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22756,7 +22857,7 @@ var require_ListExecutionsCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListExecutionsCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListExecutionsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22795,7 +22896,7 @@ var require_ListMapRunsCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var ListMapRunsCommand = class extends smithy_client_1.Command { + var ListMapRunsCommand = class _ListMapRunsCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22810,7 +22911,7 @@ var require_ListMapRunsCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListMapRunsCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListMapRunsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22849,7 +22950,7 @@ var require_ListStateMachineAliasesCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var ListStateMachineAliasesCommand = class extends smithy_client_1.Command { + var ListStateMachineAliasesCommand = class _ListStateMachineAliasesCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22864,7 +22965,7 @@ var require_ListStateMachineAliasesCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListStateMachineAliasesCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListStateMachineAliasesCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22903,7 +23004,7 @@ var require_ListStateMachinesCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var ListStateMachinesCommand = class extends smithy_client_1.Command { + var ListStateMachinesCommand = class _ListStateMachinesCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22918,7 +23019,7 @@ var require_ListStateMachinesCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListStateMachinesCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListStateMachinesCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -22957,7 +23058,7 @@ var require_ListStateMachineVersionsCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var ListStateMachineVersionsCommand = class extends smithy_client_1.Command { + var ListStateMachineVersionsCommand = class _ListStateMachineVersionsCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -22972,7 +23073,7 @@ var require_ListStateMachineVersionsCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListStateMachineVersionsCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListStateMachineVersionsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23011,7 +23112,7 @@ var require_ListTagsForResourceCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var ListTagsForResourceCommand = class extends smithy_client_1.Command { + var ListTagsForResourceCommand = class _ListTagsForResourceCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23026,7 +23127,7 @@ var require_ListTagsForResourceCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListTagsForResourceCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23066,7 +23167,7 @@ var require_PublishStateMachineVersionCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var PublishStateMachineVersionCommand = class extends smithy_client_1.Command { + var PublishStateMachineVersionCommand = class _PublishStateMachineVersionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23081,7 +23182,7 @@ var require_PublishStateMachineVersionCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PublishStateMachineVersionCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _PublishStateMachineVersionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23121,7 +23222,7 @@ var require_SendTaskFailureCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var SendTaskFailureCommand = class extends smithy_client_1.Command { + var SendTaskFailureCommand = class _SendTaskFailureCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23136,7 +23237,7 @@ var require_SendTaskFailureCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SendTaskFailureCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _SendTaskFailureCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23175,7 +23276,7 @@ var require_SendTaskHeartbeatCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var SendTaskHeartbeatCommand = class extends smithy_client_1.Command { + var SendTaskHeartbeatCommand = class _SendTaskHeartbeatCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23190,7 +23291,7 @@ var require_SendTaskHeartbeatCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SendTaskHeartbeatCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _SendTaskHeartbeatCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23230,7 +23331,7 @@ var require_SendTaskSuccessCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var SendTaskSuccessCommand = class extends smithy_client_1.Command { + var SendTaskSuccessCommand = class _SendTaskSuccessCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23245,7 +23346,7 @@ var require_SendTaskSuccessCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SendTaskSuccessCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _SendTaskSuccessCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23285,7 +23386,7 @@ var require_StartExecutionCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var StartExecutionCommand = class extends smithy_client_1.Command { + var StartExecutionCommand = class _StartExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23300,7 +23401,7 @@ var require_StartExecutionCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, StartExecutionCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _StartExecutionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23340,7 +23441,7 @@ var require_StartSyncExecutionCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var StartSyncExecutionCommand = class extends smithy_client_1.Command { + var StartSyncExecutionCommand = class _StartSyncExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23355,7 +23456,7 @@ var require_StartSyncExecutionCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, StartSyncExecutionCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _StartSyncExecutionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23395,7 +23496,7 @@ var require_StopExecutionCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var StopExecutionCommand = class extends smithy_client_1.Command { + var StopExecutionCommand = class _StopExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23410,7 +23511,7 @@ var require_StopExecutionCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, StopExecutionCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _StopExecutionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23449,7 +23550,7 @@ var require_TagResourceCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var TagResourceCommand = class extends smithy_client_1.Command { + var TagResourceCommand = class _TagResourceCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23464,7 +23565,7 @@ var require_TagResourceCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, TagResourceCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _TagResourceCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23503,7 +23604,7 @@ var require_UntagResourceCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var UntagResourceCommand = class extends smithy_client_1.Command { + var UntagResourceCommand = class _UntagResourceCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23518,7 +23619,7 @@ var require_UntagResourceCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UntagResourceCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UntagResourceCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23557,7 +23658,7 @@ var require_UpdateMapRunCommand = __commonJS({ return smithy_client_1.Command; } }); var Aws_json1_0_1 = require_Aws_json1_0(); - var UpdateMapRunCommand = class extends smithy_client_1.Command { + var UpdateMapRunCommand = class _UpdateMapRunCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23572,7 +23673,7 @@ var require_UpdateMapRunCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateMapRunCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UpdateMapRunCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23612,7 +23713,7 @@ var require_UpdateStateMachineAliasCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var UpdateStateMachineAliasCommand = class extends smithy_client_1.Command { + var UpdateStateMachineAliasCommand = class _UpdateStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23627,7 +23728,7 @@ var require_UpdateStateMachineAliasCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateStateMachineAliasCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UpdateStateMachineAliasCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -23667,7 +23768,7 @@ var require_UpdateStateMachineCommand = __commonJS({ } }); var models_0_1 = require_models_04(); var Aws_json1_0_1 = require_Aws_json1_0(); - var UpdateStateMachineCommand = class extends smithy_client_1.Command { + var UpdateStateMachineCommand = class _UpdateStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -23682,7 +23783,7 @@ var require_UpdateStateMachineCommand = __commonJS({ } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateStateMachineCommand.getEndpointParameterInstructions())); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UpdateStateMachineCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SFNClient"; @@ -25905,9 +26006,9 @@ var require_safer = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js +// ../../../node_modules/iconv-lite/lib/bom-handling.js var require_bom_handling = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js"(exports) { + "../../../node_modules/iconv-lite/lib/bom-handling.js"(exports) { "use strict"; var BOMChar = "\uFEFF"; exports.PrependBOM = PrependBOMWrapper; @@ -25949,9 +26050,9 @@ var require_bom_handling = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/internal.js +// ../../../node_modules/iconv-lite/encodings/internal.js var require_internal = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/internal.js"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/internal.js"(exports, module2) { "use strict"; var Buffer2 = require_safer().Buffer; module2.exports = { @@ -26101,9 +26202,9 @@ var require_internal = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/utf32.js +// ../../../node_modules/iconv-lite/encodings/utf32.js var require_utf32 = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/utf32.js"(exports) { + "../../../node_modules/iconv-lite/encodings/utf32.js"(exports) { "use strict"; var Buffer2 = require_safer().Buffer; exports._utf32 = Utf32Codec; @@ -26326,9 +26427,9 @@ var require_utf32 = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/utf16.js +// ../../../node_modules/iconv-lite/encodings/utf16.js var require_utf16 = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/utf16.js"(exports) { + "../../../node_modules/iconv-lite/encodings/utf16.js"(exports) { "use strict"; var Buffer2 = require_safer().Buffer; exports.utf16be = Utf16BECodec; @@ -26466,9 +26567,9 @@ var require_utf16 = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/utf7.js +// ../../../node_modules/iconv-lite/encodings/utf7.js var require_utf7 = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/utf7.js"(exports) { + "../../../node_modules/iconv-lite/encodings/utf7.js"(exports) { "use strict"; var Buffer2 = require_safer().Buffer; exports.utf7 = Utf7Codec; @@ -26667,9 +26768,9 @@ var require_utf7 = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +// ../../../node_modules/iconv-lite/encodings/sbcs-codec.js var require_sbcs_codec = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-codec.js"(exports) { + "../../../node_modules/iconv-lite/encodings/sbcs-codec.js"(exports) { "use strict"; var Buffer2 = require_safer().Buffer; exports._sbcs = SBCSCodec; @@ -26723,9 +26824,9 @@ var require_sbcs_codec = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js +// ../../../node_modules/iconv-lite/encodings/sbcs-data.js var require_sbcs_data = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/sbcs-data.js"(exports, module2) { "use strict"; module2.exports = { // Not supported by iconv, not sure why. @@ -26876,9 +26977,9 @@ var require_sbcs_data = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +// ../../../node_modules/iconv-lite/encodings/sbcs-data-generated.js var require_sbcs_data_generated = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/sbcs-data-generated.js"(exports, module2) { "use strict"; module2.exports = { "437": "cp437", @@ -27331,9 +27432,9 @@ var require_sbcs_data_generated = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +// ../../../node_modules/iconv-lite/encodings/dbcs-codec.js var require_dbcs_codec = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-codec.js"(exports) { + "../../../node_modules/iconv-lite/encodings/dbcs-codec.js"(exports) { "use strict"; var Buffer2 = require_safer().Buffer; exports._dbcs = DBCSCodec; @@ -27752,9 +27853,9 @@ var require_dbcs_codec = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +// ../../../node_modules/iconv-lite/encodings/tables/shiftjis.json var require_shiftjis = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/shiftjis.json"(exports, module2) { module2.exports = [ ["0", "\0", 128], ["a1", "\uFF61", 62], @@ -27883,9 +27984,9 @@ var require_shiftjis = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +// ../../../node_modules/iconv-lite/encodings/tables/eucjp.json var require_eucjp = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/eucjp.json"(exports, module2) { module2.exports = [ ["0", "\0", 127], ["8ea1", "\uFF61", 62], @@ -28071,9 +28172,9 @@ var require_eucjp = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json +// ../../../node_modules/iconv-lite/encodings/tables/cp936.json var require_cp936 = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/cp936.json"(exports, module2) { module2.exports = [ ["0", "\0", 127, "\u20AC"], ["8140", "\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A", 5, "\u4E72\u4E74", 9, "\u4E7F", 6, "\u4E87\u4E8A"], @@ -28341,9 +28442,9 @@ var require_cp936 = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +// ../../../node_modules/iconv-lite/encodings/tables/gbk-added.json var require_gbk_added = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/gbk-added.json"(exports, module2) { module2.exports = [ ["a140", "\uE4C6", 62], ["a180", "\uE505", 32], @@ -28403,16 +28504,16 @@ var require_gbk_added = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +// ../../../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json var require_gb18030_ranges = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json"(exports, module2) { module2.exports = { uChars: [128, 165, 169, 178, 184, 216, 226, 235, 238, 244, 248, 251, 253, 258, 276, 284, 300, 325, 329, 334, 364, 463, 465, 467, 469, 471, 473, 475, 477, 506, 594, 610, 712, 716, 730, 930, 938, 962, 970, 1026, 1104, 1106, 8209, 8215, 8218, 8222, 8231, 8241, 8244, 8246, 8252, 8365, 8452, 8454, 8458, 8471, 8482, 8556, 8570, 8596, 8602, 8713, 8720, 8722, 8726, 8731, 8737, 8740, 8742, 8748, 8751, 8760, 8766, 8777, 8781, 8787, 8802, 8808, 8816, 8854, 8858, 8870, 8896, 8979, 9322, 9372, 9548, 9588, 9616, 9622, 9634, 9652, 9662, 9672, 9676, 9680, 9702, 9735, 9738, 9793, 9795, 11906, 11909, 11913, 11917, 11928, 11944, 11947, 11951, 11956, 11960, 11964, 11979, 12284, 12292, 12312, 12319, 12330, 12351, 12436, 12447, 12535, 12543, 12586, 12842, 12850, 12964, 13200, 13215, 13218, 13253, 13263, 13267, 13270, 13384, 13428, 13727, 13839, 13851, 14617, 14703, 14801, 14816, 14964, 15183, 15471, 15585, 16471, 16736, 17208, 17325, 17330, 17374, 17623, 17997, 18018, 18212, 18218, 18301, 18318, 18760, 18811, 18814, 18820, 18823, 18844, 18848, 18872, 19576, 19620, 19738, 19887, 40870, 59244, 59336, 59367, 59413, 59417, 59423, 59431, 59437, 59443, 59452, 59460, 59478, 59493, 63789, 63866, 63894, 63976, 63986, 64016, 64018, 64021, 64025, 64034, 64037, 64042, 65074, 65093, 65107, 65112, 65127, 65132, 65375, 65510, 65536], gbChars: [0, 36, 38, 45, 50, 81, 89, 95, 96, 100, 103, 104, 105, 109, 126, 133, 148, 172, 175, 179, 208, 306, 307, 308, 309, 310, 311, 312, 313, 341, 428, 443, 544, 545, 558, 741, 742, 749, 750, 805, 819, 820, 7922, 7924, 7925, 7927, 7934, 7943, 7944, 7945, 7950, 8062, 8148, 8149, 8152, 8164, 8174, 8236, 8240, 8262, 8264, 8374, 8380, 8381, 8384, 8388, 8390, 8392, 8393, 8394, 8396, 8401, 8406, 8416, 8419, 8424, 8437, 8439, 8445, 8482, 8485, 8496, 8521, 8603, 8936, 8946, 9046, 9050, 9063, 9066, 9076, 9092, 9100, 9108, 9111, 9113, 9131, 9162, 9164, 9218, 9219, 11329, 11331, 11334, 11336, 11346, 11361, 11363, 11366, 11370, 11372, 11375, 11389, 11682, 11686, 11687, 11692, 11694, 11714, 11716, 11723, 11725, 11730, 11736, 11982, 11989, 12102, 12336, 12348, 12350, 12384, 12393, 12395, 12397, 12510, 12553, 12851, 12962, 12973, 13738, 13823, 13919, 13933, 14080, 14298, 14585, 14698, 15583, 15847, 16318, 16434, 16438, 16481, 16729, 17102, 17122, 17315, 17320, 17402, 17418, 17859, 17909, 17911, 17915, 17916, 17936, 17939, 17961, 18664, 18703, 18814, 18962, 19043, 33469, 33470, 33471, 33484, 33485, 33490, 33497, 33501, 33505, 33513, 33520, 33536, 33550, 37845, 37921, 37948, 38029, 38038, 38064, 38065, 38066, 38069, 38075, 38076, 38078, 39108, 39109, 39113, 39114, 39115, 39116, 39265, 39394, 189e3] }; } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json +// ../../../node_modules/iconv-lite/encodings/tables/cp949.json var require_cp949 = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/cp949.json"(exports, module2) { module2.exports = [ ["0", "\0", 127], ["8141", "\uAC02\uAC03\uAC05\uAC06\uAC0B", 4, "\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25", 6, "\uAC2E\uAC32\uAC33\uAC34"], @@ -28689,9 +28790,9 @@ var require_cp949 = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json +// ../../../node_modules/iconv-lite/encodings/tables/cp950.json var require_cp950 = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/cp950.json"(exports, module2) { module2.exports = [ ["0", "\0", 127], ["a140", "\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"], @@ -28872,9 +28973,9 @@ var require_cp950 = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +// ../../../node_modules/iconv-lite/encodings/tables/big5-added.json var require_big5_added = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/tables/big5-added.json"(exports, module2) { module2.exports = [ ["8740", "\u43F0\u4C32\u4603\u45A6\u4578\u{27267}\u4D77\u45B3\u{27CB1}\u4CE2\u{27CC5}\u3B95\u4736\u4744\u4C47\u4C40\u{242BF}\u{23617}\u{27352}\u{26E8B}\u{270D2}\u4C57\u{2A351}\u474F\u45DA\u4C85\u{27C6C}\u4D07\u4AA4\u46A1\u{26B23}\u7225\u{25A54}\u{21A63}\u{23E06}\u{23F61}\u664D\u56FB"], ["8767", "\u7D95\u591D\u{28BB9}\u3DF4\u9734\u{27BEF}\u5BDB\u{21D5E}\u5AA4\u3625\u{29EB0}\u5AD1\u5BB7\u5CFC\u676E\u8593\u{29945}\u7461\u749D\u3875\u{21D53}\u{2369E}\u{26021}\u3EEC"], @@ -29000,9 +29101,9 @@ var require_big5_added = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js +// ../../../node_modules/iconv-lite/encodings/dbcs-data.js var require_dbcs_data = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/dbcs-data.js"(exports, module2) { "use strict"; module2.exports = { // == Japanese/ShiftJIS ==================================================== @@ -29247,9 +29348,9 @@ var require_dbcs_data = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/encodings/index.js +// ../../../node_modules/iconv-lite/encodings/index.js var require_encodings = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/encodings/index.js"(exports, module2) { + "../../../node_modules/iconv-lite/encodings/index.js"(exports, module2) { "use strict"; var modules = [ require_internal(), @@ -29274,9 +29375,9 @@ var require_encodings = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/lib/streams.js +// ../../../node_modules/iconv-lite/lib/streams.js var require_streams = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/lib/streams.js"(exports, module2) { + "../../../node_modules/iconv-lite/lib/streams.js"(exports, module2) { "use strict"; var Buffer2 = require_safer().Buffer; module2.exports = function(stream_module) { @@ -29373,9 +29474,9 @@ var require_streams = __commonJS({ } }); -// ../../../node_modules/encoding/node_modules/iconv-lite/lib/index.js +// ../../../node_modules/iconv-lite/lib/index.js var require_lib3 = __commonJS({ - "../../../node_modules/encoding/node_modules/iconv-lite/lib/index.js"(exports, module2) { + "../../../node_modules/iconv-lite/lib/index.js"(exports, module2) { "use strict"; var Buffer2 = require_safer().Buffer; var bomHandling = require_bom_handling(); @@ -29390,7 +29491,7 @@ var require_lib3 = __commonJS({ var trail = encoder.end(); return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res; }; - iconv.decode = function decode2(buf, encoding, options) { + iconv.decode = function decode(buf, encoding, options) { if (typeof buf === "string") { if (!iconv.skipDecodeWarning) { console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"); @@ -29558,7 +29659,7 @@ var require_lib4 = __commonJS({ var Readable = Stream.Readable; var BUFFER = Symbol("buffer"); var TYPE = Symbol("type"); - var Blob = class { + var Blob = class _Blob { constructor() { this[TYPE] = ""; const blobParts = arguments[0]; @@ -29577,7 +29678,7 @@ var require_lib4 = __commonJS({ buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); } else if (element instanceof ArrayBuffer) { buffer = Buffer.from(element); - } else if (element instanceof Blob) { + } else if (element instanceof _Blob) { buffer = element[BUFFER]; } else { buffer = Buffer.from(typeof element === "string" ? element : String(element)); @@ -29639,7 +29740,7 @@ var require_lib4 = __commonJS({ const span = Math.max(relativeEnd - relativeStart, 0); const buffer = this[BUFFER]; const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); + const blob = new _Blob([], { type: arguments[2] }); blob[BUFFER] = slicedBuffer; return blob; } @@ -30016,7 +30117,7 @@ var require_lib4 = __commonJS({ return void 0; } var MAP = Symbol("map"); - var Headers = class { + var Headers = class _Headers { /** * Headers class * @@ -30026,7 +30127,7 @@ var require_lib4 = __commonJS({ constructor() { let init = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0; this[MAP] = /* @__PURE__ */ Object.create(null); - if (init instanceof Headers) { + if (init instanceof _Headers) { const rawHeaders = init.raw(); const headerNames = Object.keys(rawHeaders); for (const headerName of headerNames) { @@ -30295,7 +30396,7 @@ var require_lib4 = __commonJS({ } var INTERNALS$1 = Symbol("Response internals"); var STATUS_CODES = http.STATUS_CODES; - var Response2 = class { + var Response2 = class _Response { constructor() { let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; @@ -30343,7 +30444,7 @@ var require_lib4 = __commonJS({ * @return Response */ clone() { - return new Response2(clone(this), { + return new _Response(clone(this), { url: this.url, status: this.status, statusText: this.statusText, @@ -30387,7 +30488,7 @@ var require_lib4 = __commonJS({ const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal); return !!(proto && proto.constructor.name === "AbortSignal"); } - var Request = class { + var Request = class _Request { constructor(input) { let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; let parsedURL; @@ -30457,7 +30558,7 @@ var require_lib4 = __commonJS({ * @return Request */ clone() { - return new Request(this); + return new _Request(this); } }; Body.mixIn(Request.prototype); @@ -30758,7 +30859,7 @@ var require_lib4 = __commonJS({ const headers = response.headers; if (headers["transfer-encoding"] === "chunked" && !headers["content-length"]) { response.once("close", function(hadError) { - const hasDataListener = socket.listenerCount("data") > 0; + const hasDataListener = socket && socket.listenerCount("data") > 0; if (hasDataListener && !hadError) { const err = new Error("Premature close"); err.code = "ERR_STREAM_PREMATURE_CLOSE"; @@ -30790,6 +30891,523 @@ var require_lib4 = __commonJS({ } }); +// ../sdk-v2-to-v3-adapter/lib/client-names.ts +var CLIENT_NAMES; +var init_client_names = __esm({ + "../sdk-v2-to-v3-adapter/lib/client-names.ts"() { + "use strict"; + CLIENT_NAMES = [ + "ACM", + "ACMPCA", + "APIGateway", + "ARCZonalShift", + "AccessAnalyzer", + "Account", + "AlexaForBusiness", + "Amp", + "Amplify", + "AmplifyBackend", + "AmplifyUIBuilder", + "ApiGatewayManagementApi", + "ApiGatewayV2", + "AppConfig", + "AppConfigData", + "AppIntegrations", + "AppMesh", + "AppRunner", + "AppStream", + "AppSync", + "Appflow", + "ApplicationAutoScaling", + "ApplicationCostProfiler", + "ApplicationInsights", + "Athena", + "AuditManager", + "AugmentedAIRuntime", + "AutoScaling", + "AutoScalingPlans", + "Backup", + "BackupGateway", + "BackupStorage", + "Batch", + "Billingconductor", + "Braket", + "Budgets", + "CUR", + "Chime", + "ChimeSDKIdentity", + "ChimeSDKMediaPipelines", + "ChimeSDKMeetings", + "ChimeSDKMessaging", + "ChimeSDKVoice", + "Cloud9", + "CloudControl", + "CloudDirectory", + "CloudFormation", + "CloudFront", + "CloudHSM", + "CloudHSMV2", + "CloudSearch", + "CloudSearchDomain", + "CloudTrail", + "CloudWatch", + "CloudWatchEvents", + "CloudWatchLogs", + "CodeArtifact", + "CodeBuild", + "CodeCatalyst", + "CodeCommit", + "CodeDeploy", + "CodeGuruProfiler", + "CodeGuruReviewer", + "CodePipeline", + "CodeStar", + "CodeStarNotifications", + "CodeStarconnections", + "CognitoIdentity", + "CognitoIdentityServiceProvider", + "CognitoSync", + "Comprehend", + "ComprehendMedical", + "ComputeOptimizer", + "ConfigService", + "Connect", + "ConnectCampaigns", + "ConnectCases", + "ConnectContactLens", + "ConnectParticipant", + "ControlTower", + "CostExplorer", + "CustomerProfiles", + "DAX", + "DLM", + "DMS", + "DataBrew", + "DataExchange", + "DataPipeline", + "DataSync", + "Detective", + "DevOpsGuru", + "DeviceFarm", + "DirectConnect", + "DirectoryService", + "Discovery", + "DocDB", + "DocDBElastic", + "Drs", + "DynamoDB", + "DynamoDBStreams", + "EBS", + "EC2", + "EC2InstanceConnect", + "ECR", + "ECRPUBLIC", + "ECS", + "EFS", + "EKS", + "ELB", + "ELBv2", + "EMR", + "EMRServerless", + "EMRcontainers", + "ES", + "ElastiCache", + "ElasticBeanstalk", + "ElasticInference", + "ElasticTranscoder", + "EventBridge", + "Evidently", + "FMS", + "FSx", + "Finspace", + "Finspacedata", + "Firehose", + "Fis", + "ForecastQueryService", + "ForecastService", + "FraudDetector", + "GameLift", + "GameSparks", + "Glacier", + "GlobalAccelerator", + "Glue", + "Grafana", + "Greengrass", + "GreengrassV2", + "GroundStation", + "GuardDuty", + "Health", + "HealthLake", + "Honeycode", + "IAM", + "IVS", + "IdentityStore", + "Imagebuilder", + "Inspector", + "Inspector2", + "IoT1ClickDevicesService", + "IoT1ClickProjects", + "IoTAnalytics", + "IoTEvents", + "IoTEventsData", + "IoTFleetHub", + "IoTFleetWise", + "IoTJobsDataPlane", + "IoTRoboRunner", + "IoTSecureTunneling", + "IoTSiteWise", + "IoTThingsGraph", + "IoTTwinMaker", + "IoTWireless", + "Iot", + "IotData", + "IotDeviceAdvisor", + "Ivschat", + "KMS", + "Kafka", + "KafkaConnect", + "Kendra", + "Keyspaces", + "Kinesis", + "KinesisAnalytics", + "KinesisAnalyticsV2", + "KinesisVideo", + "KinesisVideoArchivedMedia", + "KinesisVideoMedia", + "KinesisVideoSignalingChannels", + "KinesisVideoWebRTCStorage", + "LakeFormation", + "Lambda", + "LexModelBuildingService", + "LexModelsV2", + "LexRuntime", + "LexRuntimeV2", + "LicenseManager", + "LicenseManagerLinuxSubscriptions", + "LicenseManagerUserSubscriptions", + "Lightsail", + "Location", + "LookoutEquipment", + "LookoutMetrics", + "LookoutVision", + "M2", + "MQ", + "MTurk", + "MWAA", + "MachineLearning", + "Macie", + "Macie2", + "ManagedBlockchain", + "MarketplaceCatalog", + "MarketplaceCommerceAnalytics", + "MarketplaceEntitlementService", + "MarketplaceMetering", + "MediaConnect", + "MediaConvert", + "MediaLive", + "MediaPackage", + "MediaPackageVod", + "MediaStore", + "MediaStoreData", + "MediaTailor", + "MemoryDB", + "Mgn", + "MigrationHub", + "MigrationHubConfig", + "MigrationHubOrchestrator", + "MigrationHubRefactorSpaces", + "MigrationHubStrategy", + "Mobile", + "Neptune", + "NetworkFirewall", + "NetworkManager", + "Nimble", + "OAM", + "Omics", + "OpenSearch", + "OpenSearchServerless", + "OpsWorks", + "OpsWorksCM", + "Organizations", + "Outposts", + "PI", + "Panorama", + "Personalize", + "PersonalizeEvents", + "PersonalizeRuntime", + "Pinpoint", + "PinpointEmail", + "PinpointSMSVoice", + "PinpointSMSVoiceV2", + "Pipes", + "Polly", + "Pricing", + "PrivateNetworks", + "Proton", + "QLDB", + "QLDBSession", + "QuickSight", + "RAM", + "RDS", + "RDSDataService", + "RUM", + "Rbin", + "Redshift", + "RedshiftData", + "RedshiftServerless", + "Rekognition", + "Resiliencehub", + "ResourceExplorer2", + "ResourceGroups", + "ResourceGroupsTaggingAPI", + "RoboMaker", + "RolesAnywhere", + "Route53", + "Route53Domains", + "Route53RecoveryCluster", + "Route53RecoveryControlConfig", + "Route53RecoveryReadiness", + "Route53Resolver", + "S3", + "S3Control", + "S3Outposts", + "SES", + "SESV2", + "SMS", + "SNS", + "SQS", + "SSM", + "SSMContacts", + "SSMIncidents", + "SSO", + "SSOAdmin", + "SSOOIDC", + "STS", + "SWF", + "SageMaker", + "SageMakerFeatureStoreRuntime", + "SageMakerGeospatial", + "SageMakerMetrics", + "SageMakerRuntime", + "SagemakerEdge", + "SavingsPlans", + "Scheduler", + "Schemas", + "SecretsManager", + "SecurityHub", + "SecurityLake", + "ServerlessApplicationRepository", + "ServiceCatalog", + "ServiceCatalogAppRegistry", + "ServiceDiscovery", + "ServiceQuotas", + "Shield", + "Signer", + "SimSpaceWeaver", + "SnowDeviceManagement", + "Snowball", + "SsmSap", + "StepFunctions", + "StorageGateway", + "Support", + "SupportApp", + "Synthetics", + "Textract", + "TimestreamQuery", + "TimestreamWrite", + "TranscribeService", + "Transfer", + "Translate", + "VoiceID", + "WAF", + "WAFRegional", + "WAFV2", + "WellArchitected", + "Wisdom", + "WorkDocs", + "WorkLink", + "WorkMail", + "WorkMailMessageFlow", + "WorkSpaces", + "WorkSpacesWeb", + "XRay" + ]; + } +}); + +// ../sdk-v2-to-v3-adapter/lib/client-package-names-map.ts +var CLIENT_PACKAGE_NAMES_MAP; +var init_client_package_names_map = __esm({ + "../sdk-v2-to-v3-adapter/lib/client-package-names-map.ts"() { + "use strict"; + init_client_names(); + CLIENT_PACKAGE_NAMES_MAP = { + ...CLIENT_NAMES.reduce( + (acc, name) => ({ + ...acc, + [name]: `client-${name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}`.replace("-chime-sdk", "-chime-sdk-").replace("client-amplify-", "client-amplify").replace("client-cloud-", "client-cloud").replace("client-code-", "client-code").replace("client-connect-", "client-connect").replace("client-data-", "client-data").replace("client-io-t", "client-iot-").replace("client-iot-fleet-", "client-iotfleet").replace("client-lookout-", "client-lookout").replace("client-media-", "client-media").replace("client-migration-hub-", "client-migrationhub").replace("client-pinpoint-sms", "client-pinpoint-sms-").replace("client-route53", "client-route53-").replace("client-sage-maker", "client-sagemaker").replace("client-security-", "client-security").replace("client-work-", "client-work") + }), + {} + ), + AccessAnalyzer: "client-accessanalyzer", + ACMPCA: "client-acm-pca", + APIGateway: "client-api-gateway", + ApiGatewayManagementApi: "client-apigatewaymanagementapi", + ApiGatewayV2: "client-apigatewayv2", + AppConfig: "client-appconfig", + AppConfigData: "client-appconfigdata", + AppIntegrations: "client-appintegrations", + AppRunner: "client-apprunner", + AppStream: "client-appstream", + AppSync: "client-appsync", + ApplicationCostProfiler: "client-applicationcostprofiler", + ARCZonalShift: "client-arc-zonal-shift", + AugmentedAIRuntime: "client-sage-maker-a2iruntime", + AuditManager: "client-auditmanager", + BackupStorage: "client-backupstorage", + CUR: "client-cost-and-usage-report-service", + CloudHSMV2: "client-cloudhsm-v2", + CodeGuruProfiler: "client-codeguruprofiler", + CodeStarconnections: "client-codestar-connections", + CognitoIdentityServiceProvider: "client-cognito-identity-provider", + ComprehendMedical: "client-comprehendmedical", + ConnectContactLens: "client-connect-contact-lens", + ControlTower: "client-controltower", + DMS: "client-database-migration-service", + DataPipeline: "client-data-pipeline", + Discovery: "client-application-discovery-service", + DevOpsGuru: "client-devops-guru", + DynamoDB: "client-dynamodb", + DynamoDBStreams: "client-dynamodb-streams", + DocDB: "client-docdb", + DocDBElastic: "client-docdb-elastic", + EC2InstanceConnect: "client-ec2-instance-connect", + ECRPUBLIC: "client-ecr-public", + ELB: "client-elastic-load-balancing", + ELBv2: "client-elastic-load-balancing-v2", + ElastiCache: "client-elasticache", + EMRcontainers: "client-emr-containers", + EMRServerless: "client-emr-serverless", + ES: "client-elasticsearch-service", + EventBridge: "client-eventbridge", + Finspacedata: "client-finspace-data", + ForecastQueryService: "client-forecastquery", + ForecastService: "client-forecast", + FraudDetector: "client-frauddetector", + GameLift: "client-gamelift", + GameSparks: "client-gamesparks", + GreengrassV2: "client-greengrassv2", + GroundStation: "client-groundstation", + GuardDuty: "client-guardduty", + HealthLake: "client-healthlake", + IdentityStore: "client-identitystore", + IoTAnalytics: "client-iotanalytics", + IotData: "client-iot-data-plane", + IotDeviceAdvisor: "client-iotdeviceadvisor", + IoTSecureTunneling: "client-iotsecuretunneling", + IoTSiteWise: "client-iotsitewise", + IoTThingsGraph: "client-iotthingsgraph", + IoTTwinMaker: "client-iottwinmaker", + IoTRoboRunner: "client-iot-roborunner", + KafkaConnect: "client-kafkaconnect", + KinesisVideoSignalingChannels: "client-kinesis-video-signaling", + KinesisVideoWebRTCStorage: "client-kinesis-video-webrtc-storage", + LakeFormation: "client-lakeformation", + LexRuntime: "client-lex-runtime-service", + ManagedBlockchain: "client-managedblockchain", + MigrationHubConfig: "client-migrationhub-config", + MigrationHubRefactorSpaces: "client-migration-hub-refactor-spaces", + NetworkManager: "client-networkmanager", + OpenSearch: "client-opensearch", + OpenSearchServerless: "client-opensearchserverless", + OpsWorks: "client-opsworks", + OpsWorksCM: "client-opsworkscm", + PrivateNetworks: "client-privatenetworks", + QLDBSession: "client-qldb-session", + QuickSight: "client-quicksight", + ResourceExplorer2: "client-resource-explorer-2", + RDSDataService: "client-rds-data", + RoboMaker: "client-robomaker", + RolesAnywhere: "client-rolesanywhere", + Route53: "client-route-53", + Route53Domains: "client-route-53-domains", + Route53Resolver: "client-route53resolver", + S3Control: "client-s3-control", + SageMakerFeatureStoreRuntime: "client-sagemaker-featurestore-runtime", + SavingsPlans: "client-savingsplans", + SecurityHub: "client-securityhub", + ServerlessApplicationRepository: "client-serverlessapplicationrepository", + ServiceCatalogAppRegistry: "client-service-catalog-appregistry", + ServiceDiscovery: "client-servicediscovery", + SimSpaceWeaver: "client-simspaceweaver", + SSMContacts: "client-ssm-contacts", + SSMIncidents: "client-ssm-incidents", + SSOAdmin: "client-sso-admin", + SSOOIDC: "client-sso-oidc", + StepFunctions: "client-sfn", + TranscribeService: "client-transcribe", + WAFRegional: "client-waf-regional", + WellArchitected: "client-wellarchitected", + WorkMailMessageFlow: "client-workmailmessageflow" + }; + } +}); + +// ../sdk-v2-to-v3-adapter/lib/get-v3-client-package-name.ts +var get_v3_client_package_name_exports = {}; +__export(get_v3_client_package_name_exports, { + getV3ClientPackageName: () => getV3ClientPackageName +}); +var getV3ClientPackageName; +var init_get_v3_client_package_name = __esm({ + "../sdk-v2-to-v3-adapter/lib/get-v3-client-package-name.ts"() { + "use strict"; + init_client_package_names_map(); + getV3ClientPackageName = (clientName) => { + if (clientName in CLIENT_PACKAGE_NAMES_MAP) { + return `@aws-sdk/${CLIENT_PACKAGE_NAMES_MAP[clientName]}`; + } + throw new Error(`Client '${clientName}' is either deprecated or newly added. Please consider using the v3 package format (@aws-sdk/client-xxx).`); + }; + } +}); + +// ../sdk-v2-to-v3-adapter/lib/find-client-constructor.ts +var find_client_constructor_exports = {}; +__export(find_client_constructor_exports, { + findV3ClientConstructor: () => findV3ClientConstructor +}); +function findV3ClientConstructor(pkg) { + const [_clientName, ServiceClient] = Object.entries(pkg).find( + ([name]) => { + return name.endsWith("Client") && name !== "__Client"; + } + ); + return ServiceClient; +} +var init_find_client_constructor = __esm({ + "../sdk-v2-to-v3-adapter/lib/find-client-constructor.ts"() { + "use strict"; + } +}); + +// ../sdk-v2-to-v3-adapter/lib/index.js +var require_lib5 = __commonJS({ + "../sdk-v2-to-v3-adapter/lib/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.findV3ClientConstructor = exports.getV3ClientPackageName = void 0; + var get_v3_client_package_name_1 = (init_get_v3_client_package_name(), __toCommonJS(get_v3_client_package_name_exports)); + Object.defineProperty(exports, "getV3ClientPackageName", { enumerable: true, get: function() { + return get_v3_client_package_name_1.getV3ClientPackageName; + } }); + var find_client_constructor_1 = (init_find_client_constructor(), __toCommonJS(find_client_constructor_exports)); + Object.defineProperty(exports, "findV3ClientConstructor", { enumerable: true, get: function() { + return find_client_constructor_1.findV3ClientConstructor; + } }); + } +}); + // lib/assertions/providers/lambda-handler/index.ts var lambda_handler_exports = {}; __export(lambda_handler_exports, { @@ -30810,7 +31428,6 @@ var CustomResourceHandler = class { constructor(event, context) { this.event = event; this.context = context; - this.timedOut = false; this.timeout = setTimeout(async () => { await this.respond({ status: "FAILED", @@ -30822,6 +31439,9 @@ var CustomResourceHandler = class { this.event = event; this.physicalResourceId = extractPhysicalResourceId(event); } + physicalResourceId; + timeout; + timedOut = false; /** * Handles executing the custom resource event. If `stateMachineArn` is present * in the props then trigger the waiter statemachine @@ -30955,6 +31575,7 @@ var AssertionHandler = class extends CustomResourceHandler { } }; var MatchCreator = class { + parsedObj; constructor(obj) { this.parsedObj = { matcher: obj @@ -31081,18 +31702,26 @@ var HttpHandler = class extends CustomResourceHandler { } }; +// lib/assertions/providers/lambda-handler/sdk.ts +var import_sdk_v2_to_v3_adapter = __toESM(require_lib5()); + // lib/assertions/providers/lambda-handler/utils.ts -function decode(object) { - return JSON.parse(JSON.stringify(object), (_k, v) => { - switch (v) { - case "TRUE:BOOLEAN": - return true; - case "FALSE:BOOLEAN": - return false; - default: - return v; +function parseJsonPayload(payload) { + try { + const buffer = Buffer.from(payload); + return JSON.parse(new TextDecoder().decode(buffer)); + } catch { + return payload; + } +} +function decodeParameters(obj) { + return Object.fromEntries(Object.entries(obj).map(([key, value]) => { + try { + return [key, JSON.parse(value)]; + } catch { + return [key, value]; } - }); + })); } // lib/assertions/providers/lambda-handler/sdk.ts @@ -31110,21 +31739,51 @@ function flatten(object) { }(object) ); } -function getServiceClient(service) { - const clientPackageName = `@aws-sdk/client-${service.toLowerCase()}`; +function getServicePackage(service) { + const packageName = (0, import_sdk_v2_to_v3_adapter.getV3ClientPackageName)(service); try { - const pkg = require(clientPackageName); - return new pkg[service]({}); + const pkg = require(packageName); + return { + service, + pkg, + packageName + }; } catch (e) { - throw Error(`Service ${service} client package with name '${clientPackageName}' does not exist.`); + throw Error(`Service ${service} client package with name '${packageName}' does not exist.`); } } +function getServiceClient(sdkPkg) { + try { + const ServiceClient = (0, import_sdk_v2_to_v3_adapter.findV3ClientConstructor)(sdkPkg.pkg); + return new ServiceClient({}); + } catch (e) { + console.error(e); + throw Error(`No client constructor found within package: ${sdkPkg.packageName}`); + } +} +function getSdkCommand(sdkPkg, api) { + const commandName = api.endsWith("Command") ? api : `${api}Command`; + const command = Object.entries(sdkPkg.pkg).find( + ([name]) => name.toLowerCase() === commandName.toLowerCase() + )?.[1]; + if (!command) { + throw new Error(`Unable to find command named: ${commandName} for api: ${api} in service package`); + } + return command; +} var AwsApiCallHandler = class extends CustomResourceHandler { async processEvent(request2) { - const client = getServiceClient(request2.service); - const response = await client[request2.api](request2.parameters && decode(request2.parameters)); + const sdkPkg = getServicePackage(request2.service); + const client = getServiceClient(sdkPkg); + const Command = getSdkCommand(sdkPkg, request2.api); + const commandInput = (request2.parameters && decodeParameters(request2.parameters)) ?? {}; + console.log(`SDK request to ${sdkPkg.service}.${request2.api} with parameters ${JSON.stringify(commandInput)}`); + const response = await client.send(new Command(commandInput)); + if (response.Payload) { + response.Payload = parseJsonPayload(response.Payload); + } console.log(`SDK response received ${JSON.stringify(response)}`); - delete response.ResponseMetadata; + delete response.$metadata; const respond = { apiCallResponse: response }; @@ -31252,7 +31911,7 @@ async function isComplete(event, context) { } }, context); const assertionResult = await assertion.handleIsComplete(); - if (!(assertionResult == null ? void 0 : assertionResult.failed)) { + if (!assertionResult?.failed) { await provider.respond({ status: "SUCCESS", reason: "OK", diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out index f0b901e7c06e5..560dae10d018f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"33.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json index aa49ea7594592..32d033181f645 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json @@ -1,10 +1,11 @@ { - "version": "32.0.0", + "version": "33.0.0", "testCases": { "TriggerTest/DefaultTest": { "stacks": [ "MyStack" ], + "diffAssets": true, "assertionStack": "TriggerTest/DefaultTest/DeployAssert", "assertionStackName": "TriggerTestDefaultTestDeployAssert61636546" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json index 7098944ee85e2..9b87b830c285a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "33.0.0", "artifacts": { "MyStack.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2aba455d6086d5fb7be6c191dd151bacd3ced3db7a93799474386bb144c6d89a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d70b0346c408b6c05836b626356b50a8a99a92a3fe6ea2e281a97ecf03dd1201.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -208,7 +208,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/506333024aade6ef1f4c1b78000bbc1e1307f8003bad9422adb127768f97739b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/033efbe16b566cb69151acaa2d38b2c1f73bf411f644ae441daf0c6aec5a6697.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/tree.json index c62c08472a6cd..b2796178962df 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/tree.json @@ -20,14 +20,14 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Topic2": { @@ -42,14 +42,14 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "MyTriggerFunction": { @@ -64,8 +64,8 @@ "id": "ImportServiceRole", "path": "MyStack/MyTriggerFunction/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -103,14 +103,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -122,19 +122,19 @@ "code": { "zipFile": "exports.handler = function() { console.log(\"hi\"); };" }, + "handler": "index.handler", "role": { "Fn::GetAtt": [ "MyTriggerFunctionServiceRole1BB78C29", "Arn" ] }, - "handler": "index.handler", "runtime": "nodejs16.x" } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Trigger": { @@ -149,20 +149,20 @@ "id": "Default", "path": "MyStack/MyTriggerFunction/Trigger/Default/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.triggers.Trigger", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "CurrentVersion": { @@ -181,20 +181,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnVersion", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Version", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.triggers.TriggerFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "AWSCDK.TriggerCustomResourceProviderCustomResourceProvider": { @@ -205,30 +205,30 @@ "id": "Staging", "path": "MyStack/AWSCDK.TriggerCustomResourceProviderCustomResourceProvider/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Role": { "id": "Role", "path": "MyStack/AWSCDK.TriggerCustomResourceProviderCustomResourceProvider/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Handler": { "id": "Handler", "path": "MyStack/AWSCDK.TriggerCustomResourceProviderCustomResourceProvider/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResourceProvider", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "TestQueue": { @@ -245,14 +245,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "MyLambdaFunction": { @@ -267,8 +267,8 @@ "id": "ImportServiceRole", "path": "MyStack/MyLambdaFunction/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -306,14 +306,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -325,20 +325,20 @@ "code": { "zipFile": "exports.handler = async function() { await setTimeout(() => {console.log(\"hi\")}, 3*60*1000); };" }, + "handler": "index.handler", "role": { "Fn::GetAtt": [ "MyLambdaFunctionServiceRole313A4D46", "Arn" ] }, - "handler": "index.handler", "runtime": "nodejs16.x", "timeout": 900 } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "CurrentVersion": { @@ -357,20 +357,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnVersion", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Version", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "MyTrigger": { @@ -385,20 +385,20 @@ "id": "Default", "path": "MyStack/MyTrigger/Default/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.triggers.Trigger", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "MyAssertionLambdaFunction": { @@ -413,8 +413,8 @@ "id": "ImportServiceRole", "path": "MyStack/MyAssertionLambdaFunction/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -452,8 +452,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "DefaultPolicy": { @@ -494,20 +494,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Code": { @@ -518,22 +518,22 @@ "id": "Stage", "path": "MyStack/MyAssertionLambdaFunction/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "AssetBucket": { "id": "AssetBucket", "path": "MyStack/MyAssertionLambdaFunction/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -548,12 +548,6 @@ }, "s3Key": "004b12857696fed3c10ad54c8e3cabd07cdf653ec469cbadab6c64ae6c9ce690.zip" }, - "role": { - "Fn::GetAtt": [ - "MyAssertionLambdaFunctionServiceRole36146F3B", - "Arn" - ] - }, "environment": { "variables": { "QUEUE_URL": { @@ -562,13 +556,19 @@ } }, "handler": "index.handler", + "role": { + "Fn::GetAtt": [ + "MyAssertionLambdaFunctionServiceRole36146F3B", + "Arn" + ] + }, "runtime": "nodejs16.x", "timeout": 900 } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "CurrentVersion": { @@ -587,20 +587,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnVersion", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Version", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "MyAssertionTrigger": { @@ -615,20 +615,20 @@ "id": "Default", "path": "MyStack/MyAssertionTrigger/Default/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.triggers.Trigger", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "MySecondFunction": { @@ -643,8 +643,8 @@ "id": "ImportServiceRole", "path": "MyStack/MySecondFunction/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -682,14 +682,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { @@ -701,19 +701,19 @@ "code": { "zipFile": "exports.handler = function() { console.log(\"hello\"); };" }, + "handler": "index.handler", "role": { "Fn::GetAtt": [ "MySecondFunctionServiceRole5B930841", "Arn" ] }, - "handler": "index.handler", "runtime": "nodejs16.x" } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Trigger": { @@ -728,20 +728,20 @@ "id": "Default", "path": "MyStack/MySecondFunction/Trigger/Default/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.triggers.Trigger", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "CurrentVersion": { @@ -760,20 +760,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnVersion", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Version", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.triggers.TriggerFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "MyDefaultPropTrigger": { @@ -788,20 +788,20 @@ "id": "Default", "path": "MyStack/MyDefaultPropTrigger/Default/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.triggers.Trigger", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Exports": { @@ -812,36 +812,36 @@ "id": "Output{\"Ref\":\"TestQueue6F0069AA\"}", "path": "MyStack/Exports/Output{\"Ref\":\"TestQueue6F0069AA\"}", "constructInfo": { - "fqn": "aws-cdk-lib.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "MyStack/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "MyStack/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "TriggerTest": { @@ -857,7 +857,7 @@ "path": "TriggerTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "DeployAssert": { @@ -877,7 +877,7 @@ "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } } }, @@ -894,14 +894,14 @@ "id": "Default", "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/Default/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "WaitFor": { @@ -917,15 +917,15 @@ "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/WaitFor/IsCompleteProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "Invoke": { "id": "Invoke", "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/WaitFor/IsCompleteProvider/Invoke", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, @@ -943,15 +943,15 @@ "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/WaitFor/TimeoutProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "Invoke": { "id": "Invoke", "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/WaitFor/TimeoutProvider/Invoke", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, @@ -964,16 +964,16 @@ "id": "Role", "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/WaitFor/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Resource": { "id": "Resource", "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/WaitFor/Resource", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, @@ -986,8 +986,8 @@ "id": "AssertionResults", "path": "TriggerTest/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage3bd20f8ab47b6a7aba2afa037c8a30f4/AssertionResults", "constructInfo": { - "fqn": "aws-cdk-lib.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, @@ -1004,30 +1004,30 @@ "id": "Staging", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Role": { "id": "Role", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Handler": { "id": "Handler", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "SingletonFunction76b3e830a873425f8453eddd85c86925": { @@ -1038,30 +1038,30 @@ "id": "Staging", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Role": { "id": "Role", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Handler": { "id": "Handler", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": { @@ -1072,52 +1072,52 @@ "id": "Staging", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Role": { "id": "Role", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "Handler": { "id": "Handler", "path": "TriggerTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "TriggerTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "TriggerTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } }, @@ -1137,13 +1137,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.69" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify-alpha/package.json b/packages/@aws-cdk/aws-amplify-alpha/package.json index 93955e7f1fb26..b3998cedb7493 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/package.json +++ b/packages/@aws-cdk/aws-amplify-alpha/package.json @@ -86,9 +86,9 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@aws-sdk/client-amplify": "^3.382.0", - "@aws-sdk/client-s3": "^3.382.0", - "@aws-sdk/s3-request-presigner": "^3.382.0", + "@aws-sdk/client-amplify": "^3.387.0", + "@aws-sdk/client-s3": "^3.387.0", + "@aws-sdk/s3-request-presigner": "^3.387.0", "@types/jest": "^29.5.3", "aws-cdk-lib": "0.0.0", "constructs": "^10.0.0" diff --git a/packages/@aws-cdk/aws-appconfig-alpha/.eslintrc.js b/packages/@aws-cdk/aws-appconfig-alpha/.eslintrc.js new file mode 100644 index 0000000000000..39d029a634437 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/.eslintrc.js @@ -0,0 +1,7 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; + +baseConfig.rules['import/order'] = 'off'; +baseConfig.rules['@aws-cdk/no-literal-partition'] = 'off'; + +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-appconfig-alpha/.gitignore b/packages/@aws-cdk/aws-appconfig-alpha/.gitignore new file mode 100644 index 0000000000000..3e895fc51317c --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/.gitignore @@ -0,0 +1,23 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +nyc.config.js +.LAST_PACKAGE +*.snk +!.eslintrc.js +!jest.config.js + +junit.xml +!**/*.snapshot/**/asset.*/*.js +!**/*.snapshot/**/asset.*/*.d.ts + +!**/*.snapshot/**/asset.*/** diff --git a/packages/@aws-cdk/aws-appconfig-alpha/.npmignore b/packages/@aws-cdk/aws-appconfig-alpha/.npmignore new file mode 100644 index 0000000000000..22661f119c020 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/.npmignore @@ -0,0 +1,31 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +!*.lit.ts +**/*.snapshot + +# exclude test +test/ diff --git a/packages/@aws-cdk/aws-appconfig-alpha/LICENSE b/packages/@aws-cdk/aws-appconfig-alpha/LICENSE new file mode 100644 index 0000000000000..9b722c65c5481 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-appconfig-alpha/NOTICE b/packages/@aws-cdk/aws-appconfig-alpha/NOTICE new file mode 100644 index 0000000000000..a27b7dd317649 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-appconfig-alpha/README.md b/packages/@aws-cdk/aws-appconfig-alpha/README.md new file mode 100644 index 0000000000000..c20878cbbad24 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/README.md @@ -0,0 +1,443 @@ +# AWS AppConfig Construct Library + + + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +Use AWS AppConfig, a capability of AWS Systems Manager, to create, manage, and quickly deploy application configurations. A configuration is a collection of settings that influence the behavior of your application. You can use AWS AppConfig with applications hosted on Amazon Elastic Compute Cloud (Amazon EC2) instances, AWS Lambda, containers, mobile applications, or IoT devices. To view examples of the types of configurations you can manage by using AWS AppConfig, see [Example configurations](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html#appconfig-creating-configuration-and-profile-examples). + +## Application + +In AWS AppConfig, an application is simply an organizational construct like a folder. This organizational construct has a relationship with some unit of executable code. For example, you could create an application called MyMobileApp to organize and manage configuration data for a mobile application installed by your users. Configurations and environments are associated with the application. + +The name and description of an application are optional. + +Create a simple application: + +```ts +new appconfig.Application(this, 'MyApplication'); +``` + +Create an application with a name and description: + +```ts +new appconfig.Application(this, 'MyApplication', { + name: 'App1', + description: 'This is my application created through CDK.', +}); +``` + +## Deployment Strategy + +A deployment strategy defines how a configuration will roll out. The roll out is defined by four parameters: deployment type, step percentage, deployment time, and bake time. +See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-deployment-strategy.html + +Deployment strategy with predefined values: + +```ts +new appconfig.DeploymentStrategy(this, 'MyDeploymentStrategy', { + rolloutStrategy: appconfig.RolloutStrategy.CANARY_10_PERCENT_20_MINUTES, +}); +``` + +Deployment strategy with custom values: + +```ts +new appconfig.DeploymentStrategy(this, 'MyDeploymentStrategy', { + rolloutStrategy: appconfig.RolloutStrategy.linear({ + growthFactor: 20, + deploymentDuration: Duration.minutes(30), + finalBakeTime: Duration.minutes(30), + }), +}); +``` + +## Configuration + +A configuration is a higher-level construct that can either be a `HostedConfiguration` (stored internally through AWS AppConfig) or a `SourcedConfiguration` (stored in an Amazon S3 bucket, AWS Secrets Manager secrets, Systems Manager (SSM) Parameter Store parameters, SSM documents, or AWS CodePipeline). This construct manages deployments on creation. + +### HostedConfiguration + +A hosted configuration represents configuration stored in the AWS AppConfig hosted configuration store. A hosted configuration takes in the configuration content and associated AWS AppConfig application. On construction of a hosted configuration, the configuration is deployed. + +```ts +declare const application: appconfig.Application; + +new appconfig.HostedConfiguration(this, 'MyHostedConfiguration', { + application, + content: appconfig.ConfigurationContent.fromInline('This is my configuration content.'), +}); +``` + +AWS AppConfig supports the following types of configuration profiles. + +* **Feature flag**: Use a feature flag configuration to turn on new features that require a timely deployment, such as a product launch or announcement. +* **Freeform**: Use a freeform configuration to carefully introduce changes to your application. + +A hosted configuration with type: + +```ts +declare const application: appconfig.Application; + +new appconfig.HostedConfiguration(this, 'MyHostedConfiguration', { + application, + content: appconfig.ConfigurationContent.fromInline('This is my configuration content.'), + type: appconfig.ConfigurationType.FEATURE_FLAGS, +}); +``` + +When you create a configuration and configuration profile, you can specify up to two validators. A validator ensures that your configuration data is syntactically and semantically correct. You can create validators in either JSON Schema or as an AWS Lambda function. +See [About validators](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html#appconfig-creating-configuration-and-profile-validators) for more information. + +A hosted configuration with validators: + +```ts +declare const application: appconfig.Application; +declare const fn: lambda.Function; + +new appconfig.HostedConfiguration(this, 'MyHostedConfiguration', { + application, + content: appconfig.ConfigurationContent.fromInline('This is my configuration content.'), + validators: [ + appconfig.JsonSchemaValidator.fromFile('schema.json'), + appconfig.LambdaValidator.fromFunction(fn), + ], +}); +``` + +You can attach a deployment strategy (as described in the previous section) to your configuration to specify how you want your configuration to roll out. + +A hosted configuration with a deployment strategy: + +```ts +declare const application: appconfig.Application; + +new appconfig.HostedConfiguration(this, 'MyHostedConfiguration', { + application, + content: appconfig.ConfigurationContent.fromInline('This is my configuration content.'), + deploymentStrategy: new appconfig.DeploymentStrategy(this, 'MyDeploymentStrategy', { + rolloutStrategy: appconfig.RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: Duration.minutes(30), + finalBakeTime: Duration.minutes(15), + }), + }), +}); +``` + +The `deployTo` parameter is used to specify which environments to deploy the configuration to. If this parameter is not specified, there will only be a deployment if there is one environment associated to the AWS AppConfig application. + +A hosted configuration with `deployTo`: + +```ts +declare const application: appconfig.Application; +declare const env: appconfig.Environment; + +new appconfig.HostedConfiguration(this, 'MyHostedConfiguration', { + application, + content: appconfig.ConfigurationContent.fromInline('This is my configuration content.'), + deployTo: [env], +}); +``` + +### SourcedConfiguration + +A sourced configuration represents configuration stored in an Amazon S3 bucket, AWS Secrets Manager secret, Systems Manager (SSM) Parameter Store parameter, SSM document, or AWS CodePipeline. A sourced configuration takes in the location source construct and optionally a version number to deploy. On construction of a sourced configuration, the configuration is deployed only if a version number is specified. + +### S3 + +Use an Amazon S3 bucket to store a configuration. + +```ts +declare const application: appconfig.Application; + +const bucket = new s3.Bucket(this, 'MyBucket', { + versioned: true, +}); + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'), +}); +``` + +Use an encrypted bucket: + +```ts +declare const application: appconfig.Application; + +const bucket = new s3.Bucket(this, 'MyBucket', { + versioned: true, + encryption: s3.BucketEncryption.KMS, +}); + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'), +}); +``` + +### AWS Secrets Manager secret + +Use a Secrets Manager secret to store a configuration. + +```ts +declare const application: appconfig.Application; +declare const secret: secrets.Secret; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromSecret(secret), +}); +``` + +### SSM Parameter Store parameter + +Use an SSM parameter to store a configuration. + +```ts +declare const application: appconfig.Application; +declare const parameter: ssm.StringParameter; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromParameter(parameter), + versionNumber: '1', +}); +``` + +### SSM document + +Use an SSM document to store a configuration. + +```ts +declare const application: appconfig.Application; +declare const document: ssm.CfnDocument; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromCfnDocument(document), +}); +``` + +### AWS CodePipeline + +Use an AWS CodePipeline pipeline to store a configuration. + +```ts +declare const application: appconfig.Application; +declare const pipeline: codepipeline.Pipeline; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromPipeline(pipeline), +}); +``` + +Similar to a hosted configuration, a sourced configuration can optionally take in a type, validators, a `deployTo` parameter, and a deployment strategy. + +A sourced configuration with type: + +```ts +declare const application: appconfig.Application; +declare const bucket: s3.Bucket; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'), + type: appconfig.ConfigurationType.FEATURE_FLAGS, + name: 'MyConfig', + description: 'This is my sourced configuration from CDK.', +}); +``` + +A sourced configuration with validators: + +```ts +declare const application: appconfig.Application; +declare const bucket: s3.Bucket; +declare const fn: lambda.Function; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'), + validators: [ + appconfig.JsonSchemaValidator.fromFile('schema.json'), + appconfig.LambdaValidator.fromFunction(fn), + ], +}); +``` + +A sourced configuration with a deployment strategy: + +```ts +declare const application: appconfig.Application; +declare const bucket: s3.Bucket; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'), + deploymentStrategy: new appconfig.DeploymentStrategy(this, 'MyDeploymentStrategy', { + rolloutStrategy: appconfig.RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: Duration.minutes(30), + finalBakeTime: Duration.minutes(15), + }), + }), +}); +``` + +The `deployTo` parameter is used to specify which environments to deploy the configuration to. If this parameter is not specified, there will only be a deployment if there is one environment associated to the AWS AppConfig application. + +A sourced configuration with `deployTo`: + +```ts +declare const application: appconfig.Application; +declare const bucket: s3.Bucket; +declare const env: appconfig.Environment; + +new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', { + application, + location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'), + deployTo: [env], +}); +``` + +## Environment + +For each AWS AppConfig application, you define one or more environments. An environment is a logical deployment group of AWS AppConfig targets, such as applications in a Beta or Production environment. You can also define environments for application subcomponents such as the Web, Mobile, and Back-end components for your application. You can configure Amazon CloudWatch alarms for each environment. The system monitors alarms during a configuration deployment. If an alarm is triggered, the system rolls back the configuration. + +Basic environment with monitors: + +```ts +declare const application: appconfig.Application; +declare const alarm: cloudwatch.Alarm; + +new appconfig.Environment(this, 'MyEnvironment', { + application, + monitors: [ + {alarm}, + ] +}); +``` + +## Extension + +An extension augments your ability to inject logic or behavior at different points during the AWS AppConfig workflow of creating or deploying a configuration. +See: https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions.html + +### AWS Lambda destination + +Use an AWS Lambda as the event destination for an extension. + +```ts +declare const fn: lambda.Function; + +new appconfig.Extension(this, 'MyExtension', { + actions: [ + new appconfig.Action({ + actionPoints: [appconfig.ActionPoint.ON_DEPLOYMENT_START], + eventDestination: new appconfig.LambdaDestination(fn), + }), + ], +}); +``` + +Lambda extension with parameters: + +```ts +declare const fn: lambda.Function; + +new appconfig.Extension(this, 'MyExtension', { + actions: [ + new appconfig.Action({ + actionPoints: [appconfig.ActionPoint.ON_DEPLOYMENT_START], + eventDestination: new appconfig.LambdaDestination(fn), + }), + ], + parameters: [ + appconfig.Parameter.required('testParam', 'true'), + appconfig.Parameter.notRequired('testNotRequiredParam'), + ] +}); +``` + + +### Amazon Simple Queue Service (SQS) destination + +Use a queue as the event destination for an extension. + +```ts +declare const queue: sqs.Queue; + +new appconfig.Extension(this, 'MyExtension', { + actions: [ + new appconfig.Action({ + actionPoints: [appconfig.ActionPoint.ON_DEPLOYMENT_START], + eventDestination: new appconfig.SqsDestination(queue), + }), + ], +}); +``` + +### Amazon Simple Notification Service (SNS) destination + +Use an SNS topic as the event destination for an extension. + +```ts +declare const topic: sns.Topic; + +new appconfig.Extension(this, 'MyExtension', { + actions: [ + new appconfig.Action({ + actionPoints: [appconfig.ActionPoint.ON_DEPLOYMENT_START], + eventDestination: new appconfig.SnsDestination(topic), + }), + ], +}); +``` + +### Amazon EventBridge destination + +Use the default event bus as the event destination for an extension. + +```ts +const bus = events.EventBus.fromEventBusName(this, 'MyEventBus', 'default'); + +new appconfig.Extension(this, 'MyExtension', { + actions: [ + new appconfig.Action({ + actionPoints: [appconfig.ActionPoint.ON_DEPLOYMENT_START], + eventDestination: new appconfig.EventBridgeDestination(bus), + }), + ], +}); +``` + +You can also add extensions and their associations directly by calling `onDeploymentComplete()` or any other action point method on the AWS AppConfig application, configuration, or environment resource. To add an association to an existing extension, you can call `addExtension()` on the resource. + +Adding an association to an AWS AppConfig application: + +```ts +declare const application: appconfig.Application; +declare const extension: appconfig.Extension; +declare const lambdaDestination: appconfig.LambdaDestination; + +application.addExtension(extension); +application.onDeploymentComplete(lambdaDestination); +``` + diff --git a/packages/@aws-cdk/aws-appconfig-alpha/jest.config.js b/packages/@aws-cdk/aws-appconfig-alpha/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-appconfig-alpha/lib/application.ts b/packages/@aws-cdk/aws-appconfig-alpha/lib/application.ts new file mode 100644 index 0000000000000..9ad5cafd5d599 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/lib/application.ts @@ -0,0 +1,396 @@ +import * as cdk from 'aws-cdk-lib'; +import { Names } from 'aws-cdk-lib'; +import { CfnApplication } from 'aws-cdk-lib/aws-appconfig'; +import * as ecs from 'aws-cdk-lib/aws-ecs'; +import { Construct } from 'constructs'; +import { HostedConfiguration, HostedConfigurationOptions, SourcedConfiguration, SourcedConfigurationOptions } from './configuration'; +import { Environment, EnvironmentOptions, IEnvironment } from './environment'; +import { ActionPoint, IEventDestination, ExtensionOptions, IExtension, IExtensible, ExtensibleBase } from './extension'; + +/** + * Defines the platform for the AWS AppConfig Lambda extension. + */ +export enum Platform { + X86_64 = 'x86-64', + ARM_64 = 'ARM64', +} + +export interface IApplication extends cdk.IResource { + /** + * The description of the application. + */ + readonly description?: string; + + /** + * The name of the application. + */ + readonly name?: string; + + /** + * The ID of the application. + */ + readonly applicationId: string; + + /** + * The Amazon Resource Name (ARN) of the application. + */ + readonly applicationArn: string; + + /** + * Adds an environment. + * + * @param id The name of the environment construct + * @param options The options for the environment construct + */ + addEnvironment(id: string, options?: EnvironmentOptions): IEnvironment; + + /** + * Adds a hosted configuration. + * + * @param id The name of the hosted configuration construct + * @param options The options for the hosted configuration construct + */ + addHostedConfiguration(id: string, options: HostedConfigurationOptions): HostedConfiguration; + + /** + * Adds a sourced configuration. + * + * @param id The name of the sourced configuration construct + * @param options The options for the sourced configuration construct + */ + addSourcedConfiguration(id: string, options: SourcedConfigurationOptions): SourcedConfiguration; + + /** + * Adds an existing environment. + * + * @param environment The environment + */ + addExistingEnvironment(environment: IEnvironment): void; + + /** + * Returns the list of associated environments. + */ + get environments(): IEnvironment[]; +} + +export interface ApplicationProps { + /** + * The name of the application. + * + * @default - A name is generated. + */ + readonly name?: string; + + /** + * The description for the application. + * + * @default - No description. + */ + readonly description?: string; +} + +abstract class ApplicationBase extends cdk.Resource implements IApplication, IExtensible { + public abstract applicationId: string; + public abstract applicationArn: string; + private _environments: IEnvironment[] = []; + protected abstract extensible: ExtensibleBase; + + public addEnvironment(id: string, options: EnvironmentOptions = {}): IEnvironment { + return new Environment(this, id, { + application: this, + ...options, + }); + } + + public addHostedConfiguration(id: string, options: HostedConfigurationOptions): HostedConfiguration { + return new HostedConfiguration(this, id, { + application: this, + ...options, + }); + } + + public addSourcedConfiguration(id: string, options: SourcedConfigurationOptions): SourcedConfiguration { + return new SourcedConfiguration(this, id, { + application: this, + ...options, + }); + } + + public addExistingEnvironment(environment: IEnvironment) { + this._environments.push(environment); + } + + get environments(): IEnvironment[] { + return this._environments; + } + + /** + * Adds an extension defined by the action point and event destination + * and also creates an extension association to an application. + * + * @param actionPoint The action point which triggers the event + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.on(actionPoint, eventDestination, options); + } + + /** + * Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the + * provided event destination and also creates an extension association to an application. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.preCreateHostedConfigurationVersion(eventDestination, options); + } + + /** + * Adds a PRE_START_DEPLOYMENT extension with the provided event destination and + * also creates an extension association to an application. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.preStartDeployment(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_START extension with the provided event destination and + * also creates an extension association to an application. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentStart(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and + * also creates an extension association to an application. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentStep(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and + * also creates an extension association to an application. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentBaking(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and + * also creates an extension association to an application. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentComplete(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and + * also creates an extension association to an application. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentRolledBack(eventDestination, options); + } + + /** + * Adds an extension association to the application. + * + * @param extension The extension to create an association for + */ + public addExtension(extension: IExtension) { + this.extensible.addExtension(extension); + } +} + +/** + * An AWS AppConfig application. + * + * @resource AWS::AppConfig::Application + * @see https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-application.html + */ +export class Application extends ApplicationBase { + /** + * Imports an AWS AppConfig application into the CDK using its Amazon Resource Name (ARN). + * + * @param scope The parent construct + * @param id The name of the application construct + * @param applicationArn The Amazon Resource Name (ARN) of the application + */ + public static fromApplicationArn(scope: Construct, id: string, applicationArn: string): IApplication { + const parsedArn = cdk.Stack.of(scope).splitArn(applicationArn, cdk.ArnFormat.SLASH_RESOURCE_NAME); + const applicationId = parsedArn.resourceName; + if (!applicationId) { + throw new Error('Missing required application id from application ARN'); + } + + class Import extends ApplicationBase { + public readonly applicationId = applicationId!; + public readonly applicationArn = applicationArn; + protected readonly extensible = new ExtensibleBase(scope, this.applicationArn); + } + + return new Import(scope, id); + } + + /** + * Imports an AWS AppConfig application into the CDK using its ID. + * + * @param scope The parent construct + * @param id The name of the application construct + * @param applicationId The ID of the application + */ + public static fromApplicationId(scope: Construct, id: string, applicationId: string): IApplication { + const stack = cdk.Stack.of(scope); + const applicationArn = stack.formatArn({ + service: 'appconfig', + resource: 'application', + resourceName: applicationId, + }); + + class Import extends ApplicationBase { + public readonly applicationId = applicationId; + public readonly applicationArn = applicationArn; + protected readonly extensible = new ExtensibleBase(scope, this.applicationArn); + } + + return new Import(scope, id); + } + + /** + * Retrieves the Lambda layer version Amazon Resource Name (ARN) for the AWS AppConfig Lambda extension. + * + * @param region The region for the Lambda layer (for example, 'us-east-1') + * @param platform The platform for the Lambda layer (default is Platform.X86_64) + * @returns Lambda layer version ARN + */ + public static getLambdaLayerVersionArn(region: string, platform?: Platform): string { + return lambdaLayerVersions[platform || Platform.X86_64][region]; + } + + /** + * Adds the AWS AppConfig Agent as a container to the provided ECS task definition. + * + * @param taskDef The ECS task definition + */ + public static addAgentToEcs(taskDef: ecs.TaskDefinition) { + taskDef.addContainer('AppConfigAgentContainer', { + image: ecs.ContainerImage.fromRegistry('public.ecr.aws/aws-appconfig/aws-appconfig-agent:latest'), + containerName: 'AppConfigAgentContainer', + }); + } + + /** + * The description of the application. + */ + public readonly description?: string; + + /** + * The name of the application. + */ + public readonly name?: string; + + /** + * The ID of the application. + */ + public readonly applicationId: string; + + /** + * The Amazon Resource Name (ARN) of the application. + */ + public readonly applicationArn: string; + + private _application: CfnApplication; + protected extensible: ExtensibleBase; + + constructor(scope: Construct, id: string, props: ApplicationProps = {}) { + super(scope, id); + + this.description = props.description; + this.name = props.name || Names.uniqueResourceName(this, { + maxLength: 64, + separator: '-', + }); + + this._application = new CfnApplication(this, 'Resource', { + name: this.name, + description: this.description, + }); + this.applicationId = this._application.ref; + this.applicationArn = cdk.Stack.of(this).formatArn({ + service: 'appconfig', + resource: 'application', + resourceName: this.applicationId, + }); + + this.extensible = new ExtensibleBase(scope, this.applicationArn, this.name); + } +} + +const lambdaLayerVersions: {[key: string]: {[key: string]: string}} = { + [Platform.X86_64]: { + 'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension:110', + 'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension:79', + 'us-west-1': 'arn:aws:lambda:us-west-1:958113053741:layer:AWS-AppConfig-Extension:121', + 'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension:143', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:039592058896:layer:AWS-AppConfig-Extension:79', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension:91', + 'eu-central-2': 'arn:aws:lambda:eu-central-2:758369105281:layer:AWS-AppConfig-Extension:29', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension:108', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension:79', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:493207061005:layer:AWS-AppConfig-Extension:80', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:646970417810:layer:AWS-AppConfig-Extension:139', + 'eu-south-1': 'arn:aws:lambda:eu-south-1:203683718741:layer:AWS-AppConfig-Extension:71', + 'eu-south-2': 'arn:aws:lambda:eu-south-2:586093569114:layer:AWS-AppConfig-Extension:26', + 'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:615057806174:layer:AWS-AppConfig-Extension:66', + 'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:615084187847:layer:AWS-AppConfig-Extension:66', + 'ap-east-1': 'arn:aws:lambda:ap-east-1:630222743974:layer:AWS-AppConfig-Extension:71', + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension:82', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:826293736237:layer:AWS-AppConfig-Extension:91', + 'ap-northeast-3': 'arn:aws:lambda:ap-northeast-3:706869817123:layer:AWS-AppConfig-Extension:84', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension:89', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension:91', + 'ap-southeast-3': 'arn:aws:lambda:ap-southeast-3:418787028745:layer:AWS-AppConfig-Extension:60', + 'ap-southeast-4': 'arn:aws:lambda:ap-southeast-4:307021474294:layer:AWS-AppConfig-Extension:2', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension:92', + 'ap-south-2': 'arn:aws:lambda:ap-south-2:489524808438:layer:AWS-AppConfig-Extension:29', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:000010852771:layer:AWS-AppConfig-Extension:110', + 'af-south-1': 'arn:aws:lambda:af-south-1:574348263942:layer:AWS-AppConfig-Extension:71', + 'me-central-1': 'arn:aws:lambda:me-central-1:662846165436:layer:AWS-AppConfig-Extension:31', + 'me-south-1': 'arn:aws:lambda:me-south-1:559955524753:layer:AWS-AppConfig-Extension:71', + 'us-gov-east-1': 'arn:aws-us-gov:lambda:us-gov-east-1:946561847325:layer:AWS-AppConfig-Extension:44', + 'us-gov-west-1': 'arn:aws-us-gov:lambda:us-gov-west-1:946746059096:layer:AWS-AppConfig-Extension:44', + }, + [Platform.ARM_64]: { + 'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension-Arm64:43', + 'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension-Arm64:31', + 'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:45', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension-Arm64:34', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension-Arm64:46', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension-Arm64:31', + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension-Arm64:35', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension-Arm64:41', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension-Arm64:34', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension-Arm64:34', + }, +}; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/lib/configuration.ts b/packages/@aws-cdk/aws-appconfig-alpha/lib/configuration.ts new file mode 100644 index 0000000000000..0681f73487e08 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/lib/configuration.ts @@ -0,0 +1,904 @@ +import * as fs from 'fs'; +import { PhysicalName, Stack, ArnFormat, Names, RemovalPolicy } from 'aws-cdk-lib'; +import { CfnConfigurationProfile, CfnDeployment, CfnHostedConfigurationVersion } from 'aws-cdk-lib/aws-appconfig'; +import * as cp from 'aws-cdk-lib/aws-codepipeline'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import * as kms from 'aws-cdk-lib/aws-kms'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as s3 from 'aws-cdk-lib/aws-s3'; +import * as sm from 'aws-cdk-lib/aws-secretsmanager'; +import * as ssm from 'aws-cdk-lib/aws-ssm'; +import { Construct, IConstruct } from 'constructs'; +import { IApplication } from './application'; +import { DeploymentStrategy, IDeploymentStrategy, RolloutStrategy } from './deployment-strategy'; +import { IEnvironment } from './environment'; +import { ActionPoint, IEventDestination, ExtensionOptions, IExtension, IExtensible, ExtensibleBase } from './extension'; +import { getHash } from './private/hash'; + +export interface ConfigurationOptions { + /** + * The deployment strategy for the configuration. + * + * @default - A deployment strategy with the rollout strategy set to + * RolloutStrategy.CANARY_10_PERCENT_20_MINUTES + */ + readonly deploymentStrategy?: IDeploymentStrategy; + + /** + * The name of the configuration. + * + * @default - A name is generated. + */ + readonly name?: string; + + /** + * The validators for the configuration. + * + * @default - No validators. + */ + readonly validators?: IValidator[]; + + /** + * The description of the configuration. + * + * @default - No description. + */ + readonly description?: string; + + /** + * The type of configuration. + * + * @default ConfigurationType.FREEFORM + */ + readonly type?: ConfigurationType; + + /** + * The list of environments to deploy the configuration to. + * + * If this parameter is not specified and there is only one environment + * associated to the application, then we will deploy to that one. Otherwise, + * there will be no deployment. + * + * @default - None. + */ + readonly deployTo?: IEnvironment[]; + + /** + * The deployment key of the configuration. + * + * @default - None. + */ + readonly deploymentKey?: kms.IKey; +} + +export interface ConfigurationProps extends ConfigurationOptions { + /** + * The application associated with the configuration. + */ + readonly application: IApplication; +} + +export interface IConfiguration extends IConstruct { + /** + * The deployment strategy for the configuration. + */ + readonly deploymentStrategy?: IDeploymentStrategy; + + /** + * The configuration version number. + */ + readonly versionNumber?: string; + + /** + * The application associated with the configuration. + */ + readonly application: IApplication; + + /** + * The name of the configuration. + */ + readonly name?: string; + + /** + * The validators for the configuration. + */ + readonly validators?: IValidator[]; + + /** + * The description of the configuration. + */ + readonly description?: string; + + /** + * The configuration type. + */ + readonly type?: ConfigurationType; + + /** + * The environments to deploy to. + */ + readonly deployTo?: IEnvironment[]; + + /** + * The deployment key for the configuration. + */ + readonly deploymentKey?: kms.IKey; + + /** + * The ID of the configuration profile. + */ + readonly configurationProfileId: string; +} + +abstract class ConfigurationBase extends Construct implements IConfiguration, IExtensible { + public abstract readonly versionNumber?: string; + public abstract readonly configurationProfileId: string; + + /** + * The application associated with the configuration. + */ + public readonly application: IApplication; + + /** + * The environments to deploy to. + */ + public readonly deployTo?: IEnvironment[]; + + /** + * The name of the configuration. + */ + public readonly name?: string; + + /** + * The validators for the configuration. + */ + public readonly validators?: IValidator[]; + + /** + * The description of the configuration. + */ + public readonly description?: string; + + /** + * The configuration type. + */ + public readonly type?: ConfigurationType; + + /** + * The deployment key for the configuration. + */ + public readonly deploymentKey?: kms.IKey; + + /** + * The deployment strategy for the configuration. + */ + readonly deploymentStrategy?: IDeploymentStrategy; + + protected applicationId: string; + protected extensible!: ExtensibleBase; + + constructor(scope: Construct, id: string, props: ConfigurationProps) { + super(scope, id); + + this.name = props.name || Names.uniqueResourceName(this, { + maxLength: 128, + separator: '-', + }); + this.application = props.application; + this.applicationId = this.application.applicationId; + this.type = props.type; + this.validators = props.validators; + this.description = props.description; + this.deployTo = props.deployTo; + this.deploymentKey = props.deploymentKey; + this.deploymentStrategy = props.deploymentStrategy || new DeploymentStrategy(this, 'DeploymentStrategy', { + rolloutStrategy: RolloutStrategy.CANARY_10_PERCENT_20_MINUTES, + }); + } + + protected abstract getDeploymentHash(environment: IEnvironment): string; + + /** + * Adds an extension defined by the action point and event destination + * and also creates an extension association to the configuration profile. + * + * @param actionPoint The action point which triggers the event + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.on(actionPoint, eventDestination, options); + } + + /** + * Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the + * provided event destination and also creates an extension association to the configuration profile. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.preCreateHostedConfigurationVersion(eventDestination, options); + } + + /** + * Adds a PRE_START_DEPLOYMENT extension with the provided event destination + * and also creates an extension association to the configuration profile. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.preStartDeployment(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_START extension with the provided event destination + * and also creates an extension association to the configuration profile. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentStart(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_STEP extension with the provided event destination + * and also creates an extension association to the configuration profile. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentStep(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and + * also creates an extension association to the configuration profile. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentBaking(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination + * and also creates an extension association to the configuration profile. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentComplete(eventDestination, options); + } + + /** + * Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination + * and also creates an extension association to the configuration profile. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + public onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentRolledBack(eventDestination, options); + } + + /** + * Adds an extension association to the configuration profile. + * + * @param extension The extension to create an association for + */ + public addExtension(extension: IExtension) { + this.extensible.addExtension(extension); + } + + protected addExistingEnvironmentsToApplication() { + this.deployTo?.forEach((environment) => { + if (!this.application.environments.includes(environment)) { + this.application.addExistingEnvironment(environment); + } + }); + } + + protected deployConfigToEnvironments() { + if (this.application.environments.length == 0) { + this.application.addEnvironment('Environment', { + description: this.description, + }); + } + + if ((!this.deployTo && this.application.environments.length > 1) || !this.versionNumber) { + return; + } + + this.application.environments.forEach((environment) => { + if ((this.deployTo && !this.deployTo.includes(environment))) { + return; + } + const logicalId = `Deployment${this.getDeploymentHash(environment)}`; + if (this.node.tryFindChild(logicalId)) { + return; + } + new CfnDeployment(this, logicalId, { + applicationId: this.application.applicationId, + configurationProfileId: this.configurationProfileId, + deploymentStrategyId: this.deploymentStrategy!.deploymentStrategyId, + environmentId: environment.environmentId, + configurationVersion: this.versionNumber!, + description: this.description, + kmsKeyIdentifier: this.deploymentKey?.keyArn, + }); + }); + } +} + +export interface HostedConfigurationOptions extends ConfigurationOptions { + /** + * The content of the hosted configuration. + */ + readonly content: ConfigurationContent; + + /** + * The content type of the hosted configuration. + */ + readonly contentType?: string; + + /** + * The latest version number of the hosted configuration. + */ + readonly latestVersionNumber?: number; + + /** + * The version label of the hosted configuration. + */ + readonly versionLabel?: string; +} + +export interface HostedConfigurationProps extends ConfigurationProps { + /** + * The content of the hosted configuration. + */ + readonly content: ConfigurationContent; + + /** + * The content type of the hosted configuration. + */ + readonly contentType?: string; + + /** + * The latest version number of the hosted configuration. + */ + readonly latestVersionNumber?: number; + + /** + * The version label of the hosted configuration. + */ + readonly versionLabel?: string; +} + +export class HostedConfiguration extends ConfigurationBase { + /** + * The content of the hosted configuration. + */ + public readonly content: string; + + /** + * The content type of the hosted configuration. + */ + public readonly contentType?: string; + + /** + * The latest version number of the hosted configuration. + */ + public readonly latestVersionNumber?: number; + + /** + * The version label of the hosted configuration. + */ + public readonly versionLabel?: string; + + /** + * The version number of the hosted configuration. + */ + public readonly versionNumber?: string; + + /** + * The Amazon Resource Name (ARN) of the hosted configuration version. + */ + public readonly hostedConfigurationVersionArn: string; + + /** + * The ID of the configuration profile. + */ + public readonly configurationProfileId: string; + + /** + * The Amazon Resource Name (ARN) of the configuration profile. + */ + public readonly configurationProfileArn: string; + + private readonly _cfnConfigurationProfile: CfnConfigurationProfile; + private readonly _cfnHostedConfigurationVersion: CfnHostedConfigurationVersion; + + constructor(scope: Construct, id: string, props: HostedConfigurationProps) { + super(scope, id, props); + + this._cfnConfigurationProfile = new CfnConfigurationProfile(this, 'ConfigurationProfile', { + applicationId: this.applicationId, + locationUri: 'hosted', + name: this.name!, + description: this.description, + type: this.type, + validators: this.validators, + }); + this.configurationProfileId = this._cfnConfigurationProfile.ref; + this.configurationProfileArn = Stack.of(this).formatArn({ + service: 'appconfig', + resource: 'application', + resourceName: `${this.applicationId}/configurationprofile/${this.configurationProfileId}`, + }); + this.extensible = new ExtensibleBase(scope, this.configurationProfileArn, this.name); + + this.content = props.content.content; + this.contentType = props.contentType || 'application/json'; + this.latestVersionNumber = props.latestVersionNumber; + this.versionLabel = props.versionLabel; + this._cfnHostedConfigurationVersion = new CfnHostedConfigurationVersion(this, 'Resource', { + applicationId: this.applicationId, + configurationProfileId: this.configurationProfileId, + content: this.content, + contentType: this.contentType, + description: this.description, + latestVersionNumber: this.latestVersionNumber, + versionLabel: this.versionLabel, + }); + this._cfnHostedConfigurationVersion.applyRemovalPolicy(RemovalPolicy.RETAIN); + + this.versionNumber = this._cfnHostedConfigurationVersion.ref; + this.hostedConfigurationVersionArn = Stack.of(this).formatArn({ + service: 'appconfig', + resource: 'application', + resourceName: `${this.applicationId}/configurationprofile/${this.configurationProfileId}/hostedconfigurationversion/${this.versionNumber}`, + }); + + this.addExistingEnvironmentsToApplication(); + this.deployConfigToEnvironments(); + } + + protected getDeploymentHash(environment: IEnvironment): string { + const combinedString = ` + ${this.application!.name!} + ${this.name!} + ${environment.name!} + ${this.content} + `; + return getHash(combinedString); + } +} + +export interface SourcedConfigurationOptions extends ConfigurationOptions { + /** + * The location where the configuration is stored. + */ + readonly location: ConfigurationSource; + + /** + * The version number of the sourced configuration to deploy. If this is not specified, + * then there will be no deployment. + * + * @default - None. + */ + readonly versionNumber?: string; + + /** + * The IAM role to retrieve the configuration. + * + * @default - A role is generated. + */ + readonly retrievalRole?: iam.IRole; +} + +export interface SourcedConfigurationProps extends ConfigurationProps { + /** + * The location where the configuration is stored. + */ + readonly location: ConfigurationSource; + + /** + * The version number of the sourced configuration to deploy. If this is not specified, + * then there will be no deployment. + * + * @default - None. + */ + readonly versionNumber?: string; + + /** + * The IAM role to retrieve the configuration. + * + * @default - A role is generated. + */ + readonly retrievalRole?: iam.IRole; +} + +export class SourcedConfiguration extends ConfigurationBase { + /** + * The location where the configuration is stored. + */ + public readonly location: ConfigurationSource; + + /** + * The version number of the configuration to deploy. + */ + public readonly versionNumber?: string; + + /** + * The IAM role to retrieve the configuration. + */ + public readonly retrievalRole?: iam.IRole; + + /** + * The key to decrypt the configuration if applicable. This key + * can be used when storing configuration in AWS Secrets Manager, Systems Manager Parameter Store, + * or Amazon S3. + */ + public readonly sourceKey?: kms.IKey; + + /** + * The ID of the configuration profile. + */ + public readonly configurationProfileId: string; + + /** + * The Amazon Resource Name (ARN) of the configuration profile. + */ + public readonly configurationProfileArn: string; + + private readonly locationUri: string; + private readonly _cfnConfigurationProfile: CfnConfigurationProfile; + + constructor (scope: Construct, id: string, props: SourcedConfigurationProps) { + super(scope, id, props); + + this.location = props.location; + this.locationUri = this.location.locationUri; + this.versionNumber = props.versionNumber; + this.sourceKey = this.location.key; + this.retrievalRole = props.retrievalRole || this.location.type != ConfigurationSourceType.CODE_PIPELINE + ? new iam.Role(this, 'Role', { + roleName: PhysicalName.GENERATE_IF_NEEDED, + assumedBy: new iam.ServicePrincipal('appconfig.amazonaws.com'), + inlinePolicies: { + ['AllowAppConfigReadFromSourcePolicy']: this.getPolicyForRole(), + }, + }) + : undefined; + + this._cfnConfigurationProfile = new CfnConfigurationProfile(this, 'Resource', { + applicationId: this.applicationId, + locationUri: this.locationUri, + name: this.name!, + description: this.description, + retrievalRoleArn: this.retrievalRole?.roleArn, + type: this.type, + validators: this.validators, + }); + + this.configurationProfileId = this._cfnConfigurationProfile.ref; + this.configurationProfileArn = Stack.of(this).formatArn({ + service: 'appconfig', + resource: 'application', + resourceName: `${this.applicationId}/configurationprofile/${this.configurationProfileId}`, + }); + this.extensible = new ExtensibleBase(scope, this.configurationProfileArn, this.name); + + this.addExistingEnvironmentsToApplication(); + this.deployConfigToEnvironments(); + } + + protected getDeploymentHash(environment: IEnvironment): string { + const combinedString = ` + ${this.application!.name!} + ${this.name!} + ${environment.name!} + ${this.versionNumber} + ${this.location.type} + `; + return getHash(combinedString); + } + + private getPolicyForRole(): iam.PolicyDocument { + const policy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + }); + const document = new iam.PolicyDocument({ + statements: [policy], + }); + + if (this.location.type == ConfigurationSourceType.SSM_PARAMETER) { + policy.addActions('ssm:GetParameter'); + policy.addResources(this.locationUri); + } else if (this.location.type == ConfigurationSourceType.SSM_DOCUMENT) { + policy.addActions('ssm:GetDocument'); + policy.addResources(Stack.of(this).formatArn({ + service: 'ssm', + resource: 'document', + resourceName: this.locationUri.split('://')[1], + })); + } else if (this.location.type == ConfigurationSourceType.S3) { + const bucketAndObjectKey = this.locationUri.split('://')[1]; + const sep = bucketAndObjectKey.search('/'); + const bucketName = bucketAndObjectKey.substring(0, sep); + const objectKey = bucketAndObjectKey.substring(sep + 1); + policy.addActions( + 's3:GetObject', + 's3:GetObjectMetadata', + 's3:GetObjectVersion', + ); + policy.addResources(Stack.of(this).formatArn({ + region: '', + account: '', + service: 's3', + arnFormat: ArnFormat.NO_RESOURCE_NAME, + resource: `${bucketName}/${objectKey}`, + })); + const bucketPolicy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + actions: [ + 's3:GetBucketLocation', + 's3:GetBucketVersioning', + 's3:ListBucket', + 's3:ListBucketVersions', + ], + resources: [ + Stack.of(this).formatArn({ + region: '', + account: '', + service: 's3', + arnFormat: ArnFormat.NO_RESOURCE_NAME, + resource: bucketName, + }), + ], + }); + const listBucketsPolicy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + actions: ['s3:ListAllMyBuckets'], + resources: ['*'], + }); + document.addStatements(bucketPolicy, listBucketsPolicy); + } else { + policy.addActions('secretsmanager:GetSecretValue'); + policy.addResources(this.locationUri); + } + + if (this.sourceKey) { + const keyPolicy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + actions: ['kms:Decrypt'], + resources: [this.sourceKey.keyArn], + }); + document.addStatements(keyPolicy); + } + + return document; + } +} + +/** + * The configuration type. + */ +export enum ConfigurationType { + FREEFORM = 'AWS.Freeform', + FEATURE_FLAGS = 'AWS.AppConfig.FeatureFlags', +} + +/** + * The validator type. + */ +export enum ValidatorType { + JSON_SCHEMA = 'JSON_SCHEMA', + LAMBDA = 'LAMBDA', +} + +/** + * The configuration source type. + */ +export enum ConfigurationSourceType { + S3 = 'S3', + SECRETS_MANAGER = 'SECRETS_MANAGER', + SSM_PARAMETER = 'SSM_PARAMETER', + SSM_DOCUMENT = 'SSM_DOCUMENT', + CODE_PIPELINE = 'CODE_PIPELINE' +} + +export interface IValidator { + /** + * The content of the validator. + */ + readonly content: string; + + /** + * The type of validator. + */ + readonly type: ValidatorType; +} + +/** + * Defines a JSON Schema validator. + */ +export abstract class JsonSchemaValidator implements IValidator { + /** + * Defines a JSON Schema validator from a file. + * + * @param path The path to the file that defines the validator + */ + public static fromFile(path: string): JsonSchemaValidator { + return { + content: fs.readFileSync(path).toString(), + type: ValidatorType.JSON_SCHEMA, + }; + } + + /** + * Defines a JSON Schema validator from inline code. + * + * @param code The inline code that defines the validator + */ + public static fromInline(code: string): JsonSchemaValidator { + return { + content: code, + type: ValidatorType.JSON_SCHEMA, + }; + } + + public abstract readonly content: string; + public abstract readonly type: ValidatorType; +} + +/** + * Defines an AWS Lambda validator. + */ +export abstract class LambdaValidator implements IValidator { + /** + * Defines an AWS Lambda validator from a Lambda function. This will call + * `addPermission` to your function to grant AWS AppConfig permissions. + * + * @param func The function that defines the validator + */ + public static fromFunction(func: lambda.Function): LambdaValidator { + if (!func.permissionsNode.tryFindChild('AppConfigPermission')) { + func.addPermission('AppConfigPermission', { + principal: new iam.ServicePrincipal('appconfig.amazonaws.com'), + }); + } + return { + content: func.functionArn, + type: ValidatorType.LAMBDA, + }; + } + + public abstract readonly content: string; + public abstract readonly type: ValidatorType; +} + +/** + * Defines the hosted configuration content. + */ +export abstract class ConfigurationContent { + /** + * Defines the hosted configuration content from a file. + * + * @param path The path to the file that defines configuration content + */ + public static fromFile(path: string): ConfigurationContent { + return { + content: fs.readFileSync(path).toString(), + }; + } + + /** + * Defines the hosted configuration content from inline code. + * + * @param content The inline code that defines the configuration content + */ + public static fromInline(content: string): ConfigurationContent { + return { + content, + }; + } + + /** + * The configuration content. + */ + public abstract readonly content: string; +} + +/** + * Defines the integrated configuration sources. + */ +export abstract class ConfigurationSource { + /** + * Defines configuration content from an Amazon S3 bucket. + * + * @param bucket The S3 bucket where the configuration is stored + * @param objectKey The path to the configuration + * @param key The KMS Key that the bucket is encrypted with + */ + public static fromBucket(bucket: s3.IBucket, objectKey: string, key?: kms.IKey): ConfigurationSource { + return { + locationUri: bucket.s3UrlForObject(objectKey), + type: ConfigurationSourceType.S3, + key, + }; + } + + /** + * Defines configuration content from an AWS Secrets Manager secret. + * + * @param secret The secret where the configuration is stored + */ + public static fromSecret(secret: sm.ISecret): ConfigurationSource { + return { + locationUri: secret.secretArn, + type: ConfigurationSourceType.SECRETS_MANAGER, + key: secret.encryptionKey, + }; + } + + /** + * Defines configuration content from a Systems Manager (SSM) Parameter Store parameter. + * + * @param parameter The parameter where the configuration is stored + * @param key The KMS Key that the secure string is encrypted with + */ + public static fromParameter(parameter: ssm.IParameter, key?: kms.IKey): ConfigurationSource { + return { + locationUri: parameter.parameterArn, + type: ConfigurationSourceType.SSM_PARAMETER, + key, + }; + } + + /** + * Defines configuration content from a Systems Manager (SSM) document. + * + * @param document The SSM document where the configuration is stored + */ + public static fromCfnDocument(document: ssm.CfnDocument): ConfigurationSource { + return { + locationUri: `ssm-document://${document.ref}`, + type: ConfigurationSourceType.SSM_DOCUMENT, + }; + } + + /** + * Defines configuration content from AWS CodePipeline. + * + * @param pipeline The pipeline where the configuration is stored + * @returns + */ + public static fromPipeline(pipeline: cp.IPipeline): ConfigurationSource { + return { + locationUri: `codepipeline://${pipeline.pipelineName}`, + type: ConfigurationSourceType.CODE_PIPELINE, + }; + } + + /** + * The URI of the configuration source. + */ + public abstract readonly locationUri: string; + + /** + * The type of the configuration source. + */ + public abstract readonly type: ConfigurationSourceType; + + /** + * The KMS Key that encrypts the configuration. + */ + public abstract readonly key?: kms.IKey; +} diff --git a/packages/@aws-cdk/aws-appconfig-alpha/lib/deployment-strategy.ts b/packages/@aws-cdk/aws-appconfig-alpha/lib/deployment-strategy.ts new file mode 100644 index 0000000000000..3bc454de41f91 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/lib/deployment-strategy.ts @@ -0,0 +1,318 @@ +import { Resource, IResource, Stack, ArnFormat, Names, Duration } from 'aws-cdk-lib'; +import { CfnDeploymentStrategy } from 'aws-cdk-lib/aws-appconfig'; +import { Construct } from 'constructs'; + +export interface DeploymentStrategyProps { + /** + * The rollout strategy for the deployment strategy. You can use predefined deployment + * strategies, such as RolloutStrategy.ALL_AT_ONCE, RolloutStrategy.LINEAR_50_PERCENT_EVERY_30_SECONDS, + * or RolloutStrategy.CANARY_10_PERCENT_20_MINUTES. + */ + readonly rolloutStrategy: RolloutStrategy; + + /** + * A name for the deployment strategy. + * + * @default - A name is generated. + */ + readonly name?: string; + + /** + * A description of the deployment strategy. + * + * @default - No description. + */ + readonly description?: string; +} + +/** + * An AWS AppConfig deployment strategy. + * + * @resource AWS::AppConfig::DeploymentStrategy + * @see https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-deployment-strategy.html + */ +export class DeploymentStrategy extends Resource implements IDeploymentStrategy { + /** + * Imports a deployment strategy into the CDK using its Amazon Resource Name (ARN). + * + * @param scope The parent construct + * @param id The name of the deployment strategy construct + * @param deploymentStrategyArn The Amazon Resource Name (ARN) of the deployment strategy + */ + public static fromDeploymentStrategyArn(scope: Construct, id: string, deploymentStrategyArn: string): IDeploymentStrategy { + const parsedArn = Stack.of(scope).splitArn(deploymentStrategyArn, ArnFormat.SLASH_RESOURCE_NAME); + const deploymentStrategyId = parsedArn.resourceName; + if (!deploymentStrategyId) { + throw new Error('Missing required deployment strategy id from deployment strategy ARN'); + } + + class Import extends Resource implements IDeploymentStrategy { + public readonly deploymentStrategyId = deploymentStrategyId!; + public readonly deploymentStrategyArn = deploymentStrategyArn; + } + + return new Import(scope, id, { + environmentFromArn: deploymentStrategyArn, + }); + } + + /** + * Imports a deployment strategy into the CDK using its ID. + * + * @param scope The parent construct + * @param id The name of the deployment strategy construct + * @param deploymentStrategyId The ID of the deployment strategy + */ + public static fromDeploymentStrategyId(scope: Construct, id: string, deploymentStrategyId: string): IDeploymentStrategy { + const stack = Stack.of(scope); + const deploymentStrategyArn = stack.formatArn({ + service: 'appconfig', + resource: 'deploymentstrategy', + resourceName: deploymentStrategyId, + }); + + class Import extends Resource implements IDeploymentStrategy { + public readonly deploymentStrategyId = deploymentStrategyId; + public readonly deploymentStrategyArn = deploymentStrategyArn; + } + + return new Import(scope, id, { + environmentFromArn: deploymentStrategyArn, + }); + } + + /** + * The name of the deployment strategy. + */ + public readonly name?: string; + + /** + * The deployment duration in minutes of the deployment strategy. + */ + public readonly deploymentDurationInMinutes?: number; + + /** + * The growth factor of the deployment strategy. + */ + public readonly growthFactor?: number; + + /** + * The description of the deployment strategy. + */ + public readonly description?: string; + + /** + * The final bake time in minutes of the deployment strategy. + */ + public readonly finalBakeTimeInMinutes?: number; + + /** + * The growth type of the deployment strategy. + */ + public readonly growthType?: GrowthType; + + /** + * The ID of the deployment strategy. + */ + public readonly deploymentStrategyId: string; + + /** + * The Amazon Resource Name (ARN) of the deployment strategy. + */ + public readonly deploymentStrategyArn: string; + + private readonly _cfnDeploymentStrategy: CfnDeploymentStrategy; + + constructor(scope: Construct, id: string, props: DeploymentStrategyProps) { + super(scope, id, { + physicalName: props.name, + }); + + this.deploymentDurationInMinutes = props.rolloutStrategy.deploymentDuration.toMinutes(); + this.growthFactor = props.rolloutStrategy.growthFactor; + this.description = props.description; + this.finalBakeTimeInMinutes = props.rolloutStrategy.finalBakeTime?.toMinutes(); + this.growthType = props.rolloutStrategy.growthType; + this.name = props.name || Names.uniqueResourceName(this, { + maxLength: 64, + separator: '-', + }); + + const resource = new CfnDeploymentStrategy(this, 'Resource', { + name: this.name, + deploymentDurationInMinutes: this.deploymentDurationInMinutes, + growthFactor: this.growthFactor, + replicateTo: 'NONE', + description: this.description, + finalBakeTimeInMinutes: this.finalBakeTimeInMinutes, + growthType: this.growthType, + }); + this._cfnDeploymentStrategy = resource; + + this.deploymentStrategyId = this._cfnDeploymentStrategy.ref; + this.deploymentStrategyArn = this.stack.formatArn({ + service: 'appconfig', + resource: 'deploymentstrategy', + resourceName: this.deploymentStrategyId, + }); + } +} + +/** + * Defines the growth type of the deployment strategy. + */ +export enum GrowthType { + LINEAR = 'LINEAR', + EXPONENTIAL = 'EXPONENTIAL', +} + +/** + * Defines the deployment strategy ID's of AWS AppConfig predefined strategies. + */ +export enum PredefinedDeploymentStrategyId { + CANARY_10_PERCENT_20_MINUTES = 'AppConfig.Canary10Percent20Minutes', + LINEAR_50_PERCENT_EVERY_30_SECONDS = 'AppConfig.Linear50PercentEvery30Seconds', + LINEAR_20_PERCENT_EVERY_6_MINUTES = 'AppConfig.Linear20PercentEvery6Minutes', + ALL_AT_ONCE = 'AppConfig.AllAtOnce', +} + +export interface RolloutStrategyProps { + /** + * The growth factor of the deployment strategy. This defines + * the percentage of targets to receive a deployed configuration + * during each interval. + */ + readonly growthFactor: number; + + /** + * The deployment duration of the deployment strategy. This defines + * the total amount of time for a deployment to last. + */ + readonly deploymentDuration: Duration; + + /** + * The final bake time of the deployment strategy. + * + * This setting specifies the amount of time AWS AppConfig monitors for Amazon + * CloudWatch alarms after the configuration has been deployed to + * 100% of its targets, before considering the deployment to be complete. + * If an alarm is triggered during this time, AWS AppConfig rolls back + * the deployment. + * + * @default Duration.minutes(0) + */ + readonly finalBakeTime?: Duration; +} + +/** + * Defines the rollout strategy for a deployment strategy and includes the growth factor, + * deployment duration, growth type, and optionally final bake time. + */ +export abstract class RolloutStrategy { + public static readonly CANARY_10_PERCENT_20_MINUTES = RolloutStrategy.exponential({ + growthFactor: 10, + deploymentDuration: Duration.minutes(20), + finalBakeTime: Duration.minutes(10), + }); + public static readonly LINEAR_50_PERCENT_EVERY_30_SECONDS = RolloutStrategy.linear({ + growthFactor: 50, + deploymentDuration: Duration.minutes(1), + finalBakeTime: Duration.minutes(1), + }); + public static readonly LINEAR_20_PERCENT_EVERY_6_MINUTES = RolloutStrategy.linear({ + growthFactor: 20, + deploymentDuration: Duration.minutes(30), + finalBakeTime: Duration.minutes(30), + }); + public static readonly ALL_AT_ONCE = RolloutStrategy.linear({ + growthFactor: 100, + deploymentDuration: Duration.minutes(0), + finalBakeTime: Duration.minutes(10), + }); + + /** + * @returns A linear rollout strategy. + */ + public static linear(props: RolloutStrategyProps): RolloutStrategy { + return { + growthFactor: props.growthFactor, + deploymentDuration: props.deploymentDuration, + growthType: GrowthType.LINEAR, + finalBakeTime: props.finalBakeTime, + }; + } + + /** + * @returns An exponential rollout strategy. + */ + public static exponential(props: RolloutStrategyProps): RolloutStrategy { + return { + growthFactor: props.growthFactor, + deploymentDuration: props.deploymentDuration, + growthType: GrowthType.EXPONENTIAL, + finalBakeTime: props.finalBakeTime, + }; + } + + /** + * The growth factor of the rollout strategy. + */ + public abstract readonly growthFactor: number; + + /** + * The deployment duration of the rollout strategy. + */ + public abstract readonly deploymentDuration: Duration; + + /** + * The growth type of the rollout strategy. + */ + public abstract readonly growthType?: GrowthType; + + /** + * The final bake time of the deployment strategy. + */ + public abstract readonly finalBakeTime?: Duration; +} + +export interface IDeploymentStrategy extends IResource { + /** + * The name of the deployment strategy. + */ + readonly name?: string; + + /** + * The deployment duration in minutes. + */ + readonly deploymentDurationInMinutes?: number; + + /** + * The growth factor of the deployment strategy. + */ + readonly growthFactor?: number; + + /** + * The description of the deployment strategy. + */ + readonly description?: string; + + /** + * The final bake time in minutes. + */ + readonly finalBakeTimeInMinutes?: number; + + /** + * The growth type of the deployment strategy. + */ + readonly growthType?: GrowthType; + + /** + * The ID of the deployment strategy. + */ + readonly deploymentStrategyId: string; + + /** + * The Amazon Resource Name (ARN) of the deployment strategy. + */ + readonly deploymentStrategyArn: string; +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/lib/environment.ts b/packages/@aws-cdk/aws-appconfig-alpha/lib/environment.ts new file mode 100644 index 0000000000000..cd59cfa4265a5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/lib/environment.ts @@ -0,0 +1,411 @@ +import { Resource, IResource, Stack, ArnFormat, PhysicalName, Names } from 'aws-cdk-lib'; +import { CfnEnvironment } from 'aws-cdk-lib/aws-appconfig'; +import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import { Construct } from 'constructs'; +import { IApplication } from './application'; +import { ActionPoint, IEventDestination, ExtensionOptions, IExtension, IExtensible, ExtensibleBase } from './extension'; + +/** + * Attributes of an existing AWS AppConfig environment to import it. + */ +export interface EnvironmentAttributes { + /** + * The application associated with the environment. + */ + readonly application: IApplication; + + /** + * The ID of the environment. + */ + readonly environmentId: string; + + /** + * The name of the environment. + */ + readonly name?: string; + + /** + * The description of the environment. + */ + readonly description?: string; + + /** + * The monitors for the environment. + */ + readonly monitors?: Monitor[]; +} + +abstract class EnvironmentBase extends Resource implements IEnvironment, IExtensible { + public abstract applicationId: string; + public abstract environmentId: string; + public abstract environmentArn: string; + protected extensible!: ExtensibleBase; + + public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.on(actionPoint, eventDestination, options); + } + + public preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.preCreateHostedConfigurationVersion(eventDestination, options); + } + + public preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.preStartDeployment(eventDestination, options); + } + + public onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentStart(eventDestination, options); + } + + public onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentStep(eventDestination, options); + } + + public onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentBaking(eventDestination, options); + } + + public onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentComplete(eventDestination, options); + } + + public onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.extensible.onDeploymentRolledBack(eventDestination, options); + } + + public addExtension(extension: IExtension) { + this.extensible.addExtension(extension); + } +} + +export interface EnvironmentOptions { + /** + * The name of the environment. + * + * @default - A name is generated. + */ + readonly name?: string; + + /** + * The description of the environment. + * + * @default - No description. + */ + readonly description?: string; + + /** + * The monitors for the environment. + * + * @default - No monitors. + */ + readonly monitors?: Monitor[]; +} + +export interface EnvironmentProps extends EnvironmentOptions { + /** + * The application to be associated with the environment. + */ + readonly application: IApplication; +} + +/** + * An AWS AppConfig environment. + * + * @resource AWS::AppConfig::Environment + * @see https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html + */ +export class Environment extends EnvironmentBase { + /** + * Imports an environment into the CDK using its Amazon Resource Name (ARN). + * + * @param scope The parent construct + * @param id The name of the environment construct + * @param environmentArn The Amazon Resource Name (ARN) of the environment + */ + public static fromEnvironmentArn(scope: Construct, id: string, environmentArn: string): IEnvironment { + const parsedArn = Stack.of(scope).splitArn(environmentArn, ArnFormat.SLASH_RESOURCE_NAME); + if (!parsedArn.resourceName) { + throw new Error(`Missing required /$/{applicationId}/environment//$/{environmentId} from environment ARN: ${parsedArn.resourceName}`); + } + + const resourceName = parsedArn.resourceName.split('/'); + if (resourceName.length != 3 || !resourceName[0] || !resourceName[2]) { + throw new Error('Missing required parameters for environment ARN: format should be /$/{applicationId}/environment//$/{environmentId}'); + } + + const applicationId = resourceName[0]; + const environmentId = resourceName[2]; + + class Import extends EnvironmentBase { + public readonly applicationId = applicationId; + public readonly environmentId = environmentId; + public readonly environmentArn = environmentArn; + } + + return new Import(scope, id, { + environmentFromArn: environmentArn, + }); + } + + /** + * Imports an environment into the CDK from its attributes. + * + * @param scope The parent construct + * @param id The name of the environment construct + * @param attr The attributes of the environment + */ + public static fromEnvironmentAttributes(scope: Construct, id: string, attr: EnvironmentAttributes): IEnvironment { + const applicationId = attr.application.applicationId; + const environmentId = attr.environmentId; + + const stack = Stack.of(scope); + const environmentArn = stack.formatArn({ + service: 'appconfig', + resource: 'application', + resourceName: `${applicationId}/environment/${environmentId}`, + }); + + class Import extends EnvironmentBase { + public readonly application = attr.application; + public readonly applicationId = attr.application.applicationId; + public readonly name = attr.name; + public readonly environmentId = environmentId; + public readonly environmentArn = environmentArn; + public readonly description = attr.description; + public readonly monitors = attr.monitors; + } + + return new Import(scope, id, { + environmentFromArn: environmentArn, + }); + } + + /** + * The application associated with the environment. + */ + public readonly application?: IApplication; + + /** + * The name of the environment. + */ + public readonly name?: string; + + /** + * The description of the environment. + */ + public readonly description?: string; + + /** + * The monitors for the environment. + */ + public readonly monitors?: Monitor[]; + + /** + * The ID of the environment. + */ + public readonly environmentId: string; + + /** + * The Amazon Resource Name (ARN) of the environment. + */ + public readonly environmentArn: string; + + /** + * The ID of the environment. + */ + public readonly applicationId: string; + + private readonly _cfnEnvironment: CfnEnvironment; + + constructor(scope: Construct, id: string, props: EnvironmentProps) { + super(scope, id, { + physicalName: props.name, + }); + + this.name = props.name || Names.uniqueResourceName(this, { + maxLength: 64, + separator: '-', + }); + this.application = props.application; + this.applicationId = this.application.applicationId; + this.description = props.description; + this.monitors = props.monitors; + + const resource = new CfnEnvironment(this, 'Resource', { + applicationId: this.applicationId, + name: this.name, + description: this.description, + monitors: this.monitors?.map((monitor) => { + return { + alarmArn: monitor.alarm.alarmArn, + alarmRoleArn: monitor.alarmRole?.roleArn || this.createAlarmRole(monitor.alarm.alarmArn).roleArn, + }; + }), + }); + this._cfnEnvironment = resource; + + this.environmentId = this._cfnEnvironment.ref; + this.environmentArn = this.stack.formatArn({ + service: 'appconfig', + resource: 'application', + resourceName: `${this.applicationId}/environment/${this.environmentId}`, + }); + this.extensible = new ExtensibleBase(scope, this.environmentArn, this.name); + + this.application.addExistingEnvironment(this); + } + + private createAlarmRole(alarmArn: string): iam.IRole { + const policy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + actions: ['cloudwatch:DescribeAlarms'], + resources: [alarmArn], + }); + const document = new iam.PolicyDocument({ + statements: [policy], + }); + const role = new iam.Role(this, 'Role', { + roleName: PhysicalName.GENERATE_IF_NEEDED, + assumedBy: new iam.ServicePrincipal('appconfig.amazonaws.com'), + inlinePolicies: { + ['AllowAppConfigMonitorAlarmPolicy']: document, + }, + }); + return role; + } +} + +/** + * Defines monitors that will be associated with an AWS AppConfig environment. + */ +export interface Monitor { + /** + * The Amazon CloudWatch alarm. + */ + readonly alarm: cloudwatch.IAlarm; + + /** + * The IAM role for AWS AppConfig to view the alarm state. + * + * @default - A role is generated. + */ + readonly alarmRole?: iam.IRole; +} + +export interface IEnvironment extends IResource { + /** + * The application associated with the environment. + */ + readonly application?: IApplication; + + /** + * The ID of the application associated to the environment. + */ + readonly applicationId: string; + + /** + * The name of the environment. + */ + readonly name?: string; + + /** + * The description of the environment. + */ + readonly description?: string; + + /** + * The monitors for the environment. + */ + readonly monitors?: Monitor[]; + + /** + * The ID of the environment. + */ + readonly environmentId: string; + + /** + * The Amazon Resource Name (ARN) of the environment. + */ + readonly environmentArn: string; + + /** + * Adds an extension defined by the action point and event destination and also + * creates an extension association to the environment. + * + * @param actionPoint The action point which triggers the event + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination + * and also creates an extension association to the environment. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates + * an extension association to the environment. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates + * an extension association to the environment. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also + * creates an extension association to the environment. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and + * also creates an extension association to the environment. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and + * also creates an extension association to the environment. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and + * also creates an extension association to the environment. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an extension association to the environment. + * + * @param extension The extension to create an association for + */ + addExtension(extension: IExtension): void; +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/lib/extension.ts b/packages/@aws-cdk/aws-appconfig-alpha/lib/extension.ts new file mode 100644 index 0000000000000..307f4537bd407 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/lib/extension.ts @@ -0,0 +1,758 @@ +import { ArnFormat, IResource, Names, PhysicalName, Resource, Stack } from 'aws-cdk-lib'; +import { CfnExtension, CfnExtensionAssociation } from 'aws-cdk-lib/aws-appconfig'; +import * as events from 'aws-cdk-lib/aws-events'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as sqs from 'aws-cdk-lib/aws-sqs'; +import { Construct } from 'constructs'; +import { getHash, stringifyObjects } from './private/hash'; + +/** + * Defines Extension action points. + * + * @see https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions-about.html#working-with-appconfig-extensions-how-it-works-step-2 + */ +export enum ActionPoint { + PRE_CREATE_HOSTED_CONFIGURATION_VERSION = 'PRE_CREATE_HOSTED_CONFIGURATION_VERSION', + PRE_START_DEPLOYMENT = 'PRE_START_DEPLOYMENT', + ON_DEPLOYMENT_START = 'ON_DEPLOYMENT_START', + ON_DEPLOYMENT_STEP = 'ON_DEPLOYMENT_STEP', + ON_DEPLOYMENT_BAKING = 'ON_DEPLOYMENT_BAKING', + ON_DEPLOYMENT_COMPLETE = 'ON_DEPLOYMENT_COMPLETE', + ON_DEPLOYMENT_ROLLED_BACK = 'ON_DEPLOYMENT_ROLLED_BACK', +} + +export enum SourceType { + LAMBDA = 'lambda', + SQS = 'sqs', + SNS = 'sns', + EVENTS = 'events', +} + +/** + * Implemented by allowed extension event destinations. + */ +export interface IEventDestination { + /** + * The URI of the extension event destination. + */ + readonly extensionUri: string; + + /** + * The type of the extension event destination. + */ + readonly type: SourceType; + + /** + * The IAM policy document to invoke the event destination. + */ + readonly policyDocument?: iam.PolicyDocument; +} + +/** + * Use an AWS Lambda function as an event destination. + */ +export class LambdaDestination implements IEventDestination { + public readonly extensionUri: string; + public readonly type: SourceType; + public readonly policyDocument?: iam.PolicyDocument; + + constructor(func: lambda.IFunction) { + this.extensionUri = func.functionArn; + this.type = SourceType.LAMBDA; + const policy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + resources: [this.extensionUri], + actions: [ + 'lambda:InvokeFunction', + 'lambda:InvokeAsync', + ], + }); + this.policyDocument = new iam.PolicyDocument({ + statements: [policy], + }); + } +} + +/** + * Use an Amazon SQS queue as an event destination. + */ +export class SqsDestination implements IEventDestination { + public readonly extensionUri: string; + public readonly type: SourceType; + public readonly policyDocument?: iam.PolicyDocument; + + constructor(queue: sqs.IQueue) { + this.extensionUri = queue.queueArn; + this.type = SourceType.SQS; + const policy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + resources: [this.extensionUri], + actions: ['sqs:SendMessage'], + }); + this.policyDocument = new iam.PolicyDocument({ + statements: [policy], + }); + } +} + +/** + * Use an Amazon SNS topic as an event destination. + */ +export class SnsDestination implements IEventDestination { + public readonly extensionUri: string; + public readonly type: SourceType; + public readonly policyDocument?: iam.PolicyDocument; + + constructor(topic: sns.ITopic) { + this.extensionUri = topic.topicArn; + this.type = SourceType.SNS; + const policy = new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + resources: [this.extensionUri], + actions: ['sns:Publish'], + }); + this.policyDocument = new iam.PolicyDocument({ + statements: [policy], + }); + } +} + +/** + * Use an Amazon EventBridge event bus as an event destination. + */ +export class EventBridgeDestination implements IEventDestination { + public readonly extensionUri: string; + public readonly type: SourceType; + + constructor(bus: events.IEventBus) { + this.extensionUri = bus.eventBusArn; + this.type = SourceType.EVENTS; + } +} + +export interface ActionProps { + /** + * The action points that will trigger the extension action. + */ + readonly actionPoints: ActionPoint[]; + + /** + * The event destination for the action. + */ + readonly eventDestination: IEventDestination; + + /** + * The name for the action. + * + * @default - A name is generated. + */ + readonly name?: string; + + /** + * The execution role for the action. + * + * @default - A role is generated. + */ + readonly executionRole?: iam.IRole; + + /** + * The description for the action. + * + * @default - No description. + */ + readonly description?: string; + + /** + * The flag that specifies whether or not to create the execution role. + * + * If set to true, then the role will not be auto-generated under the assumption + * there is already the corresponding resource-based policy attached to the event + * destination. If false, the execution role will be generated if not provided. + * + * @default false + */ + readonly invokeWithoutExecutionRole?: boolean; +} + +/** + * Defines an action for an extension. + */ +export class Action { + /** + * The action points that will trigger the extension action. + */ + public readonly actionPoints: ActionPoint[]; + + /** + * The event destination for the action. + */ + public readonly eventDestination: IEventDestination; + + /** + * The name for the action. + */ + public readonly name?: string; + + /** + * The execution role for the action. + */ + public readonly executionRole?: iam.IRole; + + /** + * The description for the action. + */ + public readonly description?: string; + + /** + * The flag that specifies whether to create the execution role. + */ + readonly invokeWithoutExecutionRole?: boolean; + + public constructor(props: ActionProps) { + this.actionPoints = props.actionPoints; + this.eventDestination = props.eventDestination; + this.name = props.name; + this.executionRole = props.executionRole; + this.description = props.description; + this.invokeWithoutExecutionRole = props.invokeWithoutExecutionRole || false; + } +} + +/** + * Defines a parameter for an extension. + */ +export class Parameter { + /** + * A required parameter for an extension. + * + * @param name The name of the parameter + * @param value The value of the parameter + * @param description A description for the parameter + */ + public static required(name: string, value: string, description?: string): Parameter { + return new Parameter(name, true, value, description); + } + + /** + * An optional parameter for an extension. + * + * @param name The name of the parameter + * @param value The value of the parameter + * @param description A description for the parameter + */ + public static notRequired(name: string, value?: string, description?: string): Parameter { + return new Parameter(name, false, value, description); + } + + /** + * The name of the parameter. + */ + public readonly name: string; + + /** + * A boolean that indicates if the parameter is required or optional. + */ + public readonly isRequired: boolean; + + /** + * The value of the parameter. + */ + public readonly value?: string; + + /** + * The description of the parameter. + */ + public readonly description?: string; + + private constructor(name: string, isRequired: boolean, value?: string, description?: string) { + this.name = name; + this.isRequired = isRequired; + this.value = value; + this.description = description; + } +} + +/** + * Attributes of an existing AWS AppConfig extension to import. + */ +export interface ExtensionAttributes { + /** + * The ID of the extension. + */ + readonly extensionId: string; + + /** + * The version number of the extension. + */ + readonly extensionVersionNumber: number; + + /** + * The Amazon Resource Name (ARN) of the extension. + */ + readonly extensionArn?: string; + + /** + * The actions of the extension. + */ + readonly actions?: Action[]; + + /** + * The name of the extension. + */ + readonly name?: string; + + /** + * The description of the extension. + */ + readonly description?: string; +} + +export interface ExtensionOptions { + /** + * The name of the extension. + * + * @default - A name is generated. + */ + readonly name?: string; + + /** + * A description of the extension + * + * @default - No description. + */ + readonly description?: string; + + /** + * The latest version number of the extension. When you create a new version, + * specify the most recent current version number. For example, you create version 3, + * enter 2 for this field. + * + * @default - None. + */ + readonly latestVersionNumber?: number; + + /** + * The parameters accepted for the extension. + * + * @default - None. + */ + readonly parameters?: Parameter[]; +} + +export interface ExtensionProps extends ExtensionOptions { + /** + * The actions for the extension. + */ + readonly actions: Action[]; +} + +/** + * An AWS AppConfig extension. + * + * @resource AWS::AppConfig::Extension + * @see https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions.html + */ +export class Extension extends Resource implements IExtension { + /** + * Imports an extension into the CDK using its Amazon Resource Name (ARN). + * + * @param scope The parent construct + * @param id The name of the extension construct + * @param extensionArn The Amazon Resource Name (ARN) of the extension + */ + public static fromExtensionArn(scope: Construct, id: string, extensionArn: string): IExtension { + const parsedArn = Stack.of(scope).splitArn(extensionArn, ArnFormat.SLASH_RESOURCE_NAME); + if (!parsedArn.resourceName) { + throw new Error(`Missing required /$/{extensionId}//$/{extensionVersionNumber} from configuration profile ARN: ${parsedArn.resourceName}`); + } + + const resourceName = parsedArn.resourceName.split('/'); + if (resourceName.length != 2 || !resourceName[0] || !resourceName[1]) { + throw new Error('Missing required parameters for extension ARN: format should be /$/{extensionId}//$/{extensionVersionNumber}'); + } + + const extensionId = resourceName[0]; + const extensionVersionNumber = resourceName[1]; + + class Import extends Resource implements IExtension { + public readonly extensionId = extensionId; + public readonly extensionVersionNumber = parseInt(extensionVersionNumber); + public readonly extensionArn = extensionArn; + } + + return new Import(scope, id, { + environmentFromArn: extensionArn, + }); + } + + /** + * Imports an extension into the CDK using its attributes. + * + * @param scope The parent construct + * @param id The name of the extension construct + * @param attr The attributes of the extension + */ + public static fromExtensionAttributes(scope: Construct, id: string, attr: ExtensionAttributes): IExtension { + const stack = Stack.of(scope); + const extensionArn = attr.extensionArn || stack.formatArn({ + service: 'appconfig', + resource: 'extension', + resourceName: `${attr.extensionId}/${attr.extensionVersionNumber}`, + }); + + class Import extends Resource implements IExtension { + public readonly extensionId = attr.extensionId; + public readonly extensionVersionNumber = attr.extensionVersionNumber; + public readonly extensionArn = extensionArn; + public readonly name = attr.name; + public readonly actions = attr.actions; + public readonly description = attr.description; + } + + return new Import(scope, id, { + environmentFromArn: extensionArn, + }); + } + + /** + * The actions for the extension. + */ + public readonly actions?: Action[]; + + /** + * The name of the extension. + */ + public readonly name?: string; + + /** + * The description of the extension. + */ + public readonly description?: string; + + /** + * The latest version number of the extension. + */ + public readonly latestVersionNumber?: number; + + /** + * The parameters of the extension. + */ + public readonly parameters?: Parameter[]; + + /** + * The Amazon Resource Name (ARN) of the extension. + */ + public readonly extensionArn: string; + + /** + * The ID of the extension. + */ + public readonly extensionId: string; + + /** + * The version number of the extension. + */ + public readonly extensionVersionNumber: number; + + private readonly _cfnExtension: CfnExtension; + private executionRole?: iam.IRole; + + constructor(scope: Construct, id: string, props: ExtensionProps) { + super(scope, id, { + physicalName: props.name, + }); + + this.actions = props.actions; + this.name = props.name || Names.uniqueResourceName(this, { + maxLength: 64, + separator: '-', + }); + this.description = props.description; + this.latestVersionNumber = props.latestVersionNumber; + this.parameters = props.parameters; + + const resource = new CfnExtension(this, 'Resource', { + actions: this.actions.reduce((acc: {[key: string]: {[key: string]: string}[]}, cur: Action) => { + const extensionUri = cur.eventDestination.extensionUri; + const sourceType = cur.eventDestination.type; + this.executionRole = cur.executionRole; + cur.actionPoints.forEach((actionPoint) => { + acc[actionPoint] = [ + { + Name: cur.name || Names.uniqueResourceName(this, { + maxLength: 64, + separator: '-', + }), + Uri: extensionUri, + ...(sourceType === SourceType.EVENTS || cur.invokeWithoutExecutionRole + ? {} + : { RoleArn: this.executionRole?.roleArn || this.getExecutionRole(cur.eventDestination).roleArn }), + ...(cur.description ? { Description: cur.description } : {}), + }, + ]; + }); + return acc; + }, {}), + name: this.name, + description: this.description, + latestVersionNumber: this.latestVersionNumber, + parameters: this.parameters?.reduce((acc: {[key: string]: CfnExtension.ParameterProperty}, cur: Parameter) => { + acc[cur.name] = { + required: cur.isRequired, + description: cur.description, + }; + return acc; + }, {}), + }); + this._cfnExtension = resource; + + this.extensionId = this._cfnExtension.attrId; + this.extensionVersionNumber = this._cfnExtension.attrVersionNumber; + this.extensionArn = this.getResourceArnAttribute(this._cfnExtension.attrArn, { + service: 'appconfig', + resource: 'extension', + resourceName: `${this.extensionId}/${this.extensionVersionNumber}`, + }); + } + + private getExecutionRole(eventDestination: IEventDestination): iam.IRole { + this.executionRole = new iam.Role(this, `Role${getHash(eventDestination.extensionUri)}`, { + roleName: PhysicalName.GENERATE_IF_NEEDED, + assumedBy: new iam.ServicePrincipal('appconfig.amazonaws.com'), + inlinePolicies: { + ['AllowAppConfigInvokeExtensionEventSourcePolicy']: eventDestination.policyDocument!, + }, + }); + + return this.executionRole; + } +} + +export interface IExtension extends IResource { + /** + * The actions for the extension. + */ + readonly actions?: Action[]; + + /** + * The name of the extension. + */ + readonly name?: string; + + /** + * The description of the extension. + */ + readonly description?: string; + + /** + * The latest version number of the extension. + */ + readonly latestVersionNumber?: number; + + /** + * The parameters of the extension. + */ + readonly parameters?: Parameter[]; + + /** + * The Amazon Resource Name (ARN) of the extension. + */ + readonly extensionArn: string; + + /** + * The ID of the extension. + */ + readonly extensionId: string; + + /** + * The version number of the extension. + */ + readonly extensionVersionNumber: number; +} + +/** + * This class is meant to be used by AWS AppConfig resources (application, + * configuration profile, environment) directly. There is currently no use + * for this class outside of the AWS AppConfig construct implementation. It is + * intended to be used with the resources since there is currently no way to + * inherit from two classes (at least within JSII constraints). + */ +export class ExtensibleBase implements IExtensible { + private resourceArn: string; + private resourceName?: string; + private scope: Construct; + + public constructor(scope: Construct, resourceArn: string, resourceName?: string) { + this.resourceArn = resourceArn; + this.resourceName = resourceName; + this.scope = scope; + } + + public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, actionPoint, options); + } + + public preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, ActionPoint.PRE_CREATE_HOSTED_CONFIGURATION_VERSION, options); + } + + public preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, ActionPoint.PRE_START_DEPLOYMENT, options); + } + + public onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, ActionPoint.ON_DEPLOYMENT_START, options); + } + + public onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, ActionPoint.ON_DEPLOYMENT_STEP, options); + } + + public onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, ActionPoint.ON_DEPLOYMENT_BAKING, options); + } + + public onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, ActionPoint.ON_DEPLOYMENT_COMPLETE, options); + } + + public onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions) { + this.getExtensionForActionPoint(eventDestination, ActionPoint.ON_DEPLOYMENT_ROLLED_BACK, options); + } + + public addExtension(extension: IExtension) { + this.addExtensionAssociation(extension, { + parameters: extension.parameters, + }); + } + + private getExtensionForActionPoint(eventDestination: IEventDestination, actionPoint: ActionPoint, options?: ExtensionOptions) { + const extension = new Extension(this.scope, `Extension${this.getExtensionHash(eventDestination, actionPoint, options)}`, { + actions: [ + new Action({ + eventDestination, + actionPoints: [ + actionPoint, + ], + }), + ], + ...(options?.description ? { description: options.description } : {}), + ...(options?.latestVersionNumber ? { latestVersionNumber: options.latestVersionNumber } : {}), + ...(options?.name ? { name: options.name } : {}), + ...(options?.parameters ? { parameters: options.parameters } : {}), + }); + this.addExtensionAssociation(extension, options); + } + + private addExtensionAssociation(extension: IExtension, options?: ExtensionOptions) { + new CfnExtensionAssociation(this.scope, `AssociationResource${this.getExtensionAssociationHash(extension)}`, { + extensionIdentifier: extension.extensionId, + resourceIdentifier: this.resourceArn, + extensionVersionNumber: extension.extensionVersionNumber, + parameters: options?.parameters?.reduce((acc: {[key: string]: string}, cur: Parameter) => { + if (cur.value) { + acc[cur.name] = cur.value; + } + return acc; + }, {}), + }); + } + + private getExtensionHash(eventDestination: IEventDestination, actionPoint: ActionPoint, options?: ExtensionOptions) { + const combinedString = stringifyObjects(eventDestination, actionPoint, options); + return getHash(combinedString); + } + + private getExtensionAssociationHash(extension: IExtension) { + const resourceIdentifier = this.resourceName ? this.resourceName : this.resourceArn; + const combinedString = stringifyObjects(resourceIdentifier, extension.name, extension.extensionVersionNumber); + return getHash(combinedString); + } +} + +/** + * Defines the extensible base implementation for extension association resources. + */ +export interface IExtensible { + /** + * Adds an extension defined by the action point and event destination and + * also creates an extension association to the derived resource. + * + * @param actionPoint The action point which triggers the event + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event + * destination and also creates an extension association to the derived resource. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds a PRE_START_DEPLOYMENT extension with the provided event destination and + * also creates an extension association to the derived resource. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_START extension with the provided event destination and + * also creates an extension association to the derived resource. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and + * also creates an extension association to the derived resource. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and + * also creates an extension association to the derived resource. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and + * also creates an extension association to the derived resource. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and + * also creates an extension association to the derived resource. + * + * @param eventDestination The event that occurs during the extension + * @param options Options for the extension + */ + onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void; + + /** + * Adds an extension association to the derived resource. + * + * @param extension The extension to create an association for + */ + addExtension(extension: IExtension): void; +} diff --git a/packages/@aws-cdk/aws-appconfig-alpha/lib/index.ts b/packages/@aws-cdk/aws-appconfig-alpha/lib/index.ts new file mode 100644 index 0000000000000..33118b5873456 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/lib/index.ts @@ -0,0 +1,5 @@ +export * from './environment'; +export * from './deployment-strategy'; +export * from './extension'; +export * from './application'; +export * from './configuration'; diff --git a/packages/@aws-cdk/aws-appconfig-alpha/lib/private/hash.ts b/packages/@aws-cdk/aws-appconfig-alpha/lib/private/hash.ts new file mode 100644 index 0000000000000..c496ea174cee2 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/lib/private/hash.ts @@ -0,0 +1,12 @@ +import * as crypto from 'crypto'; + +export function getHash(stringToHash: string): string { + const hash = crypto.createHash('sha256').update(stringToHash).digest('hex'); + const truncatedHash = hash.substring(0, 5).toUpperCase(); + return truncatedHash; +} + +export function stringifyObjects(...objects: any[]): string { + const combinedObject = Object.assign({}, ...objects); + return JSON.stringify(combinedObject); +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/package.json b/packages/@aws-cdk/aws-appconfig-alpha/package.json new file mode 100644 index 0000000000000..0c6b1342a7064 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/package.json @@ -0,0 +1,119 @@ +{ + "name": "@aws-cdk/aws-appconfig-alpha", + "private": false, + "version": "0.0.0", + "description": "An experimental construct library for AWS AppConfig.", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.AppConfig.Alpha", + "packageId": "Amazon.CDK.AWS.AppConfig.Alpha", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.appconfig.alpha", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "appconfig-alpha" + } + }, + "python": { + "distName": "aws-cdk.aws-appconfig-alpha", + "module": "aws_cdk.aws_appconfig_alpha", + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 2" + ] + }, + "go": { + "moduleName": "github.com/aws/aws-cdk-go", + "packageName": "awscdkappconfigalpha" + } + }, + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-appconfig-alpha" + }, + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "integ-runner", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "appconfig" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "aws-cdk-lib": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@aws-cdk/integ-tests-alpha": "0.0.0", + "@types/jest": "^29.5.3", + "constructs": "^10.0.0", + "jest": "^29.6.2" + }, + "dependencies": { + "aws-cdk-lib": "0.0.0", + "constructs": "^10.0.0" + }, + "homepage": "https://github.com/aws/aws-cdk", + "peerDependencies": { + "aws-cdk-lib": "0.0.0", + "constructs": "^10.0.0" + }, + "separate-module": false, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "experimental", + "awslint": { + "exclude": [ + "*:*" + ] + }, + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "cdk-build": { + "env": { + "AWSLINT_BASE_CONSTRUCT": true + } + } +} diff --git a/packages/@aws-cdk/aws-appconfig-alpha/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-appconfig-alpha/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..088052b1423f5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/rosetta/default.ts-fixture @@ -0,0 +1,21 @@ +// Fixture with packages imported, but nothing else +import { Construct } from 'constructs'; +import { Stack, Duration } from 'aws-cdk-lib'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as appconfig from '@aws-cdk/aws-appconfig-alpha'; +import * as s3 from 'aws-cdk-lib/aws-s3'; +import * as ssm from 'aws-cdk-lib/aws-ssm'; +import * as secrets from 'aws-cdk-lib/aws-secretsmanager'; +import * as sqs from 'aws-cdk-lib/aws-sqs'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; +import * as events from 'aws-cdk-lib/aws-events'; +import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + + /// here + } +} diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/application.test.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/application.test.ts new file mode 100644 index 0000000000000..a94427b770681 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/application.test.ts @@ -0,0 +1,531 @@ +import * as cdk from 'aws-cdk-lib'; +import { Template } from 'aws-cdk-lib/assertions'; +import { FargateTaskDefinition } from 'aws-cdk-lib/aws-ecs'; +import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda'; +import { + Application, + Platform, + LambdaDestination, + Parameter, + ActionPoint, +} from '../lib'; + +describe('appconfig', () => { + test('basic appconfig', () => { + const stack = new cdk.Stack(); + new Application(stack, 'MyAppConfig'); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Application', { + Name: 'MyAppConfig', + }); + }); + + test('appconfig with name', () => { + const stack = new cdk.Stack(); + new Application(stack, 'MyAppConfig', { + name: 'TestApp', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Application', { + Name: 'TestApp', + }); + }); + + test('appconfig with description', () => { + const stack = new cdk.Stack(); + new Application(stack, 'MyAppConfig', { + description: 'This is my description', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Application', { + Name: 'MyAppConfig', + Description: 'This is my description', + }); + }); + + test('get lambda layer arn', () => { + expect(Application.getLambdaLayerVersionArn('us-east-1')).toEqual('arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension:110'); + expect(Application.getLambdaLayerVersionArn('us-east-1', Platform.ARM_64)).toEqual('arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension-Arm64:43'); + }); + + test('add agent to ecs', () => { + const stack = new cdk.Stack(); + const taskDef = new FargateTaskDefinition(stack, 'TaskDef'); + Application.addAgentToEcs(taskDef); + + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + Image: 'public.ecr.aws/aws-appconfig/aws-appconfig-agent:latest', + Name: 'AppConfigAgentContainer', + Essential: true, + }, + ], + }); + }); + + test('pre create hosted configuration version', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.on(ActionPoint.ON_DEPLOYMENT_STEP, new LambdaDestination(func)); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'Extension28486', + Actions: { + ON_DEPLOYMENT_STEP: [ + { + Name: 'Extension28486', + RoleArn: { 'Fn::GetAtt': ['Extension28486RoleFD36712B5D791', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['Extension28486EB468E25', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['Extension28486EB468E25', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('pre create hosted configuration version', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.preCreateHostedConfigurationVersion(new LambdaDestination(func), { + description: 'This is my description', + name: 'MyExtension', + latestVersionNumber: 1, + parameters: [ + Parameter.required('myparam', 'val'), + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Description: 'This is my description', + LatestVersionNumber: 1, + Actions: { + PRE_CREATE_HOSTED_CONFIGURATION_VERSION: [ + { + Name: 'Extension8D9D7', + RoleArn: { 'Fn::GetAtt': ['Extension8D9D7RoleFD367F4FA01C5', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + Parameters: { + myparam: { Required: true }, + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['Extension8D9D75657615A', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['Extension8D9D75657615A', 'VersionNumber'], + }, + Parameters: { + myparam: 'val', + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('pre start deployment', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.preStartDeployment(new LambdaDestination(func)); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'Extension6253E', + Actions: { + PRE_START_DEPLOYMENT: [ + { + Name: 'Extension6253E', + RoleArn: { 'Fn::GetAtt': ['Extension6253ERoleFD367F586E17D', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['Extension6253ED4CE66CE', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['Extension6253ED4CE66CE', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('on deployment start', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + Object.defineProperty(appconfig, 'applicationArn', { + value: 'arn:aws:appconfig:us-east-1:123456789012:application/abc123', + }); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.onDeploymentStart(new LambdaDestination(func)); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'ExtensionB65DC', + Actions: { + ON_DEPLOYMENT_START: [ + { + Name: 'ExtensionB65DC', + RoleArn: { 'Fn::GetAtt': ['ExtensionB65DCRoleFD3677AFA6FE0', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['ExtensionB65DC00D22C6E', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['ExtensionB65DC00D22C6E', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('on deployment step', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.onDeploymentStep(new LambdaDestination(func)); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'Extension28486', + Actions: { + ON_DEPLOYMENT_STEP: [ + { + Name: 'Extension28486', + RoleArn: { 'Fn::GetAtt': ['Extension28486RoleFD36712B5D791', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['Extension28486EB468E25', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['Extension28486EB468E25', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('on deployment complete', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.onDeploymentComplete(new LambdaDestination(func)); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'Extension32166', + Actions: { + ON_DEPLOYMENT_COMPLETE: [ + { + Name: 'Extension32166', + RoleArn: { 'Fn::GetAtt': ['Extension32166RoleFD367EE1FF117', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['Extension32166E58405A0', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['Extension32166E58405A0', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('on deployment bake', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.onDeploymentBaking(new LambdaDestination(func)); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'Extension1CAD4', + Actions: { + ON_DEPLOYMENT_BAKING: [ + { + Name: 'Extension1CAD4', + RoleArn: { 'Fn::GetAtt': ['Extension1CAD4RoleFD367FC09E8DE', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['Extension1CAD47F07C609', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['Extension1CAD47F07C609', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('on deployment rolled back', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.onDeploymentRolledBack(new LambdaDestination(func)); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'ExtensionC8347', + Actions: { + ON_DEPLOYMENT_ROLLED_BACK: [ + { + Name: 'ExtensionC8347', + RoleArn: { 'Fn::GetAtt': ['ExtensionC8347RoleFD36716A1DE61', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['ExtensionC83470CE85F6C', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['ExtensionC83470CE85F6C', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyAppConfigB4B63E75' }, + ], + ], + }, + }); + }); + + test('create same extension twice', () => { + const stack = new cdk.Stack(); + const appconfig = new Application(stack, 'MyAppConfig'); + const func = new Function(stack, 'MyFunc', { + handler: 'index.handler', + runtime: Runtime.PYTHON_3_7, + code: Code.fromInline('# this is my code'), + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + appconfig.preStartDeployment(new LambdaDestination(func)); + + expect(() => { + appconfig.preStartDeployment(new LambdaDestination(func)); + }).toThrow(); + }); + + test('from application arn', () => { + const stack = new cdk.Stack(); + const app = Application.fromApplicationArn(stack, 'Application', + 'arn:aws:appconfig:us-west-2:123456789012:application/abc123'); + + expect(app.applicationId).toEqual('abc123'); + }); + + test('from application arn with no resource name', () => { + const stack = new cdk.Stack(); + expect(() => { + Application.fromApplicationArn(stack, 'Application', + 'arn:aws:appconfig:us-west-2:123456789012:application/'); + }).toThrow('Missing required application id from application ARN'); + }); + + test('from application id', () => { + const cdkApp = new cdk.App(); + const stack = new cdk.Stack(cdkApp, 'Stack', { + env: { + region: 'us-west-2', + account: '123456789012', + }, + }); + const app = Application.fromApplicationId(stack, 'Application', 'abc123'); + + expect(app.applicationId).toEqual('abc123'); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/config.json b/packages/@aws-cdk/aws-appconfig-alpha/test/config.json new file mode 100644 index 0000000000000..5c2ecbd6e6cf7 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/config.json @@ -0,0 +1,3 @@ +{ + "content": "This is the configuration content" +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/configuration.test.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/configuration.test.ts new file mode 100644 index 0000000000000..6022720431473 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/configuration.test.ts @@ -0,0 +1,1162 @@ +import * as cdk from 'aws-cdk-lib'; +import { Template } from 'aws-cdk-lib/assertions'; +import { Artifact, Pipeline } from 'aws-cdk-lib/aws-codepipeline'; +import { S3DeployAction, S3SourceAction } from 'aws-cdk-lib/aws-codepipeline-actions'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import { Key } from 'aws-cdk-lib/aws-kms'; +import { Bucket } from 'aws-cdk-lib/aws-s3'; +import { Secret } from 'aws-cdk-lib/aws-secretsmanager'; +import { CfnDocument, StringParameter } from 'aws-cdk-lib/aws-ssm'; +import { + Application, + HostedConfiguration, + ConfigurationSource, + SourcedConfiguration, + DeploymentStrategy, + ConfigurationType, + ValidatorType, + JsonSchemaValidator, + ConfigurationContent, + RolloutStrategy, +} from '../lib'; + +describe('configuration', () => { + test('configuration with no environments and no deployTo prop', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new HostedConfiguration(stack, 'MyHostedConfig', { + content: ConfigurationContent.fromInline('This is my content'), + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Environment', { + Name: 'MyAppConfig-Environment-CF46384A', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'MyHostedConfig', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyHostedConfigConfigurationProfile2E1A2BBC', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Deployment', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + EnvironmentId: { + Ref: 'MyAppConfigEnvironment833A9182', + }, + ConfigurationVersion: { + Ref: 'MyHostedConfig51D3877D', + }, + ConfigurationProfileId: { + Ref: 'MyHostedConfigConfigurationProfile2E1A2BBC', + }, + DeploymentStrategyId: { + Ref: 'MyDeploymentStrategy60D31FB0', + }, + }); + }); + + test('configuration with environments and no deployTo prop', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig', { + name: 'MyApplication', + }); + app.addEnvironment('MyEnv1'); + app.addEnvironment('MyEnv2'); + new HostedConfiguration(stack, 'MyHostedConfig', { + content: ConfigurationContent.fromInline('This is my content'), + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'MyHostedConfig', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyHostedConfigConfigurationProfile2E1A2BBC', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Environment', 2); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 0); + }); + + test('configuration with environments and deployTo prop', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig', { + name: 'MyApplication', + }); + app.addEnvironment('MyEnv1'); + const env = app.addEnvironment('MyEnv2'); + new HostedConfiguration(stack, 'MyHostedConfig', { + content: ConfigurationContent.fromInline('This is my content'), + application: app, + deployTo: [env], + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'MyHostedConfig', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyHostedConfigConfigurationProfile2E1A2BBC', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Deployment', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + EnvironmentId: { + Ref: 'MyAppConfigMyEnv2350437D6', + }, + ConfigurationVersion: { + Ref: 'MyHostedConfig51D3877D', + }, + ConfigurationProfileId: { + Ref: 'MyHostedConfigConfigurationProfile2E1A2BBC', + }, + DeploymentStrategyId: { + Ref: 'MyDeploymentStrategy60D31FB0', + }, + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Environment', 2); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration with two configurations specified', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig', { + name: 'MyApplication', + }); + const env1 = app.addEnvironment('MyEnv1'); + const env2 = app.addEnvironment('MyEnv2'); + const bucket = new Bucket(stack, 'MyBucket'); + new HostedConfiguration(stack, 'MyHostedConfig', { + content: ConfigurationContent.fromInline('This is my content'), + application: app, + deployTo: [env1], + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy1', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + new SourcedConfiguration(stack, 'MySourcedConfig', { + versionNumber: '1', + location: ConfigurationSource.fromBucket(bucket, 'path/to/object'), + application: app, + deployTo: [env2], + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy2', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'MyHostedConfig', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: 'hosted', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyHostedConfigConfigurationProfile2E1A2BBC', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'MySourcedConfig', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: { + 'Fn::Join': [ + '', + [ + 's3://', + { Ref: 'MyBucketF68F3FF0' }, + '/path/to/object', + ], + ], + }, + RetrievalRoleArn: { 'Fn::GetAtt': ['MySourcedConfigRole249449B1', 'Arn'] }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyDeploymentStrategy1', + DeploymentDurationInMinutes: 30, + GrowthFactor: 15, + ReplicateTo: 'NONE', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyDeploymentStrategy2', + DeploymentDurationInMinutes: 30, + GrowthFactor: 15, + ReplicateTo: 'NONE', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Deployment', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + EnvironmentId: { + Ref: 'MyAppConfigMyEnv1B9120FA1', + }, + ConfigurationVersion: { + Ref: 'MyHostedConfig51D3877D', + }, + ConfigurationProfileId: { + Ref: 'MyHostedConfigConfigurationProfile2E1A2BBC', + }, + DeploymentStrategyId: { + Ref: 'MyDeploymentStrategy178099446', + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Deployment', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + EnvironmentId: { + Ref: 'MyAppConfigMyEnv2350437D6', + }, + ConfigurationVersion: '1', + ConfigurationProfileId: { + Ref: 'MySourcedConfig5455C47C', + }, + DeploymentStrategyId: { + Ref: 'MyDeploymentStrategy202B80715', + }, + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::ConfigurationProfile', 2); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Environment', 2); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 2); + }); + + test('configuration with two configurations and no deployment strategy specified', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig', { + name: 'MyApplication', + }); + const bucket = new Bucket(stack, 'MyBucket'); + new HostedConfiguration(stack, 'MyHostedConfig', { + content: ConfigurationContent.fromInline('This is my content'), + application: app, + }); + new SourcedConfiguration(stack, 'MySourcedConfig', { + versionNumber: '1', + location: ConfigurationSource.fromBucket(bucket, 'path/to/object'), + application: app, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyHostedConfig-DeploymentStrategy-A5936E60', + DeploymentDurationInMinutes: 20, + GrowthFactor: 10, + ReplicateTo: 'NONE', + FinalBakeTimeInMinutes: 10, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MySourcedConfig-DeploymentStrategy-7A104657', + DeploymentDurationInMinutes: 20, + GrowthFactor: 10, + ReplicateTo: 'NONE', + FinalBakeTimeInMinutes: 10, + }); + }); + + test('deploy secret with kms key', () => { + const stack = new cdk.Stack(); + const key = new Key(stack, 'MyKey'); + const secret = new Secret(stack, 'MySecret'); + const app = new Application(stack, 'MyAppConfig'); + new SourcedConfiguration(stack, 'MySourcedConfig', { + versionNumber: '1', + location: ConfigurationSource.fromSecret(secret), + deploymentKey: key, + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Deployment', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + EnvironmentId: { + Ref: 'MyAppConfigEnvironment833A9182', + }, + ConfigurationVersion: '1', + ConfigurationProfileId: { + Ref: 'MySourcedConfig5455C47C', + }, + DeploymentStrategyId: { + Ref: 'MyDeploymentStrategy60D31FB0', + }, + KmsKeyIdentifier: { 'Fn::GetAtt': ['MyKey6AB29FA6', 'Arn'] }, + }); + }); + + test('default configuration from inline', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new HostedConfiguration(stack, 'MyConfiguration', { + application: app, + content: ConfigurationContent.fromInline('This is my content'), + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'MyConfiguration', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: 'hosted', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyConfigurationConfigurationProfileEE0ECA85', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + // test('default configuration from asset', () => { + // const stack = new cdk.Stack(); + // const app = new AppConfig(stack, 'MyAppConfig', { + // deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + // rolloutStrategy: RolloutStrategy.linear(15, cdk.Duration.minutes(30)), + // }), + // }); + // new HostedConfiguration(stack, 'MyConfiguration', { + // appConfig: app, + // content: ConfigurationContent.fromAsset('/Users/chenjane/Documents/appconfig-l2-constructs/test/config.json'), + // }); + + // Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + // Name: 'MyConfiguration', + // ApplicationId: { + // Ref: 'MyAppConfigB4B63E75', + // }, + // LocationUri: 'hosted', + // }); + // Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + // ApplicationId: { + // Ref: 'MyAppConfigB4B63E75', + // }, + // ConfigurationProfileId: { + // Ref: 'MyConfigurationConfigurationProfileEE0ECA85', + // }, + // Content: '{\n "content": "This is the configuration content"\n}', + // ContentType: 'application/json', + // }); + // }); + + test('configuration profile with name', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new HostedConfiguration(stack, 'MyConfigurationProfile', { + name: 'TestConfigProfile', + application: app, + content: ConfigurationContent.fromInline('This is my content'), + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: 'hosted', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyConfigurationProfile33A97163', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with type', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new HostedConfiguration(stack, 'MyConfigurationProfile', { + name: 'TestConfigProfile', + application: app, + type: ConfigurationType.FEATURE_FLAGS, + content: ConfigurationContent.fromInline('This is my content'), + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + Type: 'AWS.AppConfig.FeatureFlags', + LocationUri: 'hosted', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyConfigurationProfile33A97163', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with description', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new HostedConfiguration(stack, 'MyConfigurationProfile', { + name: 'TestConfigProfile', + application: app, + content: ConfigurationContent.fromInline('This is my content'), + description: 'This is my description', + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + Description: 'This is my description', + LocationUri: 'hosted', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyConfigurationProfile33A97163', + }, + Content: 'This is my content', + ContentType: 'application/json', + Description: 'This is my description', + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with validator', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new HostedConfiguration(stack, 'MyConfigurationProfile', { + name: 'TestConfigProfile', + application: app, + content: ConfigurationContent.fromInline('This is my content'), + validators: [ + { + content: 'dummy validator', + type: ValidatorType.JSON_SCHEMA, + }, + ], + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + Validators: [ + { + Type: 'JSON_SCHEMA', + Content: 'dummy validator', + }, + ], + LocationUri: 'hosted', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyConfigurationProfile33A97163', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with inline json schema validator', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + const validatorContent = ` + { + "type": "object", + "properties": { + "computeResource": { + "type": "object", + "properties": { + "ComputeAL1ImageId": { + "type": "object", + "properties": { + "me-south-1": { "type": "string" }, + "ap-east-1": { "type": "string" }, + "ap-northeast-1": { "type": "string" }, + "ap-northeast-2": { "type": "string" }, + "ap-south-1": { "type": "string" }, + "ap-southeast-1": { "type": "string" }, + "ap-southeast-2": { "type": "string" }, + "ca-central-1": { "type": "string" }, + "cn-north-1": { "type": "string" }, + "cn-northwest-1": { "type": "string" }, + "eu-central-1": { "type": "string" }, + "eu-north-1": { "type": "string" }, + "eu-west-1": { "type": "string" }, + "eu-west-2": { "type": "string" }, + "eu-west-3": { "type": "string" }, + "sa-east-1": { "type": "string" }, + "us-east-1": { "type": "string" }, + "us-east-2": { "type": "string" }, + "us-gov-west-1": { "type": "string" }, + "us-gov-east-1": { "type": "string" }, + "us-west-1": { "type": "string" }, + "us-west-2": { "type": "string" }, + "eu-south-1": { "type": "string" }, + "ap-northeast-3": { "type": "string" }, + "af-south-1": { "type": "string" } + } + }, + "GPUImageId": { + "type": "object", + "properties": { + "me-south-1": { "type": "string" }, + "ap-east-1": { "type": "string" }, + "ap-northeast-1": { "type": "string" }, + "ap-northeast-2": { "type": "string" }, + "ap-south-1": { "type": "string" }, + "ap-southeast-1": { "type": "string" }, + "ap-southeast-2": { "type": "string" }, + "ca-central-1": { "type": "string" }, + "cn-north-1": { "type": "string" }, + "cn-northwest-1": { "type": "string" }, + "eu-central-1": { "type": "string" }, + "eu-north-1": { "type": "string" }, + "eu-west-1": { "type": "string" }, + "eu-west-2": { "type": "string" }, + "eu-west-3": { "type": "string" }, + "sa-east-1": { "type": "string" }, + "us-east-1": { "type": "string" }, + "us-east-2": { "type": "string" }, + "us-gov-west-1": { "type": "string" }, + "us-gov-east-1": { "type": "string" }, + "us-west-1": { "type": "string" }, + "us-west-2": { "type": "string" }, + "eu-south-1": { "type": "string" }, + "ap-northeast-3": { "type": "string" }, + "af-south-1": { "type": "string" } + } + }, + "ARMImageId": { + "type": "object", + "properties": { + "me-south-1": { "type": "string" }, + "ap-east-1": { "type": "string" }, + "ap-northeast-1": { "type": "string" }, + "ap-northeast-2": { "type": "string" }, + "ap-south-1": { "type": "string" }, + "ap-southeast-1": { "type": "string" }, + "ap-southeast-2": { "type": "string" }, + "ca-central-1": { "type": "string" }, + "cn-north-1": { "type": "string" }, + "cn-northwest-1": { "type": "string" }, + "eu-central-1": { "type": "string" }, + "eu-north-1": { "type": "string" }, + "eu-west-1": { "type": "string" }, + "eu-west-2": { "type": "string" }, + "eu-west-3": { "type": "string" }, + "sa-east-1": { "type": "string" }, + "us-east-1": { "type": "string" }, + "us-east-2": { "type": "string" }, + "us-gov-west-1": { "type": "string" }, + "us-gov-east-1": { "type": "string" }, + "us-west-1": { "type": "string" }, + "us-west-2": { "type": "string" }, + "eu-south-1": { "type": "string" }, + "ap-northeast-3": { "type": "string" }, + "af-south-1": { "type": "string" } + } + }, + "ComputeAL2ImageId": { + "type": "object", + "properties": { + "me-south-1": { "type": "string" }, + "ap-east-1": { "type": "string" }, + "ap-northeast-1": { "type": "string" }, + "ap-northeast-2": { "type": "string" }, + "ap-south-1": { "type": "string" }, + "ap-southeast-1": { "type": "string" }, + "ap-southeast-2": { "type": "string" }, + "ca-central-1": { "type": "string" }, + "cn-north-1": { "type": "string" }, + "cn-northwest-1": { "type": "string" }, + "eu-central-1": { "type": "string" }, + "eu-north-1": { "type": "string" }, + "eu-west-1": { "type": "string" }, + "eu-west-2": { "type": "string" }, + "eu-west-3": { "type": "string" }, + "sa-east-1": { "type": "string" }, + "us-east-1": { "type": "string" }, + "us-east-2": { "type": "string" }, + "us-gov-west-1": { "type": "string" }, + "us-gov-east-1": { "type": "string" }, + "us-west-1": { "type": "string" }, + "us-west-2": { "type": "string" }, + "eu-south-1": { "type": "string" }, + "ap-northeast-3": { "type": "string" }, + "af-south-1": { "type": "string" } + } + } + } + } + } + }`; + new HostedConfiguration(stack, 'MyConfiguration', { + name: 'TestConfigProfile', + application: app, + validators: [ + JsonSchemaValidator.fromInline(validatorContent), + ], + content: ConfigurationContent.fromInline('This is my content'), + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + Validators: [ + { + Type: 'JSON_SCHEMA', + Content: '\n {\n \"type\": \"object\",\n \"properties\": {\n \"computeResource\": {\n \"type\": \"object\",\n \"properties\": {\n \"ComputeAL1ImageId\": {\n \"type\": \"object\",\n \"properties\": {\n \"me-south-1\": { \"type\": \"string\" },\n \"ap-east-1\": { \"type\": \"string\" },\n \"ap-northeast-1\": { \"type\": \"string\" },\n \"ap-northeast-2\": { \"type\": \"string\" },\n \"ap-south-1\": { \"type\": \"string\" },\n \"ap-southeast-1\": { \"type\": \"string\" },\n \"ap-southeast-2\": { \"type\": \"string\" },\n \"ca-central-1\": { \"type\": \"string\" },\n \"cn-north-1\": { \"type\": \"string\" },\n \"cn-northwest-1\": { \"type\": \"string\" },\n \"eu-central-1\": { \"type\": \"string\" },\n \"eu-north-1\": { \"type\": \"string\" },\n \"eu-west-1\": { \"type\": \"string\" },\n \"eu-west-2\": { \"type\": \"string\" },\n \"eu-west-3\": { \"type\": \"string\" },\n \"sa-east-1\": { \"type\": \"string\" },\n \"us-east-1\": { \"type\": \"string\" },\n \"us-east-2\": { \"type\": \"string\" },\n \"us-gov-west-1\": { \"type\": \"string\" },\n \"us-gov-east-1\": { \"type\": \"string\" },\n \"us-west-1\": { \"type\": \"string\" },\n \"us-west-2\": { \"type\": \"string\" },\n \"eu-south-1\": { \"type\": \"string\" },\n \"ap-northeast-3\": { \"type\": \"string\" },\n \"af-south-1\": { \"type\": \"string\" }\n }\n },\n \"GPUImageId\": {\n \"type\": \"object\",\n \"properties\": {\n \"me-south-1\": { \"type\": \"string\" },\n \"ap-east-1\": { \"type\": \"string\" },\n \"ap-northeast-1\": { \"type\": \"string\" },\n \"ap-northeast-2\": { \"type\": \"string\" },\n \"ap-south-1\": { \"type\": \"string\" },\n \"ap-southeast-1\": { \"type\": \"string\" },\n \"ap-southeast-2\": { \"type\": \"string\" },\n \"ca-central-1\": { \"type\": \"string\" },\n \"cn-north-1\": { \"type\": \"string\" },\n \"cn-northwest-1\": { \"type\": \"string\" },\n \"eu-central-1\": { \"type\": \"string\" },\n \"eu-north-1\": { \"type\": \"string\" },\n \"eu-west-1\": { \"type\": \"string\" },\n \"eu-west-2\": { \"type\": \"string\" },\n \"eu-west-3\": { \"type\": \"string\" },\n \"sa-east-1\": { \"type\": \"string\" },\n \"us-east-1\": { \"type\": \"string\" },\n \"us-east-2\": { \"type\": \"string\" },\n \"us-gov-west-1\": { \"type\": \"string\" },\n \"us-gov-east-1\": { \"type\": \"string\" },\n \"us-west-1\": { \"type\": \"string\" },\n \"us-west-2\": { \"type\": \"string\" },\n \"eu-south-1\": { \"type\": \"string\" },\n \"ap-northeast-3\": { \"type\": \"string\" },\n \"af-south-1\": { \"type\": \"string\" }\n }\n },\n \"ARMImageId\": {\n \"type\": \"object\",\n \"properties\": {\n \"me-south-1\": { \"type\": \"string\" },\n \"ap-east-1\": { \"type\": \"string\" },\n \"ap-northeast-1\": { \"type\": \"string\" },\n \"ap-northeast-2\": { \"type\": \"string\" },\n \"ap-south-1\": { \"type\": \"string\" },\n \"ap-southeast-1\": { \"type\": \"string\" },\n \"ap-southeast-2\": { \"type\": \"string\" },\n \"ca-central-1\": { \"type\": \"string\" },\n \"cn-north-1\": { \"type\": \"string\" },\n \"cn-northwest-1\": { \"type\": \"string\" },\n \"eu-central-1\": { \"type\": \"string\" },\n \"eu-north-1\": { \"type\": \"string\" },\n \"eu-west-1\": { \"type\": \"string\" },\n \"eu-west-2\": { \"type\": \"string\" },\n \"eu-west-3\": { \"type\": \"string\" },\n \"sa-east-1\": { \"type\": \"string\" },\n \"us-east-1\": { \"type\": \"string\" },\n \"us-east-2\": { \"type\": \"string\" },\n \"us-gov-west-1\": { \"type\": \"string\" },\n \"us-gov-east-1\": { \"type\": \"string\" },\n \"us-west-1\": { \"type\": \"string\" },\n \"us-west-2\": { \"type\": \"string\" },\n \"eu-south-1\": { \"type\": \"string\" },\n \"ap-northeast-3\": { \"type\": \"string\" },\n \"af-south-1\": { \"type\": \"string\" }\n }\n },\n \"ComputeAL2ImageId\": {\n \"type\": \"object\",\n \"properties\": {\n \"me-south-1\": { \"type\": \"string\" },\n \"ap-east-1\": { \"type\": \"string\" },\n \"ap-northeast-1\": { \"type\": \"string\" },\n \"ap-northeast-2\": { \"type\": \"string\" },\n \"ap-south-1\": { \"type\": \"string\" },\n \"ap-southeast-1\": { \"type\": \"string\" },\n \"ap-southeast-2\": { \"type\": \"string\" },\n \"ca-central-1\": { \"type\": \"string\" },\n \"cn-north-1\": { \"type\": \"string\" },\n \"cn-northwest-1\": { \"type\": \"string\" },\n \"eu-central-1\": { \"type\": \"string\" },\n \"eu-north-1\": { \"type\": \"string\" },\n \"eu-west-1\": { \"type\": \"string\" },\n \"eu-west-2\": { \"type\": \"string\" },\n \"eu-west-3\": { \"type\": \"string\" },\n \"sa-east-1\": { \"type\": \"string\" },\n \"us-east-1\": { \"type\": \"string\" },\n \"us-east-2\": { \"type\": \"string\" },\n \"us-gov-west-1\": { \"type\": \"string\" },\n \"us-gov-east-1\": { \"type\": \"string\" },\n \"us-west-1\": { \"type\": \"string\" },\n \"us-west-2\": { \"type\": \"string\" },\n \"eu-south-1\": { \"type\": \"string\" },\n \"ap-northeast-3\": { \"type\": \"string\" },\n \"af-south-1\": { \"type\": \"string\" }\n }\n }\n }\n }\n }\n }', + }, + ], + LocationUri: 'hosted', + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::HostedConfigurationVersion', { + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + ConfigurationProfileId: { + Ref: 'MyConfigurationConfigurationProfileEE0ECA85', + }, + Content: 'This is my content', + ContentType: 'application/json', + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with ssm parameter', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + const parameter = new StringParameter(stack, 'MyParameter', { + stringValue: 'This is the content stored in ssm parameter', + parameterName: 'my-parameter', + }); + new SourcedConfiguration(stack, 'MyConfiguration', { + name: 'TestConfigProfile', + location: ConfigurationSource.fromParameter(parameter), + versionNumber: '1', + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':ssm:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':parameter/', + { Ref: 'MyParameter18BA547D' }, + ], + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: iam.Effect.ALLOW, + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':ssm:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':parameter/', + { Ref: 'MyParameter18BA547D' }, + ], + ], + }, + Action: 'ssm:GetParameter', + }, + ], + }, + PolicyName: 'AllowAppConfigReadFromSourcePolicy', + }, + ], + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with ssm document', () => { + const stack = new cdk.Stack(); + const document = new CfnDocument(stack, 'MyDocument', { + content: { + mainSteps: [ + { + action: 'aws:runShellScript', + }, + ], + }, + name: 'TestDocumentName', + }); + const app = new Application(stack, 'MyAppConfig'); + new SourcedConfiguration(stack, 'MyConfiguration', { + name: 'TestConfigProfile', + location: ConfigurationSource.fromCfnDocument(document), + versionNumber: '1', + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: { + 'Fn::Join': [ + '', + [ + 'ssm-document://', + { Ref: 'MyDocument' }, + ], + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: iam.Effect.ALLOW, + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':ssm:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':document/', + { Ref: 'MyDocument' }, + ], + ], + }, + Action: 'ssm:GetDocument', + }, + ], + }, + PolicyName: 'AllowAppConfigReadFromSourcePolicy', + }, + ], + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with s3 object', () => { + const stack = new cdk.Stack(); + const bucket = new Bucket(stack, 'MyBucket', { + bucketName: 'bucket', + }); + const app = new Application(stack, 'MyAppConfig'); + new SourcedConfiguration(stack, 'MyConfiguration', { + name: 'TestConfigProfile', + location: ConfigurationSource.fromBucket(bucket, 'hello/file.txt'), + versionNumber: '1', + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: { + 'Fn::Join': [ + '', + [ + 's3://', + { Ref: 'MyBucketF68F3FF0' }, + '/hello/file.txt', + ], + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: iam.Effect.ALLOW, + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':s3:::', + { Ref: 'MyBucketF68F3FF0' }, + '/hello/file.txt', + ], + ], + }, + Action: [ + 's3:GetObject', + 's3:GetObjectMetadata', + 's3:GetObjectVersion', + ], + }, + { + Effect: iam.Effect.ALLOW, + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':s3:::', + { Ref: 'MyBucketF68F3FF0' }, + ], + ], + }, + Action: [ + 's3:GetBucketLocation', + 's3:GetBucketVersioning', + 's3:ListBucket', + 's3:ListBucketVersions', + ], + }, + { + Effect: iam.Effect.ALLOW, + Resource: '*', + Action: 's3:ListAllMyBuckets', + }, + ], + }, + PolicyName: 'AllowAppConfigReadFromSourcePolicy', + }, + ], + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with codepipeline', () => { + const stack = new cdk.Stack(); + const bucket = new Bucket(stack, 'MyBucket'); + const sourceAction = new S3SourceAction({ + actionName: 'Source', + bucket: bucket, + bucketKey: 'hello/world/codepipeline.txt', + output: new Artifact('SourceOutput'), + }); + const deployAction = new S3DeployAction({ + actionName: 'Deploy', + input: Artifact.artifact('SourceOutput'), + bucket: bucket, + extract: true, + }); + const pipeline = new Pipeline(stack, 'MyPipeline', { + stages: [ + { + stageName: 'beta', + actions: [sourceAction], + }, + { + stageName: 'prod', + actions: [deployAction], + }, + ], + }); + const app = new Application(stack, 'MyAppConfig'); + new SourcedConfiguration(stack, 'MyConfiguration', { + name: 'TestConfigProfile', + location: ConfigurationSource.fromPipeline(pipeline), + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: { + 'Fn::Join': [ + '', + [ + 'codepipeline://', + { Ref: 'MyPipelineAED38ECF' }, + ], + ], + }, + }); + + Template.fromStack(stack).resourceCountIs('AWS::IAM::Role', 3); + Template.fromStack(stack).resourceCountIs('AWS::IAM::Policy', 3); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 0); + }); + + test('configuration profile with secretsmanager', () => { + const stack = new cdk.Stack(); + const secret = new Secret(stack, 'MySecret', { + secretStringValue: cdk.SecretValue.unsafePlainText('This is the content stored in secrets manager'), + secretName: 'secret', + }); + Object.defineProperty(secret, 'secretArn', { + value: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret', + }); + const app = new Application(stack, 'MyAppConfig'); + new SourcedConfiguration(stack, 'MyConfiguration', { + name: 'TestConfigProfile', + location: ConfigurationSource.fromSecret(secret), + versionNumber: '1', + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret', + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: iam.Effect.ALLOW, + Resource: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret', + Action: 'secretsmanager:GetSecretValue', + }, + ], + }, + PolicyName: 'AllowAppConfigReadFromSourcePolicy', + }, + ], + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); + + test('configuration profile with secretsmanager and kms', () => { + const stack = new cdk.Stack(); + const key = new Key(stack, 'MyKey'); + const secret = new Secret(stack, 'MySecret', { + secretStringValue: cdk.SecretValue.unsafePlainText('This is the content stored in secrets manager'), + secretName: 'secret', + encryptionKey: key, + }); + Object.defineProperty(secret, 'secretArn', { + value: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret', + }); + const app = new Application(stack, 'MyAppConfig'); + new SourcedConfiguration(stack, 'MyConfiguration', { + name: 'TestConfigProfile', + location: ConfigurationSource.fromSecret(secret), + versionNumber: '1', + application: app, + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: cdk.Duration.minutes(30), + }), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ConfigurationProfile', { + Name: 'TestConfigProfile', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + LocationUri: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret', + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: iam.Effect.ALLOW, + Resource: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret', + Action: 'secretsmanager:GetSecretValue', + }, + { + Effect: iam.Effect.ALLOW, + Resource: { + 'Fn::GetAtt': ['MyKey6AB29FA6', 'Arn'], + }, + Action: 'kms:Decrypt', + }, + ], + }, + PolicyName: 'AllowAppConfigReadFromSourcePolicy', + }, + ], + }); + Template.fromStack(stack).resourceCountIs('AWS::AppConfig::Deployment', 1); + }); +}); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/deployment-strategy.test.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/deployment-strategy.test.ts new file mode 100644 index 0000000000000..14e4e1875af25 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/deployment-strategy.test.ts @@ -0,0 +1,284 @@ +import * as cdk from 'aws-cdk-lib'; +import { App } from 'aws-cdk-lib'; +import { Template } from 'aws-cdk-lib/assertions'; +import { DeploymentStrategy, PredefinedDeploymentStrategyId, RolloutStrategy } from '../lib'; + +describe('deployment strategy', () => { + test('default deployment strategy', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 10, + deploymentDuration: cdk.Duration.minutes(10), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyDeploymentStrategy', + DeploymentDurationInMinutes: 10, + GrowthFactor: 10, + ReplicateTo: 'NONE', + GrowthType: 'LINEAR', + }); + }); + + test('deployment strategy with name', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + name: 'TestDeploymentStrategy', + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 10, + deploymentDuration: cdk.Duration.minutes(10), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'TestDeploymentStrategy', + DeploymentDurationInMinutes: 10, + GrowthFactor: 10, + ReplicateTo: 'NONE', + GrowthType: 'LINEAR', + }); + }); + + test('deployment strategy duration in seconds', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + name: 'TestDeploymentStrategy', + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 10, + deploymentDuration: cdk.Duration.seconds(120), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'TestDeploymentStrategy', + DeploymentDurationInMinutes: 2, + GrowthFactor: 10, + ReplicateTo: 'NONE', + GrowthType: 'LINEAR', + }); + }); + + test('deployment strategy with description', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + name: 'TestDeploymentStrategy', + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 10, + deploymentDuration: cdk.Duration.minutes(10), + }), + description: 'This is my description', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'TestDeploymentStrategy', + DeploymentDurationInMinutes: 10, + GrowthFactor: 10, + ReplicateTo: 'NONE', + Description: 'This is my description', + GrowthType: 'LINEAR', + }); + }); + + test('deployment strategy with final bake time', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + name: 'TestDeploymentStrategy', + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 10, + deploymentDuration: cdk.Duration.minutes(10), + finalBakeTime: cdk.Duration.minutes(30), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'TestDeploymentStrategy', + DeploymentDurationInMinutes: 10, + GrowthFactor: 10, + ReplicateTo: 'NONE', + FinalBakeTimeInMinutes: 30, + GrowthType: 'LINEAR', + }); + }); + + test('deployment strategy with growth type', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + name: 'TestDeploymentStrategy', + rolloutStrategy: RolloutStrategy.exponential({ + growthFactor: 10, + deploymentDuration: cdk.Duration.minutes(10), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'TestDeploymentStrategy', + DeploymentDurationInMinutes: 10, + GrowthFactor: 10, + ReplicateTo: 'NONE', + GrowthType: 'EXPONENTIAL', + }); + }); + + test('deployment strategy with replicate to', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + name: 'TestDeploymentStrategy', + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 10, + deploymentDuration: cdk.Duration.minutes(10), + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'TestDeploymentStrategy', + DeploymentDurationInMinutes: 10, + GrowthFactor: 10, + ReplicateTo: 'NONE', + GrowthType: 'LINEAR', + }); + }); + + test('from deployment strategy arn', () => { + const stack = new cdk.Stack(); + const deploymentStrategy = DeploymentStrategy.fromDeploymentStrategyArn(stack, 'MyDeploymentStrategy', + 'arn:aws:appconfig:us-west-2:123456789012:deploymentstrategy/abc123'); + + expect(deploymentStrategy.deploymentStrategyId).toEqual('abc123'); + expect(deploymentStrategy.env.account).toEqual('123456789012'); + expect(deploymentStrategy.env.region).toEqual('us-west-2'); + }); + + test('from deployment strategy arn with no resource name', () => { + const stack = new cdk.Stack(); + expect(() => { + DeploymentStrategy.fromDeploymentStrategyArn(stack, 'MyDeploymentStrategy', + 'arn:aws:appconfig:us-west-2:123456789012:deploymentstrategy/'); + }).toThrow('Missing required deployment strategy id from deployment strategy ARN'); + }); + + test('from deployment strategy id', () => { + const cdkApp = new App(); + const stack = new cdk.Stack(cdkApp, 'Stack', { + env: { + region: 'us-west-2', + account: '123456789012', + }, + }); + const deploymentStrategy = DeploymentStrategy.fromDeploymentStrategyId(stack, 'MyDeploymentStrategy', 'abc123'); + + expect(deploymentStrategy.deploymentStrategyId).toEqual('abc123'); + expect(deploymentStrategy.env.account).toEqual('123456789012'); + expect(deploymentStrategy.env.region).toEqual('us-west-2'); + }); + + test('from predefined all at once deployment strategy id', () => { + const cdkApp = new App(); + const stack = new cdk.Stack(cdkApp, 'Stack', { + env: { + region: 'us-west-2', + account: '123456789012', + }, + }); + const deploymentStrategy = DeploymentStrategy.fromDeploymentStrategyId(stack, 'MyDeploymentStrategy', PredefinedDeploymentStrategyId.ALL_AT_ONCE); + + expect(deploymentStrategy.deploymentStrategyId).toEqual('AppConfig.AllAtOnce'); + expect(deploymentStrategy.env.account).toEqual('123456789012'); + expect(deploymentStrategy.env.region).toEqual('us-west-2'); + }); + + test('from predefined canary deployment strategy id', () => { + const cdkApp = new App(); + const stack = new cdk.Stack(cdkApp, 'Stack', { + env: { + region: 'us-west-2', + account: '123456789012', + }, + }); + const deploymentStrategy = DeploymentStrategy.fromDeploymentStrategyId(stack, 'MyDeploymentStrategy', PredefinedDeploymentStrategyId.CANARY_10_PERCENT_20_MINUTES); + + expect(deploymentStrategy.deploymentStrategyId).toEqual('AppConfig.Canary10Percent20Minutes'); + expect(deploymentStrategy.env.account).toEqual('123456789012'); + expect(deploymentStrategy.env.region).toEqual('us-west-2'); + }); + + test('from predefined linear deployment strategy id', () => { + const cdkApp = new App(); + const stack = new cdk.Stack(cdkApp, 'Stack', { + env: { + region: 'us-west-2', + account: '123456789012', + }, + }); + const deploymentStrategy = DeploymentStrategy.fromDeploymentStrategyId(stack, 'MyDeploymentStrategy', PredefinedDeploymentStrategyId.LINEAR_50_PERCENT_EVERY_30_SECONDS); + + expect(deploymentStrategy.deploymentStrategyId).toEqual('AppConfig.Linear50PercentEvery30Seconds'); + expect(deploymentStrategy.env.account).toEqual('123456789012'); + expect(deploymentStrategy.env.region).toEqual('us-west-2'); + }); + + test('all at once deployment strategy with no bake time', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.ALL_AT_ONCE, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyDeploymentStrategy', + DeploymentDurationInMinutes: 0, + GrowthFactor: 100, + FinalBakeTimeInMinutes: 10, + ReplicateTo: 'NONE', + GrowthType: 'LINEAR', + }); + }); + + test('all at once deployment strategy with bake time', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.ALL_AT_ONCE, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyDeploymentStrategy', + DeploymentDurationInMinutes: 0, + GrowthFactor: 100, + FinalBakeTimeInMinutes: 10, + ReplicateTo: 'NONE', + GrowthType: 'LINEAR', + }); + }); + + test('canary deployment strategy with no bake time', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.CANARY_10_PERCENT_20_MINUTES, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyDeploymentStrategy', + DeploymentDurationInMinutes: 20, + GrowthFactor: 10, + FinalBakeTimeInMinutes: 10, + ReplicateTo: 'NONE', + GrowthType: 'EXPONENTIAL', + }); + }); + + test('linear deployment strategy with no bake time', () => { + const stack = new cdk.Stack(); + new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.LINEAR_50_PERCENT_EVERY_30_SECONDS, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::DeploymentStrategy', { + Name: 'MyDeploymentStrategy', + DeploymentDurationInMinutes: 1, + GrowthFactor: 50, + FinalBakeTimeInMinutes: 1, + ReplicateTo: 'NONE', + GrowthType: 'LINEAR', + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/environment.test.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/environment.test.ts new file mode 100644 index 0000000000000..e0950fa0ed564 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/environment.test.ts @@ -0,0 +1,242 @@ +import * as cdk from 'aws-cdk-lib'; +import { App } from 'aws-cdk-lib'; +import { Template } from 'aws-cdk-lib/assertions'; +import { Alarm, Metric } from 'aws-cdk-lib/aws-cloudwatch'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import { Application, Environment } from '../lib'; + +describe('environment', () => { + test('default environment', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new Environment(stack, 'MyEnvironment', { + application: app, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Environment', { + Name: 'MyEnvironment', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + }); + }); + + test('environment with name', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new Environment(stack, 'MyEnvironment', { + name: 'TestEnv', + application: app, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Environment', { + Name: 'TestEnv', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + }); + }); + + test('environment with description', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + new Environment(stack, 'MyEnvironment', { + name: 'TestEnv', + application: app, + description: 'This is my description', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Environment', { + Name: 'TestEnv', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + Description: 'This is my description', + }); + }); + + test('environment with monitors with alarm and alarmRole', () => { + const stack = new cdk.Stack(); + const app = new Application(stack, 'MyAppConfig'); + const env = new Environment(stack, 'MyEnvironment', { + name: 'TestEnv', + application: app, + monitors: [ + { + alarm: new Alarm(stack, 'Alarm', { + threshold: 5, + evaluationPeriods: 5, + metric: new Metric( + { + namespace: 'aws', + metricName: 'myMetric', + }, + ), + }), + alarmRole: new iam.Role(stack, 'Role', { + assumedBy: new iam.ServicePrincipal('appconfig.amazonaws.com'), + }), + }, + ], + }); + + Template.fromStack(stack).resourceCountIs('AWS::CloudWatch::Alarm', 1); + Template.fromStack(stack).resourceCountIs('AWS::IAM::Role', 1); + expect(env).toBeDefined(); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Environment', { + Name: 'TestEnv', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + Monitors: [ + { + AlarmArn: { + 'Fn::GetAtt': [ + 'Alarm7103F465', + 'Arn', + ], + }, + AlarmRoleArn: { + 'Fn::GetAtt': [ + 'Role1ABCC5F0', + 'Arn', + ], + }, + }, + ], + }); + }); + + test('environment with monitors with only alarm', () => { + const stack = new cdk.Stack(); + const alarm = new Alarm(stack, 'Alarm', { + threshold: 5, + evaluationPeriods: 5, + metric: new Metric( + { + namespace: 'aws', + metricName: 'myMetric', + }, + ), + }); + const app = new Application(stack, 'MyAppConfig'); + const env = new Environment(stack, 'MyEnvironment', { + name: 'TestEnv', + application: app, + monitors: [ + { + alarm, + }, + ], + }); + + expect(env).toBeDefined(); + Template.fromStack(stack).resourceCountIs('AWS::CloudWatch::Alarm', 1); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Environment', { + Name: 'TestEnv', + ApplicationId: { + Ref: 'MyAppConfigB4B63E75', + }, + Monitors: [ + { + AlarmArn: { + 'Fn::GetAtt': [ + 'Alarm7103F465', + 'Arn', + ], + }, + AlarmRoleArn: { + 'Fn::GetAtt': [ + 'MyEnvironmentRoleC08961D3', + 'Arn', + ], + }, + }, + ], + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: iam.Effect.ALLOW, + Resource: { + 'Fn::GetAtt': [ + 'Alarm7103F465', + 'Arn', + ], + }, + Action: 'cloudwatch:DescribeAlarms', + }, + ], + }, + PolicyName: 'AllowAppConfigMonitorAlarmPolicy', + }, + ], + }); + }); + + test('from environment arn', () => { + const stack = new cdk.Stack(); + const env = Environment.fromEnvironmentArn(stack, 'MyEnvironment', + 'arn:aws:appconfig:us-west-2:123456789012:application/abc123/environment/def456'); + + expect(env.applicationId).toEqual('abc123'); + expect(env.environmentId).toEqual('def456'); + expect(env.env.account).toEqual('123456789012'); + expect(env.env.region).toEqual('us-west-2'); + }); + + test('from environment arn with no resource name', () => { + const stack = new cdk.Stack(); + expect(() => { + Environment.fromEnvironmentArn(stack, 'MyEnvironment', + 'arn:aws:appconfig:us-west-2:123456789012:application/'); + }).toThrow('Missing required /$/{applicationId}/environment//$/{environmentId} from environment ARN:'); + }); + + test('from environment arn with missing slash', () => { + const stack = new cdk.Stack(); + expect(() => { + Environment.fromEnvironmentArn(stack, 'MyEnvironment', + 'arn:aws:appconfig:us-west-2:123456789012:application/abc123environment/def456'); + }).toThrow('Missing required parameters for environment ARN: format should be /$/{applicationId}/environment//$/{environmentId}'); + }); + + test('from environment arn with no application id', () => { + const stack = new cdk.Stack(); + expect(() => { + Environment.fromEnvironmentArn(stack, 'MyEnvironment', + 'arn:aws:appconfig:us-west-2:123456789012:application//environment/def456'); + }).toThrow('Missing required parameters for environment ARN: format should be /$/{applicationId}/environment//$/{environmentId}'); + }); + + test('from environment arn with no environment id', () => { + const stack = new cdk.Stack(); + expect(() => { + Environment.fromEnvironmentArn(stack, 'MyEnvironment', + 'arn:aws:appconfig:us-west-2:123456789012:application/abc123/environment/'); + }).toThrow('Missing required parameters for environment ARN: format should be /$/{applicationId}/environment//$/{environmentId}'); + }); + + test('from environment attributes', () => { + const app = new App(); + const stack = new cdk.Stack(app, 'Stack', { + env: { + region: 'us-west-2', + account: '123456789012', + }, + }); + const appConfigApp = new Application(stack, 'MyAppConfig'); + const env = Environment.fromEnvironmentAttributes(stack, 'MyEnvironment', { + application: appConfigApp, + environmentId: 'def456', + }); + + expect(env.environmentId).toEqual('def456'); + expect(env.applicationId).toBeDefined(); + expect(env.env.account).toEqual('123456789012'); + expect(env.env.region).toEqual('us-west-2'); + }); +}); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/extension.test.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/extension.test.ts new file mode 100644 index 0000000000000..c4faed3acb4c3 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/extension.test.ts @@ -0,0 +1,664 @@ +import * as cdk from 'aws-cdk-lib'; +import { App } from 'aws-cdk-lib'; +import { Template } from 'aws-cdk-lib/assertions'; +import { EventBus } from 'aws-cdk-lib/aws-events'; +import { Effect, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; +import { Topic } from 'aws-cdk-lib/aws-sns'; +import { Queue } from 'aws-cdk-lib/aws-sqs'; +import { + Action, + ActionPoint, + Application, + ConfigurationContent, + Extension, + HostedConfiguration, + Parameter, + LambdaDestination, + SqsDestination, + SnsDestination, + EventBridgeDestination, +} from '../lib'; + +describe('extension', () => { + test('simple extension with lambda', () => { + const stack = new cdk.Stack(); + const func = new lambda.Function(stack, 'MyFunction', { + runtime: lambda.Runtime.PYTHON_3_8, + code: lambda.Code.fromInline('# dummy func'), + handler: 'index.handler', + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_COMPLETE, + ActionPoint.ON_DEPLOYMENT_ROLLED_BACK, + ], + eventDestination: new LambdaDestination(func), + }), + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_COMPLETE: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRoleFD367BEA2AE12', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + ON_DEPLOYMENT_ROLLED_BACK: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRoleFD367BEA2AE12', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:lambda:us-east-1:123456789012:function:my-function', + Action: [ + 'lambda:InvokeFunction', + 'lambda:InvokeAsync', + ], + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }); + }); + + test('simple extension with two lambdas', () => { + const stack = new cdk.Stack(); + const func1 = new lambda.Function(stack, 'MyFunction1', { + runtime: lambda.Runtime.PYTHON_3_8, + code: lambda.Code.fromInline('# dummy func'), + handler: 'index.handler', + }); + const func2 = new lambda.Function(stack, 'MyFunction2', { + runtime: lambda.Runtime.PYTHON_3_8, + code: lambda.Code.fromInline('# dummy func'), + handler: 'index.handler', + }); + Object.defineProperty(func1, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + Object.defineProperty(func2, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-diff-function', + }); + new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_COMPLETE, + ], + eventDestination: new LambdaDestination(func1), + }), + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_ROLLED_BACK, + ], + eventDestination: new LambdaDestination(func2), + }), + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_COMPLETE: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRoleFD367BEA2AE12', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + ON_DEPLOYMENT_ROLLED_BACK: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRole78071F4E7B10A', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-diff-function', + }, + ], + }, + }); + Template.fromStack(stack).resourcePropertiesCountIs('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:lambda:us-east-1:123456789012:function:my-function', + Action: [ + 'lambda:InvokeFunction', + 'lambda:InvokeAsync', + ], + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }, 1); + Template.fromStack(stack).resourcePropertiesCountIs('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:lambda:us-east-1:123456789012:function:my-diff-function', + Action: [ + 'lambda:InvokeFunction', + 'lambda:InvokeAsync', + ], + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }, 1); + }); + + test('extension with all props using lambda', () => { + const stack = new cdk.Stack(); + const func = new lambda.Function(stack, 'MyFunction', { + runtime: lambda.Runtime.PYTHON_3_8, + code: lambda.Code.fromInline('# dummy func'), + handler: 'index.handler', + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + const appconfig = new Application(stack, 'MyApplication', { + name: 'MyApplication', + }); + const ext = new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_COMPLETE, + ], + eventDestination: new LambdaDestination(func), + }), + ], + name: 'TestExtension', + description: 'This is my extension', + parameters: [ + Parameter.required('testVariable', 'hello'), + Parameter.notRequired('testNotRequiredVariable'), + ], + latestVersionNumber: 1, + }); + appconfig.addExtension(ext); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'TestExtension', + Actions: { + ON_DEPLOYMENT_COMPLETE: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRoleFD367BEA2AE12', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + Description: 'This is my extension', + Parameters: { + testVariable: { Required: true }, + testNotRequiredVariable: { Required: false }, + }, + LatestVersionNumber: 1, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['MyExtension89A915D0', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['MyExtension89A915D0', 'VersionNumber'], + }, + Parameters: { + testVariable: 'hello', + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyApplication5C63EC1D' }, + ], + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:lambda:us-east-1:123456789012:function:my-function', + Action: [ + 'lambda:InvokeFunction', + 'lambda:InvokeAsync', + ], + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }); + }); + + test('extension with queue', () => { + const stack = new cdk.Stack(); + const queue = new Queue(stack, 'MyQueue'); + Object.defineProperty(queue, 'queueArn', { + value: 'arn:sqs:us-east-1:123456789012:my-queue', + }); + new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_ROLLED_BACK, + ], + eventDestination: new SqsDestination(queue), + name: 'ActionTestName', + description: 'This is my action description', + }), + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_ROLLED_BACK: [ + { + Description: 'This is my action description', + Name: 'ActionTestName', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRoleC3C234A0DDBAB', 'Arn'] }, + Uri: 'arn:sqs:us-east-1:123456789012:my-queue', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:sqs:us-east-1:123456789012:my-queue', + Action: 'sqs:SendMessage', + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }); + }); + + test('extension with topic', () => { + const stack = new cdk.Stack(); + const topic = new Topic(stack, 'MyTopic'); + Object.defineProperty(topic, 'topicArn', { + value: 'arn:sns:us-east-1:123456789012:my-topic', + }); + new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_BAKING, + ], + eventDestination: new SnsDestination(topic), + }), + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_BAKING: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRole600FCFE1621BF', 'Arn'] }, + Uri: 'arn:sns:us-east-1:123456789012:my-topic', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:sns:us-east-1:123456789012:my-topic', + Action: 'sns:Publish', + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }); + }); + + test('extension with bus', () => { + const stack = new cdk.Stack(); + const bus = new EventBus(stack, 'MyEventBus'); + Object.defineProperty(bus, 'eventBusArn', { + value: 'arn:aws:events:us-east-1:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1', + }); + new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_BAKING, + ], + eventDestination: new EventBridgeDestination(bus), + }), + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_BAKING: [ + { + Name: 'MyExtension', + Uri: 'arn:aws:events:us-east-1:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1', + }, + ], + }, + }); + Template.fromStack(stack).resourceCountIs('AWS::IAM::Role', 0); + }); + + test('extension with associated environment', () => { + const stack = new cdk.Stack(); + const func = new lambda.Function(stack, 'MyFunction', { + runtime: lambda.Runtime.PYTHON_3_8, + code: lambda.Code.fromInline('# dummy func'), + handler: 'index.handler', + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + const app = new Application(stack, 'MyApplication'); + const env = app.addEnvironment('MyEnvironment'); + const ext = new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_COMPLETE, + ], + eventDestination: new LambdaDestination(func), + }), + ], + }); + env.addExtension(ext); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_COMPLETE: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRoleFD367BEA2AE12', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['MyExtension89A915D0', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['MyExtension89A915D0', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyApplication5C63EC1D' }, + '/environment/', + { Ref: 'MyApplicationMyEnvironment10D94356' }, + ], + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:lambda:us-east-1:123456789012:function:my-function', + Action: [ + 'lambda:InvokeFunction', + 'lambda:InvokeAsync', + ], + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }); + }); + + test('extension with associated configuration profile', () => { + const stack = new cdk.Stack(); + const func = new lambda.Function(stack, 'MyFunction', { + runtime: lambda.Runtime.PYTHON_3_8, + code: lambda.Code.fromInline('# dummy func'), + handler: 'index.handler', + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + const app = new Application(stack, 'MyApplication'); + const configProfile = new HostedConfiguration(stack, 'MyConfiguration', { + application: app, + content: ConfigurationContent.fromInline('This is my content.'), + }); + const ext = new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_COMPLETE, + ], + eventDestination: new LambdaDestination(func), + }), + ], + }); + configProfile.addExtension(ext); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_COMPLETE: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyExtensionRoleFD367BEA2AE12', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::ExtensionAssociation', { + ExtensionIdentifier: { + 'Fn::GetAtt': ['MyExtension89A915D0', 'Id'], + }, + ExtensionVersionNumber: { + 'Fn::GetAtt': ['MyExtension89A915D0', 'VersionNumber'], + }, + ResourceIdentifier: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':appconfig:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':application/', + { Ref: 'MyApplication5C63EC1D' }, + '/configurationprofile/', + { Ref: 'MyConfigurationConfigurationProfileEE0ECA85' }, + ], + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyDocument: { + Statement: [ + { + Effect: Effect.ALLOW, + Resource: 'arn:lambda:us-east-1:123456789012:function:my-function', + Action: [ + 'lambda:InvokeFunction', + 'lambda:InvokeAsync', + ], + }, + ], + }, + PolicyName: 'AllowAppConfigInvokeExtensionEventSourcePolicy', + }, + ], + }); + }); + + test('extension with execution role', () => { + const stack = new cdk.Stack(); + const func = new lambda.Function(stack, 'MyFunction', { + runtime: lambda.Runtime.PYTHON_3_8, + code: lambda.Code.fromInline('# dummy func'), + handler: 'index.handler', + }); + Object.defineProperty(func, 'functionArn', { + value: 'arn:lambda:us-east-1:123456789012:function:my-function', + }); + const role = new Role(stack, 'MyRole', { + assumedBy: new ServicePrincipal('appconfig.amazonaws.com'), + }); + new Extension(stack, 'MyExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_COMPLETE, + ], + eventDestination: new LambdaDestination(func), + executionRole: role, + }), + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::AppConfig::Extension', { + Name: 'MyExtension', + Actions: { + ON_DEPLOYMENT_COMPLETE: [ + { + Name: 'MyExtension', + RoleArn: { 'Fn::GetAtt': ['MyRoleF48FFE04', 'Arn'] }, + Uri: 'arn:lambda:us-east-1:123456789012:function:my-function', + }, + ], + }, + }); + }); + + test('from extension arn', () => { + const stack = new cdk.Stack(); + const extension = Extension.fromExtensionArn(stack, 'MyExtension', + 'arn:aws:appconfig:us-west-2:123456789012:extension/abc123/1'); + + expect(extension.extensionId).toEqual('abc123'); + expect(extension.extensionVersionNumber).toEqual(1); + expect(extension.env.account).toEqual('123456789012'); + expect(extension.env.region).toEqual('us-west-2'); + }); + + test('from extension arn with no resource name', () => { + const stack = new cdk.Stack(); + expect(() => { + Extension.fromExtensionArn(stack, 'MyExtension', + 'arn:aws:appconfig:us-west-2:123456789012:extension/'); + }).toThrow('Missing required /$/{extensionId}//$/{extensionVersionNumber} from configuration profile ARN:'); + }); + + test('from extension arn with no extension id', () => { + const stack = new cdk.Stack(); + expect(() => { + Extension.fromExtensionArn(stack, 'MyExtension', + 'arn:aws:appconfig:us-west-2:123456789012:extension//1'); + }).toThrow('Missing required parameters for extension ARN: format should be /$/{extensionId}//$/{extensionVersionNumber}'); + }); + + test('from extension arn with no extension version number', () => { + const stack = new cdk.Stack(); + expect(() => { + Extension.fromExtensionArn(stack, 'MyExtension', + 'arn:aws:appconfig:us-west-2:123456789012:extension/abc123/'); + }).toThrow('Missing required parameters for extension ARN: format should be /$/{extensionId}//$/{extensionVersionNumber}'); + }); + + test('from extension id', () => { + const cdkApp = new App(); + const stack = new cdk.Stack(cdkApp, 'Stack', { + env: { + region: 'us-west-2', + account: '123456789012', + }, + }); + const extension = Extension.fromExtensionAttributes(stack, 'Extension', { + extensionId: 'abc123', + extensionVersionNumber: 1, + }); + + expect(extension.extensionId).toEqual('abc123'); + expect(extension.extensionVersionNumber).toEqual(1); + expect(extension.env.account).toEqual('123456789012'); + expect(extension.env.region).toEqual('us-west-2'); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/appconfigapplicationDefaultTestDeployAssertD6537C40.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/appconfigapplicationDefaultTestDeployAssertD6537C40.assets.json new file mode 100644 index 0000000000000..b6f615178fa21 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/appconfigapplicationDefaultTestDeployAssertD6537C40.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "appconfigapplicationDefaultTestDeployAssertD6537C40.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/appconfigapplicationDefaultTestDeployAssertD6537C40.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/appconfigapplicationDefaultTestDeployAssertD6537C40.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/appconfigapplicationDefaultTestDeployAssertD6537C40.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/aws-appconfig-application.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/aws-appconfig-application.assets.json new file mode 100644 index 0000000000000..264d0b0f3253f --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/aws-appconfig-application.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "1bbcd83a6b27b680c911215e6afe359b98571c3d9d715d5ebf40ae0522a31c33": { + "source": { + "path": "aws-appconfig-application.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1bbcd83a6b27b680c911215e6afe359b98571c3d9d715d5ebf40ae0522a31c33.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/aws-appconfig-application.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/aws-appconfig-application.template.json new file mode 100644 index 0000000000000..6cbd018c1b9d1 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/aws-appconfig-application.template.json @@ -0,0 +1,87 @@ +{ + "Resources": { + "MyAppConfigB4B63E75": { + "Type": "AWS::AppConfig::Application", + "Properties": { + "Description": "This is my application for testing", + "Name": "awsappconfigapplication-MyAppConfig-5BFACBE9" + } + }, + "MyTaskDefTaskRole727F9D3B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "MyTaskDef01F0D39B": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Essential": true, + "Image": "public.ecr.aws/aws-appconfig/aws-appconfig-agent:latest", + "Name": "AppConfigAgentContainer" + } + ], + "Cpu": "256", + "Family": "awsappconfigapplicationMyTaskDef7372410D", + "Memory": "512", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "MyTaskDefTaskRole727F9D3B", + "Arn" + ] + } + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/cdk.out new file mode 100644 index 0000000000000..f0b901e7c06e5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"32.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/integ.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/integ.json new file mode 100644 index 0000000000000..02a72ca75410e --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "32.0.0", + "testCases": { + "appconfig-application/DefaultTest": { + "stacks": [ + "aws-appconfig-application" + ], + "assertionStack": "appconfig-application/DefaultTest/DeployAssert", + "assertionStackName": "appconfigapplicationDefaultTestDeployAssertD6537C40" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/manifest.json new file mode 100644 index 0000000000000..bc03046086754 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/manifest.json @@ -0,0 +1,123 @@ +{ + "version": "32.0.0", + "artifacts": { + "aws-appconfig-application.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-appconfig-application.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-appconfig-application": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-appconfig-application.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1bbcd83a6b27b680c911215e6afe359b98571c3d9d715d5ebf40ae0522a31c33.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-appconfig-application.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-appconfig-application.assets" + ], + "metadata": { + "/aws-appconfig-application/MyAppConfig/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigB4B63E75" + } + ], + "/aws-appconfig-application/MyTaskDef/TaskRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyTaskDefTaskRole727F9D3B" + } + ], + "/aws-appconfig-application/MyTaskDef/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyTaskDef01F0D39B" + } + ], + "/aws-appconfig-application/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-appconfig-application/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-appconfig-application" + }, + "appconfigapplicationDefaultTestDeployAssertD6537C40.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "appconfigapplicationDefaultTestDeployAssertD6537C40.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "appconfigapplicationDefaultTestDeployAssertD6537C40": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "appconfigapplicationDefaultTestDeployAssertD6537C40.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "appconfigapplicationDefaultTestDeployAssertD6537C40.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "appconfigapplicationDefaultTestDeployAssertD6537C40.assets" + ], + "metadata": { + "/appconfig-application/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/appconfig-application/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "appconfig-application/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/tree.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/tree.json new file mode 100644 index 0000000000000..9d9934f4ae1b5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.js.snapshot/tree.json @@ -0,0 +1,220 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-appconfig-application": { + "id": "aws-appconfig-application", + "path": "aws-appconfig-application", + "children": { + "MyAppConfig": { + "id": "MyAppConfig", + "path": "aws-appconfig-application/MyAppConfig", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-application/MyAppConfig/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Application", + "aws:cdk:cloudformation:props": { + "description": "This is my application for testing", + "name": "awsappconfigapplication-MyAppConfig-5BFACBE9" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnApplication", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "MyTaskDef": { + "id": "MyTaskDef", + "path": "aws-appconfig-application/MyTaskDef", + "children": { + "TaskRole": { + "id": "TaskRole", + "path": "aws-appconfig-application/MyTaskDef/TaskRole", + "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-appconfig-application/MyTaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-application/MyTaskDef/TaskRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-application/MyTaskDef/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition", + "aws:cdk:cloudformation:props": { + "containerDefinitions": [ + { + "essential": true, + "image": "public.ecr.aws/aws-appconfig/aws-appconfig-agent:latest", + "name": "AppConfigAgentContainer" + } + ], + "cpu": "256", + "family": "awsappconfigapplicationMyTaskDef7372410D", + "memory": "512", + "networkMode": "awsvpc", + "requiresCompatibilities": [ + "FARGATE" + ], + "taskRoleArn": { + "Fn::GetAtt": [ + "MyTaskDefTaskRole727F9D3B", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" + } + }, + "AppConfigAgentContainer": { + "id": "AppConfigAgentContainer", + "path": "aws-appconfig-application/MyTaskDef/AppConfigAgentContainer", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-appconfig-application/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-appconfig-application/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "appconfig-application": { + "id": "appconfig-application", + "path": "appconfig-application", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "appconfig-application/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "appconfig-application/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "appconfig-application/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "appconfig-application/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "appconfig-application/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.ts new file mode 100644 index 0000000000000..92f6830918ccd --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.application.ts @@ -0,0 +1,19 @@ +import { Stack, App } from 'aws-cdk-lib'; +import { FargateTaskDefinition } from 'aws-cdk-lib/aws-ecs'; +import { Application } from '../lib'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new App(); + +const stack = new Stack(app, 'aws-appconfig-application'); + +new Application(stack, 'MyAppConfig', { + description: 'This is my application for testing', +}); + +const taskDef = new FargateTaskDefinition(stack, 'MyTaskDef'); +Application.addAgentToEcs(taskDef); + +new IntegTest(app, 'appconfig-application', { + testCases: [stack], +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.assets.json new file mode 100644 index 0000000000000..e88b36a4a2c59 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "appconfigconfigurationDefaultTestDeployAssert6752CD38.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9b7590a121e3b39547297cbf009beb8a27e1cf9daaa760cb82c42bd530d5ef8f/hello/world/codepipeline.txt b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9b7590a121e3b39547297cbf009beb8a27e1cf9daaa760cb82c42bd530d5ef8f/hello/world/codepipeline.txt new file mode 100644 index 0000000000000..167d0deaf2dcc --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9b7590a121e3b39547297cbf009beb8a27e1cf9daaa760cb82c42bd530d5ef8f/hello/world/codepipeline.txt @@ -0,0 +1 @@ +This is the content stored in code pipeline \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd/index.py b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd/index.py new file mode 100644 index 0000000000000..95c458826a0b0 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd/index.py @@ -0,0 +1,319 @@ +import contextlib +import json +import logging +import os +import shutil +import subprocess +import tempfile +from urllib.request import Request, urlopen +from uuid import uuid4 +from zipfile import ZipFile + +import boto3 + +logger = logging.getLogger() +logger.setLevel(logging.INFO) + +cloudfront = boto3.client('cloudfront') +s3 = boto3.client('s3') + +CFN_SUCCESS = "SUCCESS" +CFN_FAILED = "FAILED" +ENV_KEY_MOUNT_PATH = "MOUNT_PATH" +ENV_KEY_SKIP_CLEANUP = "SKIP_CLEANUP" + +AWS_CLI_CONFIG_FILE = "/tmp/aws_cli_config" +CUSTOM_RESOURCE_OWNER_TAG = "aws-cdk:cr-owned" + +os.putenv('AWS_CONFIG_FILE', AWS_CLI_CONFIG_FILE) + +def handler(event, context): + + def cfn_error(message=None): + logger.error("| cfn_error: %s" % message) + cfn_send(event, context, CFN_FAILED, reason=message, physicalResourceId=event.get('PhysicalResourceId', None)) + + + try: + # We are not logging ResponseURL as this is a pre-signed S3 URL, and could be used to tamper + # with the response CloudFormation sees from this Custom Resource execution. + logger.info({ key:value for (key, value) in event.items() if key != 'ResponseURL'}) + + # cloudformation request type (create/update/delete) + request_type = event['RequestType'] + + # extract resource properties + props = event['ResourceProperties'] + old_props = event.get('OldResourceProperties', {}) + physical_id = event.get('PhysicalResourceId', None) + + try: + source_bucket_names = props['SourceBucketNames'] + source_object_keys = props['SourceObjectKeys'] + source_markers = props.get('SourceMarkers', None) + dest_bucket_name = props['DestinationBucketName'] + dest_bucket_prefix = props.get('DestinationBucketKeyPrefix', '') + extract = props.get('Extract', 'true') == 'true' + retain_on_delete = props.get('RetainOnDelete', "true") == "true" + distribution_id = props.get('DistributionId', '') + user_metadata = props.get('UserMetadata', {}) + system_metadata = props.get('SystemMetadata', {}) + prune = props.get('Prune', 'true').lower() == 'true' + exclude = props.get('Exclude', []) + include = props.get('Include', []) + sign_content = props.get('SignContent', 'false').lower() == 'true' + + # backwards compatibility - if "SourceMarkers" is not specified, + # assume all sources have an empty market map + if source_markers is None: + source_markers = [{} for i in range(len(source_bucket_names))] + + default_distribution_path = dest_bucket_prefix + if not default_distribution_path.endswith("/"): + default_distribution_path += "/" + if not default_distribution_path.startswith("/"): + default_distribution_path = "/" + default_distribution_path + default_distribution_path += "*" + + distribution_paths = props.get('DistributionPaths', [default_distribution_path]) + except KeyError as e: + cfn_error("missing request resource property %s. props: %s" % (str(e), props)) + return + + # configure aws cli options after resetting back to the defaults for each request + if os.path.exists(AWS_CLI_CONFIG_FILE): + os.remove(AWS_CLI_CONFIG_FILE) + if sign_content: + aws_command("configure", "set", "default.s3.payload_signing_enabled", "true") + + # treat "/" as if no prefix was specified + if dest_bucket_prefix == "/": + dest_bucket_prefix = "" + + s3_source_zips = list(map(lambda name, key: "s3://%s/%s" % (name, key), source_bucket_names, source_object_keys)) + s3_dest = "s3://%s/%s" % (dest_bucket_name, dest_bucket_prefix) + old_s3_dest = "s3://%s/%s" % (old_props.get("DestinationBucketName", ""), old_props.get("DestinationBucketKeyPrefix", "")) + + + # obviously this is not + if old_s3_dest == "s3:///": + old_s3_dest = None + + logger.info("| s3_dest: %s" % s3_dest) + logger.info("| old_s3_dest: %s" % old_s3_dest) + + # if we are creating a new resource, allocate a physical id for it + # otherwise, we expect physical id to be relayed by cloudformation + if request_type == "Create": + physical_id = "aws.cdk.s3deployment.%s" % str(uuid4()) + else: + if not physical_id: + cfn_error("invalid request: request type is '%s' but 'PhysicalResourceId' is not defined" % request_type) + return + + # delete or create/update (only if "retain_on_delete" is false) + if request_type == "Delete" and not retain_on_delete: + if not bucket_owned(dest_bucket_name, dest_bucket_prefix): + aws_command("s3", "rm", s3_dest, "--recursive") + + # if we are updating without retention and the destination changed, delete first + if request_type == "Update" and not retain_on_delete and old_s3_dest != s3_dest: + if not old_s3_dest: + logger.warn("cannot delete old resource without old resource properties") + return + + aws_command("s3", "rm", old_s3_dest, "--recursive") + + if request_type == "Update" or request_type == "Create": + s3_deploy(s3_source_zips, s3_dest, user_metadata, system_metadata, prune, exclude, include, source_markers, extract) + + if distribution_id: + cloudfront_invalidate(distribution_id, distribution_paths) + + cfn_send(event, context, CFN_SUCCESS, physicalResourceId=physical_id, responseData={ + # Passing through the ARN sequences dependencees on the deployment + 'DestinationBucketArn': props.get('DestinationBucketArn'), + 'SourceObjectKeys': props.get('SourceObjectKeys'), + }) + except KeyError as e: + cfn_error("invalid request. Missing key %s" % str(e)) + except Exception as e: + logger.exception(e) + cfn_error(str(e)) + +#--------------------------------------------------------------------------------------------------- +# populate all files from s3_source_zips to a destination bucket +def s3_deploy(s3_source_zips, s3_dest, user_metadata, system_metadata, prune, exclude, include, source_markers, extract): + # list lengths are equal + if len(s3_source_zips) != len(source_markers): + raise Exception("'source_markers' and 's3_source_zips' must be the same length") + + # create a temporary working directory in /tmp or if enabled an attached efs volume + if ENV_KEY_MOUNT_PATH in os.environ: + workdir = os.getenv(ENV_KEY_MOUNT_PATH) + "/" + str(uuid4()) + os.mkdir(workdir) + else: + workdir = tempfile.mkdtemp() + + logger.info("| workdir: %s" % workdir) + + # create a directory into which we extract the contents of the zip file + contents_dir=os.path.join(workdir, 'contents') + os.mkdir(contents_dir) + + try: + # download the archive from the source and extract to "contents" + for i in range(len(s3_source_zips)): + s3_source_zip = s3_source_zips[i] + markers = source_markers[i] + + if extract: + archive=os.path.join(workdir, str(uuid4())) + logger.info("archive: %s" % archive) + aws_command("s3", "cp", s3_source_zip, archive) + logger.info("| extracting archive to: %s\n" % contents_dir) + logger.info("| markers: %s" % markers) + extract_and_replace_markers(archive, contents_dir, markers) + else: + logger.info("| copying archive to: %s\n" % contents_dir) + aws_command("s3", "cp", s3_source_zip, contents_dir) + + # sync from "contents" to destination + + s3_command = ["s3", "sync"] + + if prune: + s3_command.append("--delete") + + if exclude: + for filter in exclude: + s3_command.extend(["--exclude", filter]) + + if include: + for filter in include: + s3_command.extend(["--include", filter]) + + s3_command.extend([contents_dir, s3_dest]) + s3_command.extend(create_metadata_args(user_metadata, system_metadata)) + aws_command(*s3_command) + finally: + if not os.getenv(ENV_KEY_SKIP_CLEANUP): + shutil.rmtree(workdir) + +#--------------------------------------------------------------------------------------------------- +# invalidate files in the CloudFront distribution edge caches +def cloudfront_invalidate(distribution_id, distribution_paths): + invalidation_resp = cloudfront.create_invalidation( + DistributionId=distribution_id, + InvalidationBatch={ + 'Paths': { + 'Quantity': len(distribution_paths), + 'Items': distribution_paths + }, + 'CallerReference': str(uuid4()), + }) + # by default, will wait up to 10 minutes + cloudfront.get_waiter('invalidation_completed').wait( + DistributionId=distribution_id, + Id=invalidation_resp['Invalidation']['Id']) + +#--------------------------------------------------------------------------------------------------- +# set metadata +def create_metadata_args(raw_user_metadata, raw_system_metadata): + if len(raw_user_metadata) == 0 and len(raw_system_metadata) == 0: + return [] + + format_system_metadata_key = lambda k: k.lower() + format_user_metadata_key = lambda k: k.lower() + + system_metadata = { format_system_metadata_key(k): v for k, v in raw_system_metadata.items() } + user_metadata = { format_user_metadata_key(k): v for k, v in raw_user_metadata.items() } + + flatten = lambda l: [item for sublist in l for item in sublist] + system_args = flatten([[f"--{k}", v] for k, v in system_metadata.items()]) + user_args = ["--metadata", json.dumps(user_metadata, separators=(',', ':'))] if len(user_metadata) > 0 else [] + + return system_args + user_args + ["--metadata-directive", "REPLACE"] + +#--------------------------------------------------------------------------------------------------- +# executes an "aws" cli command +def aws_command(*args): + aws="/opt/awscli/aws" # from AwsCliLayer + logger.info("| aws %s" % ' '.join(args)) + subprocess.check_call([aws] + list(args)) + +#--------------------------------------------------------------------------------------------------- +# sends a response to cloudformation +def cfn_send(event, context, responseStatus, responseData={}, physicalResourceId=None, noEcho=False, reason=None): + + responseUrl = event['ResponseURL'] + + responseBody = {} + responseBody['Status'] = responseStatus + responseBody['Reason'] = reason or ('See the details in CloudWatch Log Stream: ' + context.log_stream_name) + responseBody['PhysicalResourceId'] = physicalResourceId or context.log_stream_name + responseBody['StackId'] = event['StackId'] + responseBody['RequestId'] = event['RequestId'] + responseBody['LogicalResourceId'] = event['LogicalResourceId'] + responseBody['NoEcho'] = noEcho + responseBody['Data'] = responseData + + body = json.dumps(responseBody) + logger.info("| response body:\n" + body) + + headers = { + 'content-type' : '', + 'content-length' : str(len(body)) + } + + try: + request = Request(responseUrl, method='PUT', data=bytes(body.encode('utf-8')), headers=headers) + with contextlib.closing(urlopen(request)) as response: + logger.info("| status code: " + response.reason) + except Exception as e: + logger.error("| unable to send response to CloudFormation") + logger.exception(e) + + +#--------------------------------------------------------------------------------------------------- +# check if bucket is owned by a custom resource +# if it is then we don't want to delete content +def bucket_owned(bucketName, keyPrefix): + tag = CUSTOM_RESOURCE_OWNER_TAG + if keyPrefix != "": + tag = tag + ':' + keyPrefix + try: + request = s3.get_bucket_tagging( + Bucket=bucketName, + ) + return any((x["Key"].startswith(tag)) for x in request["TagSet"]) + except Exception as e: + logger.info("| error getting tags from bucket") + logger.exception(e) + return False + +# extract archive and replace markers in output files +def extract_and_replace_markers(archive, contents_dir, markers): + with ZipFile(archive, "r") as zip: + zip.extractall(contents_dir) + + # replace markers for this source + for file in zip.namelist(): + file_path = os.path.join(contents_dir, file) + if os.path.isdir(file_path): continue + replace_markers(file_path, markers) + +def replace_markers(filename, markers): + # convert the dict of string markers to binary markers + replace_tokens = dict([(k.encode('utf-8'), v.encode('utf-8')) for k, v in markers.items()]) + + outfile = filename + '.new' + with open(filename, 'rb') as fi, open(outfile, 'wb') as fo: + for line in fi: + for token in replace_tokens: + line = line.replace(token, replace_tokens[token]) + fo.write(line) + + # # delete the original file and rename the new one to the original + os.remove(filename) + os.rename(outfile, filename) diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9f148cad39f325035dfec935c0a2e907135f10cb64e7c4ef78c2320fc9ad24ae/hello/world/file.txt b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9f148cad39f325035dfec935c0a2e907135f10cb64e7c4ef78c2320fc9ad24ae/hello/world/file.txt new file mode 100644 index 0000000000000..9c4249ba50142 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.9f148cad39f325035dfec935c0a2e907135f10cb64e7c4ef78c2320fc9ad24ae/hello/world/file.txt @@ -0,0 +1 @@ +This is the content stored in S3 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip new file mode 100644 index 0000000000000..90a8a2a6e2615 Binary files /dev/null and b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/asset.e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip differ diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/aws-appconfig-configuration.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/aws-appconfig-configuration.assets.json new file mode 100644 index 0000000000000..e245698a2ce83 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/aws-appconfig-configuration.assets.json @@ -0,0 +1,71 @@ +{ + "version": "32.0.0", + "files": { + "e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642": { + "source": { + "path": "asset.e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd": { + "source": { + "path": "asset.9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "9f148cad39f325035dfec935c0a2e907135f10cb64e7c4ef78c2320fc9ad24ae": { + "source": { + "path": "asset.9f148cad39f325035dfec935c0a2e907135f10cb64e7c4ef78c2320fc9ad24ae", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "9f148cad39f325035dfec935c0a2e907135f10cb64e7c4ef78c2320fc9ad24ae.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "9b7590a121e3b39547297cbf009beb8a27e1cf9daaa760cb82c42bd530d5ef8f": { + "source": { + "path": "asset.9b7590a121e3b39547297cbf009beb8a27e1cf9daaa760cb82c42bd530d5ef8f", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "9b7590a121e3b39547297cbf009beb8a27e1cf9daaa760cb82c42bd530d5ef8f.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "62a9b3aeb4a84560d1814dd4ac31c12a8f5047e3cde5873f6f4c351d7668af04": { + "source": { + "path": "aws-appconfig-configuration.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "62a9b3aeb4a84560d1814dd4ac31c12a8f5047e3cde5873f6f4c351d7668af04.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/aws-appconfig-configuration.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/aws-appconfig-configuration.template.json new file mode 100644 index 0000000000000..b1eda3c6e7502 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/aws-appconfig-configuration.template.json @@ -0,0 +1,1730 @@ +{ + "Resources": { + "MyAppConfigB4B63E75": { + "Type": "AWS::AppConfig::Application", + "Properties": { + "Name": "AppForConfigTest" + } + }, + "MyAppConfigHostedEnvF39C847E": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Name": "awsappconfigconfiguration-MyAppConfig-HostedEnv-D1EED3BE" + } + }, + "MyAppConfigHostedEnvFromJson9E6E36C4": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Name": "awsappconfigconfiguration-MyAppConfig-HostedEnvFromJson-140D2DDD" + } + }, + "MyAppConfigParameterEnvD769FB19": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Name": "awsappconfigconfiguration-MyAppConfig-ParameterEnv-803E803A" + } + }, + "MyAppConfigDocumentEnv34B10223": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Name": "awsappconfigconfiguration-MyAppConfig-DocumentEnv-5B0DCEC5" + } + }, + "MyAppConfigBucketEnvCBDFEF45": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Name": "awsappconfigconfiguration-MyAppConfig-BucketEnv-1A81B6F5" + } + }, + "MyAppConfigSecretEnvE1102B63": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Name": "awsappconfigconfiguration-MyAppConfig-SecretEnv-371FF6BB" + } + }, + "MyAppConfigSecretEnvWithKey9C93DA23": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Name": "awsappconfigconfiguration-MyAppConfig-SecretEnvWithKey-8D4A2FFE" + } + }, + "MyDeployStrategy062CAEA2": { + "Type": "AWS::AppConfig::DeploymentStrategy", + "Properties": { + "DeploymentDurationInMinutes": 0, + "GrowthFactor": 100, + "GrowthType": "LINEAR", + "Name": "awsappconfigconfiguration-MyDeployStrategy-91730AE8", + "ReplicateTo": "NONE" + } + }, + "MyHostedConfigConfigurationProfile2E1A2BBC": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "LocationUri": "hosted", + "Name": "awsappconfigconfiguration-MyHostedConfig-4CF350AE", + "Validators": [ + { + "Content": "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"type\": \"string\"\n}", + "Type": "JSON_SCHEMA" + } + ] + } + }, + "MyHostedConfig51D3877D": { + "Type": "AWS::AppConfig::HostedConfigurationVersion", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "ConfigurationProfileId": { + "Ref": "MyHostedConfigConfigurationProfile2E1A2BBC" + }, + "Content": "This is my configuration content.", + "ContentType": "application/json" + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyHostedConfigDeploymentE4742E8E64DF4": { + "Type": "AWS::AppConfig::Deployment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "ConfigurationProfileId": { + "Ref": "MyHostedConfigConfigurationProfile2E1A2BBC" + }, + "ConfigurationVersion": { + "Ref": "MyHostedConfig51D3877D" + }, + "DeploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "EnvironmentId": { + "Ref": "MyAppConfigHostedEnvF39C847E" + } + } + }, + "MyHostedConfigFromJsonConfigurationProfile863E1E42": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "LocationUri": "hosted", + "Name": "awsappconfigconfiguration-MyHostedConfigFromJson-3E786E81" + } + }, + "MyHostedConfigFromJsonD8CF9BE4": { + "Type": "AWS::AppConfig::HostedConfigurationVersion", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "ConfigurationProfileId": { + "Ref": "MyHostedConfigFromJsonConfigurationProfile863E1E42" + }, + "Content": "This is the configuration content", + "ContentType": "application/json" + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyHostedConfigFromJsonDeploymentCD82E3049E374": { + "Type": "AWS::AppConfig::Deployment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "ConfigurationProfileId": { + "Ref": "MyHostedConfigFromJsonConfigurationProfile863E1E42" + }, + "ConfigurationVersion": { + "Ref": "MyHostedConfigFromJsonD8CF9BE4" + }, + "DeploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "EnvironmentId": { + "Ref": "MyAppConfigHostedEnvFromJson9E6E36C4" + } + } + }, + "MyValidatorFunctionServiceRole5CD02390": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "MyValidatorFunctionA679CB3C": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "\ndef handler(event, context):\n print('This is my dummy validator')\n" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "MyValidatorFunctionServiceRole5CD02390", + "Arn" + ] + }, + "Runtime": "python3.8" + }, + "DependsOn": [ + "MyValidatorFunctionServiceRole5CD02390" + ] + }, + "MyValidatorFunctionAppConfigPermission77CD11AC": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "MyValidatorFunctionA679CB3C", + "Arn" + ] + }, + "Principal": "appconfig.amazonaws.com" + } + }, + "MyParameter18BA547D": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Type": "String", + "Value": "This is the content stored in ssm parameter" + } + }, + "MyConfigFromParameterRole4E40C8BC": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "ssm:GetParameter", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ssm:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":parameter/", + { + "Ref": "MyParameter18BA547D" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AllowAppConfigReadFromSourcePolicy" + } + ] + } + }, + "MyConfigFromParameterDC204468": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Description": "This is a configuration profile used for integ testing", + "LocationUri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ssm:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":parameter/", + { + "Ref": "MyParameter18BA547D" + } + ] + ] + }, + "Name": "TestConfigProfileStoredAsParamater", + "RetrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromParameterRole4E40C8BC", + "Arn" + ] + }, + "Validators": [ + { + "Content": { + "Fn::GetAtt": [ + "MyValidatorFunctionA679CB3C", + "Arn" + ] + }, + "Type": "LAMBDA" + } + ] + } + }, + "MyConfigFromParameterDeployment0C84B4B3BAD6B": { + "Type": "AWS::AppConfig::Deployment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "ConfigurationProfileId": { + "Ref": "MyConfigFromParameterDC204468" + }, + "ConfigurationVersion": "1", + "DeploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "Description": "This is a configuration profile used for integ testing", + "EnvironmentId": { + "Ref": "MyAppConfigParameterEnvD769FB19" + } + } + }, + "MyDocument": { + "Type": "AWS::SSM::Document", + "Properties": { + "Content": { + "schemaVersion": "2.2", + "description": "Sample SSM Document", + "mainSteps": [ + { + "action": "aws:runShellScript", + "name": "step1", + "inputs": { + "runCommand": [ + "echo \"Hello, World!\"" + ] + } + } + ] + }, + "DocumentType": "Command", + "Name": "TestDocument" + } + }, + "MyConfigFromDocumentRole29FB4D3D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "ssm:GetDocument", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ssm:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":document/", + { + "Ref": "MyDocument" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AllowAppConfigReadFromSourcePolicy" + } + ] + } + }, + "MyConfigFromDocument79E66ABA": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "LocationUri": { + "Fn::Join": [ + "", + [ + "ssm-document://", + { + "Ref": "MyDocument" + } + ] + ] + }, + "Name": "awsappconfigconfiguration-MyConfigFromDocument-A15AC401", + "RetrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromDocumentRole29FB4D3D", + "Arn" + ] + } + } + }, + "MyConfigFromDocumentDeployment1520EE7C916D3": { + "Type": "AWS::AppConfig::Deployment", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "ConfigurationProfileId": { + "Ref": "MyConfigFromDocument79E66ABA" + }, + "ConfigurationVersion": "1", + "DeploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "EnvironmentId": { + "Ref": "MyAppConfigDocumentEnv34B10223" + } + } + }, + "MyBucketF68F3FF0": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "aws-cdk:cr-owned:2255b7ad", + "Value": "true" + } + ], + "VersioningConfiguration": { + "Status": "Enabled" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DeployConfigInBucketAwsCliLayerFC57D055": { + "Type": "AWS::Lambda::LayerVersion", + "Properties": { + "Content": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip" + }, + "Description": "/opt/awscli/aws" + } + }, + "DeployConfigInBucketCustomResource91997C5B": { + "Type": "Custom::CDKBucketDeployment", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", + "Arn" + ] + }, + "SourceBucketNames": [ + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ], + "SourceObjectKeys": [ + "9f148cad39f325035dfec935c0a2e907135f10cb64e7c4ef78c2320fc9ad24ae.zip", + "9b7590a121e3b39547297cbf009beb8a27e1cf9daaa760cb82c42bd530d5ef8f.zip" + ], + "SourceMarkers": [ + {}, + {} + ], + "DestinationBucketName": { + "Ref": "MyBucketF68F3FF0" + }, + "RetainOnDelete": false, + "Prune": true + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + } + ] + } + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd.zip" + }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" + } + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "DeployConfigInBucketAwsCliLayerFC57D055" + } + ], + "Role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", + "Arn" + ] + }, + "Runtime": "python3.9", + "Timeout": 900 + }, + "DependsOn": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + ] + }, + "MyConfigFromBucketDeploymentStrategy59D68C4F": { + "Type": "AWS::AppConfig::DeploymentStrategy", + "Properties": { + "DeploymentDurationInMinutes": 20, + "FinalBakeTimeInMinutes": 10, + "GrowthFactor": 10, + "GrowthType": "EXPONENTIAL", + "Name": "awsappconfigconfiguration-MyomBucket-DeploymentStrategy-8366DF86", + "ReplicateTo": "NONE" + } + }, + "MyConfigFromBucketRole5749669F": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject", + "s3:GetObjectMetadata", + "s3:GetObjectVersion" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Ref": "MyBucketF68F3FF0" + }, + "/hello/world/file.txt" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketLocation", + "s3:GetBucketVersioning", + "s3:ListBucket", + "s3:ListBucketVersions" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Ref": "MyBucketF68F3FF0" + } + ] + ] + } + }, + { + "Action": "s3:ListAllMyBuckets", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AllowAppConfigReadFromSourcePolicy" + } + ] + } + }, + "MyConfigFromBucket064B5420": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "Description": { + "Fn::Join": [ + "", + [ + "Sourced from ", + { + "Fn::Select": [ + 0, + { + "Fn::GetAtt": [ + "DeployConfigInBucketCustomResource91997C5B", + "SourceObjectKeys" + ] + } + ] + } + ] + ] + }, + "LocationUri": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "MyBucketF68F3FF0" + }, + "/hello/world/file.txt" + ] + ] + }, + "Name": "awsappconfigconfiguration-MyConfigFromBucket-79972829", + "RetrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromBucketRole5749669F", + "Arn" + ] + } + } + }, + "MySecret8FE80B51": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "SecretString": "This is the content stored in secrets manager" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MyConfigFromSecretDeploymentStrategy7E7398AA": { + "Type": "AWS::AppConfig::DeploymentStrategy", + "Properties": { + "DeploymentDurationInMinutes": 20, + "FinalBakeTimeInMinutes": 10, + "GrowthFactor": 10, + "GrowthType": "EXPONENTIAL", + "Name": "awsappconfigconfiguration-MyomSecret-DeploymentStrategy-2F6D94AB", + "ReplicateTo": "NONE" + } + }, + "MyConfigFromSecretRole77E11CE7": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "secretsmanager:GetSecretValue", + "Effect": "Allow", + "Resource": { + "Ref": "MySecret8FE80B51" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AllowAppConfigReadFromSourcePolicy" + } + ] + } + }, + "MyConfigFromSecret42EED9DC": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "LocationUri": { + "Ref": "MySecret8FE80B51" + }, + "Name": "awsappconfigconfiguration-MyConfigFromSecret-3BD4C031", + "RetrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromSecretRole77E11CE7", + "Arn" + ] + } + } + }, + "MyKey6AB29FA6": { + "Type": "AWS::KMS::Key", + "Properties": { + "KeyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:CreateGrant", + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Condition": { + "StringEquals": { + "kms:ViaService": { + "Fn::Join": [ + "", + [ + "secretsmanager.", + { + "Ref": "AWS::Region" + }, + ".amazonaws.com" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MySecretWithKey1F7B590B": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "KmsKeyId": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + }, + "SecretString": "This is the content stored in secrets manager" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MyConfigFromSecretWithKeyDeploymentStrategy9FAC9F62": { + "Type": "AWS::AppConfig::DeploymentStrategy", + "Properties": { + "DeploymentDurationInMinutes": 20, + "FinalBakeTimeInMinutes": 10, + "GrowthFactor": 10, + "GrowthType": "EXPONENTIAL", + "Name": "awsappconfigconfiguration-MytWithKey-DeploymentStrategy-70C32371", + "ReplicateTo": "NONE" + } + }, + "MyConfigFromSecretWithKeyRole3C7B494A": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "secretsmanager:GetSecretValue", + "Effect": "Allow", + "Resource": { + "Ref": "MySecretWithKey1F7B590B" + } + }, + { + "Action": "kms:Decrypt", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AllowAppConfigReadFromSourcePolicy" + } + ] + } + }, + "MyConfigFromSecretWithKey6F08D343": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "LocationUri": { + "Ref": "MySecretWithKey1F7B590B" + }, + "Name": "awsappconfigconfiguration-MyConfigFromSecretWithKey-516D9EB2", + "RetrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromSecretWithKeyRole3C7B494A", + "Arn" + ] + } + } + }, + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3": { + "Type": "AWS::KMS::Key", + "Properties": { + "KeyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MyPipelineArtifactsBucketEncryptionKeyAlias9D4F8C59": { + "Type": "AWS::KMS::Alias", + "Properties": { + "AliasName": "alias/codepipeline-aws-appconfig-configuration-mypipeline-893f29d4", + "TargetKeyId": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MyPipelineArtifactsBucket727923DD": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "KMSMasterKeyID": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + }, + "SSEAlgorithm": "aws:kms" + } + } + ] + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyPipelineArtifactsBucketPolicyDFDA675B": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "MyPipelineArtifactsBucket727923DD" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "MyPipelineRoleC0D47CA4": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "MyPipelineRoleDefaultPolicy34F09EFA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "MyPipelineprodDeployCodePipelineActionRoleFAD07544", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyPipelineRoleDefaultPolicy34F09EFA", + "Roles": [ + { + "Ref": "MyPipelineRoleC0D47CA4" + } + ] + } + }, + "MyPipelineAED38ECF": { + "Type": "AWS::CodePipeline::Pipeline", + "Properties": { + "ArtifactStore": { + "EncryptionKey": { + "Id": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + }, + "Type": "KMS" + }, + "Location": { + "Ref": "MyPipelineArtifactsBucket727923DD" + }, + "Type": "S3" + }, + "RoleArn": { + "Fn::GetAtt": [ + "MyPipelineRoleC0D47CA4", + "Arn" + ] + }, + "Stages": [ + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Source", + "Owner": "AWS", + "Provider": "S3", + "Version": "1" + }, + "Configuration": { + "S3Bucket": { + "Ref": "MyBucketF68F3FF0" + }, + "S3ObjectKey": "hello/world/codepipeline.txt" + }, + "Name": "Source", + "OutputArtifacts": [ + { + "Name": "SourceOutput" + } + ], + "RoleArn": { + "Fn::GetAtt": [ + "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "beta" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "S3", + "Version": "1" + }, + "Configuration": { + "BucketName": { + "Ref": "MyBucketF68F3FF0" + }, + "Extract": "true" + }, + "InputArtifacts": [ + { + "Name": "SourceOutput" + } + ], + "Name": "Deploy", + "RoleArn": { + "Fn::GetAtt": [ + "MyPipelineprodDeployCodePipelineActionRoleFAD07544", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "prod" + } + ] + }, + "DependsOn": [ + "MyPipelineRoleDefaultPolicy34F09EFA", + "MyPipelineRoleC0D47CA4" + ] + }, + "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "MyPipelinebetaSourceCodePipelineActionRoleDefaultPolicy4F6DF82E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + "/hello/world/codepipeline.txt" + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyPipelinebetaSourceCodePipelineActionRoleDefaultPolicy4F6DF82E", + "Roles": [ + { + "Ref": "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C" + } + ] + } + }, + "MyPipelineprodDeployCodePipelineActionRoleFAD07544": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "MyPipelineprodDeployCodePipelineActionRoleDefaultPolicyF1913519": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyPipelineprodDeployCodePipelineActionRoleDefaultPolicyF1913519", + "Roles": [ + { + "Ref": "MyPipelineprodDeployCodePipelineActionRoleFAD07544" + } + ] + } + }, + "MyConfigFromPipelineDeploymentStrategyF07EE763": { + "Type": "AWS::AppConfig::DeploymentStrategy", + "Properties": { + "DeploymentDurationInMinutes": 20, + "FinalBakeTimeInMinutes": 10, + "GrowthFactor": 10, + "GrowthType": "EXPONENTIAL", + "Name": "awsappconfigconfiguration-MyPipeline-DeploymentStrategy-5F76004F", + "ReplicateTo": "NONE" + } + }, + "MyConfigFromPipelineEA8471A4": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "LocationUri": { + "Fn::Join": [ + "", + [ + "codepipeline://", + { + "Ref": "MyPipelineAED38ECF" + } + ] + ] + }, + "Name": "awsappconfigconfiguration-MyConfigFromPipeline-FD2B6B65" + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/cdk.out new file mode 100644 index 0000000000000..f0b901e7c06e5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"32.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/integ.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/integ.json new file mode 100644 index 0000000000000..7d30ed8fc2aa4 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/integ.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "testCases": { + "appconfig-configuration/DefaultTest": { + "stacks": [ + "aws-appconfig-configuration" + ], + "cdkCommandOptions": { + "destroy": { + "args": { + "force": true + } + } + }, + "assertionStack": "appconfig-configuration/DefaultTest/DeployAssert", + "assertionStackName": "appconfigconfigurationDefaultTestDeployAssert6752CD38" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/manifest.json new file mode 100644 index 0000000000000..745926ca84296 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/manifest.json @@ -0,0 +1,447 @@ +{ + "version": "32.0.0", + "artifacts": { + "aws-appconfig-configuration.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-appconfig-configuration.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-appconfig-configuration": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-appconfig-configuration.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/62a9b3aeb4a84560d1814dd4ac31c12a8f5047e3cde5873f6f4c351d7668af04.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-appconfig-configuration.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-appconfig-configuration.assets" + ], + "metadata": { + "/aws-appconfig-configuration/MyAppConfig/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigB4B63E75" + } + ], + "/aws-appconfig-configuration/MyAppConfig/HostedEnv/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigHostedEnvF39C847E" + } + ], + "/aws-appconfig-configuration/MyAppConfig/HostedEnvFromJson/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigHostedEnvFromJson9E6E36C4" + } + ], + "/aws-appconfig-configuration/MyAppConfig/ParameterEnv/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigParameterEnvD769FB19" + } + ], + "/aws-appconfig-configuration/MyAppConfig/DocumentEnv/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigDocumentEnv34B10223" + } + ], + "/aws-appconfig-configuration/MyAppConfig/BucketEnv/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigBucketEnvCBDFEF45" + } + ], + "/aws-appconfig-configuration/MyAppConfig/SecretEnv/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigSecretEnvE1102B63" + } + ], + "/aws-appconfig-configuration/MyAppConfig/SecretEnvWithKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAppConfigSecretEnvWithKey9C93DA23" + } + ], + "/aws-appconfig-configuration/MyDeployStrategy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyDeployStrategy062CAEA2" + } + ], + "/aws-appconfig-configuration/MyHostedConfig/ConfigurationProfile": [ + { + "type": "aws:cdk:logicalId", + "data": "MyHostedConfigConfigurationProfile2E1A2BBC" + } + ], + "/aws-appconfig-configuration/MyHostedConfig/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyHostedConfig51D3877D" + } + ], + "/aws-appconfig-configuration/MyHostedConfig/DeploymentE4742": [ + { + "type": "aws:cdk:logicalId", + "data": "MyHostedConfigDeploymentE4742E8E64DF4" + } + ], + "/aws-appconfig-configuration/MyHostedConfigFromJson/ConfigurationProfile": [ + { + "type": "aws:cdk:logicalId", + "data": "MyHostedConfigFromJsonConfigurationProfile863E1E42" + } + ], + "/aws-appconfig-configuration/MyHostedConfigFromJson/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyHostedConfigFromJsonD8CF9BE4" + } + ], + "/aws-appconfig-configuration/MyHostedConfigFromJson/DeploymentCD82E": [ + { + "type": "aws:cdk:logicalId", + "data": "MyHostedConfigFromJsonDeploymentCD82E3049E374" + } + ], + "/aws-appconfig-configuration/MyValidatorFunction/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyValidatorFunctionServiceRole5CD02390" + } + ], + "/aws-appconfig-configuration/MyValidatorFunction/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyValidatorFunctionA679CB3C" + } + ], + "/aws-appconfig-configuration/MyValidatorFunction/AppConfigPermission": [ + { + "type": "aws:cdk:logicalId", + "data": "MyValidatorFunctionAppConfigPermission77CD11AC" + } + ], + "/aws-appconfig-configuration/MyParameter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyParameter18BA547D" + } + ], + "/aws-appconfig-configuration/MyConfigFromParameter/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromParameterRole4E40C8BC" + } + ], + "/aws-appconfig-configuration/MyConfigFromParameter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromParameterDC204468" + } + ], + "/aws-appconfig-configuration/MyConfigFromParameter/Deployment0C84B": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromParameterDeployment0C84B4B3BAD6B" + } + ], + "/aws-appconfig-configuration/MyDocument": [ + { + "type": "aws:cdk:logicalId", + "data": "MyDocument" + } + ], + "/aws-appconfig-configuration/MyConfigFromDocument/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromDocumentRole29FB4D3D" + } + ], + "/aws-appconfig-configuration/MyConfigFromDocument/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromDocument79E66ABA" + } + ], + "/aws-appconfig-configuration/MyConfigFromDocument/Deployment1520E": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromDocumentDeployment1520EE7C916D3" + } + ], + "/aws-appconfig-configuration/MyBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyBucketF68F3FF0" + } + ], + "/aws-appconfig-configuration/DeployConfigInBucket/AwsCliLayer/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployConfigInBucketAwsCliLayerFC57D055" + } + ], + "/aws-appconfig-configuration/DeployConfigInBucket/CustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployConfigInBucketCustomResource91997C5B" + } + ], + "/aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + } + ], + "/aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF" + } + ], + "/aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536" + } + ], + "/aws-appconfig-configuration/MyConfigFromBucket/DeploymentStrategy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromBucketDeploymentStrategy59D68C4F" + } + ], + "/aws-appconfig-configuration/MyConfigFromBucket/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromBucketRole5749669F" + } + ], + "/aws-appconfig-configuration/MyConfigFromBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromBucket064B5420" + } + ], + "/aws-appconfig-configuration/MySecret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MySecret8FE80B51" + } + ], + "/aws-appconfig-configuration/MyConfigFromSecret/DeploymentStrategy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromSecretDeploymentStrategy7E7398AA" + } + ], + "/aws-appconfig-configuration/MyConfigFromSecret/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromSecretRole77E11CE7" + } + ], + "/aws-appconfig-configuration/MyConfigFromSecret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromSecret42EED9DC" + } + ], + "/aws-appconfig-configuration/MyKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyKey6AB29FA6" + } + ], + "/aws-appconfig-configuration/MySecretWithKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MySecretWithKey1F7B590B" + } + ], + "/aws-appconfig-configuration/MyConfigFromSecretWithKey/DeploymentStrategy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromSecretWithKeyDeploymentStrategy9FAC9F62" + } + ], + "/aws-appconfig-configuration/MyConfigFromSecretWithKey/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromSecretWithKeyRole3C7B494A" + } + ], + "/aws-appconfig-configuration/MyConfigFromSecretWithKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromSecretWithKey6F08D343" + } + ], + "/aws-appconfig-configuration/MyPipeline/ArtifactsBucketEncryptionKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3" + } + ], + "/aws-appconfig-configuration/MyPipeline/ArtifactsBucketEncryptionKeyAlias/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineArtifactsBucketEncryptionKeyAlias9D4F8C59" + } + ], + "/aws-appconfig-configuration/MyPipeline/ArtifactsBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineArtifactsBucket727923DD" + } + ], + "/aws-appconfig-configuration/MyPipeline/ArtifactsBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineArtifactsBucketPolicyDFDA675B" + } + ], + "/aws-appconfig-configuration/MyPipeline/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineRoleC0D47CA4" + } + ], + "/aws-appconfig-configuration/MyPipeline/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineRoleDefaultPolicy34F09EFA" + } + ], + "/aws-appconfig-configuration/MyPipeline/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineAED38ECF" + } + ], + "/aws-appconfig-configuration/MyPipeline/beta/Source/CodePipelineActionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C" + } + ], + "/aws-appconfig-configuration/MyPipeline/beta/Source/CodePipelineActionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelinebetaSourceCodePipelineActionRoleDefaultPolicy4F6DF82E" + } + ], + "/aws-appconfig-configuration/MyPipeline/prod/Deploy/CodePipelineActionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineprodDeployCodePipelineActionRoleFAD07544" + } + ], + "/aws-appconfig-configuration/MyPipeline/prod/Deploy/CodePipelineActionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPipelineprodDeployCodePipelineActionRoleDefaultPolicyF1913519" + } + ], + "/aws-appconfig-configuration/MyConfigFromPipeline/DeploymentStrategy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromPipelineDeploymentStrategyF07EE763" + } + ], + "/aws-appconfig-configuration/MyConfigFromPipeline/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyConfigFromPipelineEA8471A4" + } + ], + "/aws-appconfig-configuration/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-appconfig-configuration/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-appconfig-configuration" + }, + "appconfigconfigurationDefaultTestDeployAssert6752CD38.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "appconfigconfigurationDefaultTestDeployAssert6752CD38.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "appconfigconfigurationDefaultTestDeployAssert6752CD38": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "appconfigconfigurationDefaultTestDeployAssert6752CD38.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "appconfigconfigurationDefaultTestDeployAssert6752CD38.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "appconfigconfigurationDefaultTestDeployAssert6752CD38.assets" + ], + "metadata": { + "/appconfig-configuration/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/appconfig-configuration/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "appconfig-configuration/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/tree.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/tree.json new file mode 100644 index 0000000000000..0f0a957f37369 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.js.snapshot/tree.json @@ -0,0 +1,2918 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-appconfig-configuration": { + "id": "aws-appconfig-configuration", + "path": "aws-appconfig-configuration", + "children": { + "MyAppConfig": { + "id": "MyAppConfig", + "path": "aws-appconfig-configuration/MyAppConfig", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Application", + "aws:cdk:cloudformation:props": { + "name": "AppForConfigTest" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnApplication", + "version": "0.0.0" + } + }, + "HostedEnv": { + "id": "HostedEnv", + "path": "aws-appconfig-configuration/MyAppConfig/HostedEnv", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/HostedEnv/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "name": "awsappconfigconfiguration-MyAppConfig-HostedEnv-D1EED3BE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "HostedEnvFromJson": { + "id": "HostedEnvFromJson", + "path": "aws-appconfig-configuration/MyAppConfig/HostedEnvFromJson", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/HostedEnvFromJson/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "name": "awsappconfigconfiguration-MyAppConfig-HostedEnvFromJson-140D2DDD" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "ParameterEnv": { + "id": "ParameterEnv", + "path": "aws-appconfig-configuration/MyAppConfig/ParameterEnv", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/ParameterEnv/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "name": "awsappconfigconfiguration-MyAppConfig-ParameterEnv-803E803A" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "DocumentEnv": { + "id": "DocumentEnv", + "path": "aws-appconfig-configuration/MyAppConfig/DocumentEnv", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/DocumentEnv/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "name": "awsappconfigconfiguration-MyAppConfig-DocumentEnv-5B0DCEC5" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "BucketEnv": { + "id": "BucketEnv", + "path": "aws-appconfig-configuration/MyAppConfig/BucketEnv", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/BucketEnv/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "name": "awsappconfigconfiguration-MyAppConfig-BucketEnv-1A81B6F5" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "SecretEnv": { + "id": "SecretEnv", + "path": "aws-appconfig-configuration/MyAppConfig/SecretEnv", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/SecretEnv/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "name": "awsappconfigconfiguration-MyAppConfig-SecretEnv-371FF6BB" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "SecretEnvWithKey": { + "id": "SecretEnvWithKey", + "path": "aws-appconfig-configuration/MyAppConfig/SecretEnvWithKey", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyAppConfig/SecretEnvWithKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "name": "awsappconfigconfiguration-MyAppConfig-SecretEnvWithKey-8D4A2FFE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "MyDeployStrategy": { + "id": "MyDeployStrategy", + "path": "aws-appconfig-configuration/MyDeployStrategy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyDeployStrategy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::DeploymentStrategy", + "aws:cdk:cloudformation:props": { + "deploymentDurationInMinutes": 0, + "growthFactor": 100, + "growthType": "LINEAR", + "name": "awsappconfigconfiguration-MyDeployStrategy-91730AE8", + "replicateTo": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeploymentStrategy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "MyHostedConfig": { + "id": "MyHostedConfig", + "path": "aws-appconfig-configuration/MyHostedConfig", + "children": { + "ConfigurationProfile": { + "id": "ConfigurationProfile", + "path": "aws-appconfig-configuration/MyHostedConfig/ConfigurationProfile", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "locationUri": "hosted", + "name": "awsappconfigconfiguration-MyHostedConfig-4CF350AE", + "validators": [ + { + "content": "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"type\": \"string\"\n}", + "type": "JSON_SCHEMA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyHostedConfig/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::HostedConfigurationVersion", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "configurationProfileId": { + "Ref": "MyHostedConfigConfigurationProfile2E1A2BBC" + }, + "content": "This is my configuration content.", + "contentType": "application/json" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnHostedConfigurationVersion", + "version": "0.0.0" + } + }, + "DeploymentE4742": { + "id": "DeploymentE4742", + "path": "aws-appconfig-configuration/MyHostedConfig/DeploymentE4742", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Deployment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "configurationProfileId": { + "Ref": "MyHostedConfigConfigurationProfile2E1A2BBC" + }, + "configurationVersion": { + "Ref": "MyHostedConfig51D3877D" + }, + "deploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "environmentId": { + "Ref": "MyAppConfigHostedEnvF39C847E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeployment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "MyHostedConfigFromJson": { + "id": "MyHostedConfigFromJson", + "path": "aws-appconfig-configuration/MyHostedConfigFromJson", + "children": { + "ConfigurationProfile": { + "id": "ConfigurationProfile", + "path": "aws-appconfig-configuration/MyHostedConfigFromJson/ConfigurationProfile", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "locationUri": "hosted", + "name": "awsappconfigconfiguration-MyHostedConfigFromJson-3E786E81" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyHostedConfigFromJson/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::HostedConfigurationVersion", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "configurationProfileId": { + "Ref": "MyHostedConfigFromJsonConfigurationProfile863E1E42" + }, + "content": "This is the configuration content", + "contentType": "application/json" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnHostedConfigurationVersion", + "version": "0.0.0" + } + }, + "DeploymentCD82E": { + "id": "DeploymentCD82E", + "path": "aws-appconfig-configuration/MyHostedConfigFromJson/DeploymentCD82E", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Deployment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "configurationProfileId": { + "Ref": "MyHostedConfigFromJsonConfigurationProfile863E1E42" + }, + "configurationVersion": { + "Ref": "MyHostedConfigFromJsonD8CF9BE4" + }, + "deploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "environmentId": { + "Ref": "MyAppConfigHostedEnvFromJson9E6E36C4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeployment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "MyValidatorFunction": { + "id": "MyValidatorFunction", + "path": "aws-appconfig-configuration/MyValidatorFunction", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-appconfig-configuration/MyValidatorFunction/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-appconfig-configuration/MyValidatorFunction/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyValidatorFunction/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyValidatorFunction/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "zipFile": "\ndef handler(event, context):\n print('This is my dummy validator')\n" + }, + "handler": "index.handler", + "role": { + "Fn::GetAtt": [ + "MyValidatorFunctionServiceRole5CD02390", + "Arn" + ] + }, + "runtime": "python3.8" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" + } + }, + "AppConfigPermission": { + "id": "AppConfigPermission", + "path": "aws-appconfig-configuration/MyValidatorFunction/AppConfigPermission", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", + "aws:cdk:cloudformation:props": { + "action": "lambda:InvokeFunction", + "functionName": { + "Fn::GetAtt": [ + "MyValidatorFunctionA679CB3C", + "Arn" + ] + }, + "principal": "appconfig.amazonaws.com" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" + } + }, + "MyParameter": { + "id": "MyParameter", + "path": "aws-appconfig-configuration/MyParameter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyParameter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SSM::Parameter", + "aws:cdk:cloudformation:props": { + "type": "String", + "value": "This is the content stored in ssm parameter" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ssm.StringParameter", + "version": "0.0.0" + } + }, + "MyConfigFromParameter": { + "id": "MyConfigFromParameter", + "path": "aws-appconfig-configuration/MyConfigFromParameter", + "children": { + "Role": { + "id": "Role", + "path": "aws-appconfig-configuration/MyConfigFromParameter/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-appconfig-configuration/MyConfigFromParameter/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromParameter/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "AllowAppConfigReadFromSourcePolicy", + "policyDocument": { + "Statement": [ + { + "Action": "ssm:GetParameter", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ssm:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":parameter/", + { + "Ref": "MyParameter18BA547D" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromParameter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "description": "This is a configuration profile used for integ testing", + "locationUri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ssm:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":parameter/", + { + "Ref": "MyParameter18BA547D" + } + ] + ] + }, + "name": "TestConfigProfileStoredAsParamater", + "retrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromParameterRole4E40C8BC", + "Arn" + ] + }, + "validators": [ + { + "content": { + "Fn::GetAtt": [ + "MyValidatorFunctionA679CB3C", + "Arn" + ] + }, + "type": "LAMBDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + }, + "Deployment0C84B": { + "id": "Deployment0C84B", + "path": "aws-appconfig-configuration/MyConfigFromParameter/Deployment0C84B", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Deployment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "configurationProfileId": { + "Ref": "MyConfigFromParameterDC204468" + }, + "configurationVersion": "1", + "deploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "description": "This is a configuration profile used for integ testing", + "environmentId": { + "Ref": "MyAppConfigParameterEnvD769FB19" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeployment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "MyDocument": { + "id": "MyDocument", + "path": "aws-appconfig-configuration/MyDocument", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SSM::Document", + "aws:cdk:cloudformation:props": { + "content": { + "schemaVersion": "2.2", + "description": "Sample SSM Document", + "mainSteps": [ + { + "action": "aws:runShellScript", + "name": "step1", + "inputs": { + "runCommand": [ + "echo \"Hello, World!\"" + ] + } + } + ] + }, + "documentType": "Command", + "name": "TestDocument" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ssm.CfnDocument", + "version": "0.0.0" + } + }, + "MyConfigFromDocument": { + "id": "MyConfigFromDocument", + "path": "aws-appconfig-configuration/MyConfigFromDocument", + "children": { + "Role": { + "id": "Role", + "path": "aws-appconfig-configuration/MyConfigFromDocument/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-appconfig-configuration/MyConfigFromDocument/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromDocument/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "AllowAppConfigReadFromSourcePolicy", + "policyDocument": { + "Statement": [ + { + "Action": "ssm:GetDocument", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ssm:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":document/", + { + "Ref": "MyDocument" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromDocument/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "locationUri": { + "Fn::Join": [ + "", + [ + "ssm-document://", + { + "Ref": "MyDocument" + } + ] + ] + }, + "name": "awsappconfigconfiguration-MyConfigFromDocument-A15AC401", + "retrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromDocumentRole29FB4D3D", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + }, + "Deployment1520E": { + "id": "Deployment1520E", + "path": "aws-appconfig-configuration/MyConfigFromDocument/Deployment1520E", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Deployment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "configurationProfileId": { + "Ref": "MyConfigFromDocument79E66ABA" + }, + "configurationVersion": "1", + "deploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "environmentId": { + "Ref": "MyAppConfigDocumentEnv34B10223" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeployment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "MyBucket": { + "id": "MyBucket", + "path": "aws-appconfig-configuration/MyBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "aws-cdk:cr-owned:2255b7ad", + "value": "true" + } + ], + "versioningConfiguration": { + "status": "Enabled" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.CfnBucket", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.Bucket", + "version": "0.0.0" + } + }, + "DeployConfigInBucket": { + "id": "DeployConfigInBucket", + "path": "aws-appconfig-configuration/DeployConfigInBucket", + "children": { + "AwsCliLayer": { + "id": "AwsCliLayer", + "path": "aws-appconfig-configuration/DeployConfigInBucket/AwsCliLayer", + "children": { + "Code": { + "id": "Code", + "path": "aws-appconfig-configuration/DeployConfigInBucket/AwsCliLayer/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-appconfig-configuration/DeployConfigInBucket/AwsCliLayer/Code/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-appconfig-configuration/DeployConfigInBucket/AwsCliLayer/Code/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/DeployConfigInBucket/AwsCliLayer/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::LayerVersion", + "aws:cdk:cloudformation:props": { + "content": { + "s3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "s3Key": "e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip" + }, + "description": "/opt/awscli/aws" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnLayerVersion", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.lambda_layer_awscli.AwsCliLayer", + "version": "0.0.0" + } + }, + "CustomResourceHandler": { + "id": "CustomResourceHandler", + "path": "aws-appconfig-configuration/DeployConfigInBucket/CustomResourceHandler", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", + "version": "0.0.0" + } + }, + "Asset1": { + "id": "Asset1", + "path": "aws-appconfig-configuration/DeployConfigInBucket/Asset1", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-appconfig-configuration/DeployConfigInBucket/Asset1/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-appconfig-configuration/DeployConfigInBucket/Asset1/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + }, + "CustomResource": { + "id": "CustomResource", + "path": "aws-appconfig-configuration/DeployConfigInBucket/CustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-appconfig-configuration/DeployConfigInBucket/CustomResource/Default", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.CustomResource", + "version": "0.0.0" + } + }, + "Asset2": { + "id": "Asset2", + "path": "aws-appconfig-configuration/DeployConfigInBucket/Asset2", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-appconfig-configuration/DeployConfigInBucket/Asset2/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-appconfig-configuration/DeployConfigInBucket/Asset2/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_deployment.BucketDeployment", + "version": "0.0.0" + } + }, + "Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C": { + "id": "Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", + "roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Code": { + "id": "Code", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/Code/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/Code/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "s3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "s3Key": "9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd.zip" + }, + "environment": { + "variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" + } + }, + "handler": "index.handler", + "layers": [ + { + "Ref": "DeployConfigInBucketAwsCliLayerFC57D055" + } + ], + "role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", + "Arn" + ] + }, + "runtime": "python3.9", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" + } + }, + "MyConfigFromBucket": { + "id": "MyConfigFromBucket", + "path": "aws-appconfig-configuration/MyConfigFromBucket", + "children": { + "DeploymentStrategy": { + "id": "DeploymentStrategy", + "path": "aws-appconfig-configuration/MyConfigFromBucket/DeploymentStrategy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromBucket/DeploymentStrategy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::DeploymentStrategy", + "aws:cdk:cloudformation:props": { + "deploymentDurationInMinutes": 20, + "finalBakeTimeInMinutes": 10, + "growthFactor": 10, + "growthType": "EXPONENTIAL", + "name": "awsappconfigconfiguration-MyomBucket-DeploymentStrategy-8366DF86", + "replicateTo": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeploymentStrategy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-appconfig-configuration/MyConfigFromBucket/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-appconfig-configuration/MyConfigFromBucket/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromBucket/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "AllowAppConfigReadFromSourcePolicy", + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject", + "s3:GetObjectMetadata", + "s3:GetObjectVersion" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Ref": "MyBucketF68F3FF0" + }, + "/hello/world/file.txt" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketLocation", + "s3:GetBucketVersioning", + "s3:ListBucket", + "s3:ListBucketVersions" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Ref": "MyBucketF68F3FF0" + } + ] + ] + } + }, + { + "Action": "s3:ListAllMyBuckets", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "description": { + "Fn::Join": [ + "", + [ + "Sourced from ", + { + "Fn::Select": [ + 0, + { + "Fn::GetAtt": [ + "DeployConfigInBucketCustomResource91997C5B", + "SourceObjectKeys" + ] + } + ] + } + ] + ] + }, + "locationUri": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "MyBucketF68F3FF0" + }, + "/hello/world/file.txt" + ] + ] + }, + "name": "awsappconfigconfiguration-MyConfigFromBucket-79972829", + "retrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromBucketRole5749669F", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "MySecret": { + "id": "MySecret", + "path": "aws-appconfig-configuration/MySecret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MySecret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "secretString": "This is the content stored in secrets manager" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", + "version": "0.0.0" + } + }, + "MyConfigFromSecret": { + "id": "MyConfigFromSecret", + "path": "aws-appconfig-configuration/MyConfigFromSecret", + "children": { + "DeploymentStrategy": { + "id": "DeploymentStrategy", + "path": "aws-appconfig-configuration/MyConfigFromSecret/DeploymentStrategy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromSecret/DeploymentStrategy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::DeploymentStrategy", + "aws:cdk:cloudformation:props": { + "deploymentDurationInMinutes": 20, + "finalBakeTimeInMinutes": 10, + "growthFactor": 10, + "growthType": "EXPONENTIAL", + "name": "awsappconfigconfiguration-MyomSecret-DeploymentStrategy-2F6D94AB", + "replicateTo": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeploymentStrategy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-appconfig-configuration/MyConfigFromSecret/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-appconfig-configuration/MyConfigFromSecret/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromSecret/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "AllowAppConfigReadFromSourcePolicy", + "policyDocument": { + "Statement": [ + { + "Action": "secretsmanager:GetSecretValue", + "Effect": "Allow", + "Resource": { + "Ref": "MySecret8FE80B51" + } + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromSecret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "locationUri": { + "Ref": "MySecret8FE80B51" + }, + "name": "awsappconfigconfiguration-MyConfigFromSecret-3BD4C031", + "retrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromSecretRole77E11CE7", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "MyKey": { + "id": "MyKey", + "path": "aws-appconfig-configuration/MyKey", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Key", + "aws:cdk:cloudformation:props": { + "keyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:CreateGrant", + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Condition": { + "StringEquals": { + "kms:ViaService": { + "Fn::Join": [ + "", + [ + "secretsmanager.", + { + "Ref": "AWS::Region" + }, + ".amazonaws.com" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.CfnKey", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.Key", + "version": "0.0.0" + } + }, + "MySecretWithKey": { + "id": "MySecretWithKey", + "path": "aws-appconfig-configuration/MySecretWithKey", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MySecretWithKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "kmsKeyId": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + }, + "secretString": "This is the content stored in secrets manager" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", + "version": "0.0.0" + } + }, + "MyConfigFromSecretWithKey": { + "id": "MyConfigFromSecretWithKey", + "path": "aws-appconfig-configuration/MyConfigFromSecretWithKey", + "children": { + "DeploymentStrategy": { + "id": "DeploymentStrategy", + "path": "aws-appconfig-configuration/MyConfigFromSecretWithKey/DeploymentStrategy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromSecretWithKey/DeploymentStrategy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::DeploymentStrategy", + "aws:cdk:cloudformation:props": { + "deploymentDurationInMinutes": 20, + "finalBakeTimeInMinutes": 10, + "growthFactor": 10, + "growthType": "EXPONENTIAL", + "name": "awsappconfigconfiguration-MytWithKey-DeploymentStrategy-70C32371", + "replicateTo": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeploymentStrategy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-appconfig-configuration/MyConfigFromSecretWithKey/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-appconfig-configuration/MyConfigFromSecretWithKey/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromSecretWithKey/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "AllowAppConfigReadFromSourcePolicy", + "policyDocument": { + "Statement": [ + { + "Action": "secretsmanager:GetSecretValue", + "Effect": "Allow", + "Resource": { + "Ref": "MySecretWithKey1F7B590B" + } + }, + { + "Action": "kms:Decrypt", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromSecretWithKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "locationUri": { + "Ref": "MySecretWithKey1F7B590B" + }, + "name": "awsappconfigconfiguration-MyConfigFromSecretWithKey-516D9EB2", + "retrievalRoleArn": { + "Fn::GetAtt": [ + "MyConfigFromSecretWithKeyRole3C7B494A", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "MyPipeline": { + "id": "MyPipeline", + "path": "aws-appconfig-configuration/MyPipeline", + "children": { + "ArtifactsBucketEncryptionKey": { + "id": "ArtifactsBucketEncryptionKey", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucketEncryptionKey", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucketEncryptionKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Key", + "aws:cdk:cloudformation:props": { + "keyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.CfnKey", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.Key", + "version": "0.0.0" + } + }, + "ArtifactsBucketEncryptionKeyAlias": { + "id": "ArtifactsBucketEncryptionKeyAlias", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucketEncryptionKeyAlias", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucketEncryptionKeyAlias/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Alias", + "aws:cdk:cloudformation:props": { + "aliasName": "alias/codepipeline-aws-appconfig-configuration-mypipeline-893f29d4", + "targetKeyId": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.CfnAlias", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.Alias", + "version": "0.0.0" + } + }, + "ArtifactsBucket": { + "id": "ArtifactsBucket", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "bucketEncryption": { + "serverSideEncryptionConfiguration": [ + { + "serverSideEncryptionByDefault": { + "sseAlgorithm": "aws:kms", + "kmsMasterKeyId": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + } + } + ] + }, + "publicAccessBlockConfiguration": { + "blockPublicAcls": true, + "blockPublicPolicy": true, + "ignorePublicAcls": true, + "restrictPublicBuckets": true + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/ArtifactsBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "MyPipelineArtifactsBucket727923DD" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.Bucket", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-appconfig-configuration/MyPipeline/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-appconfig-configuration/MyPipeline/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-appconfig-configuration/MyPipeline/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "MyPipelineprodDeployCodePipelineActionRoleFAD07544", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyPipelineRoleDefaultPolicy34F09EFA", + "roles": [ + { + "Ref": "MyPipelineRoleC0D47CA4" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodePipeline::Pipeline", + "aws:cdk:cloudformation:props": { + "artifactStore": { + "type": "S3", + "location": { + "Ref": "MyPipelineArtifactsBucket727923DD" + }, + "encryptionKey": { + "type": "KMS", + "id": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + } + }, + "roleArn": { + "Fn::GetAtt": [ + "MyPipelineRoleC0D47CA4", + "Arn" + ] + }, + "stages": [ + { + "name": "beta", + "actions": [ + { + "name": "Source", + "outputArtifacts": [ + { + "name": "SourceOutput" + } + ], + "actionTypeId": { + "category": "Source", + "version": "1", + "owner": "AWS", + "provider": "S3" + }, + "configuration": { + "S3Bucket": { + "Ref": "MyBucketF68F3FF0" + }, + "S3ObjectKey": "hello/world/codepipeline.txt" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C", + "Arn" + ] + } + } + ] + }, + { + "name": "prod", + "actions": [ + { + "name": "Deploy", + "inputArtifacts": [ + { + "name": "SourceOutput" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "S3" + }, + "configuration": { + "BucketName": { + "Ref": "MyBucketF68F3FF0" + }, + "Extract": "true" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "MyPipelineprodDeployCodePipelineActionRoleFAD07544", + "Arn" + ] + } + } + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codepipeline.CfnPipeline", + "version": "0.0.0" + } + }, + "beta": { + "id": "beta", + "path": "aws-appconfig-configuration/MyPipeline/beta", + "children": { + "Source": { + "id": "Source", + "path": "aws-appconfig-configuration/MyPipeline/beta/Source", + "children": { + "CodePipelineActionRole": { + "id": "CodePipelineActionRole", + "path": "aws-appconfig-configuration/MyPipeline/beta/Source/CodePipelineActionRole", + "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-appconfig-configuration/MyPipeline/beta/Source/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/beta/Source/CodePipelineActionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-appconfig-configuration/MyPipeline/beta/Source/CodePipelineActionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/beta/Source/CodePipelineActionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + "/hello/world/codepipeline.txt" + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyPipelinebetaSourceCodePipelineActionRoleDefaultPolicy4F6DF82E", + "roles": [ + { + "Ref": "MyPipelinebetaSourceCodePipelineActionRoleA59DCC4C" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "prod": { + "id": "prod", + "path": "aws-appconfig-configuration/MyPipeline/prod", + "children": { + "Deploy": { + "id": "Deploy", + "path": "aws-appconfig-configuration/MyPipeline/prod/Deploy", + "children": { + "CodePipelineActionRole": { + "id": "CodePipelineActionRole", + "path": "aws-appconfig-configuration/MyPipeline/prod/Deploy/CodePipelineActionRole", + "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-appconfig-configuration/MyPipeline/prod/Deploy/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/prod/Deploy/CodePipelineActionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-appconfig-configuration/MyPipeline/prod/Deploy/CodePipelineActionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyPipeline/prod/Deploy/CodePipelineActionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyBucketF68F3FF0", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucket727923DD", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyPipelineprodDeployCodePipelineActionRoleDefaultPolicyF1913519", + "roles": [ + { + "Ref": "MyPipelineprodDeployCodePipelineActionRoleFAD07544" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codepipeline.Pipeline", + "version": "0.0.0" + } + }, + "MyConfigFromPipeline": { + "id": "MyConfigFromPipeline", + "path": "aws-appconfig-configuration/MyConfigFromPipeline", + "children": { + "DeploymentStrategy": { + "id": "DeploymentStrategy", + "path": "aws-appconfig-configuration/MyConfigFromPipeline/DeploymentStrategy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromPipeline/DeploymentStrategy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::DeploymentStrategy", + "aws:cdk:cloudformation:props": { + "deploymentDurationInMinutes": 20, + "finalBakeTimeInMinutes": 10, + "growthFactor": 10, + "growthType": "EXPONENTIAL", + "name": "awsappconfigconfiguration-MyPipeline-DeploymentStrategy-5F76004F", + "replicateTo": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeploymentStrategy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-configuration/MyConfigFromPipeline/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyAppConfigB4B63E75" + }, + "locationUri": { + "Fn::Join": [ + "", + [ + "codepipeline://", + { + "Ref": "MyPipelineAED38ECF" + } + ] + ] + }, + "name": "awsappconfigconfiguration-MyConfigFromPipeline-FD2B6B65" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-appconfig-configuration/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-appconfig-configuration/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "appconfig-configuration": { + "id": "appconfig-configuration", + "path": "appconfig-configuration", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "appconfig-configuration/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "appconfig-configuration/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "appconfig-configuration/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "appconfig-configuration/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "appconfig-configuration/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts new file mode 100644 index 0000000000000..5722d6ae23a7f --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts @@ -0,0 +1,208 @@ +import { App, Duration, Stack, RemovalPolicy, Fn, SecretValue } from 'aws-cdk-lib'; +import { + Application, + ConfigurationContent, + ConfigurationSource, + DeploymentStrategy, + HostedConfiguration, + JsonSchemaValidator, + LambdaValidator, + RolloutStrategy, + SourcedConfiguration, +} from '../lib'; +import { Key } from 'aws-cdk-lib/aws-kms'; +import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda'; +import { Bucket } from 'aws-cdk-lib/aws-s3'; +import { Secret } from 'aws-cdk-lib/aws-secretsmanager'; +import { CfnDocument, StringParameter } from 'aws-cdk-lib/aws-ssm'; +import * as s3Deployment from 'aws-cdk-lib/aws-s3-deployment'; +import { Artifact, Pipeline } from 'aws-cdk-lib/aws-codepipeline'; +import { S3DeployAction, S3SourceAction } from 'aws-cdk-lib/aws-codepipeline-actions'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const SCHEMA_STR = +`{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "string" +}`; + +const LAMBDA_CODE = +` +def handler(event, context): + print('This is my dummy validator') +`; + +const app = new App(); + +const stack = new Stack(app, 'aws-appconfig-configuration'); + +// create application for config profile +const appConfigApp = new Application(stack, 'MyAppConfig', { + name: 'AppForConfigTest', +}); + +const deploymentStrategy = new DeploymentStrategy(stack, 'MyDeployStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 100, + deploymentDuration: Duration.minutes(0), + }), +}); + +// create basic config profile and add config version +const hostedEnv = appConfigApp.addEnvironment('HostedEnv'); +new HostedConfiguration(stack, 'MyHostedConfig', { + application: appConfigApp, + content: ConfigurationContent.fromInline('This is my configuration content.'), + deployTo: [hostedEnv], + validators: [ + JsonSchemaValidator.fromInline(SCHEMA_STR), + // JsonSchemaValidator.fromAsset('/Users/chenjane/Documents/appconfig-l2-constructs/test/schema.json'), + ], + deploymentStrategy, +}); + +// create basic config profile from add config version from file +const hostedEnvFromJson = appConfigApp.addEnvironment('HostedEnvFromJson'); +new HostedConfiguration(stack, 'MyHostedConfigFromJson', { + application: appConfigApp, + content: ConfigurationContent.fromInline('This is the configuration content'), + deployTo: [hostedEnvFromJson], + deploymentStrategy, +}); + +// ssm paramter as configuration source +const func = new Function(stack, 'MyValidatorFunction', { + runtime: Runtime.PYTHON_3_8, + handler: 'index.handler', + code: Code.fromInline(LAMBDA_CODE), +}); +const parameterEnv = appConfigApp.addEnvironment('ParameterEnv'); +const ssmParameter = new StringParameter(stack, 'MyParameter', { + stringValue: 'This is the content stored in ssm parameter', +}); +new SourcedConfiguration(stack, 'MyConfigFromParameter', { + name: 'TestConfigProfileStoredAsParamater', + application: appConfigApp, + description: 'This is a configuration profile used for integ testing', + location: ConfigurationSource.fromParameter(ssmParameter), + versionNumber: '1', + deployTo: [parameterEnv], + validators: [ + LambdaValidator.fromFunction(func), + ], + deploymentStrategy, +}); + +// ssm document as configuration source +const documentEnv = appConfigApp.addEnvironment('DocumentEnv'); +const ssmDocument = new CfnDocument(stack, 'MyDocument', { + content: { + schemaVersion: '2.2', + description: 'Sample SSM Document', + mainSteps: [ + { + action: 'aws:runShellScript', + name: 'step1', + inputs: { + runCommand: [ + 'echo "Hello, World!"', + ], + }, + }, + ], + }, + documentType: 'Command', + name: 'TestDocument', +}); +new SourcedConfiguration(stack, 'MyConfigFromDocument', { + application: appConfigApp, + location: ConfigurationSource.fromCfnDocument(ssmDocument), + versionNumber: '1', + deployTo: [documentEnv], + deploymentStrategy, +}); + +// S3 as configuration source +const bucketEnv = appConfigApp.addEnvironment('BucketEnv'); +const bucket = new Bucket(stack, 'MyBucket', { + versioned: true, +}); +bucket.applyRemovalPolicy(RemovalPolicy.DESTROY); +const deployment = new s3Deployment.BucketDeployment(stack, 'DeployConfigInBucket', { + sources: [s3Deployment.Source.data('hello/world/file.txt', 'This is the content stored in S3')], + destinationBucket: bucket, + retainOnDelete: false, +}); +new SourcedConfiguration(stack, 'MyConfigFromBucket', { + application: appConfigApp, + location: ConfigurationSource.fromBucket(bucket, 'hello/world/file.txt'), + description: `Sourced from ${Fn.select(0, deployment.objectKeys)}`, + deployTo: [bucketEnv], +}); + +// secrets manager as configuration source (without key) +const secretEnv = appConfigApp.addEnvironment('SecretEnv'); +const secret = new Secret(stack, 'MySecret', { + secretStringValue: SecretValue.unsafePlainText('This is the content stored in secrets manager'), +}); +new SourcedConfiguration(stack, 'MyConfigFromSecret', { + application: appConfigApp, + location: ConfigurationSource.fromSecret(secret), + deployTo: [secretEnv], +}); + +// secrets manager as configuration source (with key) +const secretWithKeyEnv = appConfigApp.addEnvironment('SecretEnvWithKey'); +const key = new Key(stack, 'MyKey'); +const secretWithKey = new Secret(stack, 'MySecretWithKey', { + secretStringValue: SecretValue.unsafePlainText('This is the content stored in secrets manager'), + encryptionKey: key, +}); +new SourcedConfiguration(stack, 'MyConfigFromSecretWithKey', { + location: ConfigurationSource.fromSecret(secretWithKey), + deploymentKey: key, + application: appConfigApp, + deployTo: [secretWithKeyEnv], +}); + +// code pipeline as configuration source +deployment.addSource(s3Deployment.Source.data('hello/world/codepipeline.txt', 'This is the content stored in code pipeline')); +const sourceAction = new S3SourceAction({ + actionName: 'Source', + bucket: bucket, + bucketKey: 'hello/world/codepipeline.txt', + output: new Artifact('SourceOutput'), +}); +const deployAction = new S3DeployAction({ + actionName: 'Deploy', + input: Artifact.artifact('SourceOutput'), + bucket: bucket, + extract: true, +}); +const pipeline = new Pipeline(stack, 'MyPipeline', { + stages: [ + { + stageName: 'beta', + actions: [sourceAction], + }, + { + stageName: 'prod', + actions: [deployAction], + }, + ], +}); +new SourcedConfiguration(stack, 'MyConfigFromPipeline', { + application: appConfigApp, + location: ConfigurationSource.fromPipeline(pipeline), +}); + +new IntegTest(app, 'appconfig-configuration', { + testCases: [stack], + cdkCommandOptions: { + destroy: { + args: { + force: true, + }, + }, + }, +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.assets.json new file mode 100644 index 0000000000000..22caef8fdee1b --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/aws-appconfig-deployment-strategy.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/aws-appconfig-deployment-strategy.assets.json new file mode 100644 index 0000000000000..4c181d5492583 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/aws-appconfig-deployment-strategy.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "cfda20689bf14dbe95332f041046160d462f7705f59c5f25c14b30055c21a10e": { + "source": { + "path": "aws-appconfig-deployment-strategy.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "cfda20689bf14dbe95332f041046160d462f7705f59c5f25c14b30055c21a10e.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/aws-appconfig-deployment-strategy.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/aws-appconfig-deployment-strategy.template.json new file mode 100644 index 0000000000000..4d3c224d509fb --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/aws-appconfig-deployment-strategy.template.json @@ -0,0 +1,48 @@ +{ + "Resources": { + "MyDeploymentStrategy60D31FB0": { + "Type": "AWS::AppConfig::DeploymentStrategy", + "Properties": { + "DeploymentDurationInMinutes": 5, + "GrowthFactor": 15, + "GrowthType": "LINEAR", + "Name": "awsappconfigdeploymentstrategy-MyDeploymentStrategy-9D0AC356", + "ReplicateTo": "NONE" + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/cdk.out new file mode 100644 index 0000000000000..f0b901e7c06e5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"32.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/integ.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/integ.json new file mode 100644 index 0000000000000..09fba1f5bd925 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "32.0.0", + "testCases": { + "appconfig-deployment-strategy/DefaultTest": { + "stacks": [ + "aws-appconfig-deployment-strategy" + ], + "assertionStack": "appconfig-deployment-strategy/DefaultTest/DeployAssert", + "assertionStackName": "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/manifest.json new file mode 100644 index 0000000000000..b0d6cfd05eb03 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/manifest.json @@ -0,0 +1,111 @@ +{ + "version": "32.0.0", + "artifacts": { + "aws-appconfig-deployment-strategy.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-appconfig-deployment-strategy.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-appconfig-deployment-strategy": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-appconfig-deployment-strategy.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cfda20689bf14dbe95332f041046160d462f7705f59c5f25c14b30055c21a10e.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-appconfig-deployment-strategy.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-appconfig-deployment-strategy.assets" + ], + "metadata": { + "/aws-appconfig-deployment-strategy/MyDeploymentStrategy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyDeploymentStrategy60D31FB0" + } + ], + "/aws-appconfig-deployment-strategy/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-appconfig-deployment-strategy/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-appconfig-deployment-strategy" + }, + "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "appconfigdeploymentstrategyDefaultTestDeployAssert3CECE452.assets" + ], + "metadata": { + "/appconfig-deployment-strategy/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/appconfig-deployment-strategy/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "appconfig-deployment-strategy/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/tree.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/tree.json new file mode 100644 index 0000000000000..16d84ca6204f9 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.js.snapshot/tree.json @@ -0,0 +1,129 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-appconfig-deployment-strategy": { + "id": "aws-appconfig-deployment-strategy", + "path": "aws-appconfig-deployment-strategy", + "children": { + "MyDeploymentStrategy": { + "id": "MyDeploymentStrategy", + "path": "aws-appconfig-deployment-strategy/MyDeploymentStrategy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-deployment-strategy/MyDeploymentStrategy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::DeploymentStrategy", + "aws:cdk:cloudformation:props": { + "deploymentDurationInMinutes": 5, + "growthFactor": 15, + "growthType": "LINEAR", + "name": "awsappconfigdeploymentstrategy-MyDeploymentStrategy-9D0AC356", + "replicateTo": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeploymentStrategy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-appconfig-deployment-strategy/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-appconfig-deployment-strategy/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "appconfig-deployment-strategy": { + "id": "appconfig-deployment-strategy", + "path": "appconfig-deployment-strategy", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "appconfig-deployment-strategy/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "appconfig-deployment-strategy/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "appconfig-deployment-strategy/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "appconfig-deployment-strategy/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "appconfig-deployment-strategy/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.ts new file mode 100644 index 0000000000000..0aadaeeab707e --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.deployment-strategy.ts @@ -0,0 +1,19 @@ +import { App, Duration, Stack } from 'aws-cdk-lib'; +import { DeploymentStrategy, RolloutStrategy } from '../lib'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new App(); + +const stack = new Stack(app, 'aws-appconfig-deployment-strategy'); + +// create basic deployment strategy +new DeploymentStrategy(stack, 'MyDeploymentStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 15, + deploymentDuration: Duration.minutes(5), + }), +}); + +new IntegTest(app, 'appconfig-deployment-strategy', { + testCases: [stack], +}); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets.json new file mode 100644 index 0000000000000..e7f9aca08607f --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "appconfigenvironmentDefaultTestDeployAssert75BD28E7.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/aws-appconfig-environment.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/aws-appconfig-environment.assets.json new file mode 100644 index 0000000000000..30512d7b22c0b --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/aws-appconfig-environment.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "5a83c94c795349286c703ba61add79efe69c74c7adb8de98527fcf034b9683af": { + "source": { + "path": "aws-appconfig-environment.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "5a83c94c795349286c703ba61add79efe69c74c7adb8de98527fcf034b9683af.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/aws-appconfig-environment.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/aws-appconfig-environment.template.json new file mode 100644 index 0000000000000..78b08f894831d --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/aws-appconfig-environment.template.json @@ -0,0 +1,119 @@ +{ + "Resources": { + "MyApplicationForEnv1F597ED9": { + "Type": "AWS::AppConfig::Application", + "Properties": { + "Name": "AppForEnvTest" + } + }, + "MyAlarm696658B6": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "EvaluationPeriods": 5, + "MetricName": "dummy name", + "Namespace": "aws", + "Period": 300, + "Statistic": "Average", + "Threshold": 10 + } + }, + "MyEnvironmentRoleC08961D3": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "cloudwatch:DescribeAlarms", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyAlarm696658B6", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AllowAppConfigMonitorAlarmPolicy" + } + ] + } + }, + "MyEnvironment465E4DEA": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyApplicationForEnv1F597ED9" + }, + "Description": "This is the environment for integ testing", + "Monitors": [ + { + "AlarmArn": { + "Fn::GetAtt": [ + "MyAlarm696658B6", + "Arn" + ] + }, + "AlarmRoleArn": { + "Fn::GetAtt": [ + "MyEnvironmentRoleC08961D3", + "Arn" + ] + } + } + ], + "Name": "awsappconfigenvironment-MyEnvironment-C8813182" + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/cdk.out new file mode 100644 index 0000000000000..f0b901e7c06e5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"32.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/integ.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/integ.json new file mode 100644 index 0000000000000..4d4d0f1d20168 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "32.0.0", + "testCases": { + "appconfig-environment/DefaultTest": { + "stacks": [ + "aws-appconfig-environment" + ], + "assertionStack": "appconfig-environment/DefaultTest/DeployAssert", + "assertionStackName": "appconfigenvironmentDefaultTestDeployAssert75BD28E7" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/manifest.json new file mode 100644 index 0000000000000..0749986d2339c --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/manifest.json @@ -0,0 +1,129 @@ +{ + "version": "32.0.0", + "artifacts": { + "aws-appconfig-environment.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-appconfig-environment.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-appconfig-environment": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-appconfig-environment.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5a83c94c795349286c703ba61add79efe69c74c7adb8de98527fcf034b9683af.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-appconfig-environment.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-appconfig-environment.assets" + ], + "metadata": { + "/aws-appconfig-environment/MyApplicationForEnv/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyApplicationForEnv1F597ED9" + } + ], + "/aws-appconfig-environment/MyAlarm/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAlarm696658B6" + } + ], + "/aws-appconfig-environment/MyEnvironment/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyEnvironmentRoleC08961D3" + } + ], + "/aws-appconfig-environment/MyEnvironment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyEnvironment465E4DEA" + } + ], + "/aws-appconfig-environment/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-appconfig-environment/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-appconfig-environment" + }, + "appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "appconfigenvironmentDefaultTestDeployAssert75BD28E7": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "appconfigenvironmentDefaultTestDeployAssert75BD28E7.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets" + ], + "metadata": { + "/appconfig-environment/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/appconfig-environment/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "appconfig-environment/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/tree.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/tree.json new file mode 100644 index 0000000000000..f094a53e8edb1 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.js.snapshot/tree.json @@ -0,0 +1,262 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-appconfig-environment": { + "id": "aws-appconfig-environment", + "path": "aws-appconfig-environment", + "children": { + "MyApplicationForEnv": { + "id": "MyApplicationForEnv", + "path": "aws-appconfig-environment/MyApplicationForEnv", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-environment/MyApplicationForEnv/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Application", + "aws:cdk:cloudformation:props": { + "name": "AppForEnvTest" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnApplication", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "MyAlarm": { + "id": "MyAlarm", + "path": "aws-appconfig-environment/MyAlarm", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-environment/MyAlarm/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "evaluationPeriods": 5, + "metricName": "dummy name", + "namespace": "aws", + "period": 300, + "statistic": "Average", + "threshold": 10 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" + } + }, + "MyEnvironment": { + "id": "MyEnvironment", + "path": "aws-appconfig-environment/MyEnvironment", + "children": { + "Role": { + "id": "Role", + "path": "aws-appconfig-environment/MyEnvironment/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-appconfig-environment/MyEnvironment/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-environment/MyEnvironment/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appconfig.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "AllowAppConfigMonitorAlarmPolicy", + "policyDocument": { + "Statement": [ + { + "Action": "cloudwatch:DescribeAlarms", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyAlarm696658B6", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-environment/MyEnvironment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyApplicationForEnv1F597ED9" + }, + "description": "This is the environment for integ testing", + "monitors": [ + { + "alarmArn": { + "Fn::GetAtt": [ + "MyAlarm696658B6", + "Arn" + ] + }, + "alarmRoleArn": { + "Fn::GetAtt": [ + "MyEnvironmentRoleC08961D3", + "Arn" + ] + } + } + ], + "name": "awsappconfigenvironment-MyEnvironment-C8813182" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-appconfig-environment/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-appconfig-environment/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "appconfig-environment": { + "id": "appconfig-environment", + "path": "appconfig-environment", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "appconfig-environment/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "appconfig-environment/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "appconfig-environment/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "appconfig-environment/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "appconfig-environment/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.ts new file mode 100644 index 0000000000000..2d19953e3d59c --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.environment.ts @@ -0,0 +1,36 @@ +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import { App, Stack } from 'aws-cdk-lib'; +import { Application, Environment } from '../lib'; +import { Alarm, Metric } from 'aws-cdk-lib/aws-cloudwatch'; + +const app = new App(); + +const stack = new Stack(app, 'aws-appconfig-environment'); + +// create resources needed for environment +const appForEnv = new Application(stack, 'MyApplicationForEnv', { + name: 'AppForEnvTest', +}); +const alarm = new Alarm(stack, 'MyAlarm', { + metric: new Metric({ + namespace: 'aws', + metricName: 'dummy name', + }), + evaluationPeriods: 5, + threshold: 10, +}); + +// create environment with all props defined +new Environment(stack, 'MyEnvironment', { + application: appForEnv, + description: 'This is the environment for integ testing', + monitors: [ + { + alarm, + }, + ], +}); + +new IntegTest(app, 'appconfig-environment', { + testCases: [stack], +}); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/aws-appconfig-extension.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/aws-appconfig-extension.assets.json new file mode 100644 index 0000000000000..8336092ae5e5a --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/aws-appconfig-extension.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "1b3fd18c823d863a4f13c60e5b79b85a1c059750ecd97aef1f9ea43c85d23de0": { + "source": { + "path": "aws-appconfig-extension.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1b3fd18c823d863a4f13c60e5b79b85a1c059750ecd97aef1f9ea43c85d23de0.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/aws-appconfig-extension.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/aws-appconfig-extension.template.json new file mode 100644 index 0000000000000..9da058b2463bc --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/aws-appconfig-extension.template.json @@ -0,0 +1,454 @@ +{ + "Resources": { + "MyFunctionServiceRole3C357FF2": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "MyFunction3BAA72D1": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "def handler(event, context):\n\tprint('The function has been invoked.')" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "MyFunctionServiceRole3C357FF2", + "Arn" + ] + }, + "Runtime": "python3.8" + }, + "DependsOn": [ + "MyFunctionServiceRole3C357FF2" + ] + }, + "MyApplication5C63EC1D": { + "Type": "AWS::AppConfig::Application", + "Properties": { + "Name": "AppForExtensionTest" + } + }, + "MyApplicationMyEnv55DE3293": { + "Type": "AWS::AppConfig::Environment", + "Properties": { + "ApplicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "Name": "awsappconfigextension-MyApplication-MyEnv-0FA5092F" + } + }, + "MyLambdaExtensionAFA1476A": { + "Type": "AWS::AppConfig::Extension", + "Properties": { + "Actions": { + "PRE_CREATE_HOSTED_CONFIGURATION_VERSION": [ + { + "Name": "awsappconfigextension-MyLambdaExtension-68C15290", + "Uri": { + "Fn::GetAtt": [ + "MyFunction3BAA72D1", + "Arn" + ] + } + } + ], + "ON_DEPLOYMENT_START": [ + { + "Name": "awsappconfigextension-MyLambdaExtension-68C15290", + "Uri": { + "Fn::GetAtt": [ + "MyFunction3BAA72D1", + "Arn" + ] + } + } + ] + }, + "Name": "awsappconfigextension-MyLambdaExtension-68C15290" + } + }, + "AssociationResource3FA55": { + "Type": "AWS::AppConfig::ExtensionAssociation", + "Properties": { + "ExtensionIdentifier": { + "Fn::GetAtt": [ + "MyLambdaExtensionAFA1476A", + "Id" + ] + }, + "ExtensionVersionNumber": { + "Fn::GetAtt": [ + "MyLambdaExtensionAFA1476A", + "VersionNumber" + ] + }, + "ResourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "MyQueueE6CA6235": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MyQueueExtension872C5D27": { + "Type": "AWS::AppConfig::Extension", + "Properties": { + "Actions": { + "ON_DEPLOYMENT_START": [ + { + "Name": "awsappconfigextension-MyQueueExtension-EF6112FA", + "Uri": { + "Fn::GetAtt": [ + "MyQueueE6CA6235", + "Arn" + ] + } + } + ] + }, + "Name": "awsappconfigextension-MyQueueExtension-EF6112FA" + } + }, + "AssociationResourceBAC86": { + "Type": "AWS::AppConfig::ExtensionAssociation", + "Properties": { + "ExtensionIdentifier": { + "Fn::GetAtt": [ + "MyQueueExtension872C5D27", + "Id" + ] + }, + "ExtensionVersionNumber": { + "Fn::GetAtt": [ + "MyQueueExtension872C5D27", + "VersionNumber" + ] + }, + "ResourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "MyTopic86869434": { + "Type": "AWS::SNS::Topic" + }, + "MyTopicExtension9B6DF691": { + "Type": "AWS::AppConfig::Extension", + "Properties": { + "Actions": { + "ON_DEPLOYMENT_START": [ + { + "Name": "awsappconfigextension-MyTopicExtension-37440DA2", + "Uri": { + "Ref": "MyTopic86869434" + } + } + ] + }, + "Name": "awsappconfigextension-MyTopicExtension-37440DA2" + } + }, + "AssociationResource7F3E1": { + "Type": "AWS::AppConfig::ExtensionAssociation", + "Properties": { + "ExtensionIdentifier": { + "Fn::GetAtt": [ + "MyTopicExtension9B6DF691", + "Id" + ] + }, + "ExtensionVersionNumber": { + "Fn::GetAtt": [ + "MyTopicExtension9B6DF691", + "VersionNumber" + ] + }, + "ResourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "MyEventBusExtensionADFE2273": { + "Type": "AWS::AppConfig::Extension", + "Properties": { + "Actions": { + "ON_DEPLOYMENT_START": [ + { + "Name": "MyEventBusPreHostedConfigVersionAction", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":events:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":event-bus/default" + ] + ] + }, + "Description": "My event bus action" + } + ] + }, + "Name": "awsappconfigextension-MyEventBusExtension-39114CFE", + "Parameters": { + "testParam": { + "Required": true + }, + "testNotRequiredParam": { + "Required": false + } + } + } + }, + "AssociationResource689DE": { + "Type": "AWS::AppConfig::ExtensionAssociation", + "Properties": { + "ExtensionIdentifier": { + "Fn::GetAtt": [ + "MyEventBusExtensionADFE2273", + "Id" + ] + }, + "ExtensionVersionNumber": { + "Fn::GetAtt": [ + "MyEventBusExtensionADFE2273", + "VersionNumber" + ] + }, + "Parameters": { + "testParam": "true" + }, + "ResourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "MyDeployStrategy062CAEA2": { + "Type": "AWS::AppConfig::DeploymentStrategy", + "Properties": { + "DeploymentDurationInMinutes": 0, + "GrowthFactor": 100, + "GrowthType": "LINEAR", + "Name": "awsappconfigextension-MyDeployStrategy-61F99D9B", + "ReplicateTo": "NONE" + } + }, + "HostedConfigurationConfigurationProfile3AB17BEA": { + "Type": "AWS::AppConfig::ConfigurationProfile", + "Properties": { + "ApplicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "LocationUri": "hosted", + "Name": "awsappconfigextension-HostedConfiguration-15AED6EE" + }, + "DependsOn": [ + "MyEventBusExtensionADFE2273", + "MyLambdaExtensionAFA1476A", + "MyQueueExtension872C5D27", + "MyTopicExtension9B6DF691" + ] + }, + "HostedConfiguration257746B4": { + "Type": "AWS::AppConfig::HostedConfigurationVersion", + "Properties": { + "ApplicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "ConfigurationProfileId": { + "Ref": "HostedConfigurationConfigurationProfile3AB17BEA" + }, + "Content": "This is my configuration content", + "ContentType": "application/json" + }, + "DependsOn": [ + "MyEventBusExtensionADFE2273", + "MyLambdaExtensionAFA1476A", + "MyQueueExtension872C5D27", + "MyTopicExtension9B6DF691" + ], + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "HostedConfigurationDeploymentA86BAE6C77C59": { + "Type": "AWS::AppConfig::Deployment", + "Properties": { + "ApplicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "ConfigurationProfileId": { + "Ref": "HostedConfigurationConfigurationProfile3AB17BEA" + }, + "ConfigurationVersion": { + "Ref": "HostedConfiguration257746B4" + }, + "DeploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "EnvironmentId": { + "Ref": "MyApplicationMyEnv55DE3293" + } + }, + "DependsOn": [ + "MyEventBusExtensionADFE2273", + "MyLambdaExtensionAFA1476A", + "MyQueueExtension872C5D27", + "MyTopicExtension9B6DF691" + ] + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.assets.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.assets.json new file mode 100644 index 0000000000000..635d1e188e6e3 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.assets.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.template.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/cdk.out new file mode 100644 index 0000000000000..f0b901e7c06e5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"32.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/integ.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/integ.json new file mode 100644 index 0000000000000..f615688162cdc --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/integ.json @@ -0,0 +1,19 @@ +{ + "version": "32.0.0", + "testCases": { + "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest": { + "stacks": [ + "aws-appconfig-extension" + ], + "cdkCommandOptions": { + "destroy": { + "args": { + "force": true + } + } + }, + "assertionStack": "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/DeployAssert", + "assertionStackName": "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/manifest.json new file mode 100644 index 0000000000000..e5aeb013fdaa8 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/manifest.json @@ -0,0 +1,213 @@ +{ + "version": "32.0.0", + "artifacts": { + "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "awsappconfigextensionMyApplicationappconfigextensionDefaultTestDeployAssert64BA6C4E.assets" + ], + "metadata": { + "/aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/DeployAssert" + }, + "aws-appconfig-extension.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-appconfig-extension.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-appconfig-extension": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-appconfig-extension.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1b3fd18c823d863a4f13c60e5b79b85a1c059750ecd97aef1f9ea43c85d23de0.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-appconfig-extension.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-appconfig-extension.assets" + ], + "metadata": { + "/aws-appconfig-extension/MyFunction/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyFunctionServiceRole3C357FF2" + } + ], + "/aws-appconfig-extension/MyFunction/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyFunction3BAA72D1" + } + ], + "/aws-appconfig-extension/MyApplication/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyApplication5C63EC1D" + } + ], + "/aws-appconfig-extension/MyApplication/MyEnv/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyApplicationMyEnv55DE3293" + } + ], + "/aws-appconfig-extension/MyLambdaExtension/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaExtensionAFA1476A" + } + ], + "/aws-appconfig-extension/AssociationResource3FA55": [ + { + "type": "aws:cdk:logicalId", + "data": "AssociationResource3FA55" + } + ], + "/aws-appconfig-extension/MyQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyQueueE6CA6235" + } + ], + "/aws-appconfig-extension/MyQueueExtension/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyQueueExtension872C5D27" + } + ], + "/aws-appconfig-extension/AssociationResourceBAC86": [ + { + "type": "aws:cdk:logicalId", + "data": "AssociationResourceBAC86" + } + ], + "/aws-appconfig-extension/MyTopic/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyTopic86869434" + } + ], + "/aws-appconfig-extension/MyTopicExtension/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyTopicExtension9B6DF691" + } + ], + "/aws-appconfig-extension/AssociationResource7F3E1": [ + { + "type": "aws:cdk:logicalId", + "data": "AssociationResource7F3E1" + } + ], + "/aws-appconfig-extension/MyEventBusExtension/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyEventBusExtensionADFE2273" + } + ], + "/aws-appconfig-extension/AssociationResource689DE": [ + { + "type": "aws:cdk:logicalId", + "data": "AssociationResource689DE" + } + ], + "/aws-appconfig-extension/MyDeployStrategy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyDeployStrategy062CAEA2" + } + ], + "/aws-appconfig-extension/HostedConfiguration/ConfigurationProfile": [ + { + "type": "aws:cdk:logicalId", + "data": "HostedConfigurationConfigurationProfile3AB17BEA" + } + ], + "/aws-appconfig-extension/HostedConfiguration/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "HostedConfiguration257746B4" + } + ], + "/aws-appconfig-extension/HostedConfiguration/DeploymentA86BA": [ + { + "type": "aws:cdk:logicalId", + "data": "HostedConfigurationDeploymentA86BAE6C77C59" + } + ], + "/aws-appconfig-extension/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-appconfig-extension/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-appconfig-extension" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/tree.json b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/tree.json new file mode 100644 index 0000000000000..578580b4ce0e5 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.js.snapshot/tree.json @@ -0,0 +1,774 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-appconfig-extension": { + "id": "aws-appconfig-extension", + "path": "aws-appconfig-extension", + "children": { + "MyFunction": { + "id": "MyFunction", + "path": "aws-appconfig-extension/MyFunction", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-appconfig-extension/MyFunction/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-appconfig-extension/MyFunction/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyFunction/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyFunction/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "zipFile": "def handler(event, context):\n\tprint('The function has been invoked.')" + }, + "handler": "index.handler", + "role": { + "Fn::GetAtt": [ + "MyFunctionServiceRole3C357FF2", + "Arn" + ] + }, + "runtime": "python3.8" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" + } + }, + "MyApplication": { + "id": "MyApplication", + "path": "aws-appconfig-extension/MyApplication", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyApplication/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Application", + "aws:cdk:cloudformation:props": { + "name": "AppForExtensionTest" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnApplication", + "version": "0.0.0" + } + }, + "MyEnv": { + "id": "MyEnv", + "path": "aws-appconfig-extension/MyApplication/MyEnv", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyApplication/MyEnv/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Environment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "name": "awsappconfigextension-MyApplication-MyEnv-0FA5092F" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnEnvironment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "appconfig-extension": { + "id": "appconfig-extension", + "path": "aws-appconfig-extension/MyApplication/appconfig-extension", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-appconfig-extension/MyApplication/appconfig-extension/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "MyLambdaExtension": { + "id": "MyLambdaExtension", + "path": "aws-appconfig-extension/MyLambdaExtension", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyLambdaExtension/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Extension", + "aws:cdk:cloudformation:props": { + "actions": { + "PRE_CREATE_HOSTED_CONFIGURATION_VERSION": [ + { + "Name": "awsappconfigextension-MyLambdaExtension-68C15290", + "Uri": { + "Fn::GetAtt": [ + "MyFunction3BAA72D1", + "Arn" + ] + } + } + ], + "ON_DEPLOYMENT_START": [ + { + "Name": "awsappconfigextension-MyLambdaExtension-68C15290", + "Uri": { + "Fn::GetAtt": [ + "MyFunction3BAA72D1", + "Arn" + ] + } + } + ] + }, + "name": "awsappconfigextension-MyLambdaExtension-68C15290" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtension", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "AssociationResource3FA55": { + "id": "AssociationResource3FA55", + "path": "aws-appconfig-extension/AssociationResource3FA55", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ExtensionAssociation", + "aws:cdk:cloudformation:props": { + "extensionIdentifier": { + "Fn::GetAtt": [ + "MyLambdaExtensionAFA1476A", + "Id" + ] + }, + "extensionVersionNumber": { + "Fn::GetAtt": [ + "MyLambdaExtensionAFA1476A", + "VersionNumber" + ] + }, + "resourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtensionAssociation", + "version": "0.0.0" + } + }, + "MyQueue": { + "id": "MyQueue", + "path": "aws-appconfig-extension/MyQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "0.0.0" + } + }, + "MyQueueExtension": { + "id": "MyQueueExtension", + "path": "aws-appconfig-extension/MyQueueExtension", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyQueueExtension/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Extension", + "aws:cdk:cloudformation:props": { + "actions": { + "ON_DEPLOYMENT_START": [ + { + "Name": "awsappconfigextension-MyQueueExtension-EF6112FA", + "Uri": { + "Fn::GetAtt": [ + "MyQueueE6CA6235", + "Arn" + ] + } + } + ] + }, + "name": "awsappconfigextension-MyQueueExtension-EF6112FA" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtension", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "AssociationResourceBAC86": { + "id": "AssociationResourceBAC86", + "path": "aws-appconfig-extension/AssociationResourceBAC86", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ExtensionAssociation", + "aws:cdk:cloudformation:props": { + "extensionIdentifier": { + "Fn::GetAtt": [ + "MyQueueExtension872C5D27", + "Id" + ] + }, + "extensionVersionNumber": { + "Fn::GetAtt": [ + "MyQueueExtension872C5D27", + "VersionNumber" + ] + }, + "resourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtensionAssociation", + "version": "0.0.0" + } + }, + "MyTopic": { + "id": "MyTopic", + "path": "aws-appconfig-extension/MyTopic", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyTopic/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::Topic", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" + } + }, + "MyTopicExtension": { + "id": "MyTopicExtension", + "path": "aws-appconfig-extension/MyTopicExtension", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyTopicExtension/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Extension", + "aws:cdk:cloudformation:props": { + "actions": { + "ON_DEPLOYMENT_START": [ + { + "Name": "awsappconfigextension-MyTopicExtension-37440DA2", + "Uri": { + "Ref": "MyTopic86869434" + } + } + ] + }, + "name": "awsappconfigextension-MyTopicExtension-37440DA2" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtension", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "AssociationResource7F3E1": { + "id": "AssociationResource7F3E1", + "path": "aws-appconfig-extension/AssociationResource7F3E1", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ExtensionAssociation", + "aws:cdk:cloudformation:props": { + "extensionIdentifier": { + "Fn::GetAtt": [ + "MyTopicExtension9B6DF691", + "Id" + ] + }, + "extensionVersionNumber": { + "Fn::GetAtt": [ + "MyTopicExtension9B6DF691", + "VersionNumber" + ] + }, + "resourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtensionAssociation", + "version": "0.0.0" + } + }, + "MyEventBus": { + "id": "MyEventBus", + "path": "aws-appconfig-extension/MyEventBus", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "MyEventBusExtension": { + "id": "MyEventBusExtension", + "path": "aws-appconfig-extension/MyEventBusExtension", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyEventBusExtension/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Extension", + "aws:cdk:cloudformation:props": { + "actions": { + "ON_DEPLOYMENT_START": [ + { + "Name": "MyEventBusPreHostedConfigVersionAction", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":events:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":event-bus/default" + ] + ] + }, + "Description": "My event bus action" + } + ] + }, + "name": "awsappconfigextension-MyEventBusExtension-39114CFE", + "parameters": { + "testParam": { + "required": true + }, + "testNotRequiredParam": { + "required": false + } + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtension", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "AssociationResource689DE": { + "id": "AssociationResource689DE", + "path": "aws-appconfig-extension/AssociationResource689DE", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ExtensionAssociation", + "aws:cdk:cloudformation:props": { + "extensionIdentifier": { + "Fn::GetAtt": [ + "MyEventBusExtensionADFE2273", + "Id" + ] + }, + "extensionVersionNumber": { + "Fn::GetAtt": [ + "MyEventBusExtensionADFE2273", + "VersionNumber" + ] + }, + "parameters": { + "testParam": "true" + }, + "resourceIdentifier": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":appconfig:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":application/", + { + "Ref": "MyApplication5C63EC1D" + } + ] + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnExtensionAssociation", + "version": "0.0.0" + } + }, + "MyDeployStrategy": { + "id": "MyDeployStrategy", + "path": "aws-appconfig-extension/MyDeployStrategy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/MyDeployStrategy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::DeploymentStrategy", + "aws:cdk:cloudformation:props": { + "deploymentDurationInMinutes": 0, + "growthFactor": 100, + "growthType": "LINEAR", + "name": "awsappconfigextension-MyDeployStrategy-61F99D9B", + "replicateTo": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeploymentStrategy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "HostedConfiguration": { + "id": "HostedConfiguration", + "path": "aws-appconfig-extension/HostedConfiguration", + "children": { + "ConfigurationProfile": { + "id": "ConfigurationProfile", + "path": "aws-appconfig-extension/HostedConfiguration/ConfigurationProfile", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::ConfigurationProfile", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "locationUri": "hosted", + "name": "awsappconfigextension-HostedConfiguration-15AED6EE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnConfigurationProfile", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-appconfig-extension/HostedConfiguration/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::HostedConfigurationVersion", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "configurationProfileId": { + "Ref": "HostedConfigurationConfigurationProfile3AB17BEA" + }, + "content": "This is my configuration content", + "contentType": "application/json" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnHostedConfigurationVersion", + "version": "0.0.0" + } + }, + "DeploymentA86BA": { + "id": "DeploymentA86BA", + "path": "aws-appconfig-extension/HostedConfiguration/DeploymentA86BA", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppConfig::Deployment", + "aws:cdk:cloudformation:props": { + "applicationId": { + "Ref": "MyApplication5C63EC1D" + }, + "configurationProfileId": { + "Ref": "HostedConfigurationConfigurationProfile3AB17BEA" + }, + "configurationVersion": { + "Ref": "HostedConfiguration257746B4" + }, + "deploymentStrategyId": { + "Ref": "MyDeployStrategy062CAEA2" + }, + "environmentId": { + "Ref": "MyApplicationMyEnv55DE3293" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appconfig.CfnDeployment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-appconfig-extension/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-appconfig-extension/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.ts new file mode 100755 index 0000000000000..65ff5986da603 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.extension.ts @@ -0,0 +1,125 @@ +import { Stack, App, Duration } from 'aws-cdk-lib'; +import { EventBus } from 'aws-cdk-lib/aws-events'; +import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda'; +import { Topic } from 'aws-cdk-lib/aws-sns'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import { Queue } from 'aws-cdk-lib/aws-sqs'; +import { + DeploymentStrategy, + Extension, + Action, + ActionPoint, + Parameter, + Application, + RolloutStrategy, + HostedConfiguration, + ConfigurationContent, + LambdaDestination, + SqsDestination, + SnsDestination, + EventBridgeDestination, +} from '../lib'; + +const cdkApp = new App(); + +const stack = new Stack(cdkApp, 'aws-appconfig-extension'); + +// create extension through lambda +const lambda = new Function(stack, 'MyFunction', { + runtime: Runtime.PYTHON_3_8, + handler: 'index.handler', + code: Code.fromInline('def handler(event, context):\n\tprint(\'The function has been invoked.\')'), +}); +const app = new Application(stack, 'MyApplication', { + name: 'AppForExtensionTest', +}); +const lambdaExtension = new Extension(stack, 'MyLambdaExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.PRE_CREATE_HOSTED_CONFIGURATION_VERSION, + ActionPoint.ON_DEPLOYMENT_START, + ], + eventDestination: new LambdaDestination(lambda), + invokeWithoutExecutionRole: true, + }), + ], +}); +app.addExtension(lambdaExtension); + +// create extension through sqs queue +const queue = new Queue(stack, 'MyQueue'); +const queueExtension = new Extension(stack, 'MyQueueExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_START, + ], + eventDestination: new SqsDestination(queue), + invokeWithoutExecutionRole: true, + }), + ], +}); +app.addExtension(queueExtension); + +// create extension through sns topic +const topic = new Topic(stack, 'MyTopic'); +const topicExtension = new Extension(stack, 'MyTopicExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_START, + ], + eventDestination: new SnsDestination(topic), + invokeWithoutExecutionRole: true, + }), + ], +}); +app.addExtension(topicExtension); + +// create extension through event bus (with parameters) +const bus = EventBus.fromEventBusName(stack, 'MyEventBus', 'default'); +const busExtension = new Extension(stack, 'MyEventBusExtension', { + actions: [ + new Action({ + actionPoints: [ + ActionPoint.ON_DEPLOYMENT_START, + ], + eventDestination: new EventBridgeDestination(bus), + description: 'My event bus action', + name: 'MyEventBusPreHostedConfigVersionAction', + invokeWithoutExecutionRole: true, + }), + ], + parameters: [ + Parameter.required('testParam', 'true'), + Parameter.notRequired('testNotRequiredParam'), + ], +}); +app.addExtension(busExtension); + +// invoke the extension actions +const env = app.addEnvironment('MyEnv'); +const hostedConfig = new HostedConfiguration(stack, 'HostedConfiguration', { + application: app, + content: ConfigurationContent.fromInline('This is my configuration content'), + deployTo: [env], + deploymentStrategy: new DeploymentStrategy(stack, 'MyDeployStrategy', { + rolloutStrategy: RolloutStrategy.linear({ + growthFactor: 100, + deploymentDuration: Duration.minutes(0), + }), + }), +}); +hostedConfig.node.addDependency(lambdaExtension, topicExtension, busExtension, queueExtension); + +new IntegTest(app, 'appconfig-extension', { + testCases: [stack], + cdkCommandOptions: { + destroy: { + args: { + force: true, + }, + }, + }, +}); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/schema.json b/packages/@aws-cdk/aws-appconfig-alpha/test/schema.json new file mode 100644 index 0000000000000..290e9cca57d08 --- /dev/null +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/schema.json @@ -0,0 +1,4 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "string" +} diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/job-executable.ts b/packages/@aws-cdk/aws-glue-alpha/lib/job-executable.ts index c121f69193b16..15cb5757e88b3 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/job-executable.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/job-executable.ts @@ -350,38 +350,40 @@ export class JobExecutable { private config: JobExecutableConfig; private constructor(config: JobExecutableConfig) { - if (JobType.PYTHON_SHELL === config.type) { + const glueVersion = config.glueVersion.name; + const type = config.type.name; + if (JobType.PYTHON_SHELL.name === type) { if (config.language !== JobLanguage.PYTHON) { throw new Error('Python shell requires the language to be set to Python'); } - if ([GlueVersion.V0_9, GlueVersion.V3_0, GlueVersion.V4_0].includes(config.glueVersion)) { - throw new Error(`Specified GlueVersion ${config.glueVersion.name} does not support Python Shell`); + if ([GlueVersion.V0_9.name, GlueVersion.V4_0.name].includes(glueVersion)) { + throw new Error(`Specified GlueVersion ${glueVersion} does not support Python Shell`); } } - if (JobType.RAY === config.type) { + if (JobType.RAY.name === type) { if (config.language !== JobLanguage.PYTHON) { throw new Error('Ray requires the language to be set to Python'); } - if ([GlueVersion.V0_9, GlueVersion.V1_0, GlueVersion.V2_0, GlueVersion.V3_0].includes(config.glueVersion)) { - throw new Error(`Specified GlueVersion ${config.glueVersion.name} does not support Ray`); + if ([GlueVersion.V0_9.name, GlueVersion.V1_0.name, GlueVersion.V2_0.name, GlueVersion.V3_0.name].includes(glueVersion)) { + throw new Error(`Specified GlueVersion ${glueVersion} does not support Ray`); } } - if (config.extraJarsFirst && [GlueVersion.V0_9, GlueVersion.V1_0].includes(config.glueVersion)) { - throw new Error(`Specified GlueVersion ${config.glueVersion.name} does not support extraJarsFirst`); + if (config.extraJarsFirst && [GlueVersion.V0_9.name, GlueVersion.V1_0.name].includes(glueVersion)) { + throw new Error(`Specified GlueVersion ${glueVersion} does not support extraJarsFirst`); } - if (config.pythonVersion === PythonVersion.TWO && ![GlueVersion.V0_9, GlueVersion.V1_0].includes(config.glueVersion)) { - throw new Error(`Specified GlueVersion ${config.glueVersion.name} does not support PythonVersion ${config.pythonVersion}`); + if (config.pythonVersion === PythonVersion.TWO && ![GlueVersion.V0_9.name, GlueVersion.V1_0.name].includes(glueVersion)) { + throw new Error(`Specified GlueVersion ${glueVersion} does not support PythonVersion ${config.pythonVersion}`); } if (JobLanguage.PYTHON !== config.language && config.extraPythonFiles) { throw new Error('extraPythonFiles is not supported for languages other than JobLanguage.PYTHON'); } - if (config.pythonVersion === PythonVersion.THREE_NINE && config.type !== JobType.PYTHON_SHELL && config.type !== JobType.RAY) { + if (config.pythonVersion === PythonVersion.THREE_NINE && type !== JobType.PYTHON_SHELL.name && type !== JobType.RAY.name) { throw new Error('Specified PythonVersion PythonVersion.THREE_NINE is only supported for JobType Python Shell and Ray'); } - if (config.pythonVersion === PythonVersion.THREE && config.type === JobType.RAY) { + if (config.pythonVersion === PythonVersion.THREE && type === JobType.RAY.name) { throw new Error('Specified PythonVersion PythonVersion.THREE is not supported for Ray'); } - if (config.runtime === undefined && config.type === JobType.RAY) { + if (config.runtime === undefined && type === JobType.RAY.name) { throw new Error('Runtime is required for Ray jobs.'); } this.config = config; diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/job.ts b/packages/@aws-cdk/aws-glue-alpha/lib/job.ts index 7b5c6a1cdf7c4..6962f801aa3a7 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/job.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/job.ts @@ -719,11 +719,20 @@ export class Job extends JobBase { } } - if (props.maxCapacity !== undefined && (props.workerType && props.workerCount !== undefined)) { + let maxCapacity = props.maxCapacity; + if (maxCapacity !== undefined && (props.workerType && props.workerCount !== undefined)) { throw new Error('maxCapacity cannot be used when setting workerType and workerCount'); } - if (props.maxCapacity !== undefined && ![GlueVersion.V0_9, GlueVersion.V1_0].includes(executable.glueVersion)) { - throw new Error('maxCapacity cannot be used when GlueVersion 2.0 or later'); + if (executable.type !== JobType.PYTHON_SHELL) { + if (maxCapacity !== undefined && ![GlueVersion.V0_9, GlueVersion.V1_0].includes(executable.glueVersion)) { + throw new Error('maxCapacity cannot be used when GlueVersion 2.0 or later'); + } + } else { + // max capacity validation for python shell jobs (defaults to 0.0625) + maxCapacity = maxCapacity ?? 0.0625; + if (maxCapacity !== 0.0625 && maxCapacity !== 1) { + throw new Error(`maxCapacity value must be either 0.0625 or 1 for JobType.PYTHON_SHELL jobs, received ${maxCapacity}`); + } } if ((!props.workerType && props.workerCount !== undefined) || (props.workerType && props.workerCount === undefined)) { throw new Error('Both workerType and workerCount must be set'); diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/asset.432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/asset.432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py new file mode 100644 index 0000000000000..e75154b7c390f --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/asset.432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py @@ -0,0 +1 @@ +print("hello world") \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/aws-glue-job-python-shell.assets.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/aws-glue-job-python-shell.assets.json new file mode 100644 index 0000000000000..17b109b19285f --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/aws-glue-job-python-shell.assets.json @@ -0,0 +1,32 @@ +{ + "version": "33.0.0", + "files": { + "432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855": { + "source": { + "path": "asset.432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "13432a74ca6cfada399f4d2b33385964f66c49aeeb01c5f0cefec52560a4dffa": { + "source": { + "path": "aws-glue-job-python-shell.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "13432a74ca6cfada399f4d2b33385964f66c49aeeb01c5f0cefec52560a4dffa.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/aws-glue-job-python-shell.template.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/aws-glue-job-python-shell.template.json new file mode 100644 index 0000000000000..dece180ae8219 --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/aws-glue-job-python-shell.template.json @@ -0,0 +1,290 @@ +{ + "Resources": { + "ShellJobServiceRoleCF97BC4B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "glue.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSGlueServiceRole" + ] + ] + } + ] + } + }, + "ShellJobServiceRoleDefaultPolicy7F22D315": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ShellJobServiceRoleDefaultPolicy7F22D315", + "Roles": [ + { + "Ref": "ShellJobServiceRoleCF97BC4B" + } + ] + } + }, + "ShellJob42E81F95": { + "Type": "AWS::Glue::Job", + "Properties": { + "Command": { + "Name": "pythonshell", + "PythonVersion": "3", + "ScriptLocation": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py" + ] + ] + } + }, + "DefaultArguments": { + "--job-language": "python", + "arg1": "value1", + "arg2": "value2" + }, + "GlueVersion": "1.0", + "MaxCapacity": 0.0625, + "Name": "ShellJob", + "Role": { + "Fn::GetAtt": [ + "ShellJobServiceRoleCF97BC4B", + "Arn" + ] + }, + "Tags": { + "key": "value" + } + } + }, + "ShellJob39ServiceRole2F6F3768": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "glue.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSGlueServiceRole" + ] + ] + } + ] + } + }, + "ShellJob39ServiceRoleDefaultPolicy38A33919": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ShellJob39ServiceRoleDefaultPolicy38A33919", + "Roles": [ + { + "Ref": "ShellJob39ServiceRole2F6F3768" + } + ] + } + }, + "ShellJob390C141361": { + "Type": "AWS::Glue::Job", + "Properties": { + "Command": { + "Name": "pythonshell", + "PythonVersion": "3.9", + "ScriptLocation": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py" + ] + ] + } + }, + "DefaultArguments": { + "--job-language": "python", + "arg1": "value1", + "arg2": "value2" + }, + "GlueVersion": "3.0", + "MaxCapacity": 1, + "Name": "ShellJob39", + "Role": { + "Fn::GetAtt": [ + "ShellJob39ServiceRole2F6F3768", + "Arn" + ] + }, + "Tags": { + "key": "value" + } + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.assets.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.assets.json new file mode 100644 index 0000000000000..fcf891c433efb --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.assets.json @@ -0,0 +1,19 @@ +{ + "version": "33.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.template.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/cdk.out b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/cdk.out new file mode 100644 index 0000000000000..560dae10d018f --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"33.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/integ.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/integ.json new file mode 100644 index 0000000000000..89660486d806d --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "33.0.0", + "testCases": { + "aws-glue-job-python-shell-integ-test/DefaultTest": { + "stacks": [ + "aws-glue-job-python-shell" + ], + "assertionStack": "aws-glue-job-python-shell-integ-test/DefaultTest/DeployAssert", + "assertionStackName": "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/manifest.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/manifest.json new file mode 100644 index 0000000000000..93cd15ece1b08 --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/manifest.json @@ -0,0 +1,141 @@ +{ + "version": "33.0.0", + "artifacts": { + "aws-glue-job-python-shell.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-glue-job-python-shell.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-glue-job-python-shell": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-glue-job-python-shell.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/13432a74ca6cfada399f4d2b33385964f66c49aeeb01c5f0cefec52560a4dffa.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-glue-job-python-shell.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-glue-job-python-shell.assets" + ], + "metadata": { + "/aws-glue-job-python-shell/ShellJob/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ShellJobServiceRoleCF97BC4B" + } + ], + "/aws-glue-job-python-shell/ShellJob/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ShellJobServiceRoleDefaultPolicy7F22D315" + } + ], + "/aws-glue-job-python-shell/ShellJob/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ShellJob42E81F95" + } + ], + "/aws-glue-job-python-shell/ShellJob39/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ShellJob39ServiceRole2F6F3768" + } + ], + "/aws-glue-job-python-shell/ShellJob39/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ShellJob39ServiceRoleDefaultPolicy38A33919" + } + ], + "/aws-glue-job-python-shell/ShellJob39/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ShellJob390C141361" + } + ], + "/aws-glue-job-python-shell/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-glue-job-python-shell/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-glue-job-python-shell" + }, + "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "awsgluejobpythonshellintegtestDefaultTestDeployAssert453D25B7.assets" + ], + "metadata": { + "/aws-glue-job-python-shell-integ-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-glue-job-python-shell-integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-glue-job-python-shell-integ-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/tree.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/tree.json new file mode 100644 index 0000000000000..05905851160a8 --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.js.snapshot/tree.json @@ -0,0 +1,503 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-glue-job-python-shell": { + "id": "aws-glue-job-python-shell", + "path": "aws-glue-job-python-shell", + "children": { + "ShellJob": { + "id": "ShellJob", + "path": "aws-glue-job-python-shell/ShellJob", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-glue-job-python-shell/ShellJob/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-glue-job-python-shell/ShellJob/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-glue-job-python-shell/ShellJob/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "glue.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSGlueServiceRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-glue-job-python-shell/ShellJob/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-glue-job-python-shell/ShellJob/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ShellJobServiceRoleDefaultPolicy7F22D315", + "roles": [ + { + "Ref": "ShellJobServiceRoleCF97BC4B" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Code8835353412338ec0bac0ee05542d1c16": { + "id": "Code8835353412338ec0bac0ee05542d1c16", + "path": "aws-glue-job-python-shell/ShellJob/Code8835353412338ec0bac0ee05542d1c16", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-glue-job-python-shell/ShellJob/Code8835353412338ec0bac0ee05542d1c16/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-glue-job-python-shell/ShellJob/Code8835353412338ec0bac0ee05542d1c16/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-glue-job-python-shell/ShellJob/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Glue::Job", + "aws:cdk:cloudformation:props": { + "command": { + "name": "pythonshell", + "scriptLocation": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py" + ] + ] + }, + "pythonVersion": "3" + }, + "defaultArguments": { + "--job-language": "python", + "arg1": "value1", + "arg2": "value2" + }, + "glueVersion": "1.0", + "maxCapacity": 0.0625, + "name": "ShellJob", + "role": { + "Fn::GetAtt": [ + "ShellJobServiceRoleCF97BC4B", + "Arn" + ] + }, + "tags": { + "key": "value" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_glue.CfnJob", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-glue-alpha.Job", + "version": "0.0.0" + } + }, + "ShellJob39": { + "id": "ShellJob39", + "path": "aws-glue-job-python-shell/ShellJob39", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-glue-job-python-shell/ShellJob39/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-glue-job-python-shell/ShellJob39/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-glue-job-python-shell/ShellJob39/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "glue.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSGlueServiceRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-glue-job-python-shell/ShellJob39/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-glue-job-python-shell/ShellJob39/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ShellJob39ServiceRoleDefaultPolicy38A33919", + "roles": [ + { + "Ref": "ShellJob39ServiceRole2F6F3768" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-glue-job-python-shell/ShellJob39/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Glue::Job", + "aws:cdk:cloudformation:props": { + "command": { + "name": "pythonshell", + "scriptLocation": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855.py" + ] + ] + }, + "pythonVersion": "3.9" + }, + "defaultArguments": { + "--job-language": "python", + "arg1": "value1", + "arg2": "value2" + }, + "glueVersion": "3.0", + "maxCapacity": 1, + "name": "ShellJob39", + "role": { + "Fn::GetAtt": [ + "ShellJob39ServiceRole2F6F3768", + "Arn" + ] + }, + "tags": { + "key": "value" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_glue.CfnJob", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-glue-alpha.Job", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-glue-job-python-shell/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-glue-job-python-shell/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "aws-glue-job-python-shell-integ-test": { + "id": "aws-glue-job-python-shell-integ-test", + "path": "aws-glue-job-python-shell-integ-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-glue-job-python-shell-integ-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-glue-job-python-shell-integ-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-glue-job-python-shell-integ-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-glue-job-python-shell-integ-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-glue-job-python-shell-integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.ts b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.ts new file mode 100644 index 0000000000000..4e283327f0ad4 --- /dev/null +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-python-shell.ts @@ -0,0 +1,65 @@ +import * as integ from '@aws-cdk/integ-tests-alpha'; +import * as path from 'path'; +import * as cdk from 'aws-cdk-lib'; +import * as glue from '../lib'; + +/** + * To verify the ability to run jobs created in this test + * + * Run the job using + * `aws glue start-job-run --region us-east-1 --job-name ` + * This will return a runId + * + * Get the status of the job run using + * `aws glue get-job-run --region us-east-1 --job-name --run-id ` + * + * For example, to test the ShellJob + * - Run: `aws glue start-job-run --region us-east-1 --job-name ShellJob` + * - Get Status: `aws glue get-job-run --region us-east-1 --job-name ShellJob --run-id ` + * - Check output: `aws logs get-log-events --region us-east-1 --log-group-name "/aws-glue/python-jobs/output" --log-stream-name ">` which should show "hello world" + */ +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-glue-job-python-shell'); + +const script = glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')); + +new glue.Job(stack, 'ShellJob', { + jobName: 'ShellJob', + executable: glue.JobExecutable.pythonShell({ + glueVersion: glue.GlueVersion.V1_0, + pythonVersion: glue.PythonVersion.THREE, + script, + }), + defaultArguments: { + arg1: 'value1', + arg2: 'value2', + }, + tags: { + key: 'value', + }, + maxCapacity: 0.0625, +}); + +new glue.Job(stack, 'ShellJob39', { + jobName: 'ShellJob39', + executable: glue.JobExecutable.pythonShell({ + glueVersion: glue.GlueVersion.V3_0, + pythonVersion: glue.PythonVersion.THREE_NINE, + script, + }), + defaultArguments: { + arg1: 'value1', + arg2: 'value2', + }, + tags: { + key: 'value', + }, + maxCapacity: 1.0, +}); + +new integ.IntegTest(app, 'aws-glue-job-python-shell-integ-test', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-glue-alpha/test/job-executable.test.ts b/packages/@aws-cdk/aws-glue-alpha/test/job-executable.test.ts index ea575f1a022d4..28c6225c542b6 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/job-executable.test.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/job-executable.test.ts @@ -67,6 +67,24 @@ describe('JobExecutable', () => { })).toThrow(/Python shell requires the language to be set to Python/); }); + test('with JobType.of("pythonshell") and a language other than JobLanguage.PYTHON should throw', () => { + expect(() => glue.JobExecutable.of({ + glueVersion: glue.GlueVersion.V3_0, + type: glue.JobType.of('pythonshell'), + language: glue.JobLanguage.SCALA, + script, + })).toThrow(/Python shell requires the language to be set to Python/); + }); + + test('with JobType.of("glueray") and a language other than JobLanguage.PYTHON should throw', () => { + expect(() => glue.JobExecutable.of({ + glueVersion: glue.GlueVersion.V4_0, + type: glue.JobType.of('glueray'), + language: glue.JobLanguage.SCALA, + script, + })).toThrow(/Ray requires the language to be set to Python/); + }); + test('with JobType.RAY and a language other than JobLanguage.PYTHON should throw', () => { expect(() => glue.JobExecutable.of({ glueVersion: glue.GlueVersion.V4_0, @@ -87,7 +105,7 @@ describe('JobExecutable', () => { })).toThrow(/extraPythonFiles is not supported for languages other than JobLanguage.PYTHON/); }); - [glue.GlueVersion.V0_9, glue.GlueVersion.V3_0, glue.GlueVersion.V4_0].forEach((glueVersion) => { + [glue.GlueVersion.V0_9, glue.GlueVersion.V4_0].forEach((glueVersion) => { test(`with JobType.PYTHON_SHELL and GlueVersion ${glueVersion} should throw`, () => { expect(() => glue.JobExecutable.of({ type: glue.JobType.PYTHON_SHELL, @@ -99,6 +117,42 @@ describe('JobExecutable', () => { }); }); + [glue.GlueVersion.V0_9, glue.GlueVersion.V4_0].forEach((glueVersion) => { + test(`with JobType.PYTHON_SHELL and GlueVersion.of("${glueVersion.name}") should throw`, () => { + expect(() => glue.JobExecutable.of({ + type: glue.JobType.PYTHON_SHELL, + language: glue.JobLanguage.PYTHON, + pythonVersion: glue.PythonVersion.TWO, + script, + glueVersion: glue.GlueVersion.of(glueVersion.name), + })).toThrow(`Specified GlueVersion ${glueVersion.name} does not support Python Shell`); + }); + }); + + [glue.GlueVersion.V0_9, glue.GlueVersion.V1_0, glue.GlueVersion.V2_0, glue.GlueVersion.V3_0].forEach((glueVersion) => { + test(`with JobType.RAY and GlueVersion ${glueVersion} should throw`, () => { + expect(() => glue.JobExecutable.of({ + type: glue.JobType.RAY, + language: glue.JobLanguage.PYTHON, + pythonVersion: glue.PythonVersion.TWO, + script, + glueVersion, + })).toThrow(`Specified GlueVersion ${glueVersion.name} does not support Ray`); + }); + }); + + [glue.GlueVersion.V0_9, glue.GlueVersion.V1_0, glue.GlueVersion.V2_0, glue.GlueVersion.V3_0].forEach((glueVersion) => { + test(`with JobType.of("glueray") and GlueVersion ${glueVersion} should throw`, () => { + expect(() => glue.JobExecutable.of({ + type: glue.JobType.of('glueray'), + language: glue.JobLanguage.PYTHON, + pythonVersion: glue.PythonVersion.TWO, + script, + glueVersion, + })).toThrow(`Specified GlueVersion ${glueVersion.name} does not support Ray`); + }); + }); + [glue.GlueVersion.V0_9, glue.GlueVersion.V1_0].forEach((glueVersion) => { test(`with extraJarsFirst set and GlueVersion ${glueVersion.name} should throw`, () => { expect(() => glue.JobExecutable.of({ @@ -112,6 +166,19 @@ describe('JobExecutable', () => { }); }); + [glue.GlueVersion.V0_9, glue.GlueVersion.V1_0].forEach((glueVersion) => { + test(`with extraJarsFirst set and GlueVersion.of("${glueVersion.name}") should throw`, () => { + expect(() => glue.JobExecutable.of({ + type: glue.JobType.ETL, + language: glue.JobLanguage.PYTHON, + pythonVersion: glue.PythonVersion.TWO, + extraJarsFirst: true, + script, + glueVersion: glue.GlueVersion.of(glueVersion.name), + })).toThrow(`Specified GlueVersion ${glueVersion.name} does not support extraJarsFirst`); + }); + }); + [glue.GlueVersion.V2_0, glue.GlueVersion.V3_0, glue.GlueVersion.V4_0].forEach((glueVersion) => { test(`with PythonVersion.TWO and GlueVersion ${glueVersion} should throw`, () => { expect(() => glue.JobExecutable.of({ @@ -124,6 +191,18 @@ describe('JobExecutable', () => { }); }); + [glue.GlueVersion.V2_0, glue.GlueVersion.V3_0, glue.GlueVersion.V4_0].forEach((glueVersion) => { + test(`with PythonVersion.TWO and GlueVersion.of("${glueVersion.name}") should throw`, () => { + expect(() => glue.JobExecutable.of({ + type: glue.JobType.ETL, + language: glue.JobLanguage.PYTHON, + pythonVersion: glue.PythonVersion.TWO, + script, + glueVersion: glue.GlueVersion.of(glueVersion.name), + })).toThrow(`Specified GlueVersion ${glueVersion.name} does not support PythonVersion 2`); + }); + }); + test('with PythonVersion set to PythonVersion.THREE_NINE and JobType etl should throw', () => { expect(() => glue.JobExecutable.of({ type: glue.JobType.ETL, @@ -144,6 +223,16 @@ describe('JobExecutable', () => { })).toBeDefined(); }); + test('with PythonVersion PythonVersion.THREE_NINE and JobType.of("pythonshell") should succeed', () => { + expect(glue.JobExecutable.of({ + type: glue.JobType.of('pythonshell'), + glueVersion: glue.GlueVersion.V1_0, + language: glue.JobLanguage.PYTHON, + pythonVersion: glue.PythonVersion.THREE_NINE, + script, + })).toBeDefined(); + }); + test('with PythonVersion PythonVersion.THREE_NINE and JobType ray should succeed', () => { expect(glue.JobExecutable.of({ type: glue.JobType.RAY, @@ -154,5 +243,16 @@ describe('JobExecutable', () => { script, })).toBeDefined(); }); + + test('with PythonVersion PythonVersion.THREE_NINE and JobTypeof("glueray") should succeed', () => { + expect(glue.JobExecutable.of({ + type: glue.JobType.of('glueray'), + glueVersion: glue.GlueVersion.V4_0, + language: glue.JobLanguage.PYTHON, + pythonVersion: glue.PythonVersion.THREE_NINE, + runtime: glue.Runtime.RAY_TWO_FOUR, + script, + })).toBeDefined(); + }); }); }); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue-alpha/test/job.test.ts b/packages/@aws-cdk/aws-glue-alpha/test/job.test.ts index cdb5a838fba09..81245f43929af 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/job.test.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/job.test.ts @@ -1075,6 +1075,17 @@ describe('Job', () => { })).toThrow('maxCapacity cannot be used when GlueVersion 2.0 or later'); }); + test('maxCapacity with Python Shell jobs validation', () => { + expect(() => new glue.Job(stack, 'Job', { + executable: glue.JobExecutable.pythonShell({ + glueVersion: glue.GlueVersion.V2_0, + pythonVersion: glue.PythonVersion.THREE, + script, + }), + maxCapacity: 10, + })).toThrow(/maxCapacity value must be either 0.0625 or 1 for JobType.PYTHON_SHELL jobs/); + }); + test('workerType without workerCount should throw', () => { expect(() => new glue.Job(stack, 'Job', { executable: glue.JobExecutable.pythonEtl({ diff --git a/packages/@aws-cdk/aws-groundstation-alpha/.eslintrc.js b/packages/@aws-cdk/aws-groundstation-alpha/.eslintrc.js new file mode 100644 index 0000000000000..b284f20df26e9 --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/.eslintrc.js @@ -0,0 +1,8 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; + +baseConfig.rules['import/no-extraneous-dependencies'] = ['error', { devDependencies: true, peerDependencies: true } ]; +baseConfig.rules['import/order'] = 'off'; +baseConfig.rules['@aws-cdk/invalid-cfn-imports'] = 'off'; + +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-groundstation-alpha/.gitignore b/packages/@aws-cdk/aws-groundstation-alpha/.gitignore new file mode 100644 index 0000000000000..82d22cc722bba --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/.gitignore @@ -0,0 +1,25 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +nyc.config.js +.LAST_PACKAGE +*.snk +!.eslintrc.js +!jest.config.js + +junit.xml +!**/*.snapshot/**/asset.*/*.js +!**/*.snapshot/**/asset.*/*.d.ts + +!**/*.snapshot/**/asset.*/** + + diff --git a/packages/@aws-cdk/aws-groundstation-alpha/.npmignore b/packages/@aws-cdk/aws-groundstation-alpha/.npmignore new file mode 100644 index 0000000000000..2f484b8db6b88 --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts +**/*.snapshot diff --git a/packages/@aws-cdk/aws-groundstation-alpha/LICENSE b/packages/@aws-cdk/aws-groundstation-alpha/LICENSE new file mode 100644 index 0000000000000..9b722c65c5481 --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-groundstation-alpha/NOTICE b/packages/@aws-cdk/aws-groundstation-alpha/NOTICE new file mode 100644 index 0000000000000..a27b7dd317649 --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-groundstation-alpha/README.md b/packages/@aws-cdk/aws-groundstation-alpha/README.md new file mode 100644 index 0000000000000..0155384210c89 --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/README.md @@ -0,0 +1,38 @@ +# AWS::GroundStation Construct Library + + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + + + + +There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. Here are some suggestions on how to proceed: + +- Search [Construct Hub for GroundStation construct libraries](https://constructs.dev/search?q=groundstation) +- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation AWS::GroundStation resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_GroundStation.html) directly. + + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::GroundStation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_GroundStation.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-groundstation-alpha/jest.config.js b/packages/@aws-cdk/aws-groundstation-alpha/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-groundstation-alpha/lib/index.ts b/packages/@aws-cdk/aws-groundstation-alpha/lib/index.ts new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/@aws-cdk/aws-groundstation-alpha/package.json b/packages/@aws-cdk/aws-groundstation-alpha/package.json new file mode 100644 index 0000000000000..d1f06441ce4c2 --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/package.json @@ -0,0 +1,121 @@ +{ + "name": "@aws-cdk/aws-groundstation-alpha", + "version": "0.0.0", + "private": false, + "description": "The CDK Construct Library for AWS::GroundStation", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "targets": { + "java": { + "package": "software.amazon.awscdk.services.groundstation.alpha", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "groundstation-alpha" + } + }, + "dotnet": { + "namespace": "Amazon.CDK.AWS.GroundStation.Alpha", + "packageId": "Amazon.CDK.AWS.GroundStation.Alpha", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png" + }, + "python": { + "distName": "aws-cdk.aws-groundstation-alpha", + "module": "aws_cdk.aws_groundstation_alpha", + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 2" + ] + }, + "go": { + "moduleName": "github.com/aws/aws-cdk-go", + "packageName": "awscdkgroundstationalpha" + } + }, + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-groundstation-alpha" + }, + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "integ-runner", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "build+test+package": "yarn build+test && yarn package", + "build+test": "yarn build && yarn test", + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "env": { + "AWSLINT_BASE_CONSTRUCT": true + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "groundstation" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@aws-cdk/integ-tests-alpha": "0.0.0", + "@types/jest": "^29.5.3", + "aws-cdk-lib": "0.0.0", + "constructs": "^10.0.0", + "jest": "^29.6.2" + }, + "dependencies": {}, + "homepage": "https://github.com/aws/aws-cdk", + "peerDependencies": { + "aws-cdk-lib": "^0.0.0", + "constructs": "^10.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "experimental", + "awslint": { + "exclude": [ + "*:*" + ] + }, + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + }, + "pkglint": { + "exclude": [ + "naming/package-matches-directory", + "assert/assert-dependency" + ] + } +} diff --git a/packages/@aws-cdk/aws-groundstation-alpha/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-groundstation-alpha/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..2c06172d57671 --- /dev/null +++ b/packages/@aws-cdk/aws-groundstation-alpha/rosetta/default.ts-fixture @@ -0,0 +1,10 @@ +// Fixture with packages imported, but nothing else +import * as groundstation from '@aws-cdk/aws-groundstation-alpha'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + + /// here + } +} diff --git a/packages/@aws-cdk/aws-redshift-alpha/package.json b/packages/@aws-cdk/aws-redshift-alpha/package.json index 3c69c26592ae0..c6e5ff72d9fd0 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/package.json +++ b/packages/@aws-cdk/aws-redshift-alpha/package.json @@ -84,9 +84,9 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@aws-sdk/client-redshift": "^3.382.0", - "@aws-sdk/client-redshift-data": "^3.382.0", - "@aws-sdk/client-secrets-manager": "^3.382.0", + "@aws-sdk/client-redshift": "^3.387.0", + "@aws-sdk/client-redshift-data": "^3.387.0", + "@aws-sdk/client-secrets-manager": "^3.387.0", "@types/jest": "^29.5.3", "aws-cdk-lib": "0.0.0", "constructs": "^10.0.0", diff --git a/packages/@aws-cdk/custom-resource-handlers/package.json b/packages/@aws-cdk/custom-resource-handlers/package.json index e983c2f005690..f1b56730fb760 100644 --- a/packages/@aws-cdk/custom-resource-handlers/package.json +++ b/packages/@aws-cdk/custom-resource-handlers/package.json @@ -29,11 +29,11 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.3", "jest": "^29.6.2", - "esbuild": "^0.18.17" + "esbuild": "^0.19.0" }, "dependencies": { - "@aws-sdk/client-ecr": "^3.382.0", - "@aws-sdk/client-s3": "^3.382.0" + "@aws-sdk/client-ecr": "^3.387.0", + "@aws-sdk/client-s3": "^3.387.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES b/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES index b3c36c8259dca..971057aaccbf7 100644 --- a/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES +++ b/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES @@ -176,7 +176,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE ---------------- -** aws-sdk@2.1427.0 - https://www.npmjs.com/package/aws-sdk/v/2.1427.0 | Apache-2.0 +** aws-sdk@2.1432.0 - https://www.npmjs.com/package/aws-sdk/v/2.1432.0 | Apache-2.0 AWS SDK for JavaScript Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/integ-tests-alpha/package.json b/packages/@aws-cdk/integ-tests-alpha/package.json index 7a75f4173be1c..40233777cd490 100644 --- a/packages/@aws-cdk/integ-tests-alpha/package.json +++ b/packages/@aws-cdk/integ-tests-alpha/package.json @@ -70,10 +70,10 @@ "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/sdk-v2-to-v3-adapter": "0.0.0", - "@aws-sdk/client-ec2": "^3.382.0", - "@aws-sdk/client-s3": "^3.382.0", - "@aws-sdk/client-sfn": "^3.382.0", - "@aws-sdk/types": "^3.378.0", + "@aws-sdk/client-ec2": "^3.387.0", + "@aws-sdk/client-s3": "^3.387.0", + "@aws-sdk/client-sfn": "^3.387.0", + "@aws-sdk/types": "^3.387.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^29.5.3", "aws-sdk-client-mock": "^3.0.0", diff --git a/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts b/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts index 8e6b2e3a9cb76..f799e7ef38f4a 100644 --- a/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts +++ b/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts @@ -222,7 +222,7 @@ export interface UserPoolClientOptions { /** * The set of OAuth authentication flows to enable on the client * @see https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html - * @default - all auth flows disabled + * @default - If you don't specify a value, your user client supports ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH. */ readonly authFlows?: AuthFlow; diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts index 2f4d9525c8130..c8a8cbfee7b1d 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts @@ -36,7 +36,7 @@ export interface NodejsFunctionProps extends lambda.FunctionOptions { * The runtime environment. Only runtimes of the Node.js family are * supported. * - * @default Runtime.NODEJS_14_X + * @default Runtime.NODEJS_18_X */ readonly runtime?: lambda.Runtime; diff --git a/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts b/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts index b84bf4b2e76d5..a07ac4deffbd2 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts @@ -436,6 +436,8 @@ export class AuroraMysqlEngineVersion { public static readonly VER_3_03_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.03.0'); /** Version "8.0.mysql_aurora.3.03.1". */ public static readonly VER_3_03_1 = AuroraMysqlEngineVersion.builtIn_8_0('3.03.1'); + /** Version "8.0.mysql_aurora.3.04.0". */ + public static readonly VER_3_04_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.04.0'); /** * Create a new AuroraMysqlEngineVersion with an arbitrary version. diff --git a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts index 750cfaf4970c2..cbe7c9dcbe1db 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts @@ -594,6 +594,8 @@ export class MysqlEngineVersion { public static readonly VER_5_7_41 = MysqlEngineVersion.of('5.7.41', '5.7'); /** Version "5.7.42". */ public static readonly VER_5_7_42 = MysqlEngineVersion.of('5.7.42', '5.7'); + /** Version "5.7.43". */ + public static readonly VER_5_7_43 = MysqlEngineVersion.of('5.7.43', '5.7'); /** Version "8.0" (only a major version, without a specific minor version). */ public static readonly VER_8_0 = MysqlEngineVersion.of('8.0', '8.0'); @@ -631,6 +633,8 @@ export class MysqlEngineVersion { public static readonly VER_8_0_32 = MysqlEngineVersion.of('8.0.32', '8.0'); /** Version "8.0.33". */ public static readonly VER_8_0_33 = MysqlEngineVersion.of('8.0.33', '8.0'); + /** Version "8.0.34". */ + public static readonly VER_8_0_34 = MysqlEngineVersion.of('8.0.34', '8.0'); /** * Create a new MysqlEngineVersion with an arbitrary version. diff --git a/packages/aws-cdk-lib/aws-rds/lib/instance.ts b/packages/aws-cdk-lib/aws-rds/lib/instance.ts index 30fb386be3ae9..0df3c5d262595 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/instance.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/instance.ts @@ -1070,9 +1070,8 @@ abstract class DatabaseInstanceSource extends DatabaseInstanceNew implements IDa * Grant the given identity connection access to the database. * * @param grantee the Principal to grant the permissions to - * @param dbUser the name of the database user to allow connecting as to the db instance - * - * @default the default user, obtained from the Secret + * @param dbUser the name of the database user to allow connecting as to the db instance, + * or the default database user, obtained from the Secret, if not specified */ public grantConnect(grantee: iam.IGrantable, dbUser?: string): iam.Grant { if (!dbUser) { @@ -1080,7 +1079,7 @@ abstract class DatabaseInstanceSource extends DatabaseInstanceNew implements IDa throw new Error('A secret or dbUser is required to grantConnect()'); } - dbUser = this.secret.secretValueFromJson('username').toString(); + dbUser = this.secret.secretValueFromJson('username').unsafeUnwrap(); } return super.grantConnect(grantee, dbUser); diff --git a/packages/aws-cdk-lib/aws-rds/test/instance.test.ts b/packages/aws-cdk-lib/aws-rds/test/instance.test.ts index dc0c2ef29b583..fb89ad552dc7c 100644 --- a/packages/aws-cdk-lib/aws-rds/test/instance.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/instance.test.ts @@ -1199,6 +1199,59 @@ describe('instance', () => { }); }); + test('createGrant - creates IAM policy and enables IAM auth on instance with secret credentials without passing dbUser', () => { + const instance = new rds.DatabaseInstance(stack, 'Instance', { + vpc, + engine: rds.DatabaseInstanceEngine.postgres({ + version: rds.PostgresEngineVersion.VER_14, + }), + credentials: rds.Credentials.fromGeneratedSecret('dbuser'), + }); + const role = new Role(stack, 'DBRole', { + assumedBy: new AccountPrincipal(stack.account), + }); + instance.grantConnect(role); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [{ + Effect: 'Allow', + Action: 'rds-db:connect', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':rds-db:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':dbuser:', + { + 'Fn::GetAtt': [ + 'InstanceC1063A87', + 'DbiResourceId', + ], + }, + '/{{resolve:secretsmanager:', + { Ref: 'InstanceSecretAttachment83BEE581' }, + ':SecretString:username::}}', + ], + ], + }, + }], + Version: '2012-10-17', + }, + }); + }); + test('createGrant - throws if IAM auth disabled', () => { const instance = new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_19 }), diff --git a/packages/aws-cdk-lib/aws-route53/lib/cross-account-zone-delegation-handler/index.ts b/packages/aws-cdk-lib/aws-route53/lib/cross-account-zone-delegation-handler/index.ts index 89d127ad983e6..7867e7a45a725 100644 --- a/packages/aws-cdk-lib/aws-route53/lib/cross-account-zone-delegation-handler/index.ts +++ b/packages/aws-cdk-lib/aws-route53/lib/cross-account-zone-delegation-handler/index.ts @@ -1,7 +1,5 @@ // eslint-disable-next-line import/no-extraneous-dependencies -import { Route53 } from '@aws-sdk/client-route-53'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'; +import { Credentials, Route53, STS } from 'aws-sdk'; interface ResourceProperties { AssumeRoleArn: string, @@ -32,16 +30,8 @@ async function cfnEventHandler(props: ResourceProperties, isDeleteEvent: boolean throw Error('One of ParentZoneId or ParentZoneName must be specified'); } - const timestamp = (new Date()).getTime(); - const route53 = new Route53({ - credentials: fromTemporaryCredentials({ - clientConfig: { useGlobalEndpoint: !UseRegionalStsEndpoint }, - params: { - RoleArn: AssumeRoleArn, - RoleSessionName: `cross-account-zone-delegation-${timestamp}`, - }, - }), - }); + const credentials = await getCrossAccountCredentials(AssumeRoleArn, !!UseRegionalStsEndpoint); + const route53 = new Route53({ credentials }); const parentZoneId = ParentZoneId ?? await getHostedZoneIdByName(ParentZoneName!, route53); @@ -58,17 +48,38 @@ async function cfnEventHandler(props: ResourceProperties, isDeleteEvent: boolean }, }], }, + }).promise(); +} + +async function getCrossAccountCredentials(roleArn: string, regionalEndpoint: boolean): Promise { + const sts = new STS(regionalEndpoint ? { stsRegionalEndpoints: 'regional' } : {}); + const timestamp = (new Date()).getTime(); + + const { Credentials: assumedCredentials } = await sts + .assumeRole({ + RoleArn: roleArn, + RoleSessionName: `cross-account-zone-delegation-${timestamp}`, + }) + .promise(); + + if (!assumedCredentials) { + throw Error('Error getting assume role credentials'); + } + + return new Credentials({ + accessKeyId: assumedCredentials.AccessKeyId, + secretAccessKey: assumedCredentials.SecretAccessKey, + sessionToken: assumedCredentials.SessionToken, }); } async function getHostedZoneIdByName(name: string, route53: Route53): Promise { - const zones = await route53.listHostedZonesByName({ DNSName: name }); - const matchedZones = zones.HostedZones?.filter(zone => zone.Name === `${name}.`) ?? []; + const zones = await route53.listHostedZonesByName({ DNSName: name }).promise(); + const matchedZones = zones.HostedZones.filter(zone => zone.Name === `${name}.`); - if (matchedZones && matchedZones.length !== 1) { + if (matchedZones.length !== 1) { throw Error(`Expected one hosted zone to match the given name but found ${matchedZones.length}`); } - // will always be defined because we throw if length !==1 - return matchedZones[0].Id!; + return matchedZones[0].Id; } diff --git a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts index 6e591efe57663..db24f76df2971 100644 --- a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts +++ b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts @@ -795,7 +795,7 @@ export class CrossAccountZoneDelegationRecord extends Construct { const provider = CustomResourceProvider.getOrCreateProvider(this, CROSS_ACCOUNT_ZONE_DELEGATION_RESOURCE_TYPE, { codeDirectory: path.join(__dirname, 'cross-account-zone-delegation-handler'), - runtime: CustomResourceProviderRuntime.NODEJS_18_X, + runtime: CustomResourceProviderRuntime.NODEJS_16_X, }); const role = iam.Role.fromRoleArn(this, 'cross-account-zone-delegation-handler-role', provider.roleArn); diff --git a/packages/aws-cdk-lib/aws-route53/test/cross-account-zone-delegation-handler/index.test.ts b/packages/aws-cdk-lib/aws-route53/test/cross-account-zone-delegation-handler/index.test.ts index e6db1d8d22d7b..04f7a54b5f1a1 100644 --- a/packages/aws-cdk-lib/aws-route53/test/cross-account-zone-delegation-handler/index.test.ts +++ b/packages/aws-cdk-lib/aws-route53/test/cross-account-zone-delegation-handler/index.test.ts @@ -1,42 +1,31 @@ import { handler } from '../../lib/cross-account-zone-delegation-handler'; -const mockAssumeRole = jest.fn(); -const mockChangeResourceRecordSets = jest.fn(); -const mockListHostedZonesByName = jest.fn(); - const mockStsClient = { - assumeRole: mockAssumeRole, + assumeRole: jest.fn().mockReturnThis(), + promise: jest.fn(), }; - const mockRoute53Client = { - changeResourceRecordSets: mockChangeResourceRecordSets, - listHostedZonesByName: mockListHostedZonesByName, + changeResourceRecordSets: jest.fn().mockReturnThis(), + listHostedZonesByName: jest.fn().mockReturnThis(), + promise: jest.fn(), }; -jest.mock('@aws-sdk/client-sts', () => { - return { - STS: jest.fn().mockImplementation(() => { - return mockStsClient;; - }), - }; -}); - -jest.mock('@aws-sdk/client-route-53', () => { +jest.mock('aws-sdk', () => { return { - Route53: jest.fn().mockImplementation(() => { - return mockRoute53Client; - }), + ...(jest.requireActual('aws-sdk') as any), + STS: jest.fn(() => mockStsClient), + Route53: jest.fn(() => mockRoute53Client), }; }); beforeEach(() => { - mockStsClient.assumeRole.mockClear(); - mockRoute53Client.changeResourceRecordSets.mockClear(); - mockRoute53Client.listHostedZonesByName.mockClear(); + mockStsClient.assumeRole.mockReturnThis(); + mockRoute53Client.changeResourceRecordSets.mockReturnThis(); + mockRoute53Client.listHostedZonesByName.mockReturnThis(); }); -afterAll(() => { - jest.resetAllMocks(); +afterEach(() => { + jest.clearAllMocks(); }); test('throws error if both ParentZoneId and ParentZoneName are not provided', async () => { @@ -50,10 +39,27 @@ test('throws error if both ParentZoneId and ParentZoneName are not provided', as await expect(invokeHandler(event)).rejects.toThrow(/One of ParentZoneId or ParentZoneName must be specified/); }); +test('throws error if getting credentials fails', async () => { + // GIVEN + mockStsClient.promise.mockResolvedValueOnce({ Credentials: undefined }); + + // WHEN + const event= getCfnEvent(); + + // THEN + await expect(invokeHandler(event)).rejects.toThrow(/Error getting assume role credentials/); + + expect(mockStsClient.assumeRole).toHaveBeenCalledTimes(1); + expect(mockStsClient.assumeRole).toHaveBeenCalledWith({ + RoleArn: 'roleArn', + RoleSessionName: expect.any(String), + }); +}); + test('calls create resource record set with Upsert for Create event', async () => { // GIVEN - mockStsClient.assumeRole.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); - mockRoute53Client.changeResourceRecordSets.mockResolvedValueOnce({}); + mockStsClient.promise.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); + mockRoute53Client.promise.mockResolvedValueOnce({}); // WHEN const event= getCfnEvent(); @@ -79,8 +85,8 @@ test('calls create resource record set with Upsert for Create event', async () = test('calls create resource record set with DELETE for Delete event', async () => { // GIVEN - mockStsClient.assumeRole.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); - mockRoute53Client.changeResourceRecordSets.mockResolvedValueOnce({}); + mockStsClient.promise.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); + mockRoute53Client.promise.mockResolvedValueOnce({}); // WHEN const event= getCfnEvent({ RequestType: 'Delete' }); @@ -109,9 +115,9 @@ test('calls listHostedZonesByName to get zoneId if ParentZoneId is not provided' const parentZoneName = 'some.zone'; const parentZoneId = 'zone-id'; - mockStsClient.assumeRole.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); - mockRoute53Client.listHostedZonesByName.mockResolvedValueOnce({ HostedZones: [{ Name: `${parentZoneName}.`, Id: parentZoneId }] }); - mockRoute53Client.changeResourceRecordSets.mockResolvedValueOnce({}); + mockStsClient.promise.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); + mockRoute53Client.promise.mockResolvedValueOnce({ HostedZones: [{ Name: `${parentZoneName}.`, Id: parentZoneId }] }); + mockRoute53Client.promise.mockResolvedValueOnce({}); // WHEN const event = getCfnEvent({}, { @@ -146,8 +152,8 @@ test('throws if more than one HostedZones are returnd for the provided ParentHos const parentZoneName = 'some.zone'; const parentZoneId = 'zone-id'; - mockStsClient.assumeRole.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); - mockRoute53Client.listHostedZonesByName.mockResolvedValueOnce({ + mockStsClient.promise.mockResolvedValueOnce({ Credentials: { AccessKeyId: 'K', SecretAccessKey: 'S', SessionToken: 'T' } }); + mockRoute53Client.promise.mockResolvedValueOnce({ HostedZones: [ { Name: `${parentZoneName}.`, Id: parentZoneId }, { Name: `${parentZoneName}.`, Id: parentZoneId }, diff --git a/packages/aws-cdk-lib/core/README.md b/packages/aws-cdk-lib/core/README.md index d69e3cf00d637..707d70d56e13d 100644 --- a/packages/aws-cdk-lib/core/README.md +++ b/packages/aws-cdk-lib/core/README.md @@ -1058,6 +1058,31 @@ declare const regionTable: CfnMapping; regionTable.findInMap(Aws.REGION, 'regionName'); ``` +An optional default value can also be passed to `findInMap`. If either key is not found in the map and the mapping is lazy, `findInMap` will return the default value and not render the mapping. +If the mapping is not lazy or either key is an unresolved token, the call to `findInMap` will return a token that resolves to +`{ "Fn::FindInMap": [ "MapName", "TopLevelKey", "SecondLevelKey", { "DefaultValue": "DefaultValue" } ] }`, and the mapping will be rendered. +Note that the `AWS::LanguageExtentions` transform is added to enable the default value functionality. + +For example, the following code will again not produce anything in the "Mappings" section. The +call to `findInMap` will be able to resolve the value during synthesis and simply return +`'Region not found'`. + +```ts +const regionTable = new CfnMapping(this, 'RegionTable', { + mapping: { + 'us-east-1': { + regionName: 'US East (N. Virginia)', + }, + 'us-east-2': { + regionName: 'US East (Ohio)', + }, + }, + lazy: true, +}); + +regionTable.findInMap('us-west-1', 'regionName', 'Region not found'); +``` + [cfn-mappings]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html ### Dynamic References diff --git a/packages/aws-cdk-lib/core/lib/cfn-fn.ts b/packages/aws-cdk-lib/core/lib/cfn-fn.ts index 755181dd952fe..06344e90b5bd6 100644 --- a/packages/aws-cdk-lib/core/lib/cfn-fn.ts +++ b/packages/aws-cdk-lib/core/lib/cfn-fn.ts @@ -233,10 +233,12 @@ export class Fn { /** * The intrinsic function ``Fn::FindInMap`` returns the value corresponding to * keys in a two-level map that is declared in the Mappings section. + * Warning: do not use with lazy mappings as this function will not guarentee a lazy mapping to render in the template. + * Prefer to use `CfnMapping.findInMap` in general. * @returns a token represented as a string */ - public static findInMap(mapName: string, topLevelKey: string, secondLevelKey: string): string { - return Fn._findInMap(mapName, topLevelKey, secondLevelKey).toString(); + public static findInMap(mapName: string, topLevelKey: string, secondLevelKey: string, defaultValue?: string): string { + return Fn._findInMap(mapName, topLevelKey, secondLevelKey, defaultValue).toString(); } /** @@ -245,8 +247,8 @@ export class Fn { * * @internal */ - public static _findInMap(mapName: string, topLevelKey: string, secondLevelKey: string): IResolvable { - return new FnFindInMap(mapName, topLevelKey, secondLevelKey); + public static _findInMap(mapName: string, topLevelKey: string, secondLevelKey: string, defaultValue?: string): IResolvable { + return new FnFindInMap(mapName, topLevelKey, secondLevelKey, defaultValue); } /** @@ -500,9 +502,27 @@ class FnFindInMap extends FnBase { * @param mapName The logical name of a mapping declared in the Mappings section that contains the keys and values. * @param topLevelKey The top-level key name. Its value is a list of key-value pairs. * @param secondLevelKey The second-level key name, which is set to one of the keys from the list assigned to TopLevelKey. + * @param defaultValue The value of the default value returned if either the key is not found in the map */ - constructor(mapName: string, topLevelKey: any, secondLevelKey: any) { - super('Fn::FindInMap', [mapName, topLevelKey, secondLevelKey]); + + private readonly mapName: string; + private readonly topLevelKey: string; + private readonly secondLevelKey: string; + private readonly defaultValue?: string; + + constructor(mapName: string, topLevelKey: any, secondLevelKey: any, defaultValue?: string) { + super('Fn::FindInMap', [mapName, topLevelKey, secondLevelKey, defaultValue !== undefined ? { DefaultValue: defaultValue } : undefined]); + this.mapName = mapName; + this.topLevelKey = topLevelKey; + this.secondLevelKey = secondLevelKey; + this.defaultValue = defaultValue; + } + + public resolve(context: IResolveContext): any { + if (this.defaultValue !== undefined) { + Stack.of(context.scope).addTransform('AWS::LanguageExtensions'); + } + return { 'Fn::FindInMap': [this.mapName, this.topLevelKey, this.secondLevelKey, this.defaultValue !== undefined ? { DefaultValue: this.defaultValue } : undefined] }; } } diff --git a/packages/aws-cdk-lib/core/lib/cfn-mapping.ts b/packages/aws-cdk-lib/core/lib/cfn-mapping.ts index 15be7e1054185..d64b9272f1db3 100644 --- a/packages/aws-cdk-lib/core/lib/cfn-mapping.ts +++ b/packages/aws-cdk-lib/core/lib/cfn-mapping.ts @@ -40,8 +40,8 @@ export interface CfnMappingProps { export class CfnMapping extends CfnRefElement { private mapping: Mapping; private readonly lazy?: boolean; - private lazyRender = false; - private lazyInformed = false; + private lazyRender = false; // prescribes `_toCloudFormation()` to pass nothing if value from map is returned lazily. + private lazyInformed = false; // keeps track if user has been sent a message informing them of the possibility to use lazy synthesis. constructor(scope: Construct, id: string, props: CfnMappingProps = {}) { super(scope, id); @@ -64,29 +64,41 @@ export class CfnMapping extends CfnRefElement { /** * @returns A reference to a value in the map based on the two keys. + * If mapping is lazy, the value from the map or default value is returned instead of the reference and the mapping is not rendered in the template. */ - public findInMap(key1: string, key2: string): string { + public findInMap(key1: string, key2: string, defaultValue?: string): string { let fullyResolved = false; + let notInMap = false; if (!Token.isUnresolved(key1)) { if (!(key1 in this.mapping)) { - throw new Error(`Mapping doesn't contain top-level key '${key1}'`); - } - if (!Token.isUnresolved(key2)) { + if (defaultValue === undefined) { + throw new Error(`Mapping doesn't contain top-level key '${key1}'`); + } else { + notInMap = true; + } + } else if (!Token.isUnresolved(key2)) { if (!(key2 in this.mapping[key1])) { - throw new Error(`Mapping doesn't contain second-level key '${key2}'`); + if (defaultValue === undefined) { + throw new Error(`Mapping doesn't contain second-level key '${key2}'`); + } else { + notInMap = true; + } } fullyResolved = true; } } - if (fullyResolved) { - if (this.lazy) { + + if (this.lazy) { + if (notInMap && defaultValue !== undefined) { + return defaultValue; + } else if (fullyResolved) { return this.mapping[key1][key2]; } - } else { - this.lazyRender = true; } - return new CfnMappingEmbedder(this, this.mapping, key1, key2).toString(); + this.lazyRender = !fullyResolved; + + return new CfnMappingEmbedder(this, this.mapping, key1, key2, defaultValue).toString(); } /** @@ -130,12 +142,16 @@ export class CfnMapping extends CfnRefElement { class CfnMappingEmbedder implements IResolvable { readonly creationStack: string[] = []; - constructor(private readonly cfnMapping: CfnMapping, readonly mapping: Mapping, private readonly key1: string, private readonly key2: string) { } + constructor(private readonly cfnMapping: CfnMapping, + readonly mapping: Mapping, + private readonly key1: string, + private readonly key2: string, + private readonly defaultValue?: string) { } public resolve(context: IResolveContext): string { const consumingStack = Stack.of(context.scope); if (consumingStack === Stack.of(this.cfnMapping)) { - return Fn.findInMap(this.cfnMapping.logicalId, this.key1, this.key2); + return Fn.findInMap(this.cfnMapping.logicalId, this.key1, this.key2, this.defaultValue); } const constructScope = consumingStack; @@ -148,7 +164,7 @@ class CfnMappingEmbedder implements IResolvable { }); } - return Fn.findInMap(mappingCopy.logicalId, this.key1, this.key2); + return Fn.findInMap(mappingCopy.logicalId, this.key1, this.key2, this.defaultValue); } public toString() { diff --git a/packages/aws-cdk-lib/core/test/mappings.test.ts b/packages/aws-cdk-lib/core/test/mappings.test.ts index 5f6ae172e1f97..00a3192063094 100644 --- a/packages/aws-cdk-lib/core/test/mappings.test.ts +++ b/packages/aws-cdk-lib/core/test/mappings.test.ts @@ -259,7 +259,7 @@ describe('lazy mapping', () => { }); }); - it('throws if keys can be resolved but are not found in backing', () => { + it('throws if keys can be resolved but are not found in mapping', () => { expect(() => mapping.findInMap('NonExistentKey', 'SecondLevelKey1')) .toThrowError(/Mapping doesn't contain top-level key .*/); expect(() => mapping.findInMap('TopLevelKey1', 'NonExistentKey')) @@ -316,6 +316,161 @@ describe('eager by default', () => { }); }); +describe('defaultValue included', () => { + const backing = { + TopLevelKey1: { + SecondLevelKey1: [1, 2, 3], + SecondLevelKey2: { Hello: 'World' }, + }, + }; + + const defValue = 'foo'; + + let app: App; + let stack: Stack; + let mapping: CfnMapping; + + describe('lazy mapping', () => { + beforeEach(() => { + stack = new Stack(); + mapping = new CfnMapping(stack, 'Lazy Mapping', { + mapping: backing, + lazy: true, + }); + }); + + it('does not create CfnMapping if findInMap keys can be resolved', () => { + const retrievedValue = mapping.findInMap('TopLevelKey1', 'SecondLevelKey1', defValue); + + expect(stack.resolve(retrievedValue)).toStrictEqual([1, 2, 3]); + expect(toCloudFormation(stack)).toStrictEqual({}); + }); + + it('creates CfnMapping if top level key cannot be resolved', () => { + const retrievedValue = mapping.findInMap(Aws.REGION, 'SecondLevelKey1', defValue); + + expect(stack.resolve(retrievedValue)).toStrictEqual({ 'Fn::FindInMap': ['LazyMapping', { Ref: 'AWS::Region' }, 'SecondLevelKey1', { DefaultValue: defValue }] }); + expect(toCloudFormation(stack)).toEqual({ + Mappings: { + LazyMapping: backing, + }, + Transform: 'AWS::LanguageExtensions', + }); + expect(stack.templateOptions.transforms).toEqual(expect.arrayContaining([ + 'AWS::LanguageExtensions', + ])); + }); + + it('creates CfnMapping if second level key cannot be resolved', () => { + const retrievedValue = mapping.findInMap('TopLevelKey1', Aws.REGION, defValue); + + expect(stack.resolve(retrievedValue)).toStrictEqual({ 'Fn::FindInMap': ['LazyMapping', 'TopLevelKey1', { Ref: 'AWS::Region' }, { DefaultValue: defValue }] }); + expect(toCloudFormation(stack)).toStrictEqual({ + Mappings: { + LazyMapping: backing, + }, + Transform: 'AWS::LanguageExtensions', + }); + expect(stack.templateOptions.transforms).toEqual(expect.arrayContaining([ + 'AWS::LanguageExtensions', + ])); + }); + + it('returns default value if keys can be resolved but are not found in mapping', () => { + const retrievedValue1 = mapping.findInMap('NonExistentKey', 'SecondLevelKey1', defValue); + const retrievedValue2 = mapping.findInMap('TopLevelKey1', 'NonExistentKey', defValue); + + expect(stack.resolve(retrievedValue1)).toStrictEqual('foo'); + expect(stack.resolve(retrievedValue2)).toStrictEqual('foo'); + + expect(toCloudFormation(stack)).toStrictEqual({}); + }); + + it('handles multiple unresolved calls', () => { + const retrievedValue1 = mapping.findInMap(Aws.REGION, 'SecondLevelKey1', defValue); + const retrievedValue2 = mapping.findInMap('TopLevelKey1', Aws.REGION, defValue); + + expect(stack.resolve(retrievedValue1)).toStrictEqual({ 'Fn::FindInMap': ['LazyMapping', { Ref: 'AWS::Region' }, 'SecondLevelKey1', { DefaultValue: defValue }] }); + expect(stack.resolve(retrievedValue2)).toStrictEqual({ 'Fn::FindInMap': ['LazyMapping', 'TopLevelKey1', { Ref: 'AWS::Region' }, { DefaultValue: defValue }] }); + + expect(toCloudFormation(stack)).toStrictEqual({ + Mappings: { + LazyMapping: backing, + }, + Transform: expect.arrayContaining(['AWS::LanguageExtensions']), + }); + + expect(stack.templateOptions.transforms).toEqual(expect.arrayContaining([ + 'AWS::LanguageExtensions', + ])); + }); + }); + + describe('eager by default', () => { + beforeEach(() => { + app = new App(); + stack = new Stack(app, 'Stack'); + mapping = new CfnMapping(stack, 'Lazy Mapping', { + mapping: backing, + }); + }); + + it('emits warning if every findInMap resolves immediately', () => { + mapping.findInMap('TopLevelKey1', 'SecondLevelKey1', defValue); + + const assembly = app.synth(); + + expect(getInfoAnnotations(assembly)).toStrictEqual([{ + path: '/Stack/Lazy Mapping', + message: 'Consider making this CfnMapping a lazy mapping by providing `lazy: true`: either no findInMap was called or every findInMap could be immediately resolved without using Fn::FindInMap', + }]); + }); + + it('does not emit warning if a findInMap could not resolve immediately', () => { + const retrievedValue = mapping.findInMap('TopLevelKey1', Aws.REGION, defValue); + + const assembly = app.synth(); + + expect(getInfoAnnotations(assembly)).toStrictEqual([]); + + stack.resolve(retrievedValue); + expect(stack.templateOptions.transforms).toEqual(expect.arrayContaining([ + 'AWS::LanguageExtensions', + ])); + }); + + it('creates CfnMapping if top level key cannot be resolved', () => { + const retrievedValue = mapping.findInMap(Aws.REGION, 'SecondLevelKey1', defValue); + + expect(stack.resolve(retrievedValue)).toStrictEqual({ 'Fn::FindInMap': ['LazyMapping', { Ref: 'AWS::Region' }, 'SecondLevelKey1', { DefaultValue: defValue }] }); // should I use string or variable here? variable works + expect(toCloudFormation(stack)).toStrictEqual({ + Mappings: { + LazyMapping: backing, + }, + Transform: 'AWS::LanguageExtensions', + }); + expect(stack.templateOptions.transforms).toEqual(expect.arrayContaining([ + 'AWS::LanguageExtensions', + ])); + }); + + it('creates CfnMapping if second level key cannot be resolved', () => { + const retrievedValue = mapping.findInMap('TopLevelKey1', Aws.REGION, defValue); + + expect(stack.resolve(retrievedValue)).toStrictEqual({ 'Fn::FindInMap': ['LazyMapping', 'TopLevelKey1', { Ref: 'AWS::Region' }, { DefaultValue: defValue }] }); + expect(toCloudFormation(stack)).toStrictEqual({ + Mappings: { + LazyMapping: backing, + }, + Transform: 'AWS::LanguageExtensions', + }); + expect(stack.templateOptions.transforms).toEqual(expect.arrayContaining([ + 'AWS::LanguageExtensions', + ])); + }); + }); +}); + function getInfoAnnotations(casm: CloudAssembly) { const result = new Array<{ path: string, message: string }>(); for (const stack of Object.values(casm.manifest.artifacts ?? {})) { diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 94b4b281920d4..0f895ef231fa1 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -145,34 +145,34 @@ "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/sdk-v2-to-v3-adapter": "0.0.0", "@aws-cdk/spec2cdk": "0.0.0", - "@aws-sdk/client-acm": "^3.382.0", - "@aws-sdk/client-account": "^3.382.0", - "@aws-sdk/client-codepipeline": "^3.382.0", - "@aws-sdk/client-cloudwatch-logs": "^3.382.0", - "@aws-sdk/client-dynamodb": "^3.382.0", - "@aws-sdk/client-ecr": "^3.382.0", - "@aws-sdk/client-eks": "^3.382.0", - "@aws-sdk/client-lambda": "^3.382.0", - "@aws-sdk/client-route-53": "^3.382.0", - "@aws-sdk/client-s3": "^3.382.0", - "@aws-sdk/client-sfn": "^3.382.0", - "@aws-sdk/client-ssm": "^3.382.0", - "@aws-sdk/client-sts": "^3.382.0", - "@aws-sdk/credential-providers": "^3.382.0", + "@aws-sdk/client-acm": "^3.387.0", + "@aws-sdk/client-account": "^3.387.0", + "@aws-sdk/client-codepipeline": "^3.387.0", + "@aws-sdk/client-cloudwatch-logs": "^3.387.0", + "@aws-sdk/client-dynamodb": "^3.387.0", + "@aws-sdk/client-ecr": "^3.387.0", + "@aws-sdk/client-eks": "^3.387.0", + "@aws-sdk/client-lambda": "^3.387.0", + "@aws-sdk/client-route-53": "^3.387.0", + "@aws-sdk/client-s3": "^3.387.0", + "@aws-sdk/client-sfn": "^3.387.0", + "@aws-sdk/client-ssm": "^3.387.0", + "@aws-sdk/client-sts": "^3.387.0", + "@aws-sdk/credential-providers": "^3.387.0", "@aws-sdk/node-http-handler": "^3.370.0", - "@aws-sdk/types": "^3.378.0", + "@aws-sdk/types": "^3.387.0", "@types/aws-lambda": "^8.10.119", "@types/jest": "^29.5.3", "@types/lodash": "^4.14.196", "@types/punycode": "^2.1.0", - "aws-sdk": "^2.1427.0", + "aws-sdk": "^2.1432.0", "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0", "aws-sdk-mock": "5.8.0", - "cdk8s": "^2.30.0", + "cdk8s": "^2.38.0", "constructs": "^10.0.0", "delay": "5.0.0", - "esbuild": "^0.18.17", + "esbuild": "^0.19.0", "fast-check": "^2.25.0", "fs-extra": "^11.1.1", "jest": "^29.6.2", diff --git a/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts b/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts index d6f47431d11f4..b545ef311f92c 100644 --- a/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts +++ b/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts @@ -227,7 +227,7 @@ export const CLOUDWATCH_LAMBDA_INSIGHTS_ARNS: { [key: string]: any } = { // US East (Ohio) 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:7', // US West (N. California) - 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:5', + 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:3', // US West (Oregon) 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:5', // Africa (Cape Town) diff --git a/packages/aws-cdk-lib/region-info/test/__snapshots__/region-info.test.js.snap b/packages/aws-cdk-lib/region-info/test/__snapshots__/region-info.test.js.snap index 8c0b8deb5b156..dff3496357fad 100644 --- a/packages/aws-cdk-lib/region-info/test/__snapshots__/region-info.test.js.snap +++ b/packages/aws-cdk-lib/region-info/test/__snapshots__/region-info.test.js.snap @@ -1155,7 +1155,7 @@ exports[`built-in data is correct 1`] = ` "lambdaInsightsArmVersions": { "1.0.119.0": undefined, "1.0.135.0": undefined, - "1.0.229.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:5", + "1.0.229.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:3", }, "lambdaInsightsVersions": { "1.0.119.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:16", diff --git a/packages/aws-cdk-lib/triggers/lib/lambda/index.ts b/packages/aws-cdk-lib/triggers/lib/lambda/index.ts index 19473f69ed475..89e1f6a211d15 100644 --- a/packages/aws-cdk-lib/triggers/lib/lambda/index.ts +++ b/packages/aws-cdk-lib/triggers/lib/lambda/index.ts @@ -53,6 +53,11 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent return; } + if (event.RequestType === 'Update' && event.ResourceProperties.ExecuteOnHandlerChange === 'false') { + console.log('not calling trigger because ExecuteOnHandlerChange is false'); + return; + } + const handlerArn = event.ResourceProperties.HandlerArn; if (!handlerArn) { throw new Error('The "HandlerArn" property is required'); diff --git a/packages/aws-cdk-lib/triggers/lib/trigger.ts b/packages/aws-cdk-lib/triggers/lib/trigger.ts index 54cdebbcae7a1..d7636c50eb82c 100644 --- a/packages/aws-cdk-lib/triggers/lib/trigger.ts +++ b/packages/aws-cdk-lib/triggers/lib/trigger.ts @@ -114,7 +114,6 @@ export class Trigger extends Construct implements ITrigger { constructor(scope: Construct, id: string, props: TriggerProps) { super(scope, id); - const handlerArn = this.determineHandlerArn(props); const provider = CustomResourceProvider.getOrCreateProvider(this, 'AWSCDK.TriggerCustomResourceProvider', { runtime: CustomResourceProviderRuntime.NODEJS_18_X, codeDirectory: join(__dirname, 'lambda'), @@ -130,9 +129,10 @@ export class Trigger extends Construct implements ITrigger { resourceType: 'Custom::Trigger', serviceToken: provider.serviceToken, properties: { - HandlerArn: handlerArn, + HandlerArn: props.handler.currentVersion.functionArn, InvocationType: props.invocationType ?? 'RequestResponse', Timeout: props.timeout?.toMilliseconds().toString() ?? Duration.minutes(2).toMilliseconds().toString(), + ExecuteOnHandlerChange: props.executeOnHandlerChange ?? true, }, }); @@ -149,15 +149,6 @@ export class Trigger extends Construct implements ITrigger { Node.of(s).addDependency(this); } } - - private determineHandlerArn(props: TriggerProps) { - return props.handler.currentVersion.functionArn; - // const executeOnHandlerChange = props.executeOnHandlerChange ?? true; - // if (executeOnHandlerChange) { - // } - - // return props.handler.functionArn; - } } /** diff --git a/packages/aws-cdk-lib/triggers/test/trigger-handler.test.ts b/packages/aws-cdk-lib/triggers/test/trigger-handler.test.ts index 29b0b8759752f..c2fda6e81bed3 100644 --- a/packages/aws-cdk-lib/triggers/test/trigger-handler.test.ts +++ b/packages/aws-cdk-lib/triggers/test/trigger-handler.test.ts @@ -36,33 +36,48 @@ const mockRequest = { LogicalResourceId: 'MyTrigger', StackId: 'arn:aws:cloudformation:us-east-1:123456789012:stack/MyStack/12345678-1234-1234-1234-123456789012', ResponseURL: 'https://cloudformation-custom-resource-response-MyTrigger/', - ResourceProperties: { - ServiceToken: 'arn:aws:lambda:us-east-1:123456789012:function:MyFunction', - HandlerArn: handlerArn, - Timeout: '600', - InvocationType: 'Event', - }, RequestId: 'MyRequestId', ResourceType: 'Custom::Trigger', ServiceToken: 'arn:aws:lambda:us-east-1:123456789012:function:MyFunction', }; +const mockResourceProperties = { + ServiceToken: 'arn:aws:lambda:us-east-1:123456789012:function:MyFunction', + HandlerArn: handlerArn, + Timeout: '600', + InvocationType: 'Event', + ExecuteOnHandlerChange: 'true', +}; test('Create', async () => { - await lambda.handler({ RequestType: 'Create', ...mockRequest }); + await lambda.handler({ RequestType: 'Create', ResourceProperties: mockResourceProperties, ...mockRequest }); expect(mockInvoke).toBeCalledTimes(1); expect(mockInvoke).toBeCalledWith({ FunctionName: handlerArn, InvocationType: 'Event' }); }); test('Update', async () => { - await lambda.handler({ RequestType: 'Update', PhysicalResourceId: 'PRID', OldResourceProperties: {}, ...mockRequest }); + await lambda.handler({ RequestType: 'Update', PhysicalResourceId: 'PRID', OldResourceProperties: {}, ResourceProperties: mockResourceProperties, ...mockRequest }); expect(mockInvoke).toBeCalledTimes(1); expect(mockInvoke).toBeCalledWith({ FunctionName: handlerArn, InvocationType: 'Event' }); }); +test('Update with ExecuteOnHandlerChange = false', async () => { + const resourceProperties = { + ServiceToken: 'arn:aws:lambda:us-east-1:123456789012:function:MyFunction', + HandlerArn: handlerArn, + Timeout: '600', + InvocationType: 'Event', + ExecuteOnHandlerChange: 'false', + }; + + await lambda.handler({ RequestType: 'Update', PhysicalResourceId: 'PRID', OldResourceProperties: {}, ResourceProperties: resourceProperties, ...mockRequest }); + + expect(mockInvoke).not.toBeCalled(); +}); + test('Delete - handler not called', async () => { - await lambda.handler({ RequestType: 'Delete', PhysicalResourceId: 'PRID', ...mockRequest }); + await lambda.handler({ RequestType: 'Delete', PhysicalResourceId: 'PRID', ResourceProperties: mockResourceProperties, ...mockRequest }); expect(mockInvoke).not.toBeCalled(); }); @@ -71,7 +86,7 @@ test('non-200 status code throws an error', async () => { StatusCode: 500, }); - await expect(lambda.handler({ RequestType: 'Create', ...mockRequest })) + await expect(lambda.handler({ RequestType: 'Create', ResourceProperties: mockResourceProperties, ...mockRequest })) .rejects .toMatchObject({ message: 'Trigger handler failed with status code 500' }); @@ -84,7 +99,7 @@ test('202 status code success', async () => { StatusCode: 202, }); - await lambda.handler(({ RequestType: 'Create', ...mockRequest })); + await lambda.handler(({ RequestType: 'Create', ResourceProperties: mockResourceProperties, ...mockRequest })); expect(mockInvoke).toBeCalledTimes(1); expect(mockInvoke).toBeCalledWith({ FunctionName: handlerArn, InvocationType: 'Event' }); @@ -98,7 +113,7 @@ test('retry with access denied exception', async () => { return Promise.reject(error); }); - const response = lambda.handler({ RequestType: 'Create', ...mockRequest }); + const response = lambda.handler({ RequestType: 'Create', ResourceProperties: mockResourceProperties, ...mockRequest }); await Promise.resolve().then(() => jest.runAllTimers()); @@ -113,7 +128,7 @@ test('throws an error for other exceptions', async () => { throw new Error(); }); - await expect(lambda.handler({ RequestType: 'Create', ...mockRequest })) + await expect(lambda.handler({ RequestType: 'Create', ResourceProperties: mockResourceProperties, ...mockRequest })) .rejects .toThrow(); @@ -130,7 +145,7 @@ describe('function error', () => { Payload: payload, }); - await expect(lambda.handler({ RequestType: 'Create', ...mockRequest })) + await expect(lambda.handler({ RequestType: 'Create', ResourceProperties: mockResourceProperties, ...mockRequest })) .rejects .toMatchObject({ message: expectedError }); diff --git a/packages/aws-cdk-lib/triggers/test/triggers.test.ts b/packages/aws-cdk-lib/triggers/test/triggers.test.ts index 703dbe70eaa82..9a0dd72c021b9 100644 --- a/packages/aws-cdk-lib/triggers/test/triggers.test.ts +++ b/packages/aws-cdk-lib/triggers/test/triggers.test.ts @@ -109,6 +109,7 @@ test('minimal trigger', () => { template.hasResourceProperties('AWS::Lambda::Function', {}); template.hasResourceProperties('Custom::Trigger', { HandlerArn: { Ref: 'MyFunctionCurrentVersion197490AF2e4e06d52af2bb609d8c23243d665966' }, + ExecuteOnHandlerChange: true, }); }); @@ -126,6 +127,7 @@ test('trigger with optional properties', () => { handler: func, timeout: Duration.minutes(10), invocationType: triggers.InvocationType.EVENT, + executeOnHandlerChange: false, }); // THEN @@ -135,5 +137,6 @@ test('trigger with optional properties', () => { HandlerArn: { Ref: 'MyFunctionCurrentVersion197490AF2e4e06d52af2bb609d8c23243d665966' }, Timeout: '600000', InvocationType: 'Event', + ExecuteOnHandlerChange: false, }); }); diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES index 79270c57ac58e..9275b77c88c48 100644 --- a/packages/aws-cdk/THIRD_PARTY_LICENSES +++ b/packages/aws-cdk/THIRD_PARTY_LICENSES @@ -1,6 +1,6 @@ The aws-cdk package includes the following third-party software/licensing: -** @jsii/check-node@1.86.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.86.0 | Apache-2.0 +** @jsii/check-node@1.86.1 - https://www.npmjs.com/package/@jsii/check-node/v/1.86.1 | Apache-2.0 jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -238,7 +238,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE ---------------- -** aws-sdk@2.1427.0 - https://www.npmjs.com/package/aws-sdk/v/2.1427.0 | Apache-2.0 +** aws-sdk@2.1432.0 - https://www.npmjs.com/package/aws-sdk/v/2.1432.0 | Apache-2.0 AWS SDK for JavaScript Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.json index d07ccfebe35a9..a1859a48d63c1 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/package.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@types/jest": "^29.5.3", - "@types/node": "20.4.5", + "@types/node": "20.4.9", "jest": "^29.6.2", "ts-jest": "^29.1.1", "aws-cdk": "%cdk-version%", diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/package.json b/packages/aws-cdk/lib/init-templates/lib/typescript/package.json index dff006af13c38..f424224011688 100644 --- a/packages/aws-cdk/lib/init-templates/lib/typescript/package.json +++ b/packages/aws-cdk/lib/init-templates/lib/typescript/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@types/jest": "^29.5.3", - "@types/node": "20.4.5", + "@types/node": "20.4.9", "aws-cdk-lib": "%cdk-version%", "constructs": "%constructs-version%", "jest": "^29.6.2", diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json index 8d465fa7e1808..f325f18c4d66b 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json +++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@types/jest": "^29.5.3", - "@types/node": "20.4.5", + "@types/node": "20.4.9", "jest": "^29.6.2", "ts-jest": "^29.1.1", "aws-cdk": "%cdk-version%", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 110a98cedf94c..d9569b517a4bf 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -96,9 +96,9 @@ "@aws-cdk/cloudformation-diff": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "@jsii/check-node": "1.86.0", + "@jsii/check-node": "1.86.1", "archiver": "^5.3.1", - "aws-sdk": "^2.1427.0", + "aws-sdk": "^2.1432.0", "camelcase": "^6.3.0", "cdk-assets": "0.0.0", "chalk": "^4", diff --git a/packages/awslint/package.json b/packages/awslint/package.json index 4ae8664246490..99ad4a6396267 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -18,11 +18,11 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "1.86.0", + "@jsii/spec": "1.86.1", "camelcase": "^6.3.0", "chalk": "^4", "fs-extra": "^9.1.0", - "jsii-reflect": "1.86.0", + "jsii-reflect": "1.86.1", "yargs": "^16.2.0" }, "devDependencies": { @@ -34,7 +34,7 @@ "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "eslint": "^7.32.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^2.7.1", "@aws-cdk/eslint-plugin": "0.0.0", "eslint-plugin-import": "^2.28.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index d2e3f085c92e7..9de89634b400f 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -46,7 +46,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.3.1", - "aws-sdk": "^2.1427.0", + "aws-sdk": "^2.1432.0", "glob": "^7.2.3", "mime": "^2.6.0", "yargs": "^16.2.0" diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 1cac4a0a7039b..cd597901ad877 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -51,7 +51,7 @@ "awslint": "0.0.0", "chalk": "^4", "eslint": "^7.32.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^2.7.1", "eslint-plugin-import": "^2.28.0", "eslint-plugin-jest": "^24.7.0", @@ -60,8 +60,8 @@ "jest": "^29.6.2", "jest-junit": "^13.2.0", "jsii": "~5.1.10", - "jsii-pacmak": "1.86.0", - "jsii-reflect": "1.86.0", + "jsii-pacmak": "1.86.1", + "jsii-reflect": "1.86.1", "markdownlint-cli": "^0.35.0", "nyc": "^15.1.0", "semver": "^7.5.4", diff --git a/tools/@aws-cdk/cfn2ts/package.json b/tools/@aws-cdk/cfn2ts/package.json index fba98a9d7325a..3a472e8b45c4a 100644 --- a/tools/@aws-cdk/cfn2ts/package.json +++ b/tools/@aws-cdk/cfn2ts/package.json @@ -33,7 +33,7 @@ "dependencies": { "@aws-cdk/cfnspec": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "codemaker": "1.86.0", + "codemaker": "1.86.1", "fast-json-patch": "^3.1.1", "fs-extra": "^9.1.0", "yargs": "^16.2.0" diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index c5cf712d8009e..0b5d5de309e0f 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -20,7 +20,7 @@ "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", "eslint": "^8", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^2.7.1", "eslint-plugin-import": "^2.28.0", "jest": "^29", @@ -31,7 +31,7 @@ "typescript": "^4.5.5" }, "dependencies": { - "esbuild": "^0.18.17", + "esbuild": "^0.19.0", "fs-extra": "^10.1.0", "license-checker": "^25.0.1", "madge": "^5.0.2", diff --git a/tools/@aws-cdk/pkglint/package.json b/tools/@aws-cdk/pkglint/package.json index 284528ebe20e3..e39fd499bc124 100644 --- a/tools/@aws-cdk/pkglint/package.json +++ b/tools/@aws-cdk/pkglint/package.json @@ -46,7 +46,7 @@ "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "eslint": "^7.32.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^2.7.1", "eslint-plugin-import": "^2.28.0", "eslint-plugin-jest": "^24.7.0", diff --git a/tools/@aws-cdk/prlint/package.json b/tools/@aws-cdk/prlint/package.json index 9d74f625494de..a7cdfdbc01ca7 100644 --- a/tools/@aws-cdk/prlint/package.json +++ b/tools/@aws-cdk/prlint/package.json @@ -27,7 +27,7 @@ "make-runnable": "^1.4.1", "typescript": "~5.1.6", "eslint": "^7.32.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^2.7.1", "eslint-plugin-import": "^2.28.0", "eslint-plugin-jest": "^24.7.0" diff --git a/tools/@aws-cdk/spec2cdk/package.json b/tools/@aws-cdk/spec2cdk/package.json index ce472624c5189..b5ac347d8ffda 100644 --- a/tools/@aws-cdk/spec2cdk/package.json +++ b/tools/@aws-cdk/spec2cdk/package.json @@ -32,8 +32,8 @@ }, "license": "Apache-2.0", "dependencies": { - "@aws-cdk/aws-service-spec": "^0.0.5", - "@aws-cdk/service-spec-types": "^0.0.5", + "@aws-cdk/aws-service-spec": "^0.0.6", + "@aws-cdk/service-spec-types": "^0.0.6", "@cdklabs/tskb": "^0.0.1", "@cdklabs/typewriter": "^0.0.1", "camelcase": "^6", diff --git a/version.v2.json b/version.v2.json index fcc29723b38c9..5c44fb62965a1 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.89.0", - "alphaVersion": "2.89.0-alpha.0" + "version": "2.90.0", + "alphaVersion": "2.90.0-alpha.0" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 35f2b3949d4dd..0a8b3f16af7e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,9 +26,9 @@ "@octokit/plugin-rest-endpoint-methods" "^5.13.0" "@actions/http-client@^2.0.1": - version "2.1.0" - resolved "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz#b6d8c3934727d6a50d10d19f00a711a964599a9f" - integrity sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw== + version "2.1.1" + resolved "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz#a8e97699c315bed0ecaeaaeb640948470d4586a0" + integrity sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw== dependencies: tunnel "^0.0.6" @@ -55,12 +55,12 @@ resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.166.tgz#467507db141cd829ff8aa9d6ea5519310a4276b8" integrity sha512-j0xnccpUQHXJKPgCwQcGGNu4lRiC1PptYfdxBIH1L4dRK91iBxtSQHESRQX+yB47oGLaF/WfNN/aF3WXwlhikg== -"@aws-cdk/aws-service-spec@^0.0.5": - version "0.0.5" - resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.0.5.tgz#db431bf58bcd5792302fd4ef81ef649020bcb08a" - integrity sha512-iU1l0QNTZQfjNSKOP9SnemeCxyME2ItFqctRCyPWaJe0m+6YPNuU0PS1Dwelf9SgA6fe2wK4fJlP5pA2I8PDgg== +"@aws-cdk/aws-service-spec@^0.0.6": + version "0.0.6" + resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.0.6.tgz#dde596e3c11615842e0f69ad714ffedacbb55ccd" + integrity sha512-qujgL6AN/uIMxynPYNu5zZQ2vT3PRjwUBoOQmoK7E9T09rwaMKZQs2MwOinbYNnuyk4se8u0CFARud7iFJOuMg== dependencies: - "@aws-cdk/service-spec-types" "^0.0.5" + "@aws-cdk/service-spec-types" "^0.0.6" "@cdklabs/tskb" "^0.0.1" "@aws-cdk/lambda-layer-kubectl-v24@^2.0.242": @@ -68,10 +68,10 @@ resolved "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v24/-/lambda-layer-kubectl-v24-2.0.242.tgz#4273a5ad7714f933a7eba155eb9280823086db71" integrity sha512-7/wIOo685tmrEe4hh6zqDELhBZh5OQGf3Hd2FU2Vnwy2ZubW8qTmEw5gqJCsCrGKeYDoa1BcVhDRZ/nzjkaqyA== -"@aws-cdk/service-spec-types@^0.0.5": - version "0.0.5" - resolved "https://registry.npmjs.org/@aws-cdk/service-spec-types/-/service-spec-types-0.0.5.tgz#dc94f7dcdf733d8dde7ec64fbe8aad2c0eb5c49d" - integrity sha512-qOktXW7SWzAymWnDsV97l/HHBl6WaYxxjlyfIvMr5o1sDFzusyoRQVrgKrlsZ75iGYV7PlGTLLcI3Zkhz42bhQ== +"@aws-cdk/service-spec-types@^0.0.6": + version "0.0.6" + resolved "https://registry.npmjs.org/@aws-cdk/service-spec-types/-/service-spec-types-0.0.6.tgz#06424293b6c5b587936bd995cea74a5194d257ab" + integrity sha512-1rH5cc+KCvg1p9utjb3bIpNJcRLGq1Rav6I4M1P6glzmHDJFV0uI+CDWqFwtxOrRyWreWdovdiai6RxkL2ektA== dependencies: "@cdklabs/tskb" "^0.0.1" @@ -152,1035 +152,996 @@ "@aws-sdk/util-utf8-browser" "^3.0.0" tslib "^1.11.1" -"@aws-sdk/client-account@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-account/-/client-account-3.382.0.tgz#8e242a473dc06b6e818e2bdb6d93b9d75d7024c1" - integrity sha512-jMBRcMBkC0vuZPr95fPuB/0Mv0jqtjUqyiEschP5aPFWc42wbd9SvL4eh4doRyGyPZV2bNNjxYYkulspnVuIjw== +"@aws-sdk/client-account@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-account/-/client-account-3.387.0.tgz#5c0d74ed2d276b8fff1a3dbf000d536267da54e5" + integrity sha512-24C57LyvmCfB5pX6u5uwrcD4SPzpgSnLCEd4cA1L5S9H2TcLF636jwI+kjHo6EhpKYza/m6eh6BMC6o+IEa/Rg== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/client-acm@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-acm/-/client-acm-3.382.0.tgz#75235cc0eb3a8480fa408001698e540fff1f1e05" - integrity sha512-Dmw9WI1+nHtlflbWa3dsXY2UNJvEj8bg1r3133+Q1ABpf67I64zoPKFcVHkaQhmR1AHlThn/TJiseDBHJriEsQ== +"@aws-sdk/client-acm@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-acm/-/client-acm-3.387.0.tgz#4423395e97f69911d438c50c4456e332ca421e55" + integrity sha512-qI7q/wFifX5OmFPctUdbLfi2G6F68dWStlmS6YQSENLrgHc7+xpdzfELxjp7CFLRVQhAyKsBRIw+9AngaeviBg== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" tslib "^2.5.0" -"@aws-sdk/client-amplify@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-amplify/-/client-amplify-3.382.0.tgz#e5bcfcc3c0c35a959e54fc456af7ea17fc69a6a2" - integrity sha512-Q+QDLvq35j/HD2/LMi85RIt/JztACrnr+ie7jOS155EQWuwnqUZ4zrHHFC3WtVOYcDAqgyQW6bMn7mHgLmWZ5g== +"@aws-sdk/client-amplify@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-amplify/-/client-amplify-3.387.0.tgz#54ecf8fecdb92b7ce80f1fbcd246a49a33c34d18" + integrity sha512-POAv7p9kKQ3OieNPJnSKKqSI5HcB3kkM6/ifstwUmnxA3cipuHfd1nCGUculFgDJ27lw7oA8czrqq1+Ji/PKPw== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/client-cloudwatch-logs@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs/-/client-cloudwatch-logs-3.382.0.tgz#0e3f9ad04b391a83f4ceffc8c0169437d1b811ed" - integrity sha512-QXUfYbdThbIrFeGkeYVcE4/0NVVvGL5MoWZSBIliLTwE8CaW2qDYyrw9b62np3h6RK/y6igrgWoPaP77wqDTCg== +"@aws-sdk/client-cloudwatch-logs@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs/-/client-cloudwatch-logs-3.387.0.tgz#1dc9d425684174d0a97b3813aacf4b0a52aa9b50" + integrity sha512-/DyGdoz27kMI/FpTV8i9hsbnI45v4i+lR/zY0BYf+MJrV3R+C9POLUD0OE0GX+h3rUQDM4M0DBimiChhgl9Xog== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/client-codepipeline@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-codepipeline/-/client-codepipeline-3.382.0.tgz#3ce84189200145abca86fd9e42e09e0665080e1b" - integrity sha512-CeuSdj5yae6DVZWpdOwTij9D95D4+g9z2H3eORwxZIg8Rc+ZsJXRs1wy4XF/AReWZYTlI/989ubopAvuVG88fQ== +"@aws-sdk/client-codepipeline@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-codepipeline/-/client-codepipeline-3.387.0.tgz#7794f6e3245e8e391c13ef8141cc0abc6db715cb" + integrity sha512-wWY54SZESK3L5Nt3//0yq58GT6TsdQJQNc/+uJ7bp8vGWLhlm3x7heTSxjbDLXYGMAlrxv8hQT0zLFW9KZJgOw== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" uuid "^8.3.2" -"@aws-sdk/client-cognito-identity@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.382.0.tgz#68a57892b283fb98c7c57f8ae924fa70190eb0d7" - integrity sha512-EgKpWh5w2uWNzjtcD3S3JLSuuwLvvaeaVih60xNEoyaxpqwgjAe0vw/8GT9q2nqhS0J+B3bQVYdkCyA5oQDVEQ== +"@aws-sdk/client-cognito-identity@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.387.0.tgz#e4b314803a103953d949a9f59ecf90304a280f89" + integrity sha512-ujbfXmI+0vu8+aD+e6C8kWStAZrmKyootoGbRDcYmE/gUIEOY/rZ1Pj0RTf7Cat8aeycSsKR3sN6c+SYz5YluQ== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/client-dynamodb@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.382.0.tgz#947167e20cec96a855ed2b06d0143203d09e53b1" - integrity sha512-rXGaJ9e6HWy04wUIBdQ7z8/+378RJqc4BZRYR4IhAWvfsQZkGhyvUHmHIgGsPTmJqsTteZsrgEzSsyBnmzXfKA== +"@aws-sdk/client-dynamodb@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.387.0.tgz#0fad517f613164c5326f504653afa9d2e290ca8f" + integrity sha512-dOypiCBx02RXHna+wTNYPjVJAe9FmmM5VYLLLL46LGrPLy7CeXc8CL9A9l/28bsnGL+27QbtIVvsScJtOlxkCQ== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-endpoint-discovery" "3.379.1" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-endpoint-discovery" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" tslib "^2.5.0" uuid "^8.3.2" -"@aws-sdk/client-ec2@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ec2/-/client-ec2-3.382.0.tgz#9091fb770c886b588eca26b6cfafd8b1cb2a8a2a" - integrity sha512-TI+6kR3Dg+FY27Ghhxsov7lJnrbjASBxd8ijoB6xiKqAhTidDXzB1PGCjz73+OzSGCckepjomWgEC72AjEuSMw== +"@aws-sdk/client-ec2@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-ec2/-/client-ec2-3.387.0.tgz#492cdbeebfa8d100889e2d712579f7b6087eb737" + integrity sha512-iGd8hywP7BSGy/b84PFgT6yTpvYJq0pOatr6pdOrgaCrCwot4ryszvhcoBcnEDMOkB3XtTHxp8y/Xh4kAPElYg== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-sdk-ec2" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-sdk-ec2" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" fast-xml-parser "4.2.5" tslib "^2.5.0" uuid "^8.3.2" -"@aws-sdk/client-ecr@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ecr/-/client-ecr-3.382.0.tgz#66c51010e8288f70f026d787a1af8f11865993f9" - integrity sha512-iOzpFpj+M6fd+sypK0IyPvug6Irty9xNoIu+0q4McS3jHG4OYdA3x7wJKFLU+Zt9j8K1uVZry/8aHjWpoyMorQ== +"@aws-sdk/client-ecr@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-ecr/-/client-ecr-3.387.0.tgz#279108b04e7781e311564c4986b108d9746044bc" + integrity sha512-3eYD4hREN26+N++0dX0azQVnYuqT4CZWDvkaMRxpjmbZWEKqNMTXUyL9oICEewydfgGfo3cvFILxgPBkKD0qVw== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" tslib "^2.5.0" -"@aws-sdk/client-eks@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-eks/-/client-eks-3.382.0.tgz#3912e8a5d5a6d4e1c55d86cda69fed067ae0c626" - integrity sha512-U5/6DqOBlSPkWIE2S1gvjuDmYU/IaYcLkfp/3IwElYiw3rv/oeKnGyNcwyOHjiKhaUED4aT3RkBNOF9EKWMv5A== +"@aws-sdk/client-eks@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-eks/-/client-eks-3.387.0.tgz#12142b223509c1b93cd3fe5fc1fca5da18adc372" + integrity sha512-dAEdY0vqq1OxxljPbscTwHUEg4k4hQoPaT6xZOhwGVYqcwNIVw29baKSk0nCNlGcxoZ+KfMO8d6F035zv1hwLg== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" tslib "^2.5.0" uuid "^8.3.2" -"@aws-sdk/client-lambda@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.382.0.tgz#a3b269808c342e5d55e345e04b71f71b122194ed" - integrity sha512-g/JcxMk0ntJYe8xIpcKNQ12yPbYM2H1bB0xmVs0BsEdAnnKEwmQc1+Sau2gz8BY9vVEyUodDxnDi0hW0qBBKBg== +"@aws-sdk/client-lambda@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.387.0.tgz#5252607c9bc0478adf64580c51a2e55ad55c364a" + integrity sha512-fUB0qQ1hmRhPAIHR9AFA5Ndvu8oyCGNri/LJUQCj06rsNrjv4mVn4ACAffh0aw364M1CY3WprcFc5kcPYMdKAA== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/eventstream-serde-browser" "^2.0.1" - "@smithy/eventstream-serde-config-resolver" "^2.0.1" - "@smithy/eventstream-serde-node" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/eventstream-serde-browser" "^2.0.2" + "@smithy/eventstream-serde-config-resolver" "^2.0.2" + "@smithy/eventstream-serde-node" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" - "@smithy/util-stream" "^2.0.1" + "@smithy/util-stream" "^2.0.2" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" tslib "^2.5.0" -"@aws-sdk/client-redshift-data@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-redshift-data/-/client-redshift-data-3.382.0.tgz#f3af67e82c148248ab6f1ac840b46be4a15074b4" - integrity sha512-3uh74r2wulSBY/YADPSbP2959YT4U93HCHVo6p2nAisU/nLPEiXRvDLtz3tD8mU4B+IZkDJhO30QNbmnpyUvfQ== +"@aws-sdk/client-redshift-data@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-redshift-data/-/client-redshift-data-3.387.0.tgz#cb6acd50bca9ba7bab3c7178bc8edc896244f514" + integrity sha512-U4RbTsbXgOqBv1Z9j/LbOqKyfNPTkZicK7PYstrJL1iKWKRe0cloUeqZLTKwlDS8D2V2Y2qOgME62uJJ0TxUCg== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" uuid "^8.3.2" -"@aws-sdk/client-redshift@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-redshift/-/client-redshift-3.382.0.tgz#9ccb99b1734dfc9bb65a343e335dc1d40c52a425" - integrity sha512-fH7zNBSWzIX+fstrrXGqbgv8yZtrxU2k7Udc/iSq9NUthYJPA0QJgCM6FgnbVtNy0zApNQIp2a9VNzKZ0UFbRg== +"@aws-sdk/client-redshift@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-redshift/-/client-redshift-3.387.0.tgz#1badac657b106f387e91bac098c8a5e66f873d70" + integrity sha512-l/+q/4IoWt29YB5PMPoqGkaCp04n38R2+u7FL0ehfmVtbYJdOhyXgcoPzxM1ri4cAjX5PMFtZyY+63Z1Sc1tHw== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" fast-xml-parser "4.2.5" tslib "^2.5.0" -"@aws-sdk/client-route-53@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-route-53/-/client-route-53-3.382.0.tgz#9e88b0af461aa4b2f783adddefe6403b67e92a43" - integrity sha512-LWj58lpnT246XplveFDaNhthSMFi3ATahSfccSWeVe3fL3pWZw/a07b81RB1lGHLpIghh+whAmkMjSXeK22qtQ== +"@aws-sdk/client-route-53@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-route-53/-/client-route-53-3.387.0.tgz#5ed02636f13e6bae30b114bf56a88a05f12cda13" + integrity sha512-7VajQVPwBd+lmGbuyMj8p9iKQOFgUVNcHLO1jy2nRVdDh9qGnp0Xv49n96xhQdQqFdJsO6OOzJ0kSa2ZKT+s/g== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-sdk-route53" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-sdk-route53" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" "@aws-sdk/xml-builder" "3.310.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" fast-xml-parser "4.2.5" tslib "^2.5.0" -"@aws-sdk/client-s3@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.382.0.tgz#5c48510bf588268229da46f90482fd28972ec847" - integrity sha512-7s5DI1dw5HUF9+tHuZzkJaZBcaE3kuGsMw17/enEa8YdF0CtL5rW46FlzQ3/7NYIKc9rhDtb0UMakEej1cWFtg== +"@aws-sdk/client-s3@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.387.0.tgz#dddc8e9ebbbabf9f08505aa4ed75227e02ea7529" + integrity sha512-TX42MDfXnIy/U6f8XjCTR1Ezg1125Sv5k9kdKZJ0kkKcb/81N0+RfTqsR+Kpn/AbLjtvSUWrFIdc1o//GsfZAQ== dependencies: "@aws-crypto/sha1-browser" "3.0.0" "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-bucket-endpoint" "3.378.0" - "@aws-sdk/middleware-expect-continue" "3.378.0" - "@aws-sdk/middleware-flexible-checksums" "3.378.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-location-constraint" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-sdk-s3" "3.379.1" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-ssec" "3.378.0" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/signature-v4-multi-region" "3.378.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-bucket-endpoint" "3.387.0" + "@aws-sdk/middleware-expect-continue" "3.387.0" + "@aws-sdk/middleware-flexible-checksums" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-location-constraint" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-sdk-s3" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-ssec" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/signature-v4-multi-region" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" "@aws-sdk/xml-builder" "3.310.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/eventstream-serde-browser" "^2.0.1" - "@smithy/eventstream-serde-config-resolver" "^2.0.1" - "@smithy/eventstream-serde-node" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-blob-browser" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/hash-stream-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/md5-js" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@smithy/config-resolver" "^2.0.2" + "@smithy/eventstream-serde-browser" "^2.0.2" + "@smithy/eventstream-serde-config-resolver" "^2.0.2" + "@smithy/eventstream-serde-node" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-blob-browser" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/hash-stream-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/md5-js" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" - "@smithy/util-stream" "^2.0.1" + "@smithy/util-stream" "^2.0.2" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" fast-xml-parser "4.2.5" tslib "^2.5.0" -"@aws-sdk/client-secrets-manager@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.382.0.tgz#8c6cc378162a7c6c9b992a7297d0fd53a97e3469" - integrity sha512-K7b3FvYT7aekhIgdgJI3+rvJRntX0c09z/ijKw9aX1cx34HAxKYO37tBuK8qAhurP4Duc//UkcfcSXVSi7KLIg== +"@aws-sdk/client-secrets-manager@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.387.0.tgz#85fa6d31311b9076eaa35d2072449ba5b0044fc5" + integrity sha512-icfbMKNIHEFEQmi5IOfG3Ducob6ejeU2/YgSBxMs7HPEAY0LVCgrcsZsCNsZSrL0URHynFvkBZnNolD0ozGWBw== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" uuid "^8.3.2" -"@aws-sdk/client-sfn@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sfn/-/client-sfn-3.382.0.tgz#bcbee406311c16a29d407e57212f0c09622504f4" - integrity sha512-QFnkIdh/UT3yoBUXrSq6nb/MYO9aRBFnK/eue3HRFYtCpclwY/KGY4WJfQ3tCSTiPzHFQ+ACAFB4bl7kihcHcA== +"@aws-sdk/client-sfn@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sfn/-/client-sfn-3.387.0.tgz#f95420ae29f811c9ad8446fca1899191edb43da2" + integrity sha512-BhUT3q9A9Gm7mNDits+arU2ylp6eW7YOhmhfIWc1c53cUCo7uBQw1G2N7wmPgGvwz01JAFKa/x3knyLvDbjcBQ== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/client-ssm@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.382.0.tgz#f3812658dc70d937706019e1cbdc3e4ff29fc886" - integrity sha512-PQk2D7eGWTh5DhCDqi8rx1KBswlqQzqXnVfyQp1AxNyJl8KSKTdzoo0upDYu4vQqEHMLhACrpxTmBnjtSKwsHw== +"@aws-sdk/client-ssm@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.387.0.tgz#5fc8a434436d53554b148878f10920c3e5686026" + integrity sha512-eVNRyFoecuQSNizWC1cu4IsV+2iraYU3HYFkxeiAjAOmVXsfQeR1Yly/QvFnUS4ePaBRMOZtCdrVobsUuWbBmg== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.2" tslib "^2.5.0" uuid "^8.3.2" -"@aws-sdk/client-sso-oidc@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.382.0.tgz#36bb5f828fb4ba85f0159e4d163ec2f608b77837" - integrity sha512-hTfvB1ftbrqaz7qiEkmRobzUQwG34oZlByobn8Frdr5ZQbJk969bX6evQAPyKlJEr26+kL9TnaX+rbLR/+gwHQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" - "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" - "@smithy/util-retry" "^2.0.0" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/client-sso@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.382.0.tgz#811e7cf2bb31b5b388794c17d407e1cdb2af7a7a" - integrity sha512-ge11t4hJllOF8pBNF0p1X52lLqUsLGAoey24fvk3fyvvczeLpegGYh2kdLG0iwFTDgRxaUqK+kboH5Wy9ux/pw== +"@aws-sdk/client-sso@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.387.0.tgz#d2182c09ad8d75a1a8896c2765e6f8729118660f" + integrity sha512-E7uKSvbA0XMKSN5KLInf52hmMpe9/OKo6N9OPffGXdn3fNEQlvyQq3meUkqG7Is0ldgsQMz5EUBNtNybXzr3tQ== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/client-sts@3.382.0", "@aws-sdk/client-sts@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.382.0.tgz#176672b65e02b481d49bf13ab8cde3a95405f120" - integrity sha512-G5wgahrOqmrljjyLVGASIZUXIIdalbCo0z4PuFHdb2R2CVfwO8renfgrmk4brT9tIxIfen5bRA7ftXMe7yrgRA== +"@aws-sdk/client-sts@3.387.0", "@aws-sdk/client-sts@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.387.0.tgz#01f3cbbcf97e047f9c2455f21259515701b9d384" + integrity sha512-RPOME0gpAViheH6xHyMg/XkE1G/fs6dgKK/NqlBZDjwMsSTPc8CmItEC6FOsCaLJktif0tD/u9m2uaQ4Lb1nVw== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-sdk-sts" "3.379.1" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.382.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/middleware-host-header" "3.387.0" + "@aws-sdk/middleware-logger" "3.387.0" + "@aws-sdk/middleware-recursion-detection" "3.387.0" + "@aws-sdk/middleware-sdk-sts" "3.387.0" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/middleware-user-agent" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@aws-sdk/util-user-agent-browser" "3.387.0" + "@aws-sdk/util-user-agent-node" "3.387.0" + "@smithy/config-resolver" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/hash-node" "^2.0.2" + "@smithy/invalid-dependency" "^2.0.2" + "@smithy/middleware-content-length" "^2.0.2" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/middleware-retry" "^2.0.2" + "@smithy/middleware-serde" "^2.0.2" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-defaults-mode-browser" "^2.0.2" + "@smithy/util-defaults-mode-node" "^2.0.2" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" fast-xml-parser "4.2.5" tslib "^2.5.0" -"@aws-sdk/credential-provider-cognito-identity@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.382.0.tgz#1fa3555c288b36fc8bf6cb551d2499dd740f7298" - integrity sha512-fEsmPSylpQdALSS1pKMa9QghMk9xFiQCanmUWbQ7ETkcjuYuc/DK6GIA0pRjq/BROJJNSxKrSxt3TZPzVpvb3w== +"@aws-sdk/credential-provider-cognito-identity@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.387.0.tgz#882fecfb322e1a3ede0d0bfc550eed9bfc4189a8" + integrity sha512-UjgpSl/NqndEQK4KjmQNK2+SsKDENNnn1/ult8W8QnwC40tLTBjcQLrtXndj+0N25tSaM6YogtAv7e0QnRJJWA== dependencies: - "@aws-sdk/client-cognito-identity" "3.382.0" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/client-cognito-identity" "3.387.0" + "@aws-sdk/types" "3.387.0" "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/credential-provider-env@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.378.0.tgz#a0f6291eff4e002c140599acede2433f58e4f4cb" - integrity sha512-B2OVdO9kBClDwGgWTBLAQwFV8qYTYGyVujg++1FZFSFMt8ORFdZ5fNpErvJtiSjYiOOQMzyBeSNhKyYNXCiJjQ== +"@aws-sdk/credential-provider-env@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.387.0.tgz#7323eada10228c0157195a922d10638cd65c293c" + integrity sha512-PVqNk7XPIYe5CMYNvELkcALtkl/pIM8/uPtqEtTg+mgnZBeL4fAmgXZiZMahQo1DxP5t/JaK384f6JG+A0qDjA== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/credential-provider-ini@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.382.0.tgz#a7ea55d4322c3d0f2d37b98c50ec866a162ecd19" - integrity sha512-31pi44WWri2WQmagqptUv7x3Nq8pQ6H06OCQx5goEm77SosSdwQwyBPrS9Pg0yI9aljFAxF+rZ75degsCorbQg== +"@aws-sdk/credential-provider-ini@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.387.0.tgz#d11b4160638e43fffdabb22f98e1af187e437b68" + integrity sha512-DS2Jg5E4Hd9fhJqTVNBG3SEwLwcyguPDcXSVCDz5pEHlYFM1U4x9b7aAbutzZujTH99MZ6Gua8kAotB/qjEjtw== dependencies: - "@aws-sdk/credential-provider-env" "3.378.0" - "@aws-sdk/credential-provider-process" "3.378.0" - "@aws-sdk/credential-provider-sso" "3.382.0" - "@aws-sdk/credential-provider-web-identity" "3.378.0" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/credential-provider-env" "3.387.0" + "@aws-sdk/credential-provider-process" "3.387.0" + "@aws-sdk/credential-provider-sso" "3.387.0" + "@aws-sdk/credential-provider-web-identity" "3.387.0" + "@aws-sdk/types" "3.387.0" "@smithy/credential-provider-imds" "^2.0.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/credential-provider-node@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.382.0.tgz#67e661d090ecd85ae05af25e909c3d9f78f731bf" - integrity sha512-q6AWCCb0E0cH/Y5Dtln0QssbCBXDbV4PoTV3EdRuGoJcHyNfHJ8X0mqcc7k44wG4Piazu+ufZThvn43W7W9a4g== - dependencies: - "@aws-sdk/credential-provider-env" "3.378.0" - "@aws-sdk/credential-provider-ini" "3.382.0" - "@aws-sdk/credential-provider-process" "3.378.0" - "@aws-sdk/credential-provider-sso" "3.382.0" - "@aws-sdk/credential-provider-web-identity" "3.378.0" - "@aws-sdk/types" "3.378.0" +"@aws-sdk/credential-provider-node@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.387.0.tgz#f0144cb8daad4af8441a7edc714dd7ac6aadbf36" + integrity sha512-NviQ0EqigPWwX4avKheRzE2R4YPzO6qzdyxKZUookr+uTWYroQ4ePZbHK1/BD8LlqKKBlttX/d3ENXjynU4clA== + dependencies: + "@aws-sdk/credential-provider-env" "3.387.0" + "@aws-sdk/credential-provider-ini" "3.387.0" + "@aws-sdk/credential-provider-process" "3.387.0" + "@aws-sdk/credential-provider-sso" "3.387.0" + "@aws-sdk/credential-provider-web-identity" "3.387.0" + "@aws-sdk/types" "3.387.0" "@smithy/credential-provider-imds" "^2.0.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/credential-provider-process@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.378.0.tgz#8fd594c9600f9e4b7121f3cf2cea13b4d37f09e5" - integrity sha512-KFTIy7u+wXj3eDua4rgS0tODzMnXtXhAm1RxzCW9FL5JLBBrd82ymCj1Dp72217Sw5Do6NjCnDTTNkCHZMA77w== +"@aws-sdk/credential-provider-process@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.387.0.tgz#114acfbcf9bd289e549fb3fd48acc1a71d7c75b7" + integrity sha512-tQScLHmDlqkQN+mqw4s3cxepEUeHYDhFl5eH+J8puvPqWjXMYpCEdY79SAtWs6SZd4CWiZ0VLeYU6xQBZengbQ== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/credential-provider-sso@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.382.0.tgz#a256215276f9b67afdeb36a4048f7484a46df824" - integrity sha512-tKCQKqxnAHeRD7pQNmDmLWwC7pt5koo6yiQTVQ382U+8xx7BNsApE1zdC4LrtrVN1FYqVbw5kXjYFtSCtaUxGA== +"@aws-sdk/credential-provider-sso@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.387.0.tgz#b51edde12cbc6bc0cd511da3643af44de1659e4b" + integrity sha512-sQgrEyTSrwLe8zgjP9VEUDz3dtGXSCc4k00bCwODbzdOWCA1nz9oF2tFmgjFsb1Q80pae01Pe50Esix5z2eHsQ== dependencies: - "@aws-sdk/client-sso" "3.382.0" - "@aws-sdk/token-providers" "3.382.0" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/client-sso" "3.387.0" + "@aws-sdk/token-providers" "3.387.0" + "@aws-sdk/types" "3.387.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/credential-provider-web-identity@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.378.0.tgz#019db9f17bd9fb2fd9a4171fe3b443c9e049a70a" - integrity sha512-GWjydOszhc4xDF8xuPtBvboglXQr0gwCW1oHAvmLcOT38+Hd6qnKywnMSeoXYRPgoKfF9TkWQgW1jxplzCG0UA== +"@aws-sdk/credential-provider-web-identity@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.387.0.tgz#f15431ce00dbfe4f937b4afc706254759a096396" + integrity sha512-6ueMPl+J3KWv6ZaAWF4Z138QCuBVFZRVAgwbtP3BNqWrrs4Q6TPksOQJ79lRDMpv0EUoyVl04B6lldNlhN8RdA== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/credential-providers@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.382.0.tgz#adb47dbd6fb4371e92249a11e491f5a40ce4af92" - integrity sha512-+emgPCb8t5ODLpE1GeCkKaI6lx9M3RLQCYBGYkm/2o8FyvNeob9IBs6W8ufUTlnl4YRdKjDOlcfDtS00wCVHfA== - dependencies: - "@aws-sdk/client-cognito-identity" "3.382.0" - "@aws-sdk/client-sso" "3.382.0" - "@aws-sdk/client-sts" "3.382.0" - "@aws-sdk/credential-provider-cognito-identity" "3.382.0" - "@aws-sdk/credential-provider-env" "3.378.0" - "@aws-sdk/credential-provider-ini" "3.382.0" - "@aws-sdk/credential-provider-node" "3.382.0" - "@aws-sdk/credential-provider-process" "3.378.0" - "@aws-sdk/credential-provider-sso" "3.382.0" - "@aws-sdk/credential-provider-web-identity" "3.378.0" - "@aws-sdk/types" "3.378.0" +"@aws-sdk/credential-providers@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.387.0.tgz#f25a11c18ecc28953165998eddde6032ec58a517" + integrity sha512-0wA60gIYn3KqriSwD6cq+o4Il6ftk8dRM5RQTmpncmoZD7BfgbYJhmiOPS8IR2F9eg7qdbZiHgzInyiRddJHKQ== + dependencies: + "@aws-sdk/client-cognito-identity" "3.387.0" + "@aws-sdk/client-sso" "3.387.0" + "@aws-sdk/client-sts" "3.387.0" + "@aws-sdk/credential-provider-cognito-identity" "3.387.0" + "@aws-sdk/credential-provider-env" "3.387.0" + "@aws-sdk/credential-provider-ini" "3.387.0" + "@aws-sdk/credential-provider-node" "3.387.0" + "@aws-sdk/credential-provider-process" "3.387.0" + "@aws-sdk/credential-provider-sso" "3.387.0" + "@aws-sdk/credential-provider-web-identity" "3.387.0" + "@aws-sdk/types" "3.387.0" "@smithy/credential-provider-imds" "^2.0.0" "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@aws-sdk/endpoint-cache@3.310.0": @@ -1191,166 +1152,166 @@ mnemonist "0.38.3" tslib "^2.5.0" -"@aws-sdk/middleware-bucket-endpoint@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.378.0.tgz#4d0253b263d908ddb51c8eb36acd5d4b746a94db" - integrity sha512-3o+AYU6JWUsPM49bWglCUOgNvySiHkbIma0J6F9a68e30vEDD0FUQtKzyHPZkF7iYDyesEl166gYjwVNAmASzw== +"@aws-sdk/middleware-bucket-endpoint@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.387.0.tgz#edcfa94beaec51317de84bf7e12e341a5981b8f7" + integrity sha512-o7Dsq0YTUHFcKXD6+30/fXv/Wzdxqz9WonhCu3ZFPwTDLZgOM4QDDKW8EcC1SplKP1IUyaEli8Affodag9T1cQ== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-config-provider" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/middleware-endpoint-discovery@3.379.1": - version "3.379.1" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.379.1.tgz#e6ebae32d311bb196e53ddc9577212bcc84fb088" - integrity sha512-HpFF3Nb9csmg/j/trs4OhrQvthKFVz9lKkarGzxwYzaMqZ/xqFyPScJlZ41VgIkP+iP48IZVxAzLL/rsmsi/jA== +"@aws-sdk/middleware-endpoint-discovery@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.387.0.tgz#9eeac041e138080f1ac52289d4397f4f5ee0868d" + integrity sha512-AA+0IQths+euScAd6p+YQQ8pBvtmQxst/PEyL1GCd6XGkHALVdP0m/tYwbhoRGZucKV8r0bB9gBxT3Ligox5tQ== dependencies: "@aws-sdk/endpoint-cache" "3.310.0" - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-expect-continue@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.378.0.tgz#66baa420255c56528bacf53a82524ab6155763a9" - integrity sha512-8maaNQvza3/IGDbIyVQkUbGlo+Oc6SY1gVG50UMcTUX8nwZrD1/ko+ft+pd2EDb2n+0JritoDj4bjr6pdesNBg== +"@aws-sdk/middleware-expect-continue@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.387.0.tgz#2ac9c1f7845b5b266ac8c3cf3210d462a7012733" + integrity sha512-w415a4tjQc6a7isq0AEDWFBC0HWUCHXEDjDl94UACxfMmS9bVabuf04t9CQ+nBBVs6HdiNdfdc/pBR2pRwx2Yg== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-flexible-checksums@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.378.0.tgz#41ab38b78ce2a8c10b52ea617c4187747ecf3c8d" - integrity sha512-pHkcVTu2T+x/1fpPHMpRDpXY5zxDsjijv3C6Nz/nm3gQrZvQ3fYDrQdV3Oj6Xeg40B3kkcp/bzgDo7MDzG088A== +"@aws-sdk/middleware-flexible-checksums@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.387.0.tgz#40957a4bae83208ad047053094757cfce9478fc9" + integrity sha512-QlH97rrKlcMyLG+2ps7+DtBHfPyRIpi7sD3y0iko2u3PGXk+PoLPK8wWyGql9sFopOYTl6/Jh2Rb1b6z6NbjEA== dependencies: "@aws-crypto/crc32" "3.0.0" "@aws-crypto/crc32c" "3.0.0" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@smithy/is-array-buffer" "^2.0.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/middleware-host-header@3.379.1": - version "3.379.1" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.379.1.tgz#26d8af6100de4e03d201553360dfe16e10ae1aa5" - integrity sha512-LI4KpAFWNWVr2aH2vRVblr0Y8tvDz23lj8LOmbDmCrzd5M21nxuocI/8nEAQj55LiTIf9Zs+dHCdsyegnFXdrA== +"@aws-sdk/middleware-host-header@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.387.0.tgz#17c4948b83bb42ed04bdc2346fce4e4f980691e5" + integrity sha512-EWm9PXSr8dSp7hnRth1U7OfelXQp9dLf1yS1kUL+UhppYDJpjhdP7ql3NI4xJKw8e76sP2FuJYEuzWnJHuWoyQ== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-location-constraint@3.379.1": - version "3.379.1" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.379.1.tgz#754541385bdf128f446b071f91fedd11806ba300" - integrity sha512-+bmy8DjX9jtqJk8WiDaHoP9M5ZcqjHSJf4mkv8IUZ/FNTUl9j6Dll//bG/JxuAw5e5shtCDjmZ027W5d9ITp0g== +"@aws-sdk/middleware-location-constraint@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.387.0.tgz#e563fd37fb9ba2dd4f929450f38026fd2a633789" + integrity sha512-Ipdry2V58CpDcWD0ZTz6yFtpTASEBxbuWdqUUYW7pOkZ/5GPGH8NhBky7M38iGqAO6FNysvWEVCUpIqNGkI1lw== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-logger@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.378.0.tgz#f27fe3a979f3ef49034a860aa2c38c8a16faa879" - integrity sha512-l1DyaDLm3KeBMNMuANI3scWh8Xvu248x+vw6Z7ExWOhGXFmQ1MW7YvASg/SdxWkhlF9HmkkTif1LdMB22x6QDA== +"@aws-sdk/middleware-logger@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.387.0.tgz#bbc05eb087989d6addecc58f1baeb39334851e6e" + integrity sha512-FjAvJr1XyaInT81RxUwgifnbXoFJrRBFc64XeFJgFanGIQCWLYxRrK2HV9eBpao/AycbmuoHgLd/f0sa4hZFoQ== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-recursion-detection@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.378.0.tgz#706f505f608a766d617fbdad20ca30a7abccb311" - integrity sha512-mUMfHAz0oGNIWiTZHTVJb+I515Hqs2zx1j36Le4MMiiaMkPW1SRUF1FIwGuc1wh6E8jB5q+XfEMriDjRi4TZRA== +"@aws-sdk/middleware-recursion-detection@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.387.0.tgz#34beba7dc436dcf13065f5ad99cc239f2f6175b9" + integrity sha512-ZF45T785ru8OwvYZw6awD9Z76OwSMM1eZzj2eY+FDz1cHfkpLjxEiti2iIH1FxbyK7n9ZqDUx29lVlCv238YyQ== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-sdk-ec2@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-ec2/-/middleware-sdk-ec2-3.378.0.tgz#dcf05077fecf1c18100dd72c0850d124de0fa9ba" - integrity sha512-pJd9tzDXGWUMKei3+diTIrUL6xy3UCPP468aU8hUQo4TT9fceAIZEx/yKkAnFKbzLhpHrz4DONHgmdP0QwDoiw== +"@aws-sdk/middleware-sdk-ec2@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-ec2/-/middleware-sdk-ec2-3.387.0.tgz#4b5f0ae3147adaf5b2c43aafe0bcdb94c4fc9195" + integrity sha512-1VOi3yZDNmdrn19/ovZH8mf69l8n2IPG8p2h8KukJ7X+0J6D7K+I+LgyqoSFRBASBT/qvB6MJSw/SazfeQJ5Kw== dependencies: - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-format-url" "3.378.0" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-format-url" "3.387.0" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" "@smithy/signature-v4" "^2.0.0" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-sdk-route53@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-route53/-/middleware-sdk-route53-3.378.0.tgz#cdba85fcb93bfe499f47f46580e35d1641bb2977" - integrity sha512-APykNB6h2TyOQ0F7pwKcuYtMV9FuPq5Y/4KSBn3rM8V9BmcVQwT4MwKqlCSitLQtIf+FdhgkwH2JovLO+GB5PQ== +"@aws-sdk/middleware-sdk-route53@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-route53/-/middleware-sdk-route53-3.387.0.tgz#22af74bcb873c45ea944dd34270e46cd3d8ebbcf" + integrity sha512-ZDr/O6t6zsgwRzXwfEOl8LensB61i5lkIAzaizBurt7N0dNZJZ/bMb+Z/aAfMwlOgPchAfCk6PadFY7lrpPhHw== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-sdk-s3@3.379.1": - version "3.379.1" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.379.1.tgz#e9c9911601261d74921b18f5ba9aeb14bc9d1a2a" - integrity sha512-NVHRpNLfkHCqr3CE1Bmlf8Fhys8lL78kDX7UONnTZXvSiSXmCS7EbNtGDghZ8IKi+V9S/ifB4sLsX3tfzY0i6Q== +"@aws-sdk/middleware-sdk-s3@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.387.0.tgz#35a71ff4d5e38a3cc588a77c7f7a98706f24d30e" + integrity sha512-OIUBDzGhglI6KjXVwPLh7hRbrfCpSTwWRkbXbLrPgZZuzWMoJJ3q59RVkpLnAV9Mdkg6+YA6JTw4k4hcmJblVw== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-sdk-sts@3.379.1": - version "3.379.1" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.379.1.tgz#4238aa2fa4ad4b0f7e0f6bb08d7c131b7d6a2baa" - integrity sha512-SK3gSyT0XbLiY12+AjLFYL9YngxOXHnZF3Z33Cdd4a+AUYrVBV7JBEEGD1Nlwrcmko+3XgaKlmgUaR5s91MYvg== +"@aws-sdk/middleware-sdk-sts@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.387.0.tgz#6bd1e4eb17acc7387fa4231da52378ef77e10b1b" + integrity sha512-7ZzRKOJ4V/JDQmKz9z+FjZqw59mrMATEMLR6ff0H0JHMX0Uk5IX8TQB058ss+ar14qeJ4UcteYzCqHNI0O1BHw== dependencies: - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/middleware-signing" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-signing@3.379.1": - version "3.379.1" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.379.1.tgz#ebb7912868076babec851f9f703862dae6583a89" - integrity sha512-kBk2ZUvR84EM4fICjr8K+Ykpf8SI1UzzPp2/UVYZ0X+4H/ZCjfSqohGRwHykMqeplne9qHSL7/rGJs1H3l3gPg== +"@aws-sdk/middleware-signing@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.387.0.tgz#74bf5a9cf35239b5745a384a9d8f6f92afbd8328" + integrity sha512-oJXlE0MES8gxNLo137PPNNiOICQGOaETTvq3kBSJgb/gtEAxQajMIlaNT7s1wsjOAruFHt4975nCXuY4lpx7GQ== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^2.0.1" + "@smithy/protocol-http" "^2.0.2" "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-middleware" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/middleware-ssec@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.378.0.tgz#7746d75ae4614a348c3f9d1a7693009ee60026a2" - integrity sha512-WDT2LOd6OxlY1zkrRG9ZtW2vFms/dsqMg9VyE88RKG2oATxSXEhkr5zLbNVh3TyuUKnV9jydate56d/ECwHOHg== +"@aws-sdk/middleware-ssec@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.387.0.tgz#b61c6fa63b25335e408c673201822d6864a7aa34" + integrity sha512-Jtie1gqqcs7ZuYDlz/kuI3CKCXoCL5Ov/Gj5X8/XmwrQJEpuB6z0KY5H1qY0xo+jtAhC8nDPv0GnuLoOfn85hw== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/middleware-user-agent@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.382.0.tgz#d30cf323e3dbc6e87909d382ec7c1245c7505016" - integrity sha512-LFRW1jmXOrOAd3911ktn6oaYmuurNnulbdRMOUdwz99GGdLVFipQhOi9idKswb8IOhPa4jEVQt25Kcv7ctvu0A== +"@aws-sdk/middleware-user-agent@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.387.0.tgz#aa5f9eb4f3cb4d6e0df879d8d84ccaf4f8baf8e5" + integrity sha512-hTfFTwDtp86xS98BKa+RFuLfcvGftxwzrbZeisZV8hdb4ZhvNXjSxnvM3vetW0GUEnY9xHPSGyp2ERRTinPKFQ== dependencies: - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.382.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-endpoints" "3.387.0" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@aws-sdk/node-http-handler@^3.370.0": @@ -1361,49 +1322,48 @@ "@smithy/node-http-handler" "^1.0.2" tslib "^2.5.0" -"@aws-sdk/s3-request-presigner@^3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.382.0.tgz#fc0788b2cdd9bd4c0ac2674f487b29ab1ec9eef6" - integrity sha512-Mk/g+mV2ICAJX3kN3jyjGb+K914CWSKYtcX9htVPW16Zgx2T0yf84o6Rf4eUFCdRaLKNXyBGKk+V0d7bge1v+Q== - dependencies: - "@aws-sdk/signature-v4-multi-region" "3.378.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-format-url" "3.378.0" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" +"@aws-sdk/s3-request-presigner@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.387.0.tgz#f580b65445edd889121cb78e9aec8a89a379966f" + integrity sha512-trk3kMN04nuHsK4wzoSOo1V5qBuYZxjV6bXqHJXqTAjMgiOpJkJAH3d9X1friCcgAZNFB6szvc7jTiDQZGF6LQ== + dependencies: + "@aws-sdk/signature-v4-multi-region" "3.387.0" + "@aws-sdk/types" "3.387.0" + "@aws-sdk/util-format-url" "3.387.0" + "@smithy/middleware-endpoint" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/smithy-client" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/signature-v4-multi-region@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.378.0.tgz#bb6e46eab9009e36c22155b33dbaa2322f8ce4cc" - integrity sha512-gtuABS7EeYZQeNzTrabY3Ruv4wWmoz4u8OMSGl47gYPDWA70WYEZ0aoi4zSGuKhXiqtVvTsO9wGEMIInwV5phQ== +"@aws-sdk/signature-v4-multi-region@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.387.0.tgz#f0fab615dd7cff320ba5500611b968ab0581dc44" + integrity sha512-SGuUbEFi8BXYVv4M7Hc0488I7uZbTVBW19j/B7bnyfbKFrndBXM366s/mChx4iELtESQ61AAstyafx5nGj5tIg== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" + "@aws-sdk/types" "3.387.0" + "@smithy/protocol-http" "^2.0.2" "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/token-providers@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.382.0.tgz#3485341d2998e5dbf0d3e61d272f7a5f930a4193" - integrity sha512-axn4IyPpHdkXi8G06KCB3tPz79DipZFFH9N9YVDpLMnDYTdfX36HGdYzINaQc+z+XPbEpa1ZpoIzWScHRjFjdg== +"@aws-sdk/token-providers@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.387.0.tgz#701aded6aba409bec17df354ce006468934a7791" + integrity sha512-W9lPW6zR8yrfvDDLJnKCvHs2KwmydSo+1bG5i6WzFnY3aeOgPBJO2eDIJajZG8Q/L++ZwDaNDLL+ROnIMcg6GA== dependencies: - "@aws-sdk/client-sso-oidc" "3.382.0" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@aws-sdk/types@3.378.0", "@aws-sdk/types@^3.222.0", "@aws-sdk/types@^3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.378.0.tgz#93a811ccdf15c81b1947f1cd67922c4690792189" - integrity sha512-qP0CvR/ItgktmN8YXpGQglzzR/6s0nrsQ4zIfx3HMwpsBTwuouYahcCtF1Vr82P4NFcoDA412EJahJ2pIqEd+w== +"@aws-sdk/types@3.387.0", "@aws-sdk/types@^3.222.0", "@aws-sdk/types@^3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.387.0.tgz#15a968344956b2587dbab1224718d72329e050f4" + integrity sha512-YTjFabNwjTF+6yl88f0/tWff018qmmgMmjlw45s6sdVKueWxdxV68U7gepNLF2nhaQPZa6FDOBoA51NaviVs0Q== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@aws-sdk/util-arn-parser@3.310.0": @@ -1413,22 +1373,22 @@ dependencies: tslib "^2.5.0" -"@aws-sdk/util-endpoints@3.382.0": - version "3.382.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.382.0.tgz#534c491624c9eac517148ab4f833b9b7332f16bb" - integrity sha512-flajPyjmjNG67fXk7l4GoTB/7J11VBqtFZXuuAZKhKU07Ia3IQupsFqNf5lV8D44ZgjnKH0fTGnv3dUALjW7Wg== +"@aws-sdk/util-endpoints@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.387.0.tgz#86d7611527ce916c39dfc02641b8be6e0ad8f1f4" + integrity sha512-g7kvuCXehGXHHBw9PkSQdwVyDFmNUZLmfrRmqMyrMDG9QLQrxr4pyWcSaYgTE16yUzhQQOR+QSey+BL6W9/N6g== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.387.0" tslib "^2.5.0" -"@aws-sdk/util-format-url@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.378.0.tgz#120b14a53cd7c8238407d0179570ad9be79c9895" - integrity sha512-CtW2HnCq08ildVD7B5OPn1zOxBAMBjkDxqzOcLw3Rk9F6OKuMM9hawulU62tMtouJPC0QSS6eLoNOrYGch5ehQ== +"@aws-sdk/util-format-url@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.387.0.tgz#7f69104cf99d35fc0e885490b6ae22cc379a6ef3" + integrity sha512-kiy7+93M1JeEn3pLJhY/q4G3f9tGsSbsgHKg2mDTCIxJaUmnHIYINN9vhEYQcDCMcWvOF0rzkuB9L8uAzR4O3g== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/querystring-builder" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/querystring-builder" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@aws-sdk/util-locate-window@^3.0.0": @@ -1438,24 +1398,24 @@ dependencies: tslib "^2.5.0" -"@aws-sdk/util-user-agent-browser@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.378.0.tgz#e756215da5bd1654a308b4e5383ebdcfc938fb0a" - integrity sha512-FSCpagzftK1W+m7Ar6lpX7/Gr9y5P56nhFYz8U4EYQ4PkufS6czWX9YW+/FA5OYV0vlQ/SvPqMnzoHIPUNhZrQ== +"@aws-sdk/util-user-agent-browser@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.387.0.tgz#a59409a168a73a3ce08c0ac831593f864490078e" + integrity sha512-lpgSVvDqx+JjHZCTYs/yQSS7J71dPlJeAlvxc7bmx5m+vfwKe07HAnIs+929DngS0QbAp/VaXbTiMFsInLkO4Q== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/types" "^2.1.0" bowser "^2.11.0" tslib "^2.5.0" -"@aws-sdk/util-user-agent-node@3.378.0": - version "3.378.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.378.0.tgz#7af728f1823e860853998166a2bda0f0044251ef" - integrity sha512-IdwVJV0E96MkJeFte4dlWqvB+oiqCiZ5lOlheY3W9NynTuuX0GGYNC8Y9yIsV8Oava1+ujpJq0ww6qXdYxmO4A== +"@aws-sdk/util-user-agent-node@3.387.0": + version "3.387.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.387.0.tgz#54ae2e17fb3738c018891bdb67ab4e4cce219e6f" + integrity sha512-r9OVkcWpRYatjLhJacuHFgvO2T5s/Nu5DDbScMrkUD8b4aGIIqsrdZji0vZy9FCjsUFQMM92t9nt4SejrGjChA== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.387.0" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@aws-sdk/util-utf8-browser@^3.0.0": @@ -1479,12 +1439,13 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" + integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA== dependencies: - "@babel/highlight" "^7.22.5" + "@babel/highlight" "^7.22.10" + chalk "^2.4.2" "@babel/compat-data@^7.22.9": version "7.22.9" @@ -1492,40 +1453,40 @@ integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.7.5": - version "7.22.9" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f" - integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w== + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz#aad442c7bcd1582252cb4576747ace35bc122f35" + integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.9" - "@babel/helper-compilation-targets" "^7.22.9" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" "@babel/helper-module-transforms" "^7.22.9" - "@babel/helpers" "^7.22.6" - "@babel/parser" "^7.22.7" + "@babel/helpers" "^7.22.10" + "@babel/parser" "^7.22.10" "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.8" - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" semver "^6.3.1" -"@babel/generator@^7.22.7", "@babel/generator@^7.22.9", "@babel/generator@^7.7.2": - version "7.22.9" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" - integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== +"@babel/generator@^7.22.10", "@babel/generator@^7.7.2": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722" + integrity sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.22.10" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.22.9": - version "7.22.9" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" - integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== +"@babel/helper-compilation-targets@^7.22.10": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz#01d648bbc25dd88f513d862ee0df27b7d4e67024" + integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q== dependencies: "@babel/compat-data" "^7.22.9" "@babel/helper-validator-option" "^7.22.5" @@ -1605,28 +1566,28 @@ resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== -"@babel/helpers@^7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz#8e61d3395a4f0c5a8060f309fb008200969b5ecd" - integrity sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA== +"@babel/helpers@^7.22.10": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz#ae6005c539dfbcb5cd71fb51bfc8a52ba63bc37a" + integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw== dependencies: "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.6" - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" -"@babel/highlight@^7.10.4", "@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== +"@babel/highlight@^7.10.4", "@babel/highlight@^7.22.10": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" + integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== dependencies: "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.0.0" + chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.5", "@babel/parser@^7.22.7": - version "7.22.7" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae" - integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55" + integrity sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -1735,26 +1696,26 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8": - version "7.22.8" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e" - integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw== +"@babel/traverse@^7.22.10": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz#20252acb240e746d27c2e82b4484f199cf8141aa" + integrity sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig== dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-function-name" "^7.22.5" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.7" - "@babel/types" "^7.22.5" + "@babel/parser" "^7.22.10" + "@babel/types" "^7.22.10" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" + integrity sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg== dependencies: "@babel/helper-string-parser" "^7.22.5" "@babel/helper-validator-identifier" "^7.22.5" @@ -1801,115 +1762,115 @@ enabled "2.0.x" kuler "^2.0.0" -"@esbuild/android-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz#9e00eb6865ed5f2dbe71a1e96f2c52254cd92903" - integrity sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg== - -"@esbuild/android-arm@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.17.tgz#1aa013b65524f4e9f794946b415b32ae963a4618" - integrity sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg== - -"@esbuild/android-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.17.tgz#c2bd0469b04ded352de011fae34a7a1d4dcecb79" - integrity sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw== - -"@esbuild/darwin-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz#0c21a59cb5bd7a2cec66c7a42431dca42aefeddd" - integrity sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g== - -"@esbuild/darwin-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz#92f8763ff6f97dff1c28a584da7b51b585e87a7b" - integrity sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g== - -"@esbuild/freebsd-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz#934f74bdf4022e143ba2f21d421b50fd0fead8f8" - integrity sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ== - -"@esbuild/freebsd-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz#16b6e90ba26ecc865eab71c56696258ec7f5d8bf" - integrity sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA== - -"@esbuild/linux-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz#179a58e8d4c72116eb068563629349f8f4b48072" - integrity sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ== - -"@esbuild/linux-arm@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz#9d78cf87a310ae9ed985c3915d5126578665c7b5" - integrity sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg== - -"@esbuild/linux-ia32@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz#6fed202602d37361bca376c9d113266a722a908c" - integrity sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg== - -"@esbuild/linux-loong64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz#cdc60304830be1e74560c704bfd72cab8a02fa06" - integrity sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg== - -"@esbuild/linux-mips64el@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz#c367b2855bb0902f5576291a2049812af2088086" - integrity sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ== - -"@esbuild/linux-ppc64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz#7fdc0083d42d64a4651711ee0a7964f489242f45" - integrity sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ== - -"@esbuild/linux-riscv64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz#5198a417f3f5b86b10c95647b8bc032e5b6b2b1c" - integrity sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g== - -"@esbuild/linux-s390x@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz#7459c2fecdee2d582f0697fb76a4041f4ad1dd1e" - integrity sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg== - -"@esbuild/linux-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz#948cdbf46d81c81ebd7225a7633009bc56a4488c" - integrity sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ== - -"@esbuild/netbsd-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz#6bb89668c0e093c5a575ded08e1d308bd7fd63e7" - integrity sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ== - -"@esbuild/openbsd-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz#abac2ae75fef820ef6c2c48da4666d092584c79d" - integrity sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA== - -"@esbuild/sunos-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz#74a45fe1db8ea96898f1a9bb401dcf1dadfc8371" - integrity sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g== - -"@esbuild/win32-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz#fd95ffd217995589058a4ed8ac17ee72a3d7f615" - integrity sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw== - -"@esbuild/win32-ia32@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz#9b7ef5d0df97593a80f946b482e34fcba3fa4aaf" - integrity sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg== - -"@esbuild/win32-x64@0.18.17": - version "0.18.17" - resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz#bcb2e042631b3c15792058e189ed879a22b2968b" - integrity sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA== +"@esbuild/android-arm64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.0.tgz#c5ea635bdbe9b83d1f78a711120814e716439029" + integrity sha512-AzsozJnB+RNaDncBCs3Ys5g3kqhPFUueItfEaCpp89JH2naFNX2mYDIvUgPYMqqjm8hiFoo+jklb3QHZyR3ubw== + +"@esbuild/android-arm@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.0.tgz#6eb6e1fbc0dbfafa035aaef8b5ecde25b539fcf9" + integrity sha512-GAkjUyHgWTYuex3evPd5V7uV/XS4LMKr1PWHRPW1xNyy/Jx08x3uTrDFRefBYLKT/KpaWM8/YMQcwbp5a3yIDA== + +"@esbuild/android-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.0.tgz#99f154f71f5b92e778468bcf0f425d166c17bf20" + integrity sha512-SUG8/qiVhljBDpdkHQ9DvOWbp7hFFIP0OzxOTptbmVsgBgzY6JWowmMd6yJuOhapfxmj/DrvwKmjRLvVSIAKZg== + +"@esbuild/darwin-arm64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.0.tgz#2fcc11abf95fbabbf9167db6a11d899385bd777b" + integrity sha512-HkxZ8k3Jvcw0FORPNTavA8BMgQjLOB6AajT+iXmil7BwY3gU1hWvJJAyWyEogCmA4LdbGvKF8vEykdmJ4xNJJQ== + +"@esbuild/darwin-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.0.tgz#b5bbde35468db093fdf994880b0eb4b62613b67c" + integrity sha512-9IRWJjqpWFHM9a5Qs3r3bK834NCFuDY5ZaLrmTjqE+10B6w65UMQzeZjh794JcxpHolsAHqwsN/33crUXNCM2Q== + +"@esbuild/freebsd-arm64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.0.tgz#3f64c76dc590f79cc40acef6b22dd5eb89fc2125" + integrity sha512-s7i2WcXcK0V1PJHVBe7NsGddsL62a9Vhpz2U7zapPrwKoFuxPP9jybwX8SXnropR/AOj3ppt2ern4ItblU6UQQ== + +"@esbuild/freebsd-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.0.tgz#14d497e9e858fba2bb9b16130602b7f5944bc09c" + integrity sha512-NMdBSSdgwHCqCsucU5k1xflIIRU0qi1QZnM6+vdGy5fvxm1c8rKh50VzsWsIVTFUG3l91AtRxVwoz3Lcvy3I5w== + +"@esbuild/linux-arm64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.0.tgz#0f2f4d8889f7dc89681c306d7312aa76445a5f65" + integrity sha512-I4zvE2srSZxRPapFnNqj+NL3sDJ1wkvEZqt903OZUlBBgigrQMvzUowvP/TTTu2OGYe1oweg5MFilfyrElIFag== + +"@esbuild/linux-arm@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.0.tgz#0b0f79dc72884f0ad02c0aabfc969a0bee7f6775" + integrity sha512-2F1+lH7ZBcCcgxiSs8EXQV0PPJJdTNiNcXxDb61vzxTRJJkXX1I/ye9mAhfHyScXzHaEibEXg1Jq9SW586zz7w== + +"@esbuild/linux-ia32@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.0.tgz#dfcece1f5e74d0e7db090475e48b28d9aa270687" + integrity sha512-dz2Q7+P92r1Evc8kEN+cQnB3qqPjmCrOZ+EdBTn8lEc1yN8WDgaDORQQiX+mxaijbH8npXBT9GxUqE52Gt6Y+g== + +"@esbuild/linux-loong64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.0.tgz#710f5bd55db3f5d9ebac8773ea49795261a35ca7" + integrity sha512-IcVJovJVflih4oFahhUw+N7YgNbuMSVFNr38awb0LNzfaiIfdqIh518nOfYaNQU3aVfiJnOIRVJDSAP4k35WxA== + +"@esbuild/linux-mips64el@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.0.tgz#a918b310f9bf31fced3853ca52fee6e7acc09824" + integrity sha512-bZGRAGySMquWsKw0gIdsClwfvgbsSq/7oq5KVu1H1r9Il+WzOcfkV1hguntIuBjRVL8agI95i4AukjdAV2YpUw== + +"@esbuild/linux-ppc64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.0.tgz#104771ef6ce2719ac17031f6b9ed8aa98f8e5faf" + integrity sha512-3LC6H5/gCDorxoRBUdpLV/m7UthYSdar0XcCu+ypycQxMS08MabZ06y1D1yZlDzL/BvOYliRNRWVG/YJJvQdbg== + +"@esbuild/linux-riscv64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.0.tgz#83beafa472ad4224adcd4d7469e3a17ba1fbd976" + integrity sha512-jfvdKjWk+Cp2sgLtEEdSHXO7qckrw2B2eFBaoRdmfhThqZs29GMMg7q/LsQpybA7BxCLLEs4di5ucsWzZC5XPA== + +"@esbuild/linux-s390x@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.0.tgz#edc26cb41d8745716bda9c26bac1f0001eaad029" + integrity sha512-ofcucfNLkoXmcnJaw9ugdEOf40AWKGt09WBFCkpor+vFJVvmk/8OPjl/qRtks2Z7BuZbG3ztJuK1zS9z5Cgx9A== + +"@esbuild/linux-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.0.tgz#80a6b5e55ad454e0c0af5bdb267335287e331007" + integrity sha512-Fpf7zNDBti3xrQKQKLdXT0hTyOxgFdRJIMtNy8x1az9ATR9/GJ1brYbB/GLWoXhKiHsoWs+2DLkFVNNMTCLEwA== + +"@esbuild/netbsd-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.0.tgz#2e6e8d869b58aea34bab9c0c47f15ae1bda29a90" + integrity sha512-AMQAp/5oENgDOvVhvOlbhVe1pWii7oFAMRHlmTjSEMcpjTpIHtFXhv9uAFgUERHm3eYtNvS9Vf+gT55cwuI6Aw== + +"@esbuild/openbsd-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.0.tgz#ca0817d3ab332afb0d8d96a2eb42b4d8ebaa8715" + integrity sha512-fDztEve1QUs3h/Dw2AUmBlWGkNQbhDoD05ppm5jKvzQv+HVuV13so7m5RYeiSMIC2XQy7PAjZh+afkxAnCRZxA== + +"@esbuild/sunos-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.0.tgz#8de27de2563cb3eb6c1af066b6d7fcb1229fe3d4" + integrity sha512-bKZzJ2/rvUjDzA5Ddyva2tMk89WzNJEibZEaq+wY6SiqPlwgFbqyQLimouxLHiHh1itb5P3SNCIF1bc2bw5H9w== + +"@esbuild/win32-arm64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.0.tgz#67c2b410ff8862be2cd61145ad21e11be00fb914" + integrity sha512-NQJ+4jmnA79saI+sE+QzcEls19uZkoEmdxo7r//PDOjIpX8pmoWtTnWg6XcbnO7o4fieyAwb5U2LvgWynF4diA== + +"@esbuild/win32-ia32@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.0.tgz#cac8992219c6d943bb22226e4afeb3774a29cca1" + integrity sha512-uyxiZAnsfu9diHm9/rIH2soecF/HWLXYUhJKW4q1+/LLmNQ+55lRjvSUDhUmsgJtSUscRJB/3S4RNiTb9o9mCg== + +"@esbuild/win32-x64@0.19.0": + version "0.19.0" + resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.0.tgz#fa5f12c96811cec3233a53bdbf61d1a05ba9018f" + integrity sha512-jl+NXUjK2StMgqnZnqgNjZuerFG8zQqWXMBZdMMv4W/aO1ZKQaYWZBxTrtWKphkCBVEMh0wMVfGgOd2BjOZqUQ== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -2261,12 +2222,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/resolve-uri@^3.0.3": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== @@ -2276,12 +2232,7 @@ resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== @@ -2295,12 +2246,12 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.18" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== + version "0.3.19" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@jsii/check-node@1.85.0": version "1.85.0" @@ -2310,18 +2261,18 @@ chalk "^4.1.2" semver "^7.5.1" -"@jsii/check-node@1.86.0": - version "1.86.0" - resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.86.0.tgz#3f13844558504f194e88a2a08472b55844dcd8f1" - integrity sha512-MbtjcBOSopGmn1wnwJ/YvXY+zebcrWjg/MSkYdMSfC8Kj9PlBC1M4TxOdmUFNxtM2vZs6B6HGyOaObQigDvdpg== +"@jsii/check-node@1.86.1": + version "1.86.1" + resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.86.1.tgz#ceffe3e06cf8208c2b5a16e60ff55faa72cd79a2" + integrity sha512-lxcuw/TgUkh1dD01B39V47pwmF8yWUm8BiQKb0jpOY0xaE9nSlq9kRfTR7XaXu37w59jeYepI5af/GyUf9+TXw== dependencies: chalk "^4.1.2" semver "^7.5.4" -"@jsii/spec@1.86.0", "@jsii/spec@^1.84.0", "@jsii/spec@^1.85.0", "@jsii/spec@^1.86.0": - version "1.86.0" - resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.86.0.tgz#f8ff41b319fd00f4bcfeead2137375dc947bd882" - integrity sha512-4aSVSKbE50LEJbky6bVvl4wmbZJqIJCQt+qFkUQzxbmbpM/K9iDTCD+EXMqHU1lRs33Wcu86MvDxtVCncXiNuQ== +"@jsii/spec@1.86.1", "@jsii/spec@^1.84.0", "@jsii/spec@^1.85.0", "@jsii/spec@^1.86.1": + version "1.86.1" + resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.86.1.tgz#0f8911f5d5cfb2606628f143ac7d195b7870c890" + integrity sha512-wD0Y0pVg/1jjbZImk2FIuj+YdpwLFEsKCpoC3XKLJyNyUZPSoJzrt3phLV8HRLmH0m52kw6rh044OIowedcc9A== dependencies: ajv "^8.12.0" @@ -3105,12 +3056,12 @@ "@smithy/types" "^1.2.0" tslib "^2.5.0" -"@smithy/abort-controller@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.1.tgz#ddb5dd8c37016e8fcf772bd9c80e900860d74ae6" - integrity sha512-0s7XjIbsTwZyUW9OwXQ8J6x1UiA1TNCh60Vaw56nHahL7kUZsLhmTlWiaxfLkFtO2Utkj8YewcpHTYpxaTzO+w== +"@smithy/abort-controller@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.2.tgz#e2188247a1723b58d60b0803f3ba24b76a714413" + integrity sha512-ln5Cob0mksym62sLr7NiPOSqJ0jKao4qjfcNLDdgINM1lQI12hXrZBlKdPHbXJqpKhKiECDgonMoqCM8bigq4g== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/chunked-blob-reader-native@^2.0.0": @@ -3128,118 +3079,118 @@ dependencies: tslib "^2.5.0" -"@smithy/config-resolver@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.1.tgz#ea7981f4716961889d1c7d16aaa956cf7dae2b79" - integrity sha512-l83Pm7hV+8CBQOCmBRopWDtF+CURUJol7NsuPYvimiDhkC2F8Ba9T1imSFE+pD1UIJ9jlsDPAnZfPJT5cjnuEw== +"@smithy/config-resolver@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.2.tgz#64496d2f2f9f1482d2e982d3dc057dccc4ba97db" + integrity sha512-0kdsqBL6BdmSbdU6YaDkodVBMua5MuQQluC3nocJ7OJ6PnOuM7i2FEQHE46LBadLqT+CimlDSM+6j91uHNL1ng== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-config-provider" "^2.0.0" "@smithy/util-middleware" "^2.0.0" tslib "^2.5.0" -"@smithy/credential-provider-imds@^2.0.0", "@smithy/credential-provider-imds@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.1.tgz#e034f3d8ee6ad178becb267886056233870661d0" - integrity sha512-8VxriuRINNEfVZjEFKBY75y9ZWAx73DZ5K/u+3LmB6r8WR2h3NaFxFKMlwlq0uzNdGhD1ouKBn9XWEGYHKiPLw== +"@smithy/credential-provider-imds@^2.0.0", "@smithy/credential-provider-imds@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.2.tgz#9096ff1a2ceb235497a62d469ac70086b96022ad" + integrity sha512-mbWFYEZ00LBRDk3WvcXViwpdpkJQcfrM3seuKzFxZnF6wIBLMwrcWcsj+OUC/1L+86m8aQY9imXMAaQsAoGxow== dependencies: - "@smithy/node-config-provider" "^2.0.1" - "@smithy/property-provider" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/property-provider" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" tslib "^2.5.0" -"@smithy/eventstream-codec@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.1.tgz#b84e224db346066e817ca9ca23260798a1aa071e" - integrity sha512-/IiNB7gQM2y2ZC/GAWOWDa8+iXfhr1g9Xe5979cQEOdCWDISvrAiv18cn3OtIQUhbYOR3gm7QtCpkq1to2takQ== +"@smithy/eventstream-codec@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.2.tgz#9d81c8d081ac28ba098d98b06cbb39955af1e09b" + integrity sha512-PQZiKx7fMnNwx4zxcUCm82VjnqK6wV4MEHSmMy3taj5dKfXV782IjRGyaDT+8TsmNqVdZIkve5zLRAzh+7kOhA== dependencies: "@aws-crypto/crc32" "3.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-hex-encoding" "^2.0.0" tslib "^2.5.0" -"@smithy/eventstream-serde-browser@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.1.tgz#7d19409327b6015b19ac926833185be2d5eee357" - integrity sha512-9E1/6ZGF7nB/Td3G1kcatU7VjjP8eZ/p/Q+0KsZc1AUPyv4lR15pmWnWj3iGBEGYI9qZBJ/7a/wPEPayabmA3Q== +"@smithy/eventstream-serde-browser@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.2.tgz#96558c867291d90cbd30927c3c1b480991d48e5f" + integrity sha512-qaHlcFI+ILE+gZV2B/aZMVXc9LG4v1Owa20dHlP0dLOiJ9WByOjtD2qZmYA/HO4qkkDZHEL/0baWc63aqLCHKQ== dependencies: - "@smithy/eventstream-serde-universal" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/eventstream-serde-universal" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@smithy/eventstream-serde-config-resolver@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.1.tgz#fa3562f771a0d3dc4bc83ad7b7f437deda53b3ff" - integrity sha512-J8a+8HH8oDPIgq8Px/nPLfu9vpIjQ7XUPtP3orbs8KUh0GznNthSTy1xZP5RXjRqGQEkxPvsHf1po2+QOsgNFw== +"@smithy/eventstream-serde-config-resolver@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.2.tgz#7f23160a99276a8d3d29d84e2266bc20896cda44" + integrity sha512-iVC7/NFNWfSXllAxFNUuC4QlREdZjMmAOdISb6fwny/4mUDt1EtYLCrXq7gN1mIzhRPwMpL9YvQ8jpgvfA0Jdw== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@smithy/eventstream-serde-node@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.1.tgz#d456591097f94e4fd29448fd7b33e2e1f79bfe61" - integrity sha512-wklowUz0zXJuqC7FMpriz66J8OAko3z6INTg+iMJWYB1bWv4pc5V7q36PxlZ0RKRbj0u+EThlozWgzE7Stz2Sw== +"@smithy/eventstream-serde-node@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.2.tgz#0f48deca0bde6b1216c6457780294ce77416a36a" + integrity sha512-p7py8jDpIS1bRewskwgEgJx1OkFvockA2bJnXtOAPJib42DtyRpp8oV14s2ZpjMq57r9KMCQy2j02g554DNavg== dependencies: - "@smithy/eventstream-serde-universal" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/eventstream-serde-universal" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@smithy/eventstream-serde-universal@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.1.tgz#206e1cd437b0da09a2a45af3ddc3b7e3b9789734" - integrity sha512-WPPylIgVZ6wOYVgpF0Rs1LlocYyj248MRtKEEehnDvC+0tV7wmGt7H/SchCh10W4y4YUxuzPlW+mUvVMGmLSVg== +"@smithy/eventstream-serde-universal@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.2.tgz#8dcc8bf3704afc09d999d13776362bb0b20d4394" + integrity sha512-zf/hm5VIDsvl+XpI1rop4xwXLKiBUe5pxgjRFdHi7AC1p6Zc8uJfyCExLiMUP/QspoIrVV1xGwFFxRCeddDH3g== dependencies: - "@smithy/eventstream-codec" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/eventstream-codec" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@smithy/fetch-http-handler@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.0.1.tgz#5c8903897d3fd7ae3758ed7760d559d72d27e902" - integrity sha512-/SoU/ClazgcdOxgE4zA7RX8euiELwpsrKCSvulVQvu9zpmqJRyEJn8ZTWYFV17/eHOBdHTs9kqodhNhsNT+cUw== +"@smithy/fetch-http-handler@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.0.2.tgz#dcc0e9d365efd8feef4a54dd96a264735a1446b7" + integrity sha512-Wo2m1RaiXNSLF4J3D62LpdSoj/YYb+6tn0H8is1tSrzr7eXAdiYVBc0wIa23N0wT4zmN0iG/yNY6gTCDQ6799A== dependencies: - "@smithy/protocol-http" "^2.0.1" - "@smithy/querystring-builder" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/querystring-builder" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-base64" "^2.0.0" tslib "^2.5.0" -"@smithy/hash-blob-browser@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.1.tgz#3755965d74e2438ed337f5e11cd4d332d8945a9e" - integrity sha512-i/o2+sHb4jDRz5nf2ilTTbC0nVmm4LO//FbODCAB7pbzMdywxbZ6z+q56FmEa8R+aFbtApxQ1SJ3umEiNz6IPg== +"@smithy/hash-blob-browser@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.2.tgz#23a35029eea0832ff0c3ae0f89cd3c78385b68e9" + integrity sha512-CmVGWbiyiEySGDRg3o2C3DLZYW+mH8fMoIEZrmwnBM8bQsepZGOME40tbpvv12BIhZIInJV8srMMHpQ6aKObLA== dependencies: "@smithy/chunked-blob-reader" "^2.0.0" "@smithy/chunked-blob-reader-native" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@smithy/hash-node@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.1.tgz#458b74378cbfecf6dcd1ffc6b7ec7d29a4247efd" - integrity sha512-oTKYimQdF4psX54ZonpcIE+MXjMUWFxLCNosjPkJPFQ9whRX0K/PFX/+JZGRQh3zO9RlEOEUIbhy9NO+Wha6hw== +"@smithy/hash-node@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.2.tgz#e968a3e7ab7072bd12297063e3770ae6d9249dee" + integrity sha512-JKDzZ1YVR7JzOBaJoWy3ToJCE86OQE6D4kOBvvVsu93a3lcF9kv6KYTKBYEWAjwOn/CpK4NH7mKB01OQ8H+aiA== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-buffer-from" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/hash-stream-node@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.1.tgz#6a5307b12ff11bc72d28b211aca086d8d0f992a0" - integrity sha512-AequnQdPRuXf4AuvvFlSjnkWI460xxhAd6y362gFtOE4jjJLLXblbMAXVFrkV8/pDMGNjpVegVSpRmHXZsbKhg== +"@smithy/hash-stream-node@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.2.tgz#9c1a41d47dfef90e2b9efdca748cf8896eb366df" + integrity sha512-cDfGE81BbykXKZ50+eLU5Yat8WGiDFQpNa+5S3AfDIzz5h4D73DpxWwcwV4qYB7GoAw2chFqTCAGWgU/MgRS9g== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/invalid-dependency@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.1.tgz#bb49b297e2141ec2ba6e131e0946af0ba59509e2" - integrity sha512-2q/Eb0AE662zwyMV+z+TL7deBwcHCgaZZGc0RItamBE8kak3MzCi/EZCNoFWoBfxgQ4jfR12wm8KKsSXhJzJtQ== +"@smithy/invalid-dependency@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.2.tgz#1f7b6a860395e9f11fcdbdf3ac22fb95ce863c69" + integrity sha512-inQZQ5gCO3WRWuXpsc1YJ4KBjsvj2qsoU32yTIKznBWTCQe/D5Dp+sSaysqBqxe0VTZ+8nFEHdUMWUX2BxQThw== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/is-array-buffer@^2.0.0": @@ -3249,54 +3200,54 @@ dependencies: tslib "^2.5.0" -"@smithy/md5-js@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.1.tgz#e13ea73934101d89c726a4332c6a90f6188e3278" - integrity sha512-8WWOtwWMmIDgTkRv1o3opy3ABsRXs4/XunETK53ckxQRAiOML1PlnqLBK9Uwk9bvOD6cpmsC6dioIfmKGpJ25w== +"@smithy/md5-js@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.2.tgz#263c149105123f7a942ec9f1ba1ecb3626d3a99f" + integrity sha512-qm9845tzkYOm3HM/nFiZVMsA9nE7klO69T1qrrbrQKpUJpEFV87XDInbnRpYzBAFUH4DRodbZ9spEnjF7ffoww== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/middleware-content-length@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.1.tgz#86005cd4cb45eff5420730abe88e08d22c582d79" - integrity sha512-IZhRSk5GkVBcrKaqPXddBS2uKhaqwBgaSgbBb1OJyGsKe7SxRFbclWS0LqOR9fKUkDl+3lL8E2ffpo6EQg0igw== +"@smithy/middleware-content-length@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.2.tgz#6167e8ca52cb5f2b06d3c76fa445080c45baaf25" + integrity sha512-FmHlNfuvYgDZE3fIx0G3rD/wLXfAmBYE4mVc/w6d7RllA7TygPzq2pfHL1iCMzWkWTdoAVnt3h4aavAZnhaxEQ== dependencies: - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@smithy/middleware-endpoint@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.1.tgz#4e992dd2c9dedbff776150045904c5455df4eaf7" - integrity sha512-uz/KI1MBd9WHrrkVFZO4L4Wyv24raf0oR4EsOYEeG5jPJO5U+C7MZGLcMxX8gWERDn1sycBDqmGv8fjUMLxT6w== +"@smithy/middleware-endpoint@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.2.tgz#29f4c8ae799ffb0891f96148eb754f8d0a41a97c" + integrity sha512-ropE7/c+g22QeluZ+By/B/WvVep0UFreX+IeRMGIO7EbOUPgqtJRXpbJFdG6JKB1uC+CdaJLn4MnZnVBpcyjuA== dependencies: - "@smithy/middleware-serde" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/middleware-serde" "^2.0.2" + "@smithy/types" "^2.1.0" + "@smithy/url-parser" "^2.0.2" "@smithy/util-middleware" "^2.0.0" tslib "^2.5.0" -"@smithy/middleware-retry@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.1.tgz#d6c0aa9d117140a429951c8a1a92e05d9d0c218c" - integrity sha512-NKHF4i0gjSyjO6C0ZyjEpNqzGgIu7s8HOK6oT/1Jqws2Q1GynR1xV8XTUs1gKXeaNRzbzKQRewHHmfPwZjOtHA== +"@smithy/middleware-retry@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.2.tgz#0d6feb551a5d546c720106435d2a4e7878fd8ea2" + integrity sha512-wtBUXqtZVriiXppYaFkUrybAPhFVX7vebnW/yVPliLMWMcguOMS58qhOYPZe3t9Wki2+mASfyu+kO3An8lAg2A== dependencies: - "@smithy/protocol-http" "^2.0.1" + "@smithy/protocol-http" "^2.0.2" "@smithy/service-error-classification" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-middleware" "^2.0.0" "@smithy/util-retry" "^2.0.0" tslib "^2.5.0" uuid "^8.3.2" -"@smithy/middleware-serde@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.1.tgz#daa38ebc5873f1f7d0430e7a75b7255b69c70016" - integrity sha512-uKxPaC6ItH9ZXdpdqNtf8sda7GcU4SPMp0tomq/5lUg9oiMa/Q7+kD35MUrpKaX3IVXVrwEtkjCU9dogZ/RAUA== +"@smithy/middleware-serde@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.2.tgz#a59f74e981be8b76ef18e272d525e24e3974dc82" + integrity sha512-Kw9xLdlueIaivUWslKB67WZ/cCUg3QnzYVIA3t5KfgsseEEuU4UxXw8NSTvIt71gqQloY+Um8ugS+idgxrWWnw== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/middleware-stack@^2.0.0": @@ -3306,14 +3257,14 @@ dependencies: tslib "^2.5.0" -"@smithy/node-config-provider@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.0.1.tgz#5a17c2564dc9689d523408c9a6dea9ca1330c47f" - integrity sha512-Zoel4CPkKRTQ2XxmozZUfqBYqjPKL53/SvTDhJHj+VBSiJy6MXRav1iDCyFPS92t40Uh+Yi+Km5Ch3hQ+c/zSA== +"@smithy/node-config-provider@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.0.2.tgz#a15f125f7011ff82610297d899826b7ef7889867" + integrity sha512-9wVJccASfuCctNWrzR0zrDkf0ox3HCHGEhFlWL2LBoghUYuK28pVRBbG69wvnkhlHnB8dDZHagxH+Nq9dm7eWw== dependencies: - "@smithy/property-provider" "^2.0.1" - "@smithy/shared-ini-file-loader" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/property-provider" "^2.0.2" + "@smithy/shared-ini-file-loader" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/node-http-handler@^1.0.2": @@ -3327,23 +3278,23 @@ "@smithy/types" "^1.2.0" tslib "^2.5.0" -"@smithy/node-http-handler@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.0.1.tgz#7a1b23e30c5125ec31062a8b5edbc9fdd96ac651" - integrity sha512-Zv3fxk3p9tsmPT2CKMsbuwbbxnq2gzLDIulxv+yI6aE+02WPYorObbbe9gh7SW3weadMODL1vTfOoJ9yFypDzg== +"@smithy/node-http-handler@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.0.2.tgz#3c4d43352f5412cdb23ca075327ac997f5b03df2" + integrity sha512-lpZjmtmyZqSAtMPsbrLhb7XoAQ2kAHeuLY/csW6I2k+QyFvOk7cZeQsqEngWmZ9SJaeYiDCBINxAIM61i5WGLw== dependencies: - "@smithy/abort-controller" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/querystring-builder" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/abort-controller" "^2.0.2" + "@smithy/protocol-http" "^2.0.2" + "@smithy/querystring-builder" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" -"@smithy/property-provider@^2.0.0", "@smithy/property-provider@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.1.tgz#4c359f5063a9c664599f88be00e3f9b3e1021d4d" - integrity sha512-pmJRyY9SF6sutWIktIhe+bUdSQDxv/qZ4mYr3/u+u45riTPN7nmRxPo+e4sjWVoM0caKFjRSlj3tf5teRFy0Vg== +"@smithy/property-provider@^2.0.0", "@smithy/property-provider@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.2.tgz#abe091d1e7dc5b617e3418b63eaed11363c96f21" + integrity sha512-DfaZ8cO+d/mgnMzIllcXcU4OYP+omiOl2LYdn/fTGpw/EAQSVzscYV2muV3sDDnuPYQ/r014hUqIxnF+pzh+SQ== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/protocol-http@^1.2.0": @@ -3354,12 +3305,12 @@ "@smithy/types" "^1.2.0" tslib "^2.5.0" -"@smithy/protocol-http@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-2.0.1.tgz#4257b9b8803f1e7638022a9cc6be8ea0abacac26" - integrity sha512-mrkMAp0wtaDEIkgRObWYxI1Kun1tm6Iu6rK+X4utb6Ah7Uc3Kk4VIWwK/rBHdYGReiLIrxFCB1rq4a2gyZnSgg== +"@smithy/protocol-http@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-2.0.2.tgz#ec3d45a650cb5554b6aba1c38768f51fc9cf79b5" + integrity sha512-qWu8g1FUy+m36KpO1sREJSF7BaLmjw9AqOuwxLVVSdYz+nUQjc9tFAZ9LB6jJXKdsZFSjfkjHJBbhD78QdE7Rw== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/querystring-builder@^1.1.0": @@ -3371,21 +3322,21 @@ "@smithy/util-uri-escape" "^1.1.0" tslib "^2.5.0" -"@smithy/querystring-builder@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.1.tgz#c8326d27e3796cac8b46f580bb067e83f50b4375" - integrity sha512-bp+93WFzx1FojVEIeFPtG0A1pKsFdCUcZvVdZdRlmNooOUrz9Mm9bneRd8hDwAQ37pxiZkCOxopSXXRQN10mYw== +"@smithy/querystring-builder@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.2.tgz#67a1bb503037c4666b5df56ad4b9e10bc525f568" + integrity sha512-H99LOMWEssfwqkOoTs4Y12UiZ7CTGQSX5Nrx5UkYgRbUEpC1GnnaprHiYrqclC58/xr4K76aNchdPyioxewMzA== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-uri-escape" "^2.0.0" tslib "^2.5.0" -"@smithy/querystring-parser@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.1.tgz#915872aa7983218da3e87144a5b729dd6ae6f50f" - integrity sha512-h+e7k1z+IvI2sSbUBG9Aq46JsgLl4UqIUl6aigAlRBj+P6ocNXpM6Yn1vMBw5ijtXeZbYpd1YvCxwDgdw3jhmg== +"@smithy/querystring-parser@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.2.tgz#d6b2562e7ae29282b144939e5fd439b17bdf61dd" + integrity sha512-L4VtKQ8O4/aWPQJbiFymbhAmxdfLnEaROh/Vs0OstJ7jtOZeBl2QJmuWY2V7hjt64W7V+tEn2sv6vVvnxkm/xQ== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/service-error-classification@^2.0.0": @@ -3393,36 +3344,36 @@ resolved "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.0.tgz#bbce07c9c529d9333d40db881fd4a1795dd84892" integrity sha512-2z5Nafy1O0cTf69wKyNjGW/sNVMiqDnb4jgwfMG8ye8KnFJ5qmJpDccwIbJNhXIfbsxTg9SEec2oe1cexhMJvw== -"@smithy/shared-ini-file-loader@^2.0.0", "@smithy/shared-ini-file-loader@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.1.tgz#47278552cf9462e731077da2f66a32d21b775e15" - integrity sha512-a463YiZrPGvM+F336rIF8pLfQsHAdCRAn/BiI/EWzg5xLoxbC7GSxIgliDDXrOu0z8gT3nhVsif85eU6jyct3A== +"@smithy/shared-ini-file-loader@^2.0.0", "@smithy/shared-ini-file-loader@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.2.tgz#49b9bf384ece821352f50c8f6cb989edc77d2dbf" + integrity sha512-2VkNOM/82u4vatVdK5nfusgGIlvR48Fkq6me17Oc+V1iyxfR/1x0pG6LzW0br1qlGtzBYFZKmDyviBRcPVFTVw== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/signature-v4@^2.0.0": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.1.tgz#1f9e72930def3c25a3918ee7b562044fecbdaef4" - integrity sha512-jztv5Mirca42ilxmMDjzLdXcoAmRhZskGafGL49sRo5u7swEZcToEFrq6vtX5YMbSyTVrE9Teog5EFexY5Ff2Q== + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.2.tgz#c1ec6d9485a72039060e9a8fe2c02e0afb9d7764" + integrity sha512-YMooDEw/UmGxcXY4qWnSXkbPFsRloluSvyXVT678YPDN/K2AS1GzKfRsvSU7fbccOB4WF8MHZf2UqcRGEltE3Q== dependencies: - "@smithy/eventstream-codec" "^2.0.1" + "@smithy/eventstream-codec" "^2.0.2" "@smithy/is-array-buffer" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-hex-encoding" "^2.0.0" "@smithy/util-middleware" "^2.0.0" "@smithy/util-uri-escape" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/smithy-client@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.0.1.tgz#34572ada6eccb62e6f0b38b6a9dc261e2cdf4d24" - integrity sha512-LHC5m6tYpEu1iNbONfvMbwtErboyTZJfEIPoD78Ei5MVr36vZQCaCla5mvo36+q/a2NAk2//fA5Rx3I1Kf7+lQ== +"@smithy/smithy-client@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.0.2.tgz#3364bfb4afa73d57712b95cb9319f7c8324a104e" + integrity sha512-mDfokI8WwLU5C0gcQ4ww/zJI/WLGSh2+vdIA42JRnjfYUjJNH/rKfX9YOnn2eBOxl3loATERVUqkHmKe+P8s2Q== dependencies: "@smithy/middleware-stack" "^2.0.0" - "@smithy/types" "^2.0.2" - "@smithy/util-stream" "^2.0.1" + "@smithy/types" "^2.1.0" + "@smithy/util-stream" "^2.0.2" tslib "^2.5.0" "@smithy/types@^1.2.0": @@ -3432,20 +3383,20 @@ dependencies: tslib "^2.5.0" -"@smithy/types@^2.0.2": - version "2.0.2" - resolved "https://registry.npmjs.org/@smithy/types/-/types-2.0.2.tgz#49d42724c909e845bfd80a2e195740614ce497f3" - integrity sha512-wcymEjIXQ9+NEfE5Yt5TInAqe1o4n+Nh+rh00AwoazppmUt8tdo6URhc5gkDcOYrcvlDVAZE7uG69nDpEGUKxw== +"@smithy/types@^2.1.0": + version "2.1.0" + resolved "https://registry.npmjs.org/@smithy/types/-/types-2.1.0.tgz#67fd47c25bbb0fd818951891bf7bcf19a8ee2fe6" + integrity sha512-KLsCsqxX0j2l99iP8s0f7LBlcsp7a7ceXGn0LPYPyVOsqmIKvSaPQajq0YevlL4T9Bm+DtcyXfBTbtBcLX1I7A== dependencies: tslib "^2.5.0" -"@smithy/url-parser@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.1.tgz#c0712fd7bde198644ffd57b202aa5d54bd437520" - integrity sha512-NpHVOAwddo+OyyIoujDL9zGL96piHWrTNXqltWmBvlUoWgt1HPyBuKs6oHjioyFnNZXUqveTOkEEq0U5w6Uv8A== +"@smithy/url-parser@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.2.tgz#af50bd62298b209b1a16c80912a03460b7cb8994" + integrity sha512-X1mHCzrSVDlhVy7d3S7Vq+dTfYzwh4n7xGHhyJumu77nJqIss0lazVug85Pwo0DKIoO314wAOvMnBxNYDa+7wA== dependencies: - "@smithy/querystring-parser" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/querystring-parser" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/util-base64@^2.0.0": @@ -3485,26 +3436,26 @@ dependencies: tslib "^2.5.0" -"@smithy/util-defaults-mode-browser@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.1.tgz#650805fc2f308dee8efcf812392a6578ebcc652d" - integrity sha512-w72Qwsb+IaEYEFtYICn0Do42eFju78hTaBzzJfT107lFOPdbjWjKnFutV+6GL/nZd5HWXY7ccAKka++C3NrjHw== +"@smithy/util-defaults-mode-browser@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.2.tgz#fb3ad350573ddea0ff7222adc98e9ecc4155b0d3" + integrity sha512-c2tMMjb624XLuzmlRoZpnFOkejVxcgw3WQKdmgdGZYZapcLzXyC0H9JhnXMjQCt30GqLTlsILRNVBYwFRbw/4Q== dependencies: - "@smithy/property-provider" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/property-provider" "^2.0.2" + "@smithy/types" "^2.1.0" bowser "^2.11.0" tslib "^2.5.0" -"@smithy/util-defaults-mode-node@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.1.tgz#3a8fc607735481878c7c4c739da358bd0bb9bcae" - integrity sha512-dNF45caelEBambo0SgkzQ0v76m4YM+aFKZNTtSafy7P5dVF8TbjZuR2UX1A5gJABD9XK6lzN+v/9Yfzj/EDgGg== - dependencies: - "@smithy/config-resolver" "^2.0.1" - "@smithy/credential-provider-imds" "^2.0.1" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/property-provider" "^2.0.1" - "@smithy/types" "^2.0.2" +"@smithy/util-defaults-mode-node@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.2.tgz#2e16e3eb57427c76604c255c38d9e1eacd385d7e" + integrity sha512-gt7m5LLqUtEKldJLyc14DE4kb85vxwomvt9AfEMEvWM4VwfWS1kGJqiStZFb5KNqnQPXw8vvpgLTi8NrWAOXqg== + dependencies: + "@smithy/config-resolver" "^2.0.2" + "@smithy/credential-provider-imds" "^2.0.2" + "@smithy/node-config-provider" "^2.0.2" + "@smithy/property-provider" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@smithy/util-hex-encoding@^2.0.0": @@ -3529,14 +3480,14 @@ "@smithy/service-error-classification" "^2.0.0" tslib "^2.5.0" -"@smithy/util-stream@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.1.tgz#cbe2af5704a6050b9075835a8e7251185901864b" - integrity sha512-2a0IOtwIKC46EEo7E7cxDN8u2jwOiYYJqcFKA6rd5rdXqKakHT2Gc+AqHWngr0IEHUfW92zX12wRQKwyoqZf2Q== +"@smithy/util-stream@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.2.tgz#cb4f3c4eca4253f77a780fd861630ed02d67b220" + integrity sha512-Mg9IJcKIu4YKlbzvpp1KLvh4JZLdcPgpxk+LICuDwzZCfxe47R9enVK8dNEiuyiIGK2ExbfvzCVT8IBru62vZw== dependencies: - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.2" + "@smithy/node-http-handler" "^2.0.2" + "@smithy/types" "^2.1.0" "@smithy/util-base64" "^2.0.0" "@smithy/util-buffer-from" "^2.0.0" "@smithy/util-hex-encoding" "^2.0.0" @@ -3565,13 +3516,13 @@ "@smithy/util-buffer-from" "^2.0.0" tslib "^2.5.0" -"@smithy/util-waiter@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.1.tgz#1ffb4ce57e0ebbc2564e702b51fc44996ae90765" - integrity sha512-bSyGFicPRYuGFFWAr72UvYI7tE7KmEeFJJ5iaLuTTdo8RGaNBZ2kE25coGtzrejYh9AhwSfckBvbxgEDxIxhlA== +"@smithy/util-waiter@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.2.tgz#32fa0fbd3ec12827daa396f2ec52e5f47478d327" + integrity sha512-7XCEVXDLguf3Og0NIF/KYEAHtrzNXmCdtEwMfOXr4iBKOUWYzNj91YB9O7tLrct8VGvysGA0x2xYzbxMbvF0QQ== dependencies: - "@smithy/abort-controller" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/abort-controller" "^2.0.2" + "@smithy/types" "^2.1.0" tslib "^2.5.0" "@szmarczak/http-timer@^5.0.1": @@ -3829,9 +3780,9 @@ form-data "^3.0.0" "@types/node@*": - version "20.4.5" - resolved "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz#9dc0a5cb1ccce4f7a731660935ab70b9c00a5d69" - integrity sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg== + version "20.4.9" + resolved "https://registry.npmjs.org/@types/node/-/node-20.4.9.tgz#c7164e0f8d3f12dfae336af0b1f7fdec8c6b204f" + integrity sha512-8e2HYcg7ohnTUbHk8focoklEQYvemQmu9M/f43DZVx43kHn0tE3BY/6gSDxS7k0SprtS0NHvj+L80cGLnoOUcQ== "@types/node@18.11.19": version "18.11.19" @@ -3839,9 +3790,9 @@ integrity sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw== "@types/node@^16", "@types/node@^16.9.2": - version "16.18.39" - resolved "https://registry.npmjs.org/@types/node/-/node-16.18.39.tgz#aa39a1a87a40ef6098ee69689a1acb0c1b034832" - integrity sha512-8q9ZexmdYYyc5/cfujaXb4YOucpQxAV4RMG0himLyDUOEr8Mr79VrqsFI+cQ2M2h89YIuy95lbxuYjxT4Hk4kQ== + version "16.18.40" + resolved "https://registry.npmjs.org/@types/node/-/node-16.18.40.tgz#968d64746d20cac747a18ca982c0f1fe518c031c" + integrity sha512-+yno3ItTEwGxXiS/75Q/aHaa5srkpnJaH+kdkTVJ3DtJEwv92itpKbxU+FjPoh2m/5G9zmUQfrL4A4C13c+iGA== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -4212,12 +4163,10 @@ agent-base@^7.0.1, agent-base@^7.0.2, agent-base@^7.1.0: debug "^4.3.4" agentkeepalive@^4.2.1: - version "4.3.0" - resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.3.0.tgz#bb999ff07412653c1803b3ced35e50729830a255" - integrity sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg== + version "4.5.0" + resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== dependencies: - debug "^4.1.0" - depd "^2.0.0" humanize-ms "^1.2.1" aggregate-error@^3.0.0: @@ -4582,10 +4531,10 @@ aws-sdk-mock@5.8.0: sinon "^14.0.1" traverse "^0.6.6" -aws-sdk@^2.1231.0, aws-sdk@^2.1427.0, aws-sdk@^2.928.0: - version "2.1427.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1427.0.tgz#65b7ace2cb06d1f45ed1579790a1300c76aaad29" - integrity sha512-PIbBIKwvkvvic7hNQevpzi5Xqbi0YzzbLaFv8NZMorwu73b8ydyF+/B/G2iJ0w82jlAzDPQpWqf/7MuP59X9Gg== +aws-sdk@^2.1231.0, aws-sdk@^2.1432.0, aws-sdk@^2.928.0: + version "2.1432.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1432.0.tgz#f33981d7299b55cc79421901634aeb8d2ce16820" + integrity sha512-bnPilJ0YkFOHGL2yYSnpd/oMnsDicGQKmE479vDn/AVcKhRswcg893DTqxrkkuuylEIcIIPPHBqX+IlwNv1zqw== dependencies: buffer "4.9.2" events "1.1.1" @@ -4968,9 +4917,9 @@ camelcase@^7.0.1: integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== caniuse-lite@^1.0.30001517: - version "1.0.30001518" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001518.tgz#b3ca93904cb4699c01218246c4d77a71dbe97150" - integrity sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA== + version "1.0.30001519" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz#3e7b8b8a7077e78b0eb054d69e6edf5c7df35601" + integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -4996,10 +4945,10 @@ cdk8s-plus-24@2.12.1: dependencies: minimatch "^3.1.2" -cdk8s@^2.30.0: - version "2.30.0" - resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.30.0.tgz#a1e39dadc8cc163e8e02cca3753a1e7b5117c46e" - integrity sha512-v4tfvGI7TEb9YxrL31VAFsaZKDa9apxXaj/Cqja+0TAJJCXY25TibyVcxlpDXVY6tvxrUftjCFzLI1+VPQBw7Q== +cdk8s@^2.38.0: + version "2.38.0" + resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.38.0.tgz#7b06bd504a6a967076d608b3013d0d347095c4e1" + integrity sha512-8YQTla19S/xvCptOtrJHNCxCcA704kvibyi1kH3RA1Q/86ZCK1K0Cb4CdFpQp50TbuaAaVdvzIp0v/vv+RurEw== dependencies: fast-json-patch "^3.1.1" follow-redirects "^1.15.2" @@ -5015,7 +4964,7 @@ chalk@4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -5225,10 +5174,10 @@ co@^4.6.0: resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -codemaker@1.86.0, codemaker@^1.86.0: - version "1.86.0" - resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.86.0.tgz#c4a72a8888d2c13fd81f7ff6693225a0d0090af2" - integrity sha512-ljRR4xToexcgZj0QgQ09x3JJItgMphqbbKG+UPK+MGcd65oZf891d9yjCj0MUbNRQ26iHj1jTR4tU9TW+q9LfQ== +codemaker@1.86.1, codemaker@^1.86.1: + version "1.86.1" + resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.86.1.tgz#2e34bdab7201ac712532bccba61b8d571348417d" + integrity sha512-W35+XgDv/ZNxWTFsvy7xf8XSIwZ8zkJUOlVq0zoOBiZCjk4j0n7HEWy25rI83OZj76ndmyL7EhTyLSTw1PzobA== dependencies: camelcase "^6.3.0" decamelize "^5.0.1" @@ -5935,11 +5884,6 @@ delegates@^1.0.0: resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -depd@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - dependency-tree@^8.1.1: version "8.1.2" resolved "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.1.2.tgz#c9e652984f53bd0239bc8a3e50cbd52f05b2e770" @@ -6187,9 +6131,9 @@ ejs@^3.1.7: jake "^10.8.5" electron-to-chromium@^1.4.477: - version "1.4.480" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.480.tgz#40e32849ca50bc23ce29c1516c5adb3fddac919d" - integrity sha512-IXTgg+bITkQv/FLP9FjX6f9KFCs5hQWeh5uNSKxB9mqYj/JXhHDbu+ekS43LVvbkL3eW6/oZy4+r9Om6lan1Uw== + version "1.4.488" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.488.tgz#442b1855f8c84fb1ed79f518985c65db94f64cc9" + integrity sha512-Dv4sTjiW7t/UWGL+H8ZkgIjtUAVZDgb/PwGWvMsCT7jipzUV/u5skbLXPFKb6iV0tiddVi/bcS2/kUrczeWgIQ== emittery@^0.13.1: version "0.13.1" @@ -6386,33 +6330,33 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild@^0.18.17: - version "0.18.17" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.18.17.tgz#2aaf6bc6759b0c605777fdc435fea3969e091cad" - integrity sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg== +esbuild@^0.19.0: + version "0.19.0" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.19.0.tgz#f187e4ce3bcc7396d13f408a991655efeba65282" + integrity sha512-i7i8TP4vuG55bKeLyqqk5sTPu1ZjPH3wkcLvAj/0X/222iWFo3AJUYRKjbOoY6BWFMH3teizxHEdV9Su5ESl0w== optionalDependencies: - "@esbuild/android-arm" "0.18.17" - "@esbuild/android-arm64" "0.18.17" - "@esbuild/android-x64" "0.18.17" - "@esbuild/darwin-arm64" "0.18.17" - "@esbuild/darwin-x64" "0.18.17" - "@esbuild/freebsd-arm64" "0.18.17" - "@esbuild/freebsd-x64" "0.18.17" - "@esbuild/linux-arm" "0.18.17" - "@esbuild/linux-arm64" "0.18.17" - "@esbuild/linux-ia32" "0.18.17" - "@esbuild/linux-loong64" "0.18.17" - "@esbuild/linux-mips64el" "0.18.17" - "@esbuild/linux-ppc64" "0.18.17" - "@esbuild/linux-riscv64" "0.18.17" - "@esbuild/linux-s390x" "0.18.17" - "@esbuild/linux-x64" "0.18.17" - "@esbuild/netbsd-x64" "0.18.17" - "@esbuild/openbsd-x64" "0.18.17" - "@esbuild/sunos-x64" "0.18.17" - "@esbuild/win32-arm64" "0.18.17" - "@esbuild/win32-ia32" "0.18.17" - "@esbuild/win32-x64" "0.18.17" + "@esbuild/android-arm" "0.19.0" + "@esbuild/android-arm64" "0.19.0" + "@esbuild/android-x64" "0.19.0" + "@esbuild/darwin-arm64" "0.19.0" + "@esbuild/darwin-x64" "0.19.0" + "@esbuild/freebsd-arm64" "0.19.0" + "@esbuild/freebsd-x64" "0.19.0" + "@esbuild/linux-arm" "0.19.0" + "@esbuild/linux-arm64" "0.19.0" + "@esbuild/linux-ia32" "0.19.0" + "@esbuild/linux-loong64" "0.19.0" + "@esbuild/linux-mips64el" "0.19.0" + "@esbuild/linux-ppc64" "0.19.0" + "@esbuild/linux-riscv64" "0.19.0" + "@esbuild/linux-s390x" "0.19.0" + "@esbuild/linux-x64" "0.19.0" + "@esbuild/netbsd-x64" "0.19.0" + "@esbuild/openbsd-x64" "0.19.0" + "@esbuild/sunos-x64" "0.19.0" + "@esbuild/win32-arm64" "0.19.0" + "@esbuild/win32-ia32" "0.19.0" + "@esbuild/win32-x64" "0.19.0" escalade@^3.1.1: version "3.1.1" @@ -6450,14 +6394,14 @@ escodegen@^2.0.0, escodegen@^2.1.0: optionalDependencies: source-map "~0.6.1" -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== +eslint-import-resolver-node@^0.3.7, eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" eslint-import-resolver-typescript@^2.7.1: version "2.7.1" @@ -7854,9 +7798,9 @@ init-package-json@^3.0.2: validate-npm-package-name "^4.0.0" inquirer@^8.2.3, inquirer@^8.2.4: - version "8.2.5" - resolved "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz#d8654a7542c35a9b9e069d27e2df4858784d54f8" - integrity sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ== + version "8.2.6" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" + integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg== dependencies: ansi-escapes "^4.2.1" chalk "^4.1.1" @@ -7872,7 +7816,7 @@ inquirer@^8.2.3, inquirer@^8.2.4: string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" - wrap-ansi "^7.0.0" + wrap-ansi "^6.0.1" internal-slot@^1.0.5: version "1.0.5" @@ -7983,10 +7927,10 @@ is-cidr@^4.0.2: dependencies: cidr-regex "^3.1.1" -is-core-module@^2.11.0, is-core-module@^2.12.0, is-core-module@^2.12.1, is-core-module@^2.5.0, is-core-module@^2.8.1: - version "2.12.1" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== +is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.8.1: + version "2.13.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== dependencies: has "^1.0.3" @@ -8822,60 +8766,60 @@ jsesc@^2.5.1: resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsii-diff@1.86.0: - version "1.86.0" - resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.86.0.tgz#f52736b352221414ef83f1da49dfc0447fa55509" - integrity sha512-rDA9qvdG8YqWB0jY1MKg3Iyrtvz6jd+iS2VqKUkg4EdWqDxDvbS7owALfuJqO1eCQyzNBahHmGJPt4m6UYu+TA== +jsii-diff@1.86.1: + version "1.86.1" + resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.86.1.tgz#f8f3970a2b341f26f27a629f10c1b3d1196e6dbb" + integrity sha512-3rj9iMRcct4sXftSjffKsPJ5SBXWljh6R3in+rDs53VscaT5NTSilnTRu0/wPKbw2DkVtEXZPPqKZjilLH9Yew== dependencies: - "@jsii/check-node" "1.86.0" - "@jsii/spec" "^1.86.0" + "@jsii/check-node" "1.86.1" + "@jsii/spec" "^1.86.1" fs-extra "^10.1.0" - jsii-reflect "^1.86.0" + jsii-reflect "^1.86.1" log4js "^6.9.1" yargs "^16.2.0" -jsii-pacmak@1.86.0: - version "1.86.0" - resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.86.0.tgz#6c61fc7202cedc1d6da23fd7e7ea3b2eea1b39f8" - integrity sha512-AUFqGpMgXsYlUWHtquIINRNGPx0X+EFCBqflwG195yla0Sblj/GYpjg8w/7/tvnr6EELZjlq9nRg+1+TCCVg8w== +jsii-pacmak@1.86.1: + version "1.86.1" + resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.86.1.tgz#1a4669728a40c85e4587e3e316a5a6f3529ff3c9" + integrity sha512-xmv2QRK9JLdBCHUXKdHf/DVtpm2BY+dKzfYWOwLh5CmPYRvvWwqP7lTC+FvxOw4Sk2mqu/o7PCnVTRAt8U8csQ== dependencies: - "@jsii/check-node" "1.86.0" - "@jsii/spec" "^1.86.0" + "@jsii/check-node" "1.86.1" + "@jsii/spec" "^1.86.1" clone "^2.1.2" - codemaker "^1.86.0" + codemaker "^1.86.1" commonmark "^0.30.0" escape-string-regexp "^4.0.0" fs-extra "^10.1.0" - jsii-reflect "^1.86.0" - jsii-rosetta "^1.86.0" + jsii-reflect "^1.86.1" + jsii-rosetta "^1.86.1" semver "^7.5.4" spdx-license-list "^6.6.0" xmlbuilder "^15.1.1" yargs "^16.2.0" -jsii-reflect@1.86.0, jsii-reflect@^1.84.0, jsii-reflect@^1.86.0: - version "1.86.0" - resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.86.0.tgz#b1e19605ef1b777f92fb91e9cb9ae579419d1d69" - integrity sha512-LlaVKhMHPYN6pEutH83nesWS5VQuEOToy+GtXU8quYilVMQ6rAlo3LgzdBdQd+jSjROKDa/BgAkt4hWdGa5VLQ== +jsii-reflect@1.86.1, jsii-reflect@^1.84.0, jsii-reflect@^1.86.1: + version "1.86.1" + resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.86.1.tgz#5c8dcc79d705885a47e9c57f0d97d71382bda2b1" + integrity sha512-Z9Avq431sdwuku+fpC3pM9DngpmbCA2U8QI4Bctg/M4b5PMDuKuMxBWcdAcU/LhtL14lxNZ66Src0hYmNVk4eQ== dependencies: - "@jsii/check-node" "1.86.0" - "@jsii/spec" "^1.86.0" + "@jsii/check-node" "1.86.1" + "@jsii/spec" "^1.86.1" chalk "^4" fs-extra "^10.1.0" - oo-ascii-tree "^1.86.0" + oo-ascii-tree "^1.86.1" yargs "^16.2.0" -jsii-rosetta@^1.84.0, jsii-rosetta@^1.86.0: - version "1.86.0" - resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.86.0.tgz#ea752a765083585643fb32187b4e9517919b3825" - integrity sha512-pKQR2fQHDi59vKEhYAI15fZDIK/MGr7nBxFqjwlSolh8yNJArYLhNwJKvAgY8TfXEoIXK37hJT/9G9VgNSOcTQ== +jsii-rosetta@^1.84.0, jsii-rosetta@^1.86.1: + version "1.86.1" + resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.86.1.tgz#7653f3593a5626e9d5e21e5bf330b6038ec92355" + integrity sha512-QmuFIFKYXsks6SpWsrztlFnXZptiwl7m0kpvqfiP8NGeGU5r5hTBglAorNh4FO58W5dYVUKmebEN076brhGRIQ== dependencies: - "@jsii/check-node" "1.86.0" - "@jsii/spec" "1.86.0" + "@jsii/check-node" "1.86.1" + "@jsii/spec" "1.86.1" "@xmldom/xmldom" "^0.8.10" commonmark "^0.30.0" fast-glob "^3.3.1" - jsii "1.86.0" + jsii "1.86.1" semver "^7.5.4" semver-intersect "^1.4.0" stream-json "^1.8.0" @@ -8902,13 +8846,13 @@ jsii-rosetta@~5.1.9: workerpool "^6.4.0" yargs "^17.7.2" -jsii@1.86.0, jsii@^1.84.0: - version "1.86.0" - resolved "https://registry.npmjs.org/jsii/-/jsii-1.86.0.tgz#c1c4e116fd57f66de836520ba1a7072cbcd2478b" - integrity sha512-FIIbGLOfCvbAV/TNsEoHC/JJuQy5VSpCejlmvahG8s9D53rTOd9XKpOHwlNmV3ZQ47g2p381mnnioOl7dx7uug== +jsii@1.86.1, jsii@^1.84.0: + version "1.86.1" + resolved "https://registry.npmjs.org/jsii/-/jsii-1.86.1.tgz#ba5f7d2d948b02c4efa2543260e1eb9e108bf436" + integrity sha512-gAi/mGRdIpCYY7Na61VPE717Z6+/1HTYqgxjMC+VdLXxITbWpaQqO+DqsOnhtsIh+JyjIQM7VOSZ+5Ymf1A74A== dependencies: - "@jsii/check-node" "1.86.0" - "@jsii/spec" "^1.86.0" + "@jsii/check-node" "1.86.1" + "@jsii/spec" "^1.86.1" case "^1.6.3" chalk "^4" fast-deep-equal "^3.1.3" @@ -10335,9 +10279,9 @@ npm-bundled@^3.0.0: npm-normalize-package-bin "^3.0.0" npm-check-updates@^16: - version "16.10.17" - resolved "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.10.17.tgz#1f28b024235c2ecc34ce7361c0376d61953b556c" - integrity sha512-ZoIbWYJhlgMDoByq1WC6Ys3E76IvNCxgS54tPUFbK5J/nqf/BCJt6xiMPAEa7G1HuyAruG+orUF9uTsTGUZl8g== + version "16.10.18" + resolved "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.10.18.tgz#6f6fcbc57c519e7ad12d370a18de8afdf021b597" + integrity sha512-dmfhCMX7+UNrBeftBGb1rMX4Qi6+FOI5cuu1VkLeE4LIazbiEYsdgTG+GQywYry+BR9R3EfOXITYPfgRhcdznw== dependencies: chalk "^5.3.0" cli-table3 "^0.6.3" @@ -10793,10 +10737,10 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.86.0: - version "1.86.0" - resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.86.0.tgz#8a3510b4b410f07c4d7a2550a155f1f3c20d2648" - integrity sha512-wT93XycBq+vZ9Q1vAIJiNt+1poO4Mj2rHol4cS1YHaQ1dzh3krc8b2XrkxrF68OH9qGyc/pxVH3b9LklaM1zpQ== +oo-ascii-tree@^1.86.1: + version "1.86.1" + resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.86.1.tgz#ae924ed69d3699c8495ceb1ff36d5c2b2cc76a99" + integrity sha512-pM4jJfP+5cWCOqoSN3RUgNNcOPqLYhmwzbw9QOHNZjCWAfrlgq2D/CSxer0vKDDm5AMkCBzlcknxQLKx9zNqXA== open@^7.4.2: version "7.4.2" @@ -11850,21 +11794,12 @@ resolve.exports@^2.0.0: resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.1: - version "1.22.2" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.22.3: - version "1.22.3" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz#4b4055349ffb962600972da1fdc33c46a4eb3283" - integrity sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw== +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.3, resolve@^1.22.4: + version "1.22.4" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== dependencies: - is-core-module "^2.12.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -13076,9 +13011,9 @@ typescript@^4.5.5, typescript@~4.9.5: integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== typescript@next: - version "5.2.0-dev.20230802" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.2.0-dev.20230802.tgz#ff235fe8e17dae3a110590f5286519345d5926de" - integrity sha512-rBvAnzaaMhwBAS2UaKejYhaED3VM74/xng/+xcVSst0PbkJBqggj19w/gwJ/4q07oOjKMgwunklsSjwe+iw2ZA== + version "5.3.0-dev.20230809" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.0-dev.20230809.tgz#09c59d3e855c30ac9ec8f9d41fc62a9231a5b28c" + integrity sha512-AhrbSEcL6ar5+jdeqwrmrQrvxCX5iK4Zb/YtlCaft0xEr4HOeKWtixh8FRIqugc83bSHqE7noQ0BhLZa9Biazw== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -13456,7 +13391,7 @@ workerpool@^6.4.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^6.2.0: +wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==